Package | com.distriqt.extension.facebookapi.appevents |
Class | public class FacebookAppPurchaseEvent |
Inheritance | FacebookAppPurchaseEvent ![]() |
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
| FacebookAppPurchaseEvent | ||
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. | FacebookAppPurchaseEvent | ||
purchaseAmount : Number = 0
The purchase amount to be logged. | FacebookAppPurchaseEvent |
Method | Defined By | ||
---|---|---|---|
FacebookAppPurchaseEvent(purchaseAmount:Number, currency:String)
Constructor
| FacebookAppPurchaseEvent | ||
removeParameter(key:String):void
Removes a parameter from this event
| FacebookAppPurchaseEvent | ||
setParameter(key:String, value:*):void
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. | FacebookAppPurchaseEvent | ||
toObject():Object | FacebookAppPurchaseEvent |
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 = 0
The purchase amount to be logged. Defaults to 0.
FacebookAppPurchaseEvent | () | Constructor |
public function FacebookAppPurchaseEvent(purchaseAmount:Number, currency:String)
Constructor
ParameterspurchaseAmount:Number | |
currency:String |
removeParameter | () | method |
public function removeParameter(key:String):void
Removes a parameter from this event
Parameters
key:String — String - name of the parameter
|
setParameter | () | method |
public function setParameter(key:String, value:*):void
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
|
toObject | () | method |
public function toObject():Object
ReturnsObject |