|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazon.InApp.transaction.TransactionManager
public final class TransactionManager
The TransactionManager
presents the primary API for interacting with the In-App Transaction SDK. Before
using operations in this class, you must first register an TransactionObserver
instance via
registerObserver(TransactionObserver)
.
Method Summary | |
---|---|
static java.lang.String |
initiateContentDownloadRequest(java.lang.String sku,
java.lang.String location)
Initiate a request to download content for the given SKU to the given filesystem location. |
static java.lang.String |
initiateItemDataRequest(java.util.Set<java.lang.String> skus)
Initiate a request to retrieve item data for one or more SKUs. |
static java.lang.String |
initiatePurchaseRequest(java.lang.String sku)
Initiate a request to purchase a SKU. |
static java.lang.String |
initiateReceiptDataRequest(Offset offset)
Initiate a request to retrieve receipts for previous transactions, including non-consumable purchases, subscriptions and subscription renewals. |
static java.lang.String |
initiateRevokedSkusDataRequest(Offset offset)
Initiate a request to retrieve revoked SKUs. |
static void |
registerObserver(TransactionObserver transactionObserver)
You must register a TransactionObserver before invoking operations in this class. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void registerObserver(TransactionObserver transactionObserver)
TransactionObserver
before invoking operations in this class. Good practice is
to do this in your Activity's onStart lifecycle method.
transactionObserver
- The TransactionObserver
to registerpublic static java.lang.String initiatePurchaseRequest(java.lang.String sku)
TransactionObserver.notifyPurchaseResponse(PurchaseResponse)
.
sku
- The vendor SKU to initiate a purchase for
PurchaseResponse
received by the
TransactionObserver.notifyPurchaseResponse(PurchaseResponse)
callback.public static java.lang.String initiateItemDataRequest(java.util.Set<java.lang.String> skus)
TransactionObserver.notifyItemDataResponse(ItemDataResponse)
.
skus
- A set of SKUs you wish to retrieve Item
data for.
ItemDataResponse
received by the
TransactionObserver.notifyItemDataResponse(ItemDataResponse)
callback.public static java.lang.String initiateContentDownloadRequest(java.lang.String sku, java.lang.String location)
sku
- The SKU to download content for. This should be a SKU that has content, as indicated by
Receipt.isContentAvailable()
.location
- The filesystem location that content should be downloaded to. This location should have enough space
for the content and should be publicly writable.
ContentDownloadResponse
received
by the TransactionObserver.notifyContentDownloadResponse(ContentDownloadResponse)
callback.public static java.lang.String initiateReceiptDataRequest(Offset offset)
Initiate a request to retrieve receipts for previous transactions, including non-consumable purchases, subscriptions and subscription renewals. Does not return receipts for consumable purchases.
This operation works with paginated data. The beginning of the data set is specified by the Offset
you
provide here. The response will contain an Offset
marking the beginning of the next data set, if more is
available.
offset
- Marks the beginning of the data set
ReceiptDataResponse
received by
the TransactionObserver.notifyReceiptDataResponse(ReceiptDataResponse)
callback.public static java.lang.String initiateRevokedSkusDataRequest(Offset offset)
Initiate a request to retrieve revoked SKUs. These SKUs represent in-app items such as non-consumables and subscriptions that the customer no longer has access to. Non-consumable items cannot be revoked.
This operation works with paginated data. The beginning of the data set is specified by the Offset
you
provide here. The response will contain an Offset
marking the beginning of the next data set, if more is
available.
offset
- Marks the beginning of the data set
RevokedSkuDataResponse
received
by the TransactionObserver.notifyRevokedSkuDataResponse(RevokedSkuDataResponse)
callback.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |