PurchaseReceipt
Since: BlackBerry 10.0.0
#include <bb/platform/PurchaseReceipt>
To link against this class, add the following line to your .pro file: LIBS += -lbbplatform
A purchase receipt.
Represents a receipt issued for a successful purchase of a digital good.
Overview
Public Functions Index
PurchaseReceipt () | |
PurchaseReceipt (const PurchaseReceipt &rhs) | |
virtual | ~PurchaseReceipt () |
QDateTime | date () const |
QString | digitalGoodId () const |
QString | digitalGoodSku () const |
QDateTime | endDate () const |
QVariantMap | extraParameters () const |
int | initialPeriod () const |
bool | isSubscription () const |
bool | isValid () const |
QString | licenseKey () const |
PurchaseReceipt & | operator= (const PurchaseReceipt &rhs) |
QString | purchaseId () const |
QString | purchaseMetadata () const |
QDateTime | startDate () const |
DigitalGoodState::Type | state () const |
Public Functions
Copy constructor.
Creates a copy of a PurchaseReceipt.
Parameters | |
---|---|
rhs |
The source PurchaseReceipt instance. |
BlackBerry 10.0.0
virtual
Destructor.
BlackBerry 10.0.0
QString
Gets the ID of the purchased digital good.
Gets the ID of the purchased digital good, or the empty string if the good does not have a digital good ID.
The digital good ID.
BlackBerry 10.0.0
QString
Gets the SKU of the purchased digital good.
Gets the SKU of the purchased digital good, or the empty string if the good does not have a digital good SKU.
The digital good SKU.
BlackBerry 10.0.0
QDateTime
Gets the end date of the purchased digital good subscription.
If the purchased digital good is not a subscription, then a default constructed QDateTime is returned.
The subscription end date.
BlackBerry 10.0.0
QVariantMap
Gets the extra parameters associated with the digital good purchase.
Gets the extra parameters associated with the digital good purchase. If no parameters were returned, then a default constructed QVariantMap is returned.
The extra parameters.
BlackBerry 10.0.0
int
Gets the initial period of the purchased digital good subscription.
If the purchased digital good is not a subscription, then -1 is returned, which indicates a invalid initial period.
The subscription initial period, in days.
BlackBerry 10.0.0
bool
Returns whether or not a digital good is a subscription.
A digital good is a subscription if its state is any value except bb::platform::DigitalGoodState::Owned.
true if the digital good is a subscription; false otherwise.
BlackBerry 10.0.0
bool
Whether this PurchaseReceipt object contains valid information about a purchase.
true if this PurchaseReceipt object contains valid information about a purchase; false otherwise.
BlackBerry 10.0.0
QString
Gets the license key associated with the purchase.
The license key.
BlackBerry 10.0.0
PurchaseReceipt &
Assignment operator.
Assigns a copy of a PurchaseReceipt.
Parameters | |
---|---|
rhs |
The source PurchaseReceipt instance. |
The PurchaseReceipt instance.
BlackBerry 10.0.0
QString
Gets the purchase ID that uniquely identifies the purchase.
The purchase ID is a unique value assigned by the Payment Service.
The purchase ID.
BlackBerry 10.0.0
QString
Gets the metadata associated with the digital good purchase.
Gets the metadata associated with the digital good purchase, or the empty string if no metadata was provided in the request.
The purchase metadata.
BlackBerry 10.0.0
QDateTime
Gets the start date of the purchased digital good subscription.
Gets the start date of the purchased digital good subscription. If the purchased digital good is not a subscription, then a default constructed QDateTime is returned.
The subscription start date.
BlackBerry 10.0.0
DigitalGoodState::Type
Gets the state of the digital good.
The digital good state.
BlackBerry 10.0.0