# ProductDetails


```
public final class ProductDetails
```

<br />

*** ** * ** ***

Represents the details of a one time or subscription product.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.InstallmentPlanDetails` Represents additional details of an installment subscription plan. |
| `public final class https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails` Represents the offer details to buy an one-time purchase product. |
| `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 final class https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.PricingPhase` Represents a pricing phase, describing how a user pays at a point in time. |
| `public class https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.PricingPhases` Pricing phases for purchasing an item through a offer. |
| `@https://developer.android.com/reference/java/lang/annotation/Retention.html(value = https://developer.android.com/reference/java/lang/annotation/java.lang.annotation.RetentionPolicy.html#SOURCE) public annotation https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.RecurrenceMode` Recurrence mode of the pricing phase. |
| `public final class https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.SubscriptionOfferDetails` Represents the available purchase plans to buy a subscription product. |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object.html o)` |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails#getDescription()()` Returns the description of the product. |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails#getName()()` Returns the name of the product being sold. |
| `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails` | `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails#getOneTimePurchaseOfferDetails()()` Returns the offer details of an one-time purchase product. |
| `https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.OneTimePurchaseOfferDetails>` | `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails#getOneTimePurchaseOfferDetailsList()()` Returns a list of offer details of an one-time purchase product. |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails#getProductId()()` Returns the product's Id. |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails#getProductType()()` Returns the `https://developer.android.com/reference/com/android/billingclient/api/BillingClient.ProductType` of the product. |
| `https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/com/android/billingclient/api/ProductDetails.SubscriptionOfferDetails>` | `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails#getSubscriptionOfferDetails()()` Returns a list containing all available offers to purchase a subscription product. |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails#getTitle()()` Returns the title of the product being sold. |
| `int` | `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails#hashCode()()` |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails#toString()()` |

## Public methods

### equals

```
public boolean equals(Object o)
```

### getDescription

```
public String getDescription()
```

Returns the description of the product.

### getName

```
public String getName()
```

Returns the name of the product being sold.

This method is similar to `https://developer.android.com/reference/com/android/billingclient/api/ProductDetails#getTitle()` but does not include the name of the app which owns the product. Example: 100 Gold Coins

### getOneTimePurchaseOfferDetails

```
public ProductDetails.OneTimePurchaseOfferDetails getOneTimePurchaseOfferDetails()
```

Returns the offer details of an one-time purchase product.

### getOneTimePurchaseOfferDetailsList

```
public List<ProductDetails.OneTimePurchaseOfferDetails> getOneTimePurchaseOfferDetailsList()
```

Returns a list of offer details of an one-time purchase product.

Note: OfferDetails is only set for one time product with multiple offers. Returns `
null` for all other types.

### getProductId

```
public String getProductId()
```

Returns the product's Id.

### getProductType

```
public String getProductType()
```

Returns the `https://developer.android.com/reference/com/android/billingclient/api/BillingClient.ProductType` of the product.

### getSubscriptionOfferDetails

```
public List<ProductDetails.SubscriptionOfferDetails> getSubscriptionOfferDetails()
```

Returns a list containing all available offers to purchase a subscription product.

Note: OfferDetails is only set for SUBS product type. Returns `null` for INAPP product type.

### getTitle

```
public String getTitle()
```

Returns the title of the product being sold.

The title includes the name of the app which owns the product. Example: 100 Gold Coins (Coin selling app).

### hashCode

```
public int hashCode()
```

### toString

```
public String toString()
```