-
- All Implemented Interfaces:
-
android.os.Parcelable
public final class StoreTransaction implements Parcelable
Represents an in-app billing purchase.
-
-
Field Summary
Fields Modifier and Type Field Description private final Stringskuprivate final StringorderIdprivate final List<String>skusprivate final ProductTypetypeprivate final LongpurchaseTimeprivate final StringpurchaseTokenprivate final PurchaseStatepurchaseStateprivate final BooleanisAutoRenewingprivate final Stringsignatureprivate final JSONObjectoriginalJsonprivate final StringpresentedOfferingIdentifierprivate final StringstoreUserIDprivate final PurchaseTypepurchaseTypeprivate final Stringmarketplace
-
Constructor Summary
Constructors Constructor Description StoreTransaction(String orderId, List<String> skus, ProductType type, Long purchaseTime, String purchaseToken, PurchaseState purchaseState, Boolean isAutoRenewing, String signature, JSONObject originalJson, String presentedOfferingIdentifier, String storeUserID, PurchaseType purchaseType, String marketplace)
-
Method Summary
Modifier and Type Method Description final StringgetSku()final StringgetOrderId()Unique Google order identifier for the purchased transaction. final List<String>getSkus()Product Ids. final ProductTypegetType()Type of the product associated with the purchase. final LonggetPurchaseTime()Time the product was purchased, in milliseconds since the epoch. final StringgetPurchaseToken()Token that uniquely identifies a purchase. final PurchaseStategetPurchaseState()State of the purchase. final BooleangetIsAutoRenewing()Whether the subscription renews automatically. final StringgetSignature()String containing the signature of the Google purchase data that was signed with the private key of the developer. final JSONObjectgetOriginalJson()Returns a JSONObject format that contains details about the purchase. final StringgetPresentedOfferingIdentifier()Offering that was presented when making the purchase. final StringgetStoreUserID()Amazon's store user id. final PurchaseTypegetPurchaseType()One of PurchaseType indicating the type of purchase. final StringgetMarketplace()Amazon's marketplace. -
-
Constructor Detail
-
StoreTransaction
StoreTransaction(String orderId, List<String> skus, ProductType type, Long purchaseTime, String purchaseToken, PurchaseState purchaseState, Boolean isAutoRenewing, String signature, JSONObject originalJson, String presentedOfferingIdentifier, String storeUserID, PurchaseType purchaseType, String marketplace)
-
-
Method Detail
-
getOrderId
final String getOrderId()
Unique Google order identifier for the purchased transaction.
Only available for non-restored Google purchases. Always null for Amazon.
-
getType
final ProductType getType()
Type of the product associated with the purchase.
-
getPurchaseTime
final Long getPurchaseTime()
Time the product was purchased, in milliseconds since the epoch.
-
getPurchaseToken
final String getPurchaseToken()
Token that uniquely identifies a purchase.
-
getPurchaseState
final PurchaseState getPurchaseState()
State of the purchase.
-
getIsAutoRenewing
final Boolean getIsAutoRenewing()
Whether the subscription renews automatically.
Null for Google restored purchases.
-
getSignature
final String getSignature()
String containing the signature of the Google purchase data that was signed with the private key of the developer. Always null for Amazon.
-
getOriginalJson
final JSONObject getOriginalJson()
Returns a JSONObject format that contains details about the purchase.
-
getPresentedOfferingIdentifier
final String getPresentedOfferingIdentifier()
Offering that was presented when making the purchase. Always null for restored purchases.
-
getStoreUserID
final String getStoreUserID()
Amazon's store user id. Null for Google
-
getPurchaseType
final PurchaseType getPurchaseType()
One of PurchaseType indicating the type of purchase.
-
getMarketplace
final String getMarketplace()
Amazon's marketplace. Null for Google
-
-
-
-