Represents data to track a payment
public var currency:String
See also
public var price:Number = 0
See also
public var productId:String
See also
public var productName:String
See also
public var quantity:int = 1
See also
public var transactionId:String
See also
public function PaymentData(productName:String, productId:String, quantity:int = 1, price:Number = 0, currency:String, transactionId:String)
Parameters | productName:String |
|
| productId:String |
|
| quantity:int (default = 1 )
|
|
| price:Number (default = 0 )
|
|
| currency:String |
|
| transactionId:String |
public function setCurrency(currency:String):PaymentData
Set the currency for the price argument
Parameters
| currency:String — The currency for the price argument
|
Returns | PaymentData — The PaymentData instance for chaining calls
|
public function setPrice(price:Number):PaymentData
Set the price of the the products purchased in the given currency
Parameters
| price:Number — The price of the the products purchased in the given currency
|
Returns | PaymentData — The PaymentData instance for chaining calls
|
public function setProductId(productId:String):PaymentData
Set the id of the product purchased.
Parameters
| productId:String — The id of the product purchased.
|
Returns | PaymentData — The PaymentData instance for chaining calls
|
public function setProductName(productName:String):PaymentData
Set the name of the product purchased
Parameters
| productName:String — The name of the product purchased
|
Returns | PaymentData — The PaymentData instance for chaining calls
|
public function setQuantity(quantity:int):PaymentData
Set the number of products purchased.
Parameters
| quantity:int — The number of products purchased.
|
Returns | PaymentData — The PaymentData instance for chaining calls
|
public function setTransactionId(transactionId:String):PaymentData
Set the unique identifier for the transaction used to make the purchase
Parameters
| transactionId:String — A unique identifier for the transaction used to make the purchase
|
Returns | PaymentData — The PaymentData instance for chaining calls
|
public function toObject():Object
Returns
Wed Jan 18 2023, 06:33 PM +10:00