terminal-shop 0.1.0.pre.alpha.15 → 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_client.rb +35 -55
- data/lib/terminal-shop/base_model.rb +457 -438
- data/lib/terminal-shop/base_page.rb +2 -2
- data/lib/terminal-shop/client.rb +1 -1
- data/lib/terminal-shop/errors.rb +3 -2
- data/lib/terminal-shop/models/address_get_params.rb +18 -0
- data/lib/terminal-shop/models/address_get_response.rb +20 -0
- data/lib/terminal-shop/models/app_create_params.rb +14 -2
- data/lib/terminal-shop/models/card_get_params.rb +18 -0
- data/lib/terminal-shop/models/card_get_response.rb +20 -0
- 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 +72 -46
- data/lib/terminal-shop/models/product_get_params.rb +18 -0
- data/lib/terminal-shop/models/product_get_response.rb +20 -0
- data/lib/terminal-shop/models/profile_update_params.rb +7 -9
- data/lib/terminal-shop/models/subscription.rb +0 -10
- data/lib/terminal-shop/models/subscription_get_params.rb +18 -0
- data/lib/terminal-shop/models/subscription_get_response.rb +20 -0
- data/lib/terminal-shop/pooled_net_requester.rb +14 -9
- data/lib/terminal-shop/resources/address.rb +19 -0
- data/lib/terminal-shop/resources/app.rb +2 -6
- data/lib/terminal-shop/resources/card.rb +19 -0
- data/lib/terminal-shop/resources/cart.rb +43 -1
- data/lib/terminal-shop/resources/product.rb +19 -0
- data/lib/terminal-shop/resources/profile.rb +3 -3
- data/lib/terminal-shop/resources/subscription.rb +19 -0
- data/lib/terminal-shop/util.rb +135 -1
- data/lib/terminal-shop/version.rb +1 -1
- data/lib/terminal-shop.rb +13 -1
- data/rbi/lib/terminal-shop/base_client.rbi +29 -35
- data/rbi/lib/terminal-shop/base_model.rbi +235 -217
- data/rbi/lib/terminal-shop/base_page.rbi +2 -2
- data/rbi/lib/terminal-shop/client.rbi +2 -2
- data/rbi/lib/terminal-shop/errors.rbi +11 -10
- 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 +21 -0
- data/rbi/lib/terminal-shop/models/address_get_response.rbi +23 -0
- 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 +29 -4
- 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 +21 -0
- data/rbi/lib/terminal-shop/models/card_get_response.rbi +23 -0
- 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 +88 -27
- data/rbi/lib/terminal-shop/models/product_get_params.rbi +21 -0
- data/rbi/lib/terminal-shop/models/product_get_response.rbi +23 -0
- 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 +9 -14
- 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 +21 -0
- data/rbi/lib/terminal-shop/models/subscription_get_response.rbi +23 -0
- 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 +12 -2
- data/rbi/lib/terminal-shop/resources/app.rbi +3 -5
- data/rbi/lib/terminal-shop/resources/card.rbi +12 -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 +12 -2
- data/rbi/lib/terminal-shop/resources/profile.rbi +5 -5
- data/rbi/lib/terminal-shop/resources/subscription.rbi +12 -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 +153 -104
- data/rbi/lib/terminal-shop/version.rbi +1 -1
- data/sig/terminal-shop/base_client.rbs +3 -7
- data/sig/terminal-shop/base_page.rbs +1 -1
- data/sig/terminal-shop/errors.rbs +2 -1
- data/sig/terminal-shop/models/address_get_params.rbs +19 -0
- data/sig/terminal-shop/models/address_get_response.rbs +18 -0
- data/sig/terminal-shop/models/app_create_params.rbs +12 -3
- data/sig/terminal-shop/models/card_get_params.rbs +18 -0
- data/sig/terminal-shop/models/card_get_response.rbs +18 -0
- 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 +58 -17
- data/sig/terminal-shop/models/product_get_params.rbs +19 -0
- data/sig/terminal-shop/models/product_get_response.rbs +18 -0
- data/sig/terminal-shop/models/profile_update_params.rbs +5 -5
- data/sig/terminal-shop/models/subscription_get_params.rbs +19 -0
- data/sig/terminal-shop/models/subscription_get_response.rbs +19 -0
- data/sig/terminal-shop/request_options.rbs +4 -0
- data/sig/terminal-shop/resources/address.rbs +10 -0
- data/sig/terminal-shop/resources/app.rbs +0 -2
- data/sig/terminal-shop/resources/card.rbs +10 -0
- data/sig/terminal-shop/resources/cart.rbs +20 -0
- data/sig/terminal-shop/resources/product.rbs +10 -0
- data/sig/terminal-shop/resources/profile.rbs +3 -4
- data/sig/terminal-shop/resources/subscription.rbs +11 -0
- data/sig/terminal-shop/util.rbs +19 -0
- data/sig/terminal-shop/version.rbs +1 -1
- metadata +40 -4
@@ -0,0 +1,32 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module TerminalShop
|
4
|
+
module Models
|
5
|
+
class CartRedeemGiftCardParams < TerminalShop::BaseModel
|
6
|
+
extend TerminalShop::RequestParameters::Converter
|
7
|
+
include TerminalShop::RequestParameters
|
8
|
+
|
9
|
+
sig { returns(String) }
|
10
|
+
def gift_card_id
|
11
|
+
end
|
12
|
+
|
13
|
+
sig { params(_: String).returns(String) }
|
14
|
+
def gift_card_id=(_)
|
15
|
+
end
|
16
|
+
|
17
|
+
sig do
|
18
|
+
params(
|
19
|
+
gift_card_id: String,
|
20
|
+
request_options: T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything])
|
21
|
+
)
|
22
|
+
.returns(T.attached_class)
|
23
|
+
end
|
24
|
+
def self.new(gift_card_id:, request_options: {})
|
25
|
+
end
|
26
|
+
|
27
|
+
sig { override.returns({gift_card_id: String, request_options: TerminalShop::RequestOptions}) }
|
28
|
+
def to_hash
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module TerminalShop
|
4
|
+
module Models
|
5
|
+
class CartRedeemGiftCardResponse < TerminalShop::BaseModel
|
6
|
+
sig { returns(TerminalShop::Models::CartRedeemGiftCardResponse::Data) }
|
7
|
+
def data
|
8
|
+
end
|
9
|
+
|
10
|
+
sig do
|
11
|
+
params(_: TerminalShop::Models::CartRedeemGiftCardResponse::Data)
|
12
|
+
.returns(TerminalShop::Models::CartRedeemGiftCardResponse::Data)
|
13
|
+
end
|
14
|
+
def data=(_)
|
15
|
+
end
|
16
|
+
|
17
|
+
sig { params(data: TerminalShop::Models::CartRedeemGiftCardResponse::Data).returns(T.attached_class) }
|
18
|
+
def self.new(data:)
|
19
|
+
end
|
20
|
+
|
21
|
+
sig { override.returns({data: TerminalShop::Models::CartRedeemGiftCardResponse::Data}) }
|
22
|
+
def to_hash
|
23
|
+
end
|
24
|
+
|
25
|
+
class Data < TerminalShop::BaseModel
|
26
|
+
sig { returns(Integer) }
|
27
|
+
def applied_amount
|
28
|
+
end
|
29
|
+
|
30
|
+
sig { params(_: Integer).returns(Integer) }
|
31
|
+
def applied_amount=(_)
|
32
|
+
end
|
33
|
+
|
34
|
+
sig { returns(String) }
|
35
|
+
def gift_card_id
|
36
|
+
end
|
37
|
+
|
38
|
+
sig { params(_: String).returns(String) }
|
39
|
+
def gift_card_id=(_)
|
40
|
+
end
|
41
|
+
|
42
|
+
sig { returns(Integer) }
|
43
|
+
def remaining_balance
|
44
|
+
end
|
45
|
+
|
46
|
+
sig { params(_: Integer).returns(Integer) }
|
47
|
+
def remaining_balance=(_)
|
48
|
+
end
|
49
|
+
|
50
|
+
sig do
|
51
|
+
params(
|
52
|
+
applied_amount: Integer,
|
53
|
+
gift_card_id: String,
|
54
|
+
remaining_balance: Integer
|
55
|
+
).returns(T.attached_class)
|
56
|
+
end
|
57
|
+
def self.new(applied_amount:, gift_card_id:, remaining_balance:)
|
58
|
+
end
|
59
|
+
|
60
|
+
sig { override.returns({applied_amount: Integer, gift_card_id: String, remaining_balance: Integer}) }
|
61
|
+
def to_hash
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module TerminalShop
|
4
|
+
module Models
|
5
|
+
class CartRemoveGiftCardParams < TerminalShop::BaseModel
|
6
|
+
extend TerminalShop::RequestParameters::Converter
|
7
|
+
include TerminalShop::RequestParameters
|
8
|
+
|
9
|
+
sig do
|
10
|
+
params(request_options: T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything]))
|
11
|
+
.returns(T.attached_class)
|
12
|
+
end
|
13
|
+
def self.new(request_options: {})
|
14
|
+
end
|
15
|
+
|
16
|
+
sig { override.returns({request_options: TerminalShop::RequestOptions}) }
|
17
|
+
def to_hash
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module TerminalShop
|
4
|
+
module Models
|
5
|
+
class CartRemoveGiftCardResponse < TerminalShop::BaseModel
|
6
|
+
sig { returns(Symbol) }
|
7
|
+
def data
|
8
|
+
end
|
9
|
+
|
10
|
+
sig { params(_: Symbol).returns(Symbol) }
|
11
|
+
def data=(_)
|
12
|
+
end
|
13
|
+
|
14
|
+
sig { params(data: Symbol).returns(T.attached_class) }
|
15
|
+
def self.new(data: :ok)
|
16
|
+
end
|
17
|
+
|
18
|
+
sig { override.returns({data: Symbol}) }
|
19
|
+
def to_hash
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -19,9 +19,9 @@ module TerminalShop
|
|
19
19
|
address_id: String,
|
20
20
|
request_options: T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything])
|
21
21
|
)
|
22
|
-
.
|
22
|
+
.returns(T.attached_class)
|
23
23
|
end
|
24
|
-
def
|
24
|
+
def self.new(address_id:, request_options: {})
|
25
25
|
end
|
26
26
|
|
27
27
|
sig { override.returns({address_id: String, request_options: TerminalShop::RequestOptions}) }
|
@@ -22,9 +22,9 @@ module TerminalShop
|
|
22
22
|
T::Hash[Symbol, T.anything]
|
23
23
|
)
|
24
24
|
)
|
25
|
-
.
|
25
|
+
.returns(T.attached_class)
|
26
26
|
end
|
27
|
-
def
|
27
|
+
def self.new(card_id:, request_options: {})
|
28
28
|
end
|
29
29
|
|
30
30
|
sig { override.returns({card_id: String, request_options: TerminalShop::RequestOptions}) }
|
@@ -28,9 +28,9 @@ module TerminalShop
|
|
28
28
|
quantity: Integer,
|
29
29
|
request_options: T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything])
|
30
30
|
)
|
31
|
-
.
|
31
|
+
.returns(T.attached_class)
|
32
32
|
end
|
33
|
-
def
|
33
|
+
def self.new(product_variant_id:, quantity:, request_options: {})
|
34
34
|
end
|
35
35
|
|
36
36
|
sig do
|
@@ -11,8 +11,8 @@ module TerminalShop
|
|
11
11
|
def data=(_)
|
12
12
|
end
|
13
13
|
|
14
|
-
sig { params(data: TerminalShop::Models::CartAPI).
|
15
|
-
def
|
14
|
+
sig { params(data: TerminalShop::Models::CartAPI).returns(T.attached_class) }
|
15
|
+
def self.new(data:)
|
16
16
|
end
|
17
17
|
|
18
18
|
sig { override.returns({data: TerminalShop::Models::CartAPI}) }
|
@@ -22,9 +22,9 @@ module TerminalShop
|
|
22
22
|
T::Hash[Symbol, T.anything]
|
23
23
|
)
|
24
24
|
)
|
25
|
-
.
|
25
|
+
.returns(T.attached_class)
|
26
26
|
end
|
27
|
-
def
|
27
|
+
def self.new(email:, request_options: {})
|
28
28
|
end
|
29
29
|
|
30
30
|
sig { override.returns({email: String, request_options: TerminalShop::RequestOptions}) }
|
@@ -63,9 +63,9 @@ module TerminalShop
|
|
63
63
|
tracking: TerminalShop::Models::OrderAPI::Tracking,
|
64
64
|
index: Integer
|
65
65
|
)
|
66
|
-
.
|
66
|
+
.returns(T.attached_class)
|
67
67
|
end
|
68
|
-
def
|
68
|
+
def self.new(id:, amount:, items:, shipping:, tracking:, index: nil)
|
69
69
|
end
|
70
70
|
|
71
71
|
sig do
|
@@ -101,8 +101,8 @@ module TerminalShop
|
|
101
101
|
def subtotal=(_)
|
102
102
|
end
|
103
103
|
|
104
|
-
sig { params(shipping: Integer, subtotal: Integer).
|
105
|
-
def
|
104
|
+
sig { params(shipping: Integer, subtotal: Integer).returns(T.attached_class) }
|
105
|
+
def self.new(shipping:, subtotal:)
|
106
106
|
end
|
107
107
|
|
108
108
|
sig { override.returns({shipping: Integer, subtotal: Integer}) }
|
@@ -159,9 +159,9 @@ module TerminalShop
|
|
159
159
|
description: String,
|
160
160
|
product_variant_id: String
|
161
161
|
)
|
162
|
-
.
|
162
|
+
.returns(T.attached_class)
|
163
163
|
end
|
164
|
-
def
|
164
|
+
def self.new(id:, amount:, quantity:, description: nil, product_variant_id: nil)
|
165
165
|
end
|
166
166
|
|
167
167
|
sig do
|
@@ -254,9 +254,9 @@ module TerminalShop
|
|
254
254
|
province: String,
|
255
255
|
street2: String
|
256
256
|
)
|
257
|
-
.
|
257
|
+
.returns(T.attached_class)
|
258
258
|
end
|
259
|
-
def
|
259
|
+
def self.new(city:, country:, name:, street1:, zip:, phone: nil, province: nil, street2: nil)
|
260
260
|
end
|
261
261
|
|
262
262
|
sig do
|
@@ -303,8 +303,8 @@ module TerminalShop
|
|
303
303
|
def url=(_)
|
304
304
|
end
|
305
305
|
|
306
|
-
sig { params(number: String, service: String, url: String).
|
307
|
-
def
|
306
|
+
sig { params(number: String, service: String, url: String).returns(T.attached_class) }
|
307
|
+
def self.new(number: nil, service: nil, url: nil)
|
308
308
|
end
|
309
309
|
|
310
310
|
sig { override.returns({number: String, service: String, url: String}) }
|
@@ -37,9 +37,9 @@ module TerminalShop
|
|
37
37
|
variants: T::Hash[Symbol, Integer],
|
38
38
|
request_options: T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything])
|
39
39
|
)
|
40
|
-
.
|
40
|
+
.returns(T.attached_class)
|
41
41
|
end
|
42
|
-
def
|
42
|
+
def self.new(address_id:, card_id:, variants:, request_options: {})
|
43
43
|
end
|
44
44
|
|
45
45
|
sig do
|
@@ -6,8 +6,11 @@ module TerminalShop
|
|
6
6
|
extend TerminalShop::RequestParameters::Converter
|
7
7
|
include TerminalShop::RequestParameters
|
8
8
|
|
9
|
-
sig
|
10
|
-
|
9
|
+
sig do
|
10
|
+
params(request_options: T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything]))
|
11
|
+
.returns(T.attached_class)
|
12
|
+
end
|
13
|
+
def self.new(request_options: {})
|
11
14
|
end
|
12
15
|
|
13
16
|
sig { override.returns({request_options: TerminalShop::RequestOptions}) }
|
@@ -11,8 +11,8 @@ module TerminalShop
|
|
11
11
|
def data=(_)
|
12
12
|
end
|
13
13
|
|
14
|
-
sig { params(data: TerminalShop::Models::OrderAPI).
|
15
|
-
def
|
14
|
+
sig { params(data: TerminalShop::Models::OrderAPI).returns(T.attached_class) }
|
15
|
+
def self.new(data:)
|
16
16
|
end
|
17
17
|
|
18
18
|
sig { override.returns({data: TerminalShop::Models::OrderAPI}) }
|
@@ -6,8 +6,11 @@ module TerminalShop
|
|
6
6
|
extend TerminalShop::RequestParameters::Converter
|
7
7
|
include TerminalShop::RequestParameters
|
8
8
|
|
9
|
-
sig
|
10
|
-
|
9
|
+
sig do
|
10
|
+
params(request_options: T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything]))
|
11
|
+
.returns(T.attached_class)
|
12
|
+
end
|
13
|
+
def self.new(request_options: {})
|
11
14
|
end
|
12
15
|
|
13
16
|
sig { override.returns({request_options: TerminalShop::RequestOptions}) }
|
@@ -11,8 +11,8 @@ module TerminalShop
|
|
11
11
|
def data=(_)
|
12
12
|
end
|
13
13
|
|
14
|
-
sig { params(data: T::Array[TerminalShop::Models::OrderAPI]).
|
15
|
-
def
|
14
|
+
sig { params(data: T::Array[TerminalShop::Models::OrderAPI]).returns(T.attached_class) }
|
15
|
+
def self.new(data:)
|
16
16
|
end
|
17
17
|
|
18
18
|
sig { override.returns({data: T::Array[TerminalShop::Models::OrderAPI]}) }
|
@@ -19,14 +19,6 @@ module TerminalShop
|
|
19
19
|
def description=(_)
|
20
20
|
end
|
21
21
|
|
22
|
-
sig { returns(T::Array[Symbol]) }
|
23
|
-
def filters
|
24
|
-
end
|
25
|
-
|
26
|
-
sig { params(_: T::Array[Symbol]).returns(T::Array[Symbol]) }
|
27
|
-
def filters=(_)
|
28
|
-
end
|
29
|
-
|
30
22
|
sig { returns(String) }
|
31
23
|
def name
|
32
24
|
end
|
@@ -62,11 +54,11 @@ module TerminalShop
|
|
62
54
|
def subscription=(_)
|
63
55
|
end
|
64
56
|
|
65
|
-
sig { returns(T.nilable(
|
57
|
+
sig { returns(T.nilable(TerminalShop::Models::ProductAPI::Tags)) }
|
66
58
|
def tags
|
67
59
|
end
|
68
60
|
|
69
|
-
sig { params(_:
|
61
|
+
sig { params(_: TerminalShop::Models::ProductAPI::Tags).returns(TerminalShop::Models::ProductAPI::Tags) }
|
70
62
|
def tags=(_)
|
71
63
|
end
|
72
64
|
|
@@ -74,16 +66,15 @@ module TerminalShop
|
|
74
66
|
params(
|
75
67
|
id: String,
|
76
68
|
description: String,
|
77
|
-
filters: T::Array[Symbol],
|
78
69
|
name: String,
|
79
70
|
variants: T::Array[TerminalShop::Models::ProductVariant],
|
80
71
|
order: Integer,
|
81
72
|
subscription: Symbol,
|
82
|
-
tags:
|
73
|
+
tags: TerminalShop::Models::ProductAPI::Tags
|
83
74
|
)
|
84
|
-
.
|
75
|
+
.returns(T.attached_class)
|
85
76
|
end
|
86
|
-
def
|
77
|
+
def self.new(id:, description:, name:, variants:, order: nil, subscription: nil, tags: nil)
|
87
78
|
end
|
88
79
|
|
89
80
|
sig do
|
@@ -92,37 +83,107 @@ module TerminalShop
|
|
92
83
|
{
|
93
84
|
id: String,
|
94
85
|
description: String,
|
95
|
-
filters: T::Array[Symbol],
|
96
86
|
name: String,
|
97
87
|
variants: T::Array[TerminalShop::Models::ProductVariant],
|
98
88
|
order: Integer,
|
99
89
|
subscription: Symbol,
|
100
|
-
tags:
|
90
|
+
tags: TerminalShop::Models::ProductAPI::Tags
|
101
91
|
}
|
102
92
|
)
|
103
93
|
end
|
104
94
|
def to_hash
|
105
95
|
end
|
106
96
|
|
107
|
-
class
|
97
|
+
class Subscription < TerminalShop::Enum
|
108
98
|
abstract!
|
109
99
|
|
110
|
-
|
111
|
-
|
100
|
+
ALLOWED = :allowed
|
101
|
+
REQUIRED = :required
|
112
102
|
|
113
|
-
|
114
|
-
|
103
|
+
class << self
|
104
|
+
sig { override.returns(T::Array[Symbol]) }
|
105
|
+
def values
|
106
|
+
end
|
115
107
|
end
|
116
108
|
end
|
117
109
|
|
118
|
-
class
|
119
|
-
|
110
|
+
class Tags < TerminalShop::BaseModel
|
111
|
+
sig { returns(T.nilable(String)) }
|
112
|
+
def app
|
113
|
+
end
|
120
114
|
|
121
|
-
|
122
|
-
|
115
|
+
sig { params(_: String).returns(String) }
|
116
|
+
def app=(_)
|
117
|
+
end
|
118
|
+
|
119
|
+
sig { returns(T.nilable(String)) }
|
120
|
+
def color
|
121
|
+
end
|
122
|
+
|
123
|
+
sig { params(_: String).returns(String) }
|
124
|
+
def color=(_)
|
125
|
+
end
|
126
|
+
|
127
|
+
sig { returns(T.nilable(T::Boolean)) }
|
128
|
+
def featured
|
129
|
+
end
|
123
130
|
|
124
|
-
sig {
|
125
|
-
def
|
131
|
+
sig { params(_: T::Boolean).returns(T::Boolean) }
|
132
|
+
def featured=(_)
|
133
|
+
end
|
134
|
+
|
135
|
+
sig { returns(T.nilable(T::Boolean)) }
|
136
|
+
def market_eu
|
137
|
+
end
|
138
|
+
|
139
|
+
sig { params(_: T::Boolean).returns(T::Boolean) }
|
140
|
+
def market_eu=(_)
|
141
|
+
end
|
142
|
+
|
143
|
+
sig { returns(T.nilable(T::Boolean)) }
|
144
|
+
def market_na
|
145
|
+
end
|
146
|
+
|
147
|
+
sig { params(_: T::Boolean).returns(T::Boolean) }
|
148
|
+
def market_na=(_)
|
149
|
+
end
|
150
|
+
|
151
|
+
sig { returns(T.nilable(String)) }
|
152
|
+
def type
|
153
|
+
end
|
154
|
+
|
155
|
+
sig { params(_: String).returns(String) }
|
156
|
+
def type=(_)
|
157
|
+
end
|
158
|
+
|
159
|
+
sig do
|
160
|
+
params(
|
161
|
+
app: String,
|
162
|
+
color: String,
|
163
|
+
featured: T::Boolean,
|
164
|
+
market_eu: T::Boolean,
|
165
|
+
market_na: T::Boolean,
|
166
|
+
type: String
|
167
|
+
)
|
168
|
+
.returns(T.attached_class)
|
169
|
+
end
|
170
|
+
def self.new(app: nil, color: nil, featured: nil, market_eu: nil, market_na: nil, type: nil)
|
171
|
+
end
|
172
|
+
|
173
|
+
sig do
|
174
|
+
override
|
175
|
+
.returns(
|
176
|
+
{
|
177
|
+
app: String,
|
178
|
+
color: String,
|
179
|
+
featured: T::Boolean,
|
180
|
+
market_eu: T::Boolean,
|
181
|
+
market_na: T::Boolean,
|
182
|
+
type: String
|
183
|
+
}
|
184
|
+
)
|
185
|
+
end
|
186
|
+
def to_hash
|
126
187
|
end
|
127
188
|
end
|
128
189
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module TerminalShop
|
4
|
+
module Models
|
5
|
+
class ProductGetParams < TerminalShop::BaseModel
|
6
|
+
extend TerminalShop::RequestParameters::Converter
|
7
|
+
include TerminalShop::RequestParameters
|
8
|
+
|
9
|
+
sig do
|
10
|
+
params(request_options: T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything]))
|
11
|
+
.returns(T.attached_class)
|
12
|
+
end
|
13
|
+
def self.new(request_options: {})
|
14
|
+
end
|
15
|
+
|
16
|
+
sig { override.returns({request_options: TerminalShop::RequestOptions}) }
|
17
|
+
def to_hash
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module TerminalShop
|
4
|
+
module Models
|
5
|
+
class ProductGetResponse < TerminalShop::BaseModel
|
6
|
+
sig { returns(TerminalShop::Models::ProductAPI) }
|
7
|
+
def data
|
8
|
+
end
|
9
|
+
|
10
|
+
sig { params(_: TerminalShop::Models::ProductAPI).returns(TerminalShop::Models::ProductAPI) }
|
11
|
+
def data=(_)
|
12
|
+
end
|
13
|
+
|
14
|
+
sig { params(data: TerminalShop::Models::ProductAPI).returns(T.attached_class) }
|
15
|
+
def self.new(data:)
|
16
|
+
end
|
17
|
+
|
18
|
+
sig { override.returns({data: TerminalShop::Models::ProductAPI}) }
|
19
|
+
def to_hash
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -6,8 +6,11 @@ module TerminalShop
|
|
6
6
|
extend TerminalShop::RequestParameters::Converter
|
7
7
|
include TerminalShop::RequestParameters
|
8
8
|
|
9
|
-
sig
|
10
|
-
|
9
|
+
sig do
|
10
|
+
params(request_options: T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything]))
|
11
|
+
.returns(T.attached_class)
|
12
|
+
end
|
13
|
+
def self.new(request_options: {})
|
11
14
|
end
|
12
15
|
|
13
16
|
sig { override.returns({request_options: TerminalShop::RequestOptions}) }
|
@@ -11,8 +11,8 @@ module TerminalShop
|
|
11
11
|
def data=(_)
|
12
12
|
end
|
13
13
|
|
14
|
-
sig { params(data: T::Array[TerminalShop::Models::ProductAPI]).
|
15
|
-
def
|
14
|
+
sig { params(data: T::Array[TerminalShop::Models::ProductAPI]).returns(T.attached_class) }
|
15
|
+
def self.new(data:)
|
16
16
|
end
|
17
17
|
|
18
18
|
sig { override.returns({data: T::Array[TerminalShop::Models::ProductAPI]}) }
|
@@ -27,8 +27,8 @@ module TerminalShop
|
|
27
27
|
def price=(_)
|
28
28
|
end
|
29
29
|
|
30
|
-
sig { params(id: String, name: String, price: Integer).
|
31
|
-
def
|
30
|
+
sig { params(id: String, name: String, price: Integer).returns(T.attached_class) }
|
31
|
+
def self.new(id:, name:, price:)
|
32
32
|
end
|
33
33
|
|
34
34
|
sig { override.returns({id: String, name: String, price: Integer}) }
|
@@ -11,8 +11,8 @@ module TerminalShop
|
|
11
11
|
def user=(_)
|
12
12
|
end
|
13
13
|
|
14
|
-
sig { params(user: TerminalShop::Models::ProfileAPI::User).
|
15
|
-
def
|
14
|
+
sig { params(user: TerminalShop::Models::ProfileAPI::User).returns(T.attached_class) }
|
15
|
+
def self.new(user:)
|
16
16
|
end
|
17
17
|
|
18
18
|
sig { override.returns({user: TerminalShop::Models::ProfileAPI::User}) }
|
@@ -68,9 +68,9 @@ module TerminalShop
|
|
68
68
|
name: T.nilable(String),
|
69
69
|
stripe_customer_id: String
|
70
70
|
)
|
71
|
-
.
|
71
|
+
.returns(T.attached_class)
|
72
72
|
end
|
73
|
-
def
|
73
|
+
def self.new(id:, email:, fingerprint:, name:, stripe_customer_id:)
|
74
74
|
end
|
75
75
|
|
76
76
|
sig do
|