react-native-iap 14.4.47 → 14.5.1-rc.1
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/android/src/main/java/com/margelo/nitro/iap/HybridRnIap.kt +76 -16
- package/ios/HybridRnIap.swift +17 -5
- package/ios/RnIapHelper.swift +8 -0
- package/ios/reactnativeiap.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/ios/reactnativeiap.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/lib/module/index.js +6 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.js +35 -0
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils/type-bridge.js +21 -1
- package/lib/module/utils/type-bridge.js.map +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/specs/RnIap.nitro.d.ts +71 -4
- package/lib/typescript/src/specs/RnIap.nitro.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +155 -10
- 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/c++/JFunc_void_NitroProduct.hpp +13 -0
- package/nitrogen/generated/android/c++/JFunc_void_NitroPurchase.hpp +2 -0
- package/nitrogen/generated/android/c++/JHybridRnIapSpec.cpp +32 -4
- package/nitrogen/generated/android/c++/{JIapkitStore.hpp → JIapStore.hpp} +19 -13
- package/nitrogen/generated/android/c++/JNitroDiscountAmountAndroid.hpp +61 -0
- package/nitrogen/generated/android/c++/JNitroDiscountDisplayInfoAndroid.hpp +64 -0
- package/nitrogen/generated/android/c++/JNitroLimitedQuantityInfoAndroid.hpp +61 -0
- package/nitrogen/generated/android/c++/JNitroOneTimePurchaseOfferDetail.hpp +70 -3
- package/nitrogen/generated/android/c++/JNitroPreorderDetailsAndroid.hpp +61 -0
- package/nitrogen/generated/android/c++/JNitroProduct.hpp +35 -5
- package/nitrogen/generated/android/c++/JNitroPurchase.hpp +13 -3
- package/nitrogen/generated/android/c++/JNitroPurchaseRequest.hpp +11 -3
- package/nitrogen/generated/android/c++/JNitroReceiptValidationResultIOS.hpp +2 -0
- package/nitrogen/generated/android/c++/JNitroRentalDetailsAndroid.hpp +62 -0
- package/nitrogen/generated/android/c++/JNitroValidTimeWindowAndroid.hpp +61 -0
- package/nitrogen/generated/android/c++/JNitroVerifyPurchaseWithIapkitResult.hpp +6 -6
- package/nitrogen/generated/android/c++/JNitroVerifyPurchaseWithProviderError.hpp +62 -0
- package/nitrogen/generated/android/c++/JNitroVerifyPurchaseWithProviderResult.hpp +24 -16
- package/nitrogen/generated/android/c++/JPurchase.hpp +2 -0
- package/nitrogen/generated/android/c++/JPurchaseAndroid.hpp +11 -1
- package/nitrogen/generated/android/c++/JPurchaseIOS.hpp +7 -1
- package/nitrogen/generated/android/c++/JRequestPurchaseResult.hpp +2 -0
- package/nitrogen/generated/android/c++/JVariant_NitroReceiptValidationResultIOS_NitroReceiptValidationResultAndroid.hpp +2 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/{IapkitStore.kt → IapStore.kt} +7 -5
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroDiscountAmountAndroid.kt +39 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroDiscountDisplayInfoAndroid.kt +39 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroLimitedQuantityInfoAndroid.kt +39 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroOneTimePurchaseOfferDetail.kt +30 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroPreorderDetailsAndroid.kt +39 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroProduct.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroPurchase.kt +9 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroPurchaseRequest.kt +9 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroRentalDetailsAndroid.kt +39 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroValidTimeWindowAndroid.kt +39 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroVerifyPurchaseWithIapkitResult.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroVerifyPurchaseWithProviderError.kt +39 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/NitroVerifyPurchaseWithProviderResult.kt +6 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/PurchaseAndroid.kt +8 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/iap/PurchaseIOS.kt +5 -2
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Bridge.hpp +178 -26
- package/nitrogen/generated/ios/NitroIap-Swift-Cxx-Umbrella.hpp +24 -3
- package/nitrogen/generated/ios/c++/HybridRnIapSpecSwift.hpp +24 -3
- package/nitrogen/generated/ios/swift/{IapkitStore.swift → IapStore.swift} +14 -6
- package/nitrogen/generated/ios/swift/NitroDiscountAmountAndroid.swift +46 -0
- package/nitrogen/generated/ios/swift/NitroDiscountDisplayInfoAndroid.swift +70 -0
- package/nitrogen/generated/ios/swift/NitroLimitedQuantityInfoAndroid.swift +46 -0
- package/nitrogen/generated/ios/swift/NitroOneTimePurchaseOfferDetail.swift +211 -2
- package/nitrogen/generated/ios/swift/NitroPreorderDetailsAndroid.swift +46 -0
- package/nitrogen/generated/ios/swift/NitroProduct.swift +26 -7
- package/nitrogen/generated/ios/swift/NitroPurchase.swift +43 -2
- package/nitrogen/generated/ios/swift/NitroPurchaseRequest.swift +47 -1
- package/nitrogen/generated/ios/swift/NitroRentalDetailsAndroid.swift +65 -0
- package/nitrogen/generated/ios/swift/NitroValidTimeWindowAndroid.swift +46 -0
- package/nitrogen/generated/ios/swift/NitroVerifyPurchaseWithIapkitResult.swift +2 -2
- package/nitrogen/generated/ios/swift/NitroVerifyPurchaseWithProviderError.swift +65 -0
- package/nitrogen/generated/ios/swift/NitroVerifyPurchaseWithProviderResult.swift +55 -13
- package/nitrogen/generated/ios/swift/PurchaseAndroid.swift +44 -3
- package/nitrogen/generated/ios/swift/PurchaseIOS.swift +13 -2
- package/nitrogen/generated/shared/c++/{IapkitStore.hpp → IapStore.hpp} +23 -15
- package/nitrogen/generated/shared/c++/NitroDiscountAmountAndroid.hpp +79 -0
- package/nitrogen/generated/shared/c++/NitroDiscountDisplayInfoAndroid.hpp +81 -0
- package/nitrogen/generated/shared/c++/NitroLimitedQuantityInfoAndroid.hpp +79 -0
- package/nitrogen/generated/shared/c++/NitroOneTimePurchaseOfferDetail.hpp +55 -3
- package/nitrogen/generated/shared/c++/NitroPreorderDetailsAndroid.hpp +79 -0
- package/nitrogen/generated/shared/c++/NitroProduct.hpp +6 -5
- package/nitrogen/generated/shared/c++/NitroPurchase.hpp +13 -2
- package/nitrogen/generated/shared/c++/NitroPurchaseRequest.hpp +10 -2
- package/nitrogen/generated/shared/c++/NitroRentalDetailsAndroid.hpp +80 -0
- package/nitrogen/generated/shared/c++/NitroValidTimeWindowAndroid.hpp +79 -0
- package/nitrogen/generated/shared/c++/NitroVerifyPurchaseWithIapkitResult.hpp +8 -8
- package/nitrogen/generated/shared/c++/NitroVerifyPurchaseWithProviderError.hpp +80 -0
- package/nitrogen/generated/shared/c++/NitroVerifyPurchaseWithProviderResult.hpp +13 -5
- package/nitrogen/generated/shared/c++/PurchaseAndroid.hpp +12 -1
- package/nitrogen/generated/shared/c++/PurchaseIOS.hpp +8 -1
- package/openiap-versions.json +3 -3
- package/package.json +1 -1
- package/plugin/build/src/withIAP.d.ts +3 -0
- package/plugin/build/src/withIAP.js +81 -0
- package/plugin/build/tsconfig.tsbuildinfo +1 -0
- package/plugin/tsconfig.tsbuildinfo +1 -1
- package/src/index.ts +8 -5
- package/src/specs/RnIap.nitro.ts +79 -4
- package/src/types.ts +163 -11
- package/src/utils/type-bridge.ts +23 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroDiscountDisplayInfoAndroid.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 `NitroDiscountDisplayInfoAndroid`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias NitroDiscountDisplayInfoAndroid = margelo.nitro.iap.NitroDiscountDisplayInfoAndroid
|
|
14
|
+
|
|
15
|
+
public extension NitroDiscountDisplayInfoAndroid {
|
|
16
|
+
private typealias bridge = margelo.nitro.iap.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `NitroDiscountDisplayInfoAndroid`.
|
|
20
|
+
*/
|
|
21
|
+
init(discountAmount: NitroDiscountAmountAndroid?, percentageDiscount: Double?) {
|
|
22
|
+
self.init({ () -> bridge.std__optional_NitroDiscountAmountAndroid_ in
|
|
23
|
+
if let __unwrappedValue = discountAmount {
|
|
24
|
+
return bridge.create_std__optional_NitroDiscountAmountAndroid_(__unwrappedValue)
|
|
25
|
+
} else {
|
|
26
|
+
return .init()
|
|
27
|
+
}
|
|
28
|
+
}(), { () -> bridge.std__optional_double_ in
|
|
29
|
+
if let __unwrappedValue = percentageDiscount {
|
|
30
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
31
|
+
} else {
|
|
32
|
+
return .init()
|
|
33
|
+
}
|
|
34
|
+
}())
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
var discountAmount: NitroDiscountAmountAndroid? {
|
|
38
|
+
@inline(__always)
|
|
39
|
+
get {
|
|
40
|
+
return self.__discountAmount.value
|
|
41
|
+
}
|
|
42
|
+
@inline(__always)
|
|
43
|
+
set {
|
|
44
|
+
self.__discountAmount = { () -> bridge.std__optional_NitroDiscountAmountAndroid_ in
|
|
45
|
+
if let __unwrappedValue = newValue {
|
|
46
|
+
return bridge.create_std__optional_NitroDiscountAmountAndroid_(__unwrappedValue)
|
|
47
|
+
} else {
|
|
48
|
+
return .init()
|
|
49
|
+
}
|
|
50
|
+
}()
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
var percentageDiscount: Double? {
|
|
55
|
+
@inline(__always)
|
|
56
|
+
get {
|
|
57
|
+
return self.__percentageDiscount.value
|
|
58
|
+
}
|
|
59
|
+
@inline(__always)
|
|
60
|
+
set {
|
|
61
|
+
self.__percentageDiscount = { () -> bridge.std__optional_double_ in
|
|
62
|
+
if let __unwrappedValue = newValue {
|
|
63
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
64
|
+
} else {
|
|
65
|
+
return .init()
|
|
66
|
+
}
|
|
67
|
+
}()
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroLimitedQuantityInfoAndroid.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 `NitroLimitedQuantityInfoAndroid`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias NitroLimitedQuantityInfoAndroid = margelo.nitro.iap.NitroLimitedQuantityInfoAndroid
|
|
14
|
+
|
|
15
|
+
public extension NitroLimitedQuantityInfoAndroid {
|
|
16
|
+
private typealias bridge = margelo.nitro.iap.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `NitroLimitedQuantityInfoAndroid`.
|
|
20
|
+
*/
|
|
21
|
+
init(maximumQuantity: Double, remainingQuantity: Double) {
|
|
22
|
+
self.init(maximumQuantity, remainingQuantity)
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var maximumQuantity: Double {
|
|
26
|
+
@inline(__always)
|
|
27
|
+
get {
|
|
28
|
+
return self.__maximumQuantity
|
|
29
|
+
}
|
|
30
|
+
@inline(__always)
|
|
31
|
+
set {
|
|
32
|
+
self.__maximumQuantity = newValue
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var remainingQuantity: Double {
|
|
37
|
+
@inline(__always)
|
|
38
|
+
get {
|
|
39
|
+
return self.__remainingQuantity
|
|
40
|
+
}
|
|
41
|
+
@inline(__always)
|
|
42
|
+
set {
|
|
43
|
+
self.__remainingQuantity = newValue
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -18,10 +18,75 @@ public extension NitroOneTimePurchaseOfferDetail {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a new instance of `NitroOneTimePurchaseOfferDetail`.
|
|
20
20
|
*/
|
|
21
|
-
init(formattedPrice: String, priceAmountMicros: String, priceCurrencyCode: String) {
|
|
22
|
-
self.init(
|
|
21
|
+
init(discountDisplayInfo: NitroDiscountDisplayInfoAndroid?, formattedPrice: String, fullPriceMicros: String?, limitedQuantityInfo: NitroLimitedQuantityInfoAndroid?, offerId: String?, offerTags: [String], offerToken: String, preorderDetailsAndroid: NitroPreorderDetailsAndroid?, priceAmountMicros: String, priceCurrencyCode: String, rentalDetailsAndroid: NitroRentalDetailsAndroid?, validTimeWindow: NitroValidTimeWindowAndroid?) {
|
|
22
|
+
self.init({ () -> bridge.std__optional_NitroDiscountDisplayInfoAndroid_ in
|
|
23
|
+
if let __unwrappedValue = discountDisplayInfo {
|
|
24
|
+
return bridge.create_std__optional_NitroDiscountDisplayInfoAndroid_(__unwrappedValue)
|
|
25
|
+
} else {
|
|
26
|
+
return .init()
|
|
27
|
+
}
|
|
28
|
+
}(), std.string(formattedPrice), { () -> bridge.std__optional_std__string_ in
|
|
29
|
+
if let __unwrappedValue = fullPriceMicros {
|
|
30
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
31
|
+
} else {
|
|
32
|
+
return .init()
|
|
33
|
+
}
|
|
34
|
+
}(), { () -> bridge.std__optional_NitroLimitedQuantityInfoAndroid_ in
|
|
35
|
+
if let __unwrappedValue = limitedQuantityInfo {
|
|
36
|
+
return bridge.create_std__optional_NitroLimitedQuantityInfoAndroid_(__unwrappedValue)
|
|
37
|
+
} else {
|
|
38
|
+
return .init()
|
|
39
|
+
}
|
|
40
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
41
|
+
if let __unwrappedValue = offerId {
|
|
42
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
43
|
+
} else {
|
|
44
|
+
return .init()
|
|
45
|
+
}
|
|
46
|
+
}(), { () -> bridge.std__vector_std__string_ in
|
|
47
|
+
var __vector = bridge.create_std__vector_std__string_(offerTags.count)
|
|
48
|
+
for __item in offerTags {
|
|
49
|
+
__vector.push_back(std.string(__item))
|
|
50
|
+
}
|
|
51
|
+
return __vector
|
|
52
|
+
}(), std.string(offerToken), { () -> bridge.std__optional_NitroPreorderDetailsAndroid_ in
|
|
53
|
+
if let __unwrappedValue = preorderDetailsAndroid {
|
|
54
|
+
return bridge.create_std__optional_NitroPreorderDetailsAndroid_(__unwrappedValue)
|
|
55
|
+
} else {
|
|
56
|
+
return .init()
|
|
57
|
+
}
|
|
58
|
+
}(), std.string(priceAmountMicros), std.string(priceCurrencyCode), { () -> bridge.std__optional_NitroRentalDetailsAndroid_ in
|
|
59
|
+
if let __unwrappedValue = rentalDetailsAndroid {
|
|
60
|
+
return bridge.create_std__optional_NitroRentalDetailsAndroid_(__unwrappedValue)
|
|
61
|
+
} else {
|
|
62
|
+
return .init()
|
|
63
|
+
}
|
|
64
|
+
}(), { () -> bridge.std__optional_NitroValidTimeWindowAndroid_ in
|
|
65
|
+
if let __unwrappedValue = validTimeWindow {
|
|
66
|
+
return bridge.create_std__optional_NitroValidTimeWindowAndroid_(__unwrappedValue)
|
|
67
|
+
} else {
|
|
68
|
+
return .init()
|
|
69
|
+
}
|
|
70
|
+
}())
|
|
23
71
|
}
|
|
24
72
|
|
|
73
|
+
var discountDisplayInfo: NitroDiscountDisplayInfoAndroid? {
|
|
74
|
+
@inline(__always)
|
|
75
|
+
get {
|
|
76
|
+
return self.__discountDisplayInfo.value
|
|
77
|
+
}
|
|
78
|
+
@inline(__always)
|
|
79
|
+
set {
|
|
80
|
+
self.__discountDisplayInfo = { () -> bridge.std__optional_NitroDiscountDisplayInfoAndroid_ in
|
|
81
|
+
if let __unwrappedValue = newValue {
|
|
82
|
+
return bridge.create_std__optional_NitroDiscountDisplayInfoAndroid_(__unwrappedValue)
|
|
83
|
+
} else {
|
|
84
|
+
return .init()
|
|
85
|
+
}
|
|
86
|
+
}()
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
25
90
|
var formattedPrice: String {
|
|
26
91
|
@inline(__always)
|
|
27
92
|
get {
|
|
@@ -33,6 +98,116 @@ public extension NitroOneTimePurchaseOfferDetail {
|
|
|
33
98
|
}
|
|
34
99
|
}
|
|
35
100
|
|
|
101
|
+
var fullPriceMicros: String? {
|
|
102
|
+
@inline(__always)
|
|
103
|
+
get {
|
|
104
|
+
return { () -> String? in
|
|
105
|
+
if bridge.has_value_std__optional_std__string_(self.__fullPriceMicros) {
|
|
106
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__fullPriceMicros)
|
|
107
|
+
return String(__unwrapped)
|
|
108
|
+
} else {
|
|
109
|
+
return nil
|
|
110
|
+
}
|
|
111
|
+
}()
|
|
112
|
+
}
|
|
113
|
+
@inline(__always)
|
|
114
|
+
set {
|
|
115
|
+
self.__fullPriceMicros = { () -> bridge.std__optional_std__string_ in
|
|
116
|
+
if let __unwrappedValue = newValue {
|
|
117
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
118
|
+
} else {
|
|
119
|
+
return .init()
|
|
120
|
+
}
|
|
121
|
+
}()
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
var limitedQuantityInfo: NitroLimitedQuantityInfoAndroid? {
|
|
126
|
+
@inline(__always)
|
|
127
|
+
get {
|
|
128
|
+
return self.__limitedQuantityInfo.value
|
|
129
|
+
}
|
|
130
|
+
@inline(__always)
|
|
131
|
+
set {
|
|
132
|
+
self.__limitedQuantityInfo = { () -> bridge.std__optional_NitroLimitedQuantityInfoAndroid_ in
|
|
133
|
+
if let __unwrappedValue = newValue {
|
|
134
|
+
return bridge.create_std__optional_NitroLimitedQuantityInfoAndroid_(__unwrappedValue)
|
|
135
|
+
} else {
|
|
136
|
+
return .init()
|
|
137
|
+
}
|
|
138
|
+
}()
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
var offerId: String? {
|
|
143
|
+
@inline(__always)
|
|
144
|
+
get {
|
|
145
|
+
return { () -> String? in
|
|
146
|
+
if bridge.has_value_std__optional_std__string_(self.__offerId) {
|
|
147
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__offerId)
|
|
148
|
+
return String(__unwrapped)
|
|
149
|
+
} else {
|
|
150
|
+
return nil
|
|
151
|
+
}
|
|
152
|
+
}()
|
|
153
|
+
}
|
|
154
|
+
@inline(__always)
|
|
155
|
+
set {
|
|
156
|
+
self.__offerId = { () -> bridge.std__optional_std__string_ in
|
|
157
|
+
if let __unwrappedValue = newValue {
|
|
158
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
159
|
+
} else {
|
|
160
|
+
return .init()
|
|
161
|
+
}
|
|
162
|
+
}()
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
var offerTags: [String] {
|
|
167
|
+
@inline(__always)
|
|
168
|
+
get {
|
|
169
|
+
return self.__offerTags.map({ __item in String(__item) })
|
|
170
|
+
}
|
|
171
|
+
@inline(__always)
|
|
172
|
+
set {
|
|
173
|
+
self.__offerTags = { () -> bridge.std__vector_std__string_ in
|
|
174
|
+
var __vector = bridge.create_std__vector_std__string_(newValue.count)
|
|
175
|
+
for __item in newValue {
|
|
176
|
+
__vector.push_back(std.string(__item))
|
|
177
|
+
}
|
|
178
|
+
return __vector
|
|
179
|
+
}()
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
var offerToken: String {
|
|
184
|
+
@inline(__always)
|
|
185
|
+
get {
|
|
186
|
+
return String(self.__offerToken)
|
|
187
|
+
}
|
|
188
|
+
@inline(__always)
|
|
189
|
+
set {
|
|
190
|
+
self.__offerToken = std.string(newValue)
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
var preorderDetailsAndroid: NitroPreorderDetailsAndroid? {
|
|
195
|
+
@inline(__always)
|
|
196
|
+
get {
|
|
197
|
+
return self.__preorderDetailsAndroid.value
|
|
198
|
+
}
|
|
199
|
+
@inline(__always)
|
|
200
|
+
set {
|
|
201
|
+
self.__preorderDetailsAndroid = { () -> bridge.std__optional_NitroPreorderDetailsAndroid_ in
|
|
202
|
+
if let __unwrappedValue = newValue {
|
|
203
|
+
return bridge.create_std__optional_NitroPreorderDetailsAndroid_(__unwrappedValue)
|
|
204
|
+
} else {
|
|
205
|
+
return .init()
|
|
206
|
+
}
|
|
207
|
+
}()
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
36
211
|
var priceAmountMicros: String {
|
|
37
212
|
@inline(__always)
|
|
38
213
|
get {
|
|
@@ -54,4 +229,38 @@ public extension NitroOneTimePurchaseOfferDetail {
|
|
|
54
229
|
self.__priceCurrencyCode = std.string(newValue)
|
|
55
230
|
}
|
|
56
231
|
}
|
|
232
|
+
|
|
233
|
+
var rentalDetailsAndroid: NitroRentalDetailsAndroid? {
|
|
234
|
+
@inline(__always)
|
|
235
|
+
get {
|
|
236
|
+
return self.__rentalDetailsAndroid.value
|
|
237
|
+
}
|
|
238
|
+
@inline(__always)
|
|
239
|
+
set {
|
|
240
|
+
self.__rentalDetailsAndroid = { () -> bridge.std__optional_NitroRentalDetailsAndroid_ in
|
|
241
|
+
if let __unwrappedValue = newValue {
|
|
242
|
+
return bridge.create_std__optional_NitroRentalDetailsAndroid_(__unwrappedValue)
|
|
243
|
+
} else {
|
|
244
|
+
return .init()
|
|
245
|
+
}
|
|
246
|
+
}()
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
var validTimeWindow: NitroValidTimeWindowAndroid? {
|
|
251
|
+
@inline(__always)
|
|
252
|
+
get {
|
|
253
|
+
return self.__validTimeWindow.value
|
|
254
|
+
}
|
|
255
|
+
@inline(__always)
|
|
256
|
+
set {
|
|
257
|
+
self.__validTimeWindow = { () -> bridge.std__optional_NitroValidTimeWindowAndroid_ in
|
|
258
|
+
if let __unwrappedValue = newValue {
|
|
259
|
+
return bridge.create_std__optional_NitroValidTimeWindowAndroid_(__unwrappedValue)
|
|
260
|
+
} else {
|
|
261
|
+
return .init()
|
|
262
|
+
}
|
|
263
|
+
}()
|
|
264
|
+
}
|
|
265
|
+
}
|
|
57
266
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroPreorderDetailsAndroid.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 `NitroPreorderDetailsAndroid`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias NitroPreorderDetailsAndroid = margelo.nitro.iap.NitroPreorderDetailsAndroid
|
|
14
|
+
|
|
15
|
+
public extension NitroPreorderDetailsAndroid {
|
|
16
|
+
private typealias bridge = margelo.nitro.iap.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `NitroPreorderDetailsAndroid`.
|
|
20
|
+
*/
|
|
21
|
+
init(preorderPresaleEndTimeMillis: String, preorderReleaseTimeMillis: String) {
|
|
22
|
+
self.init(std.string(preorderPresaleEndTimeMillis), std.string(preorderReleaseTimeMillis))
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var preorderPresaleEndTimeMillis: String {
|
|
26
|
+
@inline(__always)
|
|
27
|
+
get {
|
|
28
|
+
return String(self.__preorderPresaleEndTimeMillis)
|
|
29
|
+
}
|
|
30
|
+
@inline(__always)
|
|
31
|
+
set {
|
|
32
|
+
self.__preorderPresaleEndTimeMillis = std.string(newValue)
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var preorderReleaseTimeMillis: String {
|
|
37
|
+
@inline(__always)
|
|
38
|
+
get {
|
|
39
|
+
return String(self.__preorderReleaseTimeMillis)
|
|
40
|
+
}
|
|
41
|
+
@inline(__always)
|
|
42
|
+
set {
|
|
43
|
+
self.__preorderReleaseTimeMillis = std.string(newValue)
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -18,7 +18,7 @@ public extension NitroProduct {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a new instance of `NitroProduct`.
|
|
20
20
|
*/
|
|
21
|
-
init(id: String, title: String, description: String, type: String, displayName: String?, displayPrice: String?, currency: String?, price: Double?, platform: IapPlatform, typeIOS: String?, isFamilyShareableIOS: Bool?, jsonRepresentationIOS: String?, discountsIOS: String?, introductoryPriceIOS: String?, introductoryPriceAsAmountIOS: Double?, introductoryPriceNumberOfPeriodsIOS: Double?, introductoryPricePaymentModeIOS: PaymentModeIOS, introductoryPriceSubscriptionPeriodIOS: String?, subscriptionPeriodNumberIOS: Double?, subscriptionPeriodUnitIOS: String?, nameAndroid: String?, originalPriceAndroid: String?, originalPriceAmountMicrosAndroid: Double?, introductoryPriceCyclesAndroid: Double?, introductoryPricePeriodAndroid: String?, introductoryPriceValueAndroid: Double?, subscriptionPeriodAndroid: String?, freeTrialPeriodAndroid: String?, subscriptionOfferDetailsAndroid: String?, oneTimePurchaseOfferDetailsAndroid: NitroOneTimePurchaseOfferDetail?) {
|
|
21
|
+
init(id: String, title: String, description: String, type: String, displayName: String?, displayPrice: String?, currency: String?, price: Double?, platform: IapPlatform, typeIOS: String?, isFamilyShareableIOS: Bool?, jsonRepresentationIOS: String?, discountsIOS: String?, introductoryPriceIOS: String?, introductoryPriceAsAmountIOS: Double?, introductoryPriceNumberOfPeriodsIOS: Double?, introductoryPricePaymentModeIOS: PaymentModeIOS, introductoryPriceSubscriptionPeriodIOS: String?, subscriptionPeriodNumberIOS: Double?, subscriptionPeriodUnitIOS: String?, nameAndroid: String?, originalPriceAndroid: String?, originalPriceAmountMicrosAndroid: Double?, introductoryPriceCyclesAndroid: Double?, introductoryPricePeriodAndroid: String?, introductoryPriceValueAndroid: Double?, subscriptionPeriodAndroid: String?, freeTrialPeriodAndroid: String?, subscriptionOfferDetailsAndroid: String?, oneTimePurchaseOfferDetailsAndroid: [NitroOneTimePurchaseOfferDetail]?) {
|
|
22
22
|
self.init(std.string(id), std.string(title), std.string(description), std.string(type), { () -> bridge.std__optional_std__string_ in
|
|
23
23
|
if let __unwrappedValue = displayName {
|
|
24
24
|
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
@@ -157,9 +157,15 @@ public extension NitroProduct {
|
|
|
157
157
|
} else {
|
|
158
158
|
return .init()
|
|
159
159
|
}
|
|
160
|
-
}(), { () -> bridge.
|
|
160
|
+
}(), { () -> bridge.std__optional_std__vector_NitroOneTimePurchaseOfferDetail__ in
|
|
161
161
|
if let __unwrappedValue = oneTimePurchaseOfferDetailsAndroid {
|
|
162
|
-
return bridge.
|
|
162
|
+
return bridge.create_std__optional_std__vector_NitroOneTimePurchaseOfferDetail__({ () -> bridge.std__vector_NitroOneTimePurchaseOfferDetail_ in
|
|
163
|
+
var __vector = bridge.create_std__vector_NitroOneTimePurchaseOfferDetail_(__unwrappedValue.count)
|
|
164
|
+
for __item in __unwrappedValue {
|
|
165
|
+
__vector.push_back(__item)
|
|
166
|
+
}
|
|
167
|
+
return __vector
|
|
168
|
+
}())
|
|
163
169
|
} else {
|
|
164
170
|
return .init()
|
|
165
171
|
}
|
|
@@ -735,16 +741,29 @@ public extension NitroProduct {
|
|
|
735
741
|
}
|
|
736
742
|
}
|
|
737
743
|
|
|
738
|
-
var oneTimePurchaseOfferDetailsAndroid: NitroOneTimePurchaseOfferDetail? {
|
|
744
|
+
var oneTimePurchaseOfferDetailsAndroid: [NitroOneTimePurchaseOfferDetail]? {
|
|
739
745
|
@inline(__always)
|
|
740
746
|
get {
|
|
741
|
-
return
|
|
747
|
+
return { () -> [NitroOneTimePurchaseOfferDetail]? in
|
|
748
|
+
if bridge.has_value_std__optional_std__vector_NitroOneTimePurchaseOfferDetail__(self.__oneTimePurchaseOfferDetailsAndroid) {
|
|
749
|
+
let __unwrapped = bridge.get_std__optional_std__vector_NitroOneTimePurchaseOfferDetail__(self.__oneTimePurchaseOfferDetailsAndroid)
|
|
750
|
+
return __unwrapped.map({ __item in __item })
|
|
751
|
+
} else {
|
|
752
|
+
return nil
|
|
753
|
+
}
|
|
754
|
+
}()
|
|
742
755
|
}
|
|
743
756
|
@inline(__always)
|
|
744
757
|
set {
|
|
745
|
-
self.__oneTimePurchaseOfferDetailsAndroid = { () -> bridge.
|
|
758
|
+
self.__oneTimePurchaseOfferDetailsAndroid = { () -> bridge.std__optional_std__vector_NitroOneTimePurchaseOfferDetail__ in
|
|
746
759
|
if let __unwrappedValue = newValue {
|
|
747
|
-
return bridge.
|
|
760
|
+
return bridge.create_std__optional_std__vector_NitroOneTimePurchaseOfferDetail__({ () -> bridge.std__vector_NitroOneTimePurchaseOfferDetail_ in
|
|
761
|
+
var __vector = bridge.create_std__vector_NitroOneTimePurchaseOfferDetail_(__unwrappedValue.count)
|
|
762
|
+
for __item in __unwrappedValue {
|
|
763
|
+
__vector.push_back(__item)
|
|
764
|
+
}
|
|
765
|
+
return __vector
|
|
766
|
+
}())
|
|
748
767
|
} else {
|
|
749
768
|
return .init()
|
|
750
769
|
}
|
|
@@ -18,14 +18,14 @@ public extension NitroPurchase {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a new instance of `NitroPurchase`.
|
|
20
20
|
*/
|
|
21
|
-
init(id: String, productId: String, transactionDate: Double, purchaseToken: String?, platform: IapPlatform, quantity: Double, purchaseState: PurchaseState, isAutoRenewing: Bool, quantityIOS: Double?, originalTransactionDateIOS: Double?, originalTransactionIdentifierIOS: String?, appAccountToken: String?, appBundleIdIOS: String?, countryCodeIOS: String?, currencyCodeIOS: String?, currencySymbolIOS: String?, environmentIOS: String?, expirationDateIOS: Double?, isUpgradedIOS: Bool?, offerIOS: String?, ownershipTypeIOS: String?, reasonIOS: String?, reasonStringRepresentationIOS: String?, revocationDateIOS: Double?, revocationReasonIOS: String?, storefrontCountryCodeIOS: String?, subscriptionGroupIdIOS: String?, transactionReasonIOS: String?, webOrderLineItemIdIOS: String?, renewalInfoIOS: NitroRenewalInfoIOS?, purchaseTokenAndroid: String?, dataAndroid: String?, signatureAndroid: String?, autoRenewingAndroid: Bool?, purchaseStateAndroid: Double?, isAcknowledgedAndroid: Bool?, packageNameAndroid: String?, obfuscatedAccountIdAndroid: String?, obfuscatedProfileIdAndroid: String?, developerPayloadAndroid: String?) {
|
|
21
|
+
init(id: String, productId: String, transactionDate: Double, purchaseToken: String?, platform: IapPlatform, store: IapStore, quantity: Double, purchaseState: PurchaseState, isAutoRenewing: Bool, quantityIOS: Double?, originalTransactionDateIOS: Double?, originalTransactionIdentifierIOS: String?, appAccountToken: String?, appBundleIdIOS: String?, countryCodeIOS: String?, currencyCodeIOS: String?, currencySymbolIOS: String?, environmentIOS: String?, expirationDateIOS: Double?, isUpgradedIOS: Bool?, offerIOS: String?, ownershipTypeIOS: String?, reasonIOS: String?, reasonStringRepresentationIOS: String?, revocationDateIOS: Double?, revocationReasonIOS: String?, storefrontCountryCodeIOS: String?, subscriptionGroupIdIOS: String?, transactionReasonIOS: String?, webOrderLineItemIdIOS: String?, renewalInfoIOS: NitroRenewalInfoIOS?, purchaseTokenAndroid: String?, dataAndroid: String?, signatureAndroid: String?, autoRenewingAndroid: Bool?, purchaseStateAndroid: Double?, isAcknowledgedAndroid: Bool?, packageNameAndroid: String?, obfuscatedAccountIdAndroid: String?, obfuscatedProfileIdAndroid: String?, developerPayloadAndroid: String?, isSuspendedAndroid: Bool?) {
|
|
22
22
|
self.init(std.string(id), std.string(productId), transactionDate, { () -> bridge.std__optional_std__string_ in
|
|
23
23
|
if let __unwrappedValue = purchaseToken {
|
|
24
24
|
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
25
25
|
} else {
|
|
26
26
|
return .init()
|
|
27
27
|
}
|
|
28
|
-
}(), platform, quantity, purchaseState, isAutoRenewing, { () -> bridge.std__optional_double_ in
|
|
28
|
+
}(), platform, store, quantity, purchaseState, isAutoRenewing, { () -> bridge.std__optional_double_ in
|
|
29
29
|
if let __unwrappedValue = quantityIOS {
|
|
30
30
|
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
31
31
|
} else {
|
|
@@ -217,6 +217,12 @@ public extension NitroPurchase {
|
|
|
217
217
|
} else {
|
|
218
218
|
return .init()
|
|
219
219
|
}
|
|
220
|
+
}(), { () -> bridge.std__optional_bool_ in
|
|
221
|
+
if let __unwrappedValue = isSuspendedAndroid {
|
|
222
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
223
|
+
} else {
|
|
224
|
+
return .init()
|
|
225
|
+
}
|
|
220
226
|
}())
|
|
221
227
|
}
|
|
222
228
|
|
|
@@ -288,6 +294,17 @@ public extension NitroPurchase {
|
|
|
288
294
|
}
|
|
289
295
|
}
|
|
290
296
|
|
|
297
|
+
var store: IapStore {
|
|
298
|
+
@inline(__always)
|
|
299
|
+
get {
|
|
300
|
+
return self.__store
|
|
301
|
+
}
|
|
302
|
+
@inline(__always)
|
|
303
|
+
set {
|
|
304
|
+
self.__store = newValue
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
291
308
|
var quantity: Double {
|
|
292
309
|
@inline(__always)
|
|
293
310
|
get {
|
|
@@ -1046,4 +1063,28 @@ public extension NitroPurchase {
|
|
|
1046
1063
|
}()
|
|
1047
1064
|
}
|
|
1048
1065
|
}
|
|
1066
|
+
|
|
1067
|
+
var isSuspendedAndroid: Bool? {
|
|
1068
|
+
@inline(__always)
|
|
1069
|
+
get {
|
|
1070
|
+
return { () -> Bool? in
|
|
1071
|
+
if bridge.has_value_std__optional_bool_(self.__isSuspendedAndroid) {
|
|
1072
|
+
let __unwrapped = bridge.get_std__optional_bool_(self.__isSuspendedAndroid)
|
|
1073
|
+
return __unwrapped
|
|
1074
|
+
} else {
|
|
1075
|
+
return nil
|
|
1076
|
+
}
|
|
1077
|
+
}()
|
|
1078
|
+
}
|
|
1079
|
+
@inline(__always)
|
|
1080
|
+
set {
|
|
1081
|
+
self.__isSuspendedAndroid = { () -> bridge.std__optional_bool_ in
|
|
1082
|
+
if let __unwrappedValue = newValue {
|
|
1083
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
1084
|
+
} else {
|
|
1085
|
+
return .init()
|
|
1086
|
+
}
|
|
1087
|
+
}()
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1049
1090
|
}
|
|
@@ -18,7 +18,7 @@ public extension NitroPurchaseRequest {
|
|
|
18
18
|
/**
|
|
19
19
|
* Create a new instance of `NitroPurchaseRequest`.
|
|
20
20
|
*/
|
|
21
|
-
init(ios: NitroRequestPurchaseIos?, android: NitroRequestPurchaseAndroid?) {
|
|
21
|
+
init(ios: NitroRequestPurchaseIos?, android: NitroRequestPurchaseAndroid?, apple: NitroRequestPurchaseIos?, google: NitroRequestPurchaseAndroid?) {
|
|
22
22
|
self.init({ () -> bridge.std__optional_NitroRequestPurchaseIos_ in
|
|
23
23
|
if let __unwrappedValue = ios {
|
|
24
24
|
return bridge.create_std__optional_NitroRequestPurchaseIos_(__unwrappedValue)
|
|
@@ -31,6 +31,18 @@ public extension NitroPurchaseRequest {
|
|
|
31
31
|
} else {
|
|
32
32
|
return .init()
|
|
33
33
|
}
|
|
34
|
+
}(), { () -> bridge.std__optional_NitroRequestPurchaseIos_ in
|
|
35
|
+
if let __unwrappedValue = apple {
|
|
36
|
+
return bridge.create_std__optional_NitroRequestPurchaseIos_(__unwrappedValue)
|
|
37
|
+
} else {
|
|
38
|
+
return .init()
|
|
39
|
+
}
|
|
40
|
+
}(), { () -> bridge.std__optional_NitroRequestPurchaseAndroid_ in
|
|
41
|
+
if let __unwrappedValue = google {
|
|
42
|
+
return bridge.create_std__optional_NitroRequestPurchaseAndroid_(__unwrappedValue)
|
|
43
|
+
} else {
|
|
44
|
+
return .init()
|
|
45
|
+
}
|
|
34
46
|
}())
|
|
35
47
|
}
|
|
36
48
|
|
|
@@ -67,4 +79,38 @@ public extension NitroPurchaseRequest {
|
|
|
67
79
|
}()
|
|
68
80
|
}
|
|
69
81
|
}
|
|
82
|
+
|
|
83
|
+
var apple: NitroRequestPurchaseIos? {
|
|
84
|
+
@inline(__always)
|
|
85
|
+
get {
|
|
86
|
+
return self.__apple.value
|
|
87
|
+
}
|
|
88
|
+
@inline(__always)
|
|
89
|
+
set {
|
|
90
|
+
self.__apple = { () -> bridge.std__optional_NitroRequestPurchaseIos_ in
|
|
91
|
+
if let __unwrappedValue = newValue {
|
|
92
|
+
return bridge.create_std__optional_NitroRequestPurchaseIos_(__unwrappedValue)
|
|
93
|
+
} else {
|
|
94
|
+
return .init()
|
|
95
|
+
}
|
|
96
|
+
}()
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
var google: NitroRequestPurchaseAndroid? {
|
|
101
|
+
@inline(__always)
|
|
102
|
+
get {
|
|
103
|
+
return self.__google.value
|
|
104
|
+
}
|
|
105
|
+
@inline(__always)
|
|
106
|
+
set {
|
|
107
|
+
self.__google = { () -> bridge.std__optional_NitroRequestPurchaseAndroid_ in
|
|
108
|
+
if let __unwrappedValue = newValue {
|
|
109
|
+
return bridge.create_std__optional_NitroRequestPurchaseAndroid_(__unwrappedValue)
|
|
110
|
+
} else {
|
|
111
|
+
return .init()
|
|
112
|
+
}
|
|
113
|
+
}()
|
|
114
|
+
}
|
|
115
|
+
}
|
|
70
116
|
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroRentalDetailsAndroid.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 `NitroRentalDetailsAndroid`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias NitroRentalDetailsAndroid = margelo.nitro.iap.NitroRentalDetailsAndroid
|
|
14
|
+
|
|
15
|
+
public extension NitroRentalDetailsAndroid {
|
|
16
|
+
private typealias bridge = margelo.nitro.iap.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `NitroRentalDetailsAndroid`.
|
|
20
|
+
*/
|
|
21
|
+
init(rentalExpirationPeriod: String?, rentalPeriod: String) {
|
|
22
|
+
self.init({ () -> bridge.std__optional_std__string_ in
|
|
23
|
+
if let __unwrappedValue = rentalExpirationPeriod {
|
|
24
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
25
|
+
} else {
|
|
26
|
+
return .init()
|
|
27
|
+
}
|
|
28
|
+
}(), std.string(rentalPeriod))
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
var rentalExpirationPeriod: String? {
|
|
32
|
+
@inline(__always)
|
|
33
|
+
get {
|
|
34
|
+
return { () -> String? in
|
|
35
|
+
if bridge.has_value_std__optional_std__string_(self.__rentalExpirationPeriod) {
|
|
36
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__rentalExpirationPeriod)
|
|
37
|
+
return String(__unwrapped)
|
|
38
|
+
} else {
|
|
39
|
+
return nil
|
|
40
|
+
}
|
|
41
|
+
}()
|
|
42
|
+
}
|
|
43
|
+
@inline(__always)
|
|
44
|
+
set {
|
|
45
|
+
self.__rentalExpirationPeriod = { () -> bridge.std__optional_std__string_ in
|
|
46
|
+
if let __unwrappedValue = newValue {
|
|
47
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
48
|
+
} else {
|
|
49
|
+
return .init()
|
|
50
|
+
}
|
|
51
|
+
}()
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
var rentalPeriod: String {
|
|
56
|
+
@inline(__always)
|
|
57
|
+
get {
|
|
58
|
+
return String(self.__rentalPeriod)
|
|
59
|
+
}
|
|
60
|
+
@inline(__always)
|
|
61
|
+
set {
|
|
62
|
+
self.__rentalPeriod = std.string(newValue)
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|