Skip to main content

opensocial.BillingItem

Method​

opensocial.BillingItem.getField h3.​

String getField(key, opt_params)

Acquires data for the BillingItem linked to the specified key.

Parameter​
NameTypeDescription
keyStringKey for acquiring data. Refer to the Field class for possible values
opt_paramsMap.<opensocial.DataRequest.DataRequestFieldsObject>
Return value​
TypeDescription
StringData
Sample​
var title = billingItem.getField(opensocial.BillingItem.Field.SKU_ID);

opensocial.BillingItem.setField​

setField(key, data)

Sets data in the BillingItem with the specified key.

Parameter​
NameTypeDescription
keyStringThe key to set in data
StringStringThe data to set
Return value​

None

Sample​
billingItem.setField(opensocial.BillingItem.Field.PRICE, 100);

opensocial.BillingItem.Field​

opensocial.BillingItem.Field.SKU_ID​

The SKU ID (Item ID for inventory) of this item. It is a positive integer. This is a required value.

opensocial.BillingItem.Field.PRICE​

The coin unit price of this item. It is a positive integer. This is a required value.

opensocial.BillingItem.Field.COUNT​

The number of purchases for this item. It is a positive integer. The default is 1.

opensocial.BillingItem.Field.DESCRIPTION​

The description of the item. The default is null characters.

mbga.BillingItem.Field​

mbga.BillingItem.Field.IMAGE_URL​

The image URL for this item. The size of the image will be 180 X 180. This is a required value.

mbga.BillingItem.Field.NAME​

The name of the item. This is a required value.

Revision History​

  • 12/2010
    • Initial Release.