Class TInAppProduct
Unit
Declaration
type TInAppProduct = class(TObject)
Description
A product that can be bought by in-app purchases (TInAppPurchases).
Hierarchy
- TObject
- TInAppProduct
Overview
Methods
function Price(const ValueWhenUnknown: string = 'loading...'): string; |
Properties
property Name: string read FName; |
|
property PriceRaw: string read FPriceRaw; |
|
property Title: string read FTitle; |
|
property Description: string read FDescription; |
|
property PriceAmountMicros: Int64 read FPriceAmountMicros; |
|
property PriceCurrencyCode: string read FPriceCurrencyCode; |
|
property Owns: boolean read FOwns; |
|
property SuccessfullyConsumed: boolean read FSuccessfullyConsumed write FSuccessfullyConsumed; |
Description
Methods
function Price(const ValueWhenUnknown: string = 'loading...'): string; |
|
The price, as a string in local user currency, with most unusual characters replaced with ASCII (so it should work reliably with any font), and with special value if not received yet. See also
|
Properties
property Name: string read FName; |
|
Short product identifier, uniquely identifying it in the store. |
property PriceRaw: string read FPriceRaw; |
|
Price, as a string in local user currency. Empty before receiving information about the product from the store. This may contain various UTF-8 local characters used to describe currency, which do not have to be supported in all fonts. Use Price to display the price as a "safe" string, with most unusual characters replaced with ASCII (so it should work reliably with any font), and with special value if not received yet. |
property Title: string read FTitle; |
|
Title of the product, as defined in the store. Empty if not known yet. May be translated to current user language. |
property Description: string read FDescription; |
|
Description of the product, as defined in the store. Empty if not known yet. May be translated to current user language. |
property PriceAmountMicros: Int64 read FPriceAmountMicros; |
|
Price in micro-units, where 1,000,000 micro-units equal one unit of the currency. 0 if not known yet. |
property PriceCurrencyCode: string read FPriceCurrencyCode; |
|
ISO 4217 currency code for price. Empty if not known yet. |
property Owns: boolean read FOwns; |
|
Is the product owned now. Use this for non-consumable items (things that user buys, and then "owns" for the rest of his life). Caution: this may not be up-to-date knowledge. Call TInAppPurchases.RefreshPurchases to refresh it (on Android, this happens automatically on app launch; but on iOS, it cannot be done automatically, as it requires logging to AppStore – this is also explicitly said in Apple docs). Watch for TInAppPurchases.Owns and TInAppPurchases.OnRefreshedPurchases then. Do not depend on this for consumables (use SuccessfullyConsumed for them, and be sure to call TInAppPurchases.SuccessfullyConsumed from TInAppPurchases.Owns for them). |
Generated by PasDoc 0.16.0-snapshot.