terminal-shop 1.0.0 → 1.1.0
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 +4 -4
- data/README.md +27 -19
- data/lib/terminal-shop/base_model.rb +448 -438
- data/lib/terminal-shop/models/cart.rb +35 -2
- data/lib/terminal-shop/models/cart_convert_params.rb +11 -1
- data/lib/terminal-shop/models/cart_redeem_gift_card_params.rb +24 -0
- data/lib/terminal-shop/models/cart_redeem_gift_card_response.rb +48 -0
- data/lib/terminal-shop/models/cart_remove_gift_card_params.rb +18 -0
- data/lib/terminal-shop/models/cart_remove_gift_card_response.rb +19 -0
- data/lib/terminal-shop/models/product.rb +11 -6
- data/lib/terminal-shop/resources/cart.rb +43 -1
- data/lib/terminal-shop/util.rb +3 -3
- data/lib/terminal-shop/version.rb +1 -1
- data/lib/terminal-shop.rb +4 -0
- data/rbi/lib/terminal-shop/base_client.rbi +23 -21
- data/rbi/lib/terminal-shop/base_model.rbi +235 -217
- data/rbi/lib/terminal-shop/client.rbi +2 -2
- data/rbi/lib/terminal-shop/errors.rbi +8 -8
- data/rbi/lib/terminal-shop/models/address.rbi +2 -2
- data/rbi/lib/terminal-shop/models/address_create_params.rbi +3 -13
- data/rbi/lib/terminal-shop/models/address_create_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/address_delete_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/address_delete_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/address_get_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/address_get_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/address_list_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/address_list_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/app.rbi +2 -2
- data/rbi/lib/terminal-shop/models/app_create_params.rbi +2 -2
- data/rbi/lib/terminal-shop/models/app_create_response.rbi +4 -4
- data/rbi/lib/terminal-shop/models/app_delete_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/app_delete_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/app_get_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/app_get_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/app_list_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/app_list_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/card.rbi +4 -4
- data/rbi/lib/terminal-shop/models/card_collect_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/card_collect_response.rbi +4 -4
- data/rbi/lib/terminal-shop/models/card_create_params.rbi +2 -2
- data/rbi/lib/terminal-shop/models/card_create_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/card_delete_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/card_delete_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/card_get_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/card_get_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/card_list_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/card_list_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/cart.rbi +45 -9
- data/rbi/lib/terminal-shop/models/cart_convert_params.rbi +17 -3
- data/rbi/lib/terminal-shop/models/cart_convert_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/cart_get_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/cart_get_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/cart_redeem_gift_card_params.rbi +32 -0
- data/rbi/lib/terminal-shop/models/cart_redeem_gift_card_response.rbi +66 -0
- data/rbi/lib/terminal-shop/models/cart_remove_gift_card_params.rbi +21 -0
- data/rbi/lib/terminal-shop/models/cart_remove_gift_card_response.rbi +23 -0
- data/rbi/lib/terminal-shop/models/cart_set_address_params.rbi +2 -2
- data/rbi/lib/terminal-shop/models/cart_set_address_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/cart_set_card_params.rbi +2 -2
- data/rbi/lib/terminal-shop/models/cart_set_card_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/cart_set_item_params.rbi +2 -2
- data/rbi/lib/terminal-shop/models/cart_set_item_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/email_create_params.rbi +2 -2
- data/rbi/lib/terminal-shop/models/email_create_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/order.rbi +10 -10
- data/rbi/lib/terminal-shop/models/order_create_params.rbi +2 -2
- data/rbi/lib/terminal-shop/models/order_create_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/order_get_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/order_get_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/order_list_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/order_list_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/product.rbi +29 -14
- data/rbi/lib/terminal-shop/models/product_get_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/product_get_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/product_list_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/product_list_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/product_variant.rbi +2 -2
- data/rbi/lib/terminal-shop/models/profile.rbi +4 -4
- data/rbi/lib/terminal-shop/models/profile_me_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/profile_me_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/profile_update_params.rbi +2 -2
- data/rbi/lib/terminal-shop/models/profile_update_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/subscription.rbi +15 -13
- data/rbi/lib/terminal-shop/models/subscription_create_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/subscription_create_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/subscription_delete_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/subscription_delete_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/subscription_get_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/subscription_get_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/subscription_list_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/subscription_list_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/token.rbi +2 -2
- data/rbi/lib/terminal-shop/models/token_create_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/token_create_response.rbi +4 -4
- data/rbi/lib/terminal-shop/models/token_delete_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/token_delete_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/token_get_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/token_get_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/token_list_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/token_list_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/view_init_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/view_init_response.rbi +5 -15
- data/rbi/lib/terminal-shop/pooled_net_requester.rbi +12 -10
- data/rbi/lib/terminal-shop/request_options.rbi +4 -0
- data/rbi/lib/terminal-shop/resources/address.rbi +2 -2
- data/rbi/lib/terminal-shop/resources/app.rbi +2 -2
- data/rbi/lib/terminal-shop/resources/card.rbi +2 -2
- data/rbi/lib/terminal-shop/resources/cart.rbi +24 -4
- data/rbi/lib/terminal-shop/resources/email.rbi +2 -2
- data/rbi/lib/terminal-shop/resources/order.rbi +2 -2
- data/rbi/lib/terminal-shop/resources/product.rbi +2 -2
- data/rbi/lib/terminal-shop/resources/profile.rbi +2 -2
- data/rbi/lib/terminal-shop/resources/subscription.rbi +2 -2
- data/rbi/lib/terminal-shop/resources/token.rbi +2 -2
- data/rbi/lib/terminal-shop/resources/view.rbi +2 -2
- data/rbi/lib/terminal-shop/util.rbi +146 -126
- data/rbi/lib/terminal-shop/version.rbi +1 -1
- data/sig/terminal-shop/models/cart.rbs +27 -2
- data/sig/terminal-shop/models/cart_convert_params.rbs +10 -2
- data/sig/terminal-shop/models/cart_redeem_gift_card_params.rbs +25 -0
- data/sig/terminal-shop/models/cart_redeem_gift_card_response.rbs +47 -0
- data/sig/terminal-shop/models/cart_remove_gift_card_params.rbs +19 -0
- data/sig/terminal-shop/models/cart_remove_gift_card_response.rbs +18 -0
- data/sig/terminal-shop/models/product.rbs +8 -2
- data/sig/terminal-shop/request_options.rbs +4 -0
- data/sig/terminal-shop/resources/cart.rbs +20 -0
- data/sig/terminal-shop/version.rbs +1 -1
- metadata +14 -2
@@ -6,80 +6,90 @@ module TerminalShop
|
|
6
6
|
def self.monotonic_secs
|
7
7
|
end
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
class << self
|
10
|
+
sig { returns(String) }
|
11
|
+
def arch
|
12
|
+
end
|
12
13
|
|
13
|
-
|
14
|
-
|
14
|
+
sig { returns(String) }
|
15
|
+
def os
|
16
|
+
end
|
15
17
|
end
|
16
18
|
|
17
|
-
|
18
|
-
|
19
|
-
|
19
|
+
class << self
|
20
|
+
sig { params(input: T.anything).returns(T.any(T::Boolean, T.anything)) }
|
21
|
+
def primitive?(input)
|
22
|
+
end
|
20
23
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
+
sig { params(input: T.anything).returns(T.any(T::Boolean, T.anything)) }
|
25
|
+
def coerce_boolean(input)
|
26
|
+
end
|
24
27
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
+
sig { params(input: T.anything).returns(T.nilable(T::Boolean)) }
|
29
|
+
def coerce_boolean!(input)
|
30
|
+
end
|
28
31
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
+
sig { params(input: T.anything).returns(T.any(Integer, T.anything)) }
|
33
|
+
def coerce_integer(input)
|
34
|
+
end
|
32
35
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
+
sig { params(input: T.anything).returns(T.any(Float, T.anything)) }
|
37
|
+
def coerce_float(input)
|
38
|
+
end
|
36
39
|
|
37
|
-
|
38
|
-
|
40
|
+
sig { params(input: T.anything).returns(T.any(T::Hash[T.anything, T.anything], T.anything)) }
|
41
|
+
def coerce_hash(input)
|
42
|
+
end
|
39
43
|
end
|
40
44
|
|
41
45
|
OMIT = T.let(T.anything, T.anything)
|
42
46
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
.
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
end
|
77
|
-
|
78
|
-
|
79
|
-
params(query: T.nilable(T::Hash[String, T
|
80
|
-
|
81
|
-
|
82
|
-
|
47
|
+
class << self
|
48
|
+
sig { params(lhs: T.anything, rhs: T.anything, concat: T::Boolean).returns(T.anything) }
|
49
|
+
private def deep_merge_lr(lhs, rhs, concat: false)
|
50
|
+
end
|
51
|
+
|
52
|
+
sig do
|
53
|
+
params(values: T::Array[T.anything], sentinel: T.nilable(T.anything), concat: T::Boolean)
|
54
|
+
.returns(T.anything)
|
55
|
+
end
|
56
|
+
def deep_merge(*values, sentinel: nil, concat: false)
|
57
|
+
end
|
58
|
+
|
59
|
+
sig do
|
60
|
+
params(
|
61
|
+
data: T.any(T::Hash[Symbol, T.anything], T::Array[T.anything], T.anything),
|
62
|
+
pick: T.nilable(T.any(Symbol, Integer, T::Array[T.any(Symbol, Integer)])),
|
63
|
+
sentinel: T.nilable(T.anything),
|
64
|
+
blk: T.nilable(T.proc.returns(T.anything))
|
65
|
+
)
|
66
|
+
.returns(T.nilable(T.anything))
|
67
|
+
end
|
68
|
+
def dig(data, pick, sentinel = nil, &blk)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
class << self
|
73
|
+
sig { params(uri: URI::Generic).returns(String) }
|
74
|
+
def uri_origin(uri)
|
75
|
+
end
|
76
|
+
|
77
|
+
sig { params(path: T.any(String, T::Array[String])).returns(String) }
|
78
|
+
def interpolate_path(path)
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
class << self
|
83
|
+
sig { params(query: T.nilable(String)).returns(T::Hash[String, T::Array[String]]) }
|
84
|
+
def decode_query(query)
|
85
|
+
end
|
86
|
+
|
87
|
+
sig do
|
88
|
+
params(query: T.nilable(T::Hash[String, T.nilable(T.any(T::Array[String], String))]))
|
89
|
+
.returns(T.nilable(String))
|
90
|
+
end
|
91
|
+
def encode_query(query)
|
92
|
+
end
|
83
93
|
end
|
84
94
|
|
85
95
|
ParsedUriShape = T.type_alias do
|
@@ -92,77 +102,87 @@ module TerminalShop
|
|
92
102
|
}
|
93
103
|
end
|
94
104
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
end
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
params(
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
)
|
152
|
-
|
153
|
-
|
105
|
+
class << self
|
106
|
+
sig { params(url: T.any(URI::Generic, String)).returns(TerminalShop::Util::ParsedUriShape) }
|
107
|
+
def parse_uri(url)
|
108
|
+
end
|
109
|
+
|
110
|
+
sig { params(parsed: TerminalShop::Util::ParsedUriShape).returns(URI::Generic) }
|
111
|
+
def unparse_uri(parsed)
|
112
|
+
end
|
113
|
+
|
114
|
+
sig do
|
115
|
+
params(lhs: TerminalShop::Util::ParsedUriShape, rhs: TerminalShop::Util::ParsedUriShape)
|
116
|
+
.returns(URI::Generic)
|
117
|
+
end
|
118
|
+
def join_parsed_uri(lhs, rhs)
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
class << self
|
123
|
+
sig do
|
124
|
+
params(
|
125
|
+
headers: T::Hash[String,
|
126
|
+
T.nilable(T.any(String, Integer, T::Array[T.nilable(T.any(String, Integer))]))]
|
127
|
+
)
|
128
|
+
.returns(T::Hash[String, String])
|
129
|
+
end
|
130
|
+
def normalized_headers(*headers)
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
class << self
|
135
|
+
sig { params(io: StringIO, boundary: String, key: T.any(Symbol, String), val: T.anything).void }
|
136
|
+
private def encode_multipart_formdata(io, boundary:, key:, val:)
|
137
|
+
end
|
138
|
+
|
139
|
+
sig { params(headers: T::Hash[String, String], body: T.anything).returns(T.anything) }
|
140
|
+
def encode_content(headers, body)
|
141
|
+
end
|
142
|
+
|
143
|
+
sig do
|
144
|
+
params(
|
145
|
+
headers: T.any(T::Hash[String, String], Net::HTTPHeader),
|
146
|
+
stream: T::Enumerable[String],
|
147
|
+
suppress_error: T::Boolean
|
148
|
+
)
|
149
|
+
.returns(T.anything)
|
150
|
+
end
|
151
|
+
def decode_content(headers, stream:, suppress_error: false)
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
class << self
|
156
|
+
sig { params(enum: T::Enumerable[T.anything], close: T.proc.void).returns(T::Enumerable[T.anything]) }
|
157
|
+
def fused_enum(enum, &close)
|
158
|
+
end
|
159
|
+
|
160
|
+
sig { params(enum: T.nilable(T::Enumerable[T.anything])).void }
|
161
|
+
def close_fused!(enum)
|
162
|
+
end
|
163
|
+
|
164
|
+
sig do
|
165
|
+
params(
|
166
|
+
enum: T.nilable(T::Enumerable[T.anything]),
|
167
|
+
blk: T.proc.params(arg0: Enumerator::Yielder).void
|
168
|
+
).void
|
169
|
+
end
|
170
|
+
def chain_fused(enum, &blk)
|
171
|
+
end
|
154
172
|
end
|
155
173
|
|
156
174
|
SSEMessage = T.type_alias do
|
157
175
|
{event: T.nilable(String), data: T.nilable(String), id: T.nilable(String), retry: T.nilable(Integer)}
|
158
176
|
end
|
159
177
|
|
160
|
-
|
161
|
-
|
162
|
-
|
178
|
+
class << self
|
179
|
+
sig { params(enum: T::Enumerable[String]).returns(T::Enumerable[String]) }
|
180
|
+
def decode_lines(enum)
|
181
|
+
end
|
163
182
|
|
164
|
-
|
165
|
-
|
183
|
+
sig { params(lines: T::Enumerable[String]).returns(TerminalShop::Util::SSEMessage) }
|
184
|
+
def decode_sse(lines)
|
185
|
+
end
|
166
186
|
end
|
167
187
|
end
|
168
188
|
end
|
@@ -7,6 +7,7 @@ module TerminalShop
|
|
7
7
|
subtotal: Integer,
|
8
8
|
address_id: String,
|
9
9
|
card_id: String,
|
10
|
+
gift_card_id: String,
|
10
11
|
shipping: TerminalShop::Models::CartAPI::Shipping
|
11
12
|
}
|
12
13
|
|
@@ -25,6 +26,10 @@ module TerminalShop
|
|
25
26
|
|
26
27
|
def card_id=: (String) -> String
|
27
28
|
|
29
|
+
attr_reader gift_card_id: String?
|
30
|
+
|
31
|
+
def gift_card_id=: (String) -> String
|
32
|
+
|
28
33
|
attr_reader shipping: TerminalShop::Models::CartAPI::Shipping?
|
29
34
|
|
30
35
|
def shipping=: (
|
@@ -38,6 +43,7 @@ module TerminalShop
|
|
38
43
|
subtotal: Integer,
|
39
44
|
address_id: String,
|
40
45
|
card_id: String,
|
46
|
+
gift_card_id: String,
|
41
47
|
shipping: TerminalShop::Models::CartAPI::Shipping
|
42
48
|
) -> void
|
43
49
|
| (
|
@@ -46,17 +52,36 @@ module TerminalShop
|
|
46
52
|
|
47
53
|
def to_hash: -> TerminalShop::Models::cart_api
|
48
54
|
|
49
|
-
type amount =
|
55
|
+
type amount =
|
56
|
+
{
|
57
|
+
subtotal: Integer,
|
58
|
+
gift_card: Integer,
|
59
|
+
shipping: Integer,
|
60
|
+
total: Integer
|
61
|
+
}
|
50
62
|
|
51
63
|
class Amount < TerminalShop::BaseModel
|
52
64
|
attr_accessor subtotal: Integer
|
53
65
|
|
66
|
+
attr_reader gift_card: Integer?
|
67
|
+
|
68
|
+
def gift_card=: (Integer) -> Integer
|
69
|
+
|
54
70
|
attr_reader shipping: Integer?
|
55
71
|
|
56
72
|
def shipping=: (Integer) -> Integer
|
57
73
|
|
74
|
+
attr_reader total: Integer?
|
75
|
+
|
76
|
+
def total=: (Integer) -> Integer
|
77
|
+
|
58
78
|
def initialize:
|
59
|
-
(
|
79
|
+
(
|
80
|
+
subtotal: Integer,
|
81
|
+
gift_card: Integer,
|
82
|
+
shipping: Integer,
|
83
|
+
total: Integer
|
84
|
+
) -> void
|
60
85
|
| (
|
61
86
|
?TerminalShop::Models::CartAPI::amount
|
62
87
|
| TerminalShop::BaseModel data
|
@@ -1,13 +1,21 @@
|
|
1
1
|
module TerminalShop
|
2
2
|
module Models
|
3
|
-
type cart_convert_params =
|
3
|
+
type cart_convert_params =
|
4
|
+
{ recipient_email: String } & TerminalShop::request_parameters
|
4
5
|
|
5
6
|
class CartConvertParams < TerminalShop::BaseModel
|
6
7
|
extend TerminalShop::RequestParameters::Converter
|
7
8
|
include TerminalShop::RequestParameters
|
8
9
|
|
10
|
+
attr_reader recipient_email: String?
|
11
|
+
|
12
|
+
def recipient_email=: (String) -> String
|
13
|
+
|
9
14
|
def initialize:
|
10
|
-
(
|
15
|
+
(
|
16
|
+
recipient_email: String,
|
17
|
+
request_options: TerminalShop::request_opts
|
18
|
+
) -> void
|
11
19
|
| (
|
12
20
|
?TerminalShop::Models::cart_convert_params
|
13
21
|
| TerminalShop::BaseModel data
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module TerminalShop
|
2
|
+
module Models
|
3
|
+
type cart_redeem_gift_card_params =
|
4
|
+
{ gift_card_id: String } & TerminalShop::request_parameters
|
5
|
+
|
6
|
+
class CartRedeemGiftCardParams < TerminalShop::BaseModel
|
7
|
+
extend TerminalShop::RequestParameters::Converter
|
8
|
+
include TerminalShop::RequestParameters
|
9
|
+
|
10
|
+
attr_accessor gift_card_id: String
|
11
|
+
|
12
|
+
def initialize:
|
13
|
+
(
|
14
|
+
gift_card_id: String,
|
15
|
+
request_options: TerminalShop::request_opts
|
16
|
+
) -> void
|
17
|
+
| (
|
18
|
+
?TerminalShop::Models::cart_redeem_gift_card_params
|
19
|
+
| TerminalShop::BaseModel data
|
20
|
+
) -> void
|
21
|
+
|
22
|
+
def to_hash: -> TerminalShop::Models::cart_redeem_gift_card_params
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
module TerminalShop
|
2
|
+
module Models
|
3
|
+
type cart_redeem_gift_card_response =
|
4
|
+
{ data: TerminalShop::Models::CartRedeemGiftCardResponse::Data }
|
5
|
+
|
6
|
+
class CartRedeemGiftCardResponse < TerminalShop::BaseModel
|
7
|
+
attr_accessor data: TerminalShop::Models::CartRedeemGiftCardResponse::Data
|
8
|
+
|
9
|
+
def initialize:
|
10
|
+
(data: TerminalShop::Models::CartRedeemGiftCardResponse::Data) -> void
|
11
|
+
| (
|
12
|
+
?TerminalShop::Models::cart_redeem_gift_card_response
|
13
|
+
| TerminalShop::BaseModel data
|
14
|
+
) -> void
|
15
|
+
|
16
|
+
def to_hash: -> TerminalShop::Models::cart_redeem_gift_card_response
|
17
|
+
|
18
|
+
type data =
|
19
|
+
{
|
20
|
+
applied_amount: Integer,
|
21
|
+
gift_card_id: String,
|
22
|
+
remaining_balance: Integer
|
23
|
+
}
|
24
|
+
|
25
|
+
class Data < TerminalShop::BaseModel
|
26
|
+
attr_accessor applied_amount: Integer
|
27
|
+
|
28
|
+
attr_accessor gift_card_id: String
|
29
|
+
|
30
|
+
attr_accessor remaining_balance: Integer
|
31
|
+
|
32
|
+
def initialize:
|
33
|
+
(
|
34
|
+
applied_amount: Integer,
|
35
|
+
gift_card_id: String,
|
36
|
+
remaining_balance: Integer
|
37
|
+
) -> void
|
38
|
+
| (
|
39
|
+
?TerminalShop::Models::CartRedeemGiftCardResponse::data
|
40
|
+
| TerminalShop::BaseModel data
|
41
|
+
) -> void
|
42
|
+
|
43
|
+
def to_hash: -> TerminalShop::Models::CartRedeemGiftCardResponse::data
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module TerminalShop
|
2
|
+
module Models
|
3
|
+
type cart_remove_gift_card_params = { } & TerminalShop::request_parameters
|
4
|
+
|
5
|
+
class CartRemoveGiftCardParams < TerminalShop::BaseModel
|
6
|
+
extend TerminalShop::RequestParameters::Converter
|
7
|
+
include TerminalShop::RequestParameters
|
8
|
+
|
9
|
+
def initialize:
|
10
|
+
(request_options: TerminalShop::request_opts) -> void
|
11
|
+
| (
|
12
|
+
?TerminalShop::Models::cart_remove_gift_card_params
|
13
|
+
| TerminalShop::BaseModel data
|
14
|
+
) -> void
|
15
|
+
|
16
|
+
def to_hash: -> TerminalShop::Models::cart_remove_gift_card_params
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module TerminalShop
|
2
|
+
module Models
|
3
|
+
type cart_remove_gift_card_response = { data: :ok }
|
4
|
+
|
5
|
+
class CartRemoveGiftCardResponse < TerminalShop::BaseModel
|
6
|
+
attr_accessor data: :ok
|
7
|
+
|
8
|
+
def initialize:
|
9
|
+
(data: :ok) -> void
|
10
|
+
| (
|
11
|
+
?TerminalShop::Models::cart_remove_gift_card_response
|
12
|
+
| TerminalShop::BaseModel data
|
13
|
+
) -> void
|
14
|
+
|
15
|
+
def to_hash: -> TerminalShop::Models::cart_remove_gift_card_response
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -67,7 +67,8 @@ module TerminalShop
|
|
67
67
|
color: String,
|
68
68
|
featured: bool,
|
69
69
|
market_eu: bool,
|
70
|
-
market_na: bool
|
70
|
+
market_na: bool,
|
71
|
+
type: String
|
71
72
|
}
|
72
73
|
|
73
74
|
class Tags < TerminalShop::BaseModel
|
@@ -91,13 +92,18 @@ module TerminalShop
|
|
91
92
|
|
92
93
|
def market_na=: (bool) -> bool
|
93
94
|
|
95
|
+
attr_reader type: String?
|
96
|
+
|
97
|
+
def type=: (String) -> String
|
98
|
+
|
94
99
|
def initialize:
|
95
100
|
(
|
96
101
|
app: String,
|
97
102
|
color: String,
|
98
103
|
featured: bool,
|
99
104
|
market_eu: bool,
|
100
|
-
market_na: bool
|
105
|
+
market_na: bool,
|
106
|
+
type: String
|
101
107
|
) -> void
|
102
108
|
| (
|
103
109
|
?TerminalShop::Models::ProductAPI::tags
|
@@ -6,6 +6,7 @@ module TerminalShop
|
|
6
6
|
?TerminalShop::Models::CartConvertParams | ::Hash[Symbol, top] params
|
7
7
|
) -> TerminalShop::Models::CartConvertResponse
|
8
8
|
| (
|
9
|
+
recipient_email: String,
|
9
10
|
request_options: TerminalShop::request_opts
|
10
11
|
) -> TerminalShop::Models::CartConvertResponse
|
11
12
|
|
@@ -17,6 +18,25 @@ module TerminalShop
|
|
17
18
|
request_options: TerminalShop::request_opts
|
18
19
|
) -> TerminalShop::Models::CartGetResponse
|
19
20
|
|
21
|
+
def redeem_gift_card:
|
22
|
+
(
|
23
|
+
TerminalShop::Models::CartRedeemGiftCardParams
|
24
|
+
| ::Hash[Symbol, top] params
|
25
|
+
) -> TerminalShop::Models::CartRedeemGiftCardResponse
|
26
|
+
| (
|
27
|
+
gift_card_id: String,
|
28
|
+
request_options: TerminalShop::request_opts
|
29
|
+
) -> TerminalShop::Models::CartRedeemGiftCardResponse
|
30
|
+
|
31
|
+
def remove_gift_card:
|
32
|
+
(
|
33
|
+
?TerminalShop::Models::CartRemoveGiftCardParams
|
34
|
+
| ::Hash[Symbol, top] params
|
35
|
+
) -> TerminalShop::Models::CartRemoveGiftCardResponse
|
36
|
+
| (
|
37
|
+
request_options: TerminalShop::request_opts
|
38
|
+
) -> TerminalShop::Models::CartRemoveGiftCardResponse
|
39
|
+
|
20
40
|
def set_address:
|
21
41
|
(
|
22
42
|
TerminalShop::Models::CartSetAddressParams
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: terminal-shop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Terminal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-03-
|
11
|
+
date: 2025-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: connection_pool
|
@@ -73,6 +73,10 @@ files:
|
|
73
73
|
- lib/terminal-shop/models/cart_convert_response.rb
|
74
74
|
- lib/terminal-shop/models/cart_get_params.rb
|
75
75
|
- lib/terminal-shop/models/cart_get_response.rb
|
76
|
+
- lib/terminal-shop/models/cart_redeem_gift_card_params.rb
|
77
|
+
- lib/terminal-shop/models/cart_redeem_gift_card_response.rb
|
78
|
+
- lib/terminal-shop/models/cart_remove_gift_card_params.rb
|
79
|
+
- lib/terminal-shop/models/cart_remove_gift_card_response.rb
|
76
80
|
- lib/terminal-shop/models/cart_set_address_params.rb
|
77
81
|
- lib/terminal-shop/models/cart_set_address_response.rb
|
78
82
|
- lib/terminal-shop/models/cart_set_card_params.rb
|
@@ -175,6 +179,10 @@ files:
|
|
175
179
|
- rbi/lib/terminal-shop/models/cart_convert_response.rbi
|
176
180
|
- rbi/lib/terminal-shop/models/cart_get_params.rbi
|
177
181
|
- rbi/lib/terminal-shop/models/cart_get_response.rbi
|
182
|
+
- rbi/lib/terminal-shop/models/cart_redeem_gift_card_params.rbi
|
183
|
+
- rbi/lib/terminal-shop/models/cart_redeem_gift_card_response.rbi
|
184
|
+
- rbi/lib/terminal-shop/models/cart_remove_gift_card_params.rbi
|
185
|
+
- rbi/lib/terminal-shop/models/cart_remove_gift_card_response.rbi
|
178
186
|
- rbi/lib/terminal-shop/models/cart_set_address_params.rbi
|
179
187
|
- rbi/lib/terminal-shop/models/cart_set_address_response.rbi
|
180
188
|
- rbi/lib/terminal-shop/models/cart_set_card_params.rbi
|
@@ -276,6 +284,10 @@ files:
|
|
276
284
|
- sig/terminal-shop/models/cart_convert_response.rbs
|
277
285
|
- sig/terminal-shop/models/cart_get_params.rbs
|
278
286
|
- sig/terminal-shop/models/cart_get_response.rbs
|
287
|
+
- sig/terminal-shop/models/cart_redeem_gift_card_params.rbs
|
288
|
+
- sig/terminal-shop/models/cart_redeem_gift_card_response.rbs
|
289
|
+
- sig/terminal-shop/models/cart_remove_gift_card_params.rbs
|
290
|
+
- sig/terminal-shop/models/cart_remove_gift_card_response.rbs
|
279
291
|
- sig/terminal-shop/models/cart_set_address_params.rbs
|
280
292
|
- sig/terminal-shop/models/cart_set_address_response.rbs
|
281
293
|
- sig/terminal-shop/models/cart_set_card_params.rbs
|