com.amazon.InAppSDK.purchasing
Class PurchaseResponse

java.lang.Object
  extended by com.amazon.InAppSDK.purchasing.PurchaseResponse

public final class PurchaseResponse
extends java.lang.Object

Represents the result of a call to PurchasingManager.initiatePurchaseRequest(String) and is sent to the registered PurchasingObserver asynchronously via PurchasingObserver.notifyPurchaseResponse(PurchaseResponse).


Nested Class Summary
static class PurchaseResponse.PurchaseRequestStatus
          Indicates the result of a purchase operation initiated via PurchasingManager.initiatePurchaseRequest(String).
 
Method Summary
 PurchaseResponse.PurchaseRequestStatus getPurchaseRequestStatus()
          Indicates the status of the purchase request.
 Receipt getReceipt()
          In the case where getPurchaseRequestStatus() returns PurchaseResponse.PurchaseRequestStatus.Successful a Receipt will also be returned with details of the item that was purchased.
 java.lang.String getRequestId()
          Provides access to the request ID originally returned by PurchasingManager.initiatePurchaseRequest(String).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRequestId

public java.lang.String getRequestId()
Provides access to the request ID originally returned by PurchasingManager.initiatePurchaseRequest(String). 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

getReceipt

public Receipt getReceipt()
In the case where getPurchaseRequestStatus() returns PurchaseResponse.PurchaseRequestStatus.Successful a Receipt will also be returned with details of the item that was purchased. If the PurchaseResponse.PurchaseRequestStatus is not PurchaseResponse.PurchaseRequestStatus.Successful, this method will return null.

Returns:
a Receipt in the case where getPurchaseRequestStatus() returns PurchaseResponse.PurchaseRequestStatus.Successful, null otherwise

getPurchaseRequestStatus

public PurchaseResponse.PurchaseRequestStatus getPurchaseRequestStatus()
Indicates the status of the purchase request.

Returns:
the status of the purchase request