-
public final class ActiveSubscription
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classActiveSubscription.Companion
-
Field Summary
Fields Modifier and Type Field Description private final BooleanautoRenewingAndroidprivate final StringbasePlanIdAndroidprivate final StringcurrentPlanIdprivate final DoubledaysUntilExpirationIOSprivate final StringenvironmentIOSprivate final DoubleexpirationDateIOSprivate final BooleanisActiveprivate final StringproductIdprivate final StringpurchaseTokenprivate final StringpurchaseTokenAndroidprivate final RenewalInfoIOSrenewalInfoIOSprivate final DoubletransactionDateprivate final StringtransactionIdprivate final BooleanwillExpireSoon
-
Constructor Summary
Constructors Constructor Description ActiveSubscription(Boolean autoRenewingAndroid, String basePlanIdAndroid, String currentPlanId, Double daysUntilExpirationIOS, String environmentIOS, Double expirationDateIOS, Boolean isActive, String productId, String purchaseToken, String purchaseTokenAndroid, RenewalInfoIOS renewalInfoIOS, Double transactionDate, String transactionId, Boolean willExpireSoon)
-
Method Summary
Modifier and Type Method Description final BooleangetAutoRenewingAndroid()final StringgetBasePlanIdAndroid()final StringgetCurrentPlanId()The current plan identifier. final DoublegetDaysUntilExpirationIOS()final StringgetEnvironmentIOS()final DoublegetExpirationDateIOS()final BooleangetIsActive()final StringgetProductId()final StringgetPurchaseToken()final StringgetPurchaseTokenAndroid()Required for subscription upgrade/downgrade on Android final RenewalInfoIOSgetRenewalInfoIOS()Renewal information from StoreKit 2 (iOS only). final DoublegetTransactionDate()final StringgetTransactionId()final BooleangetWillExpireSoon()final Map<String, Object>toJson()-
-
Constructor Detail
-
ActiveSubscription
ActiveSubscription(Boolean autoRenewingAndroid, String basePlanIdAndroid, String currentPlanId, Double daysUntilExpirationIOS, String environmentIOS, Double expirationDateIOS, Boolean isActive, String productId, String purchaseToken, String purchaseTokenAndroid, RenewalInfoIOS renewalInfoIOS, Double transactionDate, String transactionId, Boolean willExpireSoon)
-
-
Method Detail
-
getAutoRenewingAndroid
final Boolean getAutoRenewingAndroid()
-
getBasePlanIdAndroid
final String getBasePlanIdAndroid()
-
getCurrentPlanId
final String getCurrentPlanId()
The current plan identifier. This is:
On Android: the basePlanId (e.g., "premium", "premium-year")
On iOS: the productId (e.g., "com.example.premium_monthly", "com.example.premium_yearly") This provides a unified way to identify which specific plan/tier the user is subscribed to.
-
getDaysUntilExpirationIOS
final Double getDaysUntilExpirationIOS()
-
getEnvironmentIOS
final String getEnvironmentIOS()
-
getExpirationDateIOS
final Double getExpirationDateIOS()
-
getIsActive
final Boolean getIsActive()
-
getProductId
final String getProductId()
-
getPurchaseToken
final String getPurchaseToken()
-
getPurchaseTokenAndroid
final String getPurchaseTokenAndroid()
Required for subscription upgrade/downgrade on Android
-
getRenewalInfoIOS
final RenewalInfoIOS getRenewalInfoIOS()
Renewal information from StoreKit 2 (iOS only). Contains details about subscription renewal status, pending upgrades/downgrades, and auto-renewal preferences.
-
getTransactionDate
final Double getTransactionDate()
-
getTransactionId
final String getTransactionId()
-
getWillExpireSoon
final Boolean getWillExpireSoon()
-
-
-
-