# BundledSubscription.Builder

# BundledSubscription.Builder

*** ** * ** ***

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

<br />

```
class BundledSubscription.Builder
```

<br />

*** ** * ** ***

Builder class for[BundledSubscription](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/BundledSubscription).

## Summary

|                                                            ### Public constructors                                                             |
|------------------------------------------------------------------------------------------------------------------------------------------------|
| [Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/BundledSubscription.Builder#Builder())`()` |

|                                                                  ### Public functions                                                                   |
|---------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [BundledSubscription.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/BundledSubscription.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [addEntitlement](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/BundledSubscription.Builder#addEntitlement(com.google.android.engage.common.datamodel.SubscriptionEntitlement))`(entitlement: `[SubscriptionEntitlement](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/SubscriptionEntitlement)`!)` Adds an entitlement to the bundled subscription.                                                                                                                                                                                                                                |
| [BundledSubscription.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/BundledSubscription.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [addEntitlements](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/BundledSubscription.Builder#addEntitlements(java.util.List<com.google.android.engage.common.datamodel.SubscriptionEntitlement>))`(entitlements: (`[Mutable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-mutable-list/index.html)`)`[List](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html)`<`[SubscriptionEntitlement](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/SubscriptionEntitlement)`!>!)` Adds a list of entitlements to the bundled subscription. |
| [BundledSubscription](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/BundledSubscription)`!`                 | [build](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/BundledSubscription.Builder#build())`()`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| [BundledSubscription.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/BundledSubscription.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setBundledSubscriptionProviderPackageName](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/BundledSubscription.Builder#setBundledSubscriptionProviderPackageName(java.lang.String))`(` ` bundledSubscriptionProviderPackageName: `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!` `)` Sets the package name of the bundled subscription provider.                                                                                                                                                                                                                                           |
| [BundledSubscription.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/BundledSubscription.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setExpirationTimeMillis](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/BundledSubscription.Builder#setExpirationTimeMillis(long))`(expirationTimeMillis: `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`)` Sets the expiration time of the bundled subscription in milliseconds.                                                                                                                                                                                                                                                                                                               |
| [BundledSubscription.Builder](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/BundledSubscription.Builder)`!` | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setSubscriptionType](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/BundledSubscription.Builder#setSubscriptionType(int))`(@`[SubscriptionType](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/SubscriptionType)` subscriptionType: `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Sets the type of the bundled subscription.                                                                                                                                                                                                                       |

## Public constructors

### Builder

```
Builder()
```  

## Public functions

### addEntitlement

```
@CanIgnoreReturnValue
fun addEntitlement(entitlement: SubscriptionEntitlement!): BundledSubscription.Builder!
```

Adds an entitlement to the bundled subscription.  

### addEntitlements

```
@CanIgnoreReturnValue
fun addEntitlements(entitlements: (Mutable)List<SubscriptionEntitlement!>!): BundledSubscription.Builder!
```

Adds a list of entitlements to the bundled subscription.  

### build

```
fun build(): BundledSubscription!
```  

### setBundledSubscriptionProviderPackageName

```
@CanIgnoreReturnValue
fun setBundledSubscriptionProviderPackageName(
    bundledSubscriptionProviderPackageName: String!
): BundledSubscription.Builder!
```

Sets the package name of the bundled subscription provider.  

### setExpirationTimeMillis

```
@CanIgnoreReturnValue
fun setExpirationTimeMillis(expirationTimeMillis: Long): BundledSubscription.Builder!
```

Sets the expiration time of the bundled subscription in milliseconds.  

### setSubscriptionType

```
@CanIgnoreReturnValue
fun setSubscriptionType(@SubscriptionType subscriptionType: Int): BundledSubscription.Builder!
```

Sets the type of the bundled subscription.