OneTimeOfferInfo
Typed view over a one-time product offer (ProductDetails.OneTimePurchaseOfferDetails), surfacing the Play Billing 9 features — discounts, rentals, pre-orders and limited quantity — as flat fields for easy UI binding.
Play Billing 9 lets a single one-time product carry multiple offers (a full price plus, say, a 30%-off launch discount). Older code paths that call ProductDetails.getOneTimePurchaseOfferDetails only ever see one of them; use AppPurchase.getOneTimeOffers to enumerate all of them and AppPurchase.purchase with an explicit offer token to buy a specific one.
Obtain instances via AppPurchase.getOneTimeOffers or AppPurchase.getOneTimeOffer — do not construct directly.
Since
4.4.0
Constructors
Properties
ISO-4217 currency code (e.g. "USD").
Absolute discount amount in micros, or null when Play reports a percentage instead.
ISO-4217 currency of the absolute discount amount, or null.
Percentage discount configured in Play Console, or null when not a discount offer.
Whole-percent discount against fullPriceMicros. Prefers the percentage Play reports; otherwise derives it from the full and actual prices. Returns 0 when this offer is not a discount.
Locale-formatted absolute discount amount, or null.
Locale-formatted price the user pays (e.g. "$6.99").
Undiscounted list price in micros when this offer is a discount, or null when the offer has no strike-through price.
true when this offer is priced below the product's list price.
true when Play caps how many of this offer can be sold.
true when this offer is a pre-order that has not been released yet.
Maximum quantity available for a limited-quantity offer, or 0 when unlimited.
Opaque token passed to com.android.billingclient.api.BillingFlowParams when launching purchase.
Pre-order presale cut-off in epoch millis, or 0 when this is not a pre-order.
Pre-order release time in epoch millis, or 0 when this is not a pre-order.
Price the user pays, in micros (price × 1,000,000).
Purchase option id from Play Console, or null when not configured.
Quantity still available for a limited-quantity offer, or 0 when unlimited.
ISO-8601 rental expiration period — how long the user has to start — or null.
rentalExpirationPeriod parsed into components, or null.
ISO-8601 rental period — how long access lasts after first playback — or null.
rentalPeriod parsed into components, or null when this is not a rental.
Start of the offer's validity window in epoch millis, or 0 when unbounded.
End of the offer's validity window in epoch millis, or 0 when unbounded.