# SubscriptionEntitlement

# SubscriptionEntitlement

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/SubscriptionEntitlement "View this page in Kotlin")\|Java  

<br />

```
public final class SubscriptionEntitlement
```

<br />

*** ** * ** ***

An object representing a subscription entitlement.

## Summary

|                                                                                                                                                          ### Nested types                                                                                                                                                          |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `public final class `[SubscriptionEntitlement.Builder](https://developer.android.com/reference/com/google/android/engage/common/datamodel/SubscriptionEntitlement.Builder) Builder class for[SubscriptionEntitlement](https://developer.android.com/reference/com/google/android/engage/common/datamodel/SubscriptionEntitlement). |

|                                ### Public fields                                |
|---------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|
| `final `[String](https://developer.android.com/reference/java/lang/String.html) | [displayName](https://developer.android.com/reference/com/google/android/engage/common/datamodel/SubscriptionEntitlement#displayName())                   |
| `final `[String](https://developer.android.com/reference/java/lang/String.html) | [entitlementId](https://developer.android.com/reference/com/google/android/engage/common/datamodel/SubscriptionEntitlement#entitlementId())               |
| `final `[Long](https://developer.android.com/reference/java/lang/Long.html)     | [expirationTimeMillis](https://developer.android.com/reference/com/google/android/engage/common/datamodel/SubscriptionEntitlement#expirationTimeMillis()) |

|                            ### Public methods                            |
|--------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String.html)  | [getDisplayName](https://developer.android.com/reference/com/google/android/engage/common/datamodel/SubscriptionEntitlement#getDisplayName())`()` Returns the display name of the entitlement.                      |
| [String](https://developer.android.com/reference/java/lang/String.html)  | [getEntitlementId](https://developer.android.com/reference/com/google/android/engage/common/datamodel/SubscriptionEntitlement#getEntitlementId())`()` Returns the id of the entitlement.                            |
| [Long](https://developer.android.com/reference/java/lang/Long.html)      | [getExpirationTimeMillis](https://developer.android.com/reference/com/google/android/engage/common/datamodel/SubscriptionEntitlement#getExpirationTimeMillis())`()` Returns the expiration time of the entitlement. |
| [Bundle](https://developer.android.com/reference/android/os/Bundle.html) | [toBundle](https://developer.android.com/reference/com/google/android/engage/common/datamodel/SubscriptionEntitlement#toBundle())`()`                                                                               |

## Public fields

### displayName

```
public final String displayName
```  

### entitlementId

```
public final String entitlementId
```  

### expirationTimeMillis

```
public final Long expirationTimeMillis
```  

## Public methods

### getDisplayName

```
public String getDisplayName()
```

Returns the display name of the entitlement.  

### getEntitlementId

```
public String getEntitlementId()
```

Returns the id of the entitlement.  

### getExpirationTimeMillis

```
public Long getExpirationTimeMillis()
```

Returns the expiration time of the entitlement.  

### toBundle

```
public Bundle toBundle()
```