Packagecom.distriqt.extension.facebookapi.appevents
Classpublic class FacebookAppPurchaseEvent
InheritanceFacebookAppPurchaseEvent Inheritance 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

https://developers.facebook.com/docs/ios/app-events
https://developers.facebook.com/docs/android/app-events


Public Properties
 PropertyDefined 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
Public Methods
 MethodDefined 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
Property Detail
currencyproperty
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

parametersproperty 
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.


Implementation
    public function get parameters():Object
purchaseAmountproperty 
public var purchaseAmount:Number = 0

The purchase amount to be logged. Defaults to 0.

Constructor Detail
FacebookAppPurchaseEvent()Constructor
public function FacebookAppPurchaseEvent(purchaseAmount:Number, currency:String)

Constructor

Parameters
purchaseAmount:Number
 
currency:String
Method Detail
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

Returns
Object