| Package | com.distriqt.extension.facebook.appevents |
| Class | public class AppPurchaseEvent |
| Inheritance | AppPurchaseEvent Object |
This class represents data to be used for sending Facebook App events for a specific purchase.
Note that only the purchaseAmount and currency are required. parameters are optional.
See also
| Property | Defined By | ||
|---|---|---|---|
| currency : String
The currency for the purchase.
The currency specification is expected to be an ISO 4217 currency code, which can be found here:
http://en.wikipedia.org/wiki/ISO_4217
| AppPurchaseEvent | ||
| parameters : Object [read-only]
A key/value object storing additional parameters to be sent with the purchase event (optional)
Keys must be of type String, while their values must either be a String or a Number. | AppPurchaseEvent | ||
| purchaseAmount : Number = 0
The purchase amount to be logged. | AppPurchaseEvent | ||
| Method | Defined By | ||
|---|---|---|---|
AppPurchaseEvent(purchaseAmount:Number, currency:String)
Constructor
| AppPurchaseEvent | ||
removeParameter(key:String):AppPurchaseEvent
Removes a parameter from this event
| AppPurchaseEvent | ||
setCurrency(currency:String):AppPurchaseEvent
Sets the currency
| AppPurchaseEvent | ||
setParameter(key:String, value:*):AppPurchaseEvent
Adds or updates a parameter for this purchase event
Keys must be of type String, while their values must either be a String or a Number. | AppPurchaseEvent | ||
setPurchaseAmount(purchaseAmount:Number):AppPurchaseEvent
Sets the purchase amount
| AppPurchaseEvent | ||
toObject():Object | AppPurchaseEvent | ||
| currency | property |
public var currency:String
The currency for the purchase.
The currency specification is expected to be an ISO 4217 currency code, which can be found here: http://en.wikipedia.org/wiki/ISO_4217
| parameters | property |
parameters:Object [read-only]
A key/value object storing additional parameters to be sent with the purchase event (optional)
Keys must be of type String, while their values must either be a String or a Number. Anything which does not match these types will be converted to a String.
While you can modify this object directly, it's recommended to use the setParameter and removeParameter methods to ensure data validation.
public function get parameters():Object| purchaseAmount | property |
public var purchaseAmount:Number = 0The purchase amount to be logged. Defaults to 0.
| AppPurchaseEvent | () | Constructor |
public function AppPurchaseEvent(purchaseAmount:Number, currency:String)Constructor
ParameterspurchaseAmount:Number | |
currency:String |
| removeParameter | () | method |
public function removeParameter(key:String):AppPurchaseEvent
Removes a parameter from this event
Parameters
key:String — String - name of the parameter
|
AppPurchaseEvent — AppPurchaseEvent instance for chaining calls
|
| setCurrency | () | method |
public function setCurrency(currency:String):AppPurchaseEventSets the currency
Parameters
currency:String |
AppPurchaseEvent — AppPurchaseEvent instance for chaining calls
|
| setParameter | () | method |
public function setParameter(key:String, value:*):AppPurchaseEvent
Adds or updates a parameter for this purchase event
Keys must be of type String, while their values must either be a String or a Number. Any value which does not match these types will be converted to a String.
Parameters
key:String — String - name of the parameter
| |
value:* — String or Number - value of the parameter
|
AppPurchaseEvent — AppPurchaseEvent instance for chaining calls
|
| setPurchaseAmount | () | method |
public function setPurchaseAmount(purchaseAmount:Number):AppPurchaseEventSets the purchase amount
Parameters
purchaseAmount:Number |
AppPurchaseEvent — AppPurchaseEvent instance for chaining calls
|
| toObject | () | method |
public function toObject():ObjectReturnsObject |