net.rimlib.blackberry.api.paymentsdk
Interface Purchase

All Known Subinterfaces:
PurchaseResult

public interface Purchase

Represents a successful in-app purchase.


Field Summary
static int CANCELED
          The Constant CANCELED.
static int NO_VALUE_SET
           
static int OWNED
          The Constant OWNED.
static int REFUNDED
          The Constant REFUNDED.
static int RENEW
          The Constant RENEW.– subscribed
static int SUBSCRIBED
          The Constant SUBSCRIBED.
 
Method Summary
 java.util.Date getDate()
          Retrieves the date this purchase was made.
 java.lang.String getDigitalGoodId()
          Retrieves the ID of the purchased digital good.
 java.lang.String getDigitalGoodSku()
          Retrieves the SKU of the purchased digital good.
 java.util.Date getEndDate()
          Retrieves the date the subscription expires.
 java.lang.String getInitialSubscriptionPeriod()
          Retrieves the duration of the initial subscription period.
 int getItemState()
          Retrieves the state of this item.
 java.lang.String getLicenseKey()
          Retrieves the license key for this purchase, or null if the purchased digital good does not have a license key.
 java.lang.String getMetadata()
          Retrieves the metadata for this purchase, or null if no metadata was included with the purchase.
 java.util.Date getStartDate()
          Retrieves the date this subscription starts.
 java.lang.String getTransactionId()
          Retrieves the transaction ID for this purchase.
 

Field Detail

NO_VALUE_SET

static final int NO_VALUE_SET
See Also:
Constant Field Values

SUBSCRIBED

static final int SUBSCRIBED
The Constant SUBSCRIBED. For a valid subscribed item

See Also:
Constant Field Values

REFUNDED

static final int REFUNDED
The Constant REFUNDED. – not subscribed or not owned

See Also:
Constant Field Values

CANCELED

static final int CANCELED
The Constant CANCELED. Check date to see if still active period

See Also:
Constant Field Values

RENEW

static final int RENEW
The Constant RENEW.– subscribed

See Also:
Constant Field Values

OWNED

static final int OWNED
The Constant OWNED. For a non-subscription that is owned by the user

See Also:
Constant Field Values
Method Detail

getDate

java.util.Date getDate()
Retrieves the date this purchase was made.

Returns:
The date this purchase was made.

getStartDate

java.util.Date getStartDate()
Retrieves the date this subscription starts.

Returns:
The date this subscription becomes active. Returns null for a non subscription good.

getEndDate

java.util.Date getEndDate()
Retrieves the date the subscription expires.

Returns:
The date this subscription expires was made. Returns null for a non subscription good.

getInitialSubscriptionPeriod

java.lang.String getInitialSubscriptionPeriod()
Retrieves the duration of the initial subscription period.

Returns:
The duration of the initial subscription period (in days) Returns null for a non subscription good.

getItemState

int getItemState()
Retrieves the state of this item. Note sill in discussion about some of these fields

Returns:
The state this item a String representing the state of this item: SUBSCRIBED: For a valid subscribed item REFUNDED: For a subscription not subscribed or for an item not owned CANCELED: Check date to see if still active period RENEW: Subscribed OWNED. For a non-subscription that is owned by the user

getLicenseKey

java.lang.String getLicenseKey()
Retrieves the license key for this purchase, or null if the purchased digital good does not have a license key.

Returns:
The license key or null.

getDigitalGoodId

java.lang.String getDigitalGoodId()
Retrieves the ID of the purchased digital good.

Returns:
The ID of the purchased digital good.

getDigitalGoodSku

java.lang.String getDigitalGoodSku()
Retrieves the SKU of the purchased digital good.

Returns:
The SKU of the purchased digital good.

getTransactionId

java.lang.String getTransactionId()
Retrieves the transaction ID for this purchase.

Returns:
The transaction ID.

getMetadata

java.lang.String getMetadata()
Retrieves the metadata for this purchase, or null if no metadata was included with the purchase.

Returns:
The metadata or null.


Copyright © 2011 Research In Motion Limited. All Rights Reserved.