checkout-intents 0.0.2
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.
- checksums.yaml +7 -0
- data/.ignore +2 -0
- data/CHANGELOG.md +16 -0
- data/README.md +358 -0
- data/SECURITY.md +27 -0
- data/lib/checkout_intents/client.rb +100 -0
- data/lib/checkout_intents/errors.rb +228 -0
- data/lib/checkout_intents/file_part.rb +58 -0
- data/lib/checkout_intents/internal/cursor_pagination.rb +125 -0
- data/lib/checkout_intents/internal/transport/base_client.rb +577 -0
- data/lib/checkout_intents/internal/transport/pooled_net_requester.rb +210 -0
- data/lib/checkout_intents/internal/type/array_of.rb +168 -0
- data/lib/checkout_intents/internal/type/base_model.rb +536 -0
- data/lib/checkout_intents/internal/type/base_page.rb +55 -0
- data/lib/checkout_intents/internal/type/boolean.rb +77 -0
- data/lib/checkout_intents/internal/type/converter.rb +327 -0
- data/lib/checkout_intents/internal/type/enum.rb +131 -0
- data/lib/checkout_intents/internal/type/file_input.rb +111 -0
- data/lib/checkout_intents/internal/type/hash_of.rb +188 -0
- data/lib/checkout_intents/internal/type/request_parameters.rb +42 -0
- data/lib/checkout_intents/internal/type/union.rb +258 -0
- data/lib/checkout_intents/internal/type/unknown.rb +81 -0
- data/lib/checkout_intents/internal/util.rb +920 -0
- data/lib/checkout_intents/internal.rb +20 -0
- data/lib/checkout_intents/models/base_checkout_intent.rb +76 -0
- data/lib/checkout_intents/models/betas/checkout_session_create_params.rb +148 -0
- data/lib/checkout_intents/models/brand_retrieve_params.rb +14 -0
- data/lib/checkout_intents/models/brand_retrieve_response.rb +52 -0
- data/lib/checkout_intents/models/buyer.rb +69 -0
- data/lib/checkout_intents/models/checkout_intent.rb +230 -0
- data/lib/checkout_intents/models/checkout_intent_add_payment_params.rb +20 -0
- data/lib/checkout_intents/models/checkout_intent_confirm_params.rb +20 -0
- data/lib/checkout_intents/models/checkout_intent_create_params.rb +68 -0
- data/lib/checkout_intents/models/checkout_intent_list_params.rb +58 -0
- data/lib/checkout_intents/models/checkout_intent_purchase_params.rb +74 -0
- data/lib/checkout_intents/models/checkout_intent_retrieve_params.rb +14 -0
- data/lib/checkout_intents/models/checkout_session.rb +23 -0
- data/lib/checkout_intents/models/money.rb +21 -0
- data/lib/checkout_intents/models/offer.rb +113 -0
- data/lib/checkout_intents/models/payment_method.rb +120 -0
- data/lib/checkout_intents/models/variant_selection.rb +33 -0
- data/lib/checkout_intents/models.rb +76 -0
- data/lib/checkout_intents/request_options.rb +78 -0
- data/lib/checkout_intents/resources/betas/checkout_sessions.rb +54 -0
- data/lib/checkout_intents/resources/betas.rb +18 -0
- data/lib/checkout_intents/resources/brands.rb +37 -0
- data/lib/checkout_intents/resources/checkout_intents.rb +173 -0
- data/lib/checkout_intents/version.rb +5 -0
- data/lib/checkout_intents.rb +77 -0
- data/manifest.yaml +17 -0
- data/rbi/checkout_intents/client.rbi +74 -0
- data/rbi/checkout_intents/errors.rbi +205 -0
- data/rbi/checkout_intents/file_part.rbi +37 -0
- data/rbi/checkout_intents/internal/cursor_pagination.rbi +74 -0
- data/rbi/checkout_intents/internal/transport/base_client.rbi +309 -0
- data/rbi/checkout_intents/internal/transport/pooled_net_requester.rbi +84 -0
- data/rbi/checkout_intents/internal/type/array_of.rbi +108 -0
- data/rbi/checkout_intents/internal/type/base_model.rbi +314 -0
- data/rbi/checkout_intents/internal/type/base_page.rbi +43 -0
- data/rbi/checkout_intents/internal/type/boolean.rbi +58 -0
- data/rbi/checkout_intents/internal/type/converter.rbi +225 -0
- data/rbi/checkout_intents/internal/type/enum.rbi +82 -0
- data/rbi/checkout_intents/internal/type/file_input.rbi +59 -0
- data/rbi/checkout_intents/internal/type/hash_of.rbi +108 -0
- data/rbi/checkout_intents/internal/type/request_parameters.rbi +31 -0
- data/rbi/checkout_intents/internal/type/union.rbi +134 -0
- data/rbi/checkout_intents/internal/type/unknown.rbi +58 -0
- data/rbi/checkout_intents/internal/util.rbi +487 -0
- data/rbi/checkout_intents/internal.rbi +18 -0
- data/rbi/checkout_intents/models/base_checkout_intent.rbi +142 -0
- data/rbi/checkout_intents/models/betas/checkout_session_create_params.rbi +281 -0
- data/rbi/checkout_intents/models/brand_retrieve_params.rbi +32 -0
- data/rbi/checkout_intents/models/brand_retrieve_response.rbi +109 -0
- data/rbi/checkout_intents/models/buyer.rbi +92 -0
- data/rbi/checkout_intents/models/checkout_intent.rbi +653 -0
- data/rbi/checkout_intents/models/checkout_intent_add_payment_params.rbi +59 -0
- data/rbi/checkout_intents/models/checkout_intent_confirm_params.rbi +59 -0
- data/rbi/checkout_intents/models/checkout_intent_create_params.rbi +141 -0
- data/rbi/checkout_intents/models/checkout_intent_list_params.rbi +146 -0
- data/rbi/checkout_intents/models/checkout_intent_purchase_params.rbi +165 -0
- data/rbi/checkout_intents/models/checkout_intent_retrieve_params.rbi +32 -0
- data/rbi/checkout_intents/models/checkout_session.rbi +36 -0
- data/rbi/checkout_intents/models/money.rbi +32 -0
- data/rbi/checkout_intents/models/offer.rbi +225 -0
- data/rbi/checkout_intents/models/payment_method.rbi +292 -0
- data/rbi/checkout_intents/models/variant_selection.rbi +55 -0
- data/rbi/checkout_intents/models.rbi +40 -0
- data/rbi/checkout_intents/request_options.rbi +64 -0
- data/rbi/checkout_intents/resources/betas/checkout_sessions.rbi +47 -0
- data/rbi/checkout_intents/resources/betas.rbi +15 -0
- data/rbi/checkout_intents/resources/brands.rbi +29 -0
- data/rbi/checkout_intents/resources/checkout_intents.rbi +165 -0
- data/rbi/checkout_intents/version.rbi +5 -0
- data/sig/checkout_intents/client.rbs +36 -0
- data/sig/checkout_intents/errors.rbs +117 -0
- data/sig/checkout_intents/file_part.rbs +21 -0
- data/sig/checkout_intents/internal/cursor_pagination.rbs +48 -0
- data/sig/checkout_intents/internal/transport/base_client.rbs +133 -0
- data/sig/checkout_intents/internal/transport/pooled_net_requester.rbs +48 -0
- data/sig/checkout_intents/internal/type/array_of.rbs +48 -0
- data/sig/checkout_intents/internal/type/base_model.rbs +104 -0
- data/sig/checkout_intents/internal/type/base_page.rbs +24 -0
- data/sig/checkout_intents/internal/type/boolean.rbs +26 -0
- data/sig/checkout_intents/internal/type/converter.rbs +79 -0
- data/sig/checkout_intents/internal/type/enum.rbs +32 -0
- data/sig/checkout_intents/internal/type/file_input.rbs +25 -0
- data/sig/checkout_intents/internal/type/hash_of.rbs +48 -0
- data/sig/checkout_intents/internal/type/request_parameters.rbs +20 -0
- data/sig/checkout_intents/internal/type/union.rbs +52 -0
- data/sig/checkout_intents/internal/type/unknown.rbs +26 -0
- data/sig/checkout_intents/internal/util.rbs +185 -0
- data/sig/checkout_intents/internal.rbs +10 -0
- data/sig/checkout_intents/models/base_checkout_intent.rbs +88 -0
- data/sig/checkout_intents/models/betas/checkout_session_create_params.rbs +172 -0
- data/sig/checkout_intents/models/brand_retrieve_params.rbs +15 -0
- data/sig/checkout_intents/models/brand_retrieve_response.rbs +43 -0
- data/sig/checkout_intents/models/buyer.rbs +67 -0
- data/sig/checkout_intents/models/checkout_intent.rbs +324 -0
- data/sig/checkout_intents/models/checkout_intent_add_payment_params.rbs +24 -0
- data/sig/checkout_intents/models/checkout_intent_confirm_params.rbs +24 -0
- data/sig/checkout_intents/models/checkout_intent_create_params.rbs +84 -0
- data/sig/checkout_intents/models/checkout_intent_list_params.rbs +77 -0
- data/sig/checkout_intents/models/checkout_intent_purchase_params.rbs +89 -0
- data/sig/checkout_intents/models/checkout_intent_retrieve_params.rbs +15 -0
- data/sig/checkout_intents/models/checkout_session.rbs +13 -0
- data/sig/checkout_intents/models/money.rbs +15 -0
- data/sig/checkout_intents/models/offer.rbs +135 -0
- data/sig/checkout_intents/models/payment_method.rbs +127 -0
- data/sig/checkout_intents/models/variant_selection.rbs +30 -0
- data/sig/checkout_intents/models.rbs +33 -0
- data/sig/checkout_intents/request_options.rbs +36 -0
- data/sig/checkout_intents/resources/betas/checkout_sessions.rbs +19 -0
- data/sig/checkout_intents/resources/betas.rbs +9 -0
- data/sig/checkout_intents/resources/brands.rbs +12 -0
- data/sig/checkout_intents/resources/checkout_intents.rbs +54 -0
- data/sig/checkout_intents/version.rbs +3 -0
- metadata +194 -0
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
module CheckoutIntents
|
|
2
|
+
module Models
|
|
3
|
+
type checkout_intent =
|
|
4
|
+
CheckoutIntents::CheckoutIntent::RetrievingOfferCheckoutIntent
|
|
5
|
+
| CheckoutIntents::CheckoutIntent::AwaitingConfirmationCheckoutIntent
|
|
6
|
+
| CheckoutIntents::CheckoutIntent::PlacingOrderCheckoutIntent
|
|
7
|
+
| CheckoutIntents::CheckoutIntent::CompletedCheckoutIntent
|
|
8
|
+
| CheckoutIntents::CheckoutIntent::FailedCheckoutIntent
|
|
9
|
+
|
|
10
|
+
module CheckoutIntent
|
|
11
|
+
extend CheckoutIntents::Internal::Type::Union
|
|
12
|
+
|
|
13
|
+
type retrieving_offer_checkout_intent =
|
|
14
|
+
{
|
|
15
|
+
state: CheckoutIntents::Models::CheckoutIntent::RetrievingOfferCheckoutIntent::state
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
class RetrievingOfferCheckoutIntent < CheckoutIntents::Models::BaseCheckoutIntent
|
|
19
|
+
def state: -> CheckoutIntents::Models::CheckoutIntent::RetrievingOfferCheckoutIntent::state
|
|
20
|
+
|
|
21
|
+
def state=: (
|
|
22
|
+
CheckoutIntents::Models::CheckoutIntent::RetrievingOfferCheckoutIntent::state _
|
|
23
|
+
) -> CheckoutIntents::Models::CheckoutIntent::RetrievingOfferCheckoutIntent::state
|
|
24
|
+
|
|
25
|
+
def initialize: (
|
|
26
|
+
state: CheckoutIntents::Models::CheckoutIntent::RetrievingOfferCheckoutIntent::state
|
|
27
|
+
) -> void
|
|
28
|
+
|
|
29
|
+
def to_hash: -> {
|
|
30
|
+
state: CheckoutIntents::Models::CheckoutIntent::RetrievingOfferCheckoutIntent::state
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
type state = :retrieving_offer
|
|
34
|
+
|
|
35
|
+
module State
|
|
36
|
+
extend CheckoutIntents::Internal::Type::Enum
|
|
37
|
+
|
|
38
|
+
RETRIEVING_OFFER: :retrieving_offer
|
|
39
|
+
|
|
40
|
+
def self?.values: -> ::Array[CheckoutIntents::Models::CheckoutIntent::RetrievingOfferCheckoutIntent::state]
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
type awaiting_confirmation_checkout_intent =
|
|
45
|
+
{
|
|
46
|
+
offer: CheckoutIntents::Offer,
|
|
47
|
+
state: CheckoutIntents::Models::CheckoutIntent::AwaitingConfirmationCheckoutIntent::state,
|
|
48
|
+
payment_method: CheckoutIntents::Models::payment_method
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
class AwaitingConfirmationCheckoutIntent < CheckoutIntents::Models::BaseCheckoutIntent
|
|
52
|
+
def offer: -> CheckoutIntents::Offer
|
|
53
|
+
|
|
54
|
+
def offer=: (CheckoutIntents::Offer _) -> CheckoutIntents::Offer
|
|
55
|
+
|
|
56
|
+
def state: -> CheckoutIntents::Models::CheckoutIntent::AwaitingConfirmationCheckoutIntent::state
|
|
57
|
+
|
|
58
|
+
def state=: (
|
|
59
|
+
CheckoutIntents::Models::CheckoutIntent::AwaitingConfirmationCheckoutIntent::state _
|
|
60
|
+
) -> CheckoutIntents::Models::CheckoutIntent::AwaitingConfirmationCheckoutIntent::state
|
|
61
|
+
|
|
62
|
+
def payment_method: -> CheckoutIntents::Models::payment_method?
|
|
63
|
+
|
|
64
|
+
def payment_method=: (
|
|
65
|
+
CheckoutIntents::Models::payment_method _
|
|
66
|
+
) -> CheckoutIntents::Models::payment_method
|
|
67
|
+
|
|
68
|
+
def initialize: (
|
|
69
|
+
offer: CheckoutIntents::Offer,
|
|
70
|
+
state: CheckoutIntents::Models::CheckoutIntent::AwaitingConfirmationCheckoutIntent::state,
|
|
71
|
+
?payment_method: CheckoutIntents::Models::payment_method
|
|
72
|
+
) -> void
|
|
73
|
+
|
|
74
|
+
def to_hash: -> {
|
|
75
|
+
offer: CheckoutIntents::Offer,
|
|
76
|
+
state: CheckoutIntents::Models::CheckoutIntent::AwaitingConfirmationCheckoutIntent::state,
|
|
77
|
+
payment_method: CheckoutIntents::Models::payment_method
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
type state = :awaiting_confirmation
|
|
81
|
+
|
|
82
|
+
module State
|
|
83
|
+
extend CheckoutIntents::Internal::Type::Enum
|
|
84
|
+
|
|
85
|
+
AWAITING_CONFIRMATION: :awaiting_confirmation
|
|
86
|
+
|
|
87
|
+
def self?.values: -> ::Array[CheckoutIntents::Models::CheckoutIntent::AwaitingConfirmationCheckoutIntent::state]
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
type placing_order_checkout_intent =
|
|
92
|
+
{
|
|
93
|
+
offer: CheckoutIntents::Offer,
|
|
94
|
+
payment_method: CheckoutIntents::Models::payment_method,
|
|
95
|
+
state: CheckoutIntents::Models::CheckoutIntent::PlacingOrderCheckoutIntent::state
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
class PlacingOrderCheckoutIntent < CheckoutIntents::Models::BaseCheckoutIntent
|
|
99
|
+
def offer: -> CheckoutIntents::Offer
|
|
100
|
+
|
|
101
|
+
def offer=: (CheckoutIntents::Offer _) -> CheckoutIntents::Offer
|
|
102
|
+
|
|
103
|
+
def payment_method: -> CheckoutIntents::Models::payment_method
|
|
104
|
+
|
|
105
|
+
def payment_method=: (
|
|
106
|
+
CheckoutIntents::Models::payment_method _
|
|
107
|
+
) -> CheckoutIntents::Models::payment_method
|
|
108
|
+
|
|
109
|
+
def state: -> CheckoutIntents::Models::CheckoutIntent::PlacingOrderCheckoutIntent::state
|
|
110
|
+
|
|
111
|
+
def state=: (
|
|
112
|
+
CheckoutIntents::Models::CheckoutIntent::PlacingOrderCheckoutIntent::state _
|
|
113
|
+
) -> CheckoutIntents::Models::CheckoutIntent::PlacingOrderCheckoutIntent::state
|
|
114
|
+
|
|
115
|
+
def initialize: (
|
|
116
|
+
offer: CheckoutIntents::Offer,
|
|
117
|
+
payment_method: CheckoutIntents::Models::payment_method,
|
|
118
|
+
state: CheckoutIntents::Models::CheckoutIntent::PlacingOrderCheckoutIntent::state
|
|
119
|
+
) -> void
|
|
120
|
+
|
|
121
|
+
def to_hash: -> {
|
|
122
|
+
offer: CheckoutIntents::Offer,
|
|
123
|
+
payment_method: CheckoutIntents::Models::payment_method,
|
|
124
|
+
state: CheckoutIntents::Models::CheckoutIntent::PlacingOrderCheckoutIntent::state
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
type state = :placing_order
|
|
128
|
+
|
|
129
|
+
module State
|
|
130
|
+
extend CheckoutIntents::Internal::Type::Enum
|
|
131
|
+
|
|
132
|
+
PLACING_ORDER: :placing_order
|
|
133
|
+
|
|
134
|
+
def self?.values: -> ::Array[CheckoutIntents::Models::CheckoutIntent::PlacingOrderCheckoutIntent::state]
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
type completed_checkout_intent =
|
|
139
|
+
{
|
|
140
|
+
offer: CheckoutIntents::Offer,
|
|
141
|
+
order_id: String?,
|
|
142
|
+
payment_method: CheckoutIntents::Models::payment_method,
|
|
143
|
+
state: CheckoutIntents::Models::CheckoutIntent::CompletedCheckoutIntent::state
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
class CompletedCheckoutIntent < CheckoutIntents::Models::BaseCheckoutIntent
|
|
147
|
+
def offer: -> CheckoutIntents::Offer
|
|
148
|
+
|
|
149
|
+
def offer=: (CheckoutIntents::Offer _) -> CheckoutIntents::Offer
|
|
150
|
+
|
|
151
|
+
def order_id: -> String?
|
|
152
|
+
|
|
153
|
+
def order_id=: (String? _) -> String?
|
|
154
|
+
|
|
155
|
+
def payment_method: -> CheckoutIntents::Models::payment_method
|
|
156
|
+
|
|
157
|
+
def payment_method=: (
|
|
158
|
+
CheckoutIntents::Models::payment_method _
|
|
159
|
+
) -> CheckoutIntents::Models::payment_method
|
|
160
|
+
|
|
161
|
+
def state: -> CheckoutIntents::Models::CheckoutIntent::CompletedCheckoutIntent::state
|
|
162
|
+
|
|
163
|
+
def state=: (
|
|
164
|
+
CheckoutIntents::Models::CheckoutIntent::CompletedCheckoutIntent::state _
|
|
165
|
+
) -> CheckoutIntents::Models::CheckoutIntent::CompletedCheckoutIntent::state
|
|
166
|
+
|
|
167
|
+
def initialize: (
|
|
168
|
+
offer: CheckoutIntents::Offer,
|
|
169
|
+
order_id: String?,
|
|
170
|
+
payment_method: CheckoutIntents::Models::payment_method,
|
|
171
|
+
state: CheckoutIntents::Models::CheckoutIntent::CompletedCheckoutIntent::state
|
|
172
|
+
) -> void
|
|
173
|
+
|
|
174
|
+
def to_hash: -> {
|
|
175
|
+
offer: CheckoutIntents::Offer,
|
|
176
|
+
order_id: String?,
|
|
177
|
+
payment_method: CheckoutIntents::Models::payment_method,
|
|
178
|
+
state: CheckoutIntents::Models::CheckoutIntent::CompletedCheckoutIntent::state
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
type state = :completed
|
|
182
|
+
|
|
183
|
+
module State
|
|
184
|
+
extend CheckoutIntents::Internal::Type::Enum
|
|
185
|
+
|
|
186
|
+
COMPLETED: :completed
|
|
187
|
+
|
|
188
|
+
def self?.values: -> ::Array[CheckoutIntents::Models::CheckoutIntent::CompletedCheckoutIntent::state]
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
type failed_checkout_intent =
|
|
193
|
+
{
|
|
194
|
+
failure_reason: CheckoutIntents::CheckoutIntent::FailedCheckoutIntent::FailureReason,
|
|
195
|
+
state: CheckoutIntents::Models::CheckoutIntent::FailedCheckoutIntent::state,
|
|
196
|
+
offer: CheckoutIntents::Offer,
|
|
197
|
+
payment_method: CheckoutIntents::Models::payment_method
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
class FailedCheckoutIntent < CheckoutIntents::Models::BaseCheckoutIntent
|
|
201
|
+
def failure_reason: -> CheckoutIntents::CheckoutIntent::FailedCheckoutIntent::FailureReason
|
|
202
|
+
|
|
203
|
+
def failure_reason=: (
|
|
204
|
+
CheckoutIntents::CheckoutIntent::FailedCheckoutIntent::FailureReason _
|
|
205
|
+
) -> CheckoutIntents::CheckoutIntent::FailedCheckoutIntent::FailureReason
|
|
206
|
+
|
|
207
|
+
def state: -> CheckoutIntents::Models::CheckoutIntent::FailedCheckoutIntent::state
|
|
208
|
+
|
|
209
|
+
def state=: (
|
|
210
|
+
CheckoutIntents::Models::CheckoutIntent::FailedCheckoutIntent::state _
|
|
211
|
+
) -> CheckoutIntents::Models::CheckoutIntent::FailedCheckoutIntent::state
|
|
212
|
+
|
|
213
|
+
def offer: -> CheckoutIntents::Offer?
|
|
214
|
+
|
|
215
|
+
def offer=: (CheckoutIntents::Offer _) -> CheckoutIntents::Offer
|
|
216
|
+
|
|
217
|
+
def payment_method: -> CheckoutIntents::Models::payment_method?
|
|
218
|
+
|
|
219
|
+
def payment_method=: (
|
|
220
|
+
CheckoutIntents::Models::payment_method _
|
|
221
|
+
) -> CheckoutIntents::Models::payment_method
|
|
222
|
+
|
|
223
|
+
def initialize: (
|
|
224
|
+
failure_reason: CheckoutIntents::CheckoutIntent::FailedCheckoutIntent::FailureReason,
|
|
225
|
+
state: CheckoutIntents::Models::CheckoutIntent::FailedCheckoutIntent::state,
|
|
226
|
+
?offer: CheckoutIntents::Offer,
|
|
227
|
+
?payment_method: CheckoutIntents::Models::payment_method
|
|
228
|
+
) -> void
|
|
229
|
+
|
|
230
|
+
def to_hash: -> {
|
|
231
|
+
failure_reason: CheckoutIntents::CheckoutIntent::FailedCheckoutIntent::FailureReason,
|
|
232
|
+
state: CheckoutIntents::Models::CheckoutIntent::FailedCheckoutIntent::state,
|
|
233
|
+
offer: CheckoutIntents::Offer,
|
|
234
|
+
payment_method: CheckoutIntents::Models::payment_method
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
type failure_reason =
|
|
238
|
+
{
|
|
239
|
+
code: CheckoutIntents::Models::CheckoutIntent::FailedCheckoutIntent::FailureReason::code,
|
|
240
|
+
message: String
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
class FailureReason < CheckoutIntents::Internal::Type::BaseModel
|
|
244
|
+
attr_accessor code: CheckoutIntents::Models::CheckoutIntent::FailedCheckoutIntent::FailureReason::code
|
|
245
|
+
|
|
246
|
+
attr_accessor message: String
|
|
247
|
+
|
|
248
|
+
def initialize: (
|
|
249
|
+
code: CheckoutIntents::Models::CheckoutIntent::FailedCheckoutIntent::FailureReason::code,
|
|
250
|
+
message: String
|
|
251
|
+
) -> void
|
|
252
|
+
|
|
253
|
+
def to_hash: -> {
|
|
254
|
+
code: CheckoutIntents::Models::CheckoutIntent::FailedCheckoutIntent::FailureReason::code,
|
|
255
|
+
message: String
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
type code =
|
|
259
|
+
:checkout_intent_expired
|
|
260
|
+
| :payment_failed
|
|
261
|
+
| :insufficient_stock
|
|
262
|
+
| :product_out_of_stock
|
|
263
|
+
| :offer_retrieval_failed
|
|
264
|
+
| :order_placement_failed
|
|
265
|
+
| :developer_not_found
|
|
266
|
+
| :missing_shipping_method
|
|
267
|
+
| :unsupported_currency
|
|
268
|
+
| :invalid_input
|
|
269
|
+
| :incorrect_cost_breakdown
|
|
270
|
+
| :unsupported_store_no_guest_checkout
|
|
271
|
+
| :workflow_invocation_failed
|
|
272
|
+
| :variant_selections_invalid
|
|
273
|
+
| :variant_selections_required
|
|
274
|
+
| :form_validation_error
|
|
275
|
+
| :captcha_blocked
|
|
276
|
+
| :bot_protection_blocked
|
|
277
|
+
| :constraint_total_price_exceeded
|
|
278
|
+
| :constraint_shipping_cost_exceeded
|
|
279
|
+
| :unknown
|
|
280
|
+
|
|
281
|
+
module Code
|
|
282
|
+
extend CheckoutIntents::Internal::Type::Enum
|
|
283
|
+
|
|
284
|
+
CHECKOUT_INTENT_EXPIRED: :checkout_intent_expired
|
|
285
|
+
PAYMENT_FAILED: :payment_failed
|
|
286
|
+
INSUFFICIENT_STOCK: :insufficient_stock
|
|
287
|
+
PRODUCT_OUT_OF_STOCK: :product_out_of_stock
|
|
288
|
+
OFFER_RETRIEVAL_FAILED: :offer_retrieval_failed
|
|
289
|
+
ORDER_PLACEMENT_FAILED: :order_placement_failed
|
|
290
|
+
DEVELOPER_NOT_FOUND: :developer_not_found
|
|
291
|
+
MISSING_SHIPPING_METHOD: :missing_shipping_method
|
|
292
|
+
UNSUPPORTED_CURRENCY: :unsupported_currency
|
|
293
|
+
INVALID_INPUT: :invalid_input
|
|
294
|
+
INCORRECT_COST_BREAKDOWN: :incorrect_cost_breakdown
|
|
295
|
+
UNSUPPORTED_STORE_NO_GUEST_CHECKOUT: :unsupported_store_no_guest_checkout
|
|
296
|
+
WORKFLOW_INVOCATION_FAILED: :workflow_invocation_failed
|
|
297
|
+
VARIANT_SELECTIONS_INVALID: :variant_selections_invalid
|
|
298
|
+
VARIANT_SELECTIONS_REQUIRED: :variant_selections_required
|
|
299
|
+
FORM_VALIDATION_ERROR: :form_validation_error
|
|
300
|
+
CAPTCHA_BLOCKED: :captcha_blocked
|
|
301
|
+
BOT_PROTECTION_BLOCKED: :bot_protection_blocked
|
|
302
|
+
CONSTRAINT_TOTAL_PRICE_EXCEEDED: :constraint_total_price_exceeded
|
|
303
|
+
CONSTRAINT_SHIPPING_COST_EXCEEDED: :constraint_shipping_cost_exceeded
|
|
304
|
+
UNKNOWN: :unknown
|
|
305
|
+
|
|
306
|
+
def self?.values: -> ::Array[CheckoutIntents::Models::CheckoutIntent::FailedCheckoutIntent::FailureReason::code]
|
|
307
|
+
end
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
type state = :failed
|
|
311
|
+
|
|
312
|
+
module State
|
|
313
|
+
extend CheckoutIntents::Internal::Type::Enum
|
|
314
|
+
|
|
315
|
+
FAILED: :failed
|
|
316
|
+
|
|
317
|
+
def self?.values: -> ::Array[CheckoutIntents::Models::CheckoutIntent::FailedCheckoutIntent::state]
|
|
318
|
+
end
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
def self?.variants: -> ::Array[CheckoutIntents::Models::checkout_intent]
|
|
322
|
+
end
|
|
323
|
+
end
|
|
324
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module CheckoutIntents
|
|
2
|
+
module Models
|
|
3
|
+
type checkout_intent_add_payment_params =
|
|
4
|
+
{ payment_method: CheckoutIntents::Models::payment_method }
|
|
5
|
+
& CheckoutIntents::Internal::Type::request_parameters
|
|
6
|
+
|
|
7
|
+
class CheckoutIntentAddPaymentParams < CheckoutIntents::Internal::Type::BaseModel
|
|
8
|
+
extend CheckoutIntents::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include CheckoutIntents::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
attr_accessor payment_method: CheckoutIntents::Models::payment_method
|
|
12
|
+
|
|
13
|
+
def initialize: (
|
|
14
|
+
payment_method: CheckoutIntents::Models::payment_method,
|
|
15
|
+
?request_options: CheckoutIntents::request_opts
|
|
16
|
+
) -> void
|
|
17
|
+
|
|
18
|
+
def to_hash: -> {
|
|
19
|
+
payment_method: CheckoutIntents::Models::payment_method,
|
|
20
|
+
request_options: CheckoutIntents::RequestOptions
|
|
21
|
+
}
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module CheckoutIntents
|
|
2
|
+
module Models
|
|
3
|
+
type checkout_intent_confirm_params =
|
|
4
|
+
{ payment_method: CheckoutIntents::Models::payment_method }
|
|
5
|
+
& CheckoutIntents::Internal::Type::request_parameters
|
|
6
|
+
|
|
7
|
+
class CheckoutIntentConfirmParams < CheckoutIntents::Internal::Type::BaseModel
|
|
8
|
+
extend CheckoutIntents::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include CheckoutIntents::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
attr_accessor payment_method: CheckoutIntents::Models::payment_method
|
|
12
|
+
|
|
13
|
+
def initialize: (
|
|
14
|
+
payment_method: CheckoutIntents::Models::payment_method,
|
|
15
|
+
?request_options: CheckoutIntents::request_opts
|
|
16
|
+
) -> void
|
|
17
|
+
|
|
18
|
+
def to_hash: -> {
|
|
19
|
+
payment_method: CheckoutIntents::Models::payment_method,
|
|
20
|
+
request_options: CheckoutIntents::RequestOptions
|
|
21
|
+
}
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
module CheckoutIntents
|
|
2
|
+
module Models
|
|
3
|
+
type checkout_intent_create_params =
|
|
4
|
+
{
|
|
5
|
+
buyer: CheckoutIntents::Buyer,
|
|
6
|
+
product_url: String,
|
|
7
|
+
quantity: Float,
|
|
8
|
+
constraints: CheckoutIntents::CheckoutIntentCreateParams::Constraints,
|
|
9
|
+
promo_codes: ::Array[String],
|
|
10
|
+
variant_selections: ::Array[CheckoutIntents::VariantSelection]
|
|
11
|
+
}
|
|
12
|
+
& CheckoutIntents::Internal::Type::request_parameters
|
|
13
|
+
|
|
14
|
+
class CheckoutIntentCreateParams < CheckoutIntents::Internal::Type::BaseModel
|
|
15
|
+
extend CheckoutIntents::Internal::Type::RequestParameters::Converter
|
|
16
|
+
include CheckoutIntents::Internal::Type::RequestParameters
|
|
17
|
+
|
|
18
|
+
attr_accessor buyer: CheckoutIntents::Buyer
|
|
19
|
+
|
|
20
|
+
attr_accessor product_url: String
|
|
21
|
+
|
|
22
|
+
attr_accessor quantity: Float
|
|
23
|
+
|
|
24
|
+
attr_reader constraints: CheckoutIntents::CheckoutIntentCreateParams::Constraints?
|
|
25
|
+
|
|
26
|
+
def constraints=: (
|
|
27
|
+
CheckoutIntents::CheckoutIntentCreateParams::Constraints
|
|
28
|
+
) -> CheckoutIntents::CheckoutIntentCreateParams::Constraints
|
|
29
|
+
|
|
30
|
+
attr_reader promo_codes: ::Array[String]?
|
|
31
|
+
|
|
32
|
+
def promo_codes=: (::Array[String]) -> ::Array[String]
|
|
33
|
+
|
|
34
|
+
attr_reader variant_selections: ::Array[CheckoutIntents::VariantSelection]?
|
|
35
|
+
|
|
36
|
+
def variant_selections=: (
|
|
37
|
+
::Array[CheckoutIntents::VariantSelection]
|
|
38
|
+
) -> ::Array[CheckoutIntents::VariantSelection]
|
|
39
|
+
|
|
40
|
+
def initialize: (
|
|
41
|
+
buyer: CheckoutIntents::Buyer,
|
|
42
|
+
product_url: String,
|
|
43
|
+
quantity: Float,
|
|
44
|
+
?constraints: CheckoutIntents::CheckoutIntentCreateParams::Constraints,
|
|
45
|
+
?promo_codes: ::Array[String],
|
|
46
|
+
?variant_selections: ::Array[CheckoutIntents::VariantSelection],
|
|
47
|
+
?request_options: CheckoutIntents::request_opts
|
|
48
|
+
) -> void
|
|
49
|
+
|
|
50
|
+
def to_hash: -> {
|
|
51
|
+
buyer: CheckoutIntents::Buyer,
|
|
52
|
+
product_url: String,
|
|
53
|
+
quantity: Float,
|
|
54
|
+
constraints: CheckoutIntents::CheckoutIntentCreateParams::Constraints,
|
|
55
|
+
promo_codes: ::Array[String],
|
|
56
|
+
variant_selections: ::Array[CheckoutIntents::VariantSelection],
|
|
57
|
+
request_options: CheckoutIntents::RequestOptions
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
type constraints =
|
|
61
|
+
{ max_shipping_price: Integer, max_total_price: Integer }
|
|
62
|
+
|
|
63
|
+
class Constraints < CheckoutIntents::Internal::Type::BaseModel
|
|
64
|
+
attr_reader max_shipping_price: Integer?
|
|
65
|
+
|
|
66
|
+
def max_shipping_price=: (Integer) -> Integer
|
|
67
|
+
|
|
68
|
+
attr_reader max_total_price: Integer?
|
|
69
|
+
|
|
70
|
+
def max_total_price=: (Integer) -> Integer
|
|
71
|
+
|
|
72
|
+
def initialize: (
|
|
73
|
+
?max_shipping_price: Integer,
|
|
74
|
+
?max_total_price: Integer
|
|
75
|
+
) -> void
|
|
76
|
+
|
|
77
|
+
def to_hash: -> {
|
|
78
|
+
max_shipping_price: Integer,
|
|
79
|
+
max_total_price: Integer
|
|
80
|
+
}
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
module CheckoutIntents
|
|
2
|
+
module Models
|
|
3
|
+
type checkout_intent_list_params =
|
|
4
|
+
{
|
|
5
|
+
id: ::Array[String],
|
|
6
|
+
after: String,
|
|
7
|
+
before: String,
|
|
8
|
+
limit: Float,
|
|
9
|
+
state: ::Array[CheckoutIntents::Models::CheckoutIntentListParams::state]
|
|
10
|
+
}
|
|
11
|
+
& CheckoutIntents::Internal::Type::request_parameters
|
|
12
|
+
|
|
13
|
+
class CheckoutIntentListParams < CheckoutIntents::Internal::Type::BaseModel
|
|
14
|
+
extend CheckoutIntents::Internal::Type::RequestParameters::Converter
|
|
15
|
+
include CheckoutIntents::Internal::Type::RequestParameters
|
|
16
|
+
|
|
17
|
+
attr_reader id: ::Array[String]?
|
|
18
|
+
|
|
19
|
+
def id=: (::Array[String]) -> ::Array[String]
|
|
20
|
+
|
|
21
|
+
attr_reader after: String?
|
|
22
|
+
|
|
23
|
+
def after=: (String) -> String
|
|
24
|
+
|
|
25
|
+
attr_reader before: String?
|
|
26
|
+
|
|
27
|
+
def before=: (String) -> String
|
|
28
|
+
|
|
29
|
+
attr_reader limit: Float?
|
|
30
|
+
|
|
31
|
+
def limit=: (Float) -> Float
|
|
32
|
+
|
|
33
|
+
attr_reader state: ::Array[CheckoutIntents::Models::CheckoutIntentListParams::state]?
|
|
34
|
+
|
|
35
|
+
def state=: (
|
|
36
|
+
::Array[CheckoutIntents::Models::CheckoutIntentListParams::state]
|
|
37
|
+
) -> ::Array[CheckoutIntents::Models::CheckoutIntentListParams::state]
|
|
38
|
+
|
|
39
|
+
def initialize: (
|
|
40
|
+
?id: ::Array[String],
|
|
41
|
+
?after: String,
|
|
42
|
+
?before: String,
|
|
43
|
+
?limit: Float,
|
|
44
|
+
?state: ::Array[CheckoutIntents::Models::CheckoutIntentListParams::state],
|
|
45
|
+
?request_options: CheckoutIntents::request_opts
|
|
46
|
+
) -> void
|
|
47
|
+
|
|
48
|
+
def to_hash: -> {
|
|
49
|
+
id: ::Array[String],
|
|
50
|
+
after: String,
|
|
51
|
+
before: String,
|
|
52
|
+
limit: Float,
|
|
53
|
+
state: ::Array[CheckoutIntents::Models::CheckoutIntentListParams::state],
|
|
54
|
+
request_options: CheckoutIntents::RequestOptions
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
type state =
|
|
58
|
+
:retrieving_offer
|
|
59
|
+
| :awaiting_confirmation
|
|
60
|
+
| :placing_order
|
|
61
|
+
| :completed
|
|
62
|
+
| :failed
|
|
63
|
+
|
|
64
|
+
module State
|
|
65
|
+
extend CheckoutIntents::Internal::Type::Enum
|
|
66
|
+
|
|
67
|
+
RETRIEVING_OFFER: :retrieving_offer
|
|
68
|
+
AWAITING_CONFIRMATION: :awaiting_confirmation
|
|
69
|
+
PLACING_ORDER: :placing_order
|
|
70
|
+
COMPLETED: :completed
|
|
71
|
+
FAILED: :failed
|
|
72
|
+
|
|
73
|
+
def self?.values: -> ::Array[CheckoutIntents::Models::CheckoutIntentListParams::state]
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
module CheckoutIntents
|
|
2
|
+
module Models
|
|
3
|
+
type checkout_intent_purchase_params =
|
|
4
|
+
{
|
|
5
|
+
buyer: CheckoutIntents::Buyer,
|
|
6
|
+
payment_method: CheckoutIntents::Models::payment_method,
|
|
7
|
+
product_url: String,
|
|
8
|
+
quantity: Float,
|
|
9
|
+
constraints: CheckoutIntents::CheckoutIntentPurchaseParams::Constraints,
|
|
10
|
+
promo_codes: ::Array[String],
|
|
11
|
+
variant_selections: ::Array[CheckoutIntents::VariantSelection]
|
|
12
|
+
}
|
|
13
|
+
& CheckoutIntents::Internal::Type::request_parameters
|
|
14
|
+
|
|
15
|
+
class CheckoutIntentPurchaseParams < CheckoutIntents::Internal::Type::BaseModel
|
|
16
|
+
extend CheckoutIntents::Internal::Type::RequestParameters::Converter
|
|
17
|
+
include CheckoutIntents::Internal::Type::RequestParameters
|
|
18
|
+
|
|
19
|
+
attr_accessor buyer: CheckoutIntents::Buyer
|
|
20
|
+
|
|
21
|
+
attr_accessor payment_method: CheckoutIntents::Models::payment_method
|
|
22
|
+
|
|
23
|
+
attr_accessor product_url: String
|
|
24
|
+
|
|
25
|
+
attr_accessor quantity: Float
|
|
26
|
+
|
|
27
|
+
attr_reader constraints: CheckoutIntents::CheckoutIntentPurchaseParams::Constraints?
|
|
28
|
+
|
|
29
|
+
def constraints=: (
|
|
30
|
+
CheckoutIntents::CheckoutIntentPurchaseParams::Constraints
|
|
31
|
+
) -> CheckoutIntents::CheckoutIntentPurchaseParams::Constraints
|
|
32
|
+
|
|
33
|
+
attr_reader promo_codes: ::Array[String]?
|
|
34
|
+
|
|
35
|
+
def promo_codes=: (::Array[String]) -> ::Array[String]
|
|
36
|
+
|
|
37
|
+
attr_reader variant_selections: ::Array[CheckoutIntents::VariantSelection]?
|
|
38
|
+
|
|
39
|
+
def variant_selections=: (
|
|
40
|
+
::Array[CheckoutIntents::VariantSelection]
|
|
41
|
+
) -> ::Array[CheckoutIntents::VariantSelection]
|
|
42
|
+
|
|
43
|
+
def initialize: (
|
|
44
|
+
buyer: CheckoutIntents::Buyer,
|
|
45
|
+
payment_method: CheckoutIntents::Models::payment_method,
|
|
46
|
+
product_url: String,
|
|
47
|
+
quantity: Float,
|
|
48
|
+
?constraints: CheckoutIntents::CheckoutIntentPurchaseParams::Constraints,
|
|
49
|
+
?promo_codes: ::Array[String],
|
|
50
|
+
?variant_selections: ::Array[CheckoutIntents::VariantSelection],
|
|
51
|
+
?request_options: CheckoutIntents::request_opts
|
|
52
|
+
) -> void
|
|
53
|
+
|
|
54
|
+
def to_hash: -> {
|
|
55
|
+
buyer: CheckoutIntents::Buyer,
|
|
56
|
+
payment_method: CheckoutIntents::Models::payment_method,
|
|
57
|
+
product_url: String,
|
|
58
|
+
quantity: Float,
|
|
59
|
+
constraints: CheckoutIntents::CheckoutIntentPurchaseParams::Constraints,
|
|
60
|
+
promo_codes: ::Array[String],
|
|
61
|
+
variant_selections: ::Array[CheckoutIntents::VariantSelection],
|
|
62
|
+
request_options: CheckoutIntents::RequestOptions
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
type constraints =
|
|
66
|
+
{ max_shipping_price: Integer, max_total_price: Integer }
|
|
67
|
+
|
|
68
|
+
class Constraints < CheckoutIntents::Internal::Type::BaseModel
|
|
69
|
+
attr_reader max_shipping_price: Integer?
|
|
70
|
+
|
|
71
|
+
def max_shipping_price=: (Integer) -> Integer
|
|
72
|
+
|
|
73
|
+
attr_reader max_total_price: Integer?
|
|
74
|
+
|
|
75
|
+
def max_total_price=: (Integer) -> Integer
|
|
76
|
+
|
|
77
|
+
def initialize: (
|
|
78
|
+
?max_shipping_price: Integer,
|
|
79
|
+
?max_total_price: Integer
|
|
80
|
+
) -> void
|
|
81
|
+
|
|
82
|
+
def to_hash: -> {
|
|
83
|
+
max_shipping_price: Integer,
|
|
84
|
+
max_total_price: Integer
|
|
85
|
+
}
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module CheckoutIntents
|
|
2
|
+
module Models
|
|
3
|
+
type checkout_intent_retrieve_params =
|
|
4
|
+
{ } & CheckoutIntents::Internal::Type::request_parameters
|
|
5
|
+
|
|
6
|
+
class CheckoutIntentRetrieveParams < CheckoutIntents::Internal::Type::BaseModel
|
|
7
|
+
extend CheckoutIntents::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include CheckoutIntents::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
def initialize: (?request_options: CheckoutIntents::request_opts) -> void
|
|
11
|
+
|
|
12
|
+
def to_hash: -> { request_options: CheckoutIntents::RequestOptions }
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module CheckoutIntents
|
|
2
|
+
module Models
|
|
3
|
+
type checkout_session = { url: String }
|
|
4
|
+
|
|
5
|
+
class CheckoutSession < CheckoutIntents::Internal::Type::BaseModel
|
|
6
|
+
attr_accessor url: String
|
|
7
|
+
|
|
8
|
+
def initialize: (url: String) -> void
|
|
9
|
+
|
|
10
|
+
def to_hash: -> { url: String }
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module CheckoutIntents
|
|
2
|
+
module Models
|
|
3
|
+
type money = { amount_subunits: Float, currency_code: String }
|
|
4
|
+
|
|
5
|
+
class Money < CheckoutIntents::Internal::Type::BaseModel
|
|
6
|
+
attr_accessor amount_subunits: Float
|
|
7
|
+
|
|
8
|
+
attr_accessor currency_code: String
|
|
9
|
+
|
|
10
|
+
def initialize: (amount_subunits: Float, currency_code: String) -> void
|
|
11
|
+
|
|
12
|
+
def to_hash: -> { amount_subunits: Float, currency_code: String }
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|