terminal-shop 3.6.0 → 3.6.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 +4 -4
- data/CHANGELOG.md +27 -0
- data/README.md +3 -3
- data/lib/terminal_shop/file_part.rb +2 -2
- data/lib/terminal_shop/internal/type/enum.rb +4 -4
- data/lib/terminal_shop/internal/type/request_parameters.rb +4 -4
- data/lib/terminal_shop/internal/util.rb +1 -1
- data/lib/terminal_shop/models/address.rb +3 -3
- data/lib/terminal_shop/models/address_get_response.rb +3 -3
- data/lib/terminal_shop/models/address_list_response.rb +3 -3
- data/lib/terminal_shop/models/app.rb +3 -3
- data/lib/terminal_shop/models/app_get_response.rb +3 -3
- data/lib/terminal_shop/models/app_list_response.rb +3 -3
- data/lib/terminal_shop/models/card.rb +7 -7
- data/lib/terminal_shop/models/card_collect_response.rb +0 -1
- data/lib/terminal_shop/models/card_create_params.rb +0 -1
- data/lib/terminal_shop/models/card_get_response.rb +3 -3
- data/lib/terminal_shop/models/card_list_response.rb +3 -3
- data/lib/terminal_shop/models/cart.rb +13 -13
- data/lib/terminal_shop/models/cart_convert_response.rb +3 -3
- data/lib/terminal_shop/models/cart_get_response.rb +3 -3
- data/lib/terminal_shop/models/cart_set_item_response.rb +3 -3
- data/lib/terminal_shop/models/order.rb +24 -24
- data/lib/terminal_shop/models/order_get_response.rb +3 -3
- data/lib/terminal_shop/models/order_list_response.rb +3 -3
- data/lib/terminal_shop/models/product.rb +14 -14
- data/lib/terminal_shop/models/product_get_response.rb +3 -3
- data/lib/terminal_shop/models/product_list_response.rb +3 -3
- data/lib/terminal_shop/models/product_variant.rb +6 -6
- data/lib/terminal_shop/models/profile.rb +6 -6
- data/lib/terminal_shop/models/profile_me_response.rb +3 -3
- data/lib/terminal_shop/models/profile_update_response.rb +3 -3
- data/lib/terminal_shop/models/subscription.rb +9 -9
- data/lib/terminal_shop/models/subscription_get_response.rb +3 -3
- data/lib/terminal_shop/models/subscription_list_response.rb +3 -3
- data/lib/terminal_shop/models/subscription_update_params.rb +6 -6
- data/lib/terminal_shop/models/subscription_update_response.rb +3 -3
- data/lib/terminal_shop/models/token.rb +3 -3
- data/lib/terminal_shop/models/token_create_response.rb +0 -1
- data/lib/terminal_shop/models/token_get_response.rb +3 -4
- data/lib/terminal_shop/models/token_list_response.rb +3 -3
- data/lib/terminal_shop/models/view_init_response.rb +30 -31
- data/lib/terminal_shop/resources/address.rb +1 -1
- data/lib/terminal_shop/resources/app.rb +1 -1
- data/lib/terminal_shop/resources/card.rb +1 -2
- data/lib/terminal_shop/resources/cart.rb +3 -3
- data/lib/terminal_shop/resources/email.rb +1 -1
- data/lib/terminal_shop/resources/order.rb +1 -1
- data/lib/terminal_shop/resources/profile.rb +1 -1
- data/lib/terminal_shop/resources/subscription.rb +5 -5
- data/lib/terminal_shop/version.rb +1 -1
- data/lib/terminal_shop.rb +1 -0
- data/rbi/terminal_shop/client.rbi +9 -5
- data/rbi/terminal_shop/errors.rbi +35 -16
- data/rbi/terminal_shop/file_part.rbi +9 -6
- data/rbi/terminal_shop/internal/transport/base_client.rbi +140 -75
- data/rbi/terminal_shop/internal/transport/pooled_net_requester.rbi +26 -12
- data/rbi/terminal_shop/internal/type/array_of.rbi +34 -24
- data/rbi/terminal_shop/internal/type/base_model.rbi +131 -64
- data/rbi/terminal_shop/internal/type/base_page.rbi +13 -8
- data/rbi/terminal_shop/internal/type/boolean.rbi +16 -14
- data/rbi/terminal_shop/internal/type/converter.rbi +70 -28
- data/rbi/terminal_shop/internal/type/enum.rbi +23 -13
- data/rbi/terminal_shop/internal/type/file_input.rbi +8 -4
- data/rbi/terminal_shop/internal/type/hash_of.rbi +34 -24
- data/rbi/terminal_shop/internal/type/request_parameters.rbi +14 -4
- data/rbi/terminal_shop/internal/type/union.rbi +52 -22
- data/rbi/terminal_shop/internal/type/unknown.rbi +16 -6
- data/rbi/terminal_shop/internal/util.rbi +210 -88
- data/rbi/terminal_shop/models/address.rbi +23 -19
- data/rbi/terminal_shop/models/address_create_params.rbi +23 -19
- data/rbi/terminal_shop/models/address_create_response.rbi +9 -3
- data/rbi/terminal_shop/models/address_delete_params.rbi +13 -5
- data/rbi/terminal_shop/models/address_delete_response.rbi +8 -3
- data/rbi/terminal_shop/models/address_get_params.rbi +13 -5
- data/rbi/terminal_shop/models/address_get_response.rbi +12 -7
- data/rbi/terminal_shop/models/address_list_params.rbi +13 -5
- data/rbi/terminal_shop/models/address_list_response.rbi +13 -6
- data/rbi/terminal_shop/models/app.rbi +21 -4
- data/rbi/terminal_shop/models/app_create_params.rbi +16 -6
- data/rbi/terminal_shop/models/app_create_response.rbi +27 -9
- data/rbi/terminal_shop/models/app_delete_params.rbi +13 -5
- data/rbi/terminal_shop/models/app_delete_response.rbi +8 -3
- data/rbi/terminal_shop/models/app_get_params.rbi +13 -5
- data/rbi/terminal_shop/models/app_get_response.rbi +12 -7
- data/rbi/terminal_shop/models/app_list_params.rbi +13 -5
- data/rbi/terminal_shop/models/app_list_response.rbi +13 -6
- data/rbi/terminal_shop/models/card.rbi +30 -14
- data/rbi/terminal_shop/models/card_collect_params.rbi +13 -5
- data/rbi/terminal_shop/models/card_collect_response.rbi +30 -9
- data/rbi/terminal_shop/models/card_create_params.rbi +15 -6
- data/rbi/terminal_shop/models/card_create_response.rbi +9 -3
- data/rbi/terminal_shop/models/card_delete_params.rbi +13 -5
- data/rbi/terminal_shop/models/card_delete_response.rbi +8 -3
- data/rbi/terminal_shop/models/card_get_params.rbi +13 -5
- data/rbi/terminal_shop/models/card_get_response.rbi +12 -7
- data/rbi/terminal_shop/models/card_list_params.rbi +13 -5
- data/rbi/terminal_shop/models/card_list_response.rbi +13 -6
- data/rbi/terminal_shop/models/cart.rbi +79 -36
- data/rbi/terminal_shop/models/cart_clear_params.rbi +13 -5
- data/rbi/terminal_shop/models/cart_clear_response.rbi +8 -3
- data/rbi/terminal_shop/models/cart_convert_params.rbi +13 -5
- data/rbi/terminal_shop/models/cart_convert_response.rbi +12 -7
- data/rbi/terminal_shop/models/cart_get_params.rbi +13 -5
- data/rbi/terminal_shop/models/cart_get_response.rbi +12 -7
- data/rbi/terminal_shop/models/cart_set_address_params.rbi +15 -6
- data/rbi/terminal_shop/models/cart_set_address_response.rbi +8 -3
- data/rbi/terminal_shop/models/cart_set_card_params.rbi +15 -6
- data/rbi/terminal_shop/models/cart_set_card_response.rbi +8 -3
- data/rbi/terminal_shop/models/cart_set_item_params.rbi +17 -11
- data/rbi/terminal_shop/models/cart_set_item_response.rbi +12 -7
- data/rbi/terminal_shop/models/email_create_params.rbi +15 -6
- data/rbi/terminal_shop/models/email_create_response.rbi +8 -3
- data/rbi/terminal_shop/models/order.rbi +153 -87
- data/rbi/terminal_shop/models/order_create_params.rbi +18 -14
- data/rbi/terminal_shop/models/order_create_response.rbi +9 -3
- data/rbi/terminal_shop/models/order_get_params.rbi +13 -5
- data/rbi/terminal_shop/models/order_get_response.rbi +12 -7
- data/rbi/terminal_shop/models/order_list_params.rbi +13 -5
- data/rbi/terminal_shop/models/order_list_response.rbi +13 -6
- data/rbi/terminal_shop/models/product.rbi +71 -44
- data/rbi/terminal_shop/models/product_get_params.rbi +13 -5
- data/rbi/terminal_shop/models/product_get_response.rbi +12 -7
- data/rbi/terminal_shop/models/product_list_params.rbi +13 -5
- data/rbi/terminal_shop/models/product_list_response.rbi +13 -6
- data/rbi/terminal_shop/models/product_variant.rbi +39 -15
- data/rbi/terminal_shop/models/profile.rbi +32 -21
- data/rbi/terminal_shop/models/profile_me_params.rbi +13 -5
- data/rbi/terminal_shop/models/profile_me_response.rbi +12 -7
- data/rbi/terminal_shop/models/profile_update_params.rbi +18 -6
- data/rbi/terminal_shop/models/profile_update_response.rbi +12 -7
- data/rbi/terminal_shop/models/region.rbi +7 -6
- data/rbi/terminal_shop/models/subscription.rbi +70 -46
- data/rbi/terminal_shop/models/subscription_create_params.rbi +13 -5
- data/rbi/terminal_shop/models/subscription_create_response.rbi +8 -3
- data/rbi/terminal_shop/models/subscription_delete_params.rbi +13 -5
- data/rbi/terminal_shop/models/subscription_delete_response.rbi +8 -3
- data/rbi/terminal_shop/models/subscription_get_params.rbi +13 -5
- data/rbi/terminal_shop/models/subscription_get_response.rbi +14 -7
- data/rbi/terminal_shop/models/subscription_list_params.rbi +13 -5
- data/rbi/terminal_shop/models/subscription_list_response.rbi +15 -6
- data/rbi/terminal_shop/models/subscription_update_params.rbi +66 -42
- data/rbi/terminal_shop/models/subscription_update_response.rbi +14 -7
- data/rbi/terminal_shop/models/token.rbi +14 -4
- data/rbi/terminal_shop/models/token_create_params.rbi +13 -5
- data/rbi/terminal_shop/models/token_create_response.rbi +29 -9
- data/rbi/terminal_shop/models/token_delete_params.rbi +13 -5
- data/rbi/terminal_shop/models/token_delete_response.rbi +8 -3
- data/rbi/terminal_shop/models/token_get_params.rbi +13 -5
- data/rbi/terminal_shop/models/token_get_response.rbi +12 -7
- data/rbi/terminal_shop/models/token_list_params.rbi +13 -5
- data/rbi/terminal_shop/models/token_list_response.rbi +13 -6
- data/rbi/terminal_shop/models/view_init_params.rbi +13 -5
- data/rbi/terminal_shop/models/view_init_response.rbi +62 -47
- data/rbi/terminal_shop/request_options.rbi +16 -7
- data/rbi/terminal_shop/resources/address.rbi +28 -13
- data/rbi/terminal_shop/resources/app.rbi +30 -12
- data/rbi/terminal_shop/resources/card.rbi +37 -14
- data/rbi/terminal_shop/resources/cart.rbi +45 -16
- data/rbi/terminal_shop/resources/email.rbi +9 -4
- data/rbi/terminal_shop/resources/order.rbi +21 -10
- data/rbi/terminal_shop/resources/product.rbi +16 -6
- data/rbi/terminal_shop/resources/profile.rbi +16 -6
- data/rbi/terminal_shop/resources/subscription.rbi +43 -27
- data/rbi/terminal_shop/resources/token.rbi +30 -11
- data/rbi/terminal_shop/resources/view.rbi +9 -3
- data/sig/terminal_shop/internal/type/request_parameters.rbs +5 -1
- data/sig/terminal_shop/models/address.rbs +0 -2
- data/sig/terminal_shop/models/address_create_params.rbs +0 -2
- data/sig/terminal_shop/models/address_create_response.rbs +0 -2
- data/sig/terminal_shop/models/address_delete_params.rbs +0 -2
- data/sig/terminal_shop/models/address_delete_response.rbs +0 -2
- data/sig/terminal_shop/models/address_get_params.rbs +0 -2
- data/sig/terminal_shop/models/address_get_response.rbs +3 -5
- data/sig/terminal_shop/models/address_list_params.rbs +0 -2
- data/sig/terminal_shop/models/address_list_response.rbs +3 -6
- data/sig/terminal_shop/models/app.rbs +0 -2
- data/sig/terminal_shop/models/app_create_params.rbs +0 -2
- data/sig/terminal_shop/models/app_create_response.rbs +0 -4
- data/sig/terminal_shop/models/app_delete_params.rbs +0 -2
- data/sig/terminal_shop/models/app_delete_response.rbs +0 -2
- data/sig/terminal_shop/models/app_get_params.rbs +0 -2
- data/sig/terminal_shop/models/app_get_response.rbs +3 -5
- data/sig/terminal_shop/models/app_list_params.rbs +0 -2
- data/sig/terminal_shop/models/app_list_response.rbs +3 -5
- data/sig/terminal_shop/models/card.rbs +3 -7
- data/sig/terminal_shop/models/card_collect_params.rbs +0 -2
- data/sig/terminal_shop/models/card_collect_response.rbs +0 -4
- data/sig/terminal_shop/models/card_create_params.rbs +0 -2
- data/sig/terminal_shop/models/card_create_response.rbs +0 -2
- data/sig/terminal_shop/models/card_delete_params.rbs +0 -2
- data/sig/terminal_shop/models/card_delete_response.rbs +0 -2
- data/sig/terminal_shop/models/card_get_params.rbs +0 -2
- data/sig/terminal_shop/models/card_get_response.rbs +3 -5
- data/sig/terminal_shop/models/card_list_params.rbs +0 -2
- data/sig/terminal_shop/models/card_list_response.rbs +3 -5
- data/sig/terminal_shop/models/cart.rbs +11 -19
- data/sig/terminal_shop/models/cart_clear_params.rbs +0 -2
- data/sig/terminal_shop/models/cart_clear_response.rbs +0 -2
- data/sig/terminal_shop/models/cart_convert_params.rbs +0 -2
- data/sig/terminal_shop/models/cart_convert_response.rbs +3 -5
- data/sig/terminal_shop/models/cart_get_params.rbs +0 -2
- data/sig/terminal_shop/models/cart_get_response.rbs +3 -5
- data/sig/terminal_shop/models/cart_set_address_params.rbs +0 -2
- data/sig/terminal_shop/models/cart_set_address_response.rbs +0 -2
- data/sig/terminal_shop/models/cart_set_card_params.rbs +0 -2
- data/sig/terminal_shop/models/cart_set_card_response.rbs +0 -2
- data/sig/terminal_shop/models/cart_set_item_params.rbs +0 -2
- data/sig/terminal_shop/models/cart_set_item_response.rbs +3 -5
- data/sig/terminal_shop/models/email_create_params.rbs +0 -2
- data/sig/terminal_shop/models/email_create_response.rbs +0 -2
- data/sig/terminal_shop/models/order.rbs +18 -28
- data/sig/terminal_shop/models/order_create_params.rbs +0 -2
- data/sig/terminal_shop/models/order_create_response.rbs +0 -2
- data/sig/terminal_shop/models/order_get_params.rbs +0 -2
- data/sig/terminal_shop/models/order_get_response.rbs +3 -5
- data/sig/terminal_shop/models/order_list_params.rbs +0 -2
- data/sig/terminal_shop/models/order_list_response.rbs +3 -5
- data/sig/terminal_shop/models/product.rbs +14 -18
- data/sig/terminal_shop/models/product_get_params.rbs +0 -2
- data/sig/terminal_shop/models/product_get_response.rbs +3 -5
- data/sig/terminal_shop/models/product_list_params.rbs +0 -2
- data/sig/terminal_shop/models/product_list_response.rbs +3 -6
- data/sig/terminal_shop/models/product_variant.rbs +5 -9
- data/sig/terminal_shop/models/profile.rbs +3 -7
- data/sig/terminal_shop/models/profile_me_params.rbs +0 -2
- data/sig/terminal_shop/models/profile_me_response.rbs +3 -5
- data/sig/terminal_shop/models/profile_update_params.rbs +0 -2
- data/sig/terminal_shop/models/profile_update_response.rbs +3 -5
- data/sig/terminal_shop/models/subscription.rbs +8 -14
- data/sig/terminal_shop/models/subscription_create_params.rbs +0 -2
- data/sig/terminal_shop/models/subscription_create_response.rbs +0 -2
- data/sig/terminal_shop/models/subscription_delete_params.rbs +0 -2
- data/sig/terminal_shop/models/subscription_delete_response.rbs +0 -2
- data/sig/terminal_shop/models/subscription_get_params.rbs +0 -2
- data/sig/terminal_shop/models/subscription_get_response.rbs +3 -6
- data/sig/terminal_shop/models/subscription_list_params.rbs +0 -2
- data/sig/terminal_shop/models/subscription_list_response.rbs +3 -7
- data/sig/terminal_shop/models/subscription_update_params.rbs +3 -9
- data/sig/terminal_shop/models/subscription_update_response.rbs +3 -6
- data/sig/terminal_shop/models/token.rbs +0 -2
- data/sig/terminal_shop/models/token_create_params.rbs +0 -2
- data/sig/terminal_shop/models/token_create_response.rbs +0 -4
- data/sig/terminal_shop/models/token_delete_params.rbs +0 -2
- data/sig/terminal_shop/models/token_delete_response.rbs +0 -2
- data/sig/terminal_shop/models/token_get_params.rbs +0 -2
- data/sig/terminal_shop/models/token_get_response.rbs +3 -5
- data/sig/terminal_shop/models/token_list_params.rbs +0 -2
- data/sig/terminal_shop/models/token_list_response.rbs +3 -5
- data/sig/terminal_shop/models/view_init_params.rbs +0 -2
- data/sig/terminal_shop/models/view_init_response.rbs +27 -31
- data/sig/terminal_shop/request_options.rbs +1 -1
- metadata +2 -2
@@ -2,18 +2,18 @@ module TerminalShop
|
|
2
2
|
module Models
|
3
3
|
type cart_api =
|
4
4
|
{
|
5
|
-
amount: TerminalShop::
|
6
|
-
items: ::Array[TerminalShop::
|
5
|
+
amount: TerminalShop::CartAPI::Amount,
|
6
|
+
items: ::Array[TerminalShop::CartAPI::Item],
|
7
7
|
subtotal: Integer,
|
8
8
|
address_id: String,
|
9
9
|
card_id: String,
|
10
|
-
shipping: TerminalShop::
|
10
|
+
shipping: TerminalShop::CartAPI::Shipping
|
11
11
|
}
|
12
12
|
|
13
13
|
class CartAPI < TerminalShop::Internal::Type::BaseModel
|
14
|
-
attr_accessor amount: TerminalShop::
|
14
|
+
attr_accessor amount: TerminalShop::CartAPI::Amount
|
15
15
|
|
16
|
-
attr_accessor items: ::Array[TerminalShop::
|
16
|
+
attr_accessor items: ::Array[TerminalShop::CartAPI::Item]
|
17
17
|
|
18
18
|
attr_accessor subtotal: Integer
|
19
19
|
|
@@ -25,23 +25,21 @@ module TerminalShop
|
|
25
25
|
|
26
26
|
def card_id=: (String) -> String
|
27
27
|
|
28
|
-
attr_reader shipping: TerminalShop::
|
28
|
+
attr_reader shipping: TerminalShop::CartAPI::Shipping?
|
29
29
|
|
30
30
|
def shipping=: (
|
31
|
-
TerminalShop::
|
32
|
-
) -> TerminalShop::
|
31
|
+
TerminalShop::CartAPI::Shipping
|
32
|
+
) -> TerminalShop::CartAPI::Shipping
|
33
33
|
|
34
34
|
def initialize: (
|
35
|
-
amount: TerminalShop::
|
36
|
-
items: ::Array[TerminalShop::
|
35
|
+
amount: TerminalShop::CartAPI::Amount,
|
36
|
+
items: ::Array[TerminalShop::CartAPI::Item],
|
37
37
|
subtotal: Integer,
|
38
38
|
?address_id: String,
|
39
39
|
?card_id: String,
|
40
|
-
?shipping: TerminalShop::
|
40
|
+
?shipping: TerminalShop::CartAPI::Shipping
|
41
41
|
) -> void
|
42
42
|
|
43
|
-
def to_hash: -> TerminalShop::Models::cart_api
|
44
|
-
|
45
43
|
type amount = { subtotal: Integer, shipping: Integer, total: Integer }
|
46
44
|
|
47
45
|
class Amount < TerminalShop::Internal::Type::BaseModel
|
@@ -60,8 +58,6 @@ module TerminalShop
|
|
60
58
|
?shipping: Integer,
|
61
59
|
?total: Integer
|
62
60
|
) -> void
|
63
|
-
|
64
|
-
def to_hash: -> TerminalShop::Models::CartAPI::amount
|
65
61
|
end
|
66
62
|
|
67
63
|
type item =
|
@@ -87,8 +83,6 @@ module TerminalShop
|
|
87
83
|
quantity: Integer,
|
88
84
|
subtotal: Integer
|
89
85
|
) -> void
|
90
|
-
|
91
|
-
def to_hash: -> TerminalShop::Models::CartAPI::item
|
92
86
|
end
|
93
87
|
|
94
88
|
type shipping = { service: String, timeframe: String }
|
@@ -103,8 +97,6 @@ module TerminalShop
|
|
103
97
|
def timeframe=: (String) -> String
|
104
98
|
|
105
99
|
def initialize: (?service: String, ?timeframe: String) -> void
|
106
|
-
|
107
|
-
def to_hash: -> TerminalShop::Models::CartAPI::shipping
|
108
100
|
end
|
109
101
|
end
|
110
102
|
end
|
@@ -1,13 +1,11 @@
|
|
1
1
|
module TerminalShop
|
2
2
|
module Models
|
3
|
-
type cart_convert_response = { data: TerminalShop::
|
3
|
+
type cart_convert_response = { data: TerminalShop::OrderAPI }
|
4
4
|
|
5
5
|
class CartConvertResponse < TerminalShop::Internal::Type::BaseModel
|
6
|
-
attr_accessor data: TerminalShop::
|
6
|
+
attr_accessor data: TerminalShop::OrderAPI
|
7
7
|
|
8
|
-
def initialize: (data: TerminalShop::
|
9
|
-
|
10
|
-
def to_hash: -> TerminalShop::Models::cart_convert_response
|
8
|
+
def initialize: (data: TerminalShop::OrderAPI) -> void
|
11
9
|
end
|
12
10
|
end
|
13
11
|
end
|
@@ -1,13 +1,11 @@
|
|
1
1
|
module TerminalShop
|
2
2
|
module Models
|
3
|
-
type cart_get_response = { data: TerminalShop::
|
3
|
+
type cart_get_response = { data: TerminalShop::CartAPI }
|
4
4
|
|
5
5
|
class CartGetResponse < TerminalShop::Internal::Type::BaseModel
|
6
|
-
attr_accessor data: TerminalShop::
|
6
|
+
attr_accessor data: TerminalShop::CartAPI
|
7
7
|
|
8
|
-
def initialize: (data: TerminalShop::
|
9
|
-
|
10
|
-
def to_hash: -> TerminalShop::Models::cart_get_response
|
8
|
+
def initialize: (data: TerminalShop::CartAPI) -> void
|
11
9
|
end
|
12
10
|
end
|
13
11
|
end
|
@@ -1,13 +1,11 @@
|
|
1
1
|
module TerminalShop
|
2
2
|
module Models
|
3
|
-
type cart_set_item_response = { data: TerminalShop::
|
3
|
+
type cart_set_item_response = { data: TerminalShop::CartAPI }
|
4
4
|
|
5
5
|
class CartSetItemResponse < TerminalShop::Internal::Type::BaseModel
|
6
|
-
attr_accessor data: TerminalShop::
|
6
|
+
attr_accessor data: TerminalShop::CartAPI
|
7
7
|
|
8
|
-
def initialize: (data: TerminalShop::
|
9
|
-
|
10
|
-
def to_hash: -> TerminalShop::Models::cart_set_item_response
|
8
|
+
def initialize: (data: TerminalShop::CartAPI) -> void
|
11
9
|
end
|
12
10
|
end
|
13
11
|
end
|
@@ -3,26 +3,26 @@ module TerminalShop
|
|
3
3
|
type order_api =
|
4
4
|
{
|
5
5
|
id: String,
|
6
|
-
amount: TerminalShop::
|
6
|
+
amount: TerminalShop::OrderAPI::Amount,
|
7
7
|
created: String,
|
8
|
-
items: ::Array[TerminalShop::
|
9
|
-
shipping: TerminalShop::
|
10
|
-
tracking: TerminalShop::
|
8
|
+
items: ::Array[TerminalShop::OrderAPI::Item],
|
9
|
+
shipping: TerminalShop::OrderAPI::Shipping,
|
10
|
+
tracking: TerminalShop::OrderAPI::Tracking,
|
11
11
|
index: Integer
|
12
12
|
}
|
13
13
|
|
14
14
|
class OrderAPI < TerminalShop::Internal::Type::BaseModel
|
15
15
|
attr_accessor id: String
|
16
16
|
|
17
|
-
attr_accessor amount: TerminalShop::
|
17
|
+
attr_accessor amount: TerminalShop::OrderAPI::Amount
|
18
18
|
|
19
19
|
attr_accessor created: String
|
20
20
|
|
21
|
-
attr_accessor items: ::Array[TerminalShop::
|
21
|
+
attr_accessor items: ::Array[TerminalShop::OrderAPI::Item]
|
22
22
|
|
23
|
-
attr_accessor shipping: TerminalShop::
|
23
|
+
attr_accessor shipping: TerminalShop::OrderAPI::Shipping
|
24
24
|
|
25
|
-
attr_accessor tracking: TerminalShop::
|
25
|
+
attr_accessor tracking: TerminalShop::OrderAPI::Tracking
|
26
26
|
|
27
27
|
attr_reader index: Integer?
|
28
28
|
|
@@ -30,16 +30,14 @@ module TerminalShop
|
|
30
30
|
|
31
31
|
def initialize: (
|
32
32
|
id: String,
|
33
|
-
amount: TerminalShop::
|
33
|
+
amount: TerminalShop::OrderAPI::Amount,
|
34
34
|
created: String,
|
35
|
-
items: ::Array[TerminalShop::
|
36
|
-
shipping: TerminalShop::
|
37
|
-
tracking: TerminalShop::
|
35
|
+
items: ::Array[TerminalShop::OrderAPI::Item],
|
36
|
+
shipping: TerminalShop::OrderAPI::Shipping,
|
37
|
+
tracking: TerminalShop::OrderAPI::Tracking,
|
38
38
|
?index: Integer
|
39
39
|
) -> void
|
40
40
|
|
41
|
-
def to_hash: -> TerminalShop::Models::order_api
|
42
|
-
|
43
41
|
type amount = { shipping: Integer, subtotal: Integer }
|
44
42
|
|
45
43
|
class Amount < TerminalShop::Internal::Type::BaseModel
|
@@ -48,8 +46,6 @@ module TerminalShop
|
|
48
46
|
attr_accessor subtotal: Integer
|
49
47
|
|
50
48
|
def initialize: (shipping: Integer, subtotal: Integer) -> void
|
51
|
-
|
52
|
-
def to_hash: -> TerminalShop::Models::OrderAPI::amount
|
53
49
|
end
|
54
50
|
|
55
51
|
type item =
|
@@ -83,8 +79,6 @@ module TerminalShop
|
|
83
79
|
?description: String,
|
84
80
|
?product_variant_id: String
|
85
81
|
) -> void
|
86
|
-
|
87
|
-
def to_hash: -> TerminalShop::Models::OrderAPI::item
|
88
82
|
end
|
89
83
|
|
90
84
|
type shipping =
|
@@ -132,15 +126,13 @@ module TerminalShop
|
|
132
126
|
?province: String,
|
133
127
|
?street2: String
|
134
128
|
) -> void
|
135
|
-
|
136
|
-
def to_hash: -> TerminalShop::Models::OrderAPI::shipping
|
137
129
|
end
|
138
130
|
|
139
131
|
type tracking =
|
140
132
|
{
|
141
133
|
number: String,
|
142
134
|
service: String,
|
143
|
-
status: TerminalShop::
|
135
|
+
status: TerminalShop::OrderAPI::Tracking::status,
|
144
136
|
status_details: String,
|
145
137
|
status_updated_at: String,
|
146
138
|
url: String
|
@@ -155,11 +147,11 @@ module TerminalShop
|
|
155
147
|
|
156
148
|
def service=: (String) -> String
|
157
149
|
|
158
|
-
attr_reader status: TerminalShop::
|
150
|
+
attr_reader status: TerminalShop::OrderAPI::Tracking::status?
|
159
151
|
|
160
152
|
def status=: (
|
161
|
-
TerminalShop::
|
162
|
-
) -> TerminalShop::
|
153
|
+
TerminalShop::OrderAPI::Tracking::status
|
154
|
+
) -> TerminalShop::OrderAPI::Tracking::status
|
163
155
|
|
164
156
|
attr_reader status_details: String?
|
165
157
|
|
@@ -176,14 +168,12 @@ module TerminalShop
|
|
176
168
|
def initialize: (
|
177
169
|
?number: String,
|
178
170
|
?service: String,
|
179
|
-
?status: TerminalShop::
|
171
|
+
?status: TerminalShop::OrderAPI::Tracking::status,
|
180
172
|
?status_details: String,
|
181
173
|
?status_updated_at: String,
|
182
174
|
?url: String
|
183
175
|
) -> void
|
184
176
|
|
185
|
-
def to_hash: -> TerminalShop::Models::OrderAPI::tracking
|
186
|
-
|
187
177
|
type status =
|
188
178
|
:PRE_TRANSIT | :TRANSIT | :DELIVERED | :RETURNED | :FAILURE | :UNKNOWN
|
189
179
|
|
@@ -197,7 +187,7 @@ module TerminalShop
|
|
197
187
|
FAILURE: :FAILURE
|
198
188
|
UNKNOWN: :UNKNOWN
|
199
189
|
|
200
|
-
def self?.values: -> ::Array[TerminalShop::
|
190
|
+
def self?.values: -> ::Array[TerminalShop::OrderAPI::Tracking::status]
|
201
191
|
end
|
202
192
|
end
|
203
193
|
end
|
@@ -1,13 +1,11 @@
|
|
1
1
|
module TerminalShop
|
2
2
|
module Models
|
3
|
-
type order_get_response = { data: TerminalShop::
|
3
|
+
type order_get_response = { data: TerminalShop::OrderAPI }
|
4
4
|
|
5
5
|
class OrderGetResponse < TerminalShop::Internal::Type::BaseModel
|
6
|
-
attr_accessor data: TerminalShop::
|
6
|
+
attr_accessor data: TerminalShop::OrderAPI
|
7
7
|
|
8
|
-
def initialize: (data: TerminalShop::
|
9
|
-
|
10
|
-
def to_hash: -> TerminalShop::Models::order_get_response
|
8
|
+
def initialize: (data: TerminalShop::OrderAPI) -> void
|
11
9
|
end
|
12
10
|
end
|
13
11
|
end
|
@@ -1,13 +1,11 @@
|
|
1
1
|
module TerminalShop
|
2
2
|
module Models
|
3
|
-
type order_list_response = { data: ::Array[TerminalShop::
|
3
|
+
type order_list_response = { data: ::Array[TerminalShop::OrderAPI] }
|
4
4
|
|
5
5
|
class OrderListResponse < TerminalShop::Internal::Type::BaseModel
|
6
|
-
attr_accessor data: ::Array[TerminalShop::
|
6
|
+
attr_accessor data: ::Array[TerminalShop::OrderAPI]
|
7
7
|
|
8
|
-
def initialize: (data: ::Array[TerminalShop::
|
9
|
-
|
10
|
-
def to_hash: -> TerminalShop::Models::order_list_response
|
8
|
+
def initialize: (data: ::Array[TerminalShop::OrderAPI]) -> void
|
11
9
|
end
|
12
10
|
end
|
13
11
|
end
|
@@ -5,10 +5,10 @@ module TerminalShop
|
|
5
5
|
id: String,
|
6
6
|
description: String,
|
7
7
|
name: String,
|
8
|
-
variants: ::Array[TerminalShop::
|
8
|
+
variants: ::Array[TerminalShop::ProductVariant],
|
9
9
|
order: Integer,
|
10
|
-
subscription: TerminalShop::
|
11
|
-
tags: TerminalShop::
|
10
|
+
subscription: TerminalShop::ProductAPI::subscription,
|
11
|
+
tags: TerminalShop::ProductAPI::Tags
|
12
12
|
}
|
13
13
|
|
14
14
|
class ProductAPI < TerminalShop::Internal::Type::BaseModel
|
@@ -18,36 +18,34 @@ module TerminalShop
|
|
18
18
|
|
19
19
|
attr_accessor name: String
|
20
20
|
|
21
|
-
attr_accessor variants: ::Array[TerminalShop::
|
21
|
+
attr_accessor variants: ::Array[TerminalShop::ProductVariant]
|
22
22
|
|
23
23
|
attr_reader order: Integer?
|
24
24
|
|
25
25
|
def order=: (Integer) -> Integer
|
26
26
|
|
27
|
-
attr_reader subscription: TerminalShop::
|
27
|
+
attr_reader subscription: TerminalShop::ProductAPI::subscription?
|
28
28
|
|
29
29
|
def subscription=: (
|
30
|
-
TerminalShop::
|
31
|
-
) -> TerminalShop::
|
30
|
+
TerminalShop::ProductAPI::subscription
|
31
|
+
) -> TerminalShop::ProductAPI::subscription
|
32
32
|
|
33
|
-
attr_reader tags: TerminalShop::
|
33
|
+
attr_reader tags: TerminalShop::ProductAPI::Tags?
|
34
34
|
|
35
35
|
def tags=: (
|
36
|
-
TerminalShop::
|
37
|
-
) -> TerminalShop::
|
36
|
+
TerminalShop::ProductAPI::Tags
|
37
|
+
) -> TerminalShop::ProductAPI::Tags
|
38
38
|
|
39
39
|
def initialize: (
|
40
40
|
id: String,
|
41
41
|
description: String,
|
42
42
|
name: String,
|
43
|
-
variants: ::Array[TerminalShop::
|
43
|
+
variants: ::Array[TerminalShop::ProductVariant],
|
44
44
|
?order: Integer,
|
45
|
-
?subscription: TerminalShop::
|
46
|
-
?tags: TerminalShop::
|
45
|
+
?subscription: TerminalShop::ProductAPI::subscription,
|
46
|
+
?tags: TerminalShop::ProductAPI::Tags
|
47
47
|
) -> void
|
48
48
|
|
49
|
-
def to_hash: -> TerminalShop::Models::product_api
|
50
|
-
|
51
49
|
type subscription = :allowed | :required
|
52
50
|
|
53
51
|
module Subscription
|
@@ -56,7 +54,7 @@ module TerminalShop
|
|
56
54
|
ALLOWED: :allowed
|
57
55
|
REQUIRED: :required
|
58
56
|
|
59
|
-
def self?.values: -> ::Array[TerminalShop::
|
57
|
+
def self?.values: -> ::Array[TerminalShop::ProductAPI::subscription]
|
60
58
|
end
|
61
59
|
|
62
60
|
type tags =
|
@@ -102,8 +100,6 @@ module TerminalShop
|
|
102
100
|
?market_global: bool,
|
103
101
|
?market_na: bool
|
104
102
|
) -> void
|
105
|
-
|
106
|
-
def to_hash: -> TerminalShop::Models::ProductAPI::tags
|
107
103
|
end
|
108
104
|
end
|
109
105
|
end
|
@@ -1,13 +1,11 @@
|
|
1
1
|
module TerminalShop
|
2
2
|
module Models
|
3
|
-
type product_get_response = { data: TerminalShop::
|
3
|
+
type product_get_response = { data: TerminalShop::ProductAPI }
|
4
4
|
|
5
5
|
class ProductGetResponse < TerminalShop::Internal::Type::BaseModel
|
6
|
-
attr_accessor data: TerminalShop::
|
6
|
+
attr_accessor data: TerminalShop::ProductAPI
|
7
7
|
|
8
|
-
def initialize: (data: TerminalShop::
|
9
|
-
|
10
|
-
def to_hash: -> TerminalShop::Models::product_get_response
|
8
|
+
def initialize: (data: TerminalShop::ProductAPI) -> void
|
11
9
|
end
|
12
10
|
end
|
13
11
|
end
|
@@ -1,14 +1,11 @@
|
|
1
1
|
module TerminalShop
|
2
2
|
module Models
|
3
|
-
type product_list_response =
|
4
|
-
{ data: ::Array[TerminalShop::Models::ProductAPI] }
|
3
|
+
type product_list_response = { data: ::Array[TerminalShop::ProductAPI] }
|
5
4
|
|
6
5
|
class ProductListResponse < TerminalShop::Internal::Type::BaseModel
|
7
|
-
attr_accessor data: ::Array[TerminalShop::
|
6
|
+
attr_accessor data: ::Array[TerminalShop::ProductAPI]
|
8
7
|
|
9
|
-
def initialize: (data: ::Array[TerminalShop::
|
10
|
-
|
11
|
-
def to_hash: -> TerminalShop::Models::product_list_response
|
8
|
+
def initialize: (data: ::Array[TerminalShop::ProductAPI]) -> void
|
12
9
|
end
|
13
10
|
end
|
14
11
|
end
|
@@ -6,7 +6,7 @@ module TerminalShop
|
|
6
6
|
name: String,
|
7
7
|
price: Integer,
|
8
8
|
description: String,
|
9
|
-
tags: TerminalShop::
|
9
|
+
tags: TerminalShop::ProductVariant::Tags
|
10
10
|
}
|
11
11
|
|
12
12
|
class ProductVariant < TerminalShop::Internal::Type::BaseModel
|
@@ -20,22 +20,20 @@ module TerminalShop
|
|
20
20
|
|
21
21
|
def description=: (String) -> String
|
22
22
|
|
23
|
-
attr_reader tags: TerminalShop::
|
23
|
+
attr_reader tags: TerminalShop::ProductVariant::Tags?
|
24
24
|
|
25
25
|
def tags=: (
|
26
|
-
TerminalShop::
|
27
|
-
) -> TerminalShop::
|
26
|
+
TerminalShop::ProductVariant::Tags
|
27
|
+
) -> TerminalShop::ProductVariant::Tags
|
28
28
|
|
29
29
|
def initialize: (
|
30
30
|
id: String,
|
31
31
|
name: String,
|
32
32
|
price: Integer,
|
33
33
|
?description: String,
|
34
|
-
?tags: TerminalShop::
|
34
|
+
?tags: TerminalShop::ProductVariant::Tags
|
35
35
|
) -> void
|
36
36
|
|
37
|
-
def to_hash: -> TerminalShop::Models::product_variant
|
38
|
-
|
39
37
|
type tags =
|
40
38
|
{ app: String, market_eu: bool, market_global: bool, market_na: bool }
|
41
39
|
|
@@ -62,8 +60,6 @@ module TerminalShop
|
|
62
60
|
?market_global: bool,
|
63
61
|
?market_na: bool
|
64
62
|
) -> void
|
65
|
-
|
66
|
-
def to_hash: -> TerminalShop::Models::ProductVariant::tags
|
67
63
|
end
|
68
64
|
end
|
69
65
|
end
|
@@ -1,13 +1,11 @@
|
|
1
1
|
module TerminalShop
|
2
2
|
module Models
|
3
|
-
type profile_api = { user: TerminalShop::
|
3
|
+
type profile_api = { user: TerminalShop::ProfileAPI::User }
|
4
4
|
|
5
5
|
class ProfileAPI < TerminalShop::Internal::Type::BaseModel
|
6
|
-
attr_accessor user: TerminalShop::
|
6
|
+
attr_accessor user: TerminalShop::ProfileAPI::User
|
7
7
|
|
8
|
-
def initialize: (user: TerminalShop::
|
9
|
-
|
10
|
-
def to_hash: -> TerminalShop::Models::profile_api
|
8
|
+
def initialize: (user: TerminalShop::ProfileAPI::User) -> void
|
11
9
|
|
12
10
|
type user =
|
13
11
|
{
|
@@ -36,8 +34,6 @@ module TerminalShop
|
|
36
34
|
name: String?,
|
37
35
|
stripe_customer_id: String
|
38
36
|
) -> void
|
39
|
-
|
40
|
-
def to_hash: -> TerminalShop::Models::ProfileAPI::user
|
41
37
|
end
|
42
38
|
end
|
43
39
|
end
|