AppMonetization / Paginator / GetSubscriptionHistory

GetSubscriptionHistory

class AppMonetization.Paginator.GetSubscriptionHistory
paginator = client.get_paginator('get_subscription_history')
paginate(**kwargs)

Creates an iterator that will paginate through responses from AppMonetization.Client.get_subscription_history().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    appId='string',
    userId='string',
    effectiveAfter=datetime(2015, 1, 1),
    effectiveBefore=datetime(2015, 1, 1),
    scope='sandbox'|'live',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • appId (string) –

    [REQUIRED]

    The ID of the app.

  • userId (string) –

    [REQUIRED]

    An opaque identifier that you assign to an end user. Do not include personally identifiable or otherwise sensitive data in this value.

  • effectiveAfter (datetime) – Returns records whose effectiveDate is at or after this instant (inclusive).

  • effectiveBefore (datetime) – Returns records whose effectiveDate is before this instant (exclusive).

  • scope (string) –

    [REQUIRED]

    Required. The environment: live or sandbox.

  • PaginationConfig (dict) –

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) –

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) –

      The size of each page.

    • StartingToken (string) –

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type:

dict

Returns:

Response Syntax

{
    'items': [
        {
            'appId': 'string',
            'userId': 'string',
            'planId': 'string',
            'effectiveAt': datetime(2015, 1, 1),
            'billingAnchorDate': datetime(2015, 1, 1),
            'billingCycle': 'MONTHLY'|'ANNUAL'|'ONE_TIME'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    Output for GetSubscriptionHistory.

    • items (list) –

      The page of historical subscription records for the user.

      • (dict) –

        A user’s subscription to a plan for an app.

        • appId (string) –

          The ID of the app that the subscription belongs to.

        • userId (string) –

          The opaque end-user identifier that the subscription belongs to.

        • planId (string) –

          The ID of the plan that the user is subscribed to.

        • effectiveAt (datetime) –

          The time when the subscription took effect.

        • billingAnchorDate (datetime) –

          The fixed reference instant the recurring billing cycle is measured from. It is set when the subscription first takes effect and stays fixed as periods roll forward, so it is normally an older date than the current period — not the start of the current period. For the end of the current cycle, use currentPeriodEndsAt on GetSubscriptionResponse (derived from this anchor and the billing cycle) rather than this value.

        • billingCycle (string) –

          The billing cycle of the subscription, such as monthly or annual.

    • NextToken (string) –

      A token to resume pagination.