|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface PurchaseResult
Represents the result of an in-app purchase attempt. Every PurchaseResult object provides its creation
date via the getDate() method. All other data is optional, and may depend on whether the purchase result is
successful. For example, getLicenseKey() only provides an actual license key if a purchase is successful
and the purchased digital good has a license key (some do not).
| Field Summary | |
|---|---|
static java.lang.String |
ATTR_ENDDATE
|
static java.lang.String |
ATTR_ID
|
static java.lang.String |
ATTR_INITIALSUBSCRIPTIONPERIOD
|
static java.lang.String |
ATTR_LICENSEKEY
|
static java.lang.String |
ATTR_PURCHASEDATE
|
static java.lang.String |
ATTR_PURCHASEID
|
static java.lang.String |
ATTR_STARTDATE
|
static java.lang.String |
ATTR_STATUS
|
static java.lang.String |
META_DATA
|
static java.lang.String |
SUB_STATUS
|
static java.lang.String |
TAG_PERIOD
|
static java.lang.String |
TAG_SKU
|
| Fields inherited from interface net.rimlib.blackberry.api.paymentsdk.Purchase |
|---|
CANCELED, NO_VALUE_SET, OWNED, REFUNDED, RENEW, SUBSCRIBED |
| Fields inherited from interface net.rimlib.blackberry.api.paymentsdk.Result |
|---|
RETURN_CODE, STATUS_MESSAGE |
| Fields inherited from interface net.rimlib.blackberry.api.paymentsdk.ResultCodes |
|---|
REASON_APP_WORLD_NOT_CORRECT_VERSION, REASON_ARGUMENTS_ERROR, REASON_CANCELED, REASON_GOOD_NOT_FOUND, REASON_ILLEGAL_APPLICATION, REASON_NONE, REASON_SERVER_ERROR, REASON_UNKNOWN |
| Method Summary | |
|---|---|
java.util.Hashtable |
getData()
|
java.util.Date |
getDate()
Returns the date when the purchase attempt represented by this PurchaseResult was made. |
java.lang.String |
getDigitalGoodId()
Retrieves the ID of the purchased digital good, or null if this purchase result did not succeed. |
java.lang.String |
getDigitalGoodSku()
Retrieves the SKU of the purchased digital good, or null if this purchase result did not succeed. |
int |
getFailureReason()
Retrieves a constant representing the reason this result is unsuccessful, or REASON_NONE
if this result is successful. |
java.lang.String |
getLicenseKey()
Retrieves the license key for a purchase attempt, or null if the purchase attempt did not
succeed or the purchased digital good does not have a license key. |
java.lang.String |
getMetadata()
Retrieves the metadata for this purchase result, or null if this purchase result did not
succeed (or no metadata was included with the purchase). |
java.lang.String |
getTransactionId()
Retrieves the transaction ID for this purchase result, or null if this purchase result
did not succeed. |
java.lang.String |
getValue(java.lang.String key)
|
| Methods inherited from interface net.rimlib.blackberry.api.paymentsdk.Purchase |
|---|
getEndDate, getInitialSubscriptionPeriod, getItemState, getStartDate |
| Methods inherited from interface net.rimlib.blackberry.api.paymentsdk.Result |
|---|
getStatusMessage, isSuccessful |
| Field Detail |
|---|
static final java.lang.String ATTR_ID
static final java.lang.String TAG_SKU
static final java.lang.String ATTR_LICENSEKEY
static final java.lang.String META_DATA
static final java.lang.String ATTR_PURCHASEID
static final java.lang.String SUB_STATUS
static final java.lang.String TAG_PERIOD
static final java.lang.String ATTR_STARTDATE
static final java.lang.String ATTR_ENDDATE
static final java.lang.String ATTR_STATUS
static final java.lang.String ATTR_PURCHASEDATE
static final java.lang.String ATTR_INITIALSUBSCRIPTIONPERIOD
| Method Detail |
|---|
java.util.Date getDate()
PurchaseResult was made.
getDate in interface Purchasejava.lang.String getLicenseKey()
null if the purchase attempt did not
succeed or the purchased digital good does not have a license key.
getLicenseKey in interface Purchasenull.java.lang.String getDigitalGoodId()
null if this purchase result did not succeed.
getDigitalGoodId in interface Purchasenull.java.lang.String getDigitalGoodSku()
null if this purchase result did not succeed.
getDigitalGoodSku in interface Purchasenull.java.lang.String getTransactionId()
null if this purchase result
did not succeed.
getTransactionId in interface Purchasenull.java.lang.String getMetadata()
null if this purchase result did not
succeed (or no metadata was included with the purchase).
getMetadata in interface Purchasenull.java.lang.String getValue(java.lang.String key)
java.util.Hashtable getData()
int getFailureReason()
ResultREASON_NONE
if this result is successful.
getFailureReason in interface ResultREASON_* constants. If this result is successful, then REASON_NONE
is returned.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||