react-native-iap 14.4.27 → 14.4.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NitroIap.podspec +2 -1
- package/ios/RnIapHelper.swift +9 -4
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/RnIap.nitro.d.ts +50 -6
- package/lib/typescript/src/specs/RnIap.nitro.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JAndroidSubscriptionOfferInput.hpp +5 -1
- package/nitrogen/generated/android/c++/JExternalPurchaseLinkResultIOS.hpp +5 -1
- package/nitrogen/generated/android/c++/JExternalPurchaseNoticeResultIOS.hpp +5 -1
- package/nitrogen/generated/android/c++/JInitConnectionConfig.hpp +5 -1
- package/nitrogen/generated/android/c++/JNitroActiveSubscription.hpp +5 -1
- package/nitrogen/generated/android/c++/JNitroAvailablePurchasesAndroidOptions.hpp +5 -1
- package/nitrogen/generated/android/c++/JNitroAvailablePurchasesIosOptions.hpp +5 -1
- package/nitrogen/generated/android/c++/JNitroAvailablePurchasesOptions.hpp +5 -1
- package/nitrogen/generated/android/c++/JNitroDeepLinkOptionsAndroid.hpp +5 -1
- package/nitrogen/generated/android/c++/JNitroFinishTransactionAndroidParams.hpp +5 -1
- package/nitrogen/generated/android/c++/JNitroFinishTransactionIosParams.hpp +5 -1
- package/nitrogen/generated/android/c++/JNitroFinishTransactionParams.hpp +5 -1
- package/nitrogen/generated/android/c++/JNitroOneTimePurchaseOfferDetail.hpp +5 -1
- package/nitrogen/generated/android/c++/JNitroProduct.hpp +5 -1
- package/nitrogen/generated/android/c++/JNitroPurchase.hpp +5 -1
- package/nitrogen/generated/android/c++/JNitroPurchaseRequest.hpp +5 -1
- package/nitrogen/generated/android/c++/JNitroPurchaseResult.hpp +5 -1
- package/nitrogen/generated/android/c++/JNitroReceiptValidationAndroidOptions.hpp +5 -1
- package/nitrogen/generated/android/c++/JNitroReceiptValidationParams.hpp +5 -1
- package/nitrogen/generated/android/c++/JNitroReceiptValidationResultAndroid.hpp +5 -1
- package/nitrogen/generated/android/c++/JNitroReceiptValidationResultIOS.hpp +5 -1
- package/nitrogen/generated/android/c++/JNitroRenewalInfoIOS.hpp +5 -1
- package/nitrogen/generated/android/c++/JNitroRequestPurchaseAndroid.hpp +5 -1
- package/nitrogen/generated/android/c++/JNitroRequestPurchaseIos.hpp +5 -1
- package/nitrogen/generated/android/c++/JNitroSubscriptionRenewalInfo.hpp +5 -1
- package/nitrogen/generated/android/c++/JNitroSubscriptionStatus.hpp +5 -1
- package/nitrogen/generated/android/c++/JPurchaseAndroid.hpp +5 -1
- package/nitrogen/generated/android/c++/JPurchaseIOS.hpp +5 -1
- package/nitrogen/generated/android/c++/JPurchaseOfferIOS.hpp +5 -1
- package/nitrogen/generated/android/c++/JRenewalInfoIOS.hpp +5 -1
- package/nitrogen/generated/android/c++/JUserChoiceBillingDetails.hpp +5 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/AndroidSubscriptionOfferInput.kt +16 -9
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/ExternalPurchaseLinkResultIOS.kt +16 -9
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/ExternalPurchaseNoticeResultIOS.kt +16 -9
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/Func_void_NitroProduct.kt +0 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/Func_void_NitroPurchase.kt +0 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/Func_void_NitroPurchaseResult.kt +0 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/Func_void_UserChoiceBillingDetails.kt +0 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/HybridRnIapSpec.kt +3 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/InitConnectionConfig.kt +13 -6
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroActiveSubscription.kt +52 -45
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroAvailablePurchasesAndroidOptions.kt +13 -6
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroAvailablePurchasesIosOptions.kt +22 -15
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroAvailablePurchasesOptions.kt +16 -9
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroDeepLinkOptionsAndroid.kt +16 -9
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroFinishTransactionAndroidParams.kt +16 -9
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroFinishTransactionIosParams.kt +13 -6
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroFinishTransactionParams.kt +16 -9
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroOneTimePurchaseOfferDetail.kt +19 -12
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroProduct.kt +102 -95
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroPurchase.kt +132 -125
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroPurchaseRequest.kt +16 -9
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroPurchaseResult.kt +25 -18
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroReceiptValidationAndroidOptions.kt +22 -15
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroReceiptValidationParams.kt +16 -9
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroReceiptValidationResultAndroid.kt +66 -59
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroReceiptValidationResultIOS.kt +22 -15
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroRenewalInfoIOS.kt +43 -36
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroRequestPurchaseAndroid.kt +31 -24
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroRequestPurchaseIos.kt +25 -18
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroSubscriptionRenewalInfo.kt +28 -21
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroSubscriptionStatus.kt +19 -12
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/Purchase.kt +18 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/PurchaseAndroid.kt +69 -62
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/PurchaseIOS.kt +111 -104
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/PurchaseOfferIOS.kt +19 -12
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/RenewalInfoIOS.kt +43 -36
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/RequestPurchaseResult.kt +23 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/UserChoiceBillingDetails.kt +16 -9
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/Variant_Boolean_NitroPurchaseResult.kt +18 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/Variant_NitroReceiptValidationResultIOS_NitroReceiptValidationResultAndroid.kt +18 -1
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Bridge.cpp +22 -22
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Bridge.hpp +23 -22
- package/nitrogen/generated/ios/c++/HybridRnIapSpecSwift.hpp +4 -4
- package/nitrogen/generated/ios/swift/Func_void_std__optional_NitroProduct_.swift +1 -8
- package/nitrogen/generated/ios/swift/Func_void_std__optional_NitroPurchase_.swift +1 -8
- package/nitrogen/generated/ios/swift/HybridRnIapSpec.swift +1 -0
- package/nitrogen/generated/ios/swift/HybridRnIapSpec_cxx.swift +3 -16
- package/nitrogen/generated/ios/swift/NitroActiveSubscription.swift +17 -10
- package/nitrogen/generated/ios/swift/NitroAvailablePurchasesIosOptions.swift +32 -4
- package/nitrogen/generated/ios/swift/NitroAvailablePurchasesOptions.swift +2 -16
- package/nitrogen/generated/ios/swift/NitroFinishTransactionAndroidParams.swift +8 -1
- package/nitrogen/generated/ios/swift/NitroFinishTransactionParams.swift +2 -16
- package/nitrogen/generated/ios/swift/NitroProduct.swift +9 -9
- package/nitrogen/generated/ios/swift/NitroPurchase.swift +25 -11
- package/nitrogen/generated/ios/swift/NitroPurchaseRequest.swift +2 -16
- package/nitrogen/generated/ios/swift/NitroReceiptValidationAndroidOptions.swift +8 -1
- package/nitrogen/generated/ios/swift/NitroReceiptValidationParams.swift +1 -8
- package/nitrogen/generated/ios/swift/NitroReceiptValidationResultIOS.swift +1 -8
- package/nitrogen/generated/ios/swift/NitroRenewalInfoIOS.swift +8 -1
- package/nitrogen/generated/ios/swift/NitroRequestPurchaseAndroid.swift +8 -1
- package/nitrogen/generated/ios/swift/NitroRequestPurchaseIos.swift +8 -1
- package/nitrogen/generated/ios/swift/NitroSubscriptionStatus.swift +1 -8
- package/nitrogen/generated/ios/swift/PurchaseAndroid.swift +16 -2
- package/nitrogen/generated/ios/swift/PurchaseIOS.swift +10 -17
- package/nitrogen/generated/ios/swift/RenewalInfoIOS.swift +8 -1
- package/nitrogen/generated/shared/c++/AndroidSubscriptionOfferInput.hpp +8 -0
- package/nitrogen/generated/shared/c++/ExternalPurchaseLinkResultIOS.hpp +8 -0
- package/nitrogen/generated/shared/c++/ExternalPurchaseNoticeResultIOS.hpp +8 -0
- package/nitrogen/generated/shared/c++/InitConnectionConfig.hpp +8 -0
- package/nitrogen/generated/shared/c++/NitroActiveSubscription.hpp +8 -0
- package/nitrogen/generated/shared/c++/NitroAvailablePurchasesAndroidOptions.hpp +8 -0
- package/nitrogen/generated/shared/c++/NitroAvailablePurchasesIosOptions.hpp +8 -0
- package/nitrogen/generated/shared/c++/NitroAvailablePurchasesOptions.hpp +8 -0
- package/nitrogen/generated/shared/c++/NitroDeepLinkOptionsAndroid.hpp +8 -0
- package/nitrogen/generated/shared/c++/NitroFinishTransactionAndroidParams.hpp +8 -0
- package/nitrogen/generated/shared/c++/NitroFinishTransactionIosParams.hpp +8 -0
- package/nitrogen/generated/shared/c++/NitroFinishTransactionParams.hpp +8 -0
- package/nitrogen/generated/shared/c++/NitroOneTimePurchaseOfferDetail.hpp +8 -0
- package/nitrogen/generated/shared/c++/NitroProduct.hpp +8 -0
- package/nitrogen/generated/shared/c++/NitroPurchase.hpp +8 -0
- package/nitrogen/generated/shared/c++/NitroPurchaseRequest.hpp +8 -0
- package/nitrogen/generated/shared/c++/NitroPurchaseResult.hpp +8 -0
- package/nitrogen/generated/shared/c++/NitroReceiptValidationAndroidOptions.hpp +8 -0
- package/nitrogen/generated/shared/c++/NitroReceiptValidationParams.hpp +8 -0
- package/nitrogen/generated/shared/c++/NitroReceiptValidationResultAndroid.hpp +8 -0
- package/nitrogen/generated/shared/c++/NitroReceiptValidationResultIOS.hpp +8 -0
- package/nitrogen/generated/shared/c++/NitroRenewalInfoIOS.hpp +8 -0
- package/nitrogen/generated/shared/c++/NitroRequestPurchaseAndroid.hpp +8 -0
- package/nitrogen/generated/shared/c++/NitroRequestPurchaseIos.hpp +8 -0
- package/nitrogen/generated/shared/c++/NitroSubscriptionRenewalInfo.hpp +8 -0
- package/nitrogen/generated/shared/c++/NitroSubscriptionStatus.hpp +8 -0
- package/nitrogen/generated/shared/c++/PurchaseAndroid.hpp +8 -0
- package/nitrogen/generated/shared/c++/PurchaseIOS.hpp +8 -0
- package/nitrogen/generated/shared/c++/PurchaseOfferIOS.hpp +8 -0
- package/nitrogen/generated/shared/c++/RenewalInfoIOS.hpp +8 -0
- package/nitrogen/generated/shared/c++/UserChoiceBillingDetails.hpp +8 -0
- package/openiap-versions.json +1 -1
- package/package.json +4 -4
- package/src/index.ts +18 -0
- package/src/specs/RnIap.nitro.ts +50 -6
|
@@ -9,7 +9,6 @@ package com.margelo.nitro.iap
|
|
|
9
9
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
-
import com.margelo.nitro.core.*
|
|
13
12
|
|
|
14
13
|
|
|
15
14
|
/**
|
|
@@ -17,109 +16,117 @@ import com.margelo.nitro.core.*
|
|
|
17
16
|
*/
|
|
18
17
|
@DoNotStrip
|
|
19
18
|
@Keep
|
|
20
|
-
data class PurchaseIOS
|
|
19
|
+
data class PurchaseIOS(
|
|
21
20
|
@DoNotStrip
|
|
22
21
|
@Keep
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
22
|
+
val appAccountToken: String?,
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
@Keep
|
|
25
|
+
val appBundleIdIOS: String?,
|
|
26
|
+
@DoNotStrip
|
|
27
|
+
@Keep
|
|
28
|
+
val countryCodeIOS: String?,
|
|
29
|
+
@DoNotStrip
|
|
30
|
+
@Keep
|
|
31
|
+
val currencyCodeIOS: String?,
|
|
32
|
+
@DoNotStrip
|
|
33
|
+
@Keep
|
|
34
|
+
val currencySymbolIOS: String?,
|
|
35
|
+
@DoNotStrip
|
|
36
|
+
@Keep
|
|
37
|
+
val currentPlanId: String?,
|
|
38
|
+
@DoNotStrip
|
|
39
|
+
@Keep
|
|
40
|
+
val environmentIOS: String?,
|
|
41
|
+
@DoNotStrip
|
|
42
|
+
@Keep
|
|
43
|
+
val expirationDateIOS: Double?,
|
|
44
|
+
@DoNotStrip
|
|
45
|
+
@Keep
|
|
46
|
+
val id: String,
|
|
47
|
+
@DoNotStrip
|
|
48
|
+
@Keep
|
|
49
|
+
val ids: Array<String>?,
|
|
50
|
+
@DoNotStrip
|
|
51
|
+
@Keep
|
|
52
|
+
val isAutoRenewing: Boolean,
|
|
53
|
+
@DoNotStrip
|
|
54
|
+
@Keep
|
|
55
|
+
val isUpgradedIOS: Boolean?,
|
|
56
|
+
@DoNotStrip
|
|
57
|
+
@Keep
|
|
58
|
+
val offerIOS: PurchaseOfferIOS?,
|
|
59
|
+
@DoNotStrip
|
|
60
|
+
@Keep
|
|
61
|
+
val originalTransactionDateIOS: Double?,
|
|
62
|
+
@DoNotStrip
|
|
63
|
+
@Keep
|
|
64
|
+
val originalTransactionIdentifierIOS: String?,
|
|
65
|
+
@DoNotStrip
|
|
66
|
+
@Keep
|
|
67
|
+
val ownershipTypeIOS: String?,
|
|
68
|
+
@DoNotStrip
|
|
69
|
+
@Keep
|
|
70
|
+
val platform: IapPlatform,
|
|
71
|
+
@DoNotStrip
|
|
72
|
+
@Keep
|
|
73
|
+
val productId: String,
|
|
74
|
+
@DoNotStrip
|
|
75
|
+
@Keep
|
|
76
|
+
val purchaseState: PurchaseState,
|
|
77
|
+
@DoNotStrip
|
|
78
|
+
@Keep
|
|
79
|
+
val purchaseToken: String?,
|
|
80
|
+
@DoNotStrip
|
|
81
|
+
@Keep
|
|
82
|
+
val quantity: Double,
|
|
83
|
+
@DoNotStrip
|
|
84
|
+
@Keep
|
|
85
|
+
val quantityIOS: Double?,
|
|
86
|
+
@DoNotStrip
|
|
87
|
+
@Keep
|
|
88
|
+
val reasonIOS: String?,
|
|
89
|
+
@DoNotStrip
|
|
90
|
+
@Keep
|
|
91
|
+
val reasonStringRepresentationIOS: String?,
|
|
92
|
+
@DoNotStrip
|
|
93
|
+
@Keep
|
|
94
|
+
val renewalInfoIOS: RenewalInfoIOS?,
|
|
95
|
+
@DoNotStrip
|
|
96
|
+
@Keep
|
|
97
|
+
val revocationDateIOS: Double?,
|
|
98
|
+
@DoNotStrip
|
|
99
|
+
@Keep
|
|
100
|
+
val revocationReasonIOS: String?,
|
|
101
|
+
@DoNotStrip
|
|
102
|
+
@Keep
|
|
103
|
+
val storefrontCountryCodeIOS: String?,
|
|
104
|
+
@DoNotStrip
|
|
105
|
+
@Keep
|
|
106
|
+
val subscriptionGroupIdIOS: String?,
|
|
107
|
+
@DoNotStrip
|
|
108
|
+
@Keep
|
|
109
|
+
val transactionDate: Double,
|
|
110
|
+
@DoNotStrip
|
|
111
|
+
@Keep
|
|
112
|
+
val transactionId: String,
|
|
113
|
+
@DoNotStrip
|
|
114
|
+
@Keep
|
|
115
|
+
val transactionReasonIOS: String?,
|
|
116
|
+
@DoNotStrip
|
|
117
|
+
@Keep
|
|
118
|
+
val webOrderLineItemIdIOS: String?
|
|
119
|
+
) {
|
|
120
|
+
private companion object {
|
|
121
|
+
/**
|
|
122
|
+
* Constructor called from C++
|
|
123
|
+
*/
|
|
124
|
+
@DoNotStrip
|
|
125
|
+
@Keep
|
|
126
|
+
@Suppress("unused")
|
|
127
|
+
@JvmStatic
|
|
128
|
+
private fun fromCpp(appAccountToken: String?, appBundleIdIOS: String?, countryCodeIOS: String?, currencyCodeIOS: String?, currencySymbolIOS: String?, currentPlanId: String?, environmentIOS: String?, expirationDateIOS: Double?, id: String, ids: Array<String>?, isAutoRenewing: Boolean, isUpgradedIOS: Boolean?, offerIOS: PurchaseOfferIOS?, originalTransactionDateIOS: Double?, originalTransactionIdentifierIOS: String?, ownershipTypeIOS: String?, platform: IapPlatform, productId: String, purchaseState: PurchaseState, purchaseToken: String?, quantity: Double, quantityIOS: Double?, reasonIOS: String?, reasonStringRepresentationIOS: String?, renewalInfoIOS: RenewalInfoIOS?, revocationDateIOS: Double?, revocationReasonIOS: String?, storefrontCountryCodeIOS: String?, subscriptionGroupIdIOS: String?, transactionDate: Double, transactionId: String, transactionReasonIOS: String?, webOrderLineItemIdIOS: String?): PurchaseIOS {
|
|
129
|
+
return PurchaseIOS(appAccountToken, appBundleIdIOS, countryCodeIOS, currencyCodeIOS, currencySymbolIOS, currentPlanId, environmentIOS, expirationDateIOS, id, ids, isAutoRenewing, isUpgradedIOS, offerIOS, originalTransactionDateIOS, originalTransactionIdentifierIOS, ownershipTypeIOS, platform, productId, purchaseState, purchaseToken, quantity, quantityIOS, reasonIOS, reasonStringRepresentationIOS, renewalInfoIOS, revocationDateIOS, revocationReasonIOS, storefrontCountryCodeIOS, subscriptionGroupIdIOS, transactionDate, transactionId, transactionReasonIOS, webOrderLineItemIdIOS)
|
|
130
|
+
}
|
|
131
|
+
}
|
|
125
132
|
}
|
|
@@ -9,7 +9,6 @@ package com.margelo.nitro.iap
|
|
|
9
9
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
-
import com.margelo.nitro.core.*
|
|
13
12
|
|
|
14
13
|
|
|
15
14
|
/**
|
|
@@ -17,19 +16,27 @@ import com.margelo.nitro.core.*
|
|
|
17
16
|
*/
|
|
18
17
|
@DoNotStrip
|
|
19
18
|
@Keep
|
|
20
|
-
data class PurchaseOfferIOS
|
|
19
|
+
data class PurchaseOfferIOS(
|
|
21
20
|
@DoNotStrip
|
|
22
21
|
@Keep
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
val id: String,
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
@Keep
|
|
25
|
+
val paymentMode: String,
|
|
26
|
+
@DoNotStrip
|
|
27
|
+
@Keep
|
|
28
|
+
val type: String
|
|
29
|
+
) {
|
|
30
|
+
private companion object {
|
|
31
|
+
/**
|
|
32
|
+
* Constructor called from C++
|
|
33
|
+
*/
|
|
30
34
|
@DoNotStrip
|
|
31
35
|
@Keep
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
36
|
+
@Suppress("unused")
|
|
37
|
+
@JvmStatic
|
|
38
|
+
private fun fromCpp(id: String, paymentMode: String, type: String): PurchaseOfferIOS {
|
|
39
|
+
return PurchaseOfferIOS(id, paymentMode, type)
|
|
40
|
+
}
|
|
41
|
+
}
|
|
35
42
|
}
|
|
@@ -9,7 +9,6 @@ package com.margelo.nitro.iap
|
|
|
9
9
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
-
import com.margelo.nitro.core.*
|
|
13
12
|
|
|
14
13
|
|
|
15
14
|
/**
|
|
@@ -17,43 +16,51 @@ import com.margelo.nitro.core.*
|
|
|
17
16
|
*/
|
|
18
17
|
@DoNotStrip
|
|
19
18
|
@Keep
|
|
20
|
-
data class RenewalInfoIOS
|
|
19
|
+
data class RenewalInfoIOS(
|
|
21
20
|
@DoNotStrip
|
|
22
21
|
@Keep
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
22
|
+
val autoRenewPreference: String?,
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
@Keep
|
|
25
|
+
val expirationReason: String?,
|
|
26
|
+
@DoNotStrip
|
|
27
|
+
@Keep
|
|
28
|
+
val gracePeriodExpirationDate: Double?,
|
|
29
|
+
@DoNotStrip
|
|
30
|
+
@Keep
|
|
31
|
+
val isInBillingRetry: Boolean?,
|
|
32
|
+
@DoNotStrip
|
|
33
|
+
@Keep
|
|
34
|
+
val jsonRepresentation: String?,
|
|
35
|
+
@DoNotStrip
|
|
36
|
+
@Keep
|
|
37
|
+
val pendingUpgradeProductId: String?,
|
|
38
|
+
@DoNotStrip
|
|
39
|
+
@Keep
|
|
40
|
+
val priceIncreaseStatus: String?,
|
|
41
|
+
@DoNotStrip
|
|
42
|
+
@Keep
|
|
43
|
+
val renewalDate: Double?,
|
|
44
|
+
@DoNotStrip
|
|
45
|
+
@Keep
|
|
46
|
+
val renewalOfferId: String?,
|
|
47
|
+
@DoNotStrip
|
|
48
|
+
@Keep
|
|
49
|
+
val renewalOfferType: String?,
|
|
50
|
+
@DoNotStrip
|
|
51
|
+
@Keep
|
|
52
|
+
val willAutoRenew: Boolean
|
|
53
|
+
) {
|
|
54
|
+
private companion object {
|
|
55
|
+
/**
|
|
56
|
+
* Constructor called from C++
|
|
57
|
+
*/
|
|
54
58
|
@DoNotStrip
|
|
55
59
|
@Keep
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
@Suppress("unused")
|
|
61
|
+
@JvmStatic
|
|
62
|
+
private fun fromCpp(autoRenewPreference: String?, expirationReason: String?, gracePeriodExpirationDate: Double?, isInBillingRetry: Boolean?, jsonRepresentation: String?, pendingUpgradeProductId: String?, priceIncreaseStatus: String?, renewalDate: Double?, renewalOfferId: String?, renewalOfferType: String?, willAutoRenew: Boolean): RenewalInfoIOS {
|
|
63
|
+
return RenewalInfoIOS(autoRenewPreference, expirationReason, gracePeriodExpirationDate, isInBillingRetry, jsonRepresentation, pendingUpgradeProductId, priceIncreaseStatus, renewalDate, renewalOfferId, renewalOfferType, willAutoRenew)
|
|
64
|
+
}
|
|
65
|
+
}
|
|
59
66
|
}
|
|
@@ -11,7 +11,7 @@ import com.facebook.proguard.annotations.DoNotStrip
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Represents the TypeScript variant "PurchaseAndroid|PurchaseIOS|Array<Purchase>".
|
|
14
|
+
* Represents the TypeScript variant "PurchaseAndroid | PurchaseIOS | Array<Purchase>".
|
|
15
15
|
*/
|
|
16
16
|
@Suppress("ClassName")
|
|
17
17
|
@DoNotStrip
|
|
@@ -23,6 +23,7 @@ sealed class RequestPurchaseResult {
|
|
|
23
23
|
@DoNotStrip
|
|
24
24
|
data class Third(@DoNotStrip val value: Array<Purchase>): RequestPurchaseResult()
|
|
25
25
|
|
|
26
|
+
@Deprecated("getAs() is not type-safe. Use fold/asFirstOrNull/asSecondOrNull instead.", level = DeprecationLevel.ERROR)
|
|
26
27
|
inline fun <reified T> getAs(): T? = when (this) {
|
|
27
28
|
is First -> value as? T
|
|
28
29
|
is Second -> value as? T
|
|
@@ -36,6 +37,27 @@ sealed class RequestPurchaseResult {
|
|
|
36
37
|
val isThird: Boolean
|
|
37
38
|
get() = this is Third
|
|
38
39
|
|
|
40
|
+
fun asFirstOrNull(): PurchaseAndroid? {
|
|
41
|
+
val value = (this as? First)?.value ?: return null
|
|
42
|
+
return value
|
|
43
|
+
}
|
|
44
|
+
fun asSecondOrNull(): PurchaseIOS? {
|
|
45
|
+
val value = (this as? Second)?.value ?: return null
|
|
46
|
+
return value
|
|
47
|
+
}
|
|
48
|
+
fun asThirdOrNull(): Array<Purchase>? {
|
|
49
|
+
val value = (this as? Third)?.value ?: return null
|
|
50
|
+
return value
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
inline fun <R> match(first: (PurchaseAndroid) -> R, second: (PurchaseIOS) -> R, third: (Array<Purchase>) -> R): R {
|
|
54
|
+
return when (this) {
|
|
55
|
+
is First -> first(value)
|
|
56
|
+
is Second -> second(value)
|
|
57
|
+
is Third -> third(value)
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
39
61
|
companion object {
|
|
40
62
|
@JvmStatic
|
|
41
63
|
@DoNotStrip
|
|
@@ -9,7 +9,6 @@ package com.margelo.nitro.iap
|
|
|
9
9
|
|
|
10
10
|
import androidx.annotation.Keep
|
|
11
11
|
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
-
import com.margelo.nitro.core.*
|
|
13
12
|
|
|
14
13
|
|
|
15
14
|
/**
|
|
@@ -17,16 +16,24 @@ import com.margelo.nitro.core.*
|
|
|
17
16
|
*/
|
|
18
17
|
@DoNotStrip
|
|
19
18
|
@Keep
|
|
20
|
-
data class UserChoiceBillingDetails
|
|
19
|
+
data class UserChoiceBillingDetails(
|
|
21
20
|
@DoNotStrip
|
|
22
21
|
@Keep
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
val externalTransactionToken: String,
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
@Keep
|
|
25
|
+
val products: Array<String>
|
|
26
|
+
) {
|
|
27
|
+
private companion object {
|
|
28
|
+
/**
|
|
29
|
+
* Constructor called from C++
|
|
30
|
+
*/
|
|
27
31
|
@DoNotStrip
|
|
28
32
|
@Keep
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
@Suppress("unused")
|
|
34
|
+
@JvmStatic
|
|
35
|
+
private fun fromCpp(externalTransactionToken: String, products: Array<String>): UserChoiceBillingDetails {
|
|
36
|
+
return UserChoiceBillingDetails(externalTransactionToken, products)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
32
39
|
}
|
|
@@ -11,7 +11,7 @@ import com.facebook.proguard.annotations.DoNotStrip
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Represents the TypeScript variant "Boolean|NitroPurchaseResult".
|
|
14
|
+
* Represents the TypeScript variant "Boolean | NitroPurchaseResult".
|
|
15
15
|
*/
|
|
16
16
|
@Suppress("ClassName")
|
|
17
17
|
@DoNotStrip
|
|
@@ -21,6 +21,7 @@ sealed class Variant_Boolean_NitroPurchaseResult {
|
|
|
21
21
|
@DoNotStrip
|
|
22
22
|
data class Second(@DoNotStrip val value: NitroPurchaseResult): Variant_Boolean_NitroPurchaseResult()
|
|
23
23
|
|
|
24
|
+
@Deprecated("getAs() is not type-safe. Use fold/asFirstOrNull/asSecondOrNull instead.", level = DeprecationLevel.ERROR)
|
|
24
25
|
inline fun <reified T> getAs(): T? = when (this) {
|
|
25
26
|
is First -> value as? T
|
|
26
27
|
is Second -> value as? T
|
|
@@ -31,6 +32,22 @@ sealed class Variant_Boolean_NitroPurchaseResult {
|
|
|
31
32
|
val isSecond: Boolean
|
|
32
33
|
get() = this is Second
|
|
33
34
|
|
|
35
|
+
fun asFirstOrNull(): Boolean? {
|
|
36
|
+
val value = (this as? First)?.value ?: return null
|
|
37
|
+
return value
|
|
38
|
+
}
|
|
39
|
+
fun asSecondOrNull(): NitroPurchaseResult? {
|
|
40
|
+
val value = (this as? Second)?.value ?: return null
|
|
41
|
+
return value
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
inline fun <R> match(first: (Boolean) -> R, second: (NitroPurchaseResult) -> R): R {
|
|
45
|
+
return when (this) {
|
|
46
|
+
is First -> first(value)
|
|
47
|
+
is Second -> second(value)
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
34
51
|
companion object {
|
|
35
52
|
@JvmStatic
|
|
36
53
|
@DoNotStrip
|
|
@@ -11,7 +11,7 @@ import com.facebook.proguard.annotations.DoNotStrip
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Represents the TypeScript variant "NitroReceiptValidationResultIOS|NitroReceiptValidationResultAndroid".
|
|
14
|
+
* Represents the TypeScript variant "NitroReceiptValidationResultIOS | NitroReceiptValidationResultAndroid".
|
|
15
15
|
*/
|
|
16
16
|
@Suppress("ClassName")
|
|
17
17
|
@DoNotStrip
|
|
@@ -21,6 +21,7 @@ sealed class Variant_NitroReceiptValidationResultIOS_NitroReceiptValidationResul
|
|
|
21
21
|
@DoNotStrip
|
|
22
22
|
data class Second(@DoNotStrip val value: NitroReceiptValidationResultAndroid): Variant_NitroReceiptValidationResultIOS_NitroReceiptValidationResultAndroid()
|
|
23
23
|
|
|
24
|
+
@Deprecated("getAs() is not type-safe. Use fold/asFirstOrNull/asSecondOrNull instead.", level = DeprecationLevel.ERROR)
|
|
24
25
|
inline fun <reified T> getAs(): T? = when (this) {
|
|
25
26
|
is First -> value as? T
|
|
26
27
|
is Second -> value as? T
|
|
@@ -31,6 +32,22 @@ sealed class Variant_NitroReceiptValidationResultIOS_NitroReceiptValidationResul
|
|
|
31
32
|
val isSecond: Boolean
|
|
32
33
|
get() = this is Second
|
|
33
34
|
|
|
35
|
+
fun asFirstOrNull(): NitroReceiptValidationResultIOS? {
|
|
36
|
+
val value = (this as? First)?.value ?: return null
|
|
37
|
+
return value
|
|
38
|
+
}
|
|
39
|
+
fun asSecondOrNull(): NitroReceiptValidationResultAndroid? {
|
|
40
|
+
val value = (this as? Second)?.value ?: return null
|
|
41
|
+
return value
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
inline fun <R> match(first: (NitroReceiptValidationResultIOS) -> R, second: (NitroReceiptValidationResultAndroid) -> R): R {
|
|
45
|
+
return when (this) {
|
|
46
|
+
is First -> first(value)
|
|
47
|
+
is Second -> second(value)
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
34
51
|
companion object {
|
|
35
52
|
@JvmStatic
|
|
36
53
|
@DoNotStrip
|