API reference
API reference
Select your platform
No SDKs available
No versions available

Purchase Class

A purchase is made when a user buys a com.meta.horizon.platform.ovr.models.Product. The IAP product, which can represent a consumable item, a durable item, or a subscription, must be defined for purchase through the developer dashboard.

Constructors

Purchase ( ptr )
Signature
com.meta.horizon.platform.ovr.models.Purchase.Purchase(final long ptr)
Parameters
ptr: final long

Methods

getDeveloperPayload ()
The developer payload feature is unimplemented.
Signature
String com.meta.horizon.platform.ovr.models.Purchase.getDeveloperPayload()
Returns
String  String
getExpirationTime ()
The time when the purchased com.meta.horizon.platform.ovr.models.Product expires. This value only applies to subscriptions, and will be null for durable and consumable IAP items.
Signature
LocalDateTime com.meta.horizon.platform.ovr.models.Purchase.getExpirationTime()
Returns
LocalDateTime  LocalDateTime
getGrantTime ()
The timestamp that represents when the user was granted entitlement to the com.meta.horizon.platform.ovr.models.Product that was purchased.
Signature
LocalDateTime com.meta.horizon.platform.ovr.models.Purchase.getGrantTime()
Returns
LocalDateTime  LocalDateTime
getID ()
The unique identifier of a com.meta.horizon.platform.ovr.models.Purchase represents a user's unique entitlement to a com.meta.horizon.platform.ovr.models.Product. This value is 0 for shared IAP entitlements.
Signature
String com.meta.horizon.platform.ovr.models.Purchase.getID()
Returns
String  long
getReportingId ()
The Reporting ID feature is not implemented.
Signature
String com.meta.horizon.platform.ovr.models.Purchase.getReportingId()
Returns
String  String
getSku ()
The SKU of the IAP com.meta.horizon.platform.ovr.models.Product that was purchased. This value is case-sensitive. To retrieve the product information, you can use this value when calling [com.meta.horizon.platform.ovr.requests.IAP#getProductsBySKU(String[] skus)](classcom_1_1meta_1_1horizon_1_1platform_1_1ovr_1_1requests_1_1_i_a_p_1ac6deec4a03431355eb6cef520a7536bf).
Signature
String com.meta.horizon.platform.ovr.models.Purchase.getSku()
Returns
String  String
getType ()
The Type of the IAP com.meta.horizon.platform.ovr.models.Product that was purchased. The values can be com.meta.horizon.platform.ovr.enums.ProductType#DURABLE, com.meta.horizon.platform.ovr.enums.ProductType#CONSUMABLE, or a com.meta.horizon.platform.ovr.enums.ProductType#SUBSCRIPTION.
Signature
ProductType com.meta.horizon.platform.ovr.models.Purchase.getType()
Returns
ProductType  ProductType