# ProductDetails.OneTimePurchaseOfferDetails


```
public final class ProductDetails.OneTimePurchaseOfferDetails
```

<br />

*** ** * ** ***

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

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails.DiscountDisplayInfo` Represents discount display information about a discounted one-time product offer. |
| `public final class https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails.DiscountDisplayInfo.DiscountAmount` Represents a discount amount. |
| `public final class https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails.LimitedQuantityInfo` Represents the limited quantity information. |
| `public final class https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails.PreorderDetails` Represents the preorder details about preorder offers. |
| `public final class https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails.RentalDetails` Represents the rental details about rental offers. |
| `public final class https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails.ValidTimeWindow` Represents offer valid time window for which users are eligible for a one-time product offer. |

| ### Public methods |
|---|---|
| `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails.DiscountDisplayInfo` | `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails#getDiscountDisplayInfo()()` Returns details about the discounted offer (if applicable). |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails#getFormattedPrice()()` Returns formatted price for the payment, including its currency sign. |
| `https://developer.android.com/reference/java/lang/Long.html` | `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails#getFullPriceMicros()()` Returns the full (non-discounted) price of the offer in micro-units of currency. |
| `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails.LimitedQuantityInfo` | `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails#getLimitedQuantityInfo()()` Returns the limited quantity information for this offer. |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails#getOfferId()()` Returns the offer id associated with the one time product offer. |
| `https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/java/lang/String.html>` | `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails#getOfferTags()()` Returns the offerTags. |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails#getOfferToken()()` Returns the offerToken to use when constructing `https://developer.android.com/reference/com/android/billingclient/api/BillingFlowParams`. |
| `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails.PreorderDetails` | `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails#getPreorderDetails()()` Returns the preorder information for this offer. |
| `long` | `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails#getPriceAmountMicros()()` Returns the price for the payment in micro-units, where 1,000,000 micro-units equal one unit of the currency. |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails#getPriceCurrencyCode()()` Returns ISO 4217 currency code for price. |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails#getPurchaseOptionId()()` Returns the purchase option id associated with the one time product purchase option. |
| `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails.RentalDetails` | `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails#getRentalDetails()()` Returns the rent information for this offer. |
| `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails.ValidTimeWindow` | `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails#getValidTimeWindow()()` 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 `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails#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<String> getOfferTags()
```

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 `https://developer.android.com/reference/com/android/billingclient/api/BillingFlowParams`.

### getPreorderDetails

```
public ProductDetails.OneTimePurchaseOfferDetails.PreorderDetails getPreorderDetails()
```

Returns the preorder information for this offer.

Note: Returns `null` if the offer is not a preorder.

### 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.