com.amazon.inapp.purchasing
Class Receipt

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

public final class Receipt
extends java.lang.Object

Represents the purchase of consumable content, entitled content or subscription content as well as the renewal of a subscription.


Method Summary
 Item.ItemType getItemType()
          Returns the item's type.
 java.lang.String getPurchaseToken()
          Returns a purchase token that can be used from an external server to validate ownership or subscription validity.
 java.lang.String getSku()
          Returns the SKU the purchase was for.
 SubscriptionPeriod getSubscriptionPeriod()
          In the case of a subscription purchase or renewal, the SubscriptionPeriod will indicate the start and end date for subscription validity.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getSku

public java.lang.String getSku()
Returns the SKU the purchase was for. In the case of subscriptions, this SKU will represent the subscription itself, and not a specific duration. Examine the SubscriptionPeriod provided by getSubscriptionPeriod() to determine the start and end dates for the subscription.

Returns:
the SKU the purchase was for

getItemType

public Item.ItemType getItemType()
Returns the item's type.

Returns:
the item's type

getSubscriptionPeriod

public SubscriptionPeriod getSubscriptionPeriod()
In the case of a subscription purchase or renewal, the SubscriptionPeriod will indicate the start and end date for subscription validity. In the case of consumable or entitled content this field will return null.

Returns:
the period during which a subscription was valid, or null if this receipt is not related to a subscription

getPurchaseToken

public java.lang.String getPurchaseToken()
Returns a purchase token that can be used from an external server to validate ownership or subscription validity.

Returns:
a purchase token that can be used from an external server to validate ownership or subscription validity

toString

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