react-native-iap 14.3.5-rc.1 → 14.3.6
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 +1 -1
- package/README.md +1 -1
- package/android/CMakeLists.txt +4 -0
- package/android/build.gradle +2 -2
- package/android/src/main/cpp/cpp-adapter.cpp +8 -0
- package/android/src/main/java/com/margelo/nitro/iap/HybridRnIap.kt +93 -51
- package/ios/HybridRnIap.swift +38 -30
- package/lib/module/hooks/useIAP.js +6 -39
- package/lib/module/hooks/useIAP.js.map +1 -1
- package/lib/module/index.js +54 -55
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.js +1 -1
- package/lib/module/utils/type-bridge.js.map +1 -1
- package/lib/typescript/src/hooks/useIAP.d.ts +4 -8
- package/lib/typescript/src/hooks/useIAP.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +8 -7
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/RnIap.nitro.d.ts +2 -1
- package/lib/typescript/src/specs/RnIap.nitro.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +141 -146
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/utils/type-bridge.d.ts.map +1 -1
- package/nitrogen/generated/android/NitroIap+autolinking.cmake +9 -4
- package/nitrogen/generated/android/c++/JHybridRnIapSpec.cpp +32 -5
- package/nitrogen/generated/android/c++/JHybridRnIapSpec.hpp +1 -1
- package/nitrogen/generated/android/c++/JIapPlatform.hpp +59 -0
- package/nitrogen/generated/android/c++/JPurchase.cpp +26 -0
- package/nitrogen/generated/android/c++/JPurchase.hpp +80 -0
- package/nitrogen/generated/android/c++/JPurchaseAndroid.hpp +140 -0
- package/nitrogen/generated/android/c++/JPurchaseIOS.hpp +194 -0
- package/nitrogen/generated/android/c++/JPurchaseOfferIOS.hpp +61 -0
- package/nitrogen/generated/android/c++/JPurchaseState.hpp +71 -0
- package/nitrogen/generated/android/c++/JRequestPurchaseResult.hpp +89 -0
- package/nitrogen/generated/android/c++/JVariant_PurchaseAndroid_PurchaseIOS.cpp +26 -0
- package/nitrogen/generated/android/c++/JVariant_PurchaseAndroid_PurchaseIOS.hpp +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/HybridRnIapSpec.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/IapPlatform.kt +21 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/Purchase.kt +42 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/PurchaseAndroid.kt +77 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/PurchaseIOS.kt +116 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/PurchaseOfferIOS.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/PurchaseState.kt +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/RequestPurchaseResult.kt +32 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/Variant_PurchaseAndroid_PurchaseIOS.kt +42 -0
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Bridge.cpp +13 -5
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Bridge.hpp +186 -25
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Umbrella.hpp +18 -0
- package/nitrogen/generated/ios/c++/HybridRnIapSpecSwift.hpp +20 -2
- package/nitrogen/generated/ios/swift/Func_void_RequestPurchaseResult.swift +47 -0
- package/nitrogen/generated/ios/swift/HybridRnIapSpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridRnIapSpec_cxx.swift +7 -7
- package/nitrogen/generated/ios/swift/IapPlatform.swift +40 -0
- package/nitrogen/generated/ios/swift/Purchase.swift +18 -0
- package/nitrogen/generated/ios/swift/PurchaseAndroid.swift +399 -0
- package/nitrogen/generated/ios/swift/PurchaseIOS.swift +768 -0
- package/nitrogen/generated/ios/swift/PurchaseOfferIOS.swift +57 -0
- package/nitrogen/generated/ios/swift/PurchaseState.swift +56 -0
- package/nitrogen/generated/ios/swift/RequestPurchaseResult.swift +148 -0
- package/nitrogen/generated/ios/swift/Variant_PurchaseAndroid_PurchaseIOS.swift +18 -0
- package/nitrogen/generated/shared/c++/HybridRnIapSpec.hpp +4 -1
- package/nitrogen/generated/shared/c++/IapPlatform.hpp +76 -0
- package/nitrogen/generated/shared/c++/PurchaseAndroid.hpp +138 -0
- package/nitrogen/generated/shared/c++/PurchaseIOS.hpp +193 -0
- package/nitrogen/generated/shared/c++/PurchaseOfferIOS.hpp +75 -0
- package/nitrogen/generated/shared/c++/PurchaseState.hpp +92 -0
- package/nitrogen/generated/shared/c++/RequestPurchaseResult.hpp +78 -0
- package/package.json +5 -4
- package/plugin/build/withIAP.js +1 -1
- package/plugin/src/withIAP.ts +1 -1
- package/plugin/tsconfig.tsbuildinfo +1 -1
- package/src/hooks/useIAP.ts +17 -59
- package/src/index.ts +73 -77
- package/src/specs/RnIap.nitro.ts +4 -1
- package/src/types.ts +168 -178
- package/src/utils/type-bridge.ts +3 -1
- package/lib/index.d.ts +0 -8
- package/lib/index.js +0 -36
- package/lib/specs/RnIap.nitro.d.ts +0 -7
- package/lib/specs/RnIap.nitro.js +0 -1
|
@@ -0,0 +1,768 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// PurchaseIOS.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Represents an instance of `PurchaseIOS`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias PurchaseIOS = margelo.nitro.iap.PurchaseIOS
|
|
14
|
+
|
|
15
|
+
public extension PurchaseIOS {
|
|
16
|
+
private typealias bridge = margelo.nitro.iap.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `PurchaseIOS`.
|
|
20
|
+
*/
|
|
21
|
+
init(appAccountToken: String?, appBundleIdIOS: String?, countryCodeIOS: String?, currencyCodeIOS: String?, currencySymbolIOS: String?, environmentIOS: String?, expirationDateIOS: Double?, id: String, ids: [String]?, isAutoRenewing: Bool, isUpgradedIOS: Bool?, offerIOS: PurchaseOfferIOS?, originalTransactionDateIOS: Double?, originalTransactionIdentifierIOS: String?, ownershipTypeIOS: String?, platform: IapPlatform, productId: String, purchaseState: PurchaseState, purchaseToken: String?, quantity: Double, quantityIOS: Double?, reasonIOS: String?, reasonStringRepresentationIOS: String?, revocationDateIOS: Double?, revocationReasonIOS: String?, storefrontCountryCodeIOS: String?, subscriptionGroupIdIOS: String?, transactionDate: Double, transactionReasonIOS: String?, webOrderLineItemIdIOS: String?) {
|
|
22
|
+
self.init({ () -> bridge.std__optional_std__string_ in
|
|
23
|
+
if let __unwrappedValue = appAccountToken {
|
|
24
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
25
|
+
} else {
|
|
26
|
+
return .init()
|
|
27
|
+
}
|
|
28
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
29
|
+
if let __unwrappedValue = appBundleIdIOS {
|
|
30
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
31
|
+
} else {
|
|
32
|
+
return .init()
|
|
33
|
+
}
|
|
34
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
35
|
+
if let __unwrappedValue = countryCodeIOS {
|
|
36
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
37
|
+
} else {
|
|
38
|
+
return .init()
|
|
39
|
+
}
|
|
40
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
41
|
+
if let __unwrappedValue = currencyCodeIOS {
|
|
42
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
43
|
+
} else {
|
|
44
|
+
return .init()
|
|
45
|
+
}
|
|
46
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
47
|
+
if let __unwrappedValue = currencySymbolIOS {
|
|
48
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
49
|
+
} else {
|
|
50
|
+
return .init()
|
|
51
|
+
}
|
|
52
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
53
|
+
if let __unwrappedValue = environmentIOS {
|
|
54
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
55
|
+
} else {
|
|
56
|
+
return .init()
|
|
57
|
+
}
|
|
58
|
+
}(), { () -> bridge.std__optional_double_ in
|
|
59
|
+
if let __unwrappedValue = expirationDateIOS {
|
|
60
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
61
|
+
} else {
|
|
62
|
+
return .init()
|
|
63
|
+
}
|
|
64
|
+
}(), std.string(id), { () -> bridge.std__optional_std__vector_std__string__ in
|
|
65
|
+
if let __unwrappedValue = ids {
|
|
66
|
+
return bridge.create_std__optional_std__vector_std__string__({ () -> bridge.std__vector_std__string_ in
|
|
67
|
+
var __vector = bridge.create_std__vector_std__string_(__unwrappedValue.count)
|
|
68
|
+
for __item in __unwrappedValue {
|
|
69
|
+
__vector.push_back(std.string(__item))
|
|
70
|
+
}
|
|
71
|
+
return __vector
|
|
72
|
+
}())
|
|
73
|
+
} else {
|
|
74
|
+
return .init()
|
|
75
|
+
}
|
|
76
|
+
}(), isAutoRenewing, { () -> bridge.std__optional_bool_ in
|
|
77
|
+
if let __unwrappedValue = isUpgradedIOS {
|
|
78
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
79
|
+
} else {
|
|
80
|
+
return .init()
|
|
81
|
+
}
|
|
82
|
+
}(), { () -> bridge.std__optional_PurchaseOfferIOS_ in
|
|
83
|
+
if let __unwrappedValue = offerIOS {
|
|
84
|
+
return bridge.create_std__optional_PurchaseOfferIOS_(__unwrappedValue)
|
|
85
|
+
} else {
|
|
86
|
+
return .init()
|
|
87
|
+
}
|
|
88
|
+
}(), { () -> bridge.std__optional_double_ in
|
|
89
|
+
if let __unwrappedValue = originalTransactionDateIOS {
|
|
90
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
91
|
+
} else {
|
|
92
|
+
return .init()
|
|
93
|
+
}
|
|
94
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
95
|
+
if let __unwrappedValue = originalTransactionIdentifierIOS {
|
|
96
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
97
|
+
} else {
|
|
98
|
+
return .init()
|
|
99
|
+
}
|
|
100
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
101
|
+
if let __unwrappedValue = ownershipTypeIOS {
|
|
102
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
103
|
+
} else {
|
|
104
|
+
return .init()
|
|
105
|
+
}
|
|
106
|
+
}(), platform, std.string(productId), purchaseState, { () -> bridge.std__optional_std__string_ in
|
|
107
|
+
if let __unwrappedValue = purchaseToken {
|
|
108
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
109
|
+
} else {
|
|
110
|
+
return .init()
|
|
111
|
+
}
|
|
112
|
+
}(), quantity, { () -> bridge.std__optional_double_ in
|
|
113
|
+
if let __unwrappedValue = quantityIOS {
|
|
114
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
115
|
+
} else {
|
|
116
|
+
return .init()
|
|
117
|
+
}
|
|
118
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
119
|
+
if let __unwrappedValue = reasonIOS {
|
|
120
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
121
|
+
} else {
|
|
122
|
+
return .init()
|
|
123
|
+
}
|
|
124
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
125
|
+
if let __unwrappedValue = reasonStringRepresentationIOS {
|
|
126
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
127
|
+
} else {
|
|
128
|
+
return .init()
|
|
129
|
+
}
|
|
130
|
+
}(), { () -> bridge.std__optional_double_ in
|
|
131
|
+
if let __unwrappedValue = revocationDateIOS {
|
|
132
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
133
|
+
} else {
|
|
134
|
+
return .init()
|
|
135
|
+
}
|
|
136
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
137
|
+
if let __unwrappedValue = revocationReasonIOS {
|
|
138
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
139
|
+
} else {
|
|
140
|
+
return .init()
|
|
141
|
+
}
|
|
142
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
143
|
+
if let __unwrappedValue = storefrontCountryCodeIOS {
|
|
144
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
145
|
+
} else {
|
|
146
|
+
return .init()
|
|
147
|
+
}
|
|
148
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
149
|
+
if let __unwrappedValue = subscriptionGroupIdIOS {
|
|
150
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
151
|
+
} else {
|
|
152
|
+
return .init()
|
|
153
|
+
}
|
|
154
|
+
}(), transactionDate, { () -> bridge.std__optional_std__string_ in
|
|
155
|
+
if let __unwrappedValue = transactionReasonIOS {
|
|
156
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
157
|
+
} else {
|
|
158
|
+
return .init()
|
|
159
|
+
}
|
|
160
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
161
|
+
if let __unwrappedValue = webOrderLineItemIdIOS {
|
|
162
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
163
|
+
} else {
|
|
164
|
+
return .init()
|
|
165
|
+
}
|
|
166
|
+
}())
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
var appAccountToken: String? {
|
|
170
|
+
@inline(__always)
|
|
171
|
+
get {
|
|
172
|
+
return { () -> String? in
|
|
173
|
+
if bridge.has_value_std__optional_std__string_(self.__appAccountToken) {
|
|
174
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__appAccountToken)
|
|
175
|
+
return String(__unwrapped)
|
|
176
|
+
} else {
|
|
177
|
+
return nil
|
|
178
|
+
}
|
|
179
|
+
}()
|
|
180
|
+
}
|
|
181
|
+
@inline(__always)
|
|
182
|
+
set {
|
|
183
|
+
self.__appAccountToken = { () -> bridge.std__optional_std__string_ in
|
|
184
|
+
if let __unwrappedValue = newValue {
|
|
185
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
186
|
+
} else {
|
|
187
|
+
return .init()
|
|
188
|
+
}
|
|
189
|
+
}()
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
var appBundleIdIOS: String? {
|
|
194
|
+
@inline(__always)
|
|
195
|
+
get {
|
|
196
|
+
return { () -> String? in
|
|
197
|
+
if bridge.has_value_std__optional_std__string_(self.__appBundleIdIOS) {
|
|
198
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__appBundleIdIOS)
|
|
199
|
+
return String(__unwrapped)
|
|
200
|
+
} else {
|
|
201
|
+
return nil
|
|
202
|
+
}
|
|
203
|
+
}()
|
|
204
|
+
}
|
|
205
|
+
@inline(__always)
|
|
206
|
+
set {
|
|
207
|
+
self.__appBundleIdIOS = { () -> bridge.std__optional_std__string_ in
|
|
208
|
+
if let __unwrappedValue = newValue {
|
|
209
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
210
|
+
} else {
|
|
211
|
+
return .init()
|
|
212
|
+
}
|
|
213
|
+
}()
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
var countryCodeIOS: String? {
|
|
218
|
+
@inline(__always)
|
|
219
|
+
get {
|
|
220
|
+
return { () -> String? in
|
|
221
|
+
if bridge.has_value_std__optional_std__string_(self.__countryCodeIOS) {
|
|
222
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__countryCodeIOS)
|
|
223
|
+
return String(__unwrapped)
|
|
224
|
+
} else {
|
|
225
|
+
return nil
|
|
226
|
+
}
|
|
227
|
+
}()
|
|
228
|
+
}
|
|
229
|
+
@inline(__always)
|
|
230
|
+
set {
|
|
231
|
+
self.__countryCodeIOS = { () -> bridge.std__optional_std__string_ in
|
|
232
|
+
if let __unwrappedValue = newValue {
|
|
233
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
234
|
+
} else {
|
|
235
|
+
return .init()
|
|
236
|
+
}
|
|
237
|
+
}()
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
var currencyCodeIOS: String? {
|
|
242
|
+
@inline(__always)
|
|
243
|
+
get {
|
|
244
|
+
return { () -> String? in
|
|
245
|
+
if bridge.has_value_std__optional_std__string_(self.__currencyCodeIOS) {
|
|
246
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__currencyCodeIOS)
|
|
247
|
+
return String(__unwrapped)
|
|
248
|
+
} else {
|
|
249
|
+
return nil
|
|
250
|
+
}
|
|
251
|
+
}()
|
|
252
|
+
}
|
|
253
|
+
@inline(__always)
|
|
254
|
+
set {
|
|
255
|
+
self.__currencyCodeIOS = { () -> bridge.std__optional_std__string_ in
|
|
256
|
+
if let __unwrappedValue = newValue {
|
|
257
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
258
|
+
} else {
|
|
259
|
+
return .init()
|
|
260
|
+
}
|
|
261
|
+
}()
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
var currencySymbolIOS: String? {
|
|
266
|
+
@inline(__always)
|
|
267
|
+
get {
|
|
268
|
+
return { () -> String? in
|
|
269
|
+
if bridge.has_value_std__optional_std__string_(self.__currencySymbolIOS) {
|
|
270
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__currencySymbolIOS)
|
|
271
|
+
return String(__unwrapped)
|
|
272
|
+
} else {
|
|
273
|
+
return nil
|
|
274
|
+
}
|
|
275
|
+
}()
|
|
276
|
+
}
|
|
277
|
+
@inline(__always)
|
|
278
|
+
set {
|
|
279
|
+
self.__currencySymbolIOS = { () -> bridge.std__optional_std__string_ in
|
|
280
|
+
if let __unwrappedValue = newValue {
|
|
281
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
282
|
+
} else {
|
|
283
|
+
return .init()
|
|
284
|
+
}
|
|
285
|
+
}()
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
var environmentIOS: String? {
|
|
290
|
+
@inline(__always)
|
|
291
|
+
get {
|
|
292
|
+
return { () -> String? in
|
|
293
|
+
if bridge.has_value_std__optional_std__string_(self.__environmentIOS) {
|
|
294
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__environmentIOS)
|
|
295
|
+
return String(__unwrapped)
|
|
296
|
+
} else {
|
|
297
|
+
return nil
|
|
298
|
+
}
|
|
299
|
+
}()
|
|
300
|
+
}
|
|
301
|
+
@inline(__always)
|
|
302
|
+
set {
|
|
303
|
+
self.__environmentIOS = { () -> bridge.std__optional_std__string_ in
|
|
304
|
+
if let __unwrappedValue = newValue {
|
|
305
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
306
|
+
} else {
|
|
307
|
+
return .init()
|
|
308
|
+
}
|
|
309
|
+
}()
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
var expirationDateIOS: Double? {
|
|
314
|
+
@inline(__always)
|
|
315
|
+
get {
|
|
316
|
+
return self.__expirationDateIOS.value
|
|
317
|
+
}
|
|
318
|
+
@inline(__always)
|
|
319
|
+
set {
|
|
320
|
+
self.__expirationDateIOS = { () -> bridge.std__optional_double_ in
|
|
321
|
+
if let __unwrappedValue = newValue {
|
|
322
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
323
|
+
} else {
|
|
324
|
+
return .init()
|
|
325
|
+
}
|
|
326
|
+
}()
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
var id: String {
|
|
331
|
+
@inline(__always)
|
|
332
|
+
get {
|
|
333
|
+
return String(self.__id)
|
|
334
|
+
}
|
|
335
|
+
@inline(__always)
|
|
336
|
+
set {
|
|
337
|
+
self.__id = std.string(newValue)
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
var ids: [String]? {
|
|
342
|
+
@inline(__always)
|
|
343
|
+
get {
|
|
344
|
+
return { () -> [String]? in
|
|
345
|
+
if bridge.has_value_std__optional_std__vector_std__string__(self.__ids) {
|
|
346
|
+
let __unwrapped = bridge.get_std__optional_std__vector_std__string__(self.__ids)
|
|
347
|
+
return __unwrapped.map({ __item in String(__item) })
|
|
348
|
+
} else {
|
|
349
|
+
return nil
|
|
350
|
+
}
|
|
351
|
+
}()
|
|
352
|
+
}
|
|
353
|
+
@inline(__always)
|
|
354
|
+
set {
|
|
355
|
+
self.__ids = { () -> bridge.std__optional_std__vector_std__string__ in
|
|
356
|
+
if let __unwrappedValue = newValue {
|
|
357
|
+
return bridge.create_std__optional_std__vector_std__string__({ () -> bridge.std__vector_std__string_ in
|
|
358
|
+
var __vector = bridge.create_std__vector_std__string_(__unwrappedValue.count)
|
|
359
|
+
for __item in __unwrappedValue {
|
|
360
|
+
__vector.push_back(std.string(__item))
|
|
361
|
+
}
|
|
362
|
+
return __vector
|
|
363
|
+
}())
|
|
364
|
+
} else {
|
|
365
|
+
return .init()
|
|
366
|
+
}
|
|
367
|
+
}()
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
var isAutoRenewing: Bool {
|
|
372
|
+
@inline(__always)
|
|
373
|
+
get {
|
|
374
|
+
return self.__isAutoRenewing
|
|
375
|
+
}
|
|
376
|
+
@inline(__always)
|
|
377
|
+
set {
|
|
378
|
+
self.__isAutoRenewing = newValue
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
var isUpgradedIOS: Bool? {
|
|
383
|
+
@inline(__always)
|
|
384
|
+
get {
|
|
385
|
+
return self.__isUpgradedIOS.value
|
|
386
|
+
}
|
|
387
|
+
@inline(__always)
|
|
388
|
+
set {
|
|
389
|
+
self.__isUpgradedIOS = { () -> bridge.std__optional_bool_ in
|
|
390
|
+
if let __unwrappedValue = newValue {
|
|
391
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
392
|
+
} else {
|
|
393
|
+
return .init()
|
|
394
|
+
}
|
|
395
|
+
}()
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
var offerIOS: PurchaseOfferIOS? {
|
|
400
|
+
@inline(__always)
|
|
401
|
+
get {
|
|
402
|
+
return { () -> PurchaseOfferIOS? in
|
|
403
|
+
if bridge.has_value_std__optional_PurchaseOfferIOS_(self.__offerIOS) {
|
|
404
|
+
let __unwrapped = bridge.get_std__optional_PurchaseOfferIOS_(self.__offerIOS)
|
|
405
|
+
return __unwrapped
|
|
406
|
+
} else {
|
|
407
|
+
return nil
|
|
408
|
+
}
|
|
409
|
+
}()
|
|
410
|
+
}
|
|
411
|
+
@inline(__always)
|
|
412
|
+
set {
|
|
413
|
+
self.__offerIOS = { () -> bridge.std__optional_PurchaseOfferIOS_ in
|
|
414
|
+
if let __unwrappedValue = newValue {
|
|
415
|
+
return bridge.create_std__optional_PurchaseOfferIOS_(__unwrappedValue)
|
|
416
|
+
} else {
|
|
417
|
+
return .init()
|
|
418
|
+
}
|
|
419
|
+
}()
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
var originalTransactionDateIOS: Double? {
|
|
424
|
+
@inline(__always)
|
|
425
|
+
get {
|
|
426
|
+
return self.__originalTransactionDateIOS.value
|
|
427
|
+
}
|
|
428
|
+
@inline(__always)
|
|
429
|
+
set {
|
|
430
|
+
self.__originalTransactionDateIOS = { () -> bridge.std__optional_double_ in
|
|
431
|
+
if let __unwrappedValue = newValue {
|
|
432
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
433
|
+
} else {
|
|
434
|
+
return .init()
|
|
435
|
+
}
|
|
436
|
+
}()
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
var originalTransactionIdentifierIOS: String? {
|
|
441
|
+
@inline(__always)
|
|
442
|
+
get {
|
|
443
|
+
return { () -> String? in
|
|
444
|
+
if bridge.has_value_std__optional_std__string_(self.__originalTransactionIdentifierIOS) {
|
|
445
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__originalTransactionIdentifierIOS)
|
|
446
|
+
return String(__unwrapped)
|
|
447
|
+
} else {
|
|
448
|
+
return nil
|
|
449
|
+
}
|
|
450
|
+
}()
|
|
451
|
+
}
|
|
452
|
+
@inline(__always)
|
|
453
|
+
set {
|
|
454
|
+
self.__originalTransactionIdentifierIOS = { () -> bridge.std__optional_std__string_ in
|
|
455
|
+
if let __unwrappedValue = newValue {
|
|
456
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
457
|
+
} else {
|
|
458
|
+
return .init()
|
|
459
|
+
}
|
|
460
|
+
}()
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
var ownershipTypeIOS: String? {
|
|
465
|
+
@inline(__always)
|
|
466
|
+
get {
|
|
467
|
+
return { () -> String? in
|
|
468
|
+
if bridge.has_value_std__optional_std__string_(self.__ownershipTypeIOS) {
|
|
469
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__ownershipTypeIOS)
|
|
470
|
+
return String(__unwrapped)
|
|
471
|
+
} else {
|
|
472
|
+
return nil
|
|
473
|
+
}
|
|
474
|
+
}()
|
|
475
|
+
}
|
|
476
|
+
@inline(__always)
|
|
477
|
+
set {
|
|
478
|
+
self.__ownershipTypeIOS = { () -> bridge.std__optional_std__string_ in
|
|
479
|
+
if let __unwrappedValue = newValue {
|
|
480
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
481
|
+
} else {
|
|
482
|
+
return .init()
|
|
483
|
+
}
|
|
484
|
+
}()
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
var platform: IapPlatform {
|
|
489
|
+
@inline(__always)
|
|
490
|
+
get {
|
|
491
|
+
return self.__platform
|
|
492
|
+
}
|
|
493
|
+
@inline(__always)
|
|
494
|
+
set {
|
|
495
|
+
self.__platform = newValue
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
var productId: String {
|
|
500
|
+
@inline(__always)
|
|
501
|
+
get {
|
|
502
|
+
return String(self.__productId)
|
|
503
|
+
}
|
|
504
|
+
@inline(__always)
|
|
505
|
+
set {
|
|
506
|
+
self.__productId = std.string(newValue)
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
var purchaseState: PurchaseState {
|
|
511
|
+
@inline(__always)
|
|
512
|
+
get {
|
|
513
|
+
return self.__purchaseState
|
|
514
|
+
}
|
|
515
|
+
@inline(__always)
|
|
516
|
+
set {
|
|
517
|
+
self.__purchaseState = newValue
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
var purchaseToken: String? {
|
|
522
|
+
@inline(__always)
|
|
523
|
+
get {
|
|
524
|
+
return { () -> String? in
|
|
525
|
+
if bridge.has_value_std__optional_std__string_(self.__purchaseToken) {
|
|
526
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__purchaseToken)
|
|
527
|
+
return String(__unwrapped)
|
|
528
|
+
} else {
|
|
529
|
+
return nil
|
|
530
|
+
}
|
|
531
|
+
}()
|
|
532
|
+
}
|
|
533
|
+
@inline(__always)
|
|
534
|
+
set {
|
|
535
|
+
self.__purchaseToken = { () -> bridge.std__optional_std__string_ in
|
|
536
|
+
if let __unwrappedValue = newValue {
|
|
537
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
538
|
+
} else {
|
|
539
|
+
return .init()
|
|
540
|
+
}
|
|
541
|
+
}()
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
var quantity: Double {
|
|
546
|
+
@inline(__always)
|
|
547
|
+
get {
|
|
548
|
+
return self.__quantity
|
|
549
|
+
}
|
|
550
|
+
@inline(__always)
|
|
551
|
+
set {
|
|
552
|
+
self.__quantity = newValue
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
var quantityIOS: Double? {
|
|
557
|
+
@inline(__always)
|
|
558
|
+
get {
|
|
559
|
+
return self.__quantityIOS.value
|
|
560
|
+
}
|
|
561
|
+
@inline(__always)
|
|
562
|
+
set {
|
|
563
|
+
self.__quantityIOS = { () -> bridge.std__optional_double_ in
|
|
564
|
+
if let __unwrappedValue = newValue {
|
|
565
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
566
|
+
} else {
|
|
567
|
+
return .init()
|
|
568
|
+
}
|
|
569
|
+
}()
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
var reasonIOS: String? {
|
|
574
|
+
@inline(__always)
|
|
575
|
+
get {
|
|
576
|
+
return { () -> String? in
|
|
577
|
+
if bridge.has_value_std__optional_std__string_(self.__reasonIOS) {
|
|
578
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__reasonIOS)
|
|
579
|
+
return String(__unwrapped)
|
|
580
|
+
} else {
|
|
581
|
+
return nil
|
|
582
|
+
}
|
|
583
|
+
}()
|
|
584
|
+
}
|
|
585
|
+
@inline(__always)
|
|
586
|
+
set {
|
|
587
|
+
self.__reasonIOS = { () -> bridge.std__optional_std__string_ in
|
|
588
|
+
if let __unwrappedValue = newValue {
|
|
589
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
590
|
+
} else {
|
|
591
|
+
return .init()
|
|
592
|
+
}
|
|
593
|
+
}()
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
var reasonStringRepresentationIOS: String? {
|
|
598
|
+
@inline(__always)
|
|
599
|
+
get {
|
|
600
|
+
return { () -> String? in
|
|
601
|
+
if bridge.has_value_std__optional_std__string_(self.__reasonStringRepresentationIOS) {
|
|
602
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__reasonStringRepresentationIOS)
|
|
603
|
+
return String(__unwrapped)
|
|
604
|
+
} else {
|
|
605
|
+
return nil
|
|
606
|
+
}
|
|
607
|
+
}()
|
|
608
|
+
}
|
|
609
|
+
@inline(__always)
|
|
610
|
+
set {
|
|
611
|
+
self.__reasonStringRepresentationIOS = { () -> bridge.std__optional_std__string_ in
|
|
612
|
+
if let __unwrappedValue = newValue {
|
|
613
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
614
|
+
} else {
|
|
615
|
+
return .init()
|
|
616
|
+
}
|
|
617
|
+
}()
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
var revocationDateIOS: Double? {
|
|
622
|
+
@inline(__always)
|
|
623
|
+
get {
|
|
624
|
+
return self.__revocationDateIOS.value
|
|
625
|
+
}
|
|
626
|
+
@inline(__always)
|
|
627
|
+
set {
|
|
628
|
+
self.__revocationDateIOS = { () -> bridge.std__optional_double_ in
|
|
629
|
+
if let __unwrappedValue = newValue {
|
|
630
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
631
|
+
} else {
|
|
632
|
+
return .init()
|
|
633
|
+
}
|
|
634
|
+
}()
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
var revocationReasonIOS: String? {
|
|
639
|
+
@inline(__always)
|
|
640
|
+
get {
|
|
641
|
+
return { () -> String? in
|
|
642
|
+
if bridge.has_value_std__optional_std__string_(self.__revocationReasonIOS) {
|
|
643
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__revocationReasonIOS)
|
|
644
|
+
return String(__unwrapped)
|
|
645
|
+
} else {
|
|
646
|
+
return nil
|
|
647
|
+
}
|
|
648
|
+
}()
|
|
649
|
+
}
|
|
650
|
+
@inline(__always)
|
|
651
|
+
set {
|
|
652
|
+
self.__revocationReasonIOS = { () -> bridge.std__optional_std__string_ in
|
|
653
|
+
if let __unwrappedValue = newValue {
|
|
654
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
655
|
+
} else {
|
|
656
|
+
return .init()
|
|
657
|
+
}
|
|
658
|
+
}()
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
var storefrontCountryCodeIOS: String? {
|
|
663
|
+
@inline(__always)
|
|
664
|
+
get {
|
|
665
|
+
return { () -> String? in
|
|
666
|
+
if bridge.has_value_std__optional_std__string_(self.__storefrontCountryCodeIOS) {
|
|
667
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__storefrontCountryCodeIOS)
|
|
668
|
+
return String(__unwrapped)
|
|
669
|
+
} else {
|
|
670
|
+
return nil
|
|
671
|
+
}
|
|
672
|
+
}()
|
|
673
|
+
}
|
|
674
|
+
@inline(__always)
|
|
675
|
+
set {
|
|
676
|
+
self.__storefrontCountryCodeIOS = { () -> bridge.std__optional_std__string_ in
|
|
677
|
+
if let __unwrappedValue = newValue {
|
|
678
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
679
|
+
} else {
|
|
680
|
+
return .init()
|
|
681
|
+
}
|
|
682
|
+
}()
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
var subscriptionGroupIdIOS: String? {
|
|
687
|
+
@inline(__always)
|
|
688
|
+
get {
|
|
689
|
+
return { () -> String? in
|
|
690
|
+
if bridge.has_value_std__optional_std__string_(self.__subscriptionGroupIdIOS) {
|
|
691
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__subscriptionGroupIdIOS)
|
|
692
|
+
return String(__unwrapped)
|
|
693
|
+
} else {
|
|
694
|
+
return nil
|
|
695
|
+
}
|
|
696
|
+
}()
|
|
697
|
+
}
|
|
698
|
+
@inline(__always)
|
|
699
|
+
set {
|
|
700
|
+
self.__subscriptionGroupIdIOS = { () -> bridge.std__optional_std__string_ in
|
|
701
|
+
if let __unwrappedValue = newValue {
|
|
702
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
703
|
+
} else {
|
|
704
|
+
return .init()
|
|
705
|
+
}
|
|
706
|
+
}()
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
var transactionDate: Double {
|
|
711
|
+
@inline(__always)
|
|
712
|
+
get {
|
|
713
|
+
return self.__transactionDate
|
|
714
|
+
}
|
|
715
|
+
@inline(__always)
|
|
716
|
+
set {
|
|
717
|
+
self.__transactionDate = newValue
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
var transactionReasonIOS: String? {
|
|
722
|
+
@inline(__always)
|
|
723
|
+
get {
|
|
724
|
+
return { () -> String? in
|
|
725
|
+
if bridge.has_value_std__optional_std__string_(self.__transactionReasonIOS) {
|
|
726
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__transactionReasonIOS)
|
|
727
|
+
return String(__unwrapped)
|
|
728
|
+
} else {
|
|
729
|
+
return nil
|
|
730
|
+
}
|
|
731
|
+
}()
|
|
732
|
+
}
|
|
733
|
+
@inline(__always)
|
|
734
|
+
set {
|
|
735
|
+
self.__transactionReasonIOS = { () -> bridge.std__optional_std__string_ in
|
|
736
|
+
if let __unwrappedValue = newValue {
|
|
737
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
738
|
+
} else {
|
|
739
|
+
return .init()
|
|
740
|
+
}
|
|
741
|
+
}()
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
var webOrderLineItemIdIOS: String? {
|
|
746
|
+
@inline(__always)
|
|
747
|
+
get {
|
|
748
|
+
return { () -> String? in
|
|
749
|
+
if bridge.has_value_std__optional_std__string_(self.__webOrderLineItemIdIOS) {
|
|
750
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__webOrderLineItemIdIOS)
|
|
751
|
+
return String(__unwrapped)
|
|
752
|
+
} else {
|
|
753
|
+
return nil
|
|
754
|
+
}
|
|
755
|
+
}()
|
|
756
|
+
}
|
|
757
|
+
@inline(__always)
|
|
758
|
+
set {
|
|
759
|
+
self.__webOrderLineItemIdIOS = { () -> bridge.std__optional_std__string_ in
|
|
760
|
+
if let __unwrappedValue = newValue {
|
|
761
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
762
|
+
} else {
|
|
763
|
+
return .init()
|
|
764
|
+
}
|
|
765
|
+
}()
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
}
|