Class AdaptyProfile.Subscription
-
- All Implemented Interfaces:
public final class AdaptyProfile.Subscription
-
-
Field Summary
Fields Modifier and Type Field Description private final BooleanisActiveprivate final StringvendorProductIdprivate final StringvendorTransactionIdprivate final StringvendorOriginalTransactionIdprivate final StringofferIdprivate final Stringstoreprivate final StringactivatedAtprivate final StringrenewedAtprivate final StringexpiresAtprivate final StringstartsAtprivate final BooleanisLifetimeprivate final StringactiveIntroductoryOfferTypeprivate final StringactivePromotionalOfferTypeprivate final StringactivePromotionalOfferIdprivate final BooleanwillRenewprivate final BooleanisInGracePeriodprivate final StringunsubscribedAtprivate final StringbillingIssueDetectedAtprivate final BooleanisSandboxprivate final BooleanisRefundprivate final StringcancellationReason
-
Constructor Summary
Constructors Constructor Description AdaptyProfile.Subscription(Boolean isActive, String vendorProductId, String vendorTransactionId, String vendorOriginalTransactionId, String offerId, String store, String activatedAt, String renewedAt, String expiresAt, String startsAt, Boolean isLifetime, String activeIntroductoryOfferType, String activePromotionalOfferType, String activePromotionalOfferId, Boolean willRenew, Boolean isInGracePeriod, String unsubscribedAt, String billingIssueDetectedAt, Boolean isSandbox, Boolean isRefund, String cancellationReason)
-
Method Summary
Modifier and Type Method Description final BooleanisActive()trueif the subscription is active.final StringgetVendorProductId()An identifier of a product in a store that unlocked this subscription. final StringgetVendorTransactionId()A transaction id of a purchase in a store that unlocked this subscription. final StringgetVendorOriginalTransactionId()An original transaction id of the purchase in a store that unlocked this subscription. final StringgetOfferId()An identifier of a discount offer in Google Play that unlocked this subscription. final StringgetStore()A store of the purchase. final StringgetActivatedAt()ISO 8601 datetime when the subscription was activated. final StringgetRenewedAt()ISO 8601 datetime when the subscription was renewed. final StringgetExpiresAt()ISO 8601 datetime when the access level will expire (could be in the past and could be null for lifetime access). final StringgetStartsAt()ISO 8601 datetime when the subscription has started (could be in the future). final BooleanisLifetime()trueif the subscription is active for a lifetime (no expiration date).final StringgetActiveIntroductoryOfferType()A type of an active introductory offer. final StringgetActivePromotionalOfferType()A type of an active promotional offer. final StringgetActivePromotionalOfferId()An id of active promotional offer. final BooleangetWillRenew()trueif the auto-renewable subscription is set to renew.final BooleanisInGracePeriod()Whether the auto-renewable subscription is in a grace period. final StringgetUnsubscribedAt()ISO 8601 datetime when the auto-renewable subscription was cancelled. final StringgetBillingIssueDetectedAt()ISO 8601 datetime when a billing issue was detected. final BooleanisSandbox()trueif the product was purchased in a sandbox environment.final BooleanisRefund()trueif the purchase was refunded.final StringgetCancellationReason()A reason why a subscription was cancelled. Booleanequals(Object other)IntegerhashCode()StringtoString()-
-
Constructor Detail
-
AdaptyProfile.Subscription
AdaptyProfile.Subscription(Boolean isActive, String vendorProductId, String vendorTransactionId, String vendorOriginalTransactionId, String offerId, String store, String activatedAt, String renewedAt, String expiresAt, String startsAt, Boolean isLifetime, String activeIntroductoryOfferType, String activePromotionalOfferType, String activePromotionalOfferId, Boolean willRenew, Boolean isInGracePeriod, String unsubscribedAt, String billingIssueDetectedAt, Boolean isSandbox, Boolean isRefund, String cancellationReason)
-
-
Method Detail
-
getVendorProductId
final String getVendorProductId()
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".
-
getVendorTransactionId
final String getVendorTransactionId()
A transaction id of a purchase in a store that unlocked this subscription.
-
getVendorOriginalTransactionId
final String getVendorOriginalTransactionId()
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.
-
getOfferId
final String getOfferId()
An identifier of a discount offer in Google Play that unlocked this subscription.
-
getActivatedAt
final String getActivatedAt()
ISO 8601 datetime when the subscription was activated.
-
getRenewedAt
final String getRenewedAt()
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.
-
getExpiresAt
final String getExpiresAt()
ISO 8601 datetime when the access level will expire (could be in the past and could be null for lifetime access).
-
getStartsAt
final String getStartsAt()
ISO 8601 datetime when the subscription has started (could be in the future).
-
isLifetime
final Boolean isLifetime()
trueif the subscription is active for a lifetime (no expiration date).
-
getActiveIntroductoryOfferType
final String getActiveIntroductoryOfferType()
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.
-
getActivePromotionalOfferType
final String getActivePromotionalOfferType()
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.
-
getActivePromotionalOfferId
final String getActivePromotionalOfferId()
An id of active promotional offer.
-
getWillRenew
final Boolean getWillRenew()
trueif the auto-renewable subscription is set to renew.
-
isInGracePeriod
final Boolean isInGracePeriod()
Whether the auto-renewable subscription is in a grace period.
-
getUnsubscribedAt
final String getUnsubscribedAt()
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.
-
getBillingIssueDetectedAt
final String getBillingIssueDetectedAt()
ISO 8601 datetime when a billing issue was detected. Subscription can still be active.
-
getCancellationReason
final String getCancellationReason()
A reason why a subscription was cancelled.
-
-
-
-