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,88 @@
|
|
|
1
|
+
module CheckoutIntents
|
|
2
|
+
module Models
|
|
3
|
+
type base_checkout_intent =
|
|
4
|
+
{
|
|
5
|
+
id: String,
|
|
6
|
+
buyer: CheckoutIntents::Buyer,
|
|
7
|
+
created_at: Time,
|
|
8
|
+
product_url: String,
|
|
9
|
+
quantity: Float,
|
|
10
|
+
constraints: CheckoutIntents::BaseCheckoutIntent::Constraints,
|
|
11
|
+
promo_codes: ::Array[String],
|
|
12
|
+
variant_selections: ::Array[CheckoutIntents::VariantSelection]
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
class BaseCheckoutIntent < CheckoutIntents::Internal::Type::BaseModel
|
|
16
|
+
attr_accessor id: String
|
|
17
|
+
|
|
18
|
+
attr_accessor buyer: CheckoutIntents::Buyer
|
|
19
|
+
|
|
20
|
+
attr_accessor created_at: Time
|
|
21
|
+
|
|
22
|
+
attr_accessor product_url: String
|
|
23
|
+
|
|
24
|
+
attr_accessor quantity: Float
|
|
25
|
+
|
|
26
|
+
attr_reader constraints: CheckoutIntents::BaseCheckoutIntent::Constraints?
|
|
27
|
+
|
|
28
|
+
def constraints=: (
|
|
29
|
+
CheckoutIntents::BaseCheckoutIntent::Constraints
|
|
30
|
+
) -> CheckoutIntents::BaseCheckoutIntent::Constraints
|
|
31
|
+
|
|
32
|
+
attr_reader promo_codes: ::Array[String]?
|
|
33
|
+
|
|
34
|
+
def promo_codes=: (::Array[String]) -> ::Array[String]
|
|
35
|
+
|
|
36
|
+
attr_reader variant_selections: ::Array[CheckoutIntents::VariantSelection]?
|
|
37
|
+
|
|
38
|
+
def variant_selections=: (
|
|
39
|
+
::Array[CheckoutIntents::VariantSelection]
|
|
40
|
+
) -> ::Array[CheckoutIntents::VariantSelection]
|
|
41
|
+
|
|
42
|
+
def initialize: (
|
|
43
|
+
id: String,
|
|
44
|
+
buyer: CheckoutIntents::Buyer,
|
|
45
|
+
created_at: Time,
|
|
46
|
+
product_url: String,
|
|
47
|
+
quantity: Float,
|
|
48
|
+
?constraints: CheckoutIntents::BaseCheckoutIntent::Constraints,
|
|
49
|
+
?promo_codes: ::Array[String],
|
|
50
|
+
?variant_selections: ::Array[CheckoutIntents::VariantSelection]
|
|
51
|
+
) -> void
|
|
52
|
+
|
|
53
|
+
def to_hash: -> {
|
|
54
|
+
id: String,
|
|
55
|
+
buyer: CheckoutIntents::Buyer,
|
|
56
|
+
created_at: Time,
|
|
57
|
+
product_url: String,
|
|
58
|
+
quantity: Float,
|
|
59
|
+
constraints: CheckoutIntents::BaseCheckoutIntent::Constraints,
|
|
60
|
+
promo_codes: ::Array[String],
|
|
61
|
+
variant_selections: ::Array[CheckoutIntents::VariantSelection]
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
type constraints =
|
|
65
|
+
{ max_shipping_price: Integer, max_total_price: Integer }
|
|
66
|
+
|
|
67
|
+
class Constraints < CheckoutIntents::Internal::Type::BaseModel
|
|
68
|
+
attr_reader max_shipping_price: Integer?
|
|
69
|
+
|
|
70
|
+
def max_shipping_price=: (Integer) -> Integer
|
|
71
|
+
|
|
72
|
+
attr_reader max_total_price: Integer?
|
|
73
|
+
|
|
74
|
+
def max_total_price=: (Integer) -> Integer
|
|
75
|
+
|
|
76
|
+
def initialize: (
|
|
77
|
+
?max_shipping_price: Integer,
|
|
78
|
+
?max_total_price: Integer
|
|
79
|
+
) -> void
|
|
80
|
+
|
|
81
|
+
def to_hash: -> {
|
|
82
|
+
max_shipping_price: Integer,
|
|
83
|
+
max_total_price: Integer
|
|
84
|
+
}
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
module CheckoutIntents
|
|
2
|
+
module Models
|
|
3
|
+
module Betas
|
|
4
|
+
type checkout_session_create_params =
|
|
5
|
+
{
|
|
6
|
+
product_url: String,
|
|
7
|
+
quantity: Float,
|
|
8
|
+
buyer: CheckoutIntents::Betas::CheckoutSessionCreateParams::Buyer,
|
|
9
|
+
constraints: CheckoutIntents::Betas::CheckoutSessionCreateParams::Constraints,
|
|
10
|
+
promo_codes: ::Array[String],
|
|
11
|
+
variant_selections: ::Array[CheckoutIntents::VariantSelection]
|
|
12
|
+
}
|
|
13
|
+
& CheckoutIntents::Internal::Type::request_parameters
|
|
14
|
+
|
|
15
|
+
class CheckoutSessionCreateParams < CheckoutIntents::Internal::Type::BaseModel
|
|
16
|
+
extend CheckoutIntents::Internal::Type::RequestParameters::Converter
|
|
17
|
+
include CheckoutIntents::Internal::Type::RequestParameters
|
|
18
|
+
|
|
19
|
+
attr_accessor product_url: String
|
|
20
|
+
|
|
21
|
+
attr_accessor quantity: Float
|
|
22
|
+
|
|
23
|
+
attr_reader buyer: CheckoutIntents::Betas::CheckoutSessionCreateParams::Buyer?
|
|
24
|
+
|
|
25
|
+
def buyer=: (
|
|
26
|
+
CheckoutIntents::Betas::CheckoutSessionCreateParams::Buyer
|
|
27
|
+
) -> CheckoutIntents::Betas::CheckoutSessionCreateParams::Buyer
|
|
28
|
+
|
|
29
|
+
attr_reader constraints: CheckoutIntents::Betas::CheckoutSessionCreateParams::Constraints?
|
|
30
|
+
|
|
31
|
+
def constraints=: (
|
|
32
|
+
CheckoutIntents::Betas::CheckoutSessionCreateParams::Constraints
|
|
33
|
+
) -> CheckoutIntents::Betas::CheckoutSessionCreateParams::Constraints
|
|
34
|
+
|
|
35
|
+
attr_reader promo_codes: ::Array[String]?
|
|
36
|
+
|
|
37
|
+
def promo_codes=: (::Array[String]) -> ::Array[String]
|
|
38
|
+
|
|
39
|
+
attr_reader variant_selections: ::Array[CheckoutIntents::VariantSelection]?
|
|
40
|
+
|
|
41
|
+
def variant_selections=: (
|
|
42
|
+
::Array[CheckoutIntents::VariantSelection]
|
|
43
|
+
) -> ::Array[CheckoutIntents::VariantSelection]
|
|
44
|
+
|
|
45
|
+
def initialize: (
|
|
46
|
+
product_url: String,
|
|
47
|
+
quantity: Float,
|
|
48
|
+
?buyer: CheckoutIntents::Betas::CheckoutSessionCreateParams::Buyer,
|
|
49
|
+
?constraints: CheckoutIntents::Betas::CheckoutSessionCreateParams::Constraints,
|
|
50
|
+
?promo_codes: ::Array[String],
|
|
51
|
+
?variant_selections: ::Array[CheckoutIntents::VariantSelection],
|
|
52
|
+
?request_options: CheckoutIntents::request_opts
|
|
53
|
+
) -> void
|
|
54
|
+
|
|
55
|
+
def to_hash: -> {
|
|
56
|
+
product_url: String,
|
|
57
|
+
quantity: Float,
|
|
58
|
+
buyer: CheckoutIntents::Betas::CheckoutSessionCreateParams::Buyer,
|
|
59
|
+
constraints: CheckoutIntents::Betas::CheckoutSessionCreateParams::Constraints,
|
|
60
|
+
promo_codes: ::Array[String],
|
|
61
|
+
variant_selections: ::Array[CheckoutIntents::VariantSelection],
|
|
62
|
+
request_options: CheckoutIntents::RequestOptions
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
type buyer =
|
|
66
|
+
{
|
|
67
|
+
:address1 => String,
|
|
68
|
+
:address2 => String,
|
|
69
|
+
city: String,
|
|
70
|
+
country: String,
|
|
71
|
+
email: String,
|
|
72
|
+
first_name: String,
|
|
73
|
+
last_name: String,
|
|
74
|
+
phone: String,
|
|
75
|
+
postal_code: String,
|
|
76
|
+
province: String
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
class Buyer < CheckoutIntents::Internal::Type::BaseModel
|
|
80
|
+
attr_reader address1: String?
|
|
81
|
+
|
|
82
|
+
def address1=: (String) -> String
|
|
83
|
+
|
|
84
|
+
attr_reader address2: String?
|
|
85
|
+
|
|
86
|
+
def address2=: (String) -> String
|
|
87
|
+
|
|
88
|
+
attr_reader city: String?
|
|
89
|
+
|
|
90
|
+
def city=: (String) -> String
|
|
91
|
+
|
|
92
|
+
attr_reader country: String?
|
|
93
|
+
|
|
94
|
+
def country=: (String) -> String
|
|
95
|
+
|
|
96
|
+
attr_reader email: String?
|
|
97
|
+
|
|
98
|
+
def email=: (String) -> String
|
|
99
|
+
|
|
100
|
+
attr_reader first_name: String?
|
|
101
|
+
|
|
102
|
+
def first_name=: (String) -> String
|
|
103
|
+
|
|
104
|
+
attr_reader last_name: String?
|
|
105
|
+
|
|
106
|
+
def last_name=: (String) -> String
|
|
107
|
+
|
|
108
|
+
attr_reader phone: String?
|
|
109
|
+
|
|
110
|
+
def phone=: (String) -> String
|
|
111
|
+
|
|
112
|
+
attr_reader postal_code: String?
|
|
113
|
+
|
|
114
|
+
def postal_code=: (String) -> String
|
|
115
|
+
|
|
116
|
+
attr_reader province: String?
|
|
117
|
+
|
|
118
|
+
def province=: (String) -> String
|
|
119
|
+
|
|
120
|
+
def initialize: (
|
|
121
|
+
?address1: String,
|
|
122
|
+
?address2: String,
|
|
123
|
+
?city: String,
|
|
124
|
+
?country: String,
|
|
125
|
+
?email: String,
|
|
126
|
+
?first_name: String,
|
|
127
|
+
?last_name: String,
|
|
128
|
+
?phone: String,
|
|
129
|
+
?postal_code: String,
|
|
130
|
+
?province: String
|
|
131
|
+
) -> void
|
|
132
|
+
|
|
133
|
+
def to_hash: -> {
|
|
134
|
+
:address1 => String,
|
|
135
|
+
:address2 => String,
|
|
136
|
+
city: String,
|
|
137
|
+
country: String,
|
|
138
|
+
email: String,
|
|
139
|
+
first_name: String,
|
|
140
|
+
last_name: String,
|
|
141
|
+
phone: String,
|
|
142
|
+
postal_code: String,
|
|
143
|
+
province: String
|
|
144
|
+
}
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
type constraints =
|
|
148
|
+
{ max_shipping_price: Integer, max_total_price: Integer }
|
|
149
|
+
|
|
150
|
+
class Constraints < CheckoutIntents::Internal::Type::BaseModel
|
|
151
|
+
attr_reader max_shipping_price: Integer?
|
|
152
|
+
|
|
153
|
+
def max_shipping_price=: (Integer) -> Integer
|
|
154
|
+
|
|
155
|
+
attr_reader max_total_price: Integer?
|
|
156
|
+
|
|
157
|
+
def max_total_price=: (Integer) -> Integer
|
|
158
|
+
|
|
159
|
+
def initialize: (
|
|
160
|
+
?max_shipping_price: Integer,
|
|
161
|
+
?max_total_price: Integer
|
|
162
|
+
) -> void
|
|
163
|
+
|
|
164
|
+
def to_hash: -> {
|
|
165
|
+
max_shipping_price: Integer,
|
|
166
|
+
max_total_price: Integer
|
|
167
|
+
}
|
|
168
|
+
end
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module CheckoutIntents
|
|
2
|
+
module Models
|
|
3
|
+
type brand_retrieve_params =
|
|
4
|
+
{ } & CheckoutIntents::Internal::Type::request_parameters
|
|
5
|
+
|
|
6
|
+
class BrandRetrieveParams < 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,43 @@
|
|
|
1
|
+
module CheckoutIntents
|
|
2
|
+
module Models
|
|
3
|
+
type brand_retrieve_response =
|
|
4
|
+
{
|
|
5
|
+
id: String,
|
|
6
|
+
marketplace: CheckoutIntents::Models::BrandRetrieveResponse::marketplace,
|
|
7
|
+
supported: bool
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
class BrandRetrieveResponse < CheckoutIntents::Internal::Type::BaseModel
|
|
11
|
+
attr_accessor id: String
|
|
12
|
+
|
|
13
|
+
attr_accessor marketplace: CheckoutIntents::Models::BrandRetrieveResponse::marketplace
|
|
14
|
+
|
|
15
|
+
attr_accessor supported: bool
|
|
16
|
+
|
|
17
|
+
def initialize: (
|
|
18
|
+
id: String,
|
|
19
|
+
marketplace: CheckoutIntents::Models::BrandRetrieveResponse::marketplace,
|
|
20
|
+
supported: bool
|
|
21
|
+
) -> void
|
|
22
|
+
|
|
23
|
+
def to_hash: -> {
|
|
24
|
+
id: String,
|
|
25
|
+
marketplace: CheckoutIntents::Models::BrandRetrieveResponse::marketplace,
|
|
26
|
+
supported: bool
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
type marketplace = :AMAZON | :SHOPIFY | :BESTBUY | :UNKNOWN
|
|
30
|
+
|
|
31
|
+
module Marketplace
|
|
32
|
+
extend CheckoutIntents::Internal::Type::Enum
|
|
33
|
+
|
|
34
|
+
AMAZON: :AMAZON
|
|
35
|
+
SHOPIFY: :SHOPIFY
|
|
36
|
+
BESTBUY: :BESTBUY
|
|
37
|
+
UNKNOWN: :UNKNOWN
|
|
38
|
+
|
|
39
|
+
def self?.values: -> ::Array[CheckoutIntents::Models::BrandRetrieveResponse::marketplace]
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
module CheckoutIntents
|
|
2
|
+
module Models
|
|
3
|
+
type buyer =
|
|
4
|
+
{
|
|
5
|
+
:address1 => String,
|
|
6
|
+
city: String,
|
|
7
|
+
country: String,
|
|
8
|
+
email: String,
|
|
9
|
+
first_name: String,
|
|
10
|
+
last_name: String,
|
|
11
|
+
phone: String,
|
|
12
|
+
postal_code: String,
|
|
13
|
+
province: String,
|
|
14
|
+
:address2 => String
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
class Buyer < CheckoutIntents::Internal::Type::BaseModel
|
|
18
|
+
attr_accessor address1: String
|
|
19
|
+
|
|
20
|
+
attr_accessor city: String
|
|
21
|
+
|
|
22
|
+
attr_accessor country: String
|
|
23
|
+
|
|
24
|
+
attr_accessor email: String
|
|
25
|
+
|
|
26
|
+
attr_accessor first_name: String
|
|
27
|
+
|
|
28
|
+
attr_accessor last_name: String
|
|
29
|
+
|
|
30
|
+
attr_accessor phone: String
|
|
31
|
+
|
|
32
|
+
attr_accessor postal_code: String
|
|
33
|
+
|
|
34
|
+
attr_accessor province: String
|
|
35
|
+
|
|
36
|
+
attr_reader address2: String?
|
|
37
|
+
|
|
38
|
+
def address2=: (String) -> String
|
|
39
|
+
|
|
40
|
+
def initialize: (
|
|
41
|
+
address1: String,
|
|
42
|
+
city: String,
|
|
43
|
+
country: String,
|
|
44
|
+
email: String,
|
|
45
|
+
first_name: String,
|
|
46
|
+
last_name: String,
|
|
47
|
+
phone: String,
|
|
48
|
+
postal_code: String,
|
|
49
|
+
province: String,
|
|
50
|
+
?address2: String
|
|
51
|
+
) -> void
|
|
52
|
+
|
|
53
|
+
def to_hash: -> {
|
|
54
|
+
:address1 => String,
|
|
55
|
+
city: String,
|
|
56
|
+
country: String,
|
|
57
|
+
email: String,
|
|
58
|
+
first_name: String,
|
|
59
|
+
last_name: String,
|
|
60
|
+
phone: String,
|
|
61
|
+
postal_code: String,
|
|
62
|
+
province: String,
|
|
63
|
+
:address2 => String
|
|
64
|
+
}
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|