terminal-shop 3.6.1 → 3.7.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/CHANGELOG.md +34 -0
- data/README.md +3 -3
- data/lib/terminal_shop/errors.rb +1 -1
- data/lib/terminal_shop/file_part.rb +2 -2
- data/lib/terminal_shop/internal/transport/base_client.rb +77 -5
- data/lib/terminal_shop/internal/transport/pooled_net_requester.rb +14 -0
- data/lib/terminal_shop/internal/type/array_of.rb +1 -1
- data/lib/terminal_shop/internal/type/base_model.rb +62 -30
- data/lib/terminal_shop/internal/type/converter.rb +18 -0
- data/lib/terminal_shop/internal/type/enum.rb +5 -4
- data/lib/terminal_shop/internal/type/hash_of.rb +1 -1
- data/lib/terminal_shop/internal/type/request_parameters.rb +4 -4
- data/lib/terminal_shop/internal/type/union.rb +1 -0
- data/lib/terminal_shop/internal/util.rb +57 -1
- data/lib/terminal_shop/internal.rb +6 -0
- data/lib/terminal_shop/models/address.rb +3 -3
- data/lib/terminal_shop/models/address_get_response.rb +3 -3
- data/lib/terminal_shop/models/address_list_response.rb +3 -3
- data/lib/terminal_shop/models/app.rb +3 -3
- data/lib/terminal_shop/models/app_get_response.rb +3 -3
- data/lib/terminal_shop/models/app_list_response.rb +3 -3
- data/lib/terminal_shop/models/card.rb +7 -7
- data/lib/terminal_shop/models/card_collect_response.rb +0 -1
- data/lib/terminal_shop/models/card_create_params.rb +0 -1
- data/lib/terminal_shop/models/card_get_response.rb +3 -3
- data/lib/terminal_shop/models/card_list_response.rb +3 -3
- data/lib/terminal_shop/models/cart.rb +13 -13
- data/lib/terminal_shop/models/cart_convert_response.rb +3 -3
- data/lib/terminal_shop/models/cart_get_response.rb +3 -3
- data/lib/terminal_shop/models/cart_set_item_response.rb +3 -3
- data/lib/terminal_shop/models/order.rb +24 -24
- data/lib/terminal_shop/models/order_get_response.rb +3 -3
- data/lib/terminal_shop/models/order_list_response.rb +3 -3
- data/lib/terminal_shop/models/product.rb +14 -14
- data/lib/terminal_shop/models/product_get_response.rb +3 -3
- data/lib/terminal_shop/models/product_list_response.rb +3 -3
- data/lib/terminal_shop/models/product_variant.rb +6 -6
- data/lib/terminal_shop/models/profile.rb +6 -6
- data/lib/terminal_shop/models/profile_me_response.rb +3 -3
- data/lib/terminal_shop/models/profile_update_response.rb +3 -3
- data/lib/terminal_shop/models/subscription.rb +18 -9
- data/lib/terminal_shop/models/subscription_get_response.rb +3 -3
- data/lib/terminal_shop/models/subscription_list_response.rb +3 -3
- data/lib/terminal_shop/models/subscription_update_params.rb +15 -6
- data/lib/terminal_shop/models/subscription_update_response.rb +3 -3
- data/lib/terminal_shop/models/token.rb +3 -3
- data/lib/terminal_shop/models/token_create_response.rb +0 -1
- data/lib/terminal_shop/models/token_get_response.rb +3 -4
- data/lib/terminal_shop/models/token_list_response.rb +3 -3
- data/lib/terminal_shop/models/view_init_response.rb +30 -31
- data/lib/terminal_shop/models.rb +27 -0
- data/lib/terminal_shop/request_options.rb +4 -0
- data/lib/terminal_shop/resources/address.rb +1 -1
- data/lib/terminal_shop/resources/app.rb +1 -1
- data/lib/terminal_shop/resources/card.rb +1 -2
- data/lib/terminal_shop/resources/cart.rb +3 -3
- data/lib/terminal_shop/resources/email.rb +1 -1
- data/lib/terminal_shop/resources/order.rb +1 -1
- data/lib/terminal_shop/resources/profile.rb +1 -1
- data/lib/terminal_shop/resources/subscription.rb +5 -5
- data/lib/terminal_shop/version.rb +1 -1
- data/lib/terminal_shop.rb +3 -0
- data/rbi/terminal_shop/client.rbi +9 -5
- data/rbi/terminal_shop/errors.rbi +35 -16
- data/rbi/terminal_shop/file_part.rbi +9 -6
- data/rbi/terminal_shop/internal/transport/base_client.rbi +165 -77
- data/rbi/terminal_shop/internal/transport/pooled_net_requester.rbi +29 -13
- data/rbi/terminal_shop/internal/type/array_of.rbi +34 -24
- data/rbi/terminal_shop/internal/type/base_model.rbi +155 -70
- data/rbi/terminal_shop/internal/type/base_page.rbi +13 -8
- data/rbi/terminal_shop/internal/type/boolean.rbi +16 -14
- data/rbi/terminal_shop/internal/type/converter.rbi +72 -28
- data/rbi/terminal_shop/internal/type/enum.rbi +24 -13
- data/rbi/terminal_shop/internal/type/file_input.rbi +8 -4
- data/rbi/terminal_shop/internal/type/hash_of.rbi +34 -24
- data/rbi/terminal_shop/internal/type/request_parameters.rbi +14 -4
- data/rbi/terminal_shop/internal/type/union.rbi +53 -22
- data/rbi/terminal_shop/internal/type/unknown.rbi +16 -6
- data/rbi/terminal_shop/internal/util.rbi +236 -91
- data/rbi/terminal_shop/internal.rbi +2 -0
- data/rbi/terminal_shop/models/address.rbi +25 -19
- data/rbi/terminal_shop/models/address_create_params.rbi +28 -19
- data/rbi/terminal_shop/models/address_create_response.rbi +14 -3
- data/rbi/terminal_shop/models/address_delete_params.rbi +18 -5
- data/rbi/terminal_shop/models/address_delete_response.rbi +13 -3
- data/rbi/terminal_shop/models/address_get_params.rbi +15 -5
- data/rbi/terminal_shop/models/address_get_response.rbi +17 -7
- data/rbi/terminal_shop/models/address_list_params.rbi +18 -5
- data/rbi/terminal_shop/models/address_list_response.rbi +18 -6
- data/rbi/terminal_shop/models/app.rbi +23 -4
- data/rbi/terminal_shop/models/app_create_params.rbi +18 -6
- data/rbi/terminal_shop/models/app_create_response.rbi +37 -9
- data/rbi/terminal_shop/models/app_delete_params.rbi +15 -5
- data/rbi/terminal_shop/models/app_delete_response.rbi +13 -3
- data/rbi/terminal_shop/models/app_get_params.rbi +15 -5
- data/rbi/terminal_shop/models/app_get_response.rbi +17 -7
- data/rbi/terminal_shop/models/app_list_params.rbi +15 -5
- data/rbi/terminal_shop/models/app_list_response.rbi +18 -6
- data/rbi/terminal_shop/models/card.rbi +37 -14
- data/rbi/terminal_shop/models/card_collect_params.rbi +18 -5
- data/rbi/terminal_shop/models/card_collect_response.rbi +40 -9
- data/rbi/terminal_shop/models/card_create_params.rbi +17 -6
- data/rbi/terminal_shop/models/card_create_response.rbi +14 -3
- data/rbi/terminal_shop/models/card_delete_params.rbi +15 -5
- data/rbi/terminal_shop/models/card_delete_response.rbi +13 -3
- data/rbi/terminal_shop/models/card_get_params.rbi +15 -5
- data/rbi/terminal_shop/models/card_get_response.rbi +17 -7
- data/rbi/terminal_shop/models/card_list_params.rbi +15 -5
- data/rbi/terminal_shop/models/card_list_response.rbi +18 -6
- data/rbi/terminal_shop/models/cart.rbi +93 -36
- data/rbi/terminal_shop/models/cart_clear_params.rbi +15 -5
- data/rbi/terminal_shop/models/cart_clear_response.rbi +13 -3
- data/rbi/terminal_shop/models/cart_convert_params.rbi +18 -5
- data/rbi/terminal_shop/models/cart_convert_response.rbi +17 -7
- data/rbi/terminal_shop/models/cart_get_params.rbi +15 -5
- data/rbi/terminal_shop/models/cart_get_response.rbi +17 -7
- data/rbi/terminal_shop/models/cart_set_address_params.rbi +20 -6
- data/rbi/terminal_shop/models/cart_set_address_response.rbi +13 -3
- data/rbi/terminal_shop/models/cart_set_card_params.rbi +20 -6
- data/rbi/terminal_shop/models/cart_set_card_response.rbi +13 -3
- data/rbi/terminal_shop/models/cart_set_item_params.rbi +22 -11
- data/rbi/terminal_shop/models/cart_set_item_response.rbi +17 -7
- data/rbi/terminal_shop/models/email_create_params.rbi +20 -6
- data/rbi/terminal_shop/models/email_create_response.rbi +13 -3
- data/rbi/terminal_shop/models/order.rbi +172 -87
- data/rbi/terminal_shop/models/order_create_params.rbi +23 -14
- data/rbi/terminal_shop/models/order_create_response.rbi +14 -3
- data/rbi/terminal_shop/models/order_get_params.rbi +15 -5
- data/rbi/terminal_shop/models/order_get_response.rbi +17 -7
- data/rbi/terminal_shop/models/order_list_params.rbi +15 -5
- data/rbi/terminal_shop/models/order_list_response.rbi +18 -6
- data/rbi/terminal_shop/models/product.rbi +78 -44
- data/rbi/terminal_shop/models/product_get_params.rbi +15 -5
- data/rbi/terminal_shop/models/product_get_response.rbi +17 -7
- data/rbi/terminal_shop/models/product_list_params.rbi +18 -5
- data/rbi/terminal_shop/models/product_list_response.rbi +18 -6
- data/rbi/terminal_shop/models/product_variant.rbi +46 -15
- data/rbi/terminal_shop/models/profile.rbi +39 -21
- data/rbi/terminal_shop/models/profile_me_params.rbi +15 -5
- data/rbi/terminal_shop/models/profile_me_response.rbi +17 -7
- data/rbi/terminal_shop/models/profile_update_params.rbi +23 -6
- data/rbi/terminal_shop/models/profile_update_response.rbi +17 -7
- data/rbi/terminal_shop/models/region.rbi +7 -6
- data/rbi/terminal_shop/models/subscription.rbi +82 -46
- data/rbi/terminal_shop/models/subscription_create_params.rbi +18 -5
- data/rbi/terminal_shop/models/subscription_create_response.rbi +13 -3
- data/rbi/terminal_shop/models/subscription_delete_params.rbi +18 -5
- data/rbi/terminal_shop/models/subscription_delete_response.rbi +13 -3
- data/rbi/terminal_shop/models/subscription_get_params.rbi +18 -5
- data/rbi/terminal_shop/models/subscription_get_response.rbi +19 -7
- data/rbi/terminal_shop/models/subscription_list_params.rbi +18 -5
- data/rbi/terminal_shop/models/subscription_list_response.rbi +20 -6
- data/rbi/terminal_shop/models/subscription_update_params.rbi +81 -42
- data/rbi/terminal_shop/models/subscription_update_response.rbi +19 -7
- data/rbi/terminal_shop/models/token.rbi +16 -4
- data/rbi/terminal_shop/models/token_create_params.rbi +18 -5
- data/rbi/terminal_shop/models/token_create_response.rbi +39 -9
- data/rbi/terminal_shop/models/token_delete_params.rbi +18 -5
- data/rbi/terminal_shop/models/token_delete_response.rbi +13 -3
- data/rbi/terminal_shop/models/token_get_params.rbi +15 -5
- data/rbi/terminal_shop/models/token_get_response.rbi +17 -7
- data/rbi/terminal_shop/models/token_list_params.rbi +15 -5
- data/rbi/terminal_shop/models/token_list_response.rbi +18 -6
- data/rbi/terminal_shop/models/view_init_params.rbi +15 -5
- data/rbi/terminal_shop/models/view_init_response.rbi +72 -47
- data/rbi/terminal_shop/request_options.rbi +18 -7
- data/rbi/terminal_shop/resources/address.rbi +28 -13
- data/rbi/terminal_shop/resources/app.rbi +30 -12
- data/rbi/terminal_shop/resources/card.rbi +37 -14
- data/rbi/terminal_shop/resources/cart.rbi +45 -16
- data/rbi/terminal_shop/resources/email.rbi +9 -4
- data/rbi/terminal_shop/resources/order.rbi +21 -10
- data/rbi/terminal_shop/resources/product.rbi +16 -6
- data/rbi/terminal_shop/resources/profile.rbi +16 -6
- data/rbi/terminal_shop/resources/subscription.rbi +43 -27
- data/rbi/terminal_shop/resources/token.rbi +30 -11
- data/rbi/terminal_shop/resources/view.rbi +9 -3
- data/sig/terminal_shop/internal/transport/base_client.rbs +16 -1
- data/sig/terminal_shop/internal/transport/pooled_net_requester.rbs +2 -0
- data/sig/terminal_shop/internal/type/base_model.rbs +11 -5
- data/sig/terminal_shop/internal/type/base_page.rbs +1 -1
- data/sig/terminal_shop/internal/type/converter.rbs +2 -0
- data/sig/terminal_shop/internal/type/enum.rbs +1 -0
- data/sig/terminal_shop/internal/type/request_parameters.rbs +5 -1
- data/sig/terminal_shop/internal/type/union.rbs +1 -0
- data/sig/terminal_shop/internal/util.rbs +13 -0
- data/sig/terminal_shop/internal.rbs +2 -0
- data/sig/terminal_shop/models/address.rbs +0 -2
- data/sig/terminal_shop/models/address_create_params.rbs +0 -2
- data/sig/terminal_shop/models/address_create_response.rbs +0 -2
- data/sig/terminal_shop/models/address_delete_params.rbs +0 -2
- data/sig/terminal_shop/models/address_delete_response.rbs +0 -2
- data/sig/terminal_shop/models/address_get_params.rbs +0 -2
- data/sig/terminal_shop/models/address_get_response.rbs +3 -5
- data/sig/terminal_shop/models/address_list_params.rbs +0 -2
- data/sig/terminal_shop/models/address_list_response.rbs +3 -6
- data/sig/terminal_shop/models/app.rbs +0 -2
- data/sig/terminal_shop/models/app_create_params.rbs +0 -2
- data/sig/terminal_shop/models/app_create_response.rbs +0 -4
- data/sig/terminal_shop/models/app_delete_params.rbs +0 -2
- data/sig/terminal_shop/models/app_delete_response.rbs +0 -2
- data/sig/terminal_shop/models/app_get_params.rbs +0 -2
- data/sig/terminal_shop/models/app_get_response.rbs +3 -5
- data/sig/terminal_shop/models/app_list_params.rbs +0 -2
- data/sig/terminal_shop/models/app_list_response.rbs +3 -5
- data/sig/terminal_shop/models/card.rbs +3 -7
- data/sig/terminal_shop/models/card_collect_params.rbs +0 -2
- data/sig/terminal_shop/models/card_collect_response.rbs +0 -4
- data/sig/terminal_shop/models/card_create_params.rbs +0 -2
- data/sig/terminal_shop/models/card_create_response.rbs +0 -2
- data/sig/terminal_shop/models/card_delete_params.rbs +0 -2
- data/sig/terminal_shop/models/card_delete_response.rbs +0 -2
- data/sig/terminal_shop/models/card_get_params.rbs +0 -2
- data/sig/terminal_shop/models/card_get_response.rbs +3 -5
- data/sig/terminal_shop/models/card_list_params.rbs +0 -2
- data/sig/terminal_shop/models/card_list_response.rbs +3 -5
- data/sig/terminal_shop/models/cart.rbs +11 -19
- data/sig/terminal_shop/models/cart_clear_params.rbs +0 -2
- data/sig/terminal_shop/models/cart_clear_response.rbs +0 -2
- data/sig/terminal_shop/models/cart_convert_params.rbs +0 -2
- data/sig/terminal_shop/models/cart_convert_response.rbs +3 -5
- data/sig/terminal_shop/models/cart_get_params.rbs +0 -2
- data/sig/terminal_shop/models/cart_get_response.rbs +3 -5
- data/sig/terminal_shop/models/cart_set_address_params.rbs +0 -2
- data/sig/terminal_shop/models/cart_set_address_response.rbs +0 -2
- data/sig/terminal_shop/models/cart_set_card_params.rbs +0 -2
- data/sig/terminal_shop/models/cart_set_card_response.rbs +0 -2
- data/sig/terminal_shop/models/cart_set_item_params.rbs +0 -2
- data/sig/terminal_shop/models/cart_set_item_response.rbs +3 -5
- data/sig/terminal_shop/models/email_create_params.rbs +0 -2
- data/sig/terminal_shop/models/email_create_response.rbs +0 -2
- data/sig/terminal_shop/models/order.rbs +18 -28
- data/sig/terminal_shop/models/order_create_params.rbs +0 -2
- data/sig/terminal_shop/models/order_create_response.rbs +0 -2
- data/sig/terminal_shop/models/order_get_params.rbs +0 -2
- data/sig/terminal_shop/models/order_get_response.rbs +3 -5
- data/sig/terminal_shop/models/order_list_params.rbs +0 -2
- data/sig/terminal_shop/models/order_list_response.rbs +3 -5
- data/sig/terminal_shop/models/product.rbs +14 -18
- data/sig/terminal_shop/models/product_get_params.rbs +0 -2
- data/sig/terminal_shop/models/product_get_response.rbs +3 -5
- data/sig/terminal_shop/models/product_list_params.rbs +0 -2
- data/sig/terminal_shop/models/product_list_response.rbs +3 -6
- data/sig/terminal_shop/models/product_variant.rbs +5 -9
- data/sig/terminal_shop/models/profile.rbs +3 -7
- data/sig/terminal_shop/models/profile_me_params.rbs +0 -2
- data/sig/terminal_shop/models/profile_me_response.rbs +3 -5
- data/sig/terminal_shop/models/profile_update_params.rbs +0 -2
- data/sig/terminal_shop/models/profile_update_response.rbs +3 -5
- data/sig/terminal_shop/models/subscription.rbs +8 -14
- data/sig/terminal_shop/models/subscription_create_params.rbs +0 -2
- data/sig/terminal_shop/models/subscription_create_response.rbs +0 -2
- data/sig/terminal_shop/models/subscription_delete_params.rbs +0 -2
- data/sig/terminal_shop/models/subscription_delete_response.rbs +0 -2
- data/sig/terminal_shop/models/subscription_get_params.rbs +0 -2
- data/sig/terminal_shop/models/subscription_get_response.rbs +3 -6
- data/sig/terminal_shop/models/subscription_list_params.rbs +0 -2
- data/sig/terminal_shop/models/subscription_list_response.rbs +3 -7
- data/sig/terminal_shop/models/subscription_update_params.rbs +3 -9
- data/sig/terminal_shop/models/subscription_update_response.rbs +3 -6
- data/sig/terminal_shop/models/token.rbs +0 -2
- data/sig/terminal_shop/models/token_create_params.rbs +0 -2
- data/sig/terminal_shop/models/token_create_response.rbs +0 -4
- data/sig/terminal_shop/models/token_delete_params.rbs +0 -2
- data/sig/terminal_shop/models/token_delete_response.rbs +0 -2
- data/sig/terminal_shop/models/token_get_params.rbs +0 -2
- data/sig/terminal_shop/models/token_get_response.rbs +3 -5
- data/sig/terminal_shop/models/token_list_params.rbs +0 -2
- data/sig/terminal_shop/models/token_list_response.rbs +3 -5
- data/sig/terminal_shop/models/view_init_params.rbs +0 -2
- data/sig/terminal_shop/models/view_init_response.rbs +27 -31
- data/sig/terminal_shop/request_options.rbs +1 -1
- metadata +2 -2
@@ -7,11 +7,11 @@ module TerminalShop
|
|
7
7
|
# @!attribute data
|
8
8
|
# List of apps.
|
9
9
|
#
|
10
|
-
# @return [Array<TerminalShop::
|
11
|
-
required :data, -> { TerminalShop::Internal::Type::ArrayOf[TerminalShop::
|
10
|
+
# @return [Array<TerminalShop::AppAPI>]
|
11
|
+
required :data, -> { TerminalShop::Internal::Type::ArrayOf[TerminalShop::AppAPI] }
|
12
12
|
|
13
13
|
# @!method initialize(data:)
|
14
|
-
# @param data [Array<TerminalShop::
|
14
|
+
# @param data [Array<TerminalShop::AppAPI>] List of apps.
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -24,8 +24,8 @@ module TerminalShop
|
|
24
24
|
# @!attribute expiration
|
25
25
|
# Expiration of the card.
|
26
26
|
#
|
27
|
-
# @return [TerminalShop::
|
28
|
-
required :expiration, -> { TerminalShop::
|
27
|
+
# @return [TerminalShop::CardAPI::Expiration]
|
28
|
+
required :expiration, -> { TerminalShop::CardAPI::Expiration }
|
29
29
|
|
30
30
|
# @!attribute last4
|
31
31
|
# Last four digits of the card.
|
@@ -34,22 +34,22 @@ module TerminalShop
|
|
34
34
|
required :last4, String
|
35
35
|
|
36
36
|
# @!method initialize(id:, brand:, created:, expiration:, last4:)
|
37
|
-
# Some parameter documentations has been truncated, see
|
38
|
-
#
|
37
|
+
# Some parameter documentations has been truncated, see {TerminalShop::CardAPI}
|
38
|
+
# for more details.
|
39
39
|
#
|
40
40
|
# Credit card used for payments in the Terminal shop.
|
41
41
|
#
|
42
|
-
# @param id [String] Unique object identifier.
|
42
|
+
# @param id [String] Unique object identifier.
|
43
43
|
#
|
44
44
|
# @param brand [String] Brand of the card.
|
45
45
|
#
|
46
46
|
# @param created [String] Date the card was created.
|
47
47
|
#
|
48
|
-
# @param expiration [TerminalShop::
|
48
|
+
# @param expiration [TerminalShop::CardAPI::Expiration] Expiration of the card.
|
49
49
|
#
|
50
50
|
# @param last4 [String] Last four digits of the card.
|
51
51
|
|
52
|
-
# @see TerminalShop::
|
52
|
+
# @see TerminalShop::CardAPI#expiration
|
53
53
|
class Expiration < TerminalShop::Internal::Type::BaseModel
|
54
54
|
# @!attribute month
|
55
55
|
# Expiration month of the card.
|
@@ -19,7 +19,6 @@ module TerminalShop
|
|
19
19
|
# {TerminalShop::Models::CardCreateParams} for more details.
|
20
20
|
#
|
21
21
|
# @param token [String] Stripe card token. Learn how to [create one here](https://docs.stripe.com/api/to
|
22
|
-
# ...
|
23
22
|
#
|
24
23
|
# @param request_options [TerminalShop::RequestOptions, Hash{Symbol=>Object}]
|
25
24
|
end
|
@@ -7,11 +7,11 @@ module TerminalShop
|
|
7
7
|
# @!attribute data
|
8
8
|
# Credit card used for payments in the Terminal shop.
|
9
9
|
#
|
10
|
-
# @return [TerminalShop::
|
11
|
-
required :data, -> { TerminalShop::
|
10
|
+
# @return [TerminalShop::CardAPI]
|
11
|
+
required :data, -> { TerminalShop::CardAPI }
|
12
12
|
|
13
13
|
# @!method initialize(data:)
|
14
|
-
# @param data [TerminalShop::
|
14
|
+
# @param data [TerminalShop::CardAPI] Credit card used for payments in the Terminal shop.
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -7,11 +7,11 @@ module TerminalShop
|
|
7
7
|
# @!attribute data
|
8
8
|
# List of cards associated with the user.
|
9
9
|
#
|
10
|
-
# @return [Array<TerminalShop::
|
11
|
-
required :data, -> { TerminalShop::Internal::Type::ArrayOf[TerminalShop::
|
10
|
+
# @return [Array<TerminalShop::CardAPI>]
|
11
|
+
required :data, -> { TerminalShop::Internal::Type::ArrayOf[TerminalShop::CardAPI] }
|
12
12
|
|
13
13
|
# @!method initialize(data:)
|
14
|
-
# @param data [Array<TerminalShop::
|
14
|
+
# @param data [Array<TerminalShop::CardAPI>] List of cards associated with the user.
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -6,14 +6,14 @@ module TerminalShop
|
|
6
6
|
# @!attribute amount
|
7
7
|
# The subtotal and shipping amounts for the current user's cart.
|
8
8
|
#
|
9
|
-
# @return [TerminalShop::
|
10
|
-
required :amount, -> { TerminalShop::
|
9
|
+
# @return [TerminalShop::CartAPI::Amount]
|
10
|
+
required :amount, -> { TerminalShop::CartAPI::Amount }
|
11
11
|
|
12
12
|
# @!attribute items
|
13
13
|
# An array of items in the current user's cart.
|
14
14
|
#
|
15
|
-
# @return [Array<TerminalShop::
|
16
|
-
required :items, -> { TerminalShop::Internal::Type::ArrayOf[TerminalShop::
|
15
|
+
# @return [Array<TerminalShop::CartAPI::Item>]
|
16
|
+
required :items, -> { TerminalShop::Internal::Type::ArrayOf[TerminalShop::CartAPI::Item] }
|
17
17
|
|
18
18
|
# @!attribute subtotal
|
19
19
|
# The subtotal of all items in the current user's cart, in cents (USD).
|
@@ -36,15 +36,15 @@ module TerminalShop
|
|
36
36
|
# @!attribute shipping
|
37
37
|
# Shipping information for the current user's cart.
|
38
38
|
#
|
39
|
-
# @return [TerminalShop::
|
40
|
-
optional :shipping, -> { TerminalShop::
|
39
|
+
# @return [TerminalShop::CartAPI::Shipping, nil]
|
40
|
+
optional :shipping, -> { TerminalShop::CartAPI::Shipping }
|
41
41
|
|
42
42
|
# @!method initialize(amount:, items:, subtotal:, address_id: nil, card_id: nil, shipping: nil)
|
43
43
|
# The current Terminal shop user's cart.
|
44
44
|
#
|
45
|
-
# @param amount [TerminalShop::
|
45
|
+
# @param amount [TerminalShop::CartAPI::Amount] The subtotal and shipping amounts for the current user's cart.
|
46
46
|
#
|
47
|
-
# @param items [Array<TerminalShop::
|
47
|
+
# @param items [Array<TerminalShop::CartAPI::Item>] An array of items in the current user's cart.
|
48
48
|
#
|
49
49
|
# @param subtotal [Integer] The subtotal of all items in the current user's cart, in cents (USD).
|
50
50
|
#
|
@@ -52,9 +52,9 @@ module TerminalShop
|
|
52
52
|
#
|
53
53
|
# @param card_id [String] ID of the card selected on the current user's cart.
|
54
54
|
#
|
55
|
-
# @param shipping [TerminalShop::
|
55
|
+
# @param shipping [TerminalShop::CartAPI::Shipping] Shipping information for the current user's cart.
|
56
56
|
|
57
|
-
# @see TerminalShop::
|
57
|
+
# @see TerminalShop::CartAPI#amount
|
58
58
|
class Amount < TerminalShop::Internal::Type::BaseModel
|
59
59
|
# @!attribute subtotal
|
60
60
|
# Subtotal of the current user's cart, in cents (USD).
|
@@ -111,11 +111,11 @@ module TerminalShop
|
|
111
111
|
|
112
112
|
# @!method initialize(id:, product_variant_id:, quantity:, subtotal:)
|
113
113
|
# Some parameter documentations has been truncated, see
|
114
|
-
# {TerminalShop::
|
114
|
+
# {TerminalShop::CartAPI::Item} for more details.
|
115
115
|
#
|
116
116
|
# An item in the current Terminal shop user's cart.
|
117
117
|
#
|
118
|
-
# @param id [String] Unique object identifier.
|
118
|
+
# @param id [String] Unique object identifier.
|
119
119
|
#
|
120
120
|
# @param product_variant_id [String] ID of the product variant for this item in the current user's cart.
|
121
121
|
#
|
@@ -124,7 +124,7 @@ module TerminalShop
|
|
124
124
|
# @param subtotal [Integer] Subtotal of the item in the current user's cart, in cents (USD).
|
125
125
|
end
|
126
126
|
|
127
|
-
# @see TerminalShop::
|
127
|
+
# @see TerminalShop::CartAPI#shipping
|
128
128
|
class Shipping < TerminalShop::Internal::Type::BaseModel
|
129
129
|
# @!attribute service
|
130
130
|
# Shipping service name.
|
@@ -7,11 +7,11 @@ module TerminalShop
|
|
7
7
|
# @!attribute data
|
8
8
|
# An order from the Terminal shop.
|
9
9
|
#
|
10
|
-
# @return [TerminalShop::
|
11
|
-
required :data, -> { TerminalShop::
|
10
|
+
# @return [TerminalShop::OrderAPI]
|
11
|
+
required :data, -> { TerminalShop::OrderAPI }
|
12
12
|
|
13
13
|
# @!method initialize(data:)
|
14
|
-
# @param data [TerminalShop::
|
14
|
+
# @param data [TerminalShop::OrderAPI] An order from the Terminal shop.
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -7,11 +7,11 @@ module TerminalShop
|
|
7
7
|
# @!attribute data
|
8
8
|
# The current Terminal shop user's cart.
|
9
9
|
#
|
10
|
-
# @return [TerminalShop::
|
11
|
-
required :data, -> { TerminalShop::
|
10
|
+
# @return [TerminalShop::CartAPI]
|
11
|
+
required :data, -> { TerminalShop::CartAPI }
|
12
12
|
|
13
13
|
# @!method initialize(data:)
|
14
|
-
# @param data [TerminalShop::
|
14
|
+
# @param data [TerminalShop::CartAPI] The current Terminal shop user's cart.
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -7,11 +7,11 @@ module TerminalShop
|
|
7
7
|
# @!attribute data
|
8
8
|
# The current Terminal shop user's cart.
|
9
9
|
#
|
10
|
-
# @return [TerminalShop::
|
11
|
-
required :data, -> { TerminalShop::
|
10
|
+
# @return [TerminalShop::CartAPI]
|
11
|
+
required :data, -> { TerminalShop::CartAPI }
|
12
12
|
|
13
13
|
# @!method initialize(data:)
|
14
|
-
# @param data [TerminalShop::
|
14
|
+
# @param data [TerminalShop::CartAPI] The current Terminal shop user's cart.
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -12,8 +12,8 @@ module TerminalShop
|
|
12
12
|
# @!attribute amount
|
13
13
|
# The subtotal and shipping amounts of the order.
|
14
14
|
#
|
15
|
-
# @return [TerminalShop::
|
16
|
-
required :amount, -> { TerminalShop::
|
15
|
+
# @return [TerminalShop::OrderAPI::Amount]
|
16
|
+
required :amount, -> { TerminalShop::OrderAPI::Amount }
|
17
17
|
|
18
18
|
# @!attribute created
|
19
19
|
# Date the order was created.
|
@@ -24,20 +24,20 @@ module TerminalShop
|
|
24
24
|
# @!attribute items
|
25
25
|
# Items in the order.
|
26
26
|
#
|
27
|
-
# @return [Array<TerminalShop::
|
28
|
-
required :items, -> { TerminalShop::Internal::Type::ArrayOf[TerminalShop::
|
27
|
+
# @return [Array<TerminalShop::OrderAPI::Item>]
|
28
|
+
required :items, -> { TerminalShop::Internal::Type::ArrayOf[TerminalShop::OrderAPI::Item] }
|
29
29
|
|
30
30
|
# @!attribute shipping
|
31
31
|
# Shipping address of the order.
|
32
32
|
#
|
33
|
-
# @return [TerminalShop::
|
34
|
-
required :shipping, -> { TerminalShop::
|
33
|
+
# @return [TerminalShop::OrderAPI::Shipping]
|
34
|
+
required :shipping, -> { TerminalShop::OrderAPI::Shipping }
|
35
35
|
|
36
36
|
# @!attribute tracking
|
37
37
|
# Tracking information of the order.
|
38
38
|
#
|
39
|
-
# @return [TerminalShop::
|
40
|
-
required :tracking, -> { TerminalShop::
|
39
|
+
# @return [TerminalShop::OrderAPI::Tracking]
|
40
|
+
required :tracking, -> { TerminalShop::OrderAPI::Tracking }
|
41
41
|
|
42
42
|
# @!attribute index
|
43
43
|
# Zero-based index of the order for this user only.
|
@@ -46,26 +46,26 @@ module TerminalShop
|
|
46
46
|
optional :index, Integer
|
47
47
|
|
48
48
|
# @!method initialize(id:, amount:, created:, items:, shipping:, tracking:, index: nil)
|
49
|
-
# Some parameter documentations has been truncated, see
|
50
|
-
#
|
49
|
+
# Some parameter documentations has been truncated, see {TerminalShop::OrderAPI}
|
50
|
+
# for more details.
|
51
51
|
#
|
52
52
|
# An order from the Terminal shop.
|
53
53
|
#
|
54
|
-
# @param id [String] Unique object identifier.
|
54
|
+
# @param id [String] Unique object identifier.
|
55
55
|
#
|
56
|
-
# @param amount [TerminalShop::
|
56
|
+
# @param amount [TerminalShop::OrderAPI::Amount] The subtotal and shipping amounts of the order.
|
57
57
|
#
|
58
58
|
# @param created [String] Date the order was created.
|
59
59
|
#
|
60
|
-
# @param items [Array<TerminalShop::
|
60
|
+
# @param items [Array<TerminalShop::OrderAPI::Item>] Items in the order.
|
61
61
|
#
|
62
|
-
# @param shipping [TerminalShop::
|
62
|
+
# @param shipping [TerminalShop::OrderAPI::Shipping] Shipping address of the order.
|
63
63
|
#
|
64
|
-
# @param tracking [TerminalShop::
|
64
|
+
# @param tracking [TerminalShop::OrderAPI::Tracking] Tracking information of the order.
|
65
65
|
#
|
66
66
|
# @param index [Integer] Zero-based index of the order for this user only.
|
67
67
|
|
68
|
-
# @see TerminalShop::
|
68
|
+
# @see TerminalShop::OrderAPI#amount
|
69
69
|
class Amount < TerminalShop::Internal::Type::BaseModel
|
70
70
|
# @!attribute shipping
|
71
71
|
# Shipping amount of the order, in cents (USD).
|
@@ -120,9 +120,9 @@ module TerminalShop
|
|
120
120
|
|
121
121
|
# @!method initialize(id:, amount:, quantity:, description: nil, product_variant_id: nil)
|
122
122
|
# Some parameter documentations has been truncated, see
|
123
|
-
# {TerminalShop::
|
123
|
+
# {TerminalShop::OrderAPI::Item} for more details.
|
124
124
|
#
|
125
|
-
# @param id [String] Unique object identifier.
|
125
|
+
# @param id [String] Unique object identifier.
|
126
126
|
#
|
127
127
|
# @param amount [Integer] Amount of the item in the order, in cents (USD).
|
128
128
|
#
|
@@ -133,7 +133,7 @@ module TerminalShop
|
|
133
133
|
# @param product_variant_id [String] ID of the product variant of the item in the order.
|
134
134
|
end
|
135
135
|
|
136
|
-
# @see TerminalShop::
|
136
|
+
# @see TerminalShop::OrderAPI#shipping
|
137
137
|
class Shipping < TerminalShop::Internal::Type::BaseModel
|
138
138
|
# @!attribute city
|
139
139
|
# City of the address.
|
@@ -203,7 +203,7 @@ module TerminalShop
|
|
203
203
|
# @param street2 [String] Apartment, suite, etc. of the address.
|
204
204
|
end
|
205
205
|
|
206
|
-
# @see TerminalShop::
|
206
|
+
# @see TerminalShop::OrderAPI#tracking
|
207
207
|
class Tracking < TerminalShop::Internal::Type::BaseModel
|
208
208
|
# @!attribute number
|
209
209
|
# Tracking number of the order.
|
@@ -220,8 +220,8 @@ module TerminalShop
|
|
220
220
|
# @!attribute status
|
221
221
|
# Current tracking status of the shipment.
|
222
222
|
#
|
223
|
-
# @return [Symbol, TerminalShop::
|
224
|
-
optional :status, enum: -> { TerminalShop::
|
223
|
+
# @return [Symbol, TerminalShop::OrderAPI::Tracking::Status, nil]
|
224
|
+
optional :status, enum: -> { TerminalShop::OrderAPI::Tracking::Status }
|
225
225
|
|
226
226
|
# @!attribute status_details
|
227
227
|
# Additional details about the tracking status.
|
@@ -248,7 +248,7 @@ module TerminalShop
|
|
248
248
|
#
|
249
249
|
# @param service [String] Shipping service of the order.
|
250
250
|
#
|
251
|
-
# @param status [Symbol, TerminalShop::
|
251
|
+
# @param status [Symbol, TerminalShop::OrderAPI::Tracking::Status] Current tracking status of the shipment.
|
252
252
|
#
|
253
253
|
# @param status_details [String] Additional details about the tracking status.
|
254
254
|
#
|
@@ -258,7 +258,7 @@ module TerminalShop
|
|
258
258
|
|
259
259
|
# Current tracking status of the shipment.
|
260
260
|
#
|
261
|
-
# @see TerminalShop::
|
261
|
+
# @see TerminalShop::OrderAPI::Tracking#status
|
262
262
|
module Status
|
263
263
|
extend TerminalShop::Internal::Type::Enum
|
264
264
|
|
@@ -7,11 +7,11 @@ module TerminalShop
|
|
7
7
|
# @!attribute data
|
8
8
|
# An order from the Terminal shop.
|
9
9
|
#
|
10
|
-
# @return [TerminalShop::
|
11
|
-
required :data, -> { TerminalShop::
|
10
|
+
# @return [TerminalShop::OrderAPI]
|
11
|
+
required :data, -> { TerminalShop::OrderAPI }
|
12
12
|
|
13
13
|
# @!method initialize(data:)
|
14
|
-
# @param data [TerminalShop::
|
14
|
+
# @param data [TerminalShop::OrderAPI] An order from the Terminal shop.
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -7,11 +7,11 @@ module TerminalShop
|
|
7
7
|
# @!attribute data
|
8
8
|
# List of orders.
|
9
9
|
#
|
10
|
-
# @return [Array<TerminalShop::
|
11
|
-
required :data, -> { TerminalShop::Internal::Type::ArrayOf[TerminalShop::
|
10
|
+
# @return [Array<TerminalShop::OrderAPI>]
|
11
|
+
required :data, -> { TerminalShop::Internal::Type::ArrayOf[TerminalShop::OrderAPI] }
|
12
12
|
|
13
13
|
# @!method initialize(data:)
|
14
|
-
# @param data [Array<TerminalShop::
|
14
|
+
# @param data [Array<TerminalShop::OrderAPI>] List of orders.
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -24,8 +24,8 @@ module TerminalShop
|
|
24
24
|
# @!attribute variants
|
25
25
|
# List of variants of the product.
|
26
26
|
#
|
27
|
-
# @return [Array<TerminalShop::
|
28
|
-
required :variants, -> { TerminalShop::Internal::Type::ArrayOf[TerminalShop::
|
27
|
+
# @return [Array<TerminalShop::ProductVariant>]
|
28
|
+
required :variants, -> { TerminalShop::Internal::Type::ArrayOf[TerminalShop::ProductVariant] }
|
29
29
|
|
30
30
|
# @!attribute order
|
31
31
|
# Order of the product used when displaying a sorted list of products.
|
@@ -36,38 +36,38 @@ module TerminalShop
|
|
36
36
|
# @!attribute subscription
|
37
37
|
# Whether the product must be or can be subscribed to.
|
38
38
|
#
|
39
|
-
# @return [Symbol, TerminalShop::
|
40
|
-
optional :subscription, enum: -> { TerminalShop::
|
39
|
+
# @return [Symbol, TerminalShop::ProductAPI::Subscription, nil]
|
40
|
+
optional :subscription, enum: -> { TerminalShop::ProductAPI::Subscription }
|
41
41
|
|
42
42
|
# @!attribute tags
|
43
43
|
# Tags for the product.
|
44
44
|
#
|
45
|
-
# @return [TerminalShop::
|
46
|
-
optional :tags, -> { TerminalShop::
|
45
|
+
# @return [TerminalShop::ProductAPI::Tags, nil]
|
46
|
+
optional :tags, -> { TerminalShop::ProductAPI::Tags }
|
47
47
|
|
48
48
|
# @!method initialize(id:, description:, name:, variants:, order: nil, subscription: nil, tags: nil)
|
49
|
-
# Some parameter documentations has been truncated, see
|
50
|
-
#
|
49
|
+
# Some parameter documentations has been truncated, see {TerminalShop::ProductAPI}
|
50
|
+
# for more details.
|
51
51
|
#
|
52
52
|
# Product sold in the Terminal shop.
|
53
53
|
#
|
54
|
-
# @param id [String] Unique object identifier.
|
54
|
+
# @param id [String] Unique object identifier.
|
55
55
|
#
|
56
56
|
# @param description [String] Description of the product.
|
57
57
|
#
|
58
58
|
# @param name [String] Name of the product.
|
59
59
|
#
|
60
|
-
# @param variants [Array<TerminalShop::
|
60
|
+
# @param variants [Array<TerminalShop::ProductVariant>] List of variants of the product.
|
61
61
|
#
|
62
62
|
# @param order [Integer] Order of the product used when displaying a sorted list of products.
|
63
63
|
#
|
64
|
-
# @param subscription [Symbol, TerminalShop::
|
64
|
+
# @param subscription [Symbol, TerminalShop::ProductAPI::Subscription] Whether the product must be or can be subscribed to.
|
65
65
|
#
|
66
|
-
# @param tags [TerminalShop::
|
66
|
+
# @param tags [TerminalShop::ProductAPI::Tags] Tags for the product.
|
67
67
|
|
68
68
|
# Whether the product must be or can be subscribed to.
|
69
69
|
#
|
70
|
-
# @see TerminalShop::
|
70
|
+
# @see TerminalShop::ProductAPI#subscription
|
71
71
|
module Subscription
|
72
72
|
extend TerminalShop::Internal::Type::Enum
|
73
73
|
|
@@ -78,7 +78,7 @@ module TerminalShop
|
|
78
78
|
# @return [Array<Symbol>]
|
79
79
|
end
|
80
80
|
|
81
|
-
# @see TerminalShop::
|
81
|
+
# @see TerminalShop::ProductAPI#tags
|
82
82
|
class Tags < TerminalShop::Internal::Type::BaseModel
|
83
83
|
# @!attribute app
|
84
84
|
#
|
@@ -7,11 +7,11 @@ module TerminalShop
|
|
7
7
|
# @!attribute data
|
8
8
|
# Product sold in the Terminal shop.
|
9
9
|
#
|
10
|
-
# @return [TerminalShop::
|
11
|
-
required :data, -> { TerminalShop::
|
10
|
+
# @return [TerminalShop::ProductAPI]
|
11
|
+
required :data, -> { TerminalShop::ProductAPI }
|
12
12
|
|
13
13
|
# @!method initialize(data:)
|
14
|
-
# @param data [TerminalShop::
|
14
|
+
# @param data [TerminalShop::ProductAPI] Product sold in the Terminal shop.
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -7,11 +7,11 @@ module TerminalShop
|
|
7
7
|
# @!attribute data
|
8
8
|
# A list of products.
|
9
9
|
#
|
10
|
-
# @return [Array<TerminalShop::
|
11
|
-
required :data, -> { TerminalShop::Internal::Type::ArrayOf[TerminalShop::
|
10
|
+
# @return [Array<TerminalShop::ProductAPI>]
|
11
|
+
required :data, -> { TerminalShop::Internal::Type::ArrayOf[TerminalShop::ProductAPI] }
|
12
12
|
|
13
13
|
# @!method initialize(data:)
|
14
|
-
# @param data [Array<TerminalShop::
|
14
|
+
# @param data [Array<TerminalShop::ProductAPI>] A list of products.
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -30,16 +30,16 @@ module TerminalShop
|
|
30
30
|
# @!attribute tags
|
31
31
|
# Tags for the product variant.
|
32
32
|
#
|
33
|
-
# @return [TerminalShop::
|
34
|
-
optional :tags, -> { TerminalShop::
|
33
|
+
# @return [TerminalShop::ProductVariant::Tags, nil]
|
34
|
+
optional :tags, -> { TerminalShop::ProductVariant::Tags }
|
35
35
|
|
36
36
|
# @!method initialize(id:, name:, price:, description: nil, tags: nil)
|
37
37
|
# Some parameter documentations has been truncated, see
|
38
|
-
# {TerminalShop::
|
38
|
+
# {TerminalShop::ProductVariant} for more details.
|
39
39
|
#
|
40
40
|
# Variant of a product in the Terminal shop.
|
41
41
|
#
|
42
|
-
# @param id [String] Unique object identifier.
|
42
|
+
# @param id [String] Unique object identifier.
|
43
43
|
#
|
44
44
|
# @param name [String] Name of the product variant.
|
45
45
|
#
|
@@ -47,9 +47,9 @@ module TerminalShop
|
|
47
47
|
#
|
48
48
|
# @param description [String] Description of the product variant.
|
49
49
|
#
|
50
|
-
# @param tags [TerminalShop::
|
50
|
+
# @param tags [TerminalShop::ProductVariant::Tags] Tags for the product variant.
|
51
51
|
|
52
|
-
# @see TerminalShop::
|
52
|
+
# @see TerminalShop::ProductVariant#tags
|
53
53
|
class Tags < TerminalShop::Internal::Type::BaseModel
|
54
54
|
# @!attribute app
|
55
55
|
#
|
@@ -6,15 +6,15 @@ module TerminalShop
|
|
6
6
|
# @!attribute user
|
7
7
|
# A Terminal shop user. (We have users, btw.)
|
8
8
|
#
|
9
|
-
# @return [TerminalShop::
|
10
|
-
required :user, -> { TerminalShop::
|
9
|
+
# @return [TerminalShop::ProfileAPI::User]
|
10
|
+
required :user, -> { TerminalShop::ProfileAPI::User }
|
11
11
|
|
12
12
|
# @!method initialize(user:)
|
13
13
|
# A Terminal shop user's profile. (We have users, btw.)
|
14
14
|
#
|
15
|
-
# @param user [TerminalShop::
|
15
|
+
# @param user [TerminalShop::ProfileAPI::User] A Terminal shop user. (We have users, btw.)
|
16
16
|
|
17
|
-
# @see TerminalShop::
|
17
|
+
# @see TerminalShop::ProfileAPI#user
|
18
18
|
class User < TerminalShop::Internal::Type::BaseModel
|
19
19
|
# @!attribute id
|
20
20
|
# Unique object identifier. The format and length of IDs may change over time.
|
@@ -48,11 +48,11 @@ module TerminalShop
|
|
48
48
|
|
49
49
|
# @!method initialize(id:, email:, fingerprint:, name:, stripe_customer_id:)
|
50
50
|
# Some parameter documentations has been truncated, see
|
51
|
-
# {TerminalShop::
|
51
|
+
# {TerminalShop::ProfileAPI::User} for more details.
|
52
52
|
#
|
53
53
|
# A Terminal shop user. (We have users, btw.)
|
54
54
|
#
|
55
|
-
# @param id [String] Unique object identifier.
|
55
|
+
# @param id [String] Unique object identifier.
|
56
56
|
#
|
57
57
|
# @param email [String, nil] Email address of the user.
|
58
58
|
#
|
@@ -7,11 +7,11 @@ module TerminalShop
|
|
7
7
|
# @!attribute data
|
8
8
|
# A Terminal shop user's profile. (We have users, btw.)
|
9
9
|
#
|
10
|
-
# @return [TerminalShop::
|
11
|
-
required :data, -> { TerminalShop::
|
10
|
+
# @return [TerminalShop::ProfileAPI]
|
11
|
+
required :data, -> { TerminalShop::ProfileAPI }
|
12
12
|
|
13
13
|
# @!method initialize(data:)
|
14
|
-
# @param data [TerminalShop::
|
14
|
+
# @param data [TerminalShop::ProfileAPI] A Terminal shop user's profile. (We have users, btw.)
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -7,11 +7,11 @@ module TerminalShop
|
|
7
7
|
# @!attribute data
|
8
8
|
# A Terminal shop user's profile. (We have users, btw.)
|
9
9
|
#
|
10
|
-
# @return [TerminalShop::
|
11
|
-
required :data, -> { TerminalShop::
|
10
|
+
# @return [TerminalShop::ProfileAPI]
|
11
|
+
required :data, -> { TerminalShop::ProfileAPI }
|
12
12
|
|
13
13
|
# @!method initialize(data:)
|
14
|
-
# @param data [TerminalShop::
|
14
|
+
# @param data [TerminalShop::ProfileAPI] A Terminal shop user's profile. (We have users, btw.)
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -54,16 +54,16 @@ module TerminalShop
|
|
54
54
|
# @!attribute schedule
|
55
55
|
# Schedule of the subscription.
|
56
56
|
#
|
57
|
-
# @return [TerminalShop::
|
58
|
-
optional :schedule, union: -> { TerminalShop::
|
57
|
+
# @return [TerminalShop::SubscriptionAPI::Schedule::Fixed, TerminalShop::SubscriptionAPI::Schedule::Weekly, nil]
|
58
|
+
optional :schedule, union: -> { TerminalShop::SubscriptionAPI::Schedule }
|
59
59
|
|
60
60
|
# @!method initialize(id:, address_id:, card_id:, created:, price:, product_variant_id:, quantity:, next_: nil, schedule: nil)
|
61
61
|
# Some parameter documentations has been truncated, see
|
62
|
-
# {TerminalShop::
|
62
|
+
# {TerminalShop::SubscriptionAPI} for more details.
|
63
63
|
#
|
64
64
|
# Subscription to a Terminal shop product.
|
65
65
|
#
|
66
|
-
# @param id [String] Unique object identifier.
|
66
|
+
# @param id [String] Unique object identifier.
|
67
67
|
#
|
68
68
|
# @param address_id [String] ID of the shipping address used for the subscription.
|
69
69
|
#
|
@@ -79,17 +79,17 @@ module TerminalShop
|
|
79
79
|
#
|
80
80
|
# @param next_ [String] Next shipment and billing date for the subscription.
|
81
81
|
#
|
82
|
-
# @param schedule [TerminalShop::
|
82
|
+
# @param schedule [TerminalShop::SubscriptionAPI::Schedule::Fixed, TerminalShop::SubscriptionAPI::Schedule::Weekly] Schedule of the subscription.
|
83
83
|
|
84
84
|
# Schedule of the subscription.
|
85
85
|
#
|
86
|
-
# @see TerminalShop::
|
86
|
+
# @see TerminalShop::SubscriptionAPI#schedule
|
87
87
|
module Schedule
|
88
88
|
extend TerminalShop::Internal::Type::Union
|
89
89
|
|
90
|
-
variant -> { TerminalShop::
|
90
|
+
variant -> { TerminalShop::SubscriptionAPI::Schedule::Fixed }
|
91
91
|
|
92
|
-
variant -> { TerminalShop::
|
92
|
+
variant -> { TerminalShop::SubscriptionAPI::Schedule::Weekly }
|
93
93
|
|
94
94
|
class Fixed < TerminalShop::Internal::Type::BaseModel
|
95
95
|
# @!attribute type
|
@@ -118,7 +118,16 @@ module TerminalShop
|
|
118
118
|
end
|
119
119
|
|
120
120
|
# @!method self.variants
|
121
|
-
# @return [Array(TerminalShop::
|
121
|
+
# @return [Array(TerminalShop::SubscriptionAPI::Schedule::Fixed, TerminalShop::SubscriptionAPI::Schedule::Weekly)]
|
122
|
+
|
123
|
+
define_sorbet_constant!(:Variants) do
|
124
|
+
T.type_alias do
|
125
|
+
T.any(
|
126
|
+
TerminalShop::SubscriptionAPI::Schedule::Fixed,
|
127
|
+
TerminalShop::SubscriptionAPI::Schedule::Weekly
|
128
|
+
)
|
129
|
+
end
|
130
|
+
end
|
122
131
|
end
|
123
132
|
end
|
124
133
|
end
|