opensocial.BillingItem
Method
opensocial.BillingItem.getField h3.
String getField(key, opt_params)
Acquires data for the BillingItem linked to the specified key.
Parameter
| Name | Type | Description |
|---|---|---|
| key | String | Key for acquiring data. Refer to the Field class for possible values |
| opt_params | Map.<opensocial.DataRequest.DataRequestFields | Object> |
Return value
| Type | Description |
|---|---|
| String | Data |
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
| Name | Type | Description |
|---|---|---|
| key | String | The key to set in data |
| String | String | The 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.