From 0b5629ffd8cb17516d4e252ef9b6c1bd63becbd1 Mon Sep 17 00:00:00 2001 From: JayShortway <29483617+JayShortway@users.noreply.github.com> Date: Fri, 9 Aug 2024 17:17:47 +0200 Subject: [PATCH] Temporarily reverts "Remove expect/actual from enums without extra properties (#137)" (#141) Revert "Remove expect/actual from enums without extra properties (#137)" This reverts commit 1fb4e8d738ef6fbbd1c27115d22c74ba66d552df. --- .../kmp/apitester/CacheFetchPolicyAPI.kt | 0 .../kmp/apitester/OwnershipTypeAPI.kt | 0 .../purchases/kmp/apitester/PeriodTypeAPI.kt | 0 .../apitester/PurchasesAreCompletedByAPI.kt | 0 .../purchases/kmp/apitester/StoreAPI.kt | 0 .../kmp/apitester/DiscountPaymentModeAPI.kt | 17 --- .../kmp/apitester/DiscountTypeAPI.kt | 16 --- .../kmp/apitester/EntitlementInfoAPI.kt | 15 ++- .../purchases/kmp/apitester/LogLevelAPI.kt | 18 --- .../kmp/apitester/CacheFetchPolicyAPI.kt | 18 +++ .../kmp/apitester/OwnershipTypeAPI.kt | 16 +++ .../purchases/kmp/apitester/PeriodTypeAPI.kt | 16 +++ .../apitester/PurchasesAreCompletedByAPI.kt | 15 +++ .../purchases/kmp/apitester/StoreAPI.kt | 22 ++++ core/api/core.api | 113 ++++-------------- .../purchases/kmp/CacheFetchPolicy.android.kt | 10 +- .../purchases/kmp/EntitlementInfo.android.kt | 55 ++------- .../purchases/kmp/LogLevel.android.kt | 20 +--- .../purchases/kmp/Purchases.android.kt | 21 +--- .../kmp/PurchasesAreCompletedBy.android.kt | 12 +- .../kmp/models/DiscountPaymentMode.android.kt | 7 ++ .../kmp/models/DiscountType.android.kt | 6 + .../purchases/kmp/CacheFetchPolicy.kt | 4 +- .../purchases/kmp/EntitlementInfo.kt | 6 +- .../com/revenuecat/purchases/kmp/LogLevel.kt | 2 +- .../purchases/kmp/PurchasesAreCompletedBy.kt | 2 +- .../kmp/models/DiscountPaymentMode.kt | 2 +- .../purchases/kmp/models/DiscountType.kt | 2 +- .../purchases/kmp/CacheFetchPolicy.ios.kt | 16 ++- .../purchases/kmp/EntitlementInfo.ios.kt | 42 +++++-- .../revenuecat/purchases/kmp/LogLevel.ios.kt | 16 ++- .../revenuecat/purchases/kmp/Purchases.ios.kt | 6 +- .../kmp/PurchasesAreCompletedBy.ios.kt | 13 +- .../kmp/models/DiscountPaymentMode.ios.kt | 10 +- .../purchases/kmp/models/DiscountType.ios.kt | 9 +- either/api/either.api | 4 +- result/api/result.api | 4 +- 37 files changed, 251 insertions(+), 284 deletions(-) rename apiTester/src/{commonMain => androidMain}/kotlin/com/revenuecat/purchases/kmp/apitester/CacheFetchPolicyAPI.kt (100%) rename apiTester/src/{commonMain => androidMain}/kotlin/com/revenuecat/purchases/kmp/apitester/OwnershipTypeAPI.kt (100%) rename apiTester/src/{commonMain => androidMain}/kotlin/com/revenuecat/purchases/kmp/apitester/PeriodTypeAPI.kt (100%) rename apiTester/src/{commonMain => androidMain}/kotlin/com/revenuecat/purchases/kmp/apitester/PurchasesAreCompletedByAPI.kt (100%) rename apiTester/src/{commonMain => androidMain}/kotlin/com/revenuecat/purchases/kmp/apitester/StoreAPI.kt (100%) delete mode 100644 apiTester/src/commonMain/kotlin/com/revenuecat/purchases/kmp/apitester/DiscountPaymentModeAPI.kt delete mode 100644 apiTester/src/commonMain/kotlin/com/revenuecat/purchases/kmp/apitester/DiscountTypeAPI.kt delete mode 100644 apiTester/src/commonMain/kotlin/com/revenuecat/purchases/kmp/apitester/LogLevelAPI.kt create mode 100644 apiTester/src/iosMain/kotlin/com/revenuecat/purchases/kmp/apitester/CacheFetchPolicyAPI.kt create mode 100644 apiTester/src/iosMain/kotlin/com/revenuecat/purchases/kmp/apitester/OwnershipTypeAPI.kt create mode 100644 apiTester/src/iosMain/kotlin/com/revenuecat/purchases/kmp/apitester/PeriodTypeAPI.kt create mode 100644 apiTester/src/iosMain/kotlin/com/revenuecat/purchases/kmp/apitester/PurchasesAreCompletedByAPI.kt create mode 100644 apiTester/src/iosMain/kotlin/com/revenuecat/purchases/kmp/apitester/StoreAPI.kt create mode 100644 core/src/androidMain/kotlin/com/revenuecat/purchases/kmp/models/DiscountPaymentMode.android.kt create mode 100644 core/src/androidMain/kotlin/com/revenuecat/purchases/kmp/models/DiscountType.android.kt diff --git a/apiTester/src/commonMain/kotlin/com/revenuecat/purchases/kmp/apitester/CacheFetchPolicyAPI.kt b/apiTester/src/androidMain/kotlin/com/revenuecat/purchases/kmp/apitester/CacheFetchPolicyAPI.kt similarity index 100% rename from apiTester/src/commonMain/kotlin/com/revenuecat/purchases/kmp/apitester/CacheFetchPolicyAPI.kt rename to apiTester/src/androidMain/kotlin/com/revenuecat/purchases/kmp/apitester/CacheFetchPolicyAPI.kt diff --git a/apiTester/src/commonMain/kotlin/com/revenuecat/purchases/kmp/apitester/OwnershipTypeAPI.kt b/apiTester/src/androidMain/kotlin/com/revenuecat/purchases/kmp/apitester/OwnershipTypeAPI.kt similarity index 100% rename from apiTester/src/commonMain/kotlin/com/revenuecat/purchases/kmp/apitester/OwnershipTypeAPI.kt rename to apiTester/src/androidMain/kotlin/com/revenuecat/purchases/kmp/apitester/OwnershipTypeAPI.kt diff --git a/apiTester/src/commonMain/kotlin/com/revenuecat/purchases/kmp/apitester/PeriodTypeAPI.kt b/apiTester/src/androidMain/kotlin/com/revenuecat/purchases/kmp/apitester/PeriodTypeAPI.kt similarity index 100% rename from apiTester/src/commonMain/kotlin/com/revenuecat/purchases/kmp/apitester/PeriodTypeAPI.kt rename to apiTester/src/androidMain/kotlin/com/revenuecat/purchases/kmp/apitester/PeriodTypeAPI.kt diff --git a/apiTester/src/commonMain/kotlin/com/revenuecat/purchases/kmp/apitester/PurchasesAreCompletedByAPI.kt b/apiTester/src/androidMain/kotlin/com/revenuecat/purchases/kmp/apitester/PurchasesAreCompletedByAPI.kt similarity index 100% rename from apiTester/src/commonMain/kotlin/com/revenuecat/purchases/kmp/apitester/PurchasesAreCompletedByAPI.kt rename to apiTester/src/androidMain/kotlin/com/revenuecat/purchases/kmp/apitester/PurchasesAreCompletedByAPI.kt diff --git a/apiTester/src/commonMain/kotlin/com/revenuecat/purchases/kmp/apitester/StoreAPI.kt b/apiTester/src/androidMain/kotlin/com/revenuecat/purchases/kmp/apitester/StoreAPI.kt similarity index 100% rename from apiTester/src/commonMain/kotlin/com/revenuecat/purchases/kmp/apitester/StoreAPI.kt rename to apiTester/src/androidMain/kotlin/com/revenuecat/purchases/kmp/apitester/StoreAPI.kt diff --git a/apiTester/src/commonMain/kotlin/com/revenuecat/purchases/kmp/apitester/DiscountPaymentModeAPI.kt b/apiTester/src/commonMain/kotlin/com/revenuecat/purchases/kmp/apitester/DiscountPaymentModeAPI.kt deleted file mode 100644 index df92e2b2..00000000 --- a/apiTester/src/commonMain/kotlin/com/revenuecat/purchases/kmp/apitester/DiscountPaymentModeAPI.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.revenuecat.purchases.kmp.apitester - -import com.revenuecat.purchases.kmp.models.DiscountPaymentMode - -@Suppress("unused") -private class DiscountPaymentModeAPI { - - fun check(mode: DiscountPaymentMode) { - when (mode) { - DiscountPaymentMode.FREE_TRIAL, - DiscountPaymentMode.PAY_AS_YOU_GO, - DiscountPaymentMode.PAY_UP_FRONT, - -> { - } - }.exhaustive - } -} diff --git a/apiTester/src/commonMain/kotlin/com/revenuecat/purchases/kmp/apitester/DiscountTypeAPI.kt b/apiTester/src/commonMain/kotlin/com/revenuecat/purchases/kmp/apitester/DiscountTypeAPI.kt deleted file mode 100644 index bd1721f0..00000000 --- a/apiTester/src/commonMain/kotlin/com/revenuecat/purchases/kmp/apitester/DiscountTypeAPI.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.revenuecat.purchases.kmp.apitester - -import com.revenuecat.purchases.kmp.models.DiscountType - -@Suppress("unused") -private class DiscountTypeAPI { - - fun check(type: DiscountType) { - when (type) { - DiscountType.INTRODUCTORY, - DiscountType.PROMOTIONAL, - -> { - } - }.exhaustive - } -} diff --git a/apiTester/src/commonMain/kotlin/com/revenuecat/purchases/kmp/apitester/EntitlementInfoAPI.kt b/apiTester/src/commonMain/kotlin/com/revenuecat/purchases/kmp/apitester/EntitlementInfoAPI.kt index 556f91e4..1b32b12a 100644 --- a/apiTester/src/commonMain/kotlin/com/revenuecat/purchases/kmp/apitester/EntitlementInfoAPI.kt +++ b/apiTester/src/commonMain/kotlin/com/revenuecat/purchases/kmp/apitester/EntitlementInfoAPI.kt @@ -1,6 +1,9 @@ package com.revenuecat.purchases.kmp.apitester import com.revenuecat.purchases.kmp.EntitlementInfo +import com.revenuecat.purchases.kmp.OwnershipType +import com.revenuecat.purchases.kmp.PeriodType +import com.revenuecat.purchases.kmp.Store import com.revenuecat.purchases.kmp.VerificationResult import com.revenuecat.purchases.kmp.billingIssueDetectedAtMillis import com.revenuecat.purchases.kmp.datetime.billingIssueDetectedAtInstant @@ -14,8 +17,11 @@ import com.revenuecat.purchases.kmp.isActive import com.revenuecat.purchases.kmp.isSandbox import com.revenuecat.purchases.kmp.latestPurchaseDateMillis import com.revenuecat.purchases.kmp.originalPurchaseDateMillis +import com.revenuecat.purchases.kmp.ownershipType +import com.revenuecat.purchases.kmp.periodType import com.revenuecat.purchases.kmp.productIdentifier import com.revenuecat.purchases.kmp.productPlanIdentifier +import com.revenuecat.purchases.kmp.store import com.revenuecat.purchases.kmp.unsubscribeDetectedAtMillis import com.revenuecat.purchases.kmp.verification import com.revenuecat.purchases.kmp.willRenew @@ -28,16 +34,14 @@ private class EntitlementInfoAPI { val identifier: String = identifier val active: Boolean = isActive val willRenew: Boolean = willRenew - // FIXME re-enable in SDK-3530 - // val periodType: PeriodType = periodType + val periodType: PeriodType = periodType val latestPurchaseDate: Long? = latestPurchaseDateMillis val latestPurchaseInstant: Instant? = latestPurchaseInstant val originalPurchaseDate: Long? = originalPurchaseDateMillis val originalPurchaseInstant: Instant? = originalPurchaseInstant val expirationDate: Long? = expirationDateMillis val expirationInstant: Instant? = expirationInstant - // FIXME re-enable in SDK-3530 - // val store: Store = store + val store: Store = store val productIdentifier: String = productIdentifier val productPlanIdentifier: String? = productPlanIdentifier val sandbox: Boolean = isSandbox @@ -45,8 +49,7 @@ private class EntitlementInfoAPI { val unsubscribeDetectedAtInstant: Instant? = unsubscribeDetectedAtInstant val billingIssueDetectedAt: Long? = billingIssueDetectedAtMillis val billingIssueDetectedAtInstant: Instant? = billingIssueDetectedAtInstant - // FIXME re-enable in SDK-3530 - // val ownershipType: OwnershipType = ownershipType + val ownershipType: OwnershipType = ownershipType val verification: VerificationResult = verification } } diff --git a/apiTester/src/commonMain/kotlin/com/revenuecat/purchases/kmp/apitester/LogLevelAPI.kt b/apiTester/src/commonMain/kotlin/com/revenuecat/purchases/kmp/apitester/LogLevelAPI.kt deleted file mode 100644 index 84e1ff0b..00000000 --- a/apiTester/src/commonMain/kotlin/com/revenuecat/purchases/kmp/apitester/LogLevelAPI.kt +++ /dev/null @@ -1,18 +0,0 @@ -package com.revenuecat.purchases.kmp.apitester - -import com.revenuecat.purchases.kmp.LogLevel - -@Suppress("unused") -private class LogLevelAPI { - fun check(logLevel: LogLevel) { - when (logLevel) { - LogLevel.VERBOSE, - LogLevel.DEBUG, - LogLevel.INFO, - LogLevel.WARN, - LogLevel.ERROR, - -> { - } - }.exhaustive - } -} diff --git a/apiTester/src/iosMain/kotlin/com/revenuecat/purchases/kmp/apitester/CacheFetchPolicyAPI.kt b/apiTester/src/iosMain/kotlin/com/revenuecat/purchases/kmp/apitester/CacheFetchPolicyAPI.kt new file mode 100644 index 00000000..5bb30eb5 --- /dev/null +++ b/apiTester/src/iosMain/kotlin/com/revenuecat/purchases/kmp/apitester/CacheFetchPolicyAPI.kt @@ -0,0 +1,18 @@ +package com.revenuecat.purchases.kmp.apitester + +import com.revenuecat.purchases.kmp.CacheFetchPolicy + +@Suppress("unused") +private class CacheFetchPolicyAPI { + + fun check(fetchPolicy: CacheFetchPolicy) { + when (fetchPolicy) { + CacheFetchPolicy.CACHE_ONLY, + CacheFetchPolicy.FETCH_CURRENT, + CacheFetchPolicy.CACHED_OR_FETCHED, + CacheFetchPolicy.NOT_STALE_CACHED_OR_CURRENT, + -> { + } + }.exhaustive + } +} diff --git a/apiTester/src/iosMain/kotlin/com/revenuecat/purchases/kmp/apitester/OwnershipTypeAPI.kt b/apiTester/src/iosMain/kotlin/com/revenuecat/purchases/kmp/apitester/OwnershipTypeAPI.kt new file mode 100644 index 00000000..a0ed5c99 --- /dev/null +++ b/apiTester/src/iosMain/kotlin/com/revenuecat/purchases/kmp/apitester/OwnershipTypeAPI.kt @@ -0,0 +1,16 @@ +package com.revenuecat.purchases.kmp.apitester + +import com.revenuecat.purchases.kmp.OwnershipType + +@Suppress("unused") +private class OwnershipTypeAPI { + fun check(type: OwnershipType) { + when (type) { + OwnershipType.PURCHASED, + OwnershipType.FAMILY_SHARED, + OwnershipType.UNKNOWN, + -> { + } + }.exhaustive + } +} diff --git a/apiTester/src/iosMain/kotlin/com/revenuecat/purchases/kmp/apitester/PeriodTypeAPI.kt b/apiTester/src/iosMain/kotlin/com/revenuecat/purchases/kmp/apitester/PeriodTypeAPI.kt new file mode 100644 index 00000000..79f26eea --- /dev/null +++ b/apiTester/src/iosMain/kotlin/com/revenuecat/purchases/kmp/apitester/PeriodTypeAPI.kt @@ -0,0 +1,16 @@ +package com.revenuecat.purchases.kmp.apitester + +import com.revenuecat.purchases.kmp.PeriodType + +@Suppress("unused") +private class PeriodTypeAPI { + fun check(type: PeriodType) { + when (type) { + PeriodType.NORMAL, + PeriodType.INTRO, + PeriodType.TRIAL, + -> { + } + }.exhaustive + } +} diff --git a/apiTester/src/iosMain/kotlin/com/revenuecat/purchases/kmp/apitester/PurchasesAreCompletedByAPI.kt b/apiTester/src/iosMain/kotlin/com/revenuecat/purchases/kmp/apitester/PurchasesAreCompletedByAPI.kt new file mode 100644 index 00000000..0122e1d6 --- /dev/null +++ b/apiTester/src/iosMain/kotlin/com/revenuecat/purchases/kmp/apitester/PurchasesAreCompletedByAPI.kt @@ -0,0 +1,15 @@ +package com.revenuecat.purchases.kmp.apitester + +import com.revenuecat.purchases.kmp.PurchasesAreCompletedBy + +@Suppress("unused") +private class PurchasesAreCompletedByAPI { + fun check(mode: PurchasesAreCompletedBy) { + when (mode) { + PurchasesAreCompletedBy.REVENUECAT, + PurchasesAreCompletedBy.MY_APP, + -> { + } + }.exhaustive + } +} diff --git a/apiTester/src/iosMain/kotlin/com/revenuecat/purchases/kmp/apitester/StoreAPI.kt b/apiTester/src/iosMain/kotlin/com/revenuecat/purchases/kmp/apitester/StoreAPI.kt new file mode 100644 index 00000000..5d14df22 --- /dev/null +++ b/apiTester/src/iosMain/kotlin/com/revenuecat/purchases/kmp/apitester/StoreAPI.kt @@ -0,0 +1,22 @@ +package com.revenuecat.purchases.kmp.apitester + +import com.revenuecat.purchases.kmp.Store + +@Suppress("unused") +private class StoreAPI { + fun check(store: Store) { + when (store) { + Store.APP_STORE, + Store.MAC_APP_STORE, + Store.PLAY_STORE, + Store.STRIPE, + Store.PROMOTIONAL, + Store.UNKNOWN_STORE, + Store.AMAZON, + Store.RC_BILLING, + Store.EXTERNAL, + -> { + } + }.exhaustive + } +} diff --git a/core/api/core.api b/core/api/core.api index ad7f587e..4be36fd9 100644 --- a/core/api/core.api +++ b/core/api/core.api @@ -1,18 +1,3 @@ -public final class com/revenuecat/purchases/kmp/CacheFetchPolicy : java/lang/Enum { - public static final field CACHED_OR_FETCHED Lcom/revenuecat/purchases/kmp/CacheFetchPolicy; - public static final field CACHE_ONLY Lcom/revenuecat/purchases/kmp/CacheFetchPolicy; - public static final field Companion Lcom/revenuecat/purchases/kmp/CacheFetchPolicy$Companion; - public static final field FETCH_CURRENT Lcom/revenuecat/purchases/kmp/CacheFetchPolicy; - public static final field NOT_STALE_CACHED_OR_CURRENT Lcom/revenuecat/purchases/kmp/CacheFetchPolicy; - public static fun getEntries ()Lkotlin/enums/EnumEntries; - public static fun valueOf (Ljava/lang/String;)Lcom/revenuecat/purchases/kmp/CacheFetchPolicy; - public static fun values ()[Lcom/revenuecat/purchases/kmp/CacheFetchPolicy; -} - -public final class com/revenuecat/purchases/kmp/CacheFetchPolicy$Companion { - public final fun default ()Lcom/revenuecat/purchases/kmp/CacheFetchPolicy; -} - public final class com/revenuecat/purchases/kmp/CustomerInfo_androidKt { public static final fun getActiveSubscriptions (Lcom/revenuecat/purchases/CustomerInfo;)Ljava/util/Set; public static final fun getAllExpirationDateMillis (Lcom/revenuecat/purchases/CustomerInfo;)Ljava/util/Map; @@ -48,11 +33,11 @@ public final class com/revenuecat/purchases/kmp/EntitlementInfo_androidKt { public static final fun getIdentifier (Lcom/revenuecat/purchases/EntitlementInfo;)Ljava/lang/String; public static final fun getLatestPurchaseDateMillis (Lcom/revenuecat/purchases/EntitlementInfo;)Ljava/lang/Long; public static final fun getOriginalPurchaseDateMillis (Lcom/revenuecat/purchases/EntitlementInfo;)Ljava/lang/Long; - public static final fun getOwnershipType (Lcom/revenuecat/purchases/EntitlementInfo;)Lcom/revenuecat/purchases/kmp/OwnershipType; - public static final fun getPeriodType (Lcom/revenuecat/purchases/EntitlementInfo;)Lcom/revenuecat/purchases/kmp/PeriodType; + public static final fun getOwnershipType (Lcom/revenuecat/purchases/EntitlementInfo;)Lcom/revenuecat/purchases/OwnershipType; + public static final fun getPeriodType (Lcom/revenuecat/purchases/EntitlementInfo;)Lcom/revenuecat/purchases/PeriodType; public static final fun getProductIdentifier (Lcom/revenuecat/purchases/EntitlementInfo;)Ljava/lang/String; public static final fun getProductPlanIdentifier (Lcom/revenuecat/purchases/EntitlementInfo;)Ljava/lang/String; - public static final fun getStore (Lcom/revenuecat/purchases/EntitlementInfo;)Lcom/revenuecat/purchases/kmp/Store; + public static final fun getStore (Lcom/revenuecat/purchases/EntitlementInfo;)Lcom/revenuecat/purchases/Store; public static final fun getUnsubscribeDetectedAtMillis (Lcom/revenuecat/purchases/EntitlementInfo;)Ljava/lang/Long; public static final fun getVerification (Lcom/revenuecat/purchases/EntitlementInfo;)Lcom/revenuecat/purchases/VerificationResult; public static final fun getWillRenew (Lcom/revenuecat/purchases/EntitlementInfo;)Z @@ -82,17 +67,6 @@ public final class com/revenuecat/purchases/kmp/Errors_androidKt { public static final fun toPurchasesError (Lcom/revenuecat/purchases/PurchasesError;)Lcom/revenuecat/purchases/kmp/PurchasesError; } -public final class com/revenuecat/purchases/kmp/LogLevel : java/lang/Enum { - public static final field DEBUG Lcom/revenuecat/purchases/kmp/LogLevel; - public static final field ERROR Lcom/revenuecat/purchases/kmp/LogLevel; - public static final field INFO Lcom/revenuecat/purchases/kmp/LogLevel; - public static final field VERBOSE Lcom/revenuecat/purchases/kmp/LogLevel; - public static final field WARN Lcom/revenuecat/purchases/kmp/LogLevel; - public static fun getEntries ()Lkotlin/enums/EnumEntries; - public static fun valueOf (Ljava/lang/String;)Lcom/revenuecat/purchases/kmp/LogLevel; - public static fun values ()[Lcom/revenuecat/purchases/kmp/LogLevel; -} - public final class com/revenuecat/purchases/kmp/OfferingKt { public static final fun get (Lcom/revenuecat/purchases/Offering;Ljava/lang/String;)Lcom/revenuecat/purchases/Package; public static final fun getMetadataString (Lcom/revenuecat/purchases/Offering;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; @@ -123,15 +97,6 @@ public final class com/revenuecat/purchases/kmp/Offerings_androidKt { public static final fun getCurrent (Lcom/revenuecat/purchases/Offerings;)Lcom/revenuecat/purchases/Offering; } -public final class com/revenuecat/purchases/kmp/OwnershipType : java/lang/Enum { - public static final field FAMILY_SHARED Lcom/revenuecat/purchases/kmp/OwnershipType; - public static final field PURCHASED Lcom/revenuecat/purchases/kmp/OwnershipType; - public static final field UNKNOWN Lcom/revenuecat/purchases/kmp/OwnershipType; - public static fun getEntries ()Lkotlin/enums/EnumEntries; - public static fun valueOf (Ljava/lang/String;)Lcom/revenuecat/purchases/kmp/OwnershipType; - public static fun values ()[Lcom/revenuecat/purchases/kmp/OwnershipType; -} - public final class com/revenuecat/purchases/kmp/PackageKt { public static final fun getIdentifier (Lcom/revenuecat/purchases/PackageType;)Ljava/lang/String; } @@ -143,15 +108,6 @@ public final class com/revenuecat/purchases/kmp/Package_androidKt { public static final fun getStoreProduct (Lcom/revenuecat/purchases/Package;)Lcom/revenuecat/purchases/kmp/models/StoreProduct; } -public final class com/revenuecat/purchases/kmp/PeriodType : java/lang/Enum { - public static final field INTRO Lcom/revenuecat/purchases/kmp/PeriodType; - public static final field NORMAL Lcom/revenuecat/purchases/kmp/PeriodType; - public static final field TRIAL Lcom/revenuecat/purchases/kmp/PeriodType; - public static fun getEntries ()Lkotlin/enums/EnumEntries; - public static fun valueOf (Ljava/lang/String;)Lcom/revenuecat/purchases/kmp/PeriodType; - public static fun values ()[Lcom/revenuecat/purchases/kmp/PeriodType; -} - public final class com/revenuecat/purchases/kmp/PresentedOfferingContext_androidKt { public static final fun getOfferingIdentifier (Lcom/revenuecat/purchases/PresentedOfferingContext;)Ljava/lang/String; public static final fun getPlacementIdentifier (Lcom/revenuecat/purchases/PresentedOfferingContext;)Ljava/lang/String; @@ -168,20 +124,20 @@ public final class com/revenuecat/purchases/kmp/Purchases { public final fun collectDeviceIdentifiers ()V public static final fun configure (Lcom/revenuecat/purchases/kmp/PurchasesConfiguration;)Lcom/revenuecat/purchases/kmp/Purchases; public final fun getAppUserID ()Ljava/lang/String; - public final fun getCustomerInfo (Lcom/revenuecat/purchases/kmp/CacheFetchPolicy;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)V - public static synthetic fun getCustomerInfo$default (Lcom/revenuecat/purchases/kmp/Purchases;Lcom/revenuecat/purchases/kmp/CacheFetchPolicy;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V + public final fun getCustomerInfo (Lcom/revenuecat/purchases/CacheFetchPolicy;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)V + public static synthetic fun getCustomerInfo$default (Lcom/revenuecat/purchases/kmp/Purchases;Lcom/revenuecat/purchases/CacheFetchPolicy;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V public final fun getDelegate ()Lcom/revenuecat/purchases/kmp/PurchasesDelegate; public static final fun getForceUniversalAppStore ()Z public static final fun getLogHandler ()Lcom/revenuecat/purchases/LogHandler; - public static final fun getLogLevel ()Lcom/revenuecat/purchases/kmp/LogLevel; + public static final fun getLogLevel ()Lcom/revenuecat/purchases/LogLevel; public final fun getOfferings (Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)V public final fun getProducts (Ljava/util/List;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)V public final fun getPromotionalOffer (Lcom/revenuecat/purchases/kmp/models/StoreProductDiscount;Lcom/revenuecat/purchases/kmp/models/StoreProduct;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)V public static final fun getProxyURL ()Ljava/lang/String; - public final fun getPurchasesAreCompletedBy ()Lcom/revenuecat/purchases/kmp/PurchasesAreCompletedBy; + public final fun getPurchasesAreCompletedBy ()Lcom/revenuecat/purchases/PurchasesAreCompletedBy; public static final fun getSharedInstance ()Lcom/revenuecat/purchases/kmp/Purchases; public static final fun getSimulatesAskToBuyInSandbox ()Z - public final fun getStore ()Lcom/revenuecat/purchases/kmp/Store; + public final fun getStore ()Lcom/revenuecat/purchases/Store; public final fun invalidateCustomerInfoCache ()V public final fun isAnonymous ()Z public static final fun isConfigured ()Z @@ -213,7 +169,7 @@ public final class com/revenuecat/purchases/kmp/Purchases { public static final fun setForceUniversalAppStore (Z)V public final fun setKeyword (Ljava/lang/String;)V public static final fun setLogHandler (Lcom/revenuecat/purchases/LogHandler;)V - public static final fun setLogLevel (Lcom/revenuecat/purchases/kmp/LogLevel;)V + public static final fun setLogLevel (Lcom/revenuecat/purchases/LogLevel;)V public final fun setMediaSource (Ljava/lang/String;)V public final fun setMixpanelDistinctID (Ljava/lang/String;)V public final fun setMparticleID (Ljava/lang/String;)V @@ -221,7 +177,7 @@ public final class com/revenuecat/purchases/kmp/Purchases { public final fun setOnesignalUserID (Ljava/lang/String;)V public final fun setPhoneNumber (Ljava/lang/String;)V public static final fun setProxyURL (Ljava/lang/String;)V - public final fun setPurchasesAreCompletedBy (Lcom/revenuecat/purchases/kmp/PurchasesAreCompletedBy;)V + public final fun setPurchasesAreCompletedBy (Lcom/revenuecat/purchases/PurchasesAreCompletedBy;)V public final fun setPushToken (Ljava/lang/String;)V public static final fun setSimulatesAskToBuyInSandbox (Z)V public final fun showInAppMessagesIfNeeded (Ljava/util/List;)V @@ -237,35 +193,27 @@ public final class com/revenuecat/purchases/kmp/Purchases$Companion { public final fun configure (Lcom/revenuecat/purchases/kmp/PurchasesConfiguration;)Lcom/revenuecat/purchases/kmp/Purchases; public final fun getForceUniversalAppStore ()Z public final fun getLogHandler ()Lcom/revenuecat/purchases/LogHandler; - public final fun getLogLevel ()Lcom/revenuecat/purchases/kmp/LogLevel; + public final fun getLogLevel ()Lcom/revenuecat/purchases/LogLevel; public final fun getProxyURL ()Ljava/lang/String; public final fun getSharedInstance ()Lcom/revenuecat/purchases/kmp/Purchases; public final fun getSimulatesAskToBuyInSandbox ()Z public final fun isConfigured ()Z public final fun setForceUniversalAppStore (Z)V public final fun setLogHandler (Lcom/revenuecat/purchases/LogHandler;)V - public final fun setLogLevel (Lcom/revenuecat/purchases/kmp/LogLevel;)V + public final fun setLogLevel (Lcom/revenuecat/purchases/LogLevel;)V public final fun setProxyURL (Ljava/lang/String;)V public final fun setSimulatesAskToBuyInSandbox (Z)V } -public final class com/revenuecat/purchases/kmp/PurchasesAreCompletedBy : java/lang/Enum { - public static final field MY_APP Lcom/revenuecat/purchases/kmp/PurchasesAreCompletedBy; - public static final field REVENUECAT Lcom/revenuecat/purchases/kmp/PurchasesAreCompletedBy; - public static fun getEntries ()Lkotlin/enums/EnumEntries; - public static fun valueOf (Ljava/lang/String;)Lcom/revenuecat/purchases/kmp/PurchasesAreCompletedBy; - public static fun values ()[Lcom/revenuecat/purchases/kmp/PurchasesAreCompletedBy; -} - public final class com/revenuecat/purchases/kmp/PurchasesConfiguration { - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lcom/revenuecat/purchases/kmp/PurchasesAreCompletedBy;Ljava/lang/String;ZLcom/revenuecat/purchases/kmp/Store;ZLcom/revenuecat/purchases/kmp/DangerousSettings;Lcom/revenuecat/purchases/kmp/EntitlementVerificationMode;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lcom/revenuecat/purchases/PurchasesAreCompletedBy;Ljava/lang/String;ZLcom/revenuecat/purchases/Store;ZLcom/revenuecat/purchases/kmp/DangerousSettings;Lcom/revenuecat/purchases/kmp/EntitlementVerificationMode;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun getApiKey ()Ljava/lang/String; public final fun getAppUserId ()Ljava/lang/String; public final fun getDangerousSettings ()Lcom/revenuecat/purchases/kmp/DangerousSettings; public final fun getDiagnosticsEnabled ()Z - public final fun getPurchasesAreCompletedBy ()Lcom/revenuecat/purchases/kmp/PurchasesAreCompletedBy; + public final fun getPurchasesAreCompletedBy ()Lcom/revenuecat/purchases/PurchasesAreCompletedBy; public final fun getShowInAppMessagesAutomatically ()Z - public final fun getStore ()Lcom/revenuecat/purchases/kmp/Store; + public final fun getStore ()Lcom/revenuecat/purchases/Store; public final fun getUserDefaultsSuiteName ()Ljava/lang/String; public final fun getVerificationMode ()Lcom/revenuecat/purchases/kmp/EntitlementVerificationMode; public fun toString ()Ljava/lang/String; @@ -282,23 +230,23 @@ public final class com/revenuecat/purchases/kmp/PurchasesConfiguration$Builder { public final fun getAppUserId ()Ljava/lang/String; public final fun getDangerousSettings ()Lcom/revenuecat/purchases/kmp/DangerousSettings; public final fun getDiagnosticsEnabled ()Z - public final fun getPurchasesAreCompletedBy ()Lcom/revenuecat/purchases/kmp/PurchasesAreCompletedBy; + public final fun getPurchasesAreCompletedBy ()Lcom/revenuecat/purchases/PurchasesAreCompletedBy; public final fun getShowInAppMessagesAutomatically ()Z - public final fun getStore ()Lcom/revenuecat/purchases/kmp/Store; + public final fun getStore ()Lcom/revenuecat/purchases/Store; public final fun getUserDefaultsSuiteName ()Ljava/lang/String; public final fun getVerificationMode ()Lcom/revenuecat/purchases/kmp/EntitlementVerificationMode; - public final fun purchasesAreCompletedBy (Lcom/revenuecat/purchases/kmp/PurchasesAreCompletedBy;)Lcom/revenuecat/purchases/kmp/PurchasesConfiguration$Builder; + public final fun purchasesAreCompletedBy (Lcom/revenuecat/purchases/PurchasesAreCompletedBy;)Lcom/revenuecat/purchases/kmp/PurchasesConfiguration$Builder; public final synthetic fun setApiKey (Ljava/lang/String;)V public final synthetic fun setAppUserId (Ljava/lang/String;)V public final synthetic fun setDangerousSettings (Lcom/revenuecat/purchases/kmp/DangerousSettings;)V public final synthetic fun setDiagnosticsEnabled (Z)V - public final synthetic fun setPurchasesAreCompletedBy (Lcom/revenuecat/purchases/kmp/PurchasesAreCompletedBy;)V + public final synthetic fun setPurchasesAreCompletedBy (Lcom/revenuecat/purchases/PurchasesAreCompletedBy;)V public final synthetic fun setShowInAppMessagesAutomatically (Z)V - public final synthetic fun setStore (Lcom/revenuecat/purchases/kmp/Store;)V + public final synthetic fun setStore (Lcom/revenuecat/purchases/Store;)V public final synthetic fun setUserDefaultsSuiteName (Ljava/lang/String;)V public final synthetic fun setVerificationMode (Lcom/revenuecat/purchases/kmp/EntitlementVerificationMode;)V public final fun showInAppMessagesAutomatically (Z)Lcom/revenuecat/purchases/kmp/PurchasesConfiguration$Builder; - public final fun store (Lcom/revenuecat/purchases/kmp/Store;)Lcom/revenuecat/purchases/kmp/PurchasesConfiguration$Builder; + public final fun store (Lcom/revenuecat/purchases/Store;)Lcom/revenuecat/purchases/kmp/PurchasesConfiguration$Builder; public final fun userDefaultsSuiteName (Ljava/lang/String;)Lcom/revenuecat/purchases/kmp/PurchasesConfiguration$Builder; public final fun verificationMode (Lcom/revenuecat/purchases/kmp/EntitlementVerificationMode;)Lcom/revenuecat/purchases/kmp/PurchasesConfiguration$Builder; } @@ -386,21 +334,6 @@ public final class com/revenuecat/purchases/kmp/PurchasesTransactionException : public final fun getUserCancelled ()Z } -public final class com/revenuecat/purchases/kmp/Store : java/lang/Enum { - public static final field AMAZON Lcom/revenuecat/purchases/kmp/Store; - public static final field APP_STORE Lcom/revenuecat/purchases/kmp/Store; - public static final field EXTERNAL Lcom/revenuecat/purchases/kmp/Store; - public static final field MAC_APP_STORE Lcom/revenuecat/purchases/kmp/Store; - public static final field PLAY_STORE Lcom/revenuecat/purchases/kmp/Store; - public static final field PROMOTIONAL Lcom/revenuecat/purchases/kmp/Store; - public static final field RC_BILLING Lcom/revenuecat/purchases/kmp/Store; - public static final field STRIPE Lcom/revenuecat/purchases/kmp/Store; - public static final field UNKNOWN_STORE Lcom/revenuecat/purchases/kmp/Store; - public static fun getEntries ()Lkotlin/enums/EnumEntries; - public static fun valueOf (Ljava/lang/String;)Lcom/revenuecat/purchases/kmp/Store; - public static fun values ()[Lcom/revenuecat/purchases/kmp/Store; -} - public final class com/revenuecat/purchases/kmp/UpdatedCustomerInfoDelegate : com/revenuecat/purchases/kmp/PurchasesDelegate { public fun (Lkotlin/jvm/functions/Function1;)V public fun onCustomerInfoUpdated (Lcom/revenuecat/purchases/CustomerInfo;)V @@ -429,8 +362,8 @@ public final class com/revenuecat/purchases/kmp/i18n/Locale_androidKt { } public final class com/revenuecat/purchases/kmp/ktx/CoroutinesKt { - public static final fun awaitCustomerInfo (Lcom/revenuecat/purchases/kmp/Purchases;Lcom/revenuecat/purchases/kmp/CacheFetchPolicy;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun awaitCustomerInfo$default (Lcom/revenuecat/purchases/kmp/Purchases;Lcom/revenuecat/purchases/kmp/CacheFetchPolicy;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun awaitCustomerInfo (Lcom/revenuecat/purchases/kmp/Purchases;Lcom/revenuecat/purchases/CacheFetchPolicy;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun awaitCustomerInfo$default (Lcom/revenuecat/purchases/kmp/Purchases;Lcom/revenuecat/purchases/CacheFetchPolicy;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun awaitGetProducts (Lcom/revenuecat/purchases/kmp/Purchases;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun awaitLogIn (Lcom/revenuecat/purchases/kmp/Purchases;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun awaitLogOut (Lcom/revenuecat/purchases/kmp/Purchases;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; diff --git a/core/src/androidMain/kotlin/com/revenuecat/purchases/kmp/CacheFetchPolicy.android.kt b/core/src/androidMain/kotlin/com/revenuecat/purchases/kmp/CacheFetchPolicy.android.kt index a3172aec..606c2382 100644 --- a/core/src/androidMain/kotlin/com/revenuecat/purchases/kmp/CacheFetchPolicy.android.kt +++ b/core/src/androidMain/kotlin/com/revenuecat/purchases/kmp/CacheFetchPolicy.android.kt @@ -1,11 +1,5 @@ package com.revenuecat.purchases.kmp -import com.revenuecat.purchases.CacheFetchPolicy as AndroidCacheFetchPolicy +import com.revenuecat.purchases.CacheFetchPolicy as RcCacheFetchPolicy -internal fun CacheFetchPolicy.toAndroidCacheFetchPolicy(): AndroidCacheFetchPolicy = - when (this) { - CacheFetchPolicy.CACHE_ONLY -> AndroidCacheFetchPolicy.CACHE_ONLY - CacheFetchPolicy.FETCH_CURRENT -> AndroidCacheFetchPolicy.FETCH_CURRENT - CacheFetchPolicy.NOT_STALE_CACHED_OR_CURRENT -> AndroidCacheFetchPolicy.NOT_STALE_CACHED_OR_CURRENT - CacheFetchPolicy.CACHED_OR_FETCHED -> AndroidCacheFetchPolicy.CACHED_OR_FETCHED - } +public actual typealias CacheFetchPolicy = RcCacheFetchPolicy diff --git a/core/src/androidMain/kotlin/com/revenuecat/purchases/kmp/EntitlementInfo.android.kt b/core/src/androidMain/kotlin/com/revenuecat/purchases/kmp/EntitlementInfo.android.kt index cac1ed9f..52edd58f 100644 --- a/core/src/androidMain/kotlin/com/revenuecat/purchases/kmp/EntitlementInfo.android.kt +++ b/core/src/androidMain/kotlin/com/revenuecat/purchases/kmp/EntitlementInfo.android.kt @@ -3,9 +3,9 @@ package com.revenuecat.purchases.kmp import com.revenuecat.purchases.EntitlementInfo as RcEntitlementInfo -import com.revenuecat.purchases.OwnershipType as AndroidOwnershipType -import com.revenuecat.purchases.PeriodType as AndroidPeriodType -import com.revenuecat.purchases.Store as AndroidStore +import com.revenuecat.purchases.OwnershipType as RcOwnershipType +import com.revenuecat.purchases.PeriodType as RcPeriodType +import com.revenuecat.purchases.Store as RcStore public actual typealias EntitlementInfo = RcEntitlementInfo @@ -16,7 +16,7 @@ public actual val EntitlementInfo.isActive: Boolean public actual val EntitlementInfo.willRenew: Boolean get() = willRenew public actual val EntitlementInfo.periodType: PeriodType - get() = periodType.toPeriodType() + get() = periodType public actual val EntitlementInfo.latestPurchaseDateMillis: Long? get() = latestPurchaseDate.time public actual val EntitlementInfo.originalPurchaseDateMillis: Long? @@ -24,7 +24,7 @@ public actual val EntitlementInfo.originalPurchaseDateMillis: Long? public actual val EntitlementInfo.expirationDateMillis: Long? get() = expirationDate?.time public actual val EntitlementInfo.store: Store - get() = store.toStore() + get() = store public actual val EntitlementInfo.productIdentifier: String get() = productIdentifier public actual val EntitlementInfo.productPlanIdentifier: String? @@ -36,47 +36,10 @@ public actual val EntitlementInfo.unsubscribeDetectedAtMillis: Long? public actual val EntitlementInfo.billingIssueDetectedAtMillis: Long? get() = billingIssueDetectedAt?.time public actual val EntitlementInfo.ownershipType: OwnershipType - get() = ownershipType.toOwnershipType() + get() = ownershipType public actual val EntitlementInfo.verification: VerificationResult get() = verification -internal fun AndroidStore.toStore(): Store = - when (this) { - AndroidStore.APP_STORE -> Store.APP_STORE - AndroidStore.MAC_APP_STORE -> Store.MAC_APP_STORE - AndroidStore.PLAY_STORE -> Store.PLAY_STORE - AndroidStore.STRIPE -> Store.STRIPE - AndroidStore.PROMOTIONAL -> Store.PROMOTIONAL - AndroidStore.UNKNOWN_STORE -> Store.UNKNOWN_STORE - AndroidStore.AMAZON -> Store.AMAZON - AndroidStore.RC_BILLING -> Store.RC_BILLING - AndroidStore.EXTERNAL -> Store.EXTERNAL - } - -internal fun Store.toAndroidStore(): AndroidStore = - when (this) { - Store.APP_STORE -> AndroidStore.APP_STORE - Store.MAC_APP_STORE -> AndroidStore.MAC_APP_STORE - Store.PLAY_STORE -> AndroidStore.PLAY_STORE - Store.STRIPE -> AndroidStore.STRIPE - Store.PROMOTIONAL -> AndroidStore.PROMOTIONAL - Store.UNKNOWN_STORE -> AndroidStore.UNKNOWN_STORE - Store.AMAZON -> AndroidStore.AMAZON - Store.RC_BILLING -> AndroidStore.RC_BILLING - Store.EXTERNAL -> AndroidStore.EXTERNAL - } - -internal fun AndroidPeriodType.toPeriodType(): PeriodType = - when (this) { - AndroidPeriodType.NORMAL -> PeriodType.NORMAL - AndroidPeriodType.INTRO -> PeriodType.INTRO - AndroidPeriodType.TRIAL -> PeriodType.TRIAL - } - -internal fun AndroidOwnershipType.toOwnershipType(): OwnershipType = - when (this) { - AndroidOwnershipType.PURCHASED -> OwnershipType.PURCHASED - AndroidOwnershipType.FAMILY_SHARED -> OwnershipType.FAMILY_SHARED - AndroidOwnershipType.UNKNOWN -> OwnershipType.UNKNOWN - - } +public actual typealias Store = RcStore +public actual typealias PeriodType = RcPeriodType +public actual typealias OwnershipType = RcOwnershipType diff --git a/core/src/androidMain/kotlin/com/revenuecat/purchases/kmp/LogLevel.android.kt b/core/src/androidMain/kotlin/com/revenuecat/purchases/kmp/LogLevel.android.kt index bc819174..5dec3155 100644 --- a/core/src/androidMain/kotlin/com/revenuecat/purchases/kmp/LogLevel.android.kt +++ b/core/src/androidMain/kotlin/com/revenuecat/purchases/kmp/LogLevel.android.kt @@ -1,21 +1,5 @@ package com.revenuecat.purchases.kmp -import com.revenuecat.purchases.LogLevel as AndroidLogLevel +import com.revenuecat.purchases.LogLevel as RcLogLevel -internal fun AndroidLogLevel.toLogLevel(): LogLevel = - when (this) { - AndroidLogLevel.VERBOSE -> LogLevel.VERBOSE - AndroidLogLevel.DEBUG -> LogLevel.DEBUG - AndroidLogLevel.INFO -> LogLevel.INFO - AndroidLogLevel.WARN -> LogLevel.WARN - AndroidLogLevel.ERROR -> LogLevel.ERROR - } - -internal fun LogLevel.toAndroidLogLevel(): AndroidLogLevel = - when (this) { - LogLevel.VERBOSE -> AndroidLogLevel.VERBOSE - LogLevel.DEBUG -> AndroidLogLevel.DEBUG - LogLevel.INFO -> AndroidLogLevel.INFO - LogLevel.WARN -> AndroidLogLevel.WARN - LogLevel.ERROR -> AndroidLogLevel.ERROR - } +public actual typealias LogLevel = RcLogLevel diff --git a/core/src/androidMain/kotlin/com/revenuecat/purchases/kmp/Purchases.android.kt b/core/src/androidMain/kotlin/com/revenuecat/purchases/kmp/Purchases.android.kt index 50e97e72..2eb09c77 100644 --- a/core/src/androidMain/kotlin/com/revenuecat/purchases/kmp/Purchases.android.kt +++ b/core/src/androidMain/kotlin/com/revenuecat/purchases/kmp/Purchases.android.kt @@ -41,11 +41,7 @@ public actual class Purchases private constructor(private val androidPurchases: ) @JvmStatic - public actual var logLevel: LogLevel - get() = AndroidPurchases.Companion.logLevel.toLogLevel() - set(value) { - AndroidPurchases.Companion.logLevel = value.toAndroidLogLevel() - } + public actual var logLevel: LogLevel by AndroidPurchases.Companion::logLevel @JvmStatic public actual var logHandler: LogHandler by AndroidPurchases.Companion::logHandler @@ -74,12 +70,12 @@ public actual class Purchases private constructor(private val androidPurchases: context = AndroidProvider.requireApplication(), apiKey = apiKey, appUserID = appUserId, - purchasesAreCompletedBy = purchasesAreCompletedBy.toAndroidPurchasesAreCompletedBy(), + purchasesAreCompletedBy = purchasesAreCompletedBy, platformInfo = PlatformInfo( flavor = BuildKonfig.platformFlavor, version = frameworkVersion, ), - store = (store ?: Store.PLAY_STORE).toAndroidStore(), + store = store ?: Store.PLAY_STORE, dangerousSettings = dangerousSettings.toAndroidDangerousSettings(), shouldShowInAppMessagesAutomatically = showInAppMessagesAutomatically, verificationMode = verificationMode.name, @@ -102,11 +98,7 @@ public actual class Purchases private constructor(private val androidPurchases: AndroidDangerousSettings(autoSyncPurchases) } - public actual var purchasesAreCompletedBy: PurchasesAreCompletedBy - get() = androidPurchases.purchasesAreCompletedBy.toPurchasesAreCompletedBy() - set(value) { - androidPurchases.purchasesAreCompletedBy = value.toAndroidPurchasesAreCompletedBy() - } + public actual var purchasesAreCompletedBy: PurchasesAreCompletedBy by androidPurchases::purchasesAreCompletedBy public actual val appUserID: String by androidPurchases::appUserID @@ -118,8 +110,7 @@ public actual class Purchases private constructor(private val androidPurchases: public actual val isAnonymous: Boolean by androidPurchases::isAnonymous - public actual val store: Store - get() = androidPurchases.store.toStore() + public actual val store: Store by androidPurchases::store public actual fun syncPurchases( onError: (error: PurchasesError) -> Unit, @@ -292,7 +283,7 @@ public actual class Purchases private constructor(private val androidPurchases: onError: (error: PurchasesError) -> Unit, onSuccess: (customerInfo: CustomerInfo) -> Unit, ): Unit = androidPurchases.getCustomerInfoWith( - fetchPolicy = fetchPolicy.toAndroidCacheFetchPolicy(), + fetchPolicy = fetchPolicy, onError = { onError(it.toPurchasesError()) }, onSuccess = { onSuccess(it) } ) diff --git a/core/src/androidMain/kotlin/com/revenuecat/purchases/kmp/PurchasesAreCompletedBy.android.kt b/core/src/androidMain/kotlin/com/revenuecat/purchases/kmp/PurchasesAreCompletedBy.android.kt index 06893b24..3f800e20 100644 --- a/core/src/androidMain/kotlin/com/revenuecat/purchases/kmp/PurchasesAreCompletedBy.android.kt +++ b/core/src/androidMain/kotlin/com/revenuecat/purchases/kmp/PurchasesAreCompletedBy.android.kt @@ -2,14 +2,4 @@ package com.revenuecat.purchases.kmp import com.revenuecat.purchases.PurchasesAreCompletedBy as AndroidPurchasesAreCompletedBy -internal fun AndroidPurchasesAreCompletedBy.toPurchasesAreCompletedBy(): PurchasesAreCompletedBy = - when (this) { - AndroidPurchasesAreCompletedBy.REVENUECAT -> PurchasesAreCompletedBy.REVENUECAT - AndroidPurchasesAreCompletedBy.MY_APP -> PurchasesAreCompletedBy.MY_APP - } - -internal fun PurchasesAreCompletedBy.toAndroidPurchasesAreCompletedBy(): AndroidPurchasesAreCompletedBy = - when (this) { - PurchasesAreCompletedBy.REVENUECAT -> AndroidPurchasesAreCompletedBy.REVENUECAT - PurchasesAreCompletedBy.MY_APP -> AndroidPurchasesAreCompletedBy.MY_APP - } +public actual typealias PurchasesAreCompletedBy = AndroidPurchasesAreCompletedBy diff --git a/core/src/androidMain/kotlin/com/revenuecat/purchases/kmp/models/DiscountPaymentMode.android.kt b/core/src/androidMain/kotlin/com/revenuecat/purchases/kmp/models/DiscountPaymentMode.android.kt new file mode 100644 index 00000000..10bd4308 --- /dev/null +++ b/core/src/androidMain/kotlin/com/revenuecat/purchases/kmp/models/DiscountPaymentMode.android.kt @@ -0,0 +1,7 @@ +package com.revenuecat.purchases.kmp.models + +public actual enum class DiscountPaymentMode { + FREE_TRIAL, + PAY_AS_YOU_GO, + PAY_UP_FRONT, +} diff --git a/core/src/androidMain/kotlin/com/revenuecat/purchases/kmp/models/DiscountType.android.kt b/core/src/androidMain/kotlin/com/revenuecat/purchases/kmp/models/DiscountType.android.kt new file mode 100644 index 00000000..d6eaded3 --- /dev/null +++ b/core/src/androidMain/kotlin/com/revenuecat/purchases/kmp/models/DiscountType.android.kt @@ -0,0 +1,6 @@ +package com.revenuecat.purchases.kmp.models + +public actual enum class DiscountType { + INTRODUCTORY, + PROMOTIONAL, +} diff --git a/core/src/commonMain/kotlin/com/revenuecat/purchases/kmp/CacheFetchPolicy.kt b/core/src/commonMain/kotlin/com/revenuecat/purchases/kmp/CacheFetchPolicy.kt index bae76ac1..be781c8b 100644 --- a/core/src/commonMain/kotlin/com/revenuecat/purchases/kmp/CacheFetchPolicy.kt +++ b/core/src/commonMain/kotlin/com/revenuecat/purchases/kmp/CacheFetchPolicy.kt @@ -3,7 +3,7 @@ package com.revenuecat.purchases.kmp /** * Specifies behavior for a caching API. */ -public enum class CacheFetchPolicy { +public expect enum class CacheFetchPolicy { /** * Returns values from the cache, or throws an error if not available. It won't initiate a fetch. */ @@ -33,6 +33,6 @@ public enum class CacheFetchPolicy { /** * Returns the default policy when no policy is provided. */ - public fun default(): CacheFetchPolicy = CACHED_OR_FETCHED + public fun default(): CacheFetchPolicy } } diff --git a/core/src/commonMain/kotlin/com/revenuecat/purchases/kmp/EntitlementInfo.kt b/core/src/commonMain/kotlin/com/revenuecat/purchases/kmp/EntitlementInfo.kt index d66e87a3..e620bef6 100644 --- a/core/src/commonMain/kotlin/com/revenuecat/purchases/kmp/EntitlementInfo.kt +++ b/core/src/commonMain/kotlin/com/revenuecat/purchases/kmp/EntitlementInfo.kt @@ -92,7 +92,7 @@ public expect val EntitlementInfo.verification: VerificationResult /** * Enum of supported stores */ -public enum class Store { +public expect enum class Store { /** * For entitlements granted via Apple App Store. */ @@ -142,7 +142,7 @@ public enum class Store { /** * Enum of supported period types for an entitlement. */ -public enum class PeriodType { +public expect enum class PeriodType { /** * If the entitlement is not under an introductory or trial period. */ @@ -162,7 +162,7 @@ public enum class PeriodType { /** * Enum of supported ownership types for an entitlement. */ -public enum class OwnershipType { +public expect enum class OwnershipType { /** * The purchase was made directly by this user. */ diff --git a/core/src/commonMain/kotlin/com/revenuecat/purchases/kmp/LogLevel.kt b/core/src/commonMain/kotlin/com/revenuecat/purchases/kmp/LogLevel.kt index 677428fb..c23d1cba 100644 --- a/core/src/commonMain/kotlin/com/revenuecat/purchases/kmp/LogLevel.kt +++ b/core/src/commonMain/kotlin/com/revenuecat/purchases/kmp/LogLevel.kt @@ -3,7 +3,7 @@ package com.revenuecat.purchases.kmp /** * The level to log at. */ -public enum class LogLevel { +public expect enum class LogLevel { VERBOSE, DEBUG, INFO, diff --git a/core/src/commonMain/kotlin/com/revenuecat/purchases/kmp/PurchasesAreCompletedBy.kt b/core/src/commonMain/kotlin/com/revenuecat/purchases/kmp/PurchasesAreCompletedBy.kt index ebf8d031..80c82a87 100644 --- a/core/src/commonMain/kotlin/com/revenuecat/purchases/kmp/PurchasesAreCompletedBy.kt +++ b/core/src/commonMain/kotlin/com/revenuecat/purchases/kmp/PurchasesAreCompletedBy.kt @@ -3,7 +3,7 @@ package com.revenuecat.purchases.kmp /** * Modes for completing the purchase process. */ -public enum class PurchasesAreCompletedBy { +public expect enum class PurchasesAreCompletedBy { /** * RevenueCat will automatically acknowledge verified purchases. No action is required by you. */ diff --git a/core/src/commonMain/kotlin/com/revenuecat/purchases/kmp/models/DiscountPaymentMode.kt b/core/src/commonMain/kotlin/com/revenuecat/purchases/kmp/models/DiscountPaymentMode.kt index 33f93c5e..ca576d64 100644 --- a/core/src/commonMain/kotlin/com/revenuecat/purchases/kmp/models/DiscountPaymentMode.kt +++ b/core/src/commonMain/kotlin/com/revenuecat/purchases/kmp/models/DiscountPaymentMode.kt @@ -4,7 +4,7 @@ package com.revenuecat.purchases.kmp.models * App Store only. The payment mode for a [StoreProductDiscount] indicates how the product discount * price is charged. */ -public enum class DiscountPaymentMode { +public expect enum class DiscountPaymentMode { /** * No initial charge. */ diff --git a/core/src/commonMain/kotlin/com/revenuecat/purchases/kmp/models/DiscountType.kt b/core/src/commonMain/kotlin/com/revenuecat/purchases/kmp/models/DiscountType.kt index 756f5d14..d30c03bf 100644 --- a/core/src/commonMain/kotlin/com/revenuecat/purchases/kmp/models/DiscountType.kt +++ b/core/src/commonMain/kotlin/com/revenuecat/purchases/kmp/models/DiscountType.kt @@ -3,7 +3,7 @@ package com.revenuecat.purchases.kmp.models /** * App Store only. Denotes the type of a [StoreProductDiscount]. */ -public enum class DiscountType { +public expect enum class DiscountType { /** * Introductory offer. */ diff --git a/core/src/iosMain/kotlin/com/revenuecat/purchases/kmp/CacheFetchPolicy.ios.kt b/core/src/iosMain/kotlin/com/revenuecat/purchases/kmp/CacheFetchPolicy.ios.kt index 0ded4f0f..8173ebc9 100644 --- a/core/src/iosMain/kotlin/com/revenuecat/purchases/kmp/CacheFetchPolicy.ios.kt +++ b/core/src/iosMain/kotlin/com/revenuecat/purchases/kmp/CacheFetchPolicy.ios.kt @@ -1,12 +1,24 @@ package com.revenuecat.purchases.kmp +import cocoapods.PurchasesHybridCommon.RCCacheFetchPolicy import cocoapods.PurchasesHybridCommon.RCCacheFetchPolicyCachedOrFetched import cocoapods.PurchasesHybridCommon.RCCacheFetchPolicyFetchCurrent import cocoapods.PurchasesHybridCommon.RCCacheFetchPolicyFromCacheOnly import cocoapods.PurchasesHybridCommon.RCCacheFetchPolicyNotStaleCachedOrFetched -import cocoapods.PurchasesHybridCommon.RCCacheFetchPolicy as IosCacheFetchPolicy -internal fun CacheFetchPolicy.toIosCacheFetchPolicy(): IosCacheFetchPolicy = +public actual enum class CacheFetchPolicy { + CACHE_ONLY, + FETCH_CURRENT, + NOT_STALE_CACHED_OR_CURRENT, + CACHED_OR_FETCHED, + ; + + public actual companion object { + public actual fun default(): CacheFetchPolicy = CACHED_OR_FETCHED + } +} + +internal fun CacheFetchPolicy.toRCCacheFetchPolicy(): RCCacheFetchPolicy = when (this) { CacheFetchPolicy.CACHE_ONLY -> RCCacheFetchPolicyFromCacheOnly CacheFetchPolicy.FETCH_CURRENT -> RCCacheFetchPolicyFetchCurrent diff --git a/core/src/iosMain/kotlin/com/revenuecat/purchases/kmp/EntitlementInfo.ios.kt b/core/src/iosMain/kotlin/com/revenuecat/purchases/kmp/EntitlementInfo.ios.kt index 6dec7a70..d3942115 100644 --- a/core/src/iosMain/kotlin/com/revenuecat/purchases/kmp/EntitlementInfo.ios.kt +++ b/core/src/iosMain/kotlin/com/revenuecat/purchases/kmp/EntitlementInfo.ios.kt @@ -6,18 +6,18 @@ import cocoapods.PurchasesHybridCommon.RCEntitlementInfo import cocoapods.PurchasesHybridCommon.RCIntro import cocoapods.PurchasesHybridCommon.RCMacAppStore import cocoapods.PurchasesHybridCommon.RCNormal +import cocoapods.PurchasesHybridCommon.RCPeriodType import cocoapods.PurchasesHybridCommon.RCPlayStore import cocoapods.PurchasesHybridCommon.RCPromotional +import cocoapods.PurchasesHybridCommon.RCPurchaseOwnershipType import cocoapods.PurchasesHybridCommon.RCPurchaseOwnershipTypeFamilyShared import cocoapods.PurchasesHybridCommon.RCPurchaseOwnershipTypePurchased import cocoapods.PurchasesHybridCommon.RCPurchaseOwnershipTypeUnknown +import cocoapods.PurchasesHybridCommon.RCStore import cocoapods.PurchasesHybridCommon.RCStripe import cocoapods.PurchasesHybridCommon.RCTrial import cocoapods.PurchasesHybridCommon.RCUnknownStore import com.revenuecat.purchases.kmp.ktx.toEpochMilliseconds -import cocoapods.PurchasesHybridCommon.RCPeriodType as IosPeriodType -import cocoapods.PurchasesHybridCommon.RCPurchaseOwnershipType as IosOwnershipType -import cocoapods.PurchasesHybridCommon.RCStore as IosStore public actual typealias EntitlementInfo = RCEntitlementInfo @@ -52,7 +52,31 @@ public actual val EntitlementInfo.ownershipType: OwnershipType public actual val EntitlementInfo.verification: VerificationResult get() = verification().toVerificationResult() -internal fun IosStore.toStore(): Store = +public actual enum class Store { + APP_STORE, + MAC_APP_STORE, + PLAY_STORE, + STRIPE, + PROMOTIONAL, + UNKNOWN_STORE, + AMAZON, + RC_BILLING, + EXTERNAL, +} + +public actual enum class PeriodType { + NORMAL, + INTRO, + TRIAL, +} + +public actual enum class OwnershipType { + PURCHASED, + FAMILY_SHARED, + UNKNOWN, +} + +internal fun RCStore.toStore(): Store = when (this) { RCAppStore -> Store.APP_STORE RCMacAppStore -> Store.MAC_APP_STORE @@ -61,21 +85,21 @@ internal fun IosStore.toStore(): Store = RCPromotional -> Store.PROMOTIONAL RCUnknownStore -> Store.UNKNOWN_STORE RCAmazon -> Store.AMAZON - else -> error("Unknown IosStore: $this") + else -> error("Unknown RCStore: $this") } -internal fun IosPeriodType.toPeriodType(): PeriodType = +internal fun RCPeriodType.toPeriodType(): PeriodType = when (this) { RCNormal -> PeriodType.NORMAL RCIntro -> PeriodType.INTRO RCTrial -> PeriodType.TRIAL - else -> error("Unknown IosPeriodType: $this") + else -> error("Unknown RCPeriodType: $this") } -internal fun IosOwnershipType.toOwnershipType(): OwnershipType = +internal fun RCPurchaseOwnershipType.toOwnershipType(): OwnershipType = when (this) { RCPurchaseOwnershipTypePurchased -> OwnershipType.PURCHASED RCPurchaseOwnershipTypeFamilyShared -> OwnershipType.FAMILY_SHARED RCPurchaseOwnershipTypeUnknown -> OwnershipType.UNKNOWN - else -> error("Unknown IosOwnershipType: $this") + else -> error("Unknown RCPurchaseOwnershipType: $this") } diff --git a/core/src/iosMain/kotlin/com/revenuecat/purchases/kmp/LogLevel.ios.kt b/core/src/iosMain/kotlin/com/revenuecat/purchases/kmp/LogLevel.ios.kt index a22565fb..6feb1e5e 100644 --- a/core/src/iosMain/kotlin/com/revenuecat/purchases/kmp/LogLevel.ios.kt +++ b/core/src/iosMain/kotlin/com/revenuecat/purchases/kmp/LogLevel.ios.kt @@ -1,23 +1,31 @@ package com.revenuecat.purchases.kmp +import cocoapods.PurchasesHybridCommon.RCLogLevel import cocoapods.PurchasesHybridCommon.RCLogLevelDebug import cocoapods.PurchasesHybridCommon.RCLogLevelError import cocoapods.PurchasesHybridCommon.RCLogLevelInfo import cocoapods.PurchasesHybridCommon.RCLogLevelVerbose import cocoapods.PurchasesHybridCommon.RCLogLevelWarn -import cocoapods.PurchasesHybridCommon.RCLogLevel as IosLogLevel -internal fun IosLogLevel.toLogLevel(): LogLevel = +public actual enum class LogLevel { + VERBOSE, + DEBUG, + INFO, + WARN, + ERROR, +} + +internal fun RCLogLevel.toLogLevel(): LogLevel = when (this) { RCLogLevelVerbose -> LogLevel.VERBOSE RCLogLevelDebug -> LogLevel.DEBUG RCLogLevelInfo -> LogLevel.INFO RCLogLevelWarn -> LogLevel.WARN RCLogLevelError -> LogLevel.ERROR - else -> error("Unexpected IosLogLevel: $this") + else -> error("Unexpected RCLogLevel: $this") } -internal fun LogLevel.toRcLogLevel(): IosLogLevel = +internal fun LogLevel.toRcLogLevel(): RCLogLevel = when (this) { LogLevel.VERBOSE -> RCLogLevelVerbose LogLevel.DEBUG -> RCLogLevelDebug diff --git a/core/src/iosMain/kotlin/com/revenuecat/purchases/kmp/Purchases.ios.kt b/core/src/iosMain/kotlin/com/revenuecat/purchases/kmp/Purchases.ios.kt index ec0e5e23..c024ce16 100644 --- a/core/src/iosMain/kotlin/com/revenuecat/purchases/kmp/Purchases.ios.kt +++ b/core/src/iosMain/kotlin/com/revenuecat/purchases/kmp/Purchases.ios.kt @@ -62,7 +62,7 @@ public actual class Purchases private constructor(private val iosPurchases: IosP IosPurchases.configureWithAPIKey( apiKey = apiKey, appUserID = appUserId, - purchasesAreCompletedBy = purchasesAreCompletedBy.toIosPurchasesAreCompletedBy(), + purchasesAreCompletedBy = purchasesAreCompletedBy.toRCPurchasesAreCompletedBy(), userDefaultsSuiteName = userDefaultsSuiteName, platformFlavor = BuildKonfig.platformFlavor, platformFlavorVersion = frameworkVersion, @@ -99,7 +99,7 @@ public actual class Purchases private constructor(private val iosPurchases: IosP public actual var purchasesAreCompletedBy: PurchasesAreCompletedBy get() = iosPurchases.purchasesAreCompletedBy().toPurchasesAreCompletedBy() set(value) { - iosPurchases.setPurchasesAreCompletedBy(value.toIosPurchasesAreCompletedBy()) + iosPurchases.setPurchasesAreCompletedBy(value.toRCPurchasesAreCompletedBy()) } public actual val appUserID: String @@ -289,7 +289,7 @@ public actual class Purchases private constructor(private val iosPurchases: IosP onError: (error: PurchasesError) -> Unit, onSuccess: (customerInfo: CustomerInfo) -> Unit, ): Unit = iosPurchases.getCustomerInfoWithFetchPolicy( - fetchPolicy.toIosCacheFetchPolicy() + fetchPolicy.toRCCacheFetchPolicy() ) { customerInfo, error -> if (error != null) onError(error.toPurchasesErrorOrThrow()) else onSuccess(customerInfo ?: error("Expected a non-null RCCustomerInfo")) diff --git a/core/src/iosMain/kotlin/com/revenuecat/purchases/kmp/PurchasesAreCompletedBy.ios.kt b/core/src/iosMain/kotlin/com/revenuecat/purchases/kmp/PurchasesAreCompletedBy.ios.kt index 258b1e43..e5f7f755 100644 --- a/core/src/iosMain/kotlin/com/revenuecat/purchases/kmp/PurchasesAreCompletedBy.ios.kt +++ b/core/src/iosMain/kotlin/com/revenuecat/purchases/kmp/PurchasesAreCompletedBy.ios.kt @@ -1,17 +1,22 @@ package com.revenuecat.purchases.kmp +import cocoapods.PurchasesHybridCommon.RCPurchasesAreCompletedBy import cocoapods.PurchasesHybridCommon.RCPurchasesAreCompletedByMyApp import cocoapods.PurchasesHybridCommon.RCPurchasesAreCompletedByRevenueCat -import cocoapods.PurchasesHybridCommon.RCPurchasesAreCompletedBy as IosPurchasesAreCompletedBy -internal fun IosPurchasesAreCompletedBy.toPurchasesAreCompletedBy(): PurchasesAreCompletedBy = +public actual enum class PurchasesAreCompletedBy { + REVENUECAT, + MY_APP, +} + +internal fun RCPurchasesAreCompletedBy.toPurchasesAreCompletedBy(): PurchasesAreCompletedBy = when (this) { RCPurchasesAreCompletedByRevenueCat -> PurchasesAreCompletedBy.REVENUECAT RCPurchasesAreCompletedByMyApp -> PurchasesAreCompletedBy.MY_APP - else -> error("Unexpected IosPurchasesAreCompletedBy: $this") + else -> error("Unexpected RCPurchasesAreCompletedBy: $this") } -internal fun PurchasesAreCompletedBy.toIosPurchasesAreCompletedBy(): IosPurchasesAreCompletedBy = +internal fun PurchasesAreCompletedBy.toRCPurchasesAreCompletedBy(): RCPurchasesAreCompletedBy = when (this) { PurchasesAreCompletedBy.REVENUECAT -> RCPurchasesAreCompletedByRevenueCat PurchasesAreCompletedBy.MY_APP -> RCPurchasesAreCompletedByMyApp diff --git a/core/src/iosMain/kotlin/com/revenuecat/purchases/kmp/models/DiscountPaymentMode.ios.kt b/core/src/iosMain/kotlin/com/revenuecat/purchases/kmp/models/DiscountPaymentMode.ios.kt index ec283eb0..bdc98b52 100644 --- a/core/src/iosMain/kotlin/com/revenuecat/purchases/kmp/models/DiscountPaymentMode.ios.kt +++ b/core/src/iosMain/kotlin/com/revenuecat/purchases/kmp/models/DiscountPaymentMode.ios.kt @@ -1,11 +1,17 @@ package com.revenuecat.purchases.kmp.models +import cocoapods.PurchasesHybridCommon.RCPaymentMode import cocoapods.PurchasesHybridCommon.RCPaymentModeFreeTrial import cocoapods.PurchasesHybridCommon.RCPaymentModePayAsYouGo import cocoapods.PurchasesHybridCommon.RCPaymentModePayUpFront -import cocoapods.PurchasesHybridCommon.RCPaymentMode as IosDiscountPaymentMode -internal fun IosDiscountPaymentMode.toDiscountPaymentMode(): DiscountPaymentMode = +public actual enum class DiscountPaymentMode { + FREE_TRIAL, + PAY_AS_YOU_GO, + PAY_UP_FRONT, +} + +internal fun RCPaymentMode.toDiscountPaymentMode(): DiscountPaymentMode = when (this) { RCPaymentModeFreeTrial -> DiscountPaymentMode.FREE_TRIAL RCPaymentModePayAsYouGo -> DiscountPaymentMode.PAY_AS_YOU_GO diff --git a/core/src/iosMain/kotlin/com/revenuecat/purchases/kmp/models/DiscountType.ios.kt b/core/src/iosMain/kotlin/com/revenuecat/purchases/kmp/models/DiscountType.ios.kt index 6fb15300..b9148790 100644 --- a/core/src/iosMain/kotlin/com/revenuecat/purchases/kmp/models/DiscountType.ios.kt +++ b/core/src/iosMain/kotlin/com/revenuecat/purchases/kmp/models/DiscountType.ios.kt @@ -1,10 +1,15 @@ package com.revenuecat.purchases.kmp.models +import cocoapods.PurchasesHybridCommon.RCDiscountType import cocoapods.PurchasesHybridCommon.RCDiscountTypeIntroductory import cocoapods.PurchasesHybridCommon.RCDiscountTypePromotional -import cocoapods.PurchasesHybridCommon.RCDiscountType as IosDiscountType -internal fun IosDiscountType.toDiscountType(): DiscountType = +public actual enum class DiscountType { + INTRODUCTORY, + PROMOTIONAL, +} + +internal fun RCDiscountType.toDiscountType(): DiscountType = when(this) { RCDiscountTypeIntroductory -> DiscountType.INTRODUCTORY RCDiscountTypePromotional -> DiscountType.PROMOTIONAL diff --git a/either/api/either.api b/either/api/either.api index 2bc6156c..57217132 100644 --- a/either/api/either.api +++ b/either/api/either.api @@ -1,6 +1,6 @@ public final class com/revenuecat/purchases/kmp/either/EitherKt { - public static final fun awaitCustomerInfoEither (Lcom/revenuecat/purchases/kmp/Purchases;Lcom/revenuecat/purchases/kmp/CacheFetchPolicy;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun awaitCustomerInfoEither$default (Lcom/revenuecat/purchases/kmp/Purchases;Lcom/revenuecat/purchases/kmp/CacheFetchPolicy;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun awaitCustomerInfoEither (Lcom/revenuecat/purchases/kmp/Purchases;Lcom/revenuecat/purchases/CacheFetchPolicy;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun awaitCustomerInfoEither$default (Lcom/revenuecat/purchases/kmp/Purchases;Lcom/revenuecat/purchases/CacheFetchPolicy;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun awaitGetProductsEither (Lcom/revenuecat/purchases/kmp/Purchases;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun awaitLogInEither (Lcom/revenuecat/purchases/kmp/Purchases;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun awaitLogOutEither (Lcom/revenuecat/purchases/kmp/Purchases;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; diff --git a/result/api/result.api b/result/api/result.api index b74e7459..2fb2ed2d 100644 --- a/result/api/result.api +++ b/result/api/result.api @@ -1,6 +1,6 @@ public final class com/revenuecat/purchases/kmp/result/ResultKt { - public static final fun awaitCustomerInfoResult (Lcom/revenuecat/purchases/kmp/Purchases;Lcom/revenuecat/purchases/kmp/CacheFetchPolicy;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun awaitCustomerInfoResult$default (Lcom/revenuecat/purchases/kmp/Purchases;Lcom/revenuecat/purchases/kmp/CacheFetchPolicy;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun awaitCustomerInfoResult (Lcom/revenuecat/purchases/kmp/Purchases;Lcom/revenuecat/purchases/CacheFetchPolicy;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun awaitCustomerInfoResult$default (Lcom/revenuecat/purchases/kmp/Purchases;Lcom/revenuecat/purchases/CacheFetchPolicy;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun awaitGetProductsResult (Lcom/revenuecat/purchases/kmp/Purchases;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun awaitLogInResult (Lcom/revenuecat/purchases/kmp/Purchases;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun awaitLogOutResult (Lcom/revenuecat/purchases/kmp/Purchases;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;