terminal-shop 2.1.3 → 3.5.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/.ignore +2 -0
- data/CHANGELOG.md +674 -0
- data/README.md +86 -26
- data/SECURITY.md +27 -0
- data/lib/{terminal-shop → terminal_shop}/client.rb +19 -24
- data/lib/terminal_shop/errors.rb +192 -0
- data/lib/terminal_shop/file_part.rb +55 -0
- data/lib/terminal_shop/internal/transport/base_client.rb +486 -0
- data/lib/terminal_shop/internal/transport/pooled_net_requester.rb +193 -0
- data/lib/terminal_shop/internal/type/array_of.rb +154 -0
- data/lib/terminal_shop/internal/type/base_model.rb +443 -0
- data/lib/terminal_shop/internal/type/base_page.rb +55 -0
- data/lib/terminal_shop/internal/type/boolean.rb +64 -0
- data/lib/terminal_shop/internal/type/converter.rb +274 -0
- data/lib/terminal_shop/internal/type/enum.rb +133 -0
- data/lib/terminal_shop/internal/type/file_input.rb +96 -0
- data/lib/terminal_shop/internal/type/hash_of.rb +174 -0
- data/lib/terminal_shop/internal/type/request_parameters.rb +48 -0
- data/lib/terminal_shop/internal/type/union.rb +220 -0
- data/lib/terminal_shop/internal/type/unknown.rb +68 -0
- data/lib/terminal_shop/internal/util.rb +790 -0
- data/lib/terminal_shop/internal.rb +11 -0
- data/lib/terminal_shop/models/address.rb +93 -0
- data/lib/terminal_shop/models/address_create_params.rb +78 -0
- data/lib/terminal_shop/models/address_create_response.rb +17 -0
- data/lib/terminal_shop/models/address_delete_params.rb +14 -0
- data/lib/terminal_shop/models/address_delete_response.rb +16 -0
- data/lib/terminal_shop/models/address_get_params.rb +14 -0
- data/lib/{terminal-shop → terminal_shop}/models/address_get_response.rb +4 -7
- data/lib/terminal_shop/models/address_list_params.rb +14 -0
- data/lib/terminal_shop/models/address_list_response.rb +17 -0
- data/lib/{terminal-shop → terminal_shop}/models/app.rb +14 -12
- data/lib/terminal_shop/models/app_create_params.rb +26 -0
- data/lib/{terminal-shop → terminal_shop}/models/app_create_response.rb +10 -15
- data/lib/terminal_shop/models/app_delete_params.rb +14 -0
- data/lib/terminal_shop/models/app_delete_response.rb +16 -0
- data/lib/terminal_shop/models/app_get_params.rb +14 -0
- data/lib/{terminal-shop → terminal_shop}/models/app_get_response.rb +4 -7
- data/lib/terminal_shop/models/app_list_params.rb +14 -0
- data/lib/terminal_shop/models/app_list_response.rb +17 -0
- data/lib/terminal_shop/models/card.rb +75 -0
- data/lib/terminal_shop/models/card_collect_params.rb +14 -0
- data/lib/terminal_shop/models/card_collect_response.rb +36 -0
- data/lib/terminal_shop/models/card_create_params.rb +27 -0
- data/lib/terminal_shop/models/card_create_response.rb +17 -0
- data/lib/terminal_shop/models/card_delete_params.rb +14 -0
- data/lib/terminal_shop/models/card_delete_response.rb +16 -0
- data/lib/terminal_shop/models/card_get_params.rb +14 -0
- data/lib/{terminal-shop → terminal_shop}/models/card_get_response.rb +4 -7
- data/lib/terminal_shop/models/card_list_params.rb +14 -0
- data/lib/terminal_shop/models/card_list_response.rb +17 -0
- data/lib/terminal_shop/models/cart.rb +150 -0
- data/lib/terminal_shop/models/cart_clear_params.rb +14 -0
- data/lib/terminal_shop/models/cart_clear_response.rb +16 -0
- data/lib/terminal_shop/models/cart_convert_params.rb +14 -0
- data/lib/{terminal-shop → terminal_shop}/models/cart_convert_response.rb +4 -7
- data/lib/terminal_shop/models/cart_get_params.rb +14 -0
- data/lib/{terminal-shop → terminal_shop}/models/cart_get_response.rb +4 -7
- data/lib/terminal_shop/models/cart_set_address_params.rb +22 -0
- data/lib/terminal_shop/models/cart_set_address_response.rb +16 -0
- data/lib/terminal_shop/models/cart_set_card_params.rb +22 -0
- data/lib/terminal_shop/models/cart_set_card_response.rb +16 -0
- data/lib/terminal_shop/models/cart_set_item_params.rb +30 -0
- data/lib/{terminal-shop → terminal_shop}/models/cart_set_item_response.rb +4 -7
- data/lib/terminal_shop/models/email_create_params.rb +22 -0
- data/lib/terminal_shop/models/email_create_response.rb +16 -0
- data/lib/terminal_shop/models/order.rb +278 -0
- data/lib/terminal_shop/models/order_create_params.rb +38 -0
- data/lib/terminal_shop/models/order_create_response.rb +17 -0
- data/lib/terminal_shop/models/order_get_params.rb +14 -0
- data/lib/{terminal-shop → terminal_shop}/models/order_get_response.rb +4 -7
- data/lib/terminal_shop/models/order_list_params.rb +14 -0
- data/lib/terminal_shop/models/order_list_response.rb +17 -0
- data/lib/terminal_shop/models/product.rb +125 -0
- data/lib/terminal_shop/models/product_get_params.rb +14 -0
- data/lib/{terminal-shop → terminal_shop}/models/product_get_response.rb +4 -7
- data/lib/terminal_shop/models/product_list_params.rb +14 -0
- data/lib/terminal_shop/models/product_list_response.rb +17 -0
- data/lib/terminal_shop/models/product_variant.rb +84 -0
- data/lib/{terminal-shop → terminal_shop}/models/profile.rb +22 -22
- data/lib/terminal_shop/models/profile_me_params.rb +14 -0
- data/lib/{terminal-shop → terminal_shop}/models/profile_me_response.rb +4 -7
- data/lib/terminal_shop/models/profile_update_params.rb +26 -0
- data/lib/{terminal-shop → terminal_shop}/models/profile_update_response.rb +4 -7
- data/lib/{terminal-shop → terminal_shop}/models/region.rb +4 -6
- data/lib/terminal_shop/models/subscription.rb +125 -0
- data/lib/terminal_shop/models/subscription_create_params.rb +14 -0
- data/lib/terminal_shop/models/subscription_create_response.rb +16 -0
- data/lib/terminal_shop/models/subscription_delete_params.rb +14 -0
- data/lib/terminal_shop/models/subscription_delete_response.rb +16 -0
- data/lib/terminal_shop/models/subscription_get_params.rb +14 -0
- data/lib/{terminal-shop → terminal_shop}/models/subscription_get_response.rb +4 -7
- data/lib/terminal_shop/models/subscription_list_params.rb +14 -0
- data/lib/terminal_shop/models/subscription_list_response.rb +17 -0
- data/lib/terminal_shop/models/subscription_update_params.rb +76 -0
- data/lib/terminal_shop/models/subscription_update_response.rb +17 -0
- data/lib/terminal_shop/models/token.rb +38 -0
- data/lib/terminal_shop/models/token_create_params.rb +14 -0
- data/lib/terminal_shop/models/token_create_response.rb +41 -0
- data/lib/terminal_shop/models/token_delete_params.rb +14 -0
- data/lib/terminal_shop/models/token_delete_response.rb +16 -0
- data/lib/terminal_shop/models/token_get_params.rb +14 -0
- data/lib/terminal_shop/models/token_get_response.rb +22 -0
- data/lib/terminal_shop/models/token_list_params.rb +14 -0
- data/lib/terminal_shop/models/token_list_response.rb +17 -0
- data/lib/terminal_shop/models/view_init_params.rb +14 -0
- data/lib/terminal_shop/models/view_init_response.rb +97 -0
- data/lib/{terminal-shop → terminal_shop}/request_options.rb +14 -15
- data/lib/{terminal-shop → terminal_shop}/resources/address.rb +28 -18
- data/lib/{terminal-shop → terminal_shop}/resources/app.rb +22 -14
- data/lib/{terminal-shop → terminal_shop}/resources/card.rb +30 -15
- data/lib/{terminal-shop → terminal_shop}/resources/cart.rb +30 -16
- data/lib/{terminal-shop → terminal_shop}/resources/email.rb +7 -3
- data/lib/{terminal-shop → terminal_shop}/resources/order.rb +18 -10
- data/lib/{terminal-shop → terminal_shop}/resources/product.rb +11 -5
- data/lib/{terminal-shop → terminal_shop}/resources/profile.rb +12 -8
- data/lib/terminal_shop/resources/subscription.rb +141 -0
- data/lib/{terminal-shop → terminal_shop}/resources/token.rb +20 -10
- data/lib/{terminal-shop → terminal_shop}/resources/view.rb +7 -3
- data/lib/{terminal-shop → terminal_shop}/version.rb +1 -1
- data/lib/terminal_shop.rb +144 -0
- data/rbi/lib/{terminal-shop → terminal_shop}/client.rbi +18 -19
- data/rbi/lib/terminal_shop/errors.rbi +143 -0
- data/rbi/lib/terminal_shop/file_part.rbi +34 -0
- data/rbi/lib/terminal_shop/internal/transport/base_client.rbi +213 -0
- data/rbi/lib/terminal_shop/internal/transport/pooled_net_requester.rbi +60 -0
- data/rbi/lib/terminal_shop/internal/type/array_of.rbi +88 -0
- data/rbi/lib/terminal_shop/internal/type/base_model.rbi +220 -0
- data/rbi/lib/terminal_shop/internal/type/base_page.rbi +38 -0
- data/rbi/lib/terminal_shop/internal/type/boolean.rbi +48 -0
- data/rbi/lib/terminal_shop/internal/type/converter.rbi +120 -0
- data/rbi/lib/terminal_shop/internal/type/enum.rbi +66 -0
- data/rbi/lib/terminal_shop/internal/type/file_input.rbi +50 -0
- data/rbi/lib/terminal_shop/internal/type/hash_of.rbi +88 -0
- data/rbi/lib/terminal_shop/internal/type/request_parameters.rbi +21 -0
- data/rbi/lib/terminal_shop/internal/type/union.rbi +80 -0
- data/rbi/lib/terminal_shop/internal/type/unknown.rbi +40 -0
- data/rbi/lib/terminal_shop/internal/util.rbi +302 -0
- data/rbi/lib/terminal_shop/internal.rbi +11 -0
- data/rbi/lib/{terminal-shop → terminal_shop}/models/address.rbi +30 -6
- data/rbi/lib/{terminal-shop → terminal_shop}/models/address_create_params.rbi +14 -9
- data/rbi/lib/{terminal-shop → terminal_shop}/models/address_create_response.rbi +6 -6
- data/rbi/lib/terminal_shop/models/address_delete_params.rbi +19 -0
- data/rbi/lib/{terminal-shop → terminal_shop}/models/address_delete_response.rbi +3 -5
- data/rbi/lib/terminal_shop/models/address_get_params.rbi +19 -0
- data/rbi/lib/{terminal-shop → terminal_shop}/models/address_get_response.rbi +8 -8
- data/rbi/lib/terminal_shop/models/address_list_params.rbi +19 -0
- data/rbi/lib/{terminal-shop → terminal_shop}/models/address_list_response.rbi +7 -7
- data/rbi/lib/{terminal-shop → terminal_shop}/models/app.rbi +12 -6
- data/rbi/lib/{terminal-shop → terminal_shop}/models/app_create_params.rbi +6 -8
- data/rbi/lib/{terminal-shop → terminal_shop}/models/app_create_response.rbi +13 -13
- data/rbi/lib/terminal_shop/models/app_delete_params.rbi +19 -0
- data/rbi/lib/{terminal-shop → terminal_shop}/models/app_delete_response.rbi +3 -5
- data/rbi/lib/terminal_shop/models/app_get_params.rbi +19 -0
- data/rbi/lib/terminal_shop/models/app_get_response.rbi +25 -0
- data/rbi/lib/terminal_shop/models/app_list_params.rbi +19 -0
- data/rbi/lib/{terminal-shop → terminal_shop}/models/app_list_response.rbi +7 -7
- data/rbi/lib/{terminal-shop → terminal_shop}/models/card.rbi +32 -15
- data/rbi/lib/terminal_shop/models/card_collect_params.rbi +19 -0
- data/rbi/lib/{terminal-shop → terminal_shop}/models/card_collect_response.rbi +16 -15
- data/rbi/lib/terminal_shop/models/card_create_params.rbi +31 -0
- data/rbi/lib/{terminal-shop → terminal_shop}/models/card_create_response.rbi +6 -6
- data/rbi/lib/terminal_shop/models/card_delete_params.rbi +19 -0
- data/rbi/lib/{terminal-shop → terminal_shop}/models/card_delete_response.rbi +3 -5
- data/rbi/lib/terminal_shop/models/card_get_params.rbi +19 -0
- data/rbi/lib/terminal_shop/models/card_get_response.rbi +25 -0
- data/rbi/lib/terminal_shop/models/card_list_params.rbi +19 -0
- data/rbi/lib/{terminal-shop → terminal_shop}/models/card_list_response.rbi +7 -7
- data/rbi/lib/{terminal-shop → terminal_shop}/models/cart.rbi +51 -29
- data/rbi/lib/terminal_shop/models/cart_clear_params.rbi +19 -0
- data/rbi/lib/{terminal-shop → terminal_shop}/models/cart_clear_response.rbi +3 -5
- data/rbi/lib/terminal_shop/models/cart_convert_params.rbi +19 -0
- data/rbi/lib/terminal_shop/models/cart_convert_response.rbi +25 -0
- data/rbi/lib/terminal_shop/models/cart_get_params.rbi +19 -0
- data/rbi/lib/terminal_shop/models/cart_get_response.rbi +25 -0
- data/rbi/lib/{terminal-shop → terminal_shop}/models/cart_set_address_params.rbi +10 -9
- data/rbi/lib/{terminal-shop → terminal_shop}/models/cart_set_address_response.rbi +3 -5
- data/rbi/lib/terminal_shop/models/cart_set_card_params.rbi +29 -0
- data/rbi/lib/{terminal-shop → terminal_shop}/models/cart_set_card_response.rbi +3 -5
- data/rbi/lib/{terminal-shop → terminal_shop}/models/cart_set_item_params.rbi +12 -9
- data/rbi/lib/terminal_shop/models/cart_set_item_response.rbi +25 -0
- data/rbi/lib/terminal_shop/models/email_create_params.rbi +29 -0
- data/rbi/lib/{terminal-shop → terminal_shop}/models/email_create_response.rbi +3 -5
- data/rbi/lib/{terminal-shop → terminal_shop}/models/order.rbi +149 -36
- data/rbi/lib/{terminal-shop → terminal_shop}/models/order_create_params.rbi +14 -9
- data/rbi/lib/{terminal-shop → terminal_shop}/models/order_create_response.rbi +6 -6
- data/rbi/lib/terminal_shop/models/order_get_params.rbi +19 -0
- data/rbi/lib/terminal_shop/models/order_get_response.rbi +25 -0
- data/rbi/lib/terminal_shop/models/order_list_params.rbi +19 -0
- data/rbi/lib/{terminal-shop → terminal_shop}/models/order_list_response.rbi +7 -7
- data/rbi/lib/{terminal-shop → terminal_shop}/models/product.rbi +44 -24
- data/rbi/lib/terminal_shop/models/product_get_params.rbi +19 -0
- data/rbi/lib/{terminal-shop → terminal_shop}/models/product_get_response.rbi +8 -8
- data/rbi/lib/terminal_shop/models/product_list_params.rbi +19 -0
- data/rbi/lib/{terminal-shop → terminal_shop}/models/product_list_response.rbi +7 -7
- data/rbi/lib/terminal_shop/models/product_variant.rbi +109 -0
- data/rbi/lib/{terminal-shop → terminal_shop}/models/profile.rbi +22 -14
- data/rbi/lib/terminal_shop/models/profile_me_params.rbi +19 -0
- data/rbi/lib/{terminal-shop → terminal_shop}/models/profile_me_response.rbi +8 -8
- data/rbi/lib/{terminal-shop → terminal_shop}/models/profile_update_params.rbi +6 -8
- data/rbi/lib/{terminal-shop → terminal_shop}/models/profile_update_response.rbi +8 -8
- data/rbi/lib/{terminal-shop → terminal_shop}/models/region.rbi +4 -4
- data/rbi/lib/{terminal-shop → terminal_shop}/models/subscription.rbi +44 -21
- data/rbi/lib/{terminal-shop → terminal_shop}/models/subscription_create_params.rbi +5 -7
- data/rbi/lib/{terminal-shop → terminal_shop}/models/subscription_create_response.rbi +3 -5
- data/rbi/lib/terminal_shop/models/subscription_delete_params.rbi +19 -0
- data/rbi/lib/{terminal-shop → terminal_shop}/models/subscription_delete_response.rbi +3 -5
- data/rbi/lib/terminal_shop/models/subscription_get_params.rbi +19 -0
- data/rbi/lib/{terminal-shop → terminal_shop}/models/subscription_get_response.rbi +8 -8
- data/rbi/lib/terminal_shop/models/subscription_list_params.rbi +19 -0
- data/rbi/lib/{terminal-shop → terminal_shop}/models/subscription_list_response.rbi +7 -7
- data/rbi/lib/terminal_shop/models/subscription_update_params.rbi +125 -0
- data/rbi/lib/terminal_shop/models/subscription_update_response.rbi +25 -0
- data/rbi/lib/{terminal-shop → terminal_shop}/models/token.rbi +11 -7
- data/rbi/lib/terminal_shop/models/token_create_params.rbi +19 -0
- data/rbi/lib/{terminal-shop → terminal_shop}/models/token_create_response.rbi +15 -14
- data/rbi/lib/terminal_shop/models/token_delete_params.rbi +19 -0
- data/rbi/lib/{terminal-shop → terminal_shop}/models/token_delete_response.rbi +3 -5
- data/rbi/lib/terminal_shop/models/token_get_params.rbi +19 -0
- data/rbi/lib/terminal_shop/models/token_get_response.rbi +27 -0
- data/rbi/lib/terminal_shop/models/token_list_params.rbi +19 -0
- data/rbi/lib/{terminal-shop → terminal_shop}/models/token_list_response.rbi +7 -7
- data/rbi/lib/terminal_shop/models/view_init_params.rbi +19 -0
- data/rbi/lib/{terminal-shop → terminal_shop}/models/view_init_response.rbi +25 -25
- data/rbi/lib/{terminal-shop → terminal_shop}/request_options.rbi +11 -13
- data/rbi/lib/{terminal-shop → terminal_shop}/resources/address.rbi +17 -17
- data/rbi/lib/{terminal-shop → terminal_shop}/resources/app.rbi +17 -16
- data/rbi/lib/{terminal-shop → terminal_shop}/resources/card.rbi +28 -22
- data/rbi/lib/{terminal-shop → terminal_shop}/resources/cart.rbi +35 -23
- data/rbi/lib/{terminal-shop → terminal_shop}/resources/email.rbi +4 -6
- data/rbi/lib/{terminal-shop → terminal_shop}/resources/order.rbi +15 -13
- data/rbi/lib/{terminal-shop → terminal_shop}/resources/product.rbi +13 -9
- data/rbi/lib/{terminal-shop → terminal_shop}/resources/profile.rbi +13 -8
- data/rbi/lib/{terminal-shop → terminal_shop}/resources/subscription.rbi +49 -17
- data/rbi/lib/{terminal-shop → terminal_shop}/resources/token.rbi +24 -16
- data/rbi/lib/{terminal-shop → terminal_shop}/resources/view.rbi +12 -6
- data/rbi/lib/{terminal-shop → terminal_shop}/version.rbi +1 -1
- data/sig/{terminal-shop → terminal_shop}/client.rbs +3 -3
- data/sig/terminal_shop/errors.rbs +101 -0
- data/sig/terminal_shop/file_part.rbs +21 -0
- data/sig/terminal_shop/internal/transport/base_client.rbs +116 -0
- data/sig/terminal_shop/internal/transport/pooled_net_requester.rbs +41 -0
- data/sig/terminal_shop/internal/type/array_of.rbs +45 -0
- data/sig/terminal_shop/internal/type/base_model.rbs +96 -0
- data/sig/terminal_shop/internal/type/base_page.rbs +24 -0
- data/sig/terminal_shop/internal/type/boolean.rbs +23 -0
- data/sig/terminal_shop/internal/type/converter.rbs +54 -0
- data/sig/terminal_shop/internal/type/enum.rbs +29 -0
- data/sig/terminal_shop/internal/type/file_input.rbs +23 -0
- data/sig/terminal_shop/internal/type/hash_of.rbs +45 -0
- data/sig/terminal_shop/internal/type/request_parameters.rbs +15 -0
- data/sig/terminal_shop/internal/type/union.rbs +49 -0
- data/sig/terminal_shop/internal/type/unknown.rbs +23 -0
- data/sig/terminal_shop/internal/util.rbs +158 -0
- data/sig/terminal_shop/internal.rbs +5 -0
- data/sig/{terminal-shop → terminal_shop}/models/address.rbs +5 -1
- data/sig/{terminal-shop → terminal_shop}/models/address_create_params.rbs +4 -4
- data/sig/{terminal-shop → terminal_shop}/models/address_create_response.rbs +1 -1
- data/sig/terminal_shop/models/address_delete_params.rbs +15 -0
- data/sig/{terminal-shop → terminal_shop}/models/address_delete_response.rbs +1 -1
- data/sig/terminal_shop/models/address_get_params.rbs +15 -0
- data/sig/{terminal-shop → terminal_shop}/models/address_get_response.rbs +1 -1
- data/sig/terminal_shop/models/address_list_params.rbs +15 -0
- data/sig/{terminal-shop → terminal_shop}/models/address_list_response.rbs +1 -1
- data/sig/{terminal-shop → terminal_shop}/models/app.rbs +1 -1
- data/sig/{terminal-shop → terminal_shop}/models/app_create_params.rbs +5 -4
- data/sig/{terminal-shop → terminal_shop}/models/app_create_response.rbs +2 -2
- data/sig/terminal_shop/models/app_delete_params.rbs +15 -0
- data/sig/{terminal-shop → terminal_shop}/models/app_delete_response.rbs +1 -1
- data/sig/terminal_shop/models/app_get_params.rbs +15 -0
- data/sig/{terminal-shop → terminal_shop}/models/app_get_response.rbs +1 -1
- data/sig/terminal_shop/models/app_list_params.rbs +15 -0
- data/sig/{terminal-shop → terminal_shop}/models/app_list_response.rbs +1 -1
- data/sig/{terminal-shop → terminal_shop}/models/card.rbs +6 -2
- data/sig/terminal_shop/models/card_collect_params.rbs +15 -0
- data/sig/{terminal-shop → terminal_shop}/models/card_collect_response.rbs +2 -2
- data/sig/{terminal-shop → terminal_shop}/models/card_create_params.rbs +4 -4
- data/sig/{terminal-shop → terminal_shop}/models/card_create_response.rbs +1 -1
- data/sig/terminal_shop/models/card_delete_params.rbs +15 -0
- data/sig/{terminal-shop → terminal_shop}/models/card_delete_response.rbs +1 -1
- data/sig/terminal_shop/models/card_get_params.rbs +15 -0
- data/sig/{terminal-shop → terminal_shop}/models/card_get_response.rbs +1 -1
- data/sig/terminal_shop/models/card_list_params.rbs +15 -0
- data/sig/{terminal-shop → terminal_shop}/models/card_list_response.rbs +1 -1
- data/sig/{terminal-shop → terminal_shop}/models/cart.rbs +4 -4
- data/sig/terminal_shop/models/cart_clear_params.rbs +15 -0
- data/sig/{terminal-shop → terminal_shop}/models/cart_clear_response.rbs +1 -1
- data/sig/terminal_shop/models/cart_convert_params.rbs +15 -0
- data/sig/{terminal-shop → terminal_shop}/models/cart_convert_response.rbs +1 -1
- data/sig/terminal_shop/models/cart_get_params.rbs +15 -0
- data/sig/{terminal-shop → terminal_shop}/models/cart_get_response.rbs +1 -1
- data/sig/{terminal-shop → terminal_shop}/models/cart_set_address_params.rbs +4 -4
- data/sig/{terminal-shop → terminal_shop}/models/cart_set_address_response.rbs +1 -1
- data/sig/{terminal-shop → terminal_shop}/models/cart_set_card_params.rbs +4 -4
- data/sig/{terminal-shop → terminal_shop}/models/cart_set_card_response.rbs +1 -1
- data/sig/{terminal-shop → terminal_shop}/models/cart_set_item_params.rbs +4 -4
- data/sig/{terminal-shop → terminal_shop}/models/cart_set_item_response.rbs +1 -1
- data/sig/{terminal-shop → terminal_shop}/models/email_create_params.rbs +4 -4
- data/sig/{terminal-shop → terminal_shop}/models/email_create_response.rbs +1 -1
- data/sig/{terminal-shop → terminal_shop}/models/order.rbs +51 -6
- data/sig/{terminal-shop → terminal_shop}/models/order_create_params.rbs +4 -4
- data/sig/{terminal-shop → terminal_shop}/models/order_create_response.rbs +1 -1
- data/sig/terminal_shop/models/order_get_params.rbs +15 -0
- data/sig/{terminal-shop → terminal_shop}/models/order_get_response.rbs +1 -1
- data/sig/terminal_shop/models/order_list_params.rbs +15 -0
- data/sig/{terminal-shop → terminal_shop}/models/order_list_response.rbs +1 -1
- data/sig/{terminal-shop → terminal_shop}/models/product.rbs +9 -3
- data/sig/terminal_shop/models/product_get_params.rbs +15 -0
- data/sig/{terminal-shop → terminal_shop}/models/product_get_response.rbs +1 -1
- data/sig/terminal_shop/models/product_list_params.rbs +15 -0
- data/sig/{terminal-shop → terminal_shop}/models/product_list_response.rbs +1 -1
- data/sig/terminal_shop/models/product_variant.rbs +70 -0
- data/sig/{terminal-shop → terminal_shop}/models/profile.rbs +2 -2
- data/sig/terminal_shop/models/profile_me_params.rbs +15 -0
- data/sig/{terminal-shop → terminal_shop}/models/profile_me_response.rbs +1 -1
- data/sig/{terminal-shop → terminal_shop}/models/profile_update_params.rbs +5 -4
- data/sig/{terminal-shop → terminal_shop}/models/profile_update_response.rbs +1 -1
- data/sig/{terminal-shop → terminal_shop}/models/region.rbs +3 -2
- data/sig/{terminal-shop → terminal_shop}/models/subscription.rbs +12 -4
- data/sig/{terminal-shop → terminal_shop}/models/subscription_create_params.rbs +4 -3
- data/sig/{terminal-shop → terminal_shop}/models/subscription_create_response.rbs +1 -1
- data/sig/terminal_shop/models/subscription_delete_params.rbs +15 -0
- data/sig/{terminal-shop → terminal_shop}/models/subscription_delete_response.rbs +1 -1
- data/sig/terminal_shop/models/subscription_get_params.rbs +15 -0
- data/sig/{terminal-shop → terminal_shop}/models/subscription_get_response.rbs +1 -1
- data/sig/terminal_shop/models/subscription_list_params.rbs +15 -0
- data/sig/{terminal-shop → terminal_shop}/models/subscription_list_response.rbs +1 -1
- data/sig/terminal_shop/models/subscription_update_params.rbs +71 -0
- data/sig/terminal_shop/models/subscription_update_response.rbs +14 -0
- data/sig/{terminal-shop → terminal_shop}/models/token.rbs +1 -1
- data/sig/terminal_shop/models/token_create_params.rbs +15 -0
- data/sig/{terminal-shop → terminal_shop}/models/token_create_response.rbs +2 -2
- data/sig/terminal_shop/models/token_delete_params.rbs +15 -0
- data/sig/{terminal-shop → terminal_shop}/models/token_delete_response.rbs +1 -1
- data/sig/terminal_shop/models/token_get_params.rbs +15 -0
- data/sig/{terminal-shop → terminal_shop}/models/token_get_response.rbs +1 -1
- data/sig/terminal_shop/models/token_list_params.rbs +15 -0
- data/sig/{terminal-shop → terminal_shop}/models/token_list_response.rbs +1 -1
- data/sig/terminal_shop/models/view_init_params.rbs +15 -0
- data/sig/{terminal-shop → terminal_shop}/models/view_init_response.rbs +2 -2
- data/sig/{terminal-shop → terminal_shop}/request_options.rbs +1 -1
- data/sig/{terminal-shop → terminal_shop}/resources/subscription.rbs +10 -0
- data/sig/{terminal-shop → terminal_shop}/version.rbs +1 -1
- metadata +354 -339
- data/lib/terminal-shop/errors.rb +0 -183
- data/lib/terminal-shop/models/address.rb +0 -90
- data/lib/terminal-shop/models/address_create_params.rb +0 -86
- data/lib/terminal-shop/models/address_create_response.rb +0 -20
- data/lib/terminal-shop/models/address_delete_params.rb +0 -18
- data/lib/terminal-shop/models/address_delete_response.rb +0 -19
- data/lib/terminal-shop/models/address_get_params.rb +0 -18
- data/lib/terminal-shop/models/address_list_params.rb +0 -18
- data/lib/terminal-shop/models/address_list_response.rb +0 -20
- data/lib/terminal-shop/models/app_create_params.rb +0 -30
- data/lib/terminal-shop/models/app_delete_params.rb +0 -18
- data/lib/terminal-shop/models/app_delete_response.rb +0 -19
- data/lib/terminal-shop/models/app_get_params.rb +0 -18
- data/lib/terminal-shop/models/app_list_params.rb +0 -18
- data/lib/terminal-shop/models/app_list_response.rb +0 -20
- data/lib/terminal-shop/models/card.rb +0 -67
- data/lib/terminal-shop/models/card_collect_params.rb +0 -18
- data/lib/terminal-shop/models/card_collect_response.rb +0 -38
- data/lib/terminal-shop/models/card_create_params.rb +0 -26
- data/lib/terminal-shop/models/card_create_response.rb +0 -20
- data/lib/terminal-shop/models/card_delete_params.rb +0 -18
- data/lib/terminal-shop/models/card_delete_response.rb +0 -19
- data/lib/terminal-shop/models/card_get_params.rb +0 -18
- data/lib/terminal-shop/models/card_list_params.rb +0 -18
- data/lib/terminal-shop/models/card_list_response.rb +0 -20
- data/lib/terminal-shop/models/cart.rb +0 -178
- data/lib/terminal-shop/models/cart_clear_params.rb +0 -18
- data/lib/terminal-shop/models/cart_clear_response.rb +0 -19
- data/lib/terminal-shop/models/cart_convert_params.rb +0 -18
- data/lib/terminal-shop/models/cart_get_params.rb +0 -18
- data/lib/terminal-shop/models/cart_set_address_params.rb +0 -25
- data/lib/terminal-shop/models/cart_set_address_response.rb +0 -19
- data/lib/terminal-shop/models/cart_set_card_params.rb +0 -25
- data/lib/terminal-shop/models/cart_set_card_response.rb +0 -19
- data/lib/terminal-shop/models/cart_set_item_params.rb +0 -32
- data/lib/terminal-shop/models/email_create_params.rb +0 -25
- data/lib/terminal-shop/models/email_create_response.rb +0 -19
- data/lib/terminal-shop/models/order.rb +0 -257
- data/lib/terminal-shop/models/order_create_params.rb +0 -39
- data/lib/terminal-shop/models/order_create_response.rb +0 -20
- data/lib/terminal-shop/models/order_get_params.rb +0 -18
- data/lib/terminal-shop/models/order_list_params.rb +0 -18
- data/lib/terminal-shop/models/order_list_response.rb +0 -20
- data/lib/terminal-shop/models/product.rb +0 -150
- data/lib/terminal-shop/models/product_get_params.rb +0 -18
- data/lib/terminal-shop/models/product_list_params.rb +0 -18
- data/lib/terminal-shop/models/product_list_response.rb +0 -20
- data/lib/terminal-shop/models/product_variant.rb +0 -36
- data/lib/terminal-shop/models/profile_me_params.rb +0 -18
- data/lib/terminal-shop/models/profile_update_params.rb +0 -30
- data/lib/terminal-shop/models/subscription.rb +0 -119
- data/lib/terminal-shop/models/subscription_create_params.rb +0 -18
- data/lib/terminal-shop/models/subscription_create_response.rb +0 -19
- data/lib/terminal-shop/models/subscription_delete_params.rb +0 -18
- data/lib/terminal-shop/models/subscription_delete_response.rb +0 -19
- data/lib/terminal-shop/models/subscription_get_params.rb +0 -18
- data/lib/terminal-shop/models/subscription_list_params.rb +0 -18
- data/lib/terminal-shop/models/subscription_list_response.rb +0 -20
- data/lib/terminal-shop/models/token.rb +0 -37
- data/lib/terminal-shop/models/token_create_params.rb +0 -18
- data/lib/terminal-shop/models/token_create_response.rb +0 -42
- data/lib/terminal-shop/models/token_delete_params.rb +0 -18
- data/lib/terminal-shop/models/token_delete_response.rb +0 -19
- data/lib/terminal-shop/models/token_get_params.rb +0 -18
- data/lib/terminal-shop/models/token_get_response.rb +0 -21
- data/lib/terminal-shop/models/token_list_params.rb +0 -18
- data/lib/terminal-shop/models/token_list_response.rb +0 -20
- data/lib/terminal-shop/models/view_init_params.rb +0 -18
- data/lib/terminal-shop/models/view_init_response.rb +0 -93
- data/lib/terminal-shop/resources/subscription.rb +0 -96
- data/lib/terminal-shop/transport/base_client.rb +0 -459
- data/lib/terminal-shop/transport/pooled_net_requester.rb +0 -182
- data/lib/terminal-shop/type/array_of.rb +0 -112
- data/lib/terminal-shop/type/base_model.rb +0 -364
- data/lib/terminal-shop/type/base_page.rb +0 -61
- data/lib/terminal-shop/type/boolean_model.rb +0 -52
- data/lib/terminal-shop/type/converter.rb +0 -217
- data/lib/terminal-shop/type/enum.rb +0 -101
- data/lib/terminal-shop/type/hash_of.rb +0 -138
- data/lib/terminal-shop/type/request_parameters.rb +0 -38
- data/lib/terminal-shop/type/union.rb +0 -185
- data/lib/terminal-shop/type/unknown.rb +0 -56
- data/lib/terminal-shop/type.rb +0 -23
- data/lib/terminal-shop/util.rb +0 -726
- data/lib/terminal-shop.rb +0 -149
- data/rbi/lib/terminal-shop/errors.rbi +0 -144
- data/rbi/lib/terminal-shop/models/address_delete_params.rbi +0 -21
- data/rbi/lib/terminal-shop/models/address_get_params.rbi +0 -21
- data/rbi/lib/terminal-shop/models/address_list_params.rbi +0 -21
- data/rbi/lib/terminal-shop/models/app_delete_params.rbi +0 -21
- data/rbi/lib/terminal-shop/models/app_get_params.rbi +0 -21
- data/rbi/lib/terminal-shop/models/app_get_response.rbi +0 -22
- data/rbi/lib/terminal-shop/models/app_list_params.rbi +0 -21
- data/rbi/lib/terminal-shop/models/card_collect_params.rbi +0 -21
- data/rbi/lib/terminal-shop/models/card_create_params.rbi +0 -32
- data/rbi/lib/terminal-shop/models/card_delete_params.rbi +0 -21
- data/rbi/lib/terminal-shop/models/card_get_params.rbi +0 -21
- data/rbi/lib/terminal-shop/models/card_get_response.rbi +0 -22
- data/rbi/lib/terminal-shop/models/card_list_params.rbi +0 -21
- data/rbi/lib/terminal-shop/models/cart_clear_params.rbi +0 -21
- data/rbi/lib/terminal-shop/models/cart_convert_params.rbi +0 -21
- data/rbi/lib/terminal-shop/models/cart_convert_response.rbi +0 -22
- data/rbi/lib/terminal-shop/models/cart_get_params.rbi +0 -21
- data/rbi/lib/terminal-shop/models/cart_get_response.rbi +0 -22
- data/rbi/lib/terminal-shop/models/cart_set_card_params.rbi +0 -31
- data/rbi/lib/terminal-shop/models/cart_set_item_response.rbi +0 -22
- data/rbi/lib/terminal-shop/models/email_create_params.rbi +0 -31
- data/rbi/lib/terminal-shop/models/order_get_params.rbi +0 -21
- data/rbi/lib/terminal-shop/models/order_get_response.rbi +0 -22
- data/rbi/lib/terminal-shop/models/order_list_params.rbi +0 -21
- data/rbi/lib/terminal-shop/models/product_get_params.rbi +0 -21
- data/rbi/lib/terminal-shop/models/product_list_params.rbi +0 -21
- data/rbi/lib/terminal-shop/models/product_variant.rbi +0 -28
- data/rbi/lib/terminal-shop/models/profile_me_params.rbi +0 -21
- data/rbi/lib/terminal-shop/models/subscription_delete_params.rbi +0 -21
- data/rbi/lib/terminal-shop/models/subscription_get_params.rbi +0 -21
- data/rbi/lib/terminal-shop/models/subscription_list_params.rbi +0 -21
- data/rbi/lib/terminal-shop/models/token_create_params.rbi +0 -21
- data/rbi/lib/terminal-shop/models/token_delete_params.rbi +0 -21
- data/rbi/lib/terminal-shop/models/token_get_params.rbi +0 -21
- data/rbi/lib/terminal-shop/models/token_get_response.rbi +0 -23
- data/rbi/lib/terminal-shop/models/token_list_params.rbi +0 -21
- data/rbi/lib/terminal-shop/models/view_init_params.rbi +0 -21
- data/rbi/lib/terminal-shop/transport/base_client.rbi +0 -208
- data/rbi/lib/terminal-shop/transport/pooled_net_requester.rbi +0 -64
- data/rbi/lib/terminal-shop/type/array_of.rbi +0 -82
- data/rbi/lib/terminal-shop/type/base_model.rbi +0 -194
- data/rbi/lib/terminal-shop/type/base_page.rbi +0 -38
- data/rbi/lib/terminal-shop/type/boolean_model.rbi +0 -41
- data/rbi/lib/terminal-shop/type/converter.rbi +0 -101
- data/rbi/lib/terminal-shop/type/enum.rbi +0 -58
- data/rbi/lib/terminal-shop/type/hash_of.rbi +0 -85
- data/rbi/lib/terminal-shop/type/request_parameters.rbi +0 -20
- data/rbi/lib/terminal-shop/type/union.rbi +0 -68
- data/rbi/lib/terminal-shop/type/unknown.rbi +0 -37
- data/rbi/lib/terminal-shop/type.rbi +0 -23
- data/rbi/lib/terminal-shop/util.rbi +0 -281
- data/sig/terminal-shop/errors.rbs +0 -99
- data/sig/terminal-shop/models/address_delete_params.rbs +0 -14
- data/sig/terminal-shop/models/address_get_params.rbs +0 -14
- data/sig/terminal-shop/models/address_list_params.rbs +0 -14
- data/sig/terminal-shop/models/app_delete_params.rbs +0 -14
- data/sig/terminal-shop/models/app_get_params.rbs +0 -14
- data/sig/terminal-shop/models/app_list_params.rbs +0 -14
- data/sig/terminal-shop/models/card_collect_params.rbs +0 -14
- data/sig/terminal-shop/models/card_delete_params.rbs +0 -14
- data/sig/terminal-shop/models/card_get_params.rbs +0 -14
- data/sig/terminal-shop/models/card_list_params.rbs +0 -14
- data/sig/terminal-shop/models/cart_clear_params.rbs +0 -14
- data/sig/terminal-shop/models/cart_convert_params.rbs +0 -14
- data/sig/terminal-shop/models/cart_get_params.rbs +0 -14
- data/sig/terminal-shop/models/order_get_params.rbs +0 -14
- data/sig/terminal-shop/models/order_list_params.rbs +0 -14
- data/sig/terminal-shop/models/product_get_params.rbs +0 -14
- data/sig/terminal-shop/models/product_list_params.rbs +0 -14
- data/sig/terminal-shop/models/product_variant.rbs +0 -17
- data/sig/terminal-shop/models/profile_me_params.rbs +0 -14
- data/sig/terminal-shop/models/subscription_delete_params.rbs +0 -14
- data/sig/terminal-shop/models/subscription_get_params.rbs +0 -14
- data/sig/terminal-shop/models/subscription_list_params.rbs +0 -14
- data/sig/terminal-shop/models/token_create_params.rbs +0 -14
- data/sig/terminal-shop/models/token_delete_params.rbs +0 -14
- data/sig/terminal-shop/models/token_get_params.rbs +0 -14
- data/sig/terminal-shop/models/token_list_params.rbs +0 -14
- data/sig/terminal-shop/models/view_init_params.rbs +0 -14
- data/sig/terminal-shop/transport/base_client.rbs +0 -110
- data/sig/terminal-shop/transport/pooled_net_requester.rbs +0 -39
- data/sig/terminal-shop/type/array_of.rbs +0 -36
- data/sig/terminal-shop/type/base_model.rbs +0 -73
- data/sig/terminal-shop/type/base_page.rbs +0 -22
- data/sig/terminal-shop/type/boolean_model.rbs +0 -18
- data/sig/terminal-shop/type/converter.rbs +0 -42
- data/sig/terminal-shop/type/enum.rbs +0 -22
- data/sig/terminal-shop/type/hash_of.rbs +0 -36
- data/sig/terminal-shop/type/request_parameters.rbs +0 -13
- data/sig/terminal-shop/type/union.rbs +0 -40
- data/sig/terminal-shop/type/unknown.rbs +0 -18
- data/sig/terminal-shop/type.rbs +0 -22
- data/sig/terminal-shop/util.rbs +0 -136
- /data/sig/{terminal-shop → terminal_shop}/resources/address.rbs +0 -0
- /data/sig/{terminal-shop → terminal_shop}/resources/app.rbs +0 -0
- /data/sig/{terminal-shop → terminal_shop}/resources/card.rbs +0 -0
- /data/sig/{terminal-shop → terminal_shop}/resources/cart.rbs +0 -0
- /data/sig/{terminal-shop → terminal_shop}/resources/email.rbs +0 -0
- /data/sig/{terminal-shop → terminal_shop}/resources/order.rbs +0 -0
- /data/sig/{terminal-shop → terminal_shop}/resources/product.rbs +0 -0
- /data/sig/{terminal-shop → terminal_shop}/resources/profile.rbs +0 -0
- /data/sig/{terminal-shop → terminal_shop}/resources/token.rbs +0 -0
- /data/sig/{terminal-shop → terminal_shop}/resources/view.rbs +0 -0
data/lib/terminal-shop/errors.rb
DELETED
@@ -1,183 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module TerminalShop
|
4
|
-
class Error < StandardError
|
5
|
-
# @!parse
|
6
|
-
# # @return [StandardError, nil]
|
7
|
-
# attr_accessor :cause
|
8
|
-
end
|
9
|
-
|
10
|
-
class ConversionError < TerminalShop::Error
|
11
|
-
end
|
12
|
-
|
13
|
-
class APIError < TerminalShop::Error
|
14
|
-
# @return [URI::Generic]
|
15
|
-
attr_accessor :url
|
16
|
-
|
17
|
-
# @return [Integer, nil]
|
18
|
-
attr_accessor :status
|
19
|
-
|
20
|
-
# @return [Object, nil]
|
21
|
-
attr_accessor :body
|
22
|
-
|
23
|
-
# @api private
|
24
|
-
#
|
25
|
-
# @param url [URI::Generic]
|
26
|
-
# @param status [Integer, nil]
|
27
|
-
# @param body [Object, nil]
|
28
|
-
# @param request [nil]
|
29
|
-
# @param response [nil]
|
30
|
-
# @param message [String, nil]
|
31
|
-
def initialize(url:, status: nil, body: nil, request: nil, response: nil, message: nil)
|
32
|
-
@url = url
|
33
|
-
@status = status
|
34
|
-
@body = body
|
35
|
-
@request = request
|
36
|
-
@response = response
|
37
|
-
super(message)
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
class APIConnectionError < TerminalShop::APIError
|
42
|
-
# @!parse
|
43
|
-
# # @return [nil]
|
44
|
-
# attr_accessor :status
|
45
|
-
|
46
|
-
# @!parse
|
47
|
-
# # @return [nil]
|
48
|
-
# attr_accessor :body
|
49
|
-
|
50
|
-
# @api private
|
51
|
-
#
|
52
|
-
# @param url [URI::Generic]
|
53
|
-
# @param status [nil]
|
54
|
-
# @param body [nil]
|
55
|
-
# @param request [nil]
|
56
|
-
# @param response [nil]
|
57
|
-
# @param message [String, nil]
|
58
|
-
def initialize(
|
59
|
-
url:,
|
60
|
-
status: nil,
|
61
|
-
body: nil,
|
62
|
-
request: nil,
|
63
|
-
response: nil,
|
64
|
-
message: "Connection error."
|
65
|
-
)
|
66
|
-
super
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
class APITimeoutError < TerminalShop::APIConnectionError
|
71
|
-
# @api private
|
72
|
-
#
|
73
|
-
# @param url [URI::Generic]
|
74
|
-
# @param status [nil]
|
75
|
-
# @param body [nil]
|
76
|
-
# @param request [nil]
|
77
|
-
# @param response [nil]
|
78
|
-
# @param message [String, nil]
|
79
|
-
def initialize(
|
80
|
-
url:,
|
81
|
-
status: nil,
|
82
|
-
body: nil,
|
83
|
-
request: nil,
|
84
|
-
response: nil,
|
85
|
-
message: "Request timed out."
|
86
|
-
)
|
87
|
-
super
|
88
|
-
end
|
89
|
-
end
|
90
|
-
|
91
|
-
class APIStatusError < TerminalShop::APIError
|
92
|
-
# @api private
|
93
|
-
#
|
94
|
-
# @param url [URI::Generic]
|
95
|
-
# @param status [Integer]
|
96
|
-
# @param body [Object, nil]
|
97
|
-
# @param request [nil]
|
98
|
-
# @param response [nil]
|
99
|
-
# @param message [String, nil]
|
100
|
-
#
|
101
|
-
# @return [TerminalShop::APIStatusError]
|
102
|
-
def self.for(url:, status:, body:, request:, response:, message: nil)
|
103
|
-
kwargs = {url: url, status: status, body: body, request: request, response: response, message: message}
|
104
|
-
|
105
|
-
case status
|
106
|
-
in 400
|
107
|
-
TerminalShop::BadRequestError.new(**kwargs)
|
108
|
-
in 401
|
109
|
-
TerminalShop::AuthenticationError.new(**kwargs)
|
110
|
-
in 403
|
111
|
-
TerminalShop::PermissionDeniedError.new(**kwargs)
|
112
|
-
in 404
|
113
|
-
TerminalShop::NotFoundError.new(**kwargs)
|
114
|
-
in 409
|
115
|
-
TerminalShop::ConflictError.new(**kwargs)
|
116
|
-
in 422
|
117
|
-
TerminalShop::UnprocessableEntityError.new(**kwargs)
|
118
|
-
in 429
|
119
|
-
TerminalShop::RateLimitError.new(**kwargs)
|
120
|
-
in (500..)
|
121
|
-
TerminalShop::InternalServerError.new(**kwargs)
|
122
|
-
else
|
123
|
-
TerminalShop::APIStatusError.new(**kwargs)
|
124
|
-
end
|
125
|
-
end
|
126
|
-
|
127
|
-
# @!parse
|
128
|
-
# # @return [Integer]
|
129
|
-
# attr_accessor :status
|
130
|
-
|
131
|
-
# @api private
|
132
|
-
#
|
133
|
-
# @param url [URI::Generic]
|
134
|
-
# @param status [Integer]
|
135
|
-
# @param body [Object, nil]
|
136
|
-
# @param request [nil]
|
137
|
-
# @param response [nil]
|
138
|
-
# @param message [String, nil]
|
139
|
-
def initialize(url:, status:, body:, request:, response:, message: nil)
|
140
|
-
message ||= {url: url.to_s, status: status, body: body}
|
141
|
-
super(
|
142
|
-
url: url,
|
143
|
-
status: status,
|
144
|
-
body: body,
|
145
|
-
request: request,
|
146
|
-
response: response,
|
147
|
-
message: message&.to_s
|
148
|
-
)
|
149
|
-
end
|
150
|
-
end
|
151
|
-
|
152
|
-
class BadRequestError < TerminalShop::APIStatusError
|
153
|
-
HTTP_STATUS = 400
|
154
|
-
end
|
155
|
-
|
156
|
-
class AuthenticationError < TerminalShop::APIStatusError
|
157
|
-
HTTP_STATUS = 401
|
158
|
-
end
|
159
|
-
|
160
|
-
class PermissionDeniedError < TerminalShop::APIStatusError
|
161
|
-
HTTP_STATUS = 403
|
162
|
-
end
|
163
|
-
|
164
|
-
class NotFoundError < TerminalShop::APIStatusError
|
165
|
-
HTTP_STATUS = 404
|
166
|
-
end
|
167
|
-
|
168
|
-
class ConflictError < TerminalShop::APIStatusError
|
169
|
-
HTTP_STATUS = 409
|
170
|
-
end
|
171
|
-
|
172
|
-
class UnprocessableEntityError < TerminalShop::APIStatusError
|
173
|
-
HTTP_STATUS = 422
|
174
|
-
end
|
175
|
-
|
176
|
-
class RateLimitError < TerminalShop::APIStatusError
|
177
|
-
HTTP_STATUS = 429
|
178
|
-
end
|
179
|
-
|
180
|
-
class InternalServerError < TerminalShop::APIStatusError
|
181
|
-
HTTP_STATUS = (500..)
|
182
|
-
end
|
183
|
-
end
|
@@ -1,90 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module TerminalShop
|
4
|
-
module Models
|
5
|
-
class AddressAPI < TerminalShop::BaseModel
|
6
|
-
# @!attribute id
|
7
|
-
# Unique object identifier. The format and length of IDs may change over time.
|
8
|
-
#
|
9
|
-
# @return [String]
|
10
|
-
required :id, String
|
11
|
-
|
12
|
-
# @!attribute city
|
13
|
-
# City of the address.
|
14
|
-
#
|
15
|
-
# @return [String]
|
16
|
-
required :city, String
|
17
|
-
|
18
|
-
# @!attribute country
|
19
|
-
# ISO 3166-1 alpha-2 country code of the address.
|
20
|
-
#
|
21
|
-
# @return [String]
|
22
|
-
required :country, String
|
23
|
-
|
24
|
-
# @!attribute name
|
25
|
-
# The recipient's name.
|
26
|
-
#
|
27
|
-
# @return [String]
|
28
|
-
required :name, String
|
29
|
-
|
30
|
-
# @!attribute street1
|
31
|
-
# Street of the address.
|
32
|
-
#
|
33
|
-
# @return [String]
|
34
|
-
required :street1, String
|
35
|
-
|
36
|
-
# @!attribute zip
|
37
|
-
# Zip code of the address.
|
38
|
-
#
|
39
|
-
# @return [String]
|
40
|
-
required :zip, String
|
41
|
-
|
42
|
-
# @!attribute [r] phone
|
43
|
-
# Phone number of the recipient.
|
44
|
-
#
|
45
|
-
# @return [String, nil]
|
46
|
-
optional :phone, String
|
47
|
-
|
48
|
-
# @!parse
|
49
|
-
# # @return [String]
|
50
|
-
# attr_writer :phone
|
51
|
-
|
52
|
-
# @!attribute [r] province
|
53
|
-
# Province or state of the address.
|
54
|
-
#
|
55
|
-
# @return [String, nil]
|
56
|
-
optional :province, String
|
57
|
-
|
58
|
-
# @!parse
|
59
|
-
# # @return [String]
|
60
|
-
# attr_writer :province
|
61
|
-
|
62
|
-
# @!attribute [r] street2
|
63
|
-
# Apartment, suite, etc. of the address.
|
64
|
-
#
|
65
|
-
# @return [String, nil]
|
66
|
-
optional :street2, String
|
67
|
-
|
68
|
-
# @!parse
|
69
|
-
# # @return [String]
|
70
|
-
# attr_writer :street2
|
71
|
-
|
72
|
-
# @!parse
|
73
|
-
# # Physical address associated with a Terminal shop user.
|
74
|
-
# #
|
75
|
-
# # @param id [String]
|
76
|
-
# # @param city [String]
|
77
|
-
# # @param country [String]
|
78
|
-
# # @param name [String]
|
79
|
-
# # @param street1 [String]
|
80
|
-
# # @param zip [String]
|
81
|
-
# # @param phone [String]
|
82
|
-
# # @param province [String]
|
83
|
-
# # @param street2 [String]
|
84
|
-
# #
|
85
|
-
# def initialize(id:, city:, country:, name:, street1:, zip:, phone: nil, province: nil, street2: nil, **) = super
|
86
|
-
|
87
|
-
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
88
|
-
end
|
89
|
-
end
|
90
|
-
end
|
@@ -1,86 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module TerminalShop
|
4
|
-
module Models
|
5
|
-
class AddressCreateParams < TerminalShop::BaseModel
|
6
|
-
# @!parse
|
7
|
-
# extend TerminalShop::Type::RequestParameters::Converter
|
8
|
-
include TerminalShop::RequestParameters
|
9
|
-
|
10
|
-
# @!attribute city
|
11
|
-
# City of the address.
|
12
|
-
#
|
13
|
-
# @return [String]
|
14
|
-
required :city, String
|
15
|
-
|
16
|
-
# @!attribute country
|
17
|
-
# ISO 3166-1 alpha-2 country code of the address.
|
18
|
-
#
|
19
|
-
# @return [String]
|
20
|
-
required :country, String
|
21
|
-
|
22
|
-
# @!attribute name
|
23
|
-
# The recipient's name.
|
24
|
-
#
|
25
|
-
# @return [String]
|
26
|
-
required :name, String
|
27
|
-
|
28
|
-
# @!attribute street1
|
29
|
-
# Street of the address.
|
30
|
-
#
|
31
|
-
# @return [String]
|
32
|
-
required :street1, String
|
33
|
-
|
34
|
-
# @!attribute zip
|
35
|
-
# Zip code of the address.
|
36
|
-
#
|
37
|
-
# @return [String]
|
38
|
-
required :zip, String
|
39
|
-
|
40
|
-
# @!attribute [r] phone
|
41
|
-
# Phone number of the recipient.
|
42
|
-
#
|
43
|
-
# @return [String, nil]
|
44
|
-
optional :phone, String
|
45
|
-
|
46
|
-
# @!parse
|
47
|
-
# # @return [String]
|
48
|
-
# attr_writer :phone
|
49
|
-
|
50
|
-
# @!attribute [r] province
|
51
|
-
# Province or state of the address.
|
52
|
-
#
|
53
|
-
# @return [String, nil]
|
54
|
-
optional :province, String
|
55
|
-
|
56
|
-
# @!parse
|
57
|
-
# # @return [String]
|
58
|
-
# attr_writer :province
|
59
|
-
|
60
|
-
# @!attribute [r] street2
|
61
|
-
# Apartment, suite, etc. of the address.
|
62
|
-
#
|
63
|
-
# @return [String, nil]
|
64
|
-
optional :street2, String
|
65
|
-
|
66
|
-
# @!parse
|
67
|
-
# # @return [String]
|
68
|
-
# attr_writer :street2
|
69
|
-
|
70
|
-
# @!parse
|
71
|
-
# # @param city [String]
|
72
|
-
# # @param country [String]
|
73
|
-
# # @param name [String]
|
74
|
-
# # @param street1 [String]
|
75
|
-
# # @param zip [String]
|
76
|
-
# # @param phone [String]
|
77
|
-
# # @param province [String]
|
78
|
-
# # @param street2 [String]
|
79
|
-
# # @param request_options [TerminalShop::RequestOptions, Hash{Symbol=>Object}]
|
80
|
-
# #
|
81
|
-
# def initialize(city:, country:, name:, street1:, zip:, phone: nil, province: nil, street2: nil, request_options: {}, **) = super
|
82
|
-
|
83
|
-
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
84
|
-
end
|
85
|
-
end
|
86
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module TerminalShop
|
4
|
-
module Models
|
5
|
-
class AddressCreateResponse < TerminalShop::BaseModel
|
6
|
-
# @!attribute data
|
7
|
-
# Shipping address ID.
|
8
|
-
#
|
9
|
-
# @return [String]
|
10
|
-
required :data, String
|
11
|
-
|
12
|
-
# @!parse
|
13
|
-
# # @param data [String]
|
14
|
-
# #
|
15
|
-
# def initialize(data:, **) = super
|
16
|
-
|
17
|
-
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module TerminalShop
|
4
|
-
module Models
|
5
|
-
class AddressDeleteParams < TerminalShop::BaseModel
|
6
|
-
# @!parse
|
7
|
-
# extend TerminalShop::Type::RequestParameters::Converter
|
8
|
-
include TerminalShop::RequestParameters
|
9
|
-
|
10
|
-
# @!parse
|
11
|
-
# # @param request_options [TerminalShop::RequestOptions, Hash{Symbol=>Object}]
|
12
|
-
# #
|
13
|
-
# def initialize(request_options: {}, **) = super
|
14
|
-
|
15
|
-
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module TerminalShop
|
4
|
-
module Models
|
5
|
-
class AddressDeleteResponse < TerminalShop::BaseModel
|
6
|
-
# @!attribute data
|
7
|
-
#
|
8
|
-
# @return [Symbol, :ok]
|
9
|
-
required :data, const: :ok
|
10
|
-
|
11
|
-
# @!parse
|
12
|
-
# # @param data [Symbol, :ok]
|
13
|
-
# #
|
14
|
-
# def initialize(data: :ok, **) = super
|
15
|
-
|
16
|
-
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module TerminalShop
|
4
|
-
module Models
|
5
|
-
class AddressGetParams < TerminalShop::BaseModel
|
6
|
-
# @!parse
|
7
|
-
# extend TerminalShop::Type::RequestParameters::Converter
|
8
|
-
include TerminalShop::RequestParameters
|
9
|
-
|
10
|
-
# @!parse
|
11
|
-
# # @param request_options [TerminalShop::RequestOptions, Hash{Symbol=>Object}]
|
12
|
-
# #
|
13
|
-
# def initialize(request_options: {}, **) = super
|
14
|
-
|
15
|
-
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module TerminalShop
|
4
|
-
module Models
|
5
|
-
class AddressListParams < TerminalShop::BaseModel
|
6
|
-
# @!parse
|
7
|
-
# extend TerminalShop::Type::RequestParameters::Converter
|
8
|
-
include TerminalShop::RequestParameters
|
9
|
-
|
10
|
-
# @!parse
|
11
|
-
# # @param request_options [TerminalShop::RequestOptions, Hash{Symbol=>Object}]
|
12
|
-
# #
|
13
|
-
# def initialize(request_options: {}, **) = super
|
14
|
-
|
15
|
-
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module TerminalShop
|
4
|
-
module Models
|
5
|
-
class AddressListResponse < TerminalShop::BaseModel
|
6
|
-
# @!attribute data
|
7
|
-
# Shipping addresses.
|
8
|
-
#
|
9
|
-
# @return [Array<TerminalShop::Models::AddressAPI>]
|
10
|
-
required :data, -> { TerminalShop::ArrayOf[TerminalShop::Models::AddressAPI] }
|
11
|
-
|
12
|
-
# @!parse
|
13
|
-
# # @param data [Array<TerminalShop::Models::AddressAPI>]
|
14
|
-
# #
|
15
|
-
# def initialize(data:, **) = super
|
16
|
-
|
17
|
-
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module TerminalShop
|
4
|
-
module Models
|
5
|
-
class AppCreateParams < TerminalShop::BaseModel
|
6
|
-
# @!parse
|
7
|
-
# extend TerminalShop::Type::RequestParameters::Converter
|
8
|
-
include TerminalShop::RequestParameters
|
9
|
-
|
10
|
-
# @!attribute name
|
11
|
-
#
|
12
|
-
# @return [String]
|
13
|
-
required :name, String
|
14
|
-
|
15
|
-
# @!attribute redirect_uri
|
16
|
-
#
|
17
|
-
# @return [String]
|
18
|
-
required :redirect_uri, String, api_name: :redirectURI
|
19
|
-
|
20
|
-
# @!parse
|
21
|
-
# # @param name [String]
|
22
|
-
# # @param redirect_uri [String]
|
23
|
-
# # @param request_options [TerminalShop::RequestOptions, Hash{Symbol=>Object}]
|
24
|
-
# #
|
25
|
-
# def initialize(name:, redirect_uri:, request_options: {}, **) = super
|
26
|
-
|
27
|
-
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module TerminalShop
|
4
|
-
module Models
|
5
|
-
class AppDeleteParams < TerminalShop::BaseModel
|
6
|
-
# @!parse
|
7
|
-
# extend TerminalShop::Type::RequestParameters::Converter
|
8
|
-
include TerminalShop::RequestParameters
|
9
|
-
|
10
|
-
# @!parse
|
11
|
-
# # @param request_options [TerminalShop::RequestOptions, Hash{Symbol=>Object}]
|
12
|
-
# #
|
13
|
-
# def initialize(request_options: {}, **) = super
|
14
|
-
|
15
|
-
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module TerminalShop
|
4
|
-
module Models
|
5
|
-
class AppDeleteResponse < TerminalShop::BaseModel
|
6
|
-
# @!attribute data
|
7
|
-
#
|
8
|
-
# @return [Symbol, :ok]
|
9
|
-
required :data, const: :ok
|
10
|
-
|
11
|
-
# @!parse
|
12
|
-
# # @param data [Symbol, :ok]
|
13
|
-
# #
|
14
|
-
# def initialize(data: :ok, **) = super
|
15
|
-
|
16
|
-
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module TerminalShop
|
4
|
-
module Models
|
5
|
-
class AppGetParams < TerminalShop::BaseModel
|
6
|
-
# @!parse
|
7
|
-
# extend TerminalShop::Type::RequestParameters::Converter
|
8
|
-
include TerminalShop::RequestParameters
|
9
|
-
|
10
|
-
# @!parse
|
11
|
-
# # @param request_options [TerminalShop::RequestOptions, Hash{Symbol=>Object}]
|
12
|
-
# #
|
13
|
-
# def initialize(request_options: {}, **) = super
|
14
|
-
|
15
|
-
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module TerminalShop
|
4
|
-
module Models
|
5
|
-
class AppListParams < TerminalShop::BaseModel
|
6
|
-
# @!parse
|
7
|
-
# extend TerminalShop::Type::RequestParameters::Converter
|
8
|
-
include TerminalShop::RequestParameters
|
9
|
-
|
10
|
-
# @!parse
|
11
|
-
# # @param request_options [TerminalShop::RequestOptions, Hash{Symbol=>Object}]
|
12
|
-
# #
|
13
|
-
# def initialize(request_options: {}, **) = super
|
14
|
-
|
15
|
-
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module TerminalShop
|
4
|
-
module Models
|
5
|
-
class AppListResponse < TerminalShop::BaseModel
|
6
|
-
# @!attribute data
|
7
|
-
# List of apps.
|
8
|
-
#
|
9
|
-
# @return [Array<TerminalShop::Models::AppAPI>]
|
10
|
-
required :data, -> { TerminalShop::ArrayOf[TerminalShop::Models::AppAPI] }
|
11
|
-
|
12
|
-
# @!parse
|
13
|
-
# # @param data [Array<TerminalShop::Models::AppAPI>]
|
14
|
-
# #
|
15
|
-
# def initialize(data:, **) = super
|
16
|
-
|
17
|
-
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,67 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module TerminalShop
|
4
|
-
module Models
|
5
|
-
class CardAPI < TerminalShop::BaseModel
|
6
|
-
# @!attribute id
|
7
|
-
# Unique object identifier. The format and length of IDs may change over time.
|
8
|
-
#
|
9
|
-
# @return [String]
|
10
|
-
required :id, String
|
11
|
-
|
12
|
-
# @!attribute brand
|
13
|
-
# Brand of the card.
|
14
|
-
#
|
15
|
-
# @return [String]
|
16
|
-
required :brand, String
|
17
|
-
|
18
|
-
# @!attribute expiration
|
19
|
-
# Expiration of the card.
|
20
|
-
#
|
21
|
-
# @return [TerminalShop::Models::CardAPI::Expiration]
|
22
|
-
required :expiration, -> { TerminalShop::Models::CardAPI::Expiration }
|
23
|
-
|
24
|
-
# @!attribute last4
|
25
|
-
# Last four digits of the card.
|
26
|
-
#
|
27
|
-
# @return [String]
|
28
|
-
required :last4, String
|
29
|
-
|
30
|
-
# @!parse
|
31
|
-
# # Credit card used for payments in the Terminal shop.
|
32
|
-
# #
|
33
|
-
# # @param id [String]
|
34
|
-
# # @param brand [String]
|
35
|
-
# # @param expiration [TerminalShop::Models::CardAPI::Expiration]
|
36
|
-
# # @param last4 [String]
|
37
|
-
# #
|
38
|
-
# def initialize(id:, brand:, expiration:, last4:, **) = super
|
39
|
-
|
40
|
-
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
41
|
-
|
42
|
-
class Expiration < TerminalShop::BaseModel
|
43
|
-
# @!attribute month
|
44
|
-
# Expiration month of the card.
|
45
|
-
#
|
46
|
-
# @return [Integer]
|
47
|
-
required :month, Integer
|
48
|
-
|
49
|
-
# @!attribute year
|
50
|
-
# Expiration year of the card.
|
51
|
-
#
|
52
|
-
# @return [Integer]
|
53
|
-
required :year, Integer
|
54
|
-
|
55
|
-
# @!parse
|
56
|
-
# # Expiration of the card.
|
57
|
-
# #
|
58
|
-
# # @param month [Integer]
|
59
|
-
# # @param year [Integer]
|
60
|
-
# #
|
61
|
-
# def initialize(month:, year:, **) = super
|
62
|
-
|
63
|
-
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
64
|
-
end
|
65
|
-
end
|
66
|
-
end
|
67
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module TerminalShop
|
4
|
-
module Models
|
5
|
-
class CardCollectParams < TerminalShop::BaseModel
|
6
|
-
# @!parse
|
7
|
-
# extend TerminalShop::Type::RequestParameters::Converter
|
8
|
-
include TerminalShop::RequestParameters
|
9
|
-
|
10
|
-
# @!parse
|
11
|
-
# # @param request_options [TerminalShop::RequestOptions, Hash{Symbol=>Object}]
|
12
|
-
# #
|
13
|
-
# def initialize(request_options: {}, **) = super
|
14
|
-
|
15
|
-
# def initialize: (Hash | TerminalShop::BaseModel) -> void
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|