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 ()
QDateTimedate () const
QStringdigitalGoodId () const
QStringdigitalGoodSku () const
QDateTimeendDate () const
QVariantMapextraParameters () const
intinitialPeriod () const
boolisSubscription () const
boolisValid () const
QStringlicenseKey () const
PurchaseReceipt &operator= (const PurchaseReceipt &rhs)
QStringpurchaseId () const
QStringpurchaseMetadata () const
QDateTimestartDate () const
DigitalGoodState::Typestate () const

Public Functions

PurchaseReceipt ()

Creates an invalid PurchaseReceipt.

Since:

BlackBerry 10.0.0

PurchaseReceipt (

Copy constructor.

Creates a copy of a PurchaseReceipt.

Parameters
rhs

The source PurchaseReceipt instance.

Since:

BlackBerry 10.0.0

virtual~PurchaseReceipt ()

Destructor.

Since:

BlackBerry 10.0.0

QDateTime date ()

Gets the date of purchase.

Return:

The date of purchase.

Since:

BlackBerry 10.0.0

QString digitalGoodId ()

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.

Return:

The digital good ID.

Since:

BlackBerry 10.0.0

QString digitalGoodSku ()

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.

Return:

The digital good SKU.

Since:

BlackBerry 10.0.0

QDateTime endDate ()

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.

Return:

The subscription end date.

Since:

BlackBerry 10.0.0

QVariantMap extraParameters ()

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.

Return:

The extra parameters.

Since:

BlackBerry 10.0.0

int initialPeriod ()

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.

Return:

The subscription initial period, in days.

Since:

BlackBerry 10.0.0

bool isSubscription ()

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.

Return:

true if the digital good is a subscription; false otherwise.

Since:

BlackBerry 10.0.0

bool isValid ()

Whether this PurchaseReceipt object contains valid information about a purchase.

Return:

true if this PurchaseReceipt object contains valid information about a purchase; false otherwise.

Since:

BlackBerry 10.0.0

QString licenseKey ()

Gets the license key associated with the purchase.

Return:

The license key.

Since:

BlackBerry 10.0.0

PurchaseReceipt & operator= (

Assignment operator.

Assigns a copy of a PurchaseReceipt.

Parameters
rhs

The source PurchaseReceipt instance.

Return:

The PurchaseReceipt instance.

Since:

BlackBerry 10.0.0

QString purchaseId ()

Gets the purchase ID that uniquely identifies the purchase.

The purchase ID is a unique value assigned by the Payment Service.

Return:

The purchase ID.

Since:

BlackBerry 10.0.0

QString purchaseMetadata ()

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.

Return:

The purchase metadata.

Since:

BlackBerry 10.0.0

QDateTime startDate ()

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.

Return:

The subscription start date.

Since:

BlackBerry 10.0.0

DigitalGoodState::Type state ()

Gets the state of the digital good.

Return:

The digital good state.

Since:

BlackBerry 10.0.0

Last modified: 2014-03-13

comments powered by Disqus