AppMonetization / Client / get_subscription_history
get_subscription_history¶
- AppMonetization.Client.get_subscription_history(**kwargs)¶
Returns the historical subscription records for a user. We recommend using pagination to ensure that the operation returns quickly and successfully.
See also: AWS API Documentation
Request Syntax
response = client.get_subscription_history( appId='string', userId='string', effectiveAfter=datetime(2015, 1, 1), effectiveBefore=datetime(2015, 1, 1), maxResults=123, nextToken='string', scope='sandbox'|'live' )
- 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).
maxResults (integer) – The maximum number of items to return in a single page.
nextToken (string) – An opaque pagination token. Pass the value returned in a response back on the next request to retrieve the following page; absent when there are no more results.
scope (string) –
[REQUIRED]
Required. The environment: live or sandbox.
- 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
currentPeriodEndsAton 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) –
An opaque pagination token. Pass the value returned in a response back on the next request to retrieve the following page; absent when there are no more results.
Exceptions