Adobe DPS - JavaScript Library API

Class adobeDPS-SubscriptionService

Extends:
adobeDPS-SubscriptionService -> adobeDPS-Service -> adobeDPS-Class

Service for accessing receipt information.
Accessible from adobeDPS.subscriptionService

Constructor

adobeDPS-SubscriptionService()
[inner] Create an instance of the SubscriptionService.

Static Fields

Field Defined By
adobeDPS-SubscriptionService.instance
The singleton of the SubscriptionService.
SubscriptionService

Fields

Field Defined By
activeSubscription : Object.
Property will be populated when there is an active subscription.
SubscriptionService
An associative array containing all the available subscriptions, indexed by adobeDPS-Subscription#productId.
SubscriptionService
Signal to indicate that new subscription(s) have been added to availableSubscriptions.
SubscriptionService
Signal to indicate that subscription(s) have been removed from availableSubscriptions.
SubscriptionService

Methods

Method Defined By
addSubscription(subscriptionProductId:String)
Add a single subscription product to the list of subscriptions available for purchase
SubscriptionService
addSubscriptions(subscriptionProductIds:Array)
Add a list of subscription products to the list of subscriptions available for purchase
SubscriptionService
removeSubscription(subscriptionProductId:String)
Remove a single subscription product from the list of subscriptions available for purchase
SubscriptionService
removeSubscriptions(subscriptionProductIds:Array)
Remove a list of subscription products from the list of subscriptions available for purchase
SubscriptionService
setSubscription(subscriptionProductId:String)
Set a single subscription product as the only subscription available for purchase
SubscriptionService
setSubscriptions(subscriptionProductIds:Array)
Set a list of subscription products as the new list of subscriptions available for purchase
SubscriptionService
Inherited from adobeDPS-Class
Gets the string representation of this instance.
Class Detail
adobeDPS-SubscriptionService()
[inner] Create an instance of the SubscriptionService.
- This is an internal constructor and shouldn't be called by regular users.
Static Field Details
adobeDPS-SubscriptionService.instance
The singleton of the SubscriptionService.
Field Details
activeSubscription : Object.
Property will be populated when there is an active subscription.
availableSubscriptions : Object.
An associative array containing all the available subscriptions, indexed by adobeDPS-Subscription#productId.
subscriptionsAddedSignal : adobeDPS-Signal
Signal to indicate that new subscription(s) have been added to availableSubscriptions.
Callback Signature: documentsAddedHandler([ adobeDPS-Subscription, ...])
subscriptionsRemovedSignal : adobeDPS-Signal
Signal to indicate that subscription(s) have been removed from availableSubscriptions.
Callback Signature: documentsRemovedHandler([ adobeDPS-Subscription, ...])
Method Details
addSubscription(subscriptionProductId:String) : adobeDPS-ModifySubscriptionsListTransaction
Add a single subscription product to the list of subscriptions available for purchase
Parameters
subscriptionProductId String The product ID of the subscription to be added
Throws:
Error If the subscription Id to be added is new
Returns:
adobeDPS-ModifySubscriptionsListTransaction The started transaction
addSubscriptions(subscriptionProductIds:Array) : adobeDPS-ModifySubscriptionsListTransaction
Add a list of subscription products to the list of subscriptions available for purchase
Parameters
subscriptionProductIds Array The product IDs of the subscriptions to be added
Throws:
Error If none of the subscription Ids to be added are new
Returns:
adobeDPS-ModifySubscriptionsListTransaction The started transaction
removeSubscription(subscriptionProductId:String) : adobeDPS-ModifySubscriptionsListTransaction
Remove a single subscription product from the list of subscriptions available for purchase
Parameters
subscriptionProductId String The product ID of the subscription to be added
Throws:
Error If the subscription Id to be removed does not exist
Returns:
adobeDPS-ModifySubscriptionsListTransaction The started transaction
removeSubscriptions(subscriptionProductIds:Array) : adobeDPS-ModifySubscriptionsListTransaction
Remove a list of subscription products from the list of subscriptions available for purchase
Parameters
subscriptionProductIds Array The product IDs of the subscriptions to be added
Throws:
Error If none of the subscription Ids to be removed exist
Returns:
adobeDPS-ModifySubscriptionsListTransaction The started transaction
setSubscription(subscriptionProductId:String) : adobeDPS-ModifySubscriptionsListTransaction
Set a single subscription product as the only subscription available for purchase
Parameters
subscriptionProductId String The product ID of the subscription to be set
Returns:
adobeDPS-ModifySubscriptionsListTransaction The started transaction
setSubscriptions(subscriptionProductIds:Array) : adobeDPS-ModifySubscriptionsListTransaction
Set a list of subscription products as the new list of subscriptions available for purchase
Parameters
subscriptionProductIds Array The product IDs of the subscriptions to be set
Returns:
adobeDPS-ModifySubscriptionsListTransaction The started transaction
©2012-2013 Adobe Systems, inc
Documentation generated by JsDoc Toolkit 2.4.0 on Fri Feb 01 2013 13:18:40 GMT-0800 (PST)