ExistingPurchasesReply

Since: BlackBerry 10.0.0

#include <bb/platform/ExistingPurchasesReply>

To link against this class, add the following line to your .pro file: LIBS += -lbbplatform

Represents a response to PaymentManager::requestExistingPurchases().

An instance of this class is returned when a call to PaymentManager::requestExistingPurchases() is made. Initially, the returned object will be unfinished and will not contain any valid information relating to the request (other than that it is unfinished). Once the request is finished, PaymentReply::isError() can be used to determine whether the request succeeded or failed. If the request was successful, then the purchases() method provides the list of receipts for all existing purchases. If the request failed, then the error code and error text are included; these can be accessed on the PaymentReply base class.

The finished() signal can be used to determine when the request finishes. The PaymentManager::existingPurchasesFinished() signal can also be used to determine when a request finishes.

Note:

Do not delete the object in a slot connected to any of the finished signals. Use QObject::deleteLater() instead.


Overview

Inheritance

bb::platform::PaymentReply
bb::platform::ExistingPurchasesReply

Properties Index

QVariantListpurchases [read-only]
interrorCode [read-only]Inherited
QStringerrorInfo [read-only]Inherited
QStringerrorText [read-only]Inherited
boolfinished [read-only]Inherited

Public Functions Index

virtual ~ExistingPurchasesReply ()
QList< PurchaseReceipt >purchases () const
interrorCode () const Inherited
QStringerrorInfo () const Inherited
QStringerrorText () const Inherited
boolisError () const Inherited
boolisFinished () const Inherited

Signals Index

Only has inherited signals

voidfinished ()Inherited

Properties

QVariantList purchases[read-only]

Represents the list of existing purhcase(s).

Since:

BlackBerry 10.2.0

int errorCodeInherited[read-only]

Represents the error code.

Since:

BlackBerry 10.2.0

QString errorInfoInherited[read-only]

Get the extra error information.

In the event of a Failed errorCode, this represents extra information to further identify the error that occurred, for diagnostic purposes.

Since:

BlackBerry 10.2.0

QString errorTextInherited[read-only]

Represents the error text.

If the request is unfinished or finished successfully, then this method returns an empty string. If the request failed, then this method returns the a description of the error that occurred.

Since:

BlackBerry 10.2.0

bool finishedInherited[read-only]

Represents whether the request is finished.

Whether the request is finished.

Since:

BlackBerry 10.2.0

Public Functions

virtual~ExistingPurchasesReply ()

Destructor.

Destroys an ExistingPurchasesReply instance.

Since:

BlackBerry 10.0.0

QList< PurchaseReceipt > purchases ()

Get the list of user purchases.

If the request finished successfully, then a list of receipts for the user's purchases is returned. If the request failed or is unfinished, then an empty list is returned.

Return:

A list of purchase receipts.

Since:

BlackBerry 10.0.0

int errorCode ()Inherited

Get the error code.

If the request is unfinished or finished successfully, then this method returns PaymentErrorCode::None. If the request failed, then this method returns the appropriate PaymentErrorCode.

Return:

The error code.

Since:

BlackBerry 10.0.0

QString errorInfo ()Inherited

Get the extra error information.

In the event of a Failed errorCode(), this method returns extra information to further identify the error that occurred, for diagnostic purposes.

Return:

The extra error information.

Since:

BlackBerry 10.2.0

QString errorText ()Inherited

Get the error text.

If the request is unfinished or finished successfully, then this method returns an empty string. If the request failed, then this method returns the a description of the error that occurred.

Return:

A description of the error that occurred.

Since:

BlackBerry 10.0.0

bool isError ()Inherited

Whether the request failed.

If the request is unfinished or finished successfully, then this method returns false. If the request failed, then this method returns true.

Return:

Whether the request failed.

Since:

BlackBerry 10.0.0

bool isFinished ()Inherited

Whether the request is finished.

Return:

true if a result has been received, false otherwise.

Since:

BlackBerry 10.0.0

Signals

(Only has inherited signals)

void finished ()Inherited

Emitted when a result is received.

Since:

BlackBerry 10.0.0

Last modified: 2014-09-30



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus