public final class PurchaseResponse
extends java.lang.Object
PurchasingService.purchase(String).| Modifier and Type | Class and Description |
|---|---|
static class |
PurchaseResponse.RequestStatus
Represents the status of a purchase request initiated via
PurchasingService.purchase(String). |
| Constructor and Description |
|---|
PurchaseResponse(com.amazon.device.iap.internal.model.PurchaseResponseBuilder builder)
Creates an instance of the PurchaseResponse.
|
| Modifier and Type | Method and Description |
|---|---|
Receipt |
getReceipt()
Returns a
Receipt if getRequestStatus()
is PurchaseResponse.RequestStatus.SUCCESSFUL, otherwise null. |
RequestId |
getRequestId()
Returns the request ID originally returned by
PurchasingService.purchase(String). |
PurchaseResponse.RequestStatus |
getRequestStatus()
Returns the status of the purchase request.
|
UserData |
getUserData()
Returns the user ID and marketplace
information of the user associated with the purchase.
|
org.json.JSONObject |
toJSON()
Utility method to return a JSON object containing the information for a
PurchaseResponse instance.
|
java.lang.String |
toString()
Utility method to return a String object that contains the information
for a PurchaseResponse instance.
|
public PurchaseResponse(com.amazon.device.iap.internal.model.PurchaseResponseBuilder builder)
builder - The builder for the PurchaseResponse.public RequestId getRequestId()
PurchasingService.purchase(String). This identifier can be used
to correlate the original request with this response.public UserData getUserData()
public Receipt getReceipt()
Receipt if getRequestStatus()
is PurchaseResponse.RequestStatus.SUCCESSFUL, otherwise null.public PurchaseResponse.RequestStatus getRequestStatus()
public java.lang.String toString()
toString in class java.lang.Objectpublic org.json.JSONObject toJSON()
throws org.json.JSONException
org.json.JSONException