Subscription

class Subscription(val isActive: Boolean, val vendorProductId: String, val vendorTransactionId: String?, val vendorOriginalTransactionId: String?, val offerId: String?, val store: String, val activatedAt: String, val renewedAt: String?, val expiresAt: String?, val startsAt: String?, val isLifetime: Boolean, val activeIntroductoryOfferType: String?, val activePromotionalOfferType: String?, val activePromotionalOfferId: String?, val willRenew: Boolean, val isInGracePeriod: Boolean, val unsubscribedAt: String?, val billingIssueDetectedAt: String?, val isSandbox: Boolean, val isRefund: Boolean, val cancellationReason: String?)

Constructors

Link copied to clipboard
fun Subscription(isActive: Boolean, vendorProductId: String, vendorTransactionId: String?, vendorOriginalTransactionId: String?, offerId: String?, store: String, activatedAt: String, renewedAt: String?, expiresAt: String?, startsAt: String?, isLifetime: Boolean, activeIntroductoryOfferType: String?, activePromotionalOfferType: String?, activePromotionalOfferId: String?, willRenew: Boolean, isInGracePeriod: Boolean, unsubscribedAt: String?, billingIssueDetectedAt: String?, isSandbox: Boolean, isRefund: Boolean, cancellationReason: String?)

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard

ISO 8601 datetime when the subscription was activated.

Link copied to clipboard

A type of an active introductory offer. If the value is not null, it means that the offer was applied during the current subscription period.

Link copied to clipboard

An id of active promotional offer.

Link copied to clipboard

A type of an active promotional offer. If the value is not null, it means that the offer was applied during the current subscription period.

Link copied to clipboard

ISO 8601 datetime when a billing issue was detected. Subscription can still be active.

Link copied to clipboard

A reason why a subscription was cancelled.

Link copied to clipboard

ISO 8601 datetime when the access level will expire (could be in the past and could be null for lifetime access).

Link copied to clipboard

true if the subscription is active.

Link copied to clipboard

Whether the auto-renewable subscription is in a grace period.

Link copied to clipboard

true if the subscription is active for a lifetime (no expiration date).

Link copied to clipboard

true if the purchase was refunded.

Link copied to clipboard

true if the product was purchased in a sandbox environment.

Link copied to clipboard

An identifier of a discount offer in Google Play that unlocked this subscription.

Link copied to clipboard

ISO 8601 datetime when the subscription was renewed. It can be null if the purchase was first in chain or it is non-renewing subscription.

Link copied to clipboard

ISO 8601 datetime when the subscription has started (could be in the future).

Link copied to clipboard

A store of the purchase.

Link copied to clipboard

ISO 8601 datetime when the auto-renewable subscription was cancelled. Subscription can still be active, it means that auto-renewal is turned off. Would be null if a user reactivates the subscription.

Link copied to clipboard

An original transaction id of the purchase in a store that unlocked this subscription. For auto-renewable subscription, this will be an id of the first transaction in this subscription.

Link copied to clipboard

An identifier of a product in a store that unlocked this subscription. It may contain either product_id only or "product_id:base_plan_id".

Link copied to clipboard

A transaction id of a purchase in a store that unlocked this subscription.

Link copied to clipboard

true if the auto-renewable subscription is set to renew.