# BundledSubscription

# BundledSubscription

*** ** * ** ***

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


```
public final class BundledSubscription
```

<br />

*** ** * ** ***

An object representing a bundled subscription.

## Summary

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

|                                                                                                                     ### Public fields                                                                                                                     |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `final `[String](https://developer.android.com/reference/java/lang/String.html)                                                                                                                                                                           | [bundledSubscriptionProviderPackageName](https://developer.android.com/reference/com/google/android/engage/common/datamodel/BundledSubscription#bundledSubscriptionProviderPackageName()) |
| `final `[ImmutableList](https://guava.dev/releases/21.0/api/docs/com/google/common/collect/ImmutableList.html)`<`[SubscriptionEntitlement](https://developer.android.com/reference/com/google/android/engage/common/datamodel/SubscriptionEntitlement)`>` | [entitlements](https://developer.android.com/reference/com/google/android/engage/common/datamodel/BundledSubscription#entitlements())                                                     |
| `final `[Long](https://developer.android.com/reference/java/lang/Long.html)                                                                                                                                                                               | [expirationTimeMillis](https://developer.android.com/reference/com/google/android/engage/common/datamodel/BundledSubscription#expirationTimeMillis())                                     |
| `final int`                                                                                                                                                                                                                                               | [subscriptionType](https://developer.android.com/reference/com/google/android/engage/common/datamodel/BundledSubscription#subscriptionType())                                             |

|                                                                                                                ### Public methods                                                                                                                 |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [String](https://developer.android.com/reference/java/lang/String.html)                                                                                                                                                                           | [getBundledSubscriptionProviderPackageName](https://developer.android.com/reference/com/google/android/engage/common/datamodel/BundledSubscription#getBundledSubscriptionProviderPackageName())`()` Returns the package name of the bundled subscription provider.                                                               |
| [ImmutableList](https://guava.dev/releases/21.0/api/docs/com/google/common/collect/ImmutableList.html)`<`[SubscriptionEntitlement](https://developer.android.com/reference/com/google/android/engage/common/datamodel/SubscriptionEntitlement)`>` | [getEntitlements](https://developer.android.com/reference/com/google/android/engage/common/datamodel/BundledSubscription#getEntitlements())`()` Returns the bundled entitlements.                                                                                                                                                |
| [Long](https://developer.android.com/reference/java/lang/Long.html)                                                                                                                                                                               | [getExpirationTimeMillis](https://developer.android.com/reference/com/google/android/engage/common/datamodel/BundledSubscription#getExpirationTimeMillis())`()` Returns the expiration time of the bundled subscription in milliseconds.                                                                                         |
| `int`                                                                                                                                                                                                                                             | `@`[SubscriptionType](https://developer.android.com/reference/com/google/android/engage/common/datamodel/SubscriptionType) [getSubscriptionType](https://developer.android.com/reference/com/google/android/engage/common/datamodel/BundledSubscription#getSubscriptionType())`()` Returns the type of the bundled subscription. |
| [Bundle](https://developer.android.com/reference/android/os/Bundle.html)                                                                                                                                                                          | [toBundle](https://developer.android.com/reference/com/google/android/engage/common/datamodel/BundledSubscription#toBundle())`()`                                                                                                                                                                                                |

## Public fields

### bundledSubscriptionProviderPackageName

```
public final String bundledSubscriptionProviderPackageName
```  

### entitlements

```
public final ImmutableList<SubscriptionEntitlement> entitlements
```  

### expirationTimeMillis

```
public final Long expirationTimeMillis
```  

### subscriptionType

```
public final int subscriptionType
```  

## Public methods

### getBundledSubscriptionProviderPackageName

```
public String getBundledSubscriptionProviderPackageName()
```

Returns the package name of the bundled subscription provider.  

### getEntitlements

```
public ImmutableList<SubscriptionEntitlement> getEntitlements()
```

Returns the bundled entitlements.  

### getExpirationTimeMillis

```
public Long getExpirationTimeMillis()
```

Returns the expiration time of the bundled subscription in milliseconds.  

### getSubscriptionType

```
@SubscriptionType
public int getSubscriptionType()
```

Returns the type of the bundled subscription.  

### toBundle

```
public Bundle toBundle()
```