# ProductDetails.OneTimePurchaseOfferDetails.DiscountDisplayInfo


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

<br />

*** ** * ** ***

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

Exactly one of percentageDiscount or discountAmount will be set at any given time.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails.DiscountDisplayInfo.DiscountAmount` Represents a discount amount. |

| ### Public methods |
|---|---|
| `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails.DiscountDisplayInfo.DiscountAmount` | `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails.DiscountDisplayInfo#getDiscountAmount()()` Returns the absolute discount of an item. |
| `https://developer.android.com/reference/java/lang/Integer.html` | `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails.DiscountDisplayInfo#getPercentageDiscount()()` Returns the percentage discount of an item. |

## Public methods

### getDiscountAmount

```
public ProductDetails.OneTimePurchaseOfferDetails.DiscountDisplayInfo.DiscountAmount getDiscountAmount()
```

Returns the absolute discount of an item.

Disclaimer: Please use the discountAmount field for display purposes only, and do not use it to calculate the final offer price. Please use the `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails#getPriceAmountMicros()` field to get the offer price.

For example, if the original price is $9.99, the discount is $4.99, then the discounted offer price will be $5.00.

Note: Returns `null` for offers without a discount amount.

### getPercentageDiscount

```
public Integer getPercentageDiscount()
```

Returns the percentage discount of an item.

For example, if discount is "40%", the percentageDiscount is "40".

Disclaimer: Please use the percentageDiscount field for display purposes only, and do not use it to calculate the final offer price. Please use the `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails#getPriceAmountMicros()` field to get the offer price.

For example, if the original price is $9.99, the discount is 50%, then the discounted offer price will be $5.00.

Note: Returns `null` for offers without a percentage discount.