SubscriptionTransaction

@Serializable
data class SubscriptionTransaction(val transactionId: String, val productId: String, val purchaseDate: Date, val willRenew: Boolean, val isRevoked: Boolean, val isInGracePeriod: Boolean, val isInBillingRetryPeriod: Boolean, val isActive: Boolean, val expirationDate: Date?, val store: Store = Store.PLAY_STORE, val offerType: LatestPeriodType? = null, val subscriptionGroupId: String? = null)(source)

Represents a subscription transaction in the customer's purchase history.

Constructors

Link copied to clipboard
constructor(transactionId: String, productId: String, purchaseDate: Date, willRenew: Boolean, isRevoked: Boolean, isInGracePeriod: Boolean, isInBillingRetryPeriod: Boolean, isActive: Boolean, expirationDate: Date?, store: Store = Store.PLAY_STORE, offerType: LatestPeriodType? = null, subscriptionGroupId: String? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
@Serializable(with = DateSerializer::class)
@SerialName(value = "expirationDate")
val expirationDate: Date?

The date that the subscription expires.

Link copied to clipboard
@SerialName(value = "isActive")
val isActive: Boolean

Indicates whether the subscription is active.

Link copied to clipboard
@SerialName(value = "isInBillingRetryPeriod")
val isInBillingRetryPeriod: Boolean

Indicates whether the subscription is in a billing retry period state.

Link copied to clipboard
@SerialName(value = "isInGracePeriod")
val isInGracePeriod: Boolean

Indicates whether the subscription is in a billing grace period state.

Link copied to clipboard
@SerialName(value = "isRevoked")
val isRevoked: Boolean

Indicates whether the transaction has been revoked.

Link copied to clipboard
@SerialName(value = "offerType")
val offerType: LatestPeriodType?

The type of offer that applied to this transaction.

Link copied to clipboard
@SerialName(value = "productId")
val productId: String

The product identifier of the subscription.

Link copied to clipboard
@Serializable(with = DateSerializer::class)
@SerialName(value = "purchaseDate")
val purchaseDate: Date

The date that the App Store charged the user's account.

Link copied to clipboard
@SerialName(value = "store")
val store: Store

The store from which this transaction originated.

Link copied to clipboard
@SerialName(value = "subscriptionGroupId")
val subscriptionGroupId: String?
Link copied to clipboard
@SerialName(value = "transactionId")
val transactionId: String

The unique identifier for the transaction.

Link copied to clipboard
@SerialName(value = "willRenew")
val willRenew: Boolean

Indicates whether the subscription will renew.