terminal-shop 3.6.2 → 3.8.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 +48 -0
- data/README.md +81 -53
- data/SECURITY.md +2 -2
- data/lib/terminal_shop/client.rb +4 -4
- data/lib/terminal_shop/errors.rb +1 -1
- data/lib/terminal_shop/internal/transport/base_client.rb +77 -5
- data/lib/terminal_shop/internal/transport/pooled_net_requester.rb +17 -1
- data/lib/terminal_shop/internal/type/array_of.rb +9 -1
- data/lib/terminal_shop/internal/type/base_model.rb +77 -30
- data/lib/terminal_shop/internal/type/boolean.rb +8 -0
- data/lib/terminal_shop/internal/type/converter.rb +18 -0
- data/lib/terminal_shop/internal/type/enum.rb +13 -0
- data/lib/terminal_shop/internal/type/file_input.rb +7 -0
- data/lib/terminal_shop/internal/type/hash_of.rb +9 -1
- data/lib/terminal_shop/internal/type/union.rb +13 -0
- data/lib/terminal_shop/internal/type/unknown.rb +8 -0
- data/lib/terminal_shop/internal/util.rb +101 -0
- data/lib/terminal_shop/internal.rb +9 -0
- data/lib/terminal_shop/models.rb +38 -0
- data/lib/terminal_shop/request_options.rb +4 -0
- data/lib/terminal_shop/version.rb +1 -1
- data/lib/terminal_shop.rb +2 -0
- data/rbi/terminal_shop/internal/transport/base_client.rbi +31 -8
- data/rbi/terminal_shop/internal/transport/pooled_net_requester.rbi +10 -4
- data/rbi/terminal_shop/internal/type/array_of.rbi +6 -0
- data/rbi/terminal_shop/internal/type/base_model.rbi +38 -15
- data/rbi/terminal_shop/internal/type/base_page.rbi +1 -1
- data/rbi/terminal_shop/internal/type/boolean.rbi +6 -0
- data/rbi/terminal_shop/internal/type/converter.rbi +2 -0
- data/rbi/terminal_shop/internal/type/enum.rbi +6 -0
- data/rbi/terminal_shop/internal/type/file_input.rbi +5 -0
- data/rbi/terminal_shop/internal/type/hash_of.rbi +6 -0
- data/rbi/terminal_shop/internal/type/union.rbi +6 -0
- data/rbi/terminal_shop/internal/type/unknown.rbi +6 -0
- data/rbi/terminal_shop/internal/util.rbi +62 -5
- data/rbi/terminal_shop/internal.rbi +7 -0
- data/rbi/terminal_shop/models/address.rbi +3 -1
- data/rbi/terminal_shop/models/address_create_params.rbi +6 -1
- data/rbi/terminal_shop/models/address_create_response.rbi +6 -1
- data/rbi/terminal_shop/models/address_delete_params.rbi +6 -1
- data/rbi/terminal_shop/models/address_delete_response.rbi +6 -1
- data/rbi/terminal_shop/models/address_get_params.rbi +3 -1
- data/rbi/terminal_shop/models/address_get_response.rbi +6 -1
- data/rbi/terminal_shop/models/address_list_params.rbi +6 -1
- data/rbi/terminal_shop/models/address_list_response.rbi +6 -1
- data/rbi/terminal_shop/models/app.rbi +3 -1
- data/rbi/terminal_shop/models/app_create_params.rbi +3 -1
- data/rbi/terminal_shop/models/app_create_response.rbi +12 -2
- data/rbi/terminal_shop/models/app_delete_params.rbi +3 -1
- data/rbi/terminal_shop/models/app_delete_response.rbi +6 -1
- data/rbi/terminal_shop/models/app_get_params.rbi +3 -1
- data/rbi/terminal_shop/models/app_get_response.rbi +6 -1
- data/rbi/terminal_shop/models/app_list_params.rbi +3 -1
- data/rbi/terminal_shop/models/app_list_response.rbi +6 -1
- data/rbi/terminal_shop/models/card.rbi +9 -2
- data/rbi/terminal_shop/models/card_collect_params.rbi +6 -1
- data/rbi/terminal_shop/models/card_collect_response.rbi +12 -2
- data/rbi/terminal_shop/models/card_create_params.rbi +3 -1
- data/rbi/terminal_shop/models/card_create_response.rbi +6 -1
- data/rbi/terminal_shop/models/card_delete_params.rbi +3 -1
- data/rbi/terminal_shop/models/card_delete_response.rbi +6 -1
- data/rbi/terminal_shop/models/card_get_params.rbi +3 -1
- data/rbi/terminal_shop/models/card_get_response.rbi +6 -1
- data/rbi/terminal_shop/models/card_list_params.rbi +3 -1
- data/rbi/terminal_shop/models/card_list_response.rbi +6 -1
- data/rbi/terminal_shop/models/cart.rbi +18 -4
- data/rbi/terminal_shop/models/cart_clear_params.rbi +3 -1
- data/rbi/terminal_shop/models/cart_clear_response.rbi +6 -1
- data/rbi/terminal_shop/models/cart_convert_params.rbi +6 -1
- data/rbi/terminal_shop/models/cart_convert_response.rbi +6 -1
- data/rbi/terminal_shop/models/cart_get_params.rbi +3 -1
- data/rbi/terminal_shop/models/cart_get_response.rbi +6 -1
- data/rbi/terminal_shop/models/cart_set_address_params.rbi +6 -1
- data/rbi/terminal_shop/models/cart_set_address_response.rbi +6 -1
- data/rbi/terminal_shop/models/cart_set_card_params.rbi +6 -1
- data/rbi/terminal_shop/models/cart_set_card_response.rbi +6 -1
- data/rbi/terminal_shop/models/cart_set_item_params.rbi +6 -1
- data/rbi/terminal_shop/models/cart_set_item_response.rbi +6 -1
- data/rbi/terminal_shop/models/email_create_params.rbi +6 -1
- data/rbi/terminal_shop/models/email_create_response.rbi +6 -1
- data/rbi/terminal_shop/models/order.rbi +24 -5
- data/rbi/terminal_shop/models/order_create_params.rbi +6 -1
- data/rbi/terminal_shop/models/order_create_response.rbi +6 -1
- data/rbi/terminal_shop/models/order_get_params.rbi +3 -1
- data/rbi/terminal_shop/models/order_get_response.rbi +6 -1
- data/rbi/terminal_shop/models/order_list_params.rbi +3 -1
- data/rbi/terminal_shop/models/order_list_response.rbi +6 -1
- data/rbi/terminal_shop/models/product.rbi +9 -2
- data/rbi/terminal_shop/models/product_get_params.rbi +3 -1
- data/rbi/terminal_shop/models/product_get_response.rbi +6 -1
- data/rbi/terminal_shop/models/product_list_params.rbi +6 -1
- data/rbi/terminal_shop/models/product_list_response.rbi +6 -1
- data/rbi/terminal_shop/models/product_variant.rbi +9 -2
- data/rbi/terminal_shop/models/profile.rbi +9 -2
- data/rbi/terminal_shop/models/profile_me_params.rbi +3 -1
- data/rbi/terminal_shop/models/profile_me_response.rbi +6 -1
- data/rbi/terminal_shop/models/profile_update_params.rbi +6 -1
- data/rbi/terminal_shop/models/profile_update_response.rbi +6 -1
- data/rbi/terminal_shop/models/subscription.rbi +17 -16
- data/rbi/terminal_shop/models/subscription_create_params.rbi +6 -1
- data/rbi/terminal_shop/models/subscription_create_response.rbi +6 -1
- data/rbi/terminal_shop/models/subscription_delete_params.rbi +6 -1
- data/rbi/terminal_shop/models/subscription_delete_response.rbi +6 -1
- data/rbi/terminal_shop/models/subscription_get_params.rbi +6 -1
- data/rbi/terminal_shop/models/subscription_get_response.rbi +6 -1
- data/rbi/terminal_shop/models/subscription_list_params.rbi +6 -1
- data/rbi/terminal_shop/models/subscription_list_response.rbi +6 -1
- data/rbi/terminal_shop/models/subscription_update_params.rbi +18 -3
- data/rbi/terminal_shop/models/subscription_update_response.rbi +6 -1
- data/rbi/terminal_shop/models/token.rbi +3 -1
- data/rbi/terminal_shop/models/token_create_params.rbi +6 -1
- data/rbi/terminal_shop/models/token_create_response.rbi +12 -2
- data/rbi/terminal_shop/models/token_delete_params.rbi +6 -1
- data/rbi/terminal_shop/models/token_delete_response.rbi +6 -1
- data/rbi/terminal_shop/models/token_get_params.rbi +3 -1
- data/rbi/terminal_shop/models/token_get_response.rbi +6 -1
- data/rbi/terminal_shop/models/token_list_params.rbi +3 -1
- data/rbi/terminal_shop/models/token_list_response.rbi +6 -1
- data/rbi/terminal_shop/models/view_init_params.rbi +3 -1
- data/rbi/terminal_shop/models/view_init_response.rbi +12 -2
- data/rbi/terminal_shop/request_options.rbi +3 -1
- data/sig/terminal_shop/internal/transport/base_client.rbs +16 -1
- data/sig/terminal_shop/internal/transport/pooled_net_requester.rbs +4 -0
- data/sig/terminal_shop/internal/type/array_of.rbs +3 -0
- data/sig/terminal_shop/internal/type/base_model.rbs +13 -5
- data/sig/terminal_shop/internal/type/base_page.rbs +1 -1
- data/sig/terminal_shop/internal/type/boolean.rbs +3 -0
- data/sig/terminal_shop/internal/type/converter.rbs +2 -0
- data/sig/terminal_shop/internal/type/enum.rbs +3 -0
- data/sig/terminal_shop/internal/type/file_input.rbs +2 -0
- data/sig/terminal_shop/internal/type/hash_of.rbs +3 -0
- data/sig/terminal_shop/internal/type/union.rbs +3 -0
- data/sig/terminal_shop/internal/type/unknown.rbs +3 -0
- data/sig/terminal_shop/internal/util.rbs +25 -0
- data/sig/terminal_shop/internal.rbs +4 -0
- metadata +2 -2
@@ -7,7 +7,12 @@ module TerminalShop
|
|
7
7
|
include TerminalShop::Internal::Type::RequestParameters
|
8
8
|
|
9
9
|
OrHash =
|
10
|
-
T.type_alias
|
10
|
+
T.type_alias do
|
11
|
+
T.any(
|
12
|
+
TerminalShop::ProductListParams,
|
13
|
+
TerminalShop::Internal::AnyHash
|
14
|
+
)
|
15
|
+
end
|
11
16
|
|
12
17
|
sig do
|
13
18
|
params(request_options: TerminalShop::RequestOptions::OrHash).returns(
|
@@ -4,7 +4,12 @@ module TerminalShop
|
|
4
4
|
module Models
|
5
5
|
class ProductListResponse < TerminalShop::Internal::Type::BaseModel
|
6
6
|
OrHash =
|
7
|
-
T.type_alias
|
7
|
+
T.type_alias do
|
8
|
+
T.any(
|
9
|
+
TerminalShop::Models::ProductListResponse,
|
10
|
+
TerminalShop::Internal::AnyHash
|
11
|
+
)
|
12
|
+
end
|
8
13
|
|
9
14
|
# A list of products.
|
10
15
|
sig { returns(T::Array[TerminalShop::ProductAPI]) }
|
@@ -4,7 +4,9 @@ module TerminalShop
|
|
4
4
|
module Models
|
5
5
|
class ProductVariant < TerminalShop::Internal::Type::BaseModel
|
6
6
|
OrHash =
|
7
|
-
T.type_alias
|
7
|
+
T.type_alias do
|
8
|
+
T.any(TerminalShop::ProductVariant, TerminalShop::Internal::AnyHash)
|
9
|
+
end
|
8
10
|
|
9
11
|
# Unique object identifier. The format and length of IDs may change over time.
|
10
12
|
sig { returns(String) }
|
@@ -72,7 +74,12 @@ module TerminalShop
|
|
72
74
|
|
73
75
|
class Tags < TerminalShop::Internal::Type::BaseModel
|
74
76
|
OrHash =
|
75
|
-
T.type_alias
|
77
|
+
T.type_alias do
|
78
|
+
T.any(
|
79
|
+
TerminalShop::ProductVariant::Tags,
|
80
|
+
TerminalShop::Internal::AnyHash
|
81
|
+
)
|
82
|
+
end
|
76
83
|
|
77
84
|
sig { returns(T.nilable(String)) }
|
78
85
|
attr_reader :app
|
@@ -4,7 +4,9 @@ module TerminalShop
|
|
4
4
|
module Models
|
5
5
|
class ProfileAPI < TerminalShop::Internal::Type::BaseModel
|
6
6
|
OrHash =
|
7
|
-
T.type_alias
|
7
|
+
T.type_alias do
|
8
|
+
T.any(TerminalShop::ProfileAPI, TerminalShop::Internal::AnyHash)
|
9
|
+
end
|
8
10
|
|
9
11
|
# A Terminal shop user. (We have users, btw.)
|
10
12
|
sig { returns(TerminalShop::ProfileAPI::User) }
|
@@ -31,7 +33,12 @@ module TerminalShop
|
|
31
33
|
|
32
34
|
class User < TerminalShop::Internal::Type::BaseModel
|
33
35
|
OrHash =
|
34
|
-
T.type_alias
|
36
|
+
T.type_alias do
|
37
|
+
T.any(
|
38
|
+
TerminalShop::ProfileAPI::User,
|
39
|
+
TerminalShop::Internal::AnyHash
|
40
|
+
)
|
41
|
+
end
|
35
42
|
|
36
43
|
# Unique object identifier. The format and length of IDs may change over time.
|
37
44
|
sig { returns(String) }
|
@@ -7,7 +7,9 @@ module TerminalShop
|
|
7
7
|
include TerminalShop::Internal::Type::RequestParameters
|
8
8
|
|
9
9
|
OrHash =
|
10
|
-
T.type_alias
|
10
|
+
T.type_alias do
|
11
|
+
T.any(TerminalShop::ProfileMeParams, TerminalShop::Internal::AnyHash)
|
12
|
+
end
|
11
13
|
|
12
14
|
sig do
|
13
15
|
params(request_options: TerminalShop::RequestOptions::OrHash).returns(
|
@@ -4,7 +4,12 @@ module TerminalShop
|
|
4
4
|
module Models
|
5
5
|
class ProfileMeResponse < TerminalShop::Internal::Type::BaseModel
|
6
6
|
OrHash =
|
7
|
-
T.type_alias
|
7
|
+
T.type_alias do
|
8
|
+
T.any(
|
9
|
+
TerminalShop::Models::ProfileMeResponse,
|
10
|
+
TerminalShop::Internal::AnyHash
|
11
|
+
)
|
12
|
+
end
|
8
13
|
|
9
14
|
# A Terminal shop user's profile. (We have users, btw.)
|
10
15
|
sig { returns(TerminalShop::ProfileAPI) }
|
@@ -7,7 +7,12 @@ module TerminalShop
|
|
7
7
|
include TerminalShop::Internal::Type::RequestParameters
|
8
8
|
|
9
9
|
OrHash =
|
10
|
-
T.type_alias
|
10
|
+
T.type_alias do
|
11
|
+
T.any(
|
12
|
+
TerminalShop::ProfileUpdateParams,
|
13
|
+
TerminalShop::Internal::AnyHash
|
14
|
+
)
|
15
|
+
end
|
11
16
|
|
12
17
|
sig { returns(String) }
|
13
18
|
attr_accessor :email
|
@@ -4,7 +4,12 @@ module TerminalShop
|
|
4
4
|
module Models
|
5
5
|
class ProfileUpdateResponse < TerminalShop::Internal::Type::BaseModel
|
6
6
|
OrHash =
|
7
|
-
T.type_alias
|
7
|
+
T.type_alias do
|
8
|
+
T.any(
|
9
|
+
TerminalShop::Models::ProfileUpdateResponse,
|
10
|
+
TerminalShop::Internal::AnyHash
|
11
|
+
)
|
12
|
+
end
|
8
13
|
|
9
14
|
# A Terminal shop user's profile. (We have users, btw.)
|
10
15
|
sig { returns(TerminalShop::ProfileAPI) }
|
@@ -4,7 +4,9 @@ module TerminalShop
|
|
4
4
|
module Models
|
5
5
|
class SubscriptionAPI < TerminalShop::Internal::Type::BaseModel
|
6
6
|
OrHash =
|
7
|
-
T.type_alias
|
7
|
+
T.type_alias do
|
8
|
+
T.any(TerminalShop::SubscriptionAPI, TerminalShop::Internal::AnyHash)
|
9
|
+
end
|
8
10
|
|
9
11
|
# Unique object identifier. The format and length of IDs may change over time.
|
10
12
|
sig { returns(String) }
|
@@ -43,14 +45,7 @@ module TerminalShop
|
|
43
45
|
|
44
46
|
# Schedule of the subscription.
|
45
47
|
sig do
|
46
|
-
returns(
|
47
|
-
T.nilable(
|
48
|
-
T.any(
|
49
|
-
TerminalShop::SubscriptionAPI::Schedule::Fixed,
|
50
|
-
TerminalShop::SubscriptionAPI::Schedule::Weekly
|
51
|
-
)
|
52
|
-
)
|
53
|
-
)
|
48
|
+
returns(T.nilable(TerminalShop::SubscriptionAPI::Schedule::Variants))
|
54
49
|
end
|
55
50
|
attr_reader :schedule
|
56
51
|
|
@@ -116,11 +111,7 @@ module TerminalShop
|
|
116
111
|
product_variant_id: String,
|
117
112
|
quantity: Integer,
|
118
113
|
next_: String,
|
119
|
-
schedule:
|
120
|
-
T.any(
|
121
|
-
TerminalShop::SubscriptionAPI::Schedule::Fixed,
|
122
|
-
TerminalShop::SubscriptionAPI::Schedule::Weekly
|
123
|
-
)
|
114
|
+
schedule: TerminalShop::SubscriptionAPI::Schedule::Variants
|
124
115
|
}
|
125
116
|
)
|
126
117
|
end
|
@@ -141,7 +132,12 @@ module TerminalShop
|
|
141
132
|
|
142
133
|
class Fixed < TerminalShop::Internal::Type::BaseModel
|
143
134
|
OrHash =
|
144
|
-
T.type_alias
|
135
|
+
T.type_alias do
|
136
|
+
T.any(
|
137
|
+
TerminalShop::SubscriptionAPI::Schedule::Fixed,
|
138
|
+
TerminalShop::Internal::AnyHash
|
139
|
+
)
|
140
|
+
end
|
145
141
|
|
146
142
|
sig { returns(Symbol) }
|
147
143
|
attr_accessor :type
|
@@ -157,7 +153,12 @@ module TerminalShop
|
|
157
153
|
|
158
154
|
class Weekly < TerminalShop::Internal::Type::BaseModel
|
159
155
|
OrHash =
|
160
|
-
T.type_alias
|
156
|
+
T.type_alias do
|
157
|
+
T.any(
|
158
|
+
TerminalShop::SubscriptionAPI::Schedule::Weekly,
|
159
|
+
TerminalShop::Internal::AnyHash
|
160
|
+
)
|
161
|
+
end
|
161
162
|
|
162
163
|
sig { returns(Integer) }
|
163
164
|
attr_accessor :interval
|
@@ -7,7 +7,12 @@ module TerminalShop
|
|
7
7
|
include TerminalShop::Internal::Type::RequestParameters
|
8
8
|
|
9
9
|
OrHash =
|
10
|
-
T.type_alias
|
10
|
+
T.type_alias do
|
11
|
+
T.any(
|
12
|
+
TerminalShop::SubscriptionCreateParams,
|
13
|
+
TerminalShop::Internal::AnyHash
|
14
|
+
)
|
15
|
+
end
|
11
16
|
|
12
17
|
sig do
|
13
18
|
params(request_options: TerminalShop::RequestOptions::OrHash).returns(
|
@@ -4,7 +4,12 @@ module TerminalShop
|
|
4
4
|
module Models
|
5
5
|
class SubscriptionCreateResponse < TerminalShop::Internal::Type::BaseModel
|
6
6
|
OrHash =
|
7
|
-
T.type_alias
|
7
|
+
T.type_alias do
|
8
|
+
T.any(
|
9
|
+
TerminalShop::Models::SubscriptionCreateResponse,
|
10
|
+
TerminalShop::Internal::AnyHash
|
11
|
+
)
|
12
|
+
end
|
8
13
|
|
9
14
|
sig { returns(Symbol) }
|
10
15
|
attr_accessor :data
|
@@ -7,7 +7,12 @@ module TerminalShop
|
|
7
7
|
include TerminalShop::Internal::Type::RequestParameters
|
8
8
|
|
9
9
|
OrHash =
|
10
|
-
T.type_alias
|
10
|
+
T.type_alias do
|
11
|
+
T.any(
|
12
|
+
TerminalShop::SubscriptionDeleteParams,
|
13
|
+
TerminalShop::Internal::AnyHash
|
14
|
+
)
|
15
|
+
end
|
11
16
|
|
12
17
|
sig do
|
13
18
|
params(request_options: TerminalShop::RequestOptions::OrHash).returns(
|
@@ -4,7 +4,12 @@ module TerminalShop
|
|
4
4
|
module Models
|
5
5
|
class SubscriptionDeleteResponse < TerminalShop::Internal::Type::BaseModel
|
6
6
|
OrHash =
|
7
|
-
T.type_alias
|
7
|
+
T.type_alias do
|
8
|
+
T.any(
|
9
|
+
TerminalShop::Models::SubscriptionDeleteResponse,
|
10
|
+
TerminalShop::Internal::AnyHash
|
11
|
+
)
|
12
|
+
end
|
8
13
|
|
9
14
|
sig { returns(Symbol) }
|
10
15
|
attr_accessor :data
|
@@ -7,7 +7,12 @@ module TerminalShop
|
|
7
7
|
include TerminalShop::Internal::Type::RequestParameters
|
8
8
|
|
9
9
|
OrHash =
|
10
|
-
T.type_alias
|
10
|
+
T.type_alias do
|
11
|
+
T.any(
|
12
|
+
TerminalShop::SubscriptionGetParams,
|
13
|
+
TerminalShop::Internal::AnyHash
|
14
|
+
)
|
15
|
+
end
|
11
16
|
|
12
17
|
sig do
|
13
18
|
params(request_options: TerminalShop::RequestOptions::OrHash).returns(
|
@@ -4,7 +4,12 @@ module TerminalShop
|
|
4
4
|
module Models
|
5
5
|
class SubscriptionGetResponse < TerminalShop::Internal::Type::BaseModel
|
6
6
|
OrHash =
|
7
|
-
T.type_alias
|
7
|
+
T.type_alias do
|
8
|
+
T.any(
|
9
|
+
TerminalShop::Models::SubscriptionGetResponse,
|
10
|
+
TerminalShop::Internal::AnyHash
|
11
|
+
)
|
12
|
+
end
|
8
13
|
|
9
14
|
# Subscription to a Terminal shop product.
|
10
15
|
sig { returns(TerminalShop::SubscriptionAPI) }
|
@@ -7,7 +7,12 @@ module TerminalShop
|
|
7
7
|
include TerminalShop::Internal::Type::RequestParameters
|
8
8
|
|
9
9
|
OrHash =
|
10
|
-
T.type_alias
|
10
|
+
T.type_alias do
|
11
|
+
T.any(
|
12
|
+
TerminalShop::SubscriptionListParams,
|
13
|
+
TerminalShop::Internal::AnyHash
|
14
|
+
)
|
15
|
+
end
|
11
16
|
|
12
17
|
sig do
|
13
18
|
params(request_options: TerminalShop::RequestOptions::OrHash).returns(
|
@@ -4,7 +4,12 @@ module TerminalShop
|
|
4
4
|
module Models
|
5
5
|
class SubscriptionListResponse < TerminalShop::Internal::Type::BaseModel
|
6
6
|
OrHash =
|
7
|
-
T.type_alias
|
7
|
+
T.type_alias do
|
8
|
+
T.any(
|
9
|
+
TerminalShop::Models::SubscriptionListResponse,
|
10
|
+
TerminalShop::Internal::AnyHash
|
11
|
+
)
|
12
|
+
end
|
8
13
|
|
9
14
|
# List of subscriptions.
|
10
15
|
sig { returns(T::Array[TerminalShop::SubscriptionAPI]) }
|
@@ -7,7 +7,12 @@ module TerminalShop
|
|
7
7
|
include TerminalShop::Internal::Type::RequestParameters
|
8
8
|
|
9
9
|
OrHash =
|
10
|
-
T.type_alias
|
10
|
+
T.type_alias do
|
11
|
+
T.any(
|
12
|
+
TerminalShop::SubscriptionUpdateParams,
|
13
|
+
TerminalShop::Internal::AnyHash
|
14
|
+
)
|
15
|
+
end
|
11
16
|
|
12
17
|
# New shipping address ID for the subscription.
|
13
18
|
sig { returns(T.nilable(String)) }
|
@@ -101,7 +106,12 @@ module TerminalShop
|
|
101
106
|
|
102
107
|
class Fixed < TerminalShop::Internal::Type::BaseModel
|
103
108
|
OrHash =
|
104
|
-
T.type_alias
|
109
|
+
T.type_alias do
|
110
|
+
T.any(
|
111
|
+
TerminalShop::SubscriptionUpdateParams::Schedule::Fixed,
|
112
|
+
TerminalShop::Internal::AnyHash
|
113
|
+
)
|
114
|
+
end
|
105
115
|
|
106
116
|
sig { returns(Symbol) }
|
107
117
|
attr_accessor :type
|
@@ -117,7 +127,12 @@ module TerminalShop
|
|
117
127
|
|
118
128
|
class Weekly < TerminalShop::Internal::Type::BaseModel
|
119
129
|
OrHash =
|
120
|
-
T.type_alias
|
130
|
+
T.type_alias do
|
131
|
+
T.any(
|
132
|
+
TerminalShop::SubscriptionUpdateParams::Schedule::Weekly,
|
133
|
+
TerminalShop::Internal::AnyHash
|
134
|
+
)
|
135
|
+
end
|
121
136
|
|
122
137
|
sig { returns(Integer) }
|
123
138
|
attr_accessor :interval
|
@@ -4,7 +4,12 @@ module TerminalShop
|
|
4
4
|
module Models
|
5
5
|
class SubscriptionUpdateResponse < TerminalShop::Internal::Type::BaseModel
|
6
6
|
OrHash =
|
7
|
-
T.type_alias
|
7
|
+
T.type_alias do
|
8
|
+
T.any(
|
9
|
+
TerminalShop::Models::SubscriptionUpdateResponse,
|
10
|
+
TerminalShop::Internal::AnyHash
|
11
|
+
)
|
12
|
+
end
|
8
13
|
|
9
14
|
# Subscription to a Terminal shop product.
|
10
15
|
sig { returns(TerminalShop::SubscriptionAPI) }
|
@@ -4,7 +4,9 @@ module TerminalShop
|
|
4
4
|
module Models
|
5
5
|
class TokenAPI < TerminalShop::Internal::Type::BaseModel
|
6
6
|
OrHash =
|
7
|
-
T.type_alias
|
7
|
+
T.type_alias do
|
8
|
+
T.any(TerminalShop::TokenAPI, TerminalShop::Internal::AnyHash)
|
9
|
+
end
|
8
10
|
|
9
11
|
# Unique object identifier. The format and length of IDs may change over time.
|
10
12
|
sig { returns(String) }
|
@@ -7,7 +7,12 @@ module TerminalShop
|
|
7
7
|
include TerminalShop::Internal::Type::RequestParameters
|
8
8
|
|
9
9
|
OrHash =
|
10
|
-
T.type_alias
|
10
|
+
T.type_alias do
|
11
|
+
T.any(
|
12
|
+
TerminalShop::TokenCreateParams,
|
13
|
+
TerminalShop::Internal::AnyHash
|
14
|
+
)
|
15
|
+
end
|
11
16
|
|
12
17
|
sig do
|
13
18
|
params(request_options: TerminalShop::RequestOptions::OrHash).returns(
|
@@ -4,7 +4,12 @@ module TerminalShop
|
|
4
4
|
module Models
|
5
5
|
class TokenCreateResponse < TerminalShop::Internal::Type::BaseModel
|
6
6
|
OrHash =
|
7
|
-
T.type_alias
|
7
|
+
T.type_alias do
|
8
|
+
T.any(
|
9
|
+
TerminalShop::Models::TokenCreateResponse,
|
10
|
+
TerminalShop::Internal::AnyHash
|
11
|
+
)
|
12
|
+
end
|
8
13
|
|
9
14
|
sig { returns(TerminalShop::Models::TokenCreateResponse::Data) }
|
10
15
|
attr_reader :data
|
@@ -34,7 +39,12 @@ module TerminalShop
|
|
34
39
|
|
35
40
|
class Data < TerminalShop::Internal::Type::BaseModel
|
36
41
|
OrHash =
|
37
|
-
T.type_alias
|
42
|
+
T.type_alias do
|
43
|
+
T.any(
|
44
|
+
TerminalShop::Models::TokenCreateResponse::Data,
|
45
|
+
TerminalShop::Internal::AnyHash
|
46
|
+
)
|
47
|
+
end
|
38
48
|
|
39
49
|
# Personal token ID.
|
40
50
|
sig { returns(String) }
|
@@ -7,7 +7,12 @@ module TerminalShop
|
|
7
7
|
include TerminalShop::Internal::Type::RequestParameters
|
8
8
|
|
9
9
|
OrHash =
|
10
|
-
T.type_alias
|
10
|
+
T.type_alias do
|
11
|
+
T.any(
|
12
|
+
TerminalShop::TokenDeleteParams,
|
13
|
+
TerminalShop::Internal::AnyHash
|
14
|
+
)
|
15
|
+
end
|
11
16
|
|
12
17
|
sig do
|
13
18
|
params(request_options: TerminalShop::RequestOptions::OrHash).returns(
|
@@ -4,7 +4,12 @@ module TerminalShop
|
|
4
4
|
module Models
|
5
5
|
class TokenDeleteResponse < TerminalShop::Internal::Type::BaseModel
|
6
6
|
OrHash =
|
7
|
-
T.type_alias
|
7
|
+
T.type_alias do
|
8
|
+
T.any(
|
9
|
+
TerminalShop::Models::TokenDeleteResponse,
|
10
|
+
TerminalShop::Internal::AnyHash
|
11
|
+
)
|
12
|
+
end
|
8
13
|
|
9
14
|
sig { returns(Symbol) }
|
10
15
|
attr_accessor :data
|
@@ -7,7 +7,9 @@ module TerminalShop
|
|
7
7
|
include TerminalShop::Internal::Type::RequestParameters
|
8
8
|
|
9
9
|
OrHash =
|
10
|
-
T.type_alias
|
10
|
+
T.type_alias do
|
11
|
+
T.any(TerminalShop::TokenGetParams, TerminalShop::Internal::AnyHash)
|
12
|
+
end
|
11
13
|
|
12
14
|
sig do
|
13
15
|
params(request_options: TerminalShop::RequestOptions::OrHash).returns(
|
@@ -4,7 +4,12 @@ module TerminalShop
|
|
4
4
|
module Models
|
5
5
|
class TokenGetResponse < TerminalShop::Internal::Type::BaseModel
|
6
6
|
OrHash =
|
7
|
-
T.type_alias
|
7
|
+
T.type_alias do
|
8
|
+
T.any(
|
9
|
+
TerminalShop::Models::TokenGetResponse,
|
10
|
+
TerminalShop::Internal::AnyHash
|
11
|
+
)
|
12
|
+
end
|
8
13
|
|
9
14
|
# A personal access token used to access the Terminal API. If you leak this,
|
10
15
|
# expect large sums of coffee to be ordered on your credit card.
|
@@ -7,7 +7,9 @@ module TerminalShop
|
|
7
7
|
include TerminalShop::Internal::Type::RequestParameters
|
8
8
|
|
9
9
|
OrHash =
|
10
|
-
T.type_alias
|
10
|
+
T.type_alias do
|
11
|
+
T.any(TerminalShop::TokenListParams, TerminalShop::Internal::AnyHash)
|
12
|
+
end
|
11
13
|
|
12
14
|
sig do
|
13
15
|
params(request_options: TerminalShop::RequestOptions::OrHash).returns(
|
@@ -4,7 +4,12 @@ module TerminalShop
|
|
4
4
|
module Models
|
5
5
|
class TokenListResponse < TerminalShop::Internal::Type::BaseModel
|
6
6
|
OrHash =
|
7
|
-
T.type_alias
|
7
|
+
T.type_alias do
|
8
|
+
T.any(
|
9
|
+
TerminalShop::Models::TokenListResponse,
|
10
|
+
TerminalShop::Internal::AnyHash
|
11
|
+
)
|
12
|
+
end
|
8
13
|
|
9
14
|
# List of personal access tokens.
|
10
15
|
sig { returns(T::Array[TerminalShop::TokenAPI]) }
|
@@ -7,7 +7,9 @@ module TerminalShop
|
|
7
7
|
include TerminalShop::Internal::Type::RequestParameters
|
8
8
|
|
9
9
|
OrHash =
|
10
|
-
T.type_alias
|
10
|
+
T.type_alias do
|
11
|
+
T.any(TerminalShop::ViewInitParams, TerminalShop::Internal::AnyHash)
|
12
|
+
end
|
11
13
|
|
12
14
|
sig do
|
13
15
|
params(request_options: TerminalShop::RequestOptions::OrHash).returns(
|
@@ -4,7 +4,12 @@ module TerminalShop
|
|
4
4
|
module Models
|
5
5
|
class ViewInitResponse < TerminalShop::Internal::Type::BaseModel
|
6
6
|
OrHash =
|
7
|
-
T.type_alias
|
7
|
+
T.type_alias do
|
8
|
+
T.any(
|
9
|
+
TerminalShop::Models::ViewInitResponse,
|
10
|
+
TerminalShop::Internal::AnyHash
|
11
|
+
)
|
12
|
+
end
|
8
13
|
|
9
14
|
# Initial app data.
|
10
15
|
sig { returns(TerminalShop::Models::ViewInitResponse::Data) }
|
@@ -34,7 +39,12 @@ module TerminalShop
|
|
34
39
|
|
35
40
|
class Data < TerminalShop::Internal::Type::BaseModel
|
36
41
|
OrHash =
|
37
|
-
T.type_alias
|
42
|
+
T.type_alias do
|
43
|
+
T.any(
|
44
|
+
TerminalShop::Models::ViewInitResponse::Data,
|
45
|
+
TerminalShop::Internal::AnyHash
|
46
|
+
)
|
47
|
+
end
|
38
48
|
|
39
49
|
sig { returns(T::Array[TerminalShop::AddressAPI]) }
|
40
50
|
attr_accessor :addresses
|
@@ -8,7 +8,9 @@ module TerminalShop
|
|
8
8
|
# simply pass a Hash with symbol keys matching the attributes on this class.
|
9
9
|
class RequestOptions < TerminalShop::Internal::Type::BaseModel
|
10
10
|
OrHash =
|
11
|
-
T.type_alias
|
11
|
+
T.type_alias do
|
12
|
+
T.any(TerminalShop::RequestOptions, TerminalShop::Internal::AnyHash)
|
13
|
+
end
|
12
14
|
|
13
15
|
# @api private
|
14
16
|
sig { params(opts: TerminalShop::RequestOptions::OrHash).void }
|
@@ -2,6 +2,8 @@ module TerminalShop
|
|
2
2
|
module Internal
|
3
3
|
module Transport
|
4
4
|
class BaseClient
|
5
|
+
extend TerminalShop::Internal::Util::SorbetRuntimeSupport
|
6
|
+
|
5
7
|
type request_components =
|
6
8
|
{
|
7
9
|
method: Symbol,
|
@@ -20,7 +22,6 @@ module TerminalShop
|
|
20
22
|
model: TerminalShop::Internal::Type::Converter::input?,
|
21
23
|
options: TerminalShop::request_opts?
|
22
24
|
}
|
23
|
-
|
24
25
|
type request_input =
|
25
26
|
{
|
26
27
|
method: Symbol,
|
@@ -55,6 +56,20 @@ module TerminalShop
|
|
55
56
|
stream: Enumerable[String]?
|
56
57
|
) -> void
|
57
58
|
|
59
|
+
attr_reader base_url: URI::Generic
|
60
|
+
|
61
|
+
attr_reader timeout: Float
|
62
|
+
|
63
|
+
attr_reader max_retries: Integer
|
64
|
+
|
65
|
+
attr_reader initial_retry_delay: Float
|
66
|
+
|
67
|
+
attr_reader max_retry_delay: Float
|
68
|
+
|
69
|
+
attr_reader headers: ::Hash[String, String]
|
70
|
+
|
71
|
+
attr_reader idempotency_header: String?
|
72
|
+
|
58
73
|
# @api private
|
59
74
|
attr_reader requester: TerminalShop::Internal::Transport::PooledNetRequester
|
60
75
|
|
@@ -2,6 +2,8 @@ module TerminalShop
|
|
2
2
|
module Internal
|
3
3
|
module Transport
|
4
4
|
class PooledNetRequester
|
5
|
+
extend TerminalShop::Internal::Util::SorbetRuntimeSupport
|
6
|
+
|
5
7
|
type request =
|
6
8
|
{
|
7
9
|
method: Symbol,
|
@@ -13,6 +15,8 @@ module TerminalShop
|
|
13
15
|
|
14
16
|
KEEP_ALIVE_TIMEOUT: 30
|
15
17
|
|
18
|
+
DEFAULT_MAX_CONNECTIONS: Integer
|
19
|
+
|
16
20
|
def self.connect: (URI::Generic url) -> top
|
17
21
|
|
18
22
|
def self.calibrate_socket_timeout: (top conn, Float deadline) -> void
|
@@ -3,6 +3,7 @@ module TerminalShop
|
|
3
3
|
module Type
|
4
4
|
class ArrayOf[Elem]
|
5
5
|
include TerminalShop::Internal::Type::Converter
|
6
|
+
include TerminalShop::Internal::Util::SorbetRuntimeSupport
|
6
7
|
|
7
8
|
def self.[]: (
|
8
9
|
::Hash[Symbol, top]
|
@@ -27,6 +28,8 @@ module TerminalShop
|
|
27
28
|
state: TerminalShop::Internal::Type::Converter::dump_state
|
28
29
|
) -> (::Array[top] | top)
|
29
30
|
|
31
|
+
def to_sorbet_type: -> top
|
32
|
+
|
30
33
|
def item_type: -> Elem
|
31
34
|
|
32
35
|
def nilable?: -> bool
|