terminal-shop 0.1.0.pre.alpha.10 → 0.1.0.pre.alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/terminal-shop/base_client.rb +143 -124
- data/lib/terminal-shop/base_model.rb +2 -2
- data/lib/terminal-shop/base_page.rb +2 -6
- data/lib/terminal-shop/models/address.rb +0 -11
- data/lib/terminal-shop/models/address_create_response.rb +0 -6
- data/lib/terminal-shop/models/address_delete_response.rb +0 -6
- data/lib/terminal-shop/models/address_list_response.rb +0 -6
- data/lib/terminal-shop/models/app.rb +8 -9
- data/lib/terminal-shop/models/app_create_response.rb +0 -13
- data/lib/terminal-shop/models/app_delete_response.rb +0 -6
- data/lib/terminal-shop/models/app_get_response.rb +0 -6
- data/lib/terminal-shop/models/app_list_response.rb +0 -6
- data/lib/terminal-shop/models/card.rb +0 -16
- data/lib/terminal-shop/models/card_collect_response.rb +0 -12
- data/lib/terminal-shop/models/card_create_response.rb +0 -6
- data/lib/terminal-shop/models/card_delete_response.rb +0 -6
- data/lib/terminal-shop/models/card_list_response.rb +0 -6
- data/lib/terminal-shop/models/cart.rb +0 -33
- data/lib/terminal-shop/models/cart_convert_response.rb +0 -6
- data/lib/terminal-shop/models/cart_get_response.rb +0 -6
- data/lib/terminal-shop/models/cart_set_address_response.rb +0 -6
- data/lib/terminal-shop/models/cart_set_card_response.rb +0 -6
- data/lib/terminal-shop/models/cart_set_item_response.rb +0 -6
- data/lib/terminal-shop/models/email_create_response.rb +0 -6
- data/lib/terminal-shop/models/order.rb +0 -46
- data/lib/terminal-shop/models/order_get_response.rb +0 -6
- data/lib/terminal-shop/models/order_list_response.rb +0 -6
- data/lib/terminal-shop/models/product.rb +0 -11
- data/lib/terminal-shop/models/product_list_response.rb +0 -6
- data/lib/terminal-shop/models/product_variant.rb +0 -8
- data/lib/terminal-shop/models/profile.rb +0 -16
- data/lib/terminal-shop/models/profile_me_response.rb +0 -6
- data/lib/terminal-shop/models/profile_update_response.rb +0 -6
- data/lib/terminal-shop/models/subscription.rb +0 -24
- data/lib/terminal-shop/models/subscription_create_response.rb +0 -6
- data/lib/terminal-shop/models/subscription_delete_response.rb +0 -6
- data/lib/terminal-shop/models/subscription_list_response.rb +0 -6
- data/lib/terminal-shop/models/token.rb +0 -14
- data/lib/terminal-shop/models/token_create_response.rb +0 -13
- data/lib/terminal-shop/models/token_delete_response.rb +0 -6
- data/lib/terminal-shop/models/token_get_response.rb +0 -6
- data/lib/terminal-shop/models/token_list_response.rb +0 -6
- data/lib/terminal-shop/models/view_init_response.rb +0 -17
- data/lib/terminal-shop/pooled_net_requester.rb +116 -78
- data/lib/terminal-shop/resources/app.rb +2 -0
- data/lib/terminal-shop/util.rb +22 -7
- data/lib/terminal-shop/version.rb +1 -1
- data/lib/terminal-shop.rb +55 -55
- data/rbi/lib/terminal-shop/base_client.rbi +40 -27
- data/rbi/lib/terminal-shop/base_model.rbi +63 -99
- data/rbi/lib/terminal-shop/base_page.rbi +4 -3
- data/rbi/lib/terminal-shop/client.rbi +2 -1
- data/rbi/lib/terminal-shop/errors.rbi +10 -5
- data/rbi/lib/terminal-shop/models/address.rbi +16 -14
- data/rbi/lib/terminal-shop/models/address_create_params.rbi +16 -14
- data/rbi/lib/terminal-shop/models/address_list_response.rbi +1 -3
- data/rbi/lib/terminal-shop/models/app.rbi +11 -3
- data/rbi/lib/terminal-shop/models/app_create_response.rbi +2 -1
- data/rbi/lib/terminal-shop/models/app_list_response.rbi +1 -3
- data/rbi/lib/terminal-shop/models/card.rbi +5 -17
- data/rbi/lib/terminal-shop/models/card_collect_response.rbi +2 -1
- data/rbi/lib/terminal-shop/models/card_create_params.rbi +6 -2
- data/rbi/lib/terminal-shop/models/card_list_response.rbi +1 -3
- data/rbi/lib/terminal-shop/models/cart.rbi +16 -15
- data/rbi/lib/terminal-shop/models/cart_set_address_params.rbi +2 -1
- data/rbi/lib/terminal-shop/models/cart_set_card_params.rbi +6 -2
- data/rbi/lib/terminal-shop/models/cart_set_item_params.rbi +8 -8
- data/rbi/lib/terminal-shop/models/email_create_params.rbi +6 -2
- data/rbi/lib/terminal-shop/models/order.rbi +43 -44
- data/rbi/lib/terminal-shop/models/order_list_response.rbi +1 -3
- data/rbi/lib/terminal-shop/models/product.rbi +17 -14
- data/rbi/lib/terminal-shop/models/product_list_response.rbi +1 -3
- data/rbi/lib/terminal-shop/models/profile.rbi +13 -13
- data/rbi/lib/terminal-shop/models/profile_update_params.rbi +6 -8
- data/rbi/lib/terminal-shop/models/subscription.rbi +29 -26
- data/rbi/lib/terminal-shop/models/subscription_list_response.rbi +2 -1
- data/rbi/lib/terminal-shop/models/token_create_response.rbi +2 -1
- data/rbi/lib/terminal-shop/models/token_list_response.rbi +1 -3
- data/rbi/lib/terminal-shop/models/view_init_response.rbi +26 -34
- data/rbi/lib/terminal-shop/pooled_net_requester.rbi +59 -0
- data/rbi/lib/terminal-shop/request_options.rbi +6 -24
- data/rbi/lib/terminal-shop/resources/address.rbi +6 -11
- data/rbi/lib/terminal-shop/resources/app.rbi +10 -13
- data/rbi/lib/terminal-shop/resources/card.rbi +8 -20
- data/rbi/lib/terminal-shop/resources/cart.rbi +10 -21
- data/rbi/lib/terminal-shop/resources/email.rbi +2 -1
- data/rbi/lib/terminal-shop/resources/order.rbi +4 -10
- data/rbi/lib/terminal-shop/resources/product.rbi +2 -9
- data/rbi/lib/terminal-shop/resources/profile.rbi +4 -10
- data/rbi/lib/terminal-shop/resources/subscription.rbi +6 -11
- data/rbi/lib/terminal-shop/resources/token.rbi +8 -20
- data/rbi/lib/terminal-shop/resources/view.rbi +2 -9
- data/rbi/lib/terminal-shop/util.rbi +25 -23
- data/rbi/lib/terminal-shop/version.rbi +1 -1
- data/sig/terminal-shop/base_client.rbs +27 -27
- data/sig/terminal-shop/base_model.rbs +0 -2
- data/sig/terminal-shop/base_page.rbs +1 -1
- data/sig/terminal-shop/models/app.rbs +5 -2
- data/sig/terminal-shop/pooled_net_requester.rbs +42 -0
- data/sig/terminal-shop/resources/app.rbs +1 -0
- data/sig/terminal-shop/util.rbs +7 -1
- data/sig/terminal-shop/version.rbs +1 -1
- metadata +5 -3
@@ -9,13 +9,8 @@ module TerminalShop
|
|
9
9
|
end
|
10
10
|
|
11
11
|
sig do
|
12
|
-
params(
|
13
|
-
|
14
|
-
TerminalShop::RequestOptions,
|
15
|
-
T::Hash[Symbol,
|
16
|
-
T.anything]
|
17
|
-
)
|
18
|
-
).returns(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything]))
|
12
|
+
params(_: T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything]))
|
13
|
+
.returns(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything]))
|
19
14
|
end
|
20
15
|
def request_options=(_)
|
21
16
|
end
|
@@ -45,17 +40,8 @@ module TerminalShop
|
|
45
40
|
end
|
46
41
|
|
47
42
|
sig do
|
48
|
-
params(
|
49
|
-
|
50
|
-
T::Hash[String,
|
51
|
-
T.nilable(
|
52
|
-
T.any(
|
53
|
-
T::Array[String],
|
54
|
-
String
|
55
|
-
)
|
56
|
-
)]
|
57
|
-
)
|
58
|
-
).returns(T.nilable(T::Hash[String, T.nilable(T.any(T::Array[String], String))]))
|
43
|
+
params(_: T.nilable(T::Hash[String, T.nilable(T.any(T::Array[String], String))]))
|
44
|
+
.returns(T.nilable(T::Hash[String, T.nilable(T.any(T::Array[String], String))]))
|
59
45
|
end
|
60
46
|
def extra_query=(_)
|
61
47
|
end
|
@@ -65,12 +51,8 @@ module TerminalShop
|
|
65
51
|
end
|
66
52
|
|
67
53
|
sig do
|
68
|
-
params(
|
69
|
-
|
70
|
-
T::Hash[String,
|
71
|
-
T.nilable(String)]
|
72
|
-
)
|
73
|
-
).returns(T.nilable(T::Hash[String, T.nilable(String)]))
|
54
|
+
params(_: T.nilable(T::Hash[String, T.nilable(String)]))
|
55
|
+
.returns(T.nilable(T::Hash[String, T.nilable(String)]))
|
74
56
|
end
|
75
57
|
def extra_headers=(_)
|
76
58
|
end
|
@@ -14,7 +14,8 @@ module TerminalShop
|
|
14
14
|
province: String,
|
15
15
|
street2: String,
|
16
16
|
request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything]))
|
17
|
-
)
|
17
|
+
)
|
18
|
+
.returns(TerminalShop::Models::AddressCreateResponse)
|
18
19
|
end
|
19
20
|
def create(
|
20
21
|
city:,
|
@@ -30,15 +31,8 @@ module TerminalShop
|
|
30
31
|
end
|
31
32
|
|
32
33
|
sig do
|
33
|
-
params(
|
34
|
-
|
35
|
-
T.any(
|
36
|
-
TerminalShop::RequestOptions,
|
37
|
-
T::Hash[Symbol,
|
38
|
-
T.anything]
|
39
|
-
)
|
40
|
-
)
|
41
|
-
).returns(TerminalShop::Models::AddressListResponse)
|
34
|
+
params(request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything])))
|
35
|
+
.returns(TerminalShop::Models::AddressListResponse)
|
42
36
|
end
|
43
37
|
def list(request_options: {})
|
44
38
|
end
|
@@ -47,7 +41,8 @@ module TerminalShop
|
|
47
41
|
params(
|
48
42
|
id: String,
|
49
43
|
request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything]))
|
50
|
-
)
|
44
|
+
)
|
45
|
+
.returns(TerminalShop::Models::AddressDeleteResponse)
|
51
46
|
end
|
52
47
|
def delete(id, request_options: {})
|
53
48
|
end
|
@@ -8,22 +8,17 @@ module TerminalShop
|
|
8
8
|
id: String,
|
9
9
|
name: String,
|
10
10
|
redirect_uri: String,
|
11
|
+
secret: String,
|
11
12
|
request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything]))
|
12
|
-
)
|
13
|
+
)
|
14
|
+
.returns(TerminalShop::Models::AppCreateResponse)
|
13
15
|
end
|
14
|
-
def create(id:, name:, redirect_uri:, request_options: {})
|
16
|
+
def create(id:, name:, redirect_uri:, secret:, request_options: {})
|
15
17
|
end
|
16
18
|
|
17
19
|
sig do
|
18
|
-
params(
|
19
|
-
|
20
|
-
T.any(
|
21
|
-
TerminalShop::RequestOptions,
|
22
|
-
T::Hash[Symbol,
|
23
|
-
T.anything]
|
24
|
-
)
|
25
|
-
)
|
26
|
-
).returns(TerminalShop::Models::AppListResponse)
|
20
|
+
params(request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything])))
|
21
|
+
.returns(TerminalShop::Models::AppListResponse)
|
27
22
|
end
|
28
23
|
def list(request_options: {})
|
29
24
|
end
|
@@ -32,7 +27,8 @@ module TerminalShop
|
|
32
27
|
params(
|
33
28
|
id: String,
|
34
29
|
request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything]))
|
35
|
-
)
|
30
|
+
)
|
31
|
+
.returns(TerminalShop::Models::AppDeleteResponse)
|
36
32
|
end
|
37
33
|
def delete(id, request_options: {})
|
38
34
|
end
|
@@ -41,7 +37,8 @@ module TerminalShop
|
|
41
37
|
params(
|
42
38
|
id: String,
|
43
39
|
request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything]))
|
44
|
-
)
|
40
|
+
)
|
41
|
+
.returns(TerminalShop::Models::AppGetResponse)
|
45
42
|
end
|
46
43
|
def get(id, request_options: {})
|
47
44
|
end
|
@@ -7,21 +7,15 @@ module TerminalShop
|
|
7
7
|
params(
|
8
8
|
token: String,
|
9
9
|
request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything]))
|
10
|
-
)
|
10
|
+
)
|
11
|
+
.returns(TerminalShop::Models::CardCreateResponse)
|
11
12
|
end
|
12
13
|
def create(token:, request_options: {})
|
13
14
|
end
|
14
15
|
|
15
16
|
sig do
|
16
|
-
params(
|
17
|
-
|
18
|
-
T.any(
|
19
|
-
TerminalShop::RequestOptions,
|
20
|
-
T::Hash[Symbol,
|
21
|
-
T.anything]
|
22
|
-
)
|
23
|
-
)
|
24
|
-
).returns(TerminalShop::Models::CardListResponse)
|
17
|
+
params(request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything])))
|
18
|
+
.returns(TerminalShop::Models::CardListResponse)
|
25
19
|
end
|
26
20
|
def list(request_options: {})
|
27
21
|
end
|
@@ -30,21 +24,15 @@ module TerminalShop
|
|
30
24
|
params(
|
31
25
|
id: String,
|
32
26
|
request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything]))
|
33
|
-
)
|
27
|
+
)
|
28
|
+
.returns(TerminalShop::Models::CardDeleteResponse)
|
34
29
|
end
|
35
30
|
def delete(id, request_options: {})
|
36
31
|
end
|
37
32
|
|
38
33
|
sig do
|
39
|
-
params(
|
40
|
-
|
41
|
-
T.any(
|
42
|
-
TerminalShop::RequestOptions,
|
43
|
-
T::Hash[Symbol,
|
44
|
-
T.anything]
|
45
|
-
)
|
46
|
-
)
|
47
|
-
).returns(TerminalShop::Models::CardCollectResponse)
|
34
|
+
params(request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything])))
|
35
|
+
.returns(TerminalShop::Models::CardCollectResponse)
|
48
36
|
end
|
49
37
|
def collect(request_options: {})
|
50
38
|
end
|
@@ -4,29 +4,15 @@ module TerminalShop
|
|
4
4
|
module Resources
|
5
5
|
class Cart
|
6
6
|
sig do
|
7
|
-
params(
|
8
|
-
|
9
|
-
T.any(
|
10
|
-
TerminalShop::RequestOptions,
|
11
|
-
T::Hash[Symbol,
|
12
|
-
T.anything]
|
13
|
-
)
|
14
|
-
)
|
15
|
-
).returns(TerminalShop::Models::CartConvertResponse)
|
7
|
+
params(request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything])))
|
8
|
+
.returns(TerminalShop::Models::CartConvertResponse)
|
16
9
|
end
|
17
10
|
def convert(request_options: {})
|
18
11
|
end
|
19
12
|
|
20
13
|
sig do
|
21
|
-
params(
|
22
|
-
|
23
|
-
T.any(
|
24
|
-
TerminalShop::RequestOptions,
|
25
|
-
T::Hash[Symbol,
|
26
|
-
T.anything]
|
27
|
-
)
|
28
|
-
)
|
29
|
-
).returns(TerminalShop::Models::CartGetResponse)
|
14
|
+
params(request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything])))
|
15
|
+
.returns(TerminalShop::Models::CartGetResponse)
|
30
16
|
end
|
31
17
|
def get(request_options: {})
|
32
18
|
end
|
@@ -35,7 +21,8 @@ module TerminalShop
|
|
35
21
|
params(
|
36
22
|
address_id: String,
|
37
23
|
request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything]))
|
38
|
-
)
|
24
|
+
)
|
25
|
+
.returns(TerminalShop::Models::CartSetAddressResponse)
|
39
26
|
end
|
40
27
|
def set_address(address_id:, request_options: {})
|
41
28
|
end
|
@@ -44,7 +31,8 @@ module TerminalShop
|
|
44
31
|
params(
|
45
32
|
card_id: String,
|
46
33
|
request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything]))
|
47
|
-
)
|
34
|
+
)
|
35
|
+
.returns(TerminalShop::Models::CartSetCardResponse)
|
48
36
|
end
|
49
37
|
def set_card(card_id:, request_options: {})
|
50
38
|
end
|
@@ -54,7 +42,8 @@ module TerminalShop
|
|
54
42
|
product_variant_id: String,
|
55
43
|
quantity: Integer,
|
56
44
|
request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything]))
|
57
|
-
)
|
45
|
+
)
|
46
|
+
.returns(TerminalShop::Models::CartSetItemResponse)
|
58
47
|
end
|
59
48
|
def set_item(product_variant_id:, quantity:, request_options: {})
|
60
49
|
end
|
@@ -7,7 +7,8 @@ module TerminalShop
|
|
7
7
|
params(
|
8
8
|
email: String,
|
9
9
|
request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything]))
|
10
|
-
)
|
10
|
+
)
|
11
|
+
.returns(TerminalShop::Models::EmailCreateResponse)
|
11
12
|
end
|
12
13
|
def create(email:, request_options: {})
|
13
14
|
end
|
@@ -4,15 +4,8 @@ module TerminalShop
|
|
4
4
|
module Resources
|
5
5
|
class Order
|
6
6
|
sig do
|
7
|
-
params(
|
8
|
-
|
9
|
-
T.any(
|
10
|
-
TerminalShop::RequestOptions,
|
11
|
-
T::Hash[Symbol,
|
12
|
-
T.anything]
|
13
|
-
)
|
14
|
-
)
|
15
|
-
).returns(TerminalShop::Models::OrderListResponse)
|
7
|
+
params(request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything])))
|
8
|
+
.returns(TerminalShop::Models::OrderListResponse)
|
16
9
|
end
|
17
10
|
def list(request_options: {})
|
18
11
|
end
|
@@ -21,7 +14,8 @@ module TerminalShop
|
|
21
14
|
params(
|
22
15
|
id: String,
|
23
16
|
request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything]))
|
24
|
-
)
|
17
|
+
)
|
18
|
+
.returns(TerminalShop::Models::OrderGetResponse)
|
25
19
|
end
|
26
20
|
def get(id, request_options: {})
|
27
21
|
end
|
@@ -4,15 +4,8 @@ module TerminalShop
|
|
4
4
|
module Resources
|
5
5
|
class Product
|
6
6
|
sig do
|
7
|
-
params(
|
8
|
-
|
9
|
-
T.any(
|
10
|
-
TerminalShop::RequestOptions,
|
11
|
-
T::Hash[Symbol,
|
12
|
-
T.anything]
|
13
|
-
)
|
14
|
-
)
|
15
|
-
).returns(TerminalShop::Models::ProductListResponse)
|
7
|
+
params(request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything])))
|
8
|
+
.returns(TerminalShop::Models::ProductListResponse)
|
16
9
|
end
|
17
10
|
def list(request_options: {})
|
18
11
|
end
|
@@ -8,21 +8,15 @@ module TerminalShop
|
|
8
8
|
email: T.nilable(String),
|
9
9
|
name: T.nilable(String),
|
10
10
|
request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything]))
|
11
|
-
)
|
11
|
+
)
|
12
|
+
.returns(TerminalShop::Models::ProfileUpdateResponse)
|
12
13
|
end
|
13
14
|
def update(email: nil, name: nil, request_options: {})
|
14
15
|
end
|
15
16
|
|
16
17
|
sig do
|
17
|
-
params(
|
18
|
-
|
19
|
-
T.any(
|
20
|
-
TerminalShop::RequestOptions,
|
21
|
-
T::Hash[Symbol,
|
22
|
-
T.anything]
|
23
|
-
)
|
24
|
-
)
|
25
|
-
).returns(TerminalShop::Models::ProfileMeResponse)
|
18
|
+
params(request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything])))
|
19
|
+
.returns(TerminalShop::Models::ProfileMeResponse)
|
26
20
|
end
|
27
21
|
def me(request_options: {})
|
28
22
|
end
|
@@ -17,7 +17,8 @@ module TerminalShop
|
|
17
17
|
TerminalShop::Models::SubscriptionAPI::Schedule::Weekly
|
18
18
|
),
|
19
19
|
request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything]))
|
20
|
-
)
|
20
|
+
)
|
21
|
+
.returns(TerminalShop::Models::SubscriptionCreateResponse)
|
21
22
|
end
|
22
23
|
def create(
|
23
24
|
id:,
|
@@ -33,15 +34,8 @@ module TerminalShop
|
|
33
34
|
end
|
34
35
|
|
35
36
|
sig do
|
36
|
-
params(
|
37
|
-
|
38
|
-
T.any(
|
39
|
-
TerminalShop::RequestOptions,
|
40
|
-
T::Hash[Symbol,
|
41
|
-
T.anything]
|
42
|
-
)
|
43
|
-
)
|
44
|
-
).returns(TerminalShop::Models::SubscriptionListResponse)
|
37
|
+
params(request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything])))
|
38
|
+
.returns(TerminalShop::Models::SubscriptionListResponse)
|
45
39
|
end
|
46
40
|
def list(request_options: {})
|
47
41
|
end
|
@@ -50,7 +44,8 @@ module TerminalShop
|
|
50
44
|
params(
|
51
45
|
id: String,
|
52
46
|
request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything]))
|
53
|
-
)
|
47
|
+
)
|
48
|
+
.returns(TerminalShop::Models::SubscriptionDeleteResponse)
|
54
49
|
end
|
55
50
|
def delete(id, request_options: {})
|
56
51
|
end
|
@@ -4,29 +4,15 @@ module TerminalShop
|
|
4
4
|
module Resources
|
5
5
|
class Token
|
6
6
|
sig do
|
7
|
-
params(
|
8
|
-
|
9
|
-
T.any(
|
10
|
-
TerminalShop::RequestOptions,
|
11
|
-
T::Hash[Symbol,
|
12
|
-
T.anything]
|
13
|
-
)
|
14
|
-
)
|
15
|
-
).returns(TerminalShop::Models::TokenCreateResponse)
|
7
|
+
params(request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything])))
|
8
|
+
.returns(TerminalShop::Models::TokenCreateResponse)
|
16
9
|
end
|
17
10
|
def create(request_options: {})
|
18
11
|
end
|
19
12
|
|
20
13
|
sig do
|
21
|
-
params(
|
22
|
-
|
23
|
-
T.any(
|
24
|
-
TerminalShop::RequestOptions,
|
25
|
-
T::Hash[Symbol,
|
26
|
-
T.anything]
|
27
|
-
)
|
28
|
-
)
|
29
|
-
).returns(TerminalShop::Models::TokenListResponse)
|
14
|
+
params(request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything])))
|
15
|
+
.returns(TerminalShop::Models::TokenListResponse)
|
30
16
|
end
|
31
17
|
def list(request_options: {})
|
32
18
|
end
|
@@ -35,7 +21,8 @@ module TerminalShop
|
|
35
21
|
params(
|
36
22
|
id: String,
|
37
23
|
request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything]))
|
38
|
-
)
|
24
|
+
)
|
25
|
+
.returns(TerminalShop::Models::TokenDeleteResponse)
|
39
26
|
end
|
40
27
|
def delete(id, request_options: {})
|
41
28
|
end
|
@@ -44,7 +31,8 @@ module TerminalShop
|
|
44
31
|
params(
|
45
32
|
id: String,
|
46
33
|
request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything]))
|
47
|
-
)
|
34
|
+
)
|
35
|
+
.returns(TerminalShop::Models::TokenGetResponse)
|
48
36
|
end
|
49
37
|
def get(id, request_options: {})
|
50
38
|
end
|
@@ -4,15 +4,8 @@ module TerminalShop
|
|
4
4
|
module Resources
|
5
5
|
class View
|
6
6
|
sig do
|
7
|
-
params(
|
8
|
-
|
9
|
-
T.any(
|
10
|
-
TerminalShop::RequestOptions,
|
11
|
-
T::Hash[Symbol,
|
12
|
-
T.anything]
|
13
|
-
)
|
14
|
-
)
|
15
|
-
).returns(TerminalShop::Models::ViewInitResponse)
|
7
|
+
params(request_options: T.nilable(T.any(TerminalShop::RequestOptions, T::Hash[Symbol, T.anything])))
|
8
|
+
.returns(TerminalShop::Models::ViewInitResponse)
|
16
9
|
end
|
17
10
|
def init(request_options: {})
|
18
11
|
end
|
@@ -26,12 +26,17 @@ module TerminalShop
|
|
26
26
|
def self.coerce_hash(input)
|
27
27
|
end
|
28
28
|
|
29
|
+
sig { returns(Float) }
|
30
|
+
def self.monotonic_secs
|
31
|
+
end
|
32
|
+
|
29
33
|
sig do
|
30
34
|
params(
|
31
35
|
exceptions: T::Array[Exception],
|
32
36
|
sentinel: T.nilable(T.anything),
|
33
37
|
blk: T.nilable(T.proc.returns(T.anything))
|
34
|
-
)
|
38
|
+
)
|
39
|
+
.returns(T.nilable(T.anything))
|
35
40
|
end
|
36
41
|
def self.suppress(*exceptions, sentinel: nil, &blk)
|
37
42
|
end
|
@@ -39,11 +44,8 @@ module TerminalShop
|
|
39
44
|
OMIT = T.let(T.anything, T.anything)
|
40
45
|
|
41
46
|
sig do
|
42
|
-
params(
|
43
|
-
|
44
|
-
sentinel: T.nilable(T.anything),
|
45
|
-
concat: T::Boolean
|
46
|
-
).returns(T.anything)
|
47
|
+
params(values: T::Array[T.anything], sentinel: T.nilable(T.anything), concat: T::Boolean)
|
48
|
+
.returns(T.anything)
|
47
49
|
end
|
48
50
|
def self.deep_merge(*values, sentinel: nil, concat: false)
|
49
51
|
end
|
@@ -54,7 +56,8 @@ module TerminalShop
|
|
54
56
|
pick: T.nilable(T.any(Symbol, Integer, T::Array[T.any(Symbol, Integer)])),
|
55
57
|
sentinel: T.nilable(T.anything),
|
56
58
|
blk: T.nilable(T.proc.returns(T.anything))
|
57
|
-
)
|
59
|
+
)
|
60
|
+
.returns(T.nilable(T.anything))
|
58
61
|
end
|
59
62
|
def self.dig(data, pick, sentinel = nil, &blk)
|
60
63
|
end
|
@@ -86,10 +89,8 @@ module TerminalShop
|
|
86
89
|
end
|
87
90
|
|
88
91
|
sig do
|
89
|
-
params(
|
90
|
-
|
91
|
-
rhs: TerminalShop::Util::ParsedUriShape
|
92
|
-
).returns(URI::Generic)
|
92
|
+
params(lhs: TerminalShop::Util::ParsedUriShape, rhs: TerminalShop::Util::ParsedUriShape)
|
93
|
+
.returns(URI::Generic)
|
93
94
|
end
|
94
95
|
def self.join_parsed_uri(lhs, rhs)
|
95
96
|
end
|
@@ -99,21 +100,15 @@ module TerminalShop
|
|
99
100
|
end
|
100
101
|
|
101
102
|
sig do
|
102
|
-
params(
|
103
|
-
|
104
|
-
T::Hash[String,
|
105
|
-
T.nilable(T.any(T::Array[String], String))]
|
106
|
-
)
|
107
|
-
).returns(T.nilable(String))
|
103
|
+
params(query: T.nilable(T::Hash[String, T.nilable(T.any(T::Array[String], String))]))
|
104
|
+
.returns(T.nilable(String))
|
108
105
|
end
|
109
106
|
def self.encode_query(query)
|
110
107
|
end
|
111
108
|
|
112
109
|
sig do
|
113
|
-
params(
|
114
|
-
|
115
|
-
T.nilable(T.any(String, Integer))]]
|
116
|
-
).returns(T::Hash[String, String])
|
110
|
+
params(headers: T::Array[T::Hash[String, T.nilable(T.any(String, Integer))]])
|
111
|
+
.returns(T::Hash[String, String])
|
117
112
|
end
|
118
113
|
def self.normalized_headers(*headers)
|
119
114
|
end
|
@@ -122,8 +117,15 @@ module TerminalShop
|
|
122
117
|
def self.encode_content(headers, body)
|
123
118
|
end
|
124
119
|
|
125
|
-
sig
|
126
|
-
|
120
|
+
sig do
|
121
|
+
params(
|
122
|
+
headers: T.any(T::Hash[String, String], Net::HTTPHeader),
|
123
|
+
stream: T::Enumerable[String],
|
124
|
+
suppress_error: T::Boolean
|
125
|
+
)
|
126
|
+
.returns(T.anything)
|
127
|
+
end
|
128
|
+
def self.decode_content(headers, stream:, suppress_error: false)
|
127
129
|
end
|
128
130
|
|
129
131
|
sig { params(io: StringIO, boundary: String, key: T.any(Symbol, String), val: T.anything).void }
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module TerminalShop
|
2
2
|
class BaseClient
|
3
|
-
type
|
3
|
+
type request_components =
|
4
4
|
{
|
5
5
|
method: Symbol,
|
6
6
|
path: String | ::Array[String],
|
@@ -10,24 +10,36 @@ module TerminalShop
|
|
10
10
|
unwrap: Symbol?,
|
11
11
|
page: Class?,
|
12
12
|
model: TerminalShop::Converter::input?,
|
13
|
-
options:
|
14
|
-
| TerminalShop::request_options
|
15
|
-
| ::Hash[Symbol, top])?
|
13
|
+
options: TerminalShop::request_opts?
|
16
14
|
}
|
17
15
|
|
18
|
-
type
|
16
|
+
type request_input =
|
19
17
|
{
|
20
18
|
method: Symbol,
|
21
19
|
url: URI::Generic,
|
22
20
|
headers: ::Hash[String, String],
|
23
21
|
body: top,
|
22
|
+
streaming: bool,
|
24
23
|
max_retries: Integer,
|
25
24
|
timeout: Float
|
26
25
|
}
|
27
26
|
|
28
27
|
MAX_REDIRECTS: 20
|
29
28
|
|
30
|
-
def self.validate!: (
|
29
|
+
def self.validate!: (
|
30
|
+
TerminalShop::BaseClient::request_components req
|
31
|
+
) -> void
|
32
|
+
|
33
|
+
def self.should_retry?: (
|
34
|
+
Integer status,
|
35
|
+
headers: ::Hash[String, String]
|
36
|
+
) -> bool
|
37
|
+
|
38
|
+
def self.follow_redirect: (
|
39
|
+
TerminalShop::BaseClient::request_input request,
|
40
|
+
status: Integer,
|
41
|
+
response_headers: ::Hash[String, String]
|
42
|
+
) -> TerminalShop::BaseClient::request_input
|
31
43
|
|
32
44
|
# @private
|
33
45
|
attr_accessor requester: top
|
@@ -47,36 +59,26 @@ module TerminalShop
|
|
47
59
|
private def generate_idempotency_key: -> String
|
48
60
|
|
49
61
|
private def build_request: (
|
50
|
-
TerminalShop::BaseClient::
|
62
|
+
TerminalShop::BaseClient::request_components req,
|
51
63
|
TerminalShop::request_options opts
|
52
|
-
) -> TerminalShop::BaseClient::
|
53
|
-
|
54
|
-
private def should_retry?: (
|
55
|
-
Integer status,
|
56
|
-
headers: ::Hash[String, String]
|
57
|
-
) -> bool
|
64
|
+
) -> TerminalShop::BaseClient::request_input
|
58
65
|
|
59
66
|
private def retry_delay: (
|
60
67
|
::Hash[String, String] headers,
|
61
68
|
retry_count: Integer
|
62
69
|
) -> Float
|
63
70
|
|
64
|
-
private def follow_redirect: (
|
65
|
-
TerminalShop::BaseClient::normalized_request request,
|
66
|
-
status: Integer,
|
67
|
-
location_header: String
|
68
|
-
) -> TerminalShop::BaseClient::normalized_request
|
69
|
-
|
70
71
|
private def send_request: (
|
71
|
-
TerminalShop::BaseClient::
|
72
|
+
TerminalShop::BaseClient::request_input request,
|
72
73
|
redirect_count: Integer,
|
73
74
|
retry_count: Integer,
|
74
75
|
send_retry_header: bool
|
75
|
-
) -> top
|
76
|
+
) -> [top, Enumerable[String]]
|
76
77
|
|
77
78
|
private def parse_response: (
|
78
|
-
TerminalShop::BaseClient::
|
79
|
-
|
79
|
+
TerminalShop::BaseClient::request_components req,
|
80
|
+
headers: ::Hash[String, String],
|
81
|
+
stream: Enumerable[String]
|
80
82
|
) -> top
|
81
83
|
|
82
84
|
def request:
|
@@ -89,11 +91,9 @@ module TerminalShop
|
|
89
91
|
unwrap: Symbol?,
|
90
92
|
page: Class?,
|
91
93
|
model: TerminalShop::Converter::input?,
|
92
|
-
options:
|
93
|
-
| TerminalShop::request_options
|
94
|
-
| ::Hash[Symbol, top])?
|
94
|
+
options: TerminalShop::request_opts?
|
95
95
|
) -> top
|
96
|
-
| (TerminalShop::BaseClient::
|
96
|
+
| (TerminalShop::BaseClient::request_components req) -> top
|
97
97
|
|
98
98
|
def inspect: -> String
|
99
99
|
end
|
@@ -83,7 +83,6 @@ module TerminalShop
|
|
83
83
|
end
|
84
84
|
|
85
85
|
class Union
|
86
|
-
extend TerminalShop::Extern
|
87
86
|
extend TerminalShop::Converter
|
88
87
|
|
89
88
|
private def self.known_variants: -> ::Array[[Symbol?, Proc]]
|
@@ -170,7 +169,6 @@ module TerminalShop
|
|
170
169
|
end
|
171
170
|
|
172
171
|
class BaseModel
|
173
|
-
extend TerminalShop::Extern
|
174
172
|
extend TerminalShop::Converter
|
175
173
|
|
176
174
|
type known_field = { mode: (:coerce | :dump)?, required: bool }
|