# SubscriptionEntity

# SubscriptionEntity

*** ** * ** ***

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


```
class SubscriptionEntity : Entity
```

<br />

|---|---|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                                                   |||
| ↳ | [com.google.android.engage.common.datamodel.Entity](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/Entity)                            ||
|   | ↳ | [com.google.android.engage.common.datamodel.SubscriptionEntity](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/SubscriptionEntity) |

*** ** * ** ***

An object representing a subscription.

## Summary

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

|                            ### Public functions                             |
|-----------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------|
| [Bundle](https://developer.android.com/reference/android/os/Bundle.html)`!` | [toBundle](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/SubscriptionEntity#toBundle())`()` |

|                                                                                                                   ### Public properties                                                                                                                    |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [ImmutableList](https://guava.dev/releases/21.0/api/docs/com/google/common/collect/ImmutableList.html)`<`[BundledSubscription](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/BundledSubscription)`!>!`         | [bundledSubscriptions](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/SubscriptionEntity#bundledSubscriptions())                                                                                                                           |
| [ImmutableList](https://guava.dev/releases/21.0/api/docs/com/google/common/collect/ImmutableList.html)`<`[SubscriptionEntitlement](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/SubscriptionEntitlement)`!>!` | [entitlements](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/SubscriptionEntity#entitlements())                                                                                                                                           |
| [Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`!`                                                                                                                                                                            | [expirationTimeMillis](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/SubscriptionEntity#expirationTimeMillis())                                                                                                                           |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`!`                                                                                                                                                                        | [providerPackageName](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/SubscriptionEntity#providerPackageName())                                                                                                                             |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                                                                                                                                                 | `@`[SubscriptionType](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/SubscriptionType) [subscriptionType](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/SubscriptionEntity#subscriptionType()) |

|                                                                                                                                                                                                                                                                                         ### Inherited functions                                                                                                                                                                                                                                                                                          |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From [com.google.android.engage.common.datamodel.Entity](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/Entity) |----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------| | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getEntityType](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/Entity#getEntityType())`()` | |

## Public functions

### toBundle

```
fun toBundle(): Bundle!
```  

## Public properties

### bundledSubscriptions

```
val bundledSubscriptions: ImmutableList<BundledSubscription!>!
```  

### entitlements

```
val entitlements: ImmutableList<SubscriptionEntitlement!>!
```  

### expirationTimeMillis

```
val expirationTimeMillis: Long!
```  

### providerPackageName

```
val providerPackageName: String!
```  

### subscriptionType

```
@SubscriptionType
val subscriptionType: Int
```