terminal-shop 1.8.0 → 2.0.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 +14 -0
- data/lib/terminal-shop/base_client.rb +11 -10
- data/lib/terminal-shop/base_model.rb +257 -244
- data/lib/terminal-shop/base_page.rb +19 -20
- data/lib/terminal-shop/client.rb +1 -0
- data/lib/terminal-shop/models/product.rb +7 -3
- data/lib/terminal-shop/models/region.rb +7 -3
- data/lib/terminal-shop/models/subscription.rb +5 -7
- data/lib/terminal-shop/pooled_net_requester.rb +12 -1
- data/lib/terminal-shop/request_options.rb +1 -1
- data/lib/terminal-shop/util.rb +16 -7
- data/lib/terminal-shop/version.rb +1 -1
- data/lib/terminal-shop.rb +15 -0
- data/rbi/lib/terminal-shop/base_client.rbi +40 -41
- data/rbi/lib/terminal-shop/base_model.rbi +139 -116
- data/rbi/lib/terminal-shop/base_page.rbi +0 -2
- data/rbi/lib/terminal-shop/client.rbi +18 -30
- data/rbi/lib/terminal-shop/errors.rbi +7 -42
- data/rbi/lib/terminal-shop/models/address.rbi +15 -51
- data/rbi/lib/terminal-shop/models/address_create_params.rbi +15 -46
- data/rbi/lib/terminal-shop/models/address_create_response.rbi +1 -6
- data/rbi/lib/terminal-shop/models/address_delete_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/address_delete_response.rbi +1 -6
- data/rbi/lib/terminal-shop/models/address_get_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/address_get_response.rbi +7 -6
- data/rbi/lib/terminal-shop/models/address_list_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/address_list_response.rbi +4 -6
- data/rbi/lib/terminal-shop/models/app.rbi +4 -24
- data/rbi/lib/terminal-shop/models/app_create_params.rbi +3 -13
- data/rbi/lib/terminal-shop/models/app_create_response.rbi +8 -20
- data/rbi/lib/terminal-shop/models/app_delete_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/app_delete_response.rbi +1 -6
- data/rbi/lib/terminal-shop/models/app_get_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/app_get_response.rbi +4 -6
- data/rbi/lib/terminal-shop/models/app_list_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/app_list_response.rbi +4 -6
- data/rbi/lib/terminal-shop/models/card.rbi +14 -36
- data/rbi/lib/terminal-shop/models/card_collect_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/card_collect_response.rbi +7 -14
- data/rbi/lib/terminal-shop/models/card_create_params.rbi +2 -7
- data/rbi/lib/terminal-shop/models/card_create_response.rbi +1 -6
- data/rbi/lib/terminal-shop/models/card_delete_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/card_delete_response.rbi +1 -6
- data/rbi/lib/terminal-shop/models/card_get_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/card_get_response.rbi +4 -6
- data/rbi/lib/terminal-shop/models/card_list_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/card_list_response.rbi +4 -6
- data/rbi/lib/terminal-shop/models/cart.rbi +34 -88
- data/rbi/lib/terminal-shop/models/cart_clear_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/cart_clear_response.rbi +1 -6
- data/rbi/lib/terminal-shop/models/cart_convert_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/cart_convert_response.rbi +4 -6
- data/rbi/lib/terminal-shop/models/cart_get_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/cart_get_response.rbi +4 -6
- data/rbi/lib/terminal-shop/models/cart_set_address_params.rbi +2 -7
- data/rbi/lib/terminal-shop/models/cart_set_address_response.rbi +1 -6
- data/rbi/lib/terminal-shop/models/cart_set_card_params.rbi +2 -7
- data/rbi/lib/terminal-shop/models/cart_set_card_response.rbi +1 -6
- data/rbi/lib/terminal-shop/models/cart_set_item_params.rbi +3 -13
- data/rbi/lib/terminal-shop/models/cart_set_item_response.rbi +4 -6
- data/rbi/lib/terminal-shop/models/email_create_params.rbi +2 -7
- data/rbi/lib/terminal-shop/models/email_create_response.rbi +1 -6
- data/rbi/lib/terminal-shop/models/order.rbi +52 -139
- data/rbi/lib/terminal-shop/models/order_create_params.rbi +4 -19
- data/rbi/lib/terminal-shop/models/order_create_response.rbi +1 -6
- data/rbi/lib/terminal-shop/models/order_get_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/order_get_response.rbi +4 -6
- data/rbi/lib/terminal-shop/models/order_list_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/order_list_response.rbi +4 -6
- data/rbi/lib/terminal-shop/models/product.rbi +43 -77
- data/rbi/lib/terminal-shop/models/product_get_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/product_get_response.rbi +7 -6
- data/rbi/lib/terminal-shop/models/product_list_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/product_list_response.rbi +4 -6
- data/rbi/lib/terminal-shop/models/product_variant.rbi +3 -18
- data/rbi/lib/terminal-shop/models/profile.rbi +12 -36
- data/rbi/lib/terminal-shop/models/profile_me_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/profile_me_response.rbi +7 -6
- data/rbi/lib/terminal-shop/models/profile_update_params.rbi +3 -13
- data/rbi/lib/terminal-shop/models/profile_update_response.rbi +7 -6
- data/rbi/lib/terminal-shop/models/region.rbi +10 -5
- data/rbi/lib/terminal-shop/models/subscription.rbi +28 -75
- data/rbi/lib/terminal-shop/models/subscription_create_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/subscription_create_response.rbi +1 -6
- data/rbi/lib/terminal-shop/models/subscription_delete_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/subscription_delete_response.rbi +1 -6
- data/rbi/lib/terminal-shop/models/subscription_get_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/subscription_get_response.rbi +7 -6
- data/rbi/lib/terminal-shop/models/subscription_list_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/subscription_list_response.rbi +3 -8
- data/rbi/lib/terminal-shop/models/token.rbi +3 -18
- data/rbi/lib/terminal-shop/models/token_create_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/token_create_response.rbi +8 -20
- data/rbi/lib/terminal-shop/models/token_delete_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/token_delete_response.rbi +1 -6
- data/rbi/lib/terminal-shop/models/token_get_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/token_get_response.rbi +4 -6
- data/rbi/lib/terminal-shop/models/token_list_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/token_list_response.rbi +4 -6
- data/rbi/lib/terminal-shop/models/view_init_params.rbi +1 -1
- data/rbi/lib/terminal-shop/models/view_init_response.rbi +32 -81
- data/rbi/lib/terminal-shop/pooled_net_requester.rbi +14 -3
- data/rbi/lib/terminal-shop/request_options.rbi +11 -55
- data/rbi/lib/terminal-shop/resources/address.rbi +4 -4
- data/rbi/lib/terminal-shop/resources/app.rbi +4 -4
- data/rbi/lib/terminal-shop/resources/card.rbi +5 -5
- data/rbi/lib/terminal-shop/resources/cart.rbi +6 -6
- data/rbi/lib/terminal-shop/resources/email.rbi +1 -1
- data/rbi/lib/terminal-shop/resources/order.rbi +3 -3
- 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 +5 -4
- data/rbi/lib/terminal-shop/resources/token.rbi +4 -4
- data/rbi/lib/terminal-shop/resources/view.rbi +1 -1
- data/rbi/lib/terminal-shop/util.rbi +24 -13
- data/rbi/lib/terminal-shop/version.rbi +1 -1
- data/sig/terminal-shop/base_client.rbs +14 -14
- data/sig/terminal-shop/base_model.rbs +34 -18
- data/sig/terminal-shop/client.rbs +8 -8
- data/sig/terminal-shop/errors.rbs +17 -17
- data/sig/terminal-shop/models/address.rbs +11 -15
- data/sig/terminal-shop/models/address_create_params.rbs +11 -16
- data/sig/terminal-shop/models/address_create_response.rbs +1 -6
- data/sig/terminal-shop/models/address_delete_params.rbs +1 -6
- data/sig/terminal-shop/models/address_delete_response.rbs +1 -6
- data/sig/terminal-shop/models/address_get_params.rbs +1 -6
- data/sig/terminal-shop/models/address_get_response.rbs +1 -6
- data/sig/terminal-shop/models/address_list_params.rbs +1 -6
- data/sig/terminal-shop/models/address_list_response.rbs +1 -6
- data/sig/terminal-shop/models/app.rbs +6 -5
- data/sig/terminal-shop/models/app_create_params.rbs +5 -10
- data/sig/terminal-shop/models/app_create_response.rbs +4 -12
- data/sig/terminal-shop/models/app_delete_params.rbs +1 -6
- data/sig/terminal-shop/models/app_delete_response.rbs +1 -6
- data/sig/terminal-shop/models/app_get_params.rbs +1 -5
- data/sig/terminal-shop/models/app_get_response.rbs +1 -5
- data/sig/terminal-shop/models/app_list_params.rbs +1 -5
- data/sig/terminal-shop/models/app_list_response.rbs +1 -6
- data/sig/terminal-shop/models/card.rbs +7 -16
- data/sig/terminal-shop/models/card_collect_params.rbs +1 -6
- data/sig/terminal-shop/models/card_collect_response.rbs +4 -12
- data/sig/terminal-shop/models/card_create_params.rbs +4 -6
- data/sig/terminal-shop/models/card_create_response.rbs +1 -6
- data/sig/terminal-shop/models/card_delete_params.rbs +1 -6
- data/sig/terminal-shop/models/card_delete_response.rbs +1 -6
- data/sig/terminal-shop/models/card_get_params.rbs +1 -5
- data/sig/terminal-shop/models/card_get_response.rbs +1 -6
- data/sig/terminal-shop/models/card_list_params.rbs +1 -5
- data/sig/terminal-shop/models/card_list_response.rbs +1 -6
- data/sig/terminal-shop/models/cart.rbs +20 -34
- data/sig/terminal-shop/models/cart_clear_params.rbs +1 -6
- data/sig/terminal-shop/models/cart_clear_response.rbs +1 -6
- data/sig/terminal-shop/models/cart_convert_params.rbs +1 -6
- data/sig/terminal-shop/models/cart_convert_response.rbs +1 -6
- data/sig/terminal-shop/models/cart_get_params.rbs +1 -5
- data/sig/terminal-shop/models/cart_get_response.rbs +1 -6
- data/sig/terminal-shop/models/cart_set_address_params.rbs +4 -9
- data/sig/terminal-shop/models/cart_set_address_response.rbs +1 -6
- data/sig/terminal-shop/models/cart_set_card_params.rbs +4 -6
- data/sig/terminal-shop/models/cart_set_card_response.rbs +1 -6
- data/sig/terminal-shop/models/cart_set_item_params.rbs +5 -10
- data/sig/terminal-shop/models/cart_set_item_response.rbs +1 -6
- data/sig/terminal-shop/models/email_create_params.rbs +4 -6
- data/sig/terminal-shop/models/email_create_response.rbs +1 -6
- data/sig/terminal-shop/models/order.rbs +31 -50
- data/sig/terminal-shop/models/order_create_params.rbs +6 -11
- data/sig/terminal-shop/models/order_create_response.rbs +1 -6
- data/sig/terminal-shop/models/order_get_params.rbs +1 -5
- data/sig/terminal-shop/models/order_get_response.rbs +1 -6
- data/sig/terminal-shop/models/order_list_params.rbs +1 -6
- data/sig/terminal-shop/models/order_list_response.rbs +1 -6
- data/sig/terminal-shop/models/product.rbs +20 -27
- data/sig/terminal-shop/models/product_get_params.rbs +1 -6
- data/sig/terminal-shop/models/product_get_response.rbs +1 -6
- data/sig/terminal-shop/models/product_list_params.rbs +1 -6
- data/sig/terminal-shop/models/product_list_response.rbs +1 -6
- data/sig/terminal-shop/models/product_variant.rbs +1 -5
- data/sig/terminal-shop/models/profile.rbs +8 -17
- data/sig/terminal-shop/models/profile_me_params.rbs +1 -6
- data/sig/terminal-shop/models/profile_me_response.rbs +1 -6
- data/sig/terminal-shop/models/profile_update_params.rbs +5 -10
- data/sig/terminal-shop/models/profile_update_response.rbs +1 -6
- data/sig/terminal-shop/models/region.rbs +4 -2
- data/sig/terminal-shop/models/subscription.rbs +15 -27
- data/sig/terminal-shop/models/subscription_create_params.rbs +1 -6
- data/sig/terminal-shop/models/subscription_create_response.rbs +1 -6
- data/sig/terminal-shop/models/subscription_delete_params.rbs +1 -6
- data/sig/terminal-shop/models/subscription_delete_response.rbs +1 -6
- data/sig/terminal-shop/models/subscription_get_params.rbs +1 -6
- data/sig/terminal-shop/models/subscription_get_response.rbs +1 -6
- data/sig/terminal-shop/models/subscription_list_params.rbs +1 -6
- data/sig/terminal-shop/models/subscription_list_response.rbs +3 -6
- data/sig/terminal-shop/models/token.rbs +1 -5
- data/sig/terminal-shop/models/token_create_params.rbs +1 -6
- data/sig/terminal-shop/models/token_create_response.rbs +4 -12
- data/sig/terminal-shop/models/token_delete_params.rbs +1 -6
- data/sig/terminal-shop/models/token_delete_response.rbs +1 -6
- data/sig/terminal-shop/models/token_get_params.rbs +1 -5
- data/sig/terminal-shop/models/token_get_response.rbs +1 -6
- data/sig/terminal-shop/models/token_list_params.rbs +1 -6
- data/sig/terminal-shop/models/token_list_response.rbs +1 -6
- data/sig/terminal-shop/models/view_init_params.rbs +1 -5
- data/sig/terminal-shop/models/view_init_response.rbs +15 -23
- data/sig/terminal-shop/pooled_net_requester.rbs +3 -1
- data/sig/terminal-shop/request_options.rbs +2 -2
- data/sig/terminal-shop/resources/address.rbs +22 -41
- data/sig/terminal-shop/resources/app.rbs +16 -34
- data/sig/terminal-shop/resources/card.rbs +18 -40
- data/sig/terminal-shop/resources/cart.rbs +22 -47
- data/sig/terminal-shop/resources/email.rbs +4 -8
- data/sig/terminal-shop/resources/order.rbs +13 -26
- data/sig/terminal-shop/resources/product.rbs +7 -16
- data/sig/terminal-shop/resources/profile.rbs +8 -16
- data/sig/terminal-shop/resources/subscription.rbs +21 -43
- data/sig/terminal-shop/resources/token.rbs +14 -32
- data/sig/terminal-shop/resources/view.rbs +3 -7
- data/sig/terminal-shop/util.rbs +5 -5
- data/sig/terminal-shop/version.rbs +1 -1
- metadata +2 -2
|
@@ -5,70 +5,49 @@ module TerminalShop
|
|
|
5
5
|
class CartAPI < TerminalShop::BaseModel
|
|
6
6
|
# The subtotal and shipping amounts for the current user's cart.
|
|
7
7
|
sig { returns(TerminalShop::Models::CartAPI::Amount) }
|
|
8
|
-
|
|
9
|
-
end
|
|
8
|
+
attr_reader :amount
|
|
10
9
|
|
|
11
|
-
sig { params(
|
|
12
|
-
|
|
13
|
-
end
|
|
10
|
+
sig { params(amount: T.any(TerminalShop::Models::CartAPI::Amount, TerminalShop::Util::AnyHash)).void }
|
|
11
|
+
attr_writer :amount
|
|
14
12
|
|
|
15
13
|
# An array of items in the current user's cart.
|
|
16
14
|
sig { returns(T::Array[TerminalShop::Models::CartAPI::Item]) }
|
|
17
|
-
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
sig do
|
|
21
|
-
params(_: T::Array[TerminalShop::Models::CartAPI::Item])
|
|
22
|
-
.returns(T::Array[TerminalShop::Models::CartAPI::Item])
|
|
23
|
-
end
|
|
24
|
-
def items=(_)
|
|
25
|
-
end
|
|
15
|
+
attr_accessor :items
|
|
26
16
|
|
|
27
17
|
# The subtotal of all items in the current user's cart, in cents (USD).
|
|
28
18
|
sig { returns(Integer) }
|
|
29
|
-
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
sig { params(_: Integer).returns(Integer) }
|
|
33
|
-
def subtotal=(_)
|
|
34
|
-
end
|
|
19
|
+
attr_accessor :subtotal
|
|
35
20
|
|
|
36
21
|
# ID of the shipping address selected on the current user's cart.
|
|
37
22
|
sig { returns(T.nilable(String)) }
|
|
38
|
-
|
|
39
|
-
end
|
|
23
|
+
attr_reader :address_id
|
|
40
24
|
|
|
41
|
-
sig { params(
|
|
42
|
-
|
|
43
|
-
end
|
|
25
|
+
sig { params(address_id: String).void }
|
|
26
|
+
attr_writer :address_id
|
|
44
27
|
|
|
45
28
|
# ID of the card selected on the current user's cart.
|
|
46
29
|
sig { returns(T.nilable(String)) }
|
|
47
|
-
|
|
48
|
-
end
|
|
30
|
+
attr_reader :card_id
|
|
49
31
|
|
|
50
|
-
sig { params(
|
|
51
|
-
|
|
52
|
-
end
|
|
32
|
+
sig { params(card_id: String).void }
|
|
33
|
+
attr_writer :card_id
|
|
53
34
|
|
|
54
35
|
# Shipping information for the current user's cart.
|
|
55
36
|
sig { returns(T.nilable(TerminalShop::Models::CartAPI::Shipping)) }
|
|
56
|
-
|
|
57
|
-
end
|
|
37
|
+
attr_reader :shipping
|
|
58
38
|
|
|
59
|
-
sig { params(
|
|
60
|
-
|
|
61
|
-
end
|
|
39
|
+
sig { params(shipping: T.any(TerminalShop::Models::CartAPI::Shipping, TerminalShop::Util::AnyHash)).void }
|
|
40
|
+
attr_writer :shipping
|
|
62
41
|
|
|
63
42
|
# The current Terminal shop user's cart.
|
|
64
43
|
sig do
|
|
65
44
|
params(
|
|
66
|
-
amount: TerminalShop::Models::CartAPI::Amount,
|
|
67
|
-
items: T::Array[TerminalShop::Models::CartAPI::Item],
|
|
45
|
+
amount: T.any(TerminalShop::Models::CartAPI::Amount, TerminalShop::Util::AnyHash),
|
|
46
|
+
items: T::Array[T.any(TerminalShop::Models::CartAPI::Item, TerminalShop::Util::AnyHash)],
|
|
68
47
|
subtotal: Integer,
|
|
69
48
|
address_id: String,
|
|
70
49
|
card_id: String,
|
|
71
|
-
shipping: TerminalShop::Models::CartAPI::Shipping
|
|
50
|
+
shipping: T.any(TerminalShop::Models::CartAPI::Shipping, TerminalShop::Util::AnyHash)
|
|
72
51
|
)
|
|
73
52
|
.returns(T.attached_class)
|
|
74
53
|
end
|
|
@@ -94,30 +73,21 @@ module TerminalShop
|
|
|
94
73
|
class Amount < TerminalShop::BaseModel
|
|
95
74
|
# Subtotal of the current user's cart, in cents (USD).
|
|
96
75
|
sig { returns(Integer) }
|
|
97
|
-
|
|
98
|
-
end
|
|
99
|
-
|
|
100
|
-
sig { params(_: Integer).returns(Integer) }
|
|
101
|
-
def subtotal=(_)
|
|
102
|
-
end
|
|
76
|
+
attr_accessor :subtotal
|
|
103
77
|
|
|
104
78
|
# Shipping amount of the current user's cart, in cents (USD).
|
|
105
79
|
sig { returns(T.nilable(Integer)) }
|
|
106
|
-
|
|
107
|
-
end
|
|
80
|
+
attr_reader :shipping
|
|
108
81
|
|
|
109
|
-
sig { params(
|
|
110
|
-
|
|
111
|
-
end
|
|
82
|
+
sig { params(shipping: Integer).void }
|
|
83
|
+
attr_writer :shipping
|
|
112
84
|
|
|
113
85
|
# Total amount after any discounts, in cents (USD).
|
|
114
86
|
sig { returns(T.nilable(Integer)) }
|
|
115
|
-
|
|
116
|
-
end
|
|
87
|
+
attr_reader :total
|
|
117
88
|
|
|
118
|
-
sig { params(
|
|
119
|
-
|
|
120
|
-
end
|
|
89
|
+
sig { params(total: Integer).void }
|
|
90
|
+
attr_writer :total
|
|
121
91
|
|
|
122
92
|
# The subtotal and shipping amounts for the current user's cart.
|
|
123
93
|
sig { params(subtotal: Integer, shipping: Integer, total: Integer).returns(T.attached_class) }
|
|
@@ -132,39 +102,19 @@ module TerminalShop
|
|
|
132
102
|
class Item < TerminalShop::BaseModel
|
|
133
103
|
# Unique object identifier. The format and length of IDs may change over time.
|
|
134
104
|
sig { returns(String) }
|
|
135
|
-
|
|
136
|
-
end
|
|
137
|
-
|
|
138
|
-
sig { params(_: String).returns(String) }
|
|
139
|
-
def id=(_)
|
|
140
|
-
end
|
|
105
|
+
attr_accessor :id
|
|
141
106
|
|
|
142
107
|
# ID of the product variant for this item in the current user's cart.
|
|
143
108
|
sig { returns(String) }
|
|
144
|
-
|
|
145
|
-
end
|
|
146
|
-
|
|
147
|
-
sig { params(_: String).returns(String) }
|
|
148
|
-
def product_variant_id=(_)
|
|
149
|
-
end
|
|
109
|
+
attr_accessor :product_variant_id
|
|
150
110
|
|
|
151
111
|
# Quantity of the item in the current user's cart.
|
|
152
112
|
sig { returns(Integer) }
|
|
153
|
-
|
|
154
|
-
end
|
|
155
|
-
|
|
156
|
-
sig { params(_: Integer).returns(Integer) }
|
|
157
|
-
def quantity=(_)
|
|
158
|
-
end
|
|
113
|
+
attr_accessor :quantity
|
|
159
114
|
|
|
160
115
|
# Subtotal of the item in the current user's cart, in cents (USD).
|
|
161
116
|
sig { returns(Integer) }
|
|
162
|
-
|
|
163
|
-
end
|
|
164
|
-
|
|
165
|
-
sig { params(_: Integer).returns(Integer) }
|
|
166
|
-
def subtotal=(_)
|
|
167
|
-
end
|
|
117
|
+
attr_accessor :subtotal
|
|
168
118
|
|
|
169
119
|
# An item in the current Terminal shop user's cart.
|
|
170
120
|
sig do
|
|
@@ -184,21 +134,17 @@ module TerminalShop
|
|
|
184
134
|
class Shipping < TerminalShop::BaseModel
|
|
185
135
|
# Shipping service name.
|
|
186
136
|
sig { returns(T.nilable(String)) }
|
|
187
|
-
|
|
188
|
-
end
|
|
137
|
+
attr_reader :service
|
|
189
138
|
|
|
190
|
-
sig { params(
|
|
191
|
-
|
|
192
|
-
end
|
|
139
|
+
sig { params(service: String).void }
|
|
140
|
+
attr_writer :service
|
|
193
141
|
|
|
194
142
|
# Shipping timeframe provided by the shipping carrier.
|
|
195
143
|
sig { returns(T.nilable(String)) }
|
|
196
|
-
|
|
197
|
-
end
|
|
144
|
+
attr_reader :timeframe
|
|
198
145
|
|
|
199
|
-
sig { params(
|
|
200
|
-
|
|
201
|
-
end
|
|
146
|
+
sig { params(timeframe: String).void }
|
|
147
|
+
attr_writer :timeframe
|
|
202
148
|
|
|
203
149
|
# Shipping information for the current user's cart.
|
|
204
150
|
sig { params(service: String, timeframe: String).returns(T.attached_class) }
|
|
@@ -7,7 +7,7 @@ module TerminalShop
|
|
|
7
7
|
include TerminalShop::RequestParameters
|
|
8
8
|
|
|
9
9
|
sig do
|
|
10
|
-
params(request_options: T.any(TerminalShop::RequestOptions,
|
|
10
|
+
params(request_options: T.any(TerminalShop::RequestOptions, TerminalShop::Util::AnyHash))
|
|
11
11
|
.returns(T.attached_class)
|
|
12
12
|
end
|
|
13
13
|
def self.new(request_options: {})
|
|
@@ -4,12 +4,7 @@ module TerminalShop
|
|
|
4
4
|
module Models
|
|
5
5
|
class CartClearResponse < TerminalShop::BaseModel
|
|
6
6
|
sig { returns(Symbol) }
|
|
7
|
-
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
sig { params(_: Symbol).returns(Symbol) }
|
|
11
|
-
def data=(_)
|
|
12
|
-
end
|
|
7
|
+
attr_accessor :data
|
|
13
8
|
|
|
14
9
|
sig { params(data: Symbol).returns(T.attached_class) }
|
|
15
10
|
def self.new(data: :ok)
|
|
@@ -7,7 +7,7 @@ module TerminalShop
|
|
|
7
7
|
include TerminalShop::RequestParameters
|
|
8
8
|
|
|
9
9
|
sig do
|
|
10
|
-
params(request_options: T.any(TerminalShop::RequestOptions,
|
|
10
|
+
params(request_options: T.any(TerminalShop::RequestOptions, TerminalShop::Util::AnyHash))
|
|
11
11
|
.returns(T.attached_class)
|
|
12
12
|
end
|
|
13
13
|
def self.new(request_options: {})
|
|
@@ -5,14 +5,12 @@ module TerminalShop
|
|
|
5
5
|
class CartConvertResponse < TerminalShop::BaseModel
|
|
6
6
|
# An order from the Terminal shop.
|
|
7
7
|
sig { returns(TerminalShop::Models::OrderAPI) }
|
|
8
|
-
|
|
9
|
-
end
|
|
8
|
+
attr_reader :data
|
|
10
9
|
|
|
11
|
-
sig { params(
|
|
12
|
-
|
|
13
|
-
end
|
|
10
|
+
sig { params(data: T.any(TerminalShop::Models::OrderAPI, TerminalShop::Util::AnyHash)).void }
|
|
11
|
+
attr_writer :data
|
|
14
12
|
|
|
15
|
-
sig { params(data: TerminalShop::Models::OrderAPI).returns(T.attached_class) }
|
|
13
|
+
sig { params(data: T.any(TerminalShop::Models::OrderAPI, TerminalShop::Util::AnyHash)).returns(T.attached_class) }
|
|
16
14
|
def self.new(data:)
|
|
17
15
|
end
|
|
18
16
|
|
|
@@ -7,7 +7,7 @@ module TerminalShop
|
|
|
7
7
|
include TerminalShop::RequestParameters
|
|
8
8
|
|
|
9
9
|
sig do
|
|
10
|
-
params(request_options: T.any(TerminalShop::RequestOptions,
|
|
10
|
+
params(request_options: T.any(TerminalShop::RequestOptions, TerminalShop::Util::AnyHash))
|
|
11
11
|
.returns(T.attached_class)
|
|
12
12
|
end
|
|
13
13
|
def self.new(request_options: {})
|
|
@@ -5,14 +5,12 @@ module TerminalShop
|
|
|
5
5
|
class CartGetResponse < TerminalShop::BaseModel
|
|
6
6
|
# The current Terminal shop user's cart.
|
|
7
7
|
sig { returns(TerminalShop::Models::CartAPI) }
|
|
8
|
-
|
|
9
|
-
end
|
|
8
|
+
attr_reader :data
|
|
10
9
|
|
|
11
|
-
sig { params(
|
|
12
|
-
|
|
13
|
-
end
|
|
10
|
+
sig { params(data: T.any(TerminalShop::Models::CartAPI, TerminalShop::Util::AnyHash)).void }
|
|
11
|
+
attr_writer :data
|
|
14
12
|
|
|
15
|
-
sig { params(data: TerminalShop::Models::CartAPI).returns(T.attached_class) }
|
|
13
|
+
sig { params(data: T.any(TerminalShop::Models::CartAPI, TerminalShop::Util::AnyHash)).returns(T.attached_class) }
|
|
16
14
|
def self.new(data:)
|
|
17
15
|
end
|
|
18
16
|
|
|
@@ -8,17 +8,12 @@ module TerminalShop
|
|
|
8
8
|
|
|
9
9
|
# ID of the shipping address to set for the current user's cart.
|
|
10
10
|
sig { returns(String) }
|
|
11
|
-
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
sig { params(_: String).returns(String) }
|
|
15
|
-
def address_id=(_)
|
|
16
|
-
end
|
|
11
|
+
attr_accessor :address_id
|
|
17
12
|
|
|
18
13
|
sig do
|
|
19
14
|
params(
|
|
20
15
|
address_id: String,
|
|
21
|
-
request_options: T.any(TerminalShop::RequestOptions,
|
|
16
|
+
request_options: T.any(TerminalShop::RequestOptions, TerminalShop::Util::AnyHash)
|
|
22
17
|
)
|
|
23
18
|
.returns(T.attached_class)
|
|
24
19
|
end
|
|
@@ -4,12 +4,7 @@ module TerminalShop
|
|
|
4
4
|
module Models
|
|
5
5
|
class CartSetAddressResponse < TerminalShop::BaseModel
|
|
6
6
|
sig { returns(Symbol) }
|
|
7
|
-
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
sig { params(_: Symbol).returns(Symbol) }
|
|
11
|
-
def data=(_)
|
|
12
|
-
end
|
|
7
|
+
attr_accessor :data
|
|
13
8
|
|
|
14
9
|
sig { params(data: Symbol).returns(T.attached_class) }
|
|
15
10
|
def self.new(data: :ok)
|
|
@@ -8,19 +8,14 @@ module TerminalShop
|
|
|
8
8
|
|
|
9
9
|
# ID of the credit card to set for the current user's cart.
|
|
10
10
|
sig { returns(String) }
|
|
11
|
-
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
sig { params(_: String).returns(String) }
|
|
15
|
-
def card_id=(_)
|
|
16
|
-
end
|
|
11
|
+
attr_accessor :card_id
|
|
17
12
|
|
|
18
13
|
sig do
|
|
19
14
|
params(
|
|
20
15
|
card_id: String,
|
|
21
16
|
request_options: T.any(
|
|
22
17
|
TerminalShop::RequestOptions,
|
|
23
|
-
|
|
18
|
+
TerminalShop::Util::AnyHash
|
|
24
19
|
)
|
|
25
20
|
)
|
|
26
21
|
.returns(T.attached_class)
|
|
@@ -4,12 +4,7 @@ module TerminalShop
|
|
|
4
4
|
module Models
|
|
5
5
|
class CartSetCardResponse < TerminalShop::BaseModel
|
|
6
6
|
sig { returns(Symbol) }
|
|
7
|
-
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
sig { params(_: Symbol).returns(Symbol) }
|
|
11
|
-
def data=(_)
|
|
12
|
-
end
|
|
7
|
+
attr_accessor :data
|
|
13
8
|
|
|
14
9
|
sig { params(data: Symbol).returns(T.attached_class) }
|
|
15
10
|
def self.new(data: :ok)
|
|
@@ -8,27 +8,17 @@ module TerminalShop
|
|
|
8
8
|
|
|
9
9
|
# ID of the product variant to add to the cart.
|
|
10
10
|
sig { returns(String) }
|
|
11
|
-
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
sig { params(_: String).returns(String) }
|
|
15
|
-
def product_variant_id=(_)
|
|
16
|
-
end
|
|
11
|
+
attr_accessor :product_variant_id
|
|
17
12
|
|
|
18
13
|
# Quantity of the item to add to the cart.
|
|
19
14
|
sig { returns(Integer) }
|
|
20
|
-
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
sig { params(_: Integer).returns(Integer) }
|
|
24
|
-
def quantity=(_)
|
|
25
|
-
end
|
|
15
|
+
attr_accessor :quantity
|
|
26
16
|
|
|
27
17
|
sig do
|
|
28
18
|
params(
|
|
29
19
|
product_variant_id: String,
|
|
30
20
|
quantity: Integer,
|
|
31
|
-
request_options: T.any(TerminalShop::RequestOptions,
|
|
21
|
+
request_options: T.any(TerminalShop::RequestOptions, TerminalShop::Util::AnyHash)
|
|
32
22
|
)
|
|
33
23
|
.returns(T.attached_class)
|
|
34
24
|
end
|
|
@@ -5,14 +5,12 @@ module TerminalShop
|
|
|
5
5
|
class CartSetItemResponse < TerminalShop::BaseModel
|
|
6
6
|
# The current Terminal shop user's cart.
|
|
7
7
|
sig { returns(TerminalShop::Models::CartAPI) }
|
|
8
|
-
|
|
9
|
-
end
|
|
8
|
+
attr_reader :data
|
|
10
9
|
|
|
11
|
-
sig { params(
|
|
12
|
-
|
|
13
|
-
end
|
|
10
|
+
sig { params(data: T.any(TerminalShop::Models::CartAPI, TerminalShop::Util::AnyHash)).void }
|
|
11
|
+
attr_writer :data
|
|
14
12
|
|
|
15
|
-
sig { params(data: TerminalShop::Models::CartAPI).returns(T.attached_class) }
|
|
13
|
+
sig { params(data: T.any(TerminalShop::Models::CartAPI, TerminalShop::Util::AnyHash)).returns(T.attached_class) }
|
|
16
14
|
def self.new(data:)
|
|
17
15
|
end
|
|
18
16
|
|
|
@@ -8,19 +8,14 @@ module TerminalShop
|
|
|
8
8
|
|
|
9
9
|
# Email address to subscribe to Terminal updates with.
|
|
10
10
|
sig { returns(String) }
|
|
11
|
-
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
sig { params(_: String).returns(String) }
|
|
15
|
-
def email=(_)
|
|
16
|
-
end
|
|
11
|
+
attr_accessor :email
|
|
17
12
|
|
|
18
13
|
sig do
|
|
19
14
|
params(
|
|
20
15
|
email: String,
|
|
21
16
|
request_options: T.any(
|
|
22
17
|
TerminalShop::RequestOptions,
|
|
23
|
-
|
|
18
|
+
TerminalShop::Util::AnyHash
|
|
24
19
|
)
|
|
25
20
|
)
|
|
26
21
|
.returns(T.attached_class)
|
|
@@ -4,12 +4,7 @@ module TerminalShop
|
|
|
4
4
|
module Models
|
|
5
5
|
class EmailCreateResponse < TerminalShop::BaseModel
|
|
6
6
|
sig { returns(Symbol) }
|
|
7
|
-
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
sig { params(_: Symbol).returns(Symbol) }
|
|
11
|
-
def data=(_)
|
|
12
|
-
end
|
|
7
|
+
attr_accessor :data
|
|
13
8
|
|
|
14
9
|
sig { params(data: Symbol).returns(T.attached_class) }
|
|
15
10
|
def self.new(data: :ok)
|