terminal-shop 1.8.0 → 2.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 +16 -8
- data/lib/terminal-shop/client.rb +2 -1
- data/lib/terminal-shop/models/address_create_params.rb +1 -1
- data/lib/terminal-shop/models/address_delete_params.rb +1 -1
- data/lib/terminal-shop/models/address_get_params.rb +1 -1
- data/lib/terminal-shop/models/address_list_params.rb +1 -1
- data/lib/terminal-shop/models/app_create_params.rb +1 -1
- data/lib/terminal-shop/models/app_delete_params.rb +1 -1
- data/lib/terminal-shop/models/app_get_params.rb +1 -1
- data/lib/terminal-shop/models/app_list_params.rb +1 -1
- data/lib/terminal-shop/models/card_collect_params.rb +1 -1
- data/lib/terminal-shop/models/card_create_params.rb +1 -1
- data/lib/terminal-shop/models/card_delete_params.rb +1 -1
- data/lib/terminal-shop/models/card_get_params.rb +1 -1
- data/lib/terminal-shop/models/card_list_params.rb +1 -1
- data/lib/terminal-shop/models/cart_clear_params.rb +1 -1
- data/lib/terminal-shop/models/cart_convert_params.rb +1 -1
- data/lib/terminal-shop/models/cart_get_params.rb +1 -1
- data/lib/terminal-shop/models/cart_set_address_params.rb +1 -1
- data/lib/terminal-shop/models/cart_set_card_params.rb +1 -1
- data/lib/terminal-shop/models/cart_set_item_params.rb +1 -1
- data/lib/terminal-shop/models/email_create_params.rb +1 -1
- data/lib/terminal-shop/models/order_create_params.rb +1 -1
- data/lib/terminal-shop/models/order_get_params.rb +1 -1
- data/lib/terminal-shop/models/order_list_params.rb +1 -1
- data/lib/terminal-shop/models/product.rb +7 -3
- data/lib/terminal-shop/models/product_get_params.rb +1 -1
- data/lib/terminal-shop/models/product_list_params.rb +1 -1
- data/lib/terminal-shop/models/profile_me_params.rb +1 -1
- data/lib/terminal-shop/models/profile_update_params.rb +1 -1
- data/lib/terminal-shop/models/region.rb +7 -3
- data/lib/terminal-shop/models/subscription.rb +5 -7
- data/lib/terminal-shop/models/subscription_create_params.rb +1 -1
- data/lib/terminal-shop/models/subscription_delete_params.rb +1 -1
- data/lib/terminal-shop/models/subscription_get_params.rb +1 -1
- data/lib/terminal-shop/models/subscription_list_params.rb +1 -1
- data/lib/terminal-shop/models/token_create_params.rb +1 -1
- data/lib/terminal-shop/models/token_delete_params.rb +1 -1
- data/lib/terminal-shop/models/token_get_params.rb +1 -1
- data/lib/terminal-shop/models/token_list_params.rb +1 -1
- data/lib/terminal-shop/models/view_init_params.rb +1 -1
- data/lib/terminal-shop/request_options.rb +1 -34
- data/lib/terminal-shop/transport/base_client.rb +459 -0
- data/lib/terminal-shop/transport/pooled_net_requester.rb +182 -0
- data/lib/terminal-shop/type/array_of.rb +110 -0
- data/lib/terminal-shop/type/base_model.rb +362 -0
- data/lib/terminal-shop/type/base_page.rb +61 -0
- data/lib/terminal-shop/type/boolean_model.rb +52 -0
- data/lib/terminal-shop/type/converter.rb +217 -0
- data/lib/terminal-shop/type/enum.rb +101 -0
- data/lib/terminal-shop/type/hash_of.rb +136 -0
- data/lib/terminal-shop/type/request_parameters.rb +38 -0
- data/lib/terminal-shop/type/union.rb +183 -0
- data/lib/terminal-shop/type/unknown.rb +56 -0
- data/lib/terminal-shop/type.rb +23 -0
- data/lib/terminal-shop/util.rb +19 -12
- data/lib/terminal-shop/version.rb +1 -1
- data/lib/terminal-shop.rb +28 -5
- data/rbi/lib/terminal-shop/client.rbi +19 -31
- 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 +27 -48
- data/rbi/lib/terminal-shop/models/address_create_response.rbi +1 -6
- data/rbi/lib/terminal-shop/models/address_delete_params.rbi +2 -2
- data/rbi/lib/terminal-shop/models/address_delete_response.rbi +1 -6
- data/rbi/lib/terminal-shop/models/address_get_params.rbi +2 -2
- data/rbi/lib/terminal-shop/models/address_get_response.rbi +7 -6
- data/rbi/lib/terminal-shop/models/address_list_params.rbi +2 -2
- 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 +4 -14
- data/rbi/lib/terminal-shop/models/app_create_response.rbi +8 -20
- data/rbi/lib/terminal-shop/models/app_delete_params.rbi +2 -2
- data/rbi/lib/terminal-shop/models/app_delete_response.rbi +1 -6
- data/rbi/lib/terminal-shop/models/app_get_params.rbi +2 -2
- data/rbi/lib/terminal-shop/models/app_get_response.rbi +4 -6
- data/rbi/lib/terminal-shop/models/app_list_params.rbi +2 -2
- 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 +2 -2
- data/rbi/lib/terminal-shop/models/card_collect_response.rbi +7 -14
- data/rbi/lib/terminal-shop/models/card_create_params.rbi +3 -8
- data/rbi/lib/terminal-shop/models/card_create_response.rbi +1 -6
- data/rbi/lib/terminal-shop/models/card_delete_params.rbi +2 -2
- data/rbi/lib/terminal-shop/models/card_delete_response.rbi +1 -6
- data/rbi/lib/terminal-shop/models/card_get_params.rbi +2 -2
- data/rbi/lib/terminal-shop/models/card_get_response.rbi +4 -6
- data/rbi/lib/terminal-shop/models/card_list_params.rbi +2 -2
- 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 +2 -2
- data/rbi/lib/terminal-shop/models/cart_clear_response.rbi +1 -6
- data/rbi/lib/terminal-shop/models/cart_convert_params.rbi +2 -2
- data/rbi/lib/terminal-shop/models/cart_convert_response.rbi +4 -6
- data/rbi/lib/terminal-shop/models/cart_get_params.rbi +2 -2
- data/rbi/lib/terminal-shop/models/cart_get_response.rbi +4 -6
- data/rbi/lib/terminal-shop/models/cart_set_address_params.rbi +3 -8
- data/rbi/lib/terminal-shop/models/cart_set_address_response.rbi +1 -6
- data/rbi/lib/terminal-shop/models/cart_set_card_params.rbi +3 -8
- data/rbi/lib/terminal-shop/models/cart_set_card_response.rbi +1 -6
- data/rbi/lib/terminal-shop/models/cart_set_item_params.rbi +4 -14
- data/rbi/lib/terminal-shop/models/cart_set_item_response.rbi +4 -6
- data/rbi/lib/terminal-shop/models/email_create_params.rbi +3 -8
- 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 +5 -20
- data/rbi/lib/terminal-shop/models/order_create_response.rbi +1 -6
- data/rbi/lib/terminal-shop/models/order_get_params.rbi +2 -2
- data/rbi/lib/terminal-shop/models/order_get_response.rbi +4 -6
- data/rbi/lib/terminal-shop/models/order_list_params.rbi +2 -2
- 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 +2 -2
- data/rbi/lib/terminal-shop/models/product_get_response.rbi +7 -6
- data/rbi/lib/terminal-shop/models/product_list_params.rbi +2 -2
- 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 +2 -2
- data/rbi/lib/terminal-shop/models/profile_me_response.rbi +7 -6
- data/rbi/lib/terminal-shop/models/profile_update_params.rbi +4 -14
- 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 +2 -2
- data/rbi/lib/terminal-shop/models/subscription_create_response.rbi +1 -6
- data/rbi/lib/terminal-shop/models/subscription_delete_params.rbi +2 -2
- data/rbi/lib/terminal-shop/models/subscription_delete_response.rbi +1 -6
- data/rbi/lib/terminal-shop/models/subscription_get_params.rbi +2 -2
- data/rbi/lib/terminal-shop/models/subscription_get_response.rbi +7 -6
- data/rbi/lib/terminal-shop/models/subscription_list_params.rbi +2 -2
- 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 +2 -2
- data/rbi/lib/terminal-shop/models/token_create_response.rbi +8 -20
- data/rbi/lib/terminal-shop/models/token_delete_params.rbi +2 -2
- data/rbi/lib/terminal-shop/models/token_delete_response.rbi +1 -6
- data/rbi/lib/terminal-shop/models/token_get_params.rbi +2 -2
- data/rbi/lib/terminal-shop/models/token_get_response.rbi +4 -6
- data/rbi/lib/terminal-shop/models/token_list_params.rbi +2 -2
- data/rbi/lib/terminal-shop/models/token_list_response.rbi +4 -6
- data/rbi/lib/terminal-shop/models/view_init_params.rbi +2 -2
- data/rbi/lib/terminal-shop/models/view_init_response.rbi +44 -82
- data/rbi/lib/terminal-shop/request_options.rbi +8 -67
- 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/transport/base_client.rbi +208 -0
- data/rbi/lib/terminal-shop/transport/pooled_net_requester.rbi +64 -0
- data/rbi/lib/terminal-shop/type/array_of.rbi +82 -0
- data/rbi/lib/terminal-shop/type/base_model.rbi +194 -0
- data/rbi/lib/terminal-shop/type/base_page.rbi +38 -0
- data/rbi/lib/terminal-shop/type/boolean_model.rbi +41 -0
- data/rbi/lib/terminal-shop/type/converter.rbi +101 -0
- data/rbi/lib/terminal-shop/type/enum.rbi +58 -0
- data/rbi/lib/terminal-shop/type/hash_of.rbi +85 -0
- data/rbi/lib/terminal-shop/type/request_parameters.rbi +20 -0
- data/rbi/lib/terminal-shop/type/union.rbi +68 -0
- data/rbi/lib/terminal-shop/type/unknown.rbi +37 -0
- data/rbi/lib/terminal-shop/type.rbi +23 -0
- data/rbi/lib/terminal-shop/util.rbi +24 -13
- data/rbi/lib/terminal-shop/version.rbi +1 -1
- data/sig/terminal-shop/client.rbs +9 -9
- 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 +12 -17
- data/sig/terminal-shop/models/address_create_response.rbs +1 -6
- data/sig/terminal-shop/models/address_delete_params.rbs +2 -7
- data/sig/terminal-shop/models/address_delete_response.rbs +1 -6
- data/sig/terminal-shop/models/address_get_params.rbs +2 -7
- data/sig/terminal-shop/models/address_get_response.rbs +1 -6
- data/sig/terminal-shop/models/address_list_params.rbs +2 -7
- 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 +6 -11
- data/sig/terminal-shop/models/app_create_response.rbs +4 -12
- data/sig/terminal-shop/models/app_delete_params.rbs +2 -7
- data/sig/terminal-shop/models/app_delete_response.rbs +1 -6
- data/sig/terminal-shop/models/app_get_params.rbs +2 -6
- data/sig/terminal-shop/models/app_get_response.rbs +1 -5
- data/sig/terminal-shop/models/app_list_params.rbs +2 -6
- 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 +2 -7
- data/sig/terminal-shop/models/card_collect_response.rbs +4 -12
- data/sig/terminal-shop/models/card_create_params.rbs +5 -7
- data/sig/terminal-shop/models/card_create_response.rbs +1 -6
- data/sig/terminal-shop/models/card_delete_params.rbs +2 -7
- data/sig/terminal-shop/models/card_delete_response.rbs +1 -6
- data/sig/terminal-shop/models/card_get_params.rbs +2 -6
- data/sig/terminal-shop/models/card_get_response.rbs +1 -6
- data/sig/terminal-shop/models/card_list_params.rbs +2 -6
- 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 +2 -7
- data/sig/terminal-shop/models/cart_clear_response.rbs +1 -6
- data/sig/terminal-shop/models/cart_convert_params.rbs +2 -7
- data/sig/terminal-shop/models/cart_convert_response.rbs +1 -6
- data/sig/terminal-shop/models/cart_get_params.rbs +2 -6
- data/sig/terminal-shop/models/cart_get_response.rbs +1 -6
- data/sig/terminal-shop/models/cart_set_address_params.rbs +5 -10
- data/sig/terminal-shop/models/cart_set_address_response.rbs +1 -6
- data/sig/terminal-shop/models/cart_set_card_params.rbs +5 -7
- data/sig/terminal-shop/models/cart_set_card_response.rbs +1 -6
- data/sig/terminal-shop/models/cart_set_item_params.rbs +6 -11
- data/sig/terminal-shop/models/cart_set_item_response.rbs +1 -6
- data/sig/terminal-shop/models/email_create_params.rbs +5 -7
- 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 +7 -12
- data/sig/terminal-shop/models/order_create_response.rbs +1 -6
- data/sig/terminal-shop/models/order_get_params.rbs +2 -6
- data/sig/terminal-shop/models/order_get_response.rbs +1 -6
- data/sig/terminal-shop/models/order_list_params.rbs +2 -7
- 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 +2 -7
- data/sig/terminal-shop/models/product_get_response.rbs +1 -6
- data/sig/terminal-shop/models/product_list_params.rbs +2 -7
- 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 +2 -7
- data/sig/terminal-shop/models/profile_me_response.rbs +1 -6
- data/sig/terminal-shop/models/profile_update_params.rbs +6 -11
- 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 +2 -7
- data/sig/terminal-shop/models/subscription_create_response.rbs +1 -6
- data/sig/terminal-shop/models/subscription_delete_params.rbs +2 -7
- data/sig/terminal-shop/models/subscription_delete_response.rbs +1 -6
- data/sig/terminal-shop/models/subscription_get_params.rbs +2 -7
- data/sig/terminal-shop/models/subscription_get_response.rbs +1 -6
- data/sig/terminal-shop/models/subscription_list_params.rbs +2 -7
- 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 +2 -7
- data/sig/terminal-shop/models/token_create_response.rbs +4 -12
- data/sig/terminal-shop/models/token_delete_params.rbs +2 -7
- data/sig/terminal-shop/models/token_delete_response.rbs +1 -6
- data/sig/terminal-shop/models/token_get_params.rbs +2 -6
- data/sig/terminal-shop/models/token_get_response.rbs +1 -6
- data/sig/terminal-shop/models/token_list_params.rbs +2 -7
- data/sig/terminal-shop/models/token_list_response.rbs +1 -6
- data/sig/terminal-shop/models/view_init_params.rbs +2 -6
- data/sig/terminal-shop/models/view_init_response.rbs +15 -23
- data/sig/terminal-shop/request_options.rbs +2 -12
- 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/transport/base_client.rbs +110 -0
- data/sig/terminal-shop/transport/pooled_net_requester.rbs +39 -0
- data/sig/terminal-shop/type/array_of.rbs +36 -0
- data/sig/terminal-shop/type/base_model.rbs +73 -0
- data/sig/terminal-shop/type/base_page.rbs +22 -0
- data/sig/terminal-shop/type/boolean_model.rbs +18 -0
- data/sig/terminal-shop/type/converter.rbs +42 -0
- data/sig/terminal-shop/type/enum.rbs +22 -0
- data/sig/terminal-shop/type/hash_of.rbs +36 -0
- data/sig/terminal-shop/type/request_parameters.rbs +13 -0
- data/sig/terminal-shop/type/union.rbs +40 -0
- data/sig/terminal-shop/type/unknown.rbs +18 -0
- data/sig/terminal-shop/type.rbs +22 -0
- data/sig/terminal-shop/util.rbs +5 -5
- data/sig/terminal-shop/version.rbs +1 -1
- metadata +41 -17
- data/lib/terminal-shop/base_client.rb +0 -456
- data/lib/terminal-shop/base_model.rb +0 -1188
- data/lib/terminal-shop/base_page.rb +0 -60
- data/lib/terminal-shop/extern.rb +0 -7
- data/lib/terminal-shop/pooled_net_requester.rb +0 -169
- data/rbi/lib/terminal-shop/base_client.rbi +0 -198
- data/rbi/lib/terminal-shop/base_model.rbi +0 -622
- data/rbi/lib/terminal-shop/base_page.rbi +0 -38
- data/rbi/lib/terminal-shop/extern.rbi +0 -7
- data/rbi/lib/terminal-shop/pooled_net_requester.rbi +0 -48
- data/sig/terminal-shop/base_client.rbs +0 -108
- data/sig/terminal-shop/base_model.rbs +0 -246
- data/sig/terminal-shop/base_page.rbs +0 -20
- data/sig/terminal-shop/extern.rbs +0 -4
- data/sig/terminal-shop/pooled_net_requester.rbs +0 -35
@@ -1,43 +1,25 @@
|
|
1
1
|
module TerminalShop
|
2
2
|
module Resources
|
3
3
|
class App
|
4
|
-
def create:
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
name: String,
|
10
|
-
redirect_uri: String,
|
11
|
-
request_options: TerminalShop::request_opts
|
12
|
-
) -> TerminalShop::Models::AppCreateResponse
|
4
|
+
def create: (
|
5
|
+
name: String,
|
6
|
+
redirect_uri: String,
|
7
|
+
?request_options: TerminalShop::request_opts
|
8
|
+
) -> TerminalShop::Models::AppCreateResponse
|
13
9
|
|
14
|
-
def list:
|
15
|
-
|
16
|
-
|
17
|
-
) -> TerminalShop::Models::AppListResponse
|
18
|
-
| (
|
19
|
-
request_options: TerminalShop::request_opts
|
20
|
-
) -> TerminalShop::Models::AppListResponse
|
10
|
+
def list: (
|
11
|
+
?request_options: TerminalShop::request_opts
|
12
|
+
) -> TerminalShop::Models::AppListResponse
|
21
13
|
|
22
|
-
def delete:
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
) -> TerminalShop::Models::AppDeleteResponse
|
27
|
-
| (
|
28
|
-
String id,
|
29
|
-
request_options: TerminalShop::request_opts
|
30
|
-
) -> TerminalShop::Models::AppDeleteResponse
|
14
|
+
def delete: (
|
15
|
+
String id,
|
16
|
+
?request_options: TerminalShop::request_opts
|
17
|
+
) -> TerminalShop::Models::AppDeleteResponse
|
31
18
|
|
32
|
-
def get:
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
) -> TerminalShop::Models::AppGetResponse
|
37
|
-
| (
|
38
|
-
String id,
|
39
|
-
request_options: TerminalShop::request_opts
|
40
|
-
) -> TerminalShop::Models::AppGetResponse
|
19
|
+
def get: (
|
20
|
+
String id,
|
21
|
+
?request_options: TerminalShop::request_opts
|
22
|
+
) -> TerminalShop::Models::AppGetResponse
|
41
23
|
|
42
24
|
def initialize: (client: TerminalShop::Client) -> void
|
43
25
|
end
|
@@ -1,50 +1,28 @@
|
|
1
1
|
module TerminalShop
|
2
2
|
module Resources
|
3
3
|
class Card
|
4
|
-
def create:
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
| (
|
9
|
-
token: String,
|
10
|
-
request_options: TerminalShop::request_opts
|
11
|
-
) -> TerminalShop::Models::CardCreateResponse
|
4
|
+
def create: (
|
5
|
+
token: String,
|
6
|
+
?request_options: TerminalShop::request_opts
|
7
|
+
) -> TerminalShop::Models::CardCreateResponse
|
12
8
|
|
13
|
-
def list:
|
14
|
-
|
15
|
-
|
16
|
-
) -> TerminalShop::Models::CardListResponse
|
17
|
-
| (
|
18
|
-
request_options: TerminalShop::request_opts
|
19
|
-
) -> TerminalShop::Models::CardListResponse
|
9
|
+
def list: (
|
10
|
+
?request_options: TerminalShop::request_opts
|
11
|
+
) -> TerminalShop::Models::CardListResponse
|
20
12
|
|
21
|
-
def delete:
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
) -> TerminalShop::Models::CardDeleteResponse
|
26
|
-
| (
|
27
|
-
String id,
|
28
|
-
request_options: TerminalShop::request_opts
|
29
|
-
) -> TerminalShop::Models::CardDeleteResponse
|
13
|
+
def delete: (
|
14
|
+
String id,
|
15
|
+
?request_options: TerminalShop::request_opts
|
16
|
+
) -> TerminalShop::Models::CardDeleteResponse
|
30
17
|
|
31
|
-
def collect:
|
32
|
-
|
33
|
-
|
34
|
-
) -> TerminalShop::Models::CardCollectResponse
|
35
|
-
| (
|
36
|
-
request_options: TerminalShop::request_opts
|
37
|
-
) -> TerminalShop::Models::CardCollectResponse
|
18
|
+
def collect: (
|
19
|
+
?request_options: TerminalShop::request_opts
|
20
|
+
) -> TerminalShop::Models::CardCollectResponse
|
38
21
|
|
39
|
-
def get:
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
) -> TerminalShop::Models::CardGetResponse
|
44
|
-
| (
|
45
|
-
String id,
|
46
|
-
request_options: TerminalShop::request_opts
|
47
|
-
) -> TerminalShop::Models::CardGetResponse
|
22
|
+
def get: (
|
23
|
+
String id,
|
24
|
+
?request_options: TerminalShop::request_opts
|
25
|
+
) -> TerminalShop::Models::CardGetResponse
|
48
26
|
|
49
27
|
def initialize: (client: TerminalShop::Client) -> void
|
50
28
|
end
|
@@ -1,58 +1,33 @@
|
|
1
1
|
module TerminalShop
|
2
2
|
module Resources
|
3
3
|
class Cart
|
4
|
-
def clear:
|
5
|
-
|
6
|
-
|
7
|
-
) -> TerminalShop::Models::CartClearResponse
|
8
|
-
| (
|
9
|
-
request_options: TerminalShop::request_opts
|
10
|
-
) -> TerminalShop::Models::CartClearResponse
|
4
|
+
def clear: (
|
5
|
+
?request_options: TerminalShop::request_opts
|
6
|
+
) -> TerminalShop::Models::CartClearResponse
|
11
7
|
|
12
|
-
def convert:
|
13
|
-
|
14
|
-
|
15
|
-
) -> TerminalShop::Models::CartConvertResponse
|
16
|
-
| (
|
17
|
-
request_options: TerminalShop::request_opts
|
18
|
-
) -> TerminalShop::Models::CartConvertResponse
|
8
|
+
def convert: (
|
9
|
+
?request_options: TerminalShop::request_opts
|
10
|
+
) -> TerminalShop::Models::CartConvertResponse
|
19
11
|
|
20
|
-
def get:
|
21
|
-
|
22
|
-
|
23
|
-
) -> TerminalShop::Models::CartGetResponse
|
24
|
-
| (
|
25
|
-
request_options: TerminalShop::request_opts
|
26
|
-
) -> TerminalShop::Models::CartGetResponse
|
12
|
+
def get: (
|
13
|
+
?request_options: TerminalShop::request_opts
|
14
|
+
) -> TerminalShop::Models::CartGetResponse
|
27
15
|
|
28
|
-
def set_address:
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
) -> TerminalShop::Models::CartSetAddressResponse
|
33
|
-
| (
|
34
|
-
address_id: String,
|
35
|
-
request_options: TerminalShop::request_opts
|
36
|
-
) -> TerminalShop::Models::CartSetAddressResponse
|
16
|
+
def set_address: (
|
17
|
+
address_id: String,
|
18
|
+
?request_options: TerminalShop::request_opts
|
19
|
+
) -> TerminalShop::Models::CartSetAddressResponse
|
37
20
|
|
38
|
-
def set_card:
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
| (
|
43
|
-
card_id: String,
|
44
|
-
request_options: TerminalShop::request_opts
|
45
|
-
) -> TerminalShop::Models::CartSetCardResponse
|
21
|
+
def set_card: (
|
22
|
+
card_id: String,
|
23
|
+
?request_options: TerminalShop::request_opts
|
24
|
+
) -> TerminalShop::Models::CartSetCardResponse
|
46
25
|
|
47
|
-
def set_item:
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
product_variant_id: String,
|
53
|
-
quantity: Integer,
|
54
|
-
request_options: TerminalShop::request_opts
|
55
|
-
) -> TerminalShop::Models::CartSetItemResponse
|
26
|
+
def set_item: (
|
27
|
+
product_variant_id: String,
|
28
|
+
quantity: Integer,
|
29
|
+
?request_options: TerminalShop::request_opts
|
30
|
+
) -> TerminalShop::Models::CartSetItemResponse
|
56
31
|
|
57
32
|
def initialize: (client: TerminalShop::Client) -> void
|
58
33
|
end
|
@@ -1,14 +1,10 @@
|
|
1
1
|
module TerminalShop
|
2
2
|
module Resources
|
3
3
|
class Email
|
4
|
-
def create:
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
| (
|
9
|
-
email: String,
|
10
|
-
request_options: TerminalShop::request_opts
|
11
|
-
) -> TerminalShop::Models::EmailCreateResponse
|
4
|
+
def create: (
|
5
|
+
email: String,
|
6
|
+
?request_options: TerminalShop::request_opts
|
7
|
+
) -> TerminalShop::Models::EmailCreateResponse
|
12
8
|
|
13
9
|
def initialize: (client: TerminalShop::Client) -> void
|
14
10
|
end
|
@@ -1,34 +1,21 @@
|
|
1
1
|
module TerminalShop
|
2
2
|
module Resources
|
3
3
|
class Order
|
4
|
-
def create:
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
card_id: String,
|
11
|
-
variants: ::Hash[Symbol, Integer],
|
12
|
-
request_options: TerminalShop::request_opts
|
13
|
-
) -> TerminalShop::Models::OrderCreateResponse
|
4
|
+
def create: (
|
5
|
+
address_id: String,
|
6
|
+
card_id: String,
|
7
|
+
variants: ::Hash[Symbol, Integer],
|
8
|
+
?request_options: TerminalShop::request_opts
|
9
|
+
) -> TerminalShop::Models::OrderCreateResponse
|
14
10
|
|
15
|
-
def list:
|
16
|
-
|
17
|
-
|
18
|
-
) -> TerminalShop::Models::OrderListResponse
|
19
|
-
| (
|
20
|
-
request_options: TerminalShop::request_opts
|
21
|
-
) -> TerminalShop::Models::OrderListResponse
|
11
|
+
def list: (
|
12
|
+
?request_options: TerminalShop::request_opts
|
13
|
+
) -> TerminalShop::Models::OrderListResponse
|
22
14
|
|
23
|
-
def get:
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
) -> TerminalShop::Models::OrderGetResponse
|
28
|
-
| (
|
29
|
-
String id,
|
30
|
-
request_options: TerminalShop::request_opts
|
31
|
-
) -> TerminalShop::Models::OrderGetResponse
|
15
|
+
def get: (
|
16
|
+
String id,
|
17
|
+
?request_options: TerminalShop::request_opts
|
18
|
+
) -> TerminalShop::Models::OrderGetResponse
|
32
19
|
|
33
20
|
def initialize: (client: TerminalShop::Client) -> void
|
34
21
|
end
|
@@ -1,23 +1,14 @@
|
|
1
1
|
module TerminalShop
|
2
2
|
module Resources
|
3
3
|
class Product
|
4
|
-
def list:
|
5
|
-
|
6
|
-
|
7
|
-
) -> TerminalShop::Models::ProductListResponse
|
8
|
-
| (
|
9
|
-
request_options: TerminalShop::request_opts
|
10
|
-
) -> TerminalShop::Models::ProductListResponse
|
4
|
+
def list: (
|
5
|
+
?request_options: TerminalShop::request_opts
|
6
|
+
) -> TerminalShop::Models::ProductListResponse
|
11
7
|
|
12
|
-
def get:
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
) -> TerminalShop::Models::ProductGetResponse
|
17
|
-
| (
|
18
|
-
String id,
|
19
|
-
request_options: TerminalShop::request_opts
|
20
|
-
) -> TerminalShop::Models::ProductGetResponse
|
8
|
+
def get: (
|
9
|
+
String id,
|
10
|
+
?request_options: TerminalShop::request_opts
|
11
|
+
) -> TerminalShop::Models::ProductGetResponse
|
21
12
|
|
22
13
|
def initialize: (client: TerminalShop::Client) -> void
|
23
14
|
end
|
@@ -1,23 +1,15 @@
|
|
1
1
|
module TerminalShop
|
2
2
|
module Resources
|
3
3
|
class Profile
|
4
|
-
def update:
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
email: String,
|
10
|
-
name: String,
|
11
|
-
request_options: TerminalShop::request_opts
|
12
|
-
) -> TerminalShop::Models::ProfileUpdateResponse
|
4
|
+
def update: (
|
5
|
+
email: String,
|
6
|
+
name: String,
|
7
|
+
?request_options: TerminalShop::request_opts
|
8
|
+
) -> TerminalShop::Models::ProfileUpdateResponse
|
13
9
|
|
14
|
-
def me:
|
15
|
-
|
16
|
-
|
17
|
-
) -> TerminalShop::Models::ProfileMeResponse
|
18
|
-
| (
|
19
|
-
request_options: TerminalShop::request_opts
|
20
|
-
) -> TerminalShop::Models::ProfileMeResponse
|
10
|
+
def me: (
|
11
|
+
?request_options: TerminalShop::request_opts
|
12
|
+
) -> TerminalShop::Models::ProfileMeResponse
|
21
13
|
|
22
14
|
def initialize: (client: TerminalShop::Client) -> void
|
23
15
|
end
|
@@ -1,52 +1,30 @@
|
|
1
1
|
module TerminalShop
|
2
2
|
module Resources
|
3
3
|
class Subscription
|
4
|
-
def create:
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
quantity: Integer,
|
15
|
-
next_: String,
|
16
|
-
schedule: TerminalShop::Models::SubscriptionAPI::schedule,
|
17
|
-
request_options: TerminalShop::request_opts
|
18
|
-
) -> TerminalShop::Models::SubscriptionCreateResponse
|
4
|
+
def create: (
|
5
|
+
id: String,
|
6
|
+
address_id: String,
|
7
|
+
card_id: String,
|
8
|
+
product_variant_id: String,
|
9
|
+
quantity: Integer,
|
10
|
+
?next_: String,
|
11
|
+
?schedule: TerminalShop::Models::SubscriptionAPI::schedule,
|
12
|
+
?request_options: TerminalShop::request_opts
|
13
|
+
) -> TerminalShop::Models::SubscriptionCreateResponse
|
19
14
|
|
20
|
-
def list:
|
21
|
-
|
22
|
-
|
23
|
-
| ::Hash[Symbol, top] params
|
24
|
-
) -> TerminalShop::Models::SubscriptionListResponse
|
25
|
-
| (
|
26
|
-
request_options: TerminalShop::request_opts
|
27
|
-
) -> TerminalShop::Models::SubscriptionListResponse
|
15
|
+
def list: (
|
16
|
+
?request_options: TerminalShop::request_opts
|
17
|
+
) -> TerminalShop::Models::SubscriptionListResponse
|
28
18
|
|
29
|
-
def delete:
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
| ::Hash[Symbol, top] params
|
34
|
-
) -> TerminalShop::Models::SubscriptionDeleteResponse
|
35
|
-
| (
|
36
|
-
String id,
|
37
|
-
request_options: TerminalShop::request_opts
|
38
|
-
) -> TerminalShop::Models::SubscriptionDeleteResponse
|
19
|
+
def delete: (
|
20
|
+
String id,
|
21
|
+
?request_options: TerminalShop::request_opts
|
22
|
+
) -> TerminalShop::Models::SubscriptionDeleteResponse
|
39
23
|
|
40
|
-
def get:
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
| ::Hash[Symbol, top] params
|
45
|
-
) -> TerminalShop::Models::SubscriptionGetResponse
|
46
|
-
| (
|
47
|
-
String id,
|
48
|
-
request_options: TerminalShop::request_opts
|
49
|
-
) -> TerminalShop::Models::SubscriptionGetResponse
|
24
|
+
def get: (
|
25
|
+
String id,
|
26
|
+
?request_options: TerminalShop::request_opts
|
27
|
+
) -> TerminalShop::Models::SubscriptionGetResponse
|
50
28
|
|
51
29
|
def initialize: (client: TerminalShop::Client) -> void
|
52
30
|
end
|
@@ -1,41 +1,23 @@
|
|
1
1
|
module TerminalShop
|
2
2
|
module Resources
|
3
3
|
class Token
|
4
|
-
def create:
|
5
|
-
|
6
|
-
|
7
|
-
) -> TerminalShop::Models::TokenCreateResponse
|
8
|
-
| (
|
9
|
-
request_options: TerminalShop::request_opts
|
10
|
-
) -> TerminalShop::Models::TokenCreateResponse
|
4
|
+
def create: (
|
5
|
+
?request_options: TerminalShop::request_opts
|
6
|
+
) -> TerminalShop::Models::TokenCreateResponse
|
11
7
|
|
12
|
-
def list:
|
13
|
-
|
14
|
-
|
15
|
-
) -> TerminalShop::Models::TokenListResponse
|
16
|
-
| (
|
17
|
-
request_options: TerminalShop::request_opts
|
18
|
-
) -> TerminalShop::Models::TokenListResponse
|
8
|
+
def list: (
|
9
|
+
?request_options: TerminalShop::request_opts
|
10
|
+
) -> TerminalShop::Models::TokenListResponse
|
19
11
|
|
20
|
-
def delete:
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
) -> TerminalShop::Models::TokenDeleteResponse
|
25
|
-
| (
|
26
|
-
String id,
|
27
|
-
request_options: TerminalShop::request_opts
|
28
|
-
) -> TerminalShop::Models::TokenDeleteResponse
|
12
|
+
def delete: (
|
13
|
+
String id,
|
14
|
+
?request_options: TerminalShop::request_opts
|
15
|
+
) -> TerminalShop::Models::TokenDeleteResponse
|
29
16
|
|
30
|
-
def get:
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
) -> TerminalShop::Models::TokenGetResponse
|
35
|
-
| (
|
36
|
-
String id,
|
37
|
-
request_options: TerminalShop::request_opts
|
38
|
-
) -> TerminalShop::Models::TokenGetResponse
|
17
|
+
def get: (
|
18
|
+
String id,
|
19
|
+
?request_options: TerminalShop::request_opts
|
20
|
+
) -> TerminalShop::Models::TokenGetResponse
|
39
21
|
|
40
22
|
def initialize: (client: TerminalShop::Client) -> void
|
41
23
|
end
|
@@ -1,13 +1,9 @@
|
|
1
1
|
module TerminalShop
|
2
2
|
module Resources
|
3
3
|
class View
|
4
|
-
def init:
|
5
|
-
|
6
|
-
|
7
|
-
) -> TerminalShop::Models::ViewInitResponse
|
8
|
-
| (
|
9
|
-
request_options: TerminalShop::request_opts
|
10
|
-
) -> TerminalShop::Models::ViewInitResponse
|
4
|
+
def init: (
|
5
|
+
?request_options: TerminalShop::request_opts
|
6
|
+
) -> TerminalShop::Models::ViewInitResponse
|
11
7
|
|
12
8
|
def initialize: (client: TerminalShop::Client) -> void
|
13
9
|
end
|
@@ -0,0 +1,110 @@
|
|
1
|
+
module TerminalShop
|
2
|
+
module Transport
|
3
|
+
class BaseClient
|
4
|
+
type request_components =
|
5
|
+
{
|
6
|
+
method: Symbol,
|
7
|
+
path: String | ::Array[String],
|
8
|
+
query: ::Hash[String, (::Array[String] | String)?]?,
|
9
|
+
headers: ::Hash[String, (String
|
10
|
+
| Integer
|
11
|
+
| ::Array[(String | Integer)?])?]?,
|
12
|
+
body: top?,
|
13
|
+
unwrap: Symbol?,
|
14
|
+
page: Class?,
|
15
|
+
stream: Class?,
|
16
|
+
model: TerminalShop::Type::Converter::input?,
|
17
|
+
options: TerminalShop::request_opts?
|
18
|
+
}
|
19
|
+
|
20
|
+
type request_input =
|
21
|
+
{
|
22
|
+
method: Symbol,
|
23
|
+
url: URI::Generic,
|
24
|
+
headers: ::Hash[String, String],
|
25
|
+
body: top,
|
26
|
+
max_retries: Integer,
|
27
|
+
timeout: Float
|
28
|
+
}
|
29
|
+
|
30
|
+
MAX_REDIRECTS: 20
|
31
|
+
|
32
|
+
PLATFORM_HEADERS: ::Hash[String, String]
|
33
|
+
|
34
|
+
def self.validate!: (
|
35
|
+
TerminalShop::Transport::BaseClient::request_components req
|
36
|
+
) -> void
|
37
|
+
|
38
|
+
def self.should_retry?: (
|
39
|
+
Integer status,
|
40
|
+
headers: ::Hash[String, String]
|
41
|
+
) -> bool
|
42
|
+
|
43
|
+
def self.follow_redirect: (
|
44
|
+
TerminalShop::Transport::BaseClient::request_input request,
|
45
|
+
status: Integer,
|
46
|
+
response_headers: ::Hash[String, String]
|
47
|
+
) -> TerminalShop::Transport::BaseClient::request_input
|
48
|
+
|
49
|
+
def self.reap_connection!: (
|
50
|
+
Integer | TerminalShop::APIConnectionError status,
|
51
|
+
stream: Enumerable[String]?
|
52
|
+
) -> void
|
53
|
+
|
54
|
+
# @api private
|
55
|
+
attr_accessor requester: TerminalShop::Transport::PooledNetRequester
|
56
|
+
|
57
|
+
def initialize: (
|
58
|
+
base_url: String,
|
59
|
+
?timeout: Float,
|
60
|
+
?max_retries: Integer,
|
61
|
+
?initial_retry_delay: Float,
|
62
|
+
?max_retry_delay: Float,
|
63
|
+
?headers: ::Hash[String, (String
|
64
|
+
| Integer
|
65
|
+
| ::Array[(String | Integer)?])?],
|
66
|
+
?idempotency_header: String?
|
67
|
+
) -> void
|
68
|
+
|
69
|
+
private def auth_headers: -> ::Hash[String, String]
|
70
|
+
|
71
|
+
private def generate_idempotency_key: -> String
|
72
|
+
|
73
|
+
private def build_request: (
|
74
|
+
TerminalShop::Transport::BaseClient::request_components req,
|
75
|
+
TerminalShop::request_options opts
|
76
|
+
) -> TerminalShop::Transport::BaseClient::request_input
|
77
|
+
|
78
|
+
private def retry_delay: (
|
79
|
+
::Hash[String, String] headers,
|
80
|
+
retry_count: Integer
|
81
|
+
) -> Float
|
82
|
+
|
83
|
+
private def send_request: (
|
84
|
+
TerminalShop::Transport::BaseClient::request_input request,
|
85
|
+
redirect_count: Integer,
|
86
|
+
retry_count: Integer,
|
87
|
+
send_retry_header: bool
|
88
|
+
) -> [Integer, top, Enumerable[String]]
|
89
|
+
|
90
|
+
def request:
|
91
|
+
(
|
92
|
+
Symbol method,
|
93
|
+
String | ::Array[String] path,
|
94
|
+
?query: ::Hash[String, (::Array[String] | String)?]?,
|
95
|
+
?headers: ::Hash[String, (String
|
96
|
+
| Integer
|
97
|
+
| ::Array[(String | Integer)?])?]?,
|
98
|
+
?body: top?,
|
99
|
+
?unwrap: Symbol?,
|
100
|
+
?page: Class?,
|
101
|
+
?stream: Class?,
|
102
|
+
?model: TerminalShop::Type::Converter::input?,
|
103
|
+
?options: TerminalShop::request_opts?
|
104
|
+
) -> top
|
105
|
+
| (TerminalShop::Transport::BaseClient::request_components req) -> top
|
106
|
+
|
107
|
+
def inspect: -> String
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module TerminalShop
|
2
|
+
module Transport
|
3
|
+
class PooledNetRequester
|
4
|
+
type request =
|
5
|
+
{
|
6
|
+
method: Symbol,
|
7
|
+
url: URI::Generic,
|
8
|
+
headers: ::Hash[String, String],
|
9
|
+
body: top,
|
10
|
+
deadline: Float
|
11
|
+
}
|
12
|
+
|
13
|
+
KEEP_ALIVE_TIMEOUT: 30
|
14
|
+
|
15
|
+
def self.connect: (URI::Generic url) -> top
|
16
|
+
|
17
|
+
def self.calibrate_socket_timeout: (top conn, Float deadline) -> void
|
18
|
+
|
19
|
+
def self.build_request: (
|
20
|
+
TerminalShop::Transport::PooledNetRequester::request request
|
21
|
+
) {
|
22
|
+
(String arg0) -> void
|
23
|
+
} -> top
|
24
|
+
|
25
|
+
private def with_pool: (
|
26
|
+
URI::Generic url,
|
27
|
+
deadline: Float
|
28
|
+
) {
|
29
|
+
(top arg0) -> void
|
30
|
+
} -> void
|
31
|
+
|
32
|
+
def execute: (
|
33
|
+
TerminalShop::Transport::PooledNetRequester::request request
|
34
|
+
) -> [Integer, top, Enumerable[String]]
|
35
|
+
|
36
|
+
def initialize: (?size: Integer) -> void
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|