# PurchaseHistoryRecord


```
public class PurchaseHistoryRecord
```

<br />

*** ** * ** ***

Represents an in-app billing purchase history record.

This class includes a subset of fields in `https://developer.android.com/reference/com/android/billingclient/api/Purchase`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/com/android/billingclient/api/PurchaseHistoryRecord#PurchaseHistoryRecord(java.lang.String,java.lang.String)(https://developer.android.com/reference/java/lang/String.html jsonPurchaseInfo, https://developer.android.com/reference/java/lang/String.html signature)` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/com/android/billingclient/api/PurchaseHistoryRecord#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/PurchaseHistoryRecord#getDeveloperPayload()()` Returns the payload specified when the purchase was acknowledged or consumed. |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/com/android/billingclient/api/PurchaseHistoryRecord#getOriginalJson()()` Returns a String in JSON format that contains details about the purchase order. |
| `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/PurchaseHistoryRecord#getProducts()()` Returns the product Ids. |
| `long` | `https://developer.android.com/reference/com/android/billingclient/api/PurchaseHistoryRecord#getPurchaseTime()()` Returns the time the product was purchased, in milliseconds since the epoch (Jan 1, 1970). |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/com/android/billingclient/api/PurchaseHistoryRecord#getPurchaseToken()()` Returns a token that uniquely identifies a purchase for a given item and user pair. |
| `int` | `https://developer.android.com/reference/com/android/billingclient/api/PurchaseHistoryRecord#getQuantity()()` Returns the quantity of the purchased product. |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/com/android/billingclient/api/PurchaseHistoryRecord#getSignature()()` Returns String containing the signature of the purchase data that was signed with the private key of the developer. |
| `https://developer.android.com/reference/java/util/ArrayList.html<https://developer.android.com/reference/java/lang/String.html>` | `[getSkus](https://developer.android.com/reference/com/android/billingclient/api/PurchaseHistoryRecord#getSkus())()` **This method is deprecated.** Use `https://developer.android.com/reference/com/android/billingclient/api/PurchaseHistoryRecord#getProducts()` instead. <br /> |
| `int` | `https://developer.android.com/reference/com/android/billingclient/api/PurchaseHistoryRecord#hashCode()()` |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/com/android/billingclient/api/PurchaseHistoryRecord#toString()()` |

## Public constructors

### PurchaseHistoryRecord

```
public PurchaseHistoryRecord(String jsonPurchaseInfo, String signature)
```

## Public methods

### equals

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

| See also |
|---|---|
| `https://developer.android.com/reference/java/lang/Object.html#equals(java.lang.Object)` |   |

### getDeveloperPayload

```
public String getDeveloperPayload()
```

Returns the payload specified when the purchase was acknowledged or consumed.

### getOriginalJson

```
public String getOriginalJson()
```

Returns a String in JSON format that contains details about the purchase order.

### getProducts

```
public List<String> getProducts()
```

Returns the product Ids.

### getPurchaseTime

```
public long getPurchaseTime()
```

Returns the time the product was purchased, in milliseconds since the epoch (Jan 1, 1970).

### getPurchaseToken

```
public String getPurchaseToken()
```

Returns a token that uniquely identifies a purchase for a given item and user pair.

### getQuantity

```
public int getQuantity()
```

Returns the quantity of the purchased product.

Always returns 1 for SUBS items; could be greater than 1 for INAPP items.

### getSignature

```
public String getSignature()
```

Returns String containing the signature of the purchase data that was signed with the private key of the developer. The data signature uses the RSASSA-PKCS1-v1_5 scheme.

### getSkus

```
public ArrayList<String> [getSkus](https://developer.android.com/reference/com/android/billingclient/api/PurchaseHistoryRecord#getSkus())()
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Use `https://developer.android.com/reference/com/android/billingclient/api/PurchaseHistoryRecord#getProducts()` instead.

Returns the product Ids.

### hashCode

```
public int hashCode()
```

| See also |
|---|---|
| `https://developer.android.com/reference/java/lang/Object.html#hashCode()` |   |

### toString

```
public String toString()
```