Android Client Reference
Class BuyItemInfo
Namespace: com.playerio
Language: Java
Represents information about the purchase of a PayVault item.
The minimum information necessary to create an instance of this class is an itemKey representing the PayVaultItem that should be purchased.
It is also possible to add a custom payload, and this data will always be present when reading the item from the user's Vault. For example: Imagine that we have a racing game and users should be able to buy different cars of different colors, but that color doesn't affect the price of the car. Instead of creating one PayVaultItem for each combination of type and color, we need only create one item for each type and give them a different price, and color can then be added in the payload when buying a car.
Setting the payload works exactly like manipulating a DatabaseObject from BigDB.
Methods | |||
---|---|---|---|
public |
Creates a new BuyItemInfo to describe an item to purchase. |
||
public void |
Removes all properties on this object |
||
public boolean |
Returns true if the given property exists on this object |
||
public DatabaseArray |
Get the given DatabaseArray property |
||
public boolean |
Get the given boolean property, or the default if it doesn't exist. |
||
public boolean |
Get the given boolean property |
||
public byte[] |
Get the given byte array property |
||
public byte[] |
Get the given byte array property, or the default if it doesn't exist. |
||
public Date |
Get the given Date property, or the default if it doesn't exist. |
||
public Date |
Get the given Date property |
||
public double |
Get the given double property, or the default if it doesn't exist. |
||
public double |
Get the given double property |
||
public float |
Get the given float property, or the default if it doesn't exist. |
||
public float |
Get the given float property |
||
public int |
Get the given int property |
||
public int |
Get the given int property, or the default if it doesn't exist. |
||
public long |
Get the given long property, or the default if it doesn't exist. |
||
public long |
Get the given long property |
||
public DatabaseObject |
Get the given DatabaseObject property |
||
public String |
Get the given String property |
||
public String |
Get the given String property, or the default if it doesn't exist. |
||
public int |
Get the given uint property, or the default if it doesn't exist. |
||
public int |
Get the given uint property |
||
public Object |
Get the given property as an object |
||
public ArrayList<String> |
Get the names of all properties on this object |
||
public BuyItemInfo |
Removes the given property from this object |
||
public BuyItemInfo |
Set the given property to the given bye array value |
||
public BuyItemInfo |
Set the given property to the given double value |
||
public BuyItemInfo |
Set the given property to the given float value |
||
public BuyItemInfo |
Set the given property to the given DatabaseArray value |
||
public BuyItemInfo |
Set the given property to the given DatabaseObject value |
||
public BuyItemInfo |
Set the given property to the given Date value |
||
public BuyItemInfo |
Set the given property to the given string value |
||
public BuyItemInfo |
Set the given property to the given int value |
||
public BuyItemInfo |
Set the given property to the given boolean value |
||
public BuyItemInfo |
Set the given property to the given long value |
||
public BuyItemInfo |
Set the given property to the given uint value |
||
public int |
Returns the number of properties on this object |
BuyItemInfo.BuyItemInfo
public |
|
Creates a new BuyItemInfo to describe an item to purchase.
Arguments
String | itemKey |
BuyItemInfo.clear
public void |
|
Removes all properties on this object
BuyItemInfo.contains
public boolean |
|
Returns true if the given property exists on this object
Arguments
String | propertyExpression |
BuyItemInfo.getArray
public DatabaseArray |
|
Get the given DatabaseArray property
Arguments
String | propertyExpression |
BuyItemInfo.getBool
public boolean |
|
Get the given boolean property, or the default if it doesn't exist.
Arguments
String | propertyExpression |
boolean | defaultValue |
BuyItemInfo.getBool
public boolean |
|
Get the given boolean property
Arguments
String | propertyExpression |
BuyItemInfo.getBytes
public byte[] |
|
Get the given byte array property
Arguments
String | propertyExpression |
BuyItemInfo.getBytes
public byte[] |
|
Get the given byte array property, or the default if it doesn't exist.
Arguments
String | propertyExpression |
byte[] | defaultValue |
BuyItemInfo.getDateTime
public Date |
|
Get the given Date property, or the default if it doesn't exist.
Arguments
String | propertyExpression |
Date | defaultValue |
BuyItemInfo.getDateTime
public Date |
|
Get the given Date property
Arguments
String | propertyExpression |
BuyItemInfo.getDouble
public double |
|
Get the given double property, or the default if it doesn't exist.
Arguments
String | propertyExpression |
double | defaultValue |
BuyItemInfo.getDouble
public double |
|
Get the given double property
Arguments
String | propertyExpression |
BuyItemInfo.getFloat
public float |
|
Get the given float property, or the default if it doesn't exist.
Arguments
String | propertyExpression |
float | defaultValue |
BuyItemInfo.getFloat
public float |
|
Get the given float property
Arguments
String | propertyExpression |
BuyItemInfo.getInt
public int |
|
Get the given int property
Arguments
String | propertyExpression |
BuyItemInfo.getInt
public int |
|
Get the given int property, or the default if it doesn't exist.
Arguments
String | propertyExpression |
int | defaultValue |
BuyItemInfo.getLong
public long |
|
Get the given long property, or the default if it doesn't exist.
Arguments
String | propertyExpression |
long | defaultValue |
BuyItemInfo.getLong
public long |
|
Get the given long property
Arguments
String | propertyExpression |
BuyItemInfo.getObject
public DatabaseObject |
|
Get the given DatabaseObject property
Arguments
String | propertyExpression |
BuyItemInfo.getString
public String |
|
Get the given String property
Arguments
String | propertyExpression |
BuyItemInfo.getString
public String |
|
Get the given String property, or the default if it doesn't exist.
Arguments
String | propertyExpression |
String | defaultValue |
BuyItemInfo.getUInt
public int |
|
Get the given uint property, or the default if it doesn't exist.
Arguments
String | propertyExpression |
int | defaultValue |
BuyItemInfo.getUInt
public int |
|
Get the given uint property
Arguments
String | propertyExpression |
BuyItemInfo.getValue
public Object |
|
Get the given property as an object
Arguments
String | propertyExpression |
BuyItemInfo.properties
public ArrayList<String> |
|
Get the names of all properties on this object
BuyItemInfo.remove
public BuyItemInfo |
|
Removes the given property from this object
Arguments
String | propertyExpression |
BuyItemInfo.set
public BuyItemInfo |
|
Set the given property to the given bye array value
Arguments
String | propertyExpression |
byte[] | value |
BuyItemInfo.set
public BuyItemInfo |
|
Set the given property to the given double value
Arguments
String | propertyExpression |
double | value |
BuyItemInfo.set
public BuyItemInfo |
|
Set the given property to the given float value
Arguments
String | propertyExpression |
float | value |
BuyItemInfo.set
public BuyItemInfo |
|
Set the given property to the given DatabaseArray value
Arguments
String | propertyExpression |
DatabaseArray | value |
BuyItemInfo.set
public BuyItemInfo |
|
Set the given property to the given DatabaseObject value
Arguments
String | propertyExpression |
DatabaseObject | value |
BuyItemInfo.set
public BuyItemInfo |
|
Set the given property to the given Date value
Arguments
String | propertyExpression |
Date | value |
BuyItemInfo.set
public BuyItemInfo |
|
Set the given property to the given string value
Arguments
String | propertyExpression |
String | value |
BuyItemInfo.set
public BuyItemInfo |
|
Set the given property to the given int value
Arguments
String | propertyExpression |
int | value |
BuyItemInfo.set
public BuyItemInfo |
|
Set the given property to the given boolean value
Arguments
String | propertyExpression |
boolean | value |
BuyItemInfo.set
public BuyItemInfo |
|
Set the given property to the given long value
Arguments
String | propertyExpression |
long | value |
BuyItemInfo.setUInt
public BuyItemInfo |
|
Set the given property to the given uint value
Arguments
String | propertyExpression |
int | value |
BuyItemInfo.size
public int |
|
Returns the number of properties on this object