-
- All Implemented Interfaces:
-
dev.hyo.openiap.PurchaseCommon
public interface Purchase implements PurchaseCommon
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classPurchase.Companion
-
Method Summary
Modifier and Type Method Description abstract Map<String, Object>toJson()abstract StringgetCurrentPlanId()The current plan identifier. abstract StringgetId()abstract List<String>getIds()abstract BooleangetIsAutoRenewing()abstract IapPlatformgetPlatform()abstract StringgetProductId()abstract PurchaseStategetPurchaseState()abstract StringgetPurchaseToken()Unified purchase token (iOS JWS, Android purchaseToken) abstract IntegergetQuantity()abstract DoublegetTransactionDate()-
-
Method Detail
-
getCurrentPlanId
abstract 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.
-
getIsAutoRenewing
abstract Boolean getIsAutoRenewing()
-
getPlatform
abstract IapPlatform getPlatform()
-
getProductId
abstract String getProductId()
-
getPurchaseState
abstract PurchaseState getPurchaseState()
-
getPurchaseToken
abstract String getPurchaseToken()
Unified purchase token (iOS JWS, Android purchaseToken)
-
getQuantity
abstract Integer getQuantity()
-
getTransactionDate
abstract Double getTransactionDate()
-
-
-
-