com.amazon.inapp.purchasing
Class PurchaseUpdatesResponse

java.lang.Object
  extended by com.amazon.inapp.purchasing.PurchaseUpdatesResponse

public final class PurchaseUpdatesResponse
extends java.lang.Object

Represents the result of a call to PurchasingManager.initiatePurchaseUpdatesRequest(Offset) and is sent to the registered PurchasingObserver asynchronously via PurchasingObserver.onPurchaseUpdatesResponse(PurchaseUpdatesResponse).


Nested Class Summary
static class PurchaseUpdatesResponse.PurchaseUpdatesRequestStatus
          Indicates the result of a receipt data request initiated via PurchasingManager.initiatePurchaseUpdatesRequest(Offset).
 
Method Summary
 Offset getOffset()
          Returns an Offset that you can pass to PurchasingManager.initiatePurchaseUpdatesRequest(Offset) if isMore() indicates that more results are available.
 PurchaseUpdatesResponse.PurchaseUpdatesRequestStatus getPurchaseUpdatesRequestStatus()
          Returns the status of the request.
 java.util.Set<Receipt> getReceipts()
          Returns receipts, or null if getPurchaseUpdatesRequestStatus() is not PurchaseUpdatesResponse.PurchaseUpdatesRequestStatus.SUCCESSFUL.
 java.lang.String getRequestId()
          Provides access to the request ID originally returned by PurchasingManager.initiatePurchaseUpdatesRequest(Offset).
 java.util.Set<java.lang.String> getRevokedSkus()
          Returns revoked SKUs, or null if getPurchaseUpdatesRequestStatus() is not PurchaseUpdatesResponse.PurchaseUpdatesRequestStatus.SUCCESSFUL.
 java.lang.String getUserId()
          Returns the ID of the user associated with the updates.
 boolean isMore()
          Returns true if more results are available.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getRequestId

public java.lang.String getRequestId()
Provides access to the request ID originally returned by PurchasingManager.initiatePurchaseUpdatesRequest(Offset). This identifier can be used to correlate the original request with this response.

Returns:
the ID of the request that this response is associated with

getUserId

public java.lang.String getUserId()
Returns the ID of the user associated with the updates. This identifier is unique to this application.

Returns:
The ID of the user associated with the updates

getPurchaseUpdatesRequestStatus

public PurchaseUpdatesResponse.PurchaseUpdatesRequestStatus getPurchaseUpdatesRequestStatus()
Returns the status of the request.

Returns:
The status of the request

getReceipts

public java.util.Set<Receipt> getReceipts()
Returns receipts, or null if getPurchaseUpdatesRequestStatus() is not PurchaseUpdatesResponse.PurchaseUpdatesRequestStatus.SUCCESSFUL.

Returns:
the receipts, or null on failure or error

getRevokedSkus

public java.util.Set<java.lang.String> getRevokedSkus()
Returns revoked SKUs, or null if getPurchaseUpdatesRequestStatus() is not PurchaseUpdatesResponse.PurchaseUpdatesRequestStatus.SUCCESSFUL.

Returns:
the revoked SKUs, or null on failure or error

getOffset

public Offset getOffset()
Returns an Offset that you can pass to PurchasingManager.initiatePurchaseUpdatesRequest(Offset) if isMore() indicates that more results are available.

Returns:
an Offset that can be used to retrieve more Receipt data if it's available

isMore

public boolean isMore()
Returns true if more results are available. Use getOffset() to retrieve the offset which you can pass to PurchasingManager.initiatePurchaseUpdatesRequest(Offset) to retrieve more results.

Returns:
true if more results are available

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object