ProductDetails.OneTimePurchaseOfferDetails

public final class ProductDetails.OneTimePurchaseOfferDetails


Represents the offer details to buy an one-time purchase product.

Summary

Nested types

Represents discount display information about a discounted one-time product offer.

Represents a discount amount.

Represents the limited quantity information.

Represents the rental details about rental offers.

Represents offer valid time window for which users are eligible for a one-time product offer.

Public methods

ProductDetails.OneTimePurchaseOfferDetails.DiscountDisplayInfo

Returns details about the discounted offer (if applicable).

String

Returns formatted price for the payment, including its currency sign.

Long

Returns the full (non-discounted) price of the offer in micro-units of currency.

ProductDetails.OneTimePurchaseOfferDetails.LimitedQuantityInfo

Returns the limited quantity information for this offer.

String

Returns the offer id associated with the one time product offer.

List<String>

Returns the offerTags.

String

Returns the offerToken to use when constructing BillingFlowParams.

long

Returns the price for the payment in micro-units, where 1,000,000 micro-units equal one unit of the currency.

String

Returns ISO 4217 currency code for price.

String

Returns the purchase option id associated with the one time product purchase option.

ProductDetails.OneTimePurchaseOfferDetails.RentalDetails

Returns the rent information for this offer.

ProductDetails.OneTimePurchaseOfferDetails.ValidTimeWindow

Returns the time window for which users are eligible for this offer.

Public methods

getDiscountDisplayInfo

public ProductDetails.OneTimePurchaseOfferDetails.DiscountDisplayInfo getDiscountDisplayInfo()

Returns details about the discounted offer (if applicable).

Note: Returns null for offers without a discount.

getFormattedPrice

public String getFormattedPrice()

Returns formatted price for the payment, including its currency sign.

For tax exclusive countries, the price doesn't include tax.

getFullPriceMicros

public Long getFullPriceMicros()

Returns the full (non-discounted) price of the offer in micro-units of currency.

For example, if price is "€7.99", the fullPriceMicros is "7_990_000". This value represents the localized, rounded price for a particular currency getPriceCurrencyCode.

Note: Returns null for offers without a discount.

getLimitedQuantityInfo

public ProductDetails.OneTimePurchaseOfferDetails.LimitedQuantityInfo getLimitedQuantityInfo()

Returns the limited quantity information for this offer.

Note: Returns null if there is no limited quantity set on the offer and no limited quantity set on the product.

getOfferId

public String getOfferId()

Returns the offer id associated with the one time product offer.

getOfferTags

public List<StringgetOfferTags()

Returns the offerTags.

Note: Returns the offer tags associated with the one time product offer.

getOfferToken

public String getOfferToken()

Returns the offerToken to use when constructing BillingFlowParams.

getPriceAmountMicros

public long getPriceAmountMicros()

Returns the price for the payment in micro-units, where 1,000,000 micro-units equal one unit of the currency.

For example, if price is "€7.99", price_amount_micros is "7990000". This value represents the localized, rounded price for a particular currency.

getPriceCurrencyCode

public String getPriceCurrencyCode()

Returns ISO 4217 currency code for price.

For example, if price is specified in British pounds sterling, currency code is "GBP".

getPurchaseOptionId

public String getPurchaseOptionId()

Returns the purchase option id associated with the one time product purchase option.

getRentalDetails

public ProductDetails.OneTimePurchaseOfferDetails.RentalDetails getRentalDetails()

Returns the rent information for this offer.

Note: Returns null if the offer is not a rent offer.

getValidTimeWindow

public ProductDetails.OneTimePurchaseOfferDetails.ValidTimeWindow getValidTimeWindow()

Returns the time window for which users are eligible for this offer.

Note: Returns null if there are no time limitations on the offer.