SubscriptionTermsReply

#include <bb/platform/SubscriptionTermsReply>

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

Represents a response to PaymentManager::requestSubscriptionTerms().

An instance of this class is returned when a call to PaymentManager::requestSubscriptionStatus() is made. Initially, the returned object will be unfinished and 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 initialPeriod(), renewalPrice(), renewalPeriod(), and PriceReply::price() methods provide the subscription terms. If the request failed, then the error code and error text are included; these can be accessed on the PaymentReply base class.

The PaymentReply::finished() signal can be used to determine when the request finishes. The PaymentManager::subscriptionTermsFinished() 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.

Since:

BlackBerry 10.0.0

Public Functions Index

virtual ~SubscriptionTermsReply ()
QStringinitialPeriod () const
QStringrenewalPrice () const
QStringrenewalPeriod () const
QStringdigitalGoodId () const Inherited
QStringdigitalGoodSku () const Inherited
interrorCode () const Inherited
QStringerrorText () const Inherited
boolisError () const Inherited
boolisFinished () const Inherited
QStringprice () const Inherited

Signals Index

Only has inherited signals

voidfinished ()Inherited

Public Functions

virtual~SubscriptionTermsReply ()

Destructor.

Since:

BlackBerry 10.0.0

QString initialPeriod ()

Get the initial period of the subscription.

If the request finished successfully, then this returns the initial period. If the request failed or is unfinished, then an empty string is returned.

Return:

The initial period of the subscription.

Since:

BlackBerry 10.0.0

QString renewalPrice ()

Get the renewal price of the subscription.

If the request finished successfully, then this returns the renewal price. If the request failed or is unfinished, then an empty string is returned.

Return:

The renewal price of the subscription.

Since:

BlackBerry 10.0.0

QString renewalPeriod ()

Get the renewal period of the subscription.

If the request finished successfully, then this returns the renewal period. If the request failed or is unfinished, then an empty string is returned.

Return:

The renewal period of the subscription.

Since:

BlackBerry 10.0.0

QString digitalGoodId ()Inherited

Get the digital good ID.

If the request finished successfully, then this returns the digital good ID. If the request failed or is unfinished, then the empty string is returned.

If no digital good ID was provided in the request, then the digital good ID is empty.

Return:

The digital good ID.

Since:

BlackBerry 10.0.0

QString digitalGoodSku ()Inherited

Get the digital good SKU.

If the request finished successfully, then this returns the digital good SKU. If the request failed or is unfinished, then the empty string is returned.

If no digital good SKU was provided in the request, then digital good SKU is empty.

Return:

The digital good SKU.

Since:

BlackBerry 10.0.0

int errorCode ()Inherited

Get the error code.

If the request is unfinished or finished successfully, then this method returns 0. If the request failed, then this method returns the error code.

Return:

The error code.

Since:

BlackBerry 10.0.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

QString price ()Inherited

Gets the price of a digital good.

If the request finished successful, then the price is returned. If the request failed or is unfinished, then the empty string is returned.

Return:

The price of the digital good.

Since:

BlackBerry 10.0.0

Signals

(Only has inherited signals)

void finished ()Inherited

Emitted when a result is received.

Since:

BlackBerry 10.0.0