net.rimlib.blackberry.api.paymentsdk
Class PurchaseArguments

java.lang.Object
  extended by net.rimlib.blackberry.api.paymentsdk.PurchaseArguments

public class PurchaseArguments
extends java.lang.Object

Represents a set of arguments used for initiating a digital good purchase using PaymentEngine.purchase(PurchaseArguments). Instances of this class must be constructed with a PurchaseArgumentsBuilder. Refer to PurchaseArgumentsBuilder for an in-depth explanation of how to set the arguments and how they are used in the purchase flow.

See Also:
PurchaseArgumentsBuilder

Field Summary
protected  java.util.Hashtable _additionalProperties
           
 
Constructor Summary
protected PurchaseArguments(java.lang.String digitalGoodId, java.lang.String digitalGoodSku, java.lang.String digitalGoodName, java.lang.String purchasingAppName, Bitmap purchasingAppIcon, java.lang.String metadata, java.util.Hashtable additionalProperties)
           
 
Method Summary
 java.util.Hashtable getAdditionalProperties()
           
 java.lang.String getDigitalGoodId()
          Retrieves the ID of the digital good being purchased.
 java.lang.String getDigitalGoodName()
          Retrieves the name of the digital good being purchased.
 java.lang.String getDigitalGoodSku()
          Retrieves the SKU of the digital good being purchased.
 java.lang.String getMetadata()
          Retrieves the metadata associated with the purchase.
 Bitmap getPurchasingAppIcon()
          Retrieves the icon of the application requesting the purchase.
 java.lang.String getPurchasingAppName()
          Retrieves the name of the application requesting the purchase.
 java.lang.String getValue(java.lang.String tag)
          Retrieves value associated with the tag or key passed in.
 java.lang.String getVendorContentId()
          Retrieves value of the PID (from the vendor's separate BlackBerry ID for this user), provided by the vendor.
 java.lang.String getVendorCustomerId()
          Retrieves value of the PID (from the vendor's separate BlackBerry ID for this user), provided by the vendor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_additionalProperties

protected java.util.Hashtable _additionalProperties
Constructor Detail

PurchaseArguments

protected PurchaseArguments(java.lang.String digitalGoodId,
                            java.lang.String digitalGoodSku,
                            java.lang.String digitalGoodName,
                            java.lang.String purchasingAppName,
                            Bitmap purchasingAppIcon,
                            java.lang.String metadata,
                            java.util.Hashtable additionalProperties)
Method Detail

getAdditionalProperties

public java.util.Hashtable getAdditionalProperties()

getDigitalGoodId

public java.lang.String getDigitalGoodId()
Retrieves the ID of the digital good being purchased.

Returns:
The ID of the digital good being purchased.

getDigitalGoodSku

public java.lang.String getDigitalGoodSku()
Retrieves the SKU of the digital good being purchased.

Returns:
The SKU of the digital good being purchased.

getDigitalGoodName

public java.lang.String getDigitalGoodName()
Retrieves the name of the digital good being purchased.

Returns:
The name of the digital good being purchased.

getPurchasingAppName

public java.lang.String getPurchasingAppName()
Retrieves the name of the application requesting the purchase.

Returns:
The name of the application requesting the purchase.

getPurchasingAppIcon

public Bitmap getPurchasingAppIcon()
Retrieves the icon of the application requesting the purchase.

Returns:
The icon of the application requesting the purchase.

getMetadata

public java.lang.String getMetadata()
Retrieves the metadata associated with the purchase.

Returns:
The metadata associated with the purchase.

getValue

public java.lang.String getValue(java.lang.String tag)
Retrieves value associated with the tag or key passed in.

Returns:
The purchaseToken associated with the purchase.

getVendorCustomerId

public java.lang.String getVendorCustomerId()
Retrieves value of the PID (from the vendor's separate BlackBerry ID for this user), provided by the vendor. For purchase. Optional parameter.

Returns:
Vendor's separate BlackBerry ID for this user.

getVendorContentId

public java.lang.String getVendorContentId()
Retrieves value of the PID (from the vendor's separate BlackBerry ID for this user), provided by the vendor. For purchase. Optional parameter.

Returns:
Vendor's separate identifier for this item which could be different from the vendor SKU. For example a vendor could have 100 songs and want to map the same 99 cent price and SKU for those songs. But when the user purchases the item they may need to map the transaction to this song to provision this item. NOTE: This field only is used in a call to the Payment Server you may make later This field will default to the DigitalGoodSKU if available or else the DigitalGoodID. This default will be set just before it is sent to the server.