terminal-shop 0.1.0.pre.alpha.15 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +27 -19
- data/lib/terminal-shop/base_client.rb +35 -55
- data/lib/terminal-shop/base_model.rb +457 -438
- data/lib/terminal-shop/base_page.rb +2 -2
- data/lib/terminal-shop/client.rb +1 -1
- data/lib/terminal-shop/errors.rb +3 -2
- data/lib/terminal-shop/models/address_get_params.rb +18 -0
- data/lib/terminal-shop/models/address_get_response.rb +20 -0
- data/lib/terminal-shop/models/app_create_params.rb +14 -2
- data/lib/terminal-shop/models/card_get_params.rb +18 -0
- data/lib/terminal-shop/models/card_get_response.rb +20 -0
- data/lib/terminal-shop/models/cart.rb +35 -2
- data/lib/terminal-shop/models/cart_convert_params.rb +11 -1
- data/lib/terminal-shop/models/cart_redeem_gift_card_params.rb +24 -0
- data/lib/terminal-shop/models/cart_redeem_gift_card_response.rb +48 -0
- data/lib/terminal-shop/models/cart_remove_gift_card_params.rb +18 -0
- data/lib/terminal-shop/models/cart_remove_gift_card_response.rb +19 -0
- data/lib/terminal-shop/models/product.rb +72 -46
- data/lib/terminal-shop/models/product_get_params.rb +18 -0
- data/lib/terminal-shop/models/product_get_response.rb +20 -0
- data/lib/terminal-shop/models/profile_update_params.rb +7 -9
- data/lib/terminal-shop/models/subscription.rb +0 -10
- data/lib/terminal-shop/models/subscription_get_params.rb +18 -0
- data/lib/terminal-shop/models/subscription_get_response.rb +20 -0
- data/lib/terminal-shop/pooled_net_requester.rb +14 -9
- data/lib/terminal-shop/resources/address.rb +19 -0
- data/lib/terminal-shop/resources/app.rb +2 -6
- data/lib/terminal-shop/resources/card.rb +19 -0
- data/lib/terminal-shop/resources/cart.rb +43 -1
- data/lib/terminal-shop/resources/product.rb +19 -0
- data/lib/terminal-shop/resources/profile.rb +3 -3
- data/lib/terminal-shop/resources/subscription.rb +19 -0
- data/lib/terminal-shop/util.rb +135 -1
- data/lib/terminal-shop/version.rb +1 -1
- data/lib/terminal-shop.rb +13 -1
- data/rbi/lib/terminal-shop/base_client.rbi +29 -35
- data/rbi/lib/terminal-shop/base_model.rbi +235 -217
- data/rbi/lib/terminal-shop/base_page.rbi +2 -2
- data/rbi/lib/terminal-shop/client.rbi +2 -2
- data/rbi/lib/terminal-shop/errors.rbi +11 -10
- data/rbi/lib/terminal-shop/models/address.rbi +2 -2
- data/rbi/lib/terminal-shop/models/address_create_params.rbi +3 -13
- data/rbi/lib/terminal-shop/models/address_create_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/address_delete_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/address_delete_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/address_get_params.rbi +21 -0
- data/rbi/lib/terminal-shop/models/address_get_response.rbi +23 -0
- data/rbi/lib/terminal-shop/models/address_list_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/address_list_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/app.rbi +2 -2
- data/rbi/lib/terminal-shop/models/app_create_params.rbi +29 -4
- data/rbi/lib/terminal-shop/models/app_create_response.rbi +4 -4
- data/rbi/lib/terminal-shop/models/app_delete_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/app_delete_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/app_get_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/app_get_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/app_list_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/app_list_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/card.rbi +4 -4
- data/rbi/lib/terminal-shop/models/card_collect_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/card_collect_response.rbi +4 -4
- data/rbi/lib/terminal-shop/models/card_create_params.rbi +2 -2
- data/rbi/lib/terminal-shop/models/card_create_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/card_delete_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/card_delete_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/card_get_params.rbi +21 -0
- data/rbi/lib/terminal-shop/models/card_get_response.rbi +23 -0
- data/rbi/lib/terminal-shop/models/card_list_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/card_list_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/cart.rbi +45 -9
- data/rbi/lib/terminal-shop/models/cart_convert_params.rbi +17 -3
- data/rbi/lib/terminal-shop/models/cart_convert_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/cart_get_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/cart_get_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/cart_redeem_gift_card_params.rbi +32 -0
- data/rbi/lib/terminal-shop/models/cart_redeem_gift_card_response.rbi +66 -0
- data/rbi/lib/terminal-shop/models/cart_remove_gift_card_params.rbi +21 -0
- data/rbi/lib/terminal-shop/models/cart_remove_gift_card_response.rbi +23 -0
- data/rbi/lib/terminal-shop/models/cart_set_address_params.rbi +2 -2
- data/rbi/lib/terminal-shop/models/cart_set_address_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/cart_set_card_params.rbi +2 -2
- data/rbi/lib/terminal-shop/models/cart_set_card_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/cart_set_item_params.rbi +2 -2
- data/rbi/lib/terminal-shop/models/cart_set_item_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/email_create_params.rbi +2 -2
- data/rbi/lib/terminal-shop/models/email_create_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/order.rbi +10 -10
- data/rbi/lib/terminal-shop/models/order_create_params.rbi +2 -2
- data/rbi/lib/terminal-shop/models/order_create_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/order_get_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/order_get_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/order_list_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/order_list_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/product.rbi +88 -27
- data/rbi/lib/terminal-shop/models/product_get_params.rbi +21 -0
- data/rbi/lib/terminal-shop/models/product_get_response.rbi +23 -0
- data/rbi/lib/terminal-shop/models/product_list_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/product_list_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/product_variant.rbi +2 -2
- data/rbi/lib/terminal-shop/models/profile.rbi +4 -4
- data/rbi/lib/terminal-shop/models/profile_me_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/profile_me_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/profile_update_params.rbi +9 -14
- data/rbi/lib/terminal-shop/models/profile_update_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/subscription.rbi +15 -13
- data/rbi/lib/terminal-shop/models/subscription_create_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/subscription_create_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/subscription_delete_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/subscription_delete_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/subscription_get_params.rbi +21 -0
- data/rbi/lib/terminal-shop/models/subscription_get_response.rbi +23 -0
- data/rbi/lib/terminal-shop/models/subscription_list_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/subscription_list_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/token.rbi +2 -2
- data/rbi/lib/terminal-shop/models/token_create_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/token_create_response.rbi +4 -4
- data/rbi/lib/terminal-shop/models/token_delete_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/token_delete_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/token_get_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/token_get_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/token_list_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/token_list_response.rbi +2 -2
- data/rbi/lib/terminal-shop/models/view_init_params.rbi +5 -2
- data/rbi/lib/terminal-shop/models/view_init_response.rbi +5 -15
- data/rbi/lib/terminal-shop/pooled_net_requester.rbi +12 -10
- data/rbi/lib/terminal-shop/request_options.rbi +4 -0
- data/rbi/lib/terminal-shop/resources/address.rbi +12 -2
- data/rbi/lib/terminal-shop/resources/app.rbi +3 -5
- data/rbi/lib/terminal-shop/resources/card.rbi +12 -2
- data/rbi/lib/terminal-shop/resources/cart.rbi +24 -4
- data/rbi/lib/terminal-shop/resources/email.rbi +2 -2
- data/rbi/lib/terminal-shop/resources/order.rbi +2 -2
- data/rbi/lib/terminal-shop/resources/product.rbi +12 -2
- data/rbi/lib/terminal-shop/resources/profile.rbi +5 -5
- data/rbi/lib/terminal-shop/resources/subscription.rbi +12 -2
- data/rbi/lib/terminal-shop/resources/token.rbi +2 -2
- data/rbi/lib/terminal-shop/resources/view.rbi +2 -2
- data/rbi/lib/terminal-shop/util.rbi +153 -104
- data/rbi/lib/terminal-shop/version.rbi +1 -1
- data/sig/terminal-shop/base_client.rbs +3 -7
- data/sig/terminal-shop/base_page.rbs +1 -1
- data/sig/terminal-shop/errors.rbs +2 -1
- data/sig/terminal-shop/models/address_get_params.rbs +19 -0
- data/sig/terminal-shop/models/address_get_response.rbs +18 -0
- data/sig/terminal-shop/models/app_create_params.rbs +12 -3
- data/sig/terminal-shop/models/card_get_params.rbs +18 -0
- data/sig/terminal-shop/models/card_get_response.rbs +18 -0
- data/sig/terminal-shop/models/cart.rbs +27 -2
- data/sig/terminal-shop/models/cart_convert_params.rbs +10 -2
- data/sig/terminal-shop/models/cart_redeem_gift_card_params.rbs +25 -0
- data/sig/terminal-shop/models/cart_redeem_gift_card_response.rbs +47 -0
- data/sig/terminal-shop/models/cart_remove_gift_card_params.rbs +19 -0
- data/sig/terminal-shop/models/cart_remove_gift_card_response.rbs +18 -0
- data/sig/terminal-shop/models/product.rbs +58 -17
- data/sig/terminal-shop/models/product_get_params.rbs +19 -0
- data/sig/terminal-shop/models/product_get_response.rbs +18 -0
- data/sig/terminal-shop/models/profile_update_params.rbs +5 -5
- data/sig/terminal-shop/models/subscription_get_params.rbs +19 -0
- data/sig/terminal-shop/models/subscription_get_response.rbs +19 -0
- data/sig/terminal-shop/request_options.rbs +4 -0
- data/sig/terminal-shop/resources/address.rbs +10 -0
- data/sig/terminal-shop/resources/app.rbs +0 -2
- data/sig/terminal-shop/resources/card.rbs +10 -0
- data/sig/terminal-shop/resources/cart.rbs +20 -0
- data/sig/terminal-shop/resources/product.rbs +10 -0
- data/sig/terminal-shop/resources/profile.rbs +3 -4
- data/sig/terminal-shop/resources/subscription.rbs +11 -0
- data/sig/terminal-shop/util.rbs +19 -0
- data/sig/terminal-shop/version.rbs +1 -1
- metadata +40 -4
@@ -0,0 +1,47 @@
|
|
1
|
+
module TerminalShop
|
2
|
+
module Models
|
3
|
+
type cart_redeem_gift_card_response =
|
4
|
+
{ data: TerminalShop::Models::CartRedeemGiftCardResponse::Data }
|
5
|
+
|
6
|
+
class CartRedeemGiftCardResponse < TerminalShop::BaseModel
|
7
|
+
attr_accessor data: TerminalShop::Models::CartRedeemGiftCardResponse::Data
|
8
|
+
|
9
|
+
def initialize:
|
10
|
+
(data: TerminalShop::Models::CartRedeemGiftCardResponse::Data) -> void
|
11
|
+
| (
|
12
|
+
?TerminalShop::Models::cart_redeem_gift_card_response
|
13
|
+
| TerminalShop::BaseModel data
|
14
|
+
) -> void
|
15
|
+
|
16
|
+
def to_hash: -> TerminalShop::Models::cart_redeem_gift_card_response
|
17
|
+
|
18
|
+
type data =
|
19
|
+
{
|
20
|
+
applied_amount: Integer,
|
21
|
+
gift_card_id: String,
|
22
|
+
remaining_balance: Integer
|
23
|
+
}
|
24
|
+
|
25
|
+
class Data < TerminalShop::BaseModel
|
26
|
+
attr_accessor applied_amount: Integer
|
27
|
+
|
28
|
+
attr_accessor gift_card_id: String
|
29
|
+
|
30
|
+
attr_accessor remaining_balance: Integer
|
31
|
+
|
32
|
+
def initialize:
|
33
|
+
(
|
34
|
+
applied_amount: Integer,
|
35
|
+
gift_card_id: String,
|
36
|
+
remaining_balance: Integer
|
37
|
+
) -> void
|
38
|
+
| (
|
39
|
+
?TerminalShop::Models::CartRedeemGiftCardResponse::data
|
40
|
+
| TerminalShop::BaseModel data
|
41
|
+
) -> void
|
42
|
+
|
43
|
+
def to_hash: -> TerminalShop::Models::CartRedeemGiftCardResponse::data
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module TerminalShop
|
2
|
+
module Models
|
3
|
+
type cart_remove_gift_card_params = { } & TerminalShop::request_parameters
|
4
|
+
|
5
|
+
class CartRemoveGiftCardParams < TerminalShop::BaseModel
|
6
|
+
extend TerminalShop::RequestParameters::Converter
|
7
|
+
include TerminalShop::RequestParameters
|
8
|
+
|
9
|
+
def initialize:
|
10
|
+
(request_options: TerminalShop::request_opts) -> void
|
11
|
+
| (
|
12
|
+
?TerminalShop::Models::cart_remove_gift_card_params
|
13
|
+
| TerminalShop::BaseModel data
|
14
|
+
) -> void
|
15
|
+
|
16
|
+
def to_hash: -> TerminalShop::Models::cart_remove_gift_card_params
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module TerminalShop
|
2
|
+
module Models
|
3
|
+
type cart_remove_gift_card_response = { data: :ok }
|
4
|
+
|
5
|
+
class CartRemoveGiftCardResponse < TerminalShop::BaseModel
|
6
|
+
attr_accessor data: :ok
|
7
|
+
|
8
|
+
def initialize:
|
9
|
+
(data: :ok) -> void
|
10
|
+
| (
|
11
|
+
?TerminalShop::Models::cart_remove_gift_card_response
|
12
|
+
| TerminalShop::BaseModel data
|
13
|
+
) -> void
|
14
|
+
|
15
|
+
def to_hash: -> TerminalShop::Models::cart_remove_gift_card_response
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -4,12 +4,11 @@ module TerminalShop
|
|
4
4
|
{
|
5
5
|
id: String,
|
6
6
|
description: String,
|
7
|
-
filters: ::Array[TerminalShop::Models::ProductAPI::filter],
|
8
7
|
name: String,
|
9
8
|
variants: ::Array[TerminalShop::Models::ProductVariant],
|
10
9
|
order: Integer,
|
11
10
|
subscription: TerminalShop::Models::ProductAPI::subscription,
|
12
|
-
tags: ::
|
11
|
+
tags: TerminalShop::Models::ProductAPI::Tags
|
13
12
|
}
|
14
13
|
|
15
14
|
class ProductAPI < TerminalShop::BaseModel
|
@@ -17,8 +16,6 @@ module TerminalShop
|
|
17
16
|
|
18
17
|
attr_accessor description: String
|
19
18
|
|
20
|
-
attr_accessor filters: ::Array[TerminalShop::Models::ProductAPI::filter]
|
21
|
-
|
22
19
|
attr_accessor name: String
|
23
20
|
|
24
21
|
attr_accessor variants: ::Array[TerminalShop::Models::ProductVariant]
|
@@ -33,20 +30,21 @@ module TerminalShop
|
|
33
30
|
TerminalShop::Models::ProductAPI::subscription
|
34
31
|
) -> TerminalShop::Models::ProductAPI::subscription
|
35
32
|
|
36
|
-
attr_reader tags: ::
|
33
|
+
attr_reader tags: TerminalShop::Models::ProductAPI::Tags?
|
37
34
|
|
38
|
-
def tags=: (
|
35
|
+
def tags=: (
|
36
|
+
TerminalShop::Models::ProductAPI::Tags
|
37
|
+
) -> TerminalShop::Models::ProductAPI::Tags
|
39
38
|
|
40
39
|
def initialize:
|
41
40
|
(
|
42
41
|
id: String,
|
43
42
|
description: String,
|
44
|
-
filters: ::Array[TerminalShop::Models::ProductAPI::filter],
|
45
43
|
name: String,
|
46
44
|
variants: ::Array[TerminalShop::Models::ProductVariant],
|
47
45
|
order: Integer,
|
48
46
|
subscription: TerminalShop::Models::ProductAPI::subscription,
|
49
|
-
tags: ::
|
47
|
+
tags: TerminalShop::Models::ProductAPI::Tags
|
50
48
|
) -> void
|
51
49
|
| (
|
52
50
|
?TerminalShop::Models::product_api | TerminalShop::BaseModel data
|
@@ -54,15 +52,6 @@ module TerminalShop
|
|
54
52
|
|
55
53
|
def to_hash: -> TerminalShop::Models::product_api
|
56
54
|
|
57
|
-
type filter = :eu | :na
|
58
|
-
|
59
|
-
class Filter < TerminalShop::Enum
|
60
|
-
EU: :eu
|
61
|
-
NA: :na
|
62
|
-
|
63
|
-
def self.values: -> ::Array[TerminalShop::Models::ProductAPI::filter]
|
64
|
-
end
|
65
|
-
|
66
55
|
type subscription = :allowed | :required
|
67
56
|
|
68
57
|
class Subscription < TerminalShop::Enum
|
@@ -71,6 +60,58 @@ module TerminalShop
|
|
71
60
|
|
72
61
|
def self.values: -> ::Array[TerminalShop::Models::ProductAPI::subscription]
|
73
62
|
end
|
63
|
+
|
64
|
+
type tags =
|
65
|
+
{
|
66
|
+
app: String,
|
67
|
+
color: String,
|
68
|
+
featured: bool,
|
69
|
+
market_eu: bool,
|
70
|
+
market_na: bool,
|
71
|
+
type: String
|
72
|
+
}
|
73
|
+
|
74
|
+
class Tags < TerminalShop::BaseModel
|
75
|
+
attr_reader app: String?
|
76
|
+
|
77
|
+
def app=: (String) -> String
|
78
|
+
|
79
|
+
attr_reader color: String?
|
80
|
+
|
81
|
+
def color=: (String) -> String
|
82
|
+
|
83
|
+
attr_reader featured: bool?
|
84
|
+
|
85
|
+
def featured=: (bool) -> bool
|
86
|
+
|
87
|
+
attr_reader market_eu: bool?
|
88
|
+
|
89
|
+
def market_eu=: (bool) -> bool
|
90
|
+
|
91
|
+
attr_reader market_na: bool?
|
92
|
+
|
93
|
+
def market_na=: (bool) -> bool
|
94
|
+
|
95
|
+
attr_reader type: String?
|
96
|
+
|
97
|
+
def type=: (String) -> String
|
98
|
+
|
99
|
+
def initialize:
|
100
|
+
(
|
101
|
+
app: String,
|
102
|
+
color: String,
|
103
|
+
featured: bool,
|
104
|
+
market_eu: bool,
|
105
|
+
market_na: bool,
|
106
|
+
type: String
|
107
|
+
) -> void
|
108
|
+
| (
|
109
|
+
?TerminalShop::Models::ProductAPI::tags
|
110
|
+
| TerminalShop::BaseModel data
|
111
|
+
) -> void
|
112
|
+
|
113
|
+
def to_hash: -> TerminalShop::Models::ProductAPI::tags
|
114
|
+
end
|
74
115
|
end
|
75
116
|
end
|
76
117
|
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module TerminalShop
|
2
|
+
module Models
|
3
|
+
type product_get_params = { } & TerminalShop::request_parameters
|
4
|
+
|
5
|
+
class ProductGetParams < TerminalShop::BaseModel
|
6
|
+
extend TerminalShop::RequestParameters::Converter
|
7
|
+
include TerminalShop::RequestParameters
|
8
|
+
|
9
|
+
def initialize:
|
10
|
+
(request_options: TerminalShop::request_opts) -> void
|
11
|
+
| (
|
12
|
+
?TerminalShop::Models::product_get_params
|
13
|
+
| TerminalShop::BaseModel data
|
14
|
+
) -> void
|
15
|
+
|
16
|
+
def to_hash: -> TerminalShop::Models::product_get_params
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module TerminalShop
|
2
|
+
module Models
|
3
|
+
type product_get_response = { data: TerminalShop::Models::ProductAPI }
|
4
|
+
|
5
|
+
class ProductGetResponse < TerminalShop::BaseModel
|
6
|
+
attr_accessor data: TerminalShop::Models::ProductAPI
|
7
|
+
|
8
|
+
def initialize:
|
9
|
+
(data: TerminalShop::Models::ProductAPI) -> void
|
10
|
+
| (
|
11
|
+
?TerminalShop::Models::product_get_response
|
12
|
+
| TerminalShop::BaseModel data
|
13
|
+
) -> void
|
14
|
+
|
15
|
+
def to_hash: -> TerminalShop::Models::product_get_response
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -1,20 +1,20 @@
|
|
1
1
|
module TerminalShop
|
2
2
|
module Models
|
3
3
|
type profile_update_params =
|
4
|
-
{ email: String
|
4
|
+
{ email: String, name: String } & TerminalShop::request_parameters
|
5
5
|
|
6
6
|
class ProfileUpdateParams < TerminalShop::BaseModel
|
7
7
|
extend TerminalShop::RequestParameters::Converter
|
8
8
|
include TerminalShop::RequestParameters
|
9
9
|
|
10
|
-
attr_accessor email: String
|
10
|
+
attr_accessor email: String
|
11
11
|
|
12
|
-
attr_accessor name: String
|
12
|
+
attr_accessor name: String
|
13
13
|
|
14
14
|
def initialize:
|
15
15
|
(
|
16
|
-
email: String
|
17
|
-
name: String
|
16
|
+
email: String,
|
17
|
+
name: String,
|
18
18
|
request_options: TerminalShop::request_opts
|
19
19
|
) -> void
|
20
20
|
| (
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module TerminalShop
|
2
|
+
module Models
|
3
|
+
type subscription_get_params = { } & TerminalShop::request_parameters
|
4
|
+
|
5
|
+
class SubscriptionGetParams < TerminalShop::BaseModel
|
6
|
+
extend TerminalShop::RequestParameters::Converter
|
7
|
+
include TerminalShop::RequestParameters
|
8
|
+
|
9
|
+
def initialize:
|
10
|
+
(request_options: TerminalShop::request_opts) -> void
|
11
|
+
| (
|
12
|
+
?TerminalShop::Models::subscription_get_params
|
13
|
+
| TerminalShop::BaseModel data
|
14
|
+
) -> void
|
15
|
+
|
16
|
+
def to_hash: -> TerminalShop::Models::subscription_get_params
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module TerminalShop
|
2
|
+
module Models
|
3
|
+
type subscription_get_response =
|
4
|
+
{ data: TerminalShop::Models::SubscriptionAPI }
|
5
|
+
|
6
|
+
class SubscriptionGetResponse < TerminalShop::BaseModel
|
7
|
+
attr_accessor data: TerminalShop::Models::SubscriptionAPI
|
8
|
+
|
9
|
+
def initialize:
|
10
|
+
(data: TerminalShop::Models::SubscriptionAPI) -> void
|
11
|
+
| (
|
12
|
+
?TerminalShop::Models::subscription_get_response
|
13
|
+
| TerminalShop::BaseModel data
|
14
|
+
) -> void
|
15
|
+
|
16
|
+
def to_hash: -> TerminalShop::Models::subscription_get_response
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -36,6 +36,16 @@ module TerminalShop
|
|
36
36
|
request_options: TerminalShop::request_opts
|
37
37
|
) -> TerminalShop::Models::AddressDeleteResponse
|
38
38
|
|
39
|
+
def get:
|
40
|
+
(
|
41
|
+
String id,
|
42
|
+
?TerminalShop::Models::AddressGetParams | ::Hash[Symbol, top] params
|
43
|
+
) -> TerminalShop::Models::AddressGetResponse
|
44
|
+
| (
|
45
|
+
String id,
|
46
|
+
request_options: TerminalShop::request_opts
|
47
|
+
) -> TerminalShop::Models::AddressGetResponse
|
48
|
+
|
39
49
|
def initialize: (client: TerminalShop::Client) -> void
|
40
50
|
end
|
41
51
|
end
|
@@ -6,10 +6,8 @@ module TerminalShop
|
|
6
6
|
TerminalShop::Models::AppCreateParams | ::Hash[Symbol, top] params
|
7
7
|
) -> TerminalShop::Models::AppCreateResponse
|
8
8
|
| (
|
9
|
-
id: String,
|
10
9
|
name: String,
|
11
10
|
redirect_uri: String,
|
12
|
-
secret: String,
|
13
11
|
request_options: TerminalShop::request_opts
|
14
12
|
) -> TerminalShop::Models::AppCreateResponse
|
15
13
|
|
@@ -36,6 +36,16 @@ module TerminalShop
|
|
36
36
|
request_options: TerminalShop::request_opts
|
37
37
|
) -> TerminalShop::Models::CardCollectResponse
|
38
38
|
|
39
|
+
def get:
|
40
|
+
(
|
41
|
+
String id,
|
42
|
+
?TerminalShop::Models::CardGetParams | ::Hash[Symbol, top] params
|
43
|
+
) -> TerminalShop::Models::CardGetResponse
|
44
|
+
| (
|
45
|
+
String id,
|
46
|
+
request_options: TerminalShop::request_opts
|
47
|
+
) -> TerminalShop::Models::CardGetResponse
|
48
|
+
|
39
49
|
def initialize: (client: TerminalShop::Client) -> void
|
40
50
|
end
|
41
51
|
end
|
@@ -6,6 +6,7 @@ module TerminalShop
|
|
6
6
|
?TerminalShop::Models::CartConvertParams | ::Hash[Symbol, top] params
|
7
7
|
) -> TerminalShop::Models::CartConvertResponse
|
8
8
|
| (
|
9
|
+
recipient_email: String,
|
9
10
|
request_options: TerminalShop::request_opts
|
10
11
|
) -> TerminalShop::Models::CartConvertResponse
|
11
12
|
|
@@ -17,6 +18,25 @@ module TerminalShop
|
|
17
18
|
request_options: TerminalShop::request_opts
|
18
19
|
) -> TerminalShop::Models::CartGetResponse
|
19
20
|
|
21
|
+
def redeem_gift_card:
|
22
|
+
(
|
23
|
+
TerminalShop::Models::CartRedeemGiftCardParams
|
24
|
+
| ::Hash[Symbol, top] params
|
25
|
+
) -> TerminalShop::Models::CartRedeemGiftCardResponse
|
26
|
+
| (
|
27
|
+
gift_card_id: String,
|
28
|
+
request_options: TerminalShop::request_opts
|
29
|
+
) -> TerminalShop::Models::CartRedeemGiftCardResponse
|
30
|
+
|
31
|
+
def remove_gift_card:
|
32
|
+
(
|
33
|
+
?TerminalShop::Models::CartRemoveGiftCardParams
|
34
|
+
| ::Hash[Symbol, top] params
|
35
|
+
) -> TerminalShop::Models::CartRemoveGiftCardResponse
|
36
|
+
| (
|
37
|
+
request_options: TerminalShop::request_opts
|
38
|
+
) -> TerminalShop::Models::CartRemoveGiftCardResponse
|
39
|
+
|
20
40
|
def set_address:
|
21
41
|
(
|
22
42
|
TerminalShop::Models::CartSetAddressParams
|
@@ -9,6 +9,16 @@ module TerminalShop
|
|
9
9
|
request_options: TerminalShop::request_opts
|
10
10
|
) -> TerminalShop::Models::ProductListResponse
|
11
11
|
|
12
|
+
def get:
|
13
|
+
(
|
14
|
+
String id,
|
15
|
+
?TerminalShop::Models::ProductGetParams | ::Hash[Symbol, top] params
|
16
|
+
) -> TerminalShop::Models::ProductGetResponse
|
17
|
+
| (
|
18
|
+
String id,
|
19
|
+
request_options: TerminalShop::request_opts
|
20
|
+
) -> TerminalShop::Models::ProductGetResponse
|
21
|
+
|
12
22
|
def initialize: (client: TerminalShop::Client) -> void
|
13
23
|
end
|
14
24
|
end
|
@@ -3,12 +3,11 @@ module TerminalShop
|
|
3
3
|
class Profile
|
4
4
|
def update:
|
5
5
|
(
|
6
|
-
|
7
|
-
| ::Hash[Symbol, top] params
|
6
|
+
TerminalShop::Models::ProfileUpdateParams | ::Hash[Symbol, top] params
|
8
7
|
) -> TerminalShop::Models::ProfileUpdateResponse
|
9
8
|
| (
|
10
|
-
email: String
|
11
|
-
name: String
|
9
|
+
email: String,
|
10
|
+
name: String,
|
12
11
|
request_options: TerminalShop::request_opts
|
13
12
|
) -> TerminalShop::Models::ProfileUpdateResponse
|
14
13
|
|
@@ -37,6 +37,17 @@ module TerminalShop
|
|
37
37
|
request_options: TerminalShop::request_opts
|
38
38
|
) -> TerminalShop::Models::SubscriptionDeleteResponse
|
39
39
|
|
40
|
+
def get:
|
41
|
+
(
|
42
|
+
String id,
|
43
|
+
?TerminalShop::Models::SubscriptionGetParams
|
44
|
+
| ::Hash[Symbol, top] params
|
45
|
+
) -> TerminalShop::Models::SubscriptionGetResponse
|
46
|
+
| (
|
47
|
+
String id,
|
48
|
+
request_options: TerminalShop::request_opts
|
49
|
+
) -> TerminalShop::Models::SubscriptionGetResponse
|
50
|
+
|
40
51
|
def initialize: (client: TerminalShop::Client) -> void
|
41
52
|
end
|
42
53
|
end
|
data/sig/terminal-shop/util.rbs
CHANGED
@@ -88,5 +88,24 @@ module TerminalShop
|
|
88
88
|
stream: Enumerable[String],
|
89
89
|
suppress_error: bool
|
90
90
|
) -> top
|
91
|
+
|
92
|
+
def self?.fused_enum: (Enumerable[top] enum) { -> void } -> Enumerable[top]
|
93
|
+
|
94
|
+
def self?.close_fused!: (Enumerable[top]? enum) -> void
|
95
|
+
|
96
|
+
def self?.chain_fused: (
|
97
|
+
Enumerable[top]? enum
|
98
|
+
) {
|
99
|
+
(Enumerator::Yielder arg0) -> void
|
100
|
+
} -> void
|
101
|
+
|
102
|
+
type sse_message =
|
103
|
+
{ event: String?, data: String?, id: String?, retry: Integer? }
|
104
|
+
|
105
|
+
def self?.decode_lines: (Enumerable[String] enum) -> Enumerable[String]
|
106
|
+
|
107
|
+
def self?.decode_sse: (
|
108
|
+
Enumerable[String] lines
|
109
|
+
) -> TerminalShop::Util::sse_message
|
91
110
|
end
|
92
111
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: terminal-shop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Terminal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-03-
|
11
|
+
date: 2025-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: connection_pool
|
@@ -44,6 +44,8 @@ files:
|
|
44
44
|
- lib/terminal-shop/models/address_create_response.rb
|
45
45
|
- lib/terminal-shop/models/address_delete_params.rb
|
46
46
|
- lib/terminal-shop/models/address_delete_response.rb
|
47
|
+
- lib/terminal-shop/models/address_get_params.rb
|
48
|
+
- lib/terminal-shop/models/address_get_response.rb
|
47
49
|
- lib/terminal-shop/models/address_list_params.rb
|
48
50
|
- lib/terminal-shop/models/address_list_response.rb
|
49
51
|
- lib/terminal-shop/models/app.rb
|
@@ -62,6 +64,8 @@ files:
|
|
62
64
|
- lib/terminal-shop/models/card_create_response.rb
|
63
65
|
- lib/terminal-shop/models/card_delete_params.rb
|
64
66
|
- lib/terminal-shop/models/card_delete_response.rb
|
67
|
+
- lib/terminal-shop/models/card_get_params.rb
|
68
|
+
- lib/terminal-shop/models/card_get_response.rb
|
65
69
|
- lib/terminal-shop/models/card_list_params.rb
|
66
70
|
- lib/terminal-shop/models/card_list_response.rb
|
67
71
|
- lib/terminal-shop/models/cart.rb
|
@@ -69,6 +73,10 @@ files:
|
|
69
73
|
- lib/terminal-shop/models/cart_convert_response.rb
|
70
74
|
- lib/terminal-shop/models/cart_get_params.rb
|
71
75
|
- lib/terminal-shop/models/cart_get_response.rb
|
76
|
+
- lib/terminal-shop/models/cart_redeem_gift_card_params.rb
|
77
|
+
- lib/terminal-shop/models/cart_redeem_gift_card_response.rb
|
78
|
+
- lib/terminal-shop/models/cart_remove_gift_card_params.rb
|
79
|
+
- lib/terminal-shop/models/cart_remove_gift_card_response.rb
|
72
80
|
- lib/terminal-shop/models/cart_set_address_params.rb
|
73
81
|
- lib/terminal-shop/models/cart_set_address_response.rb
|
74
82
|
- lib/terminal-shop/models/cart_set_card_params.rb
|
@@ -85,6 +93,8 @@ files:
|
|
85
93
|
- lib/terminal-shop/models/order_list_params.rb
|
86
94
|
- lib/terminal-shop/models/order_list_response.rb
|
87
95
|
- lib/terminal-shop/models/product.rb
|
96
|
+
- lib/terminal-shop/models/product_get_params.rb
|
97
|
+
- lib/terminal-shop/models/product_get_response.rb
|
88
98
|
- lib/terminal-shop/models/product_list_params.rb
|
89
99
|
- lib/terminal-shop/models/product_list_response.rb
|
90
100
|
- lib/terminal-shop/models/product_variant.rb
|
@@ -98,6 +108,8 @@ files:
|
|
98
108
|
- lib/terminal-shop/models/subscription_create_response.rb
|
99
109
|
- lib/terminal-shop/models/subscription_delete_params.rb
|
100
110
|
- lib/terminal-shop/models/subscription_delete_response.rb
|
111
|
+
- lib/terminal-shop/models/subscription_get_params.rb
|
112
|
+
- lib/terminal-shop/models/subscription_get_response.rb
|
101
113
|
- lib/terminal-shop/models/subscription_list_params.rb
|
102
114
|
- lib/terminal-shop/models/subscription_list_response.rb
|
103
115
|
- lib/terminal-shop/models/token.rb
|
@@ -138,6 +150,8 @@ files:
|
|
138
150
|
- rbi/lib/terminal-shop/models/address_create_response.rbi
|
139
151
|
- rbi/lib/terminal-shop/models/address_delete_params.rbi
|
140
152
|
- rbi/lib/terminal-shop/models/address_delete_response.rbi
|
153
|
+
- rbi/lib/terminal-shop/models/address_get_params.rbi
|
154
|
+
- rbi/lib/terminal-shop/models/address_get_response.rbi
|
141
155
|
- rbi/lib/terminal-shop/models/address_list_params.rbi
|
142
156
|
- rbi/lib/terminal-shop/models/address_list_response.rbi
|
143
157
|
- rbi/lib/terminal-shop/models/app.rbi
|
@@ -156,6 +170,8 @@ files:
|
|
156
170
|
- rbi/lib/terminal-shop/models/card_create_response.rbi
|
157
171
|
- rbi/lib/terminal-shop/models/card_delete_params.rbi
|
158
172
|
- rbi/lib/terminal-shop/models/card_delete_response.rbi
|
173
|
+
- rbi/lib/terminal-shop/models/card_get_params.rbi
|
174
|
+
- rbi/lib/terminal-shop/models/card_get_response.rbi
|
159
175
|
- rbi/lib/terminal-shop/models/card_list_params.rbi
|
160
176
|
- rbi/lib/terminal-shop/models/card_list_response.rbi
|
161
177
|
- rbi/lib/terminal-shop/models/cart.rbi
|
@@ -163,6 +179,10 @@ files:
|
|
163
179
|
- rbi/lib/terminal-shop/models/cart_convert_response.rbi
|
164
180
|
- rbi/lib/terminal-shop/models/cart_get_params.rbi
|
165
181
|
- rbi/lib/terminal-shop/models/cart_get_response.rbi
|
182
|
+
- rbi/lib/terminal-shop/models/cart_redeem_gift_card_params.rbi
|
183
|
+
- rbi/lib/terminal-shop/models/cart_redeem_gift_card_response.rbi
|
184
|
+
- rbi/lib/terminal-shop/models/cart_remove_gift_card_params.rbi
|
185
|
+
- rbi/lib/terminal-shop/models/cart_remove_gift_card_response.rbi
|
166
186
|
- rbi/lib/terminal-shop/models/cart_set_address_params.rbi
|
167
187
|
- rbi/lib/terminal-shop/models/cart_set_address_response.rbi
|
168
188
|
- rbi/lib/terminal-shop/models/cart_set_card_params.rbi
|
@@ -179,6 +199,8 @@ files:
|
|
179
199
|
- rbi/lib/terminal-shop/models/order_list_params.rbi
|
180
200
|
- rbi/lib/terminal-shop/models/order_list_response.rbi
|
181
201
|
- rbi/lib/terminal-shop/models/product.rbi
|
202
|
+
- rbi/lib/terminal-shop/models/product_get_params.rbi
|
203
|
+
- rbi/lib/terminal-shop/models/product_get_response.rbi
|
182
204
|
- rbi/lib/terminal-shop/models/product_list_params.rbi
|
183
205
|
- rbi/lib/terminal-shop/models/product_list_response.rbi
|
184
206
|
- rbi/lib/terminal-shop/models/product_variant.rbi
|
@@ -192,6 +214,8 @@ files:
|
|
192
214
|
- rbi/lib/terminal-shop/models/subscription_create_response.rbi
|
193
215
|
- rbi/lib/terminal-shop/models/subscription_delete_params.rbi
|
194
216
|
- rbi/lib/terminal-shop/models/subscription_delete_response.rbi
|
217
|
+
- rbi/lib/terminal-shop/models/subscription_get_params.rbi
|
218
|
+
- rbi/lib/terminal-shop/models/subscription_get_response.rbi
|
195
219
|
- rbi/lib/terminal-shop/models/subscription_list_params.rbi
|
196
220
|
- rbi/lib/terminal-shop/models/subscription_list_response.rbi
|
197
221
|
- rbi/lib/terminal-shop/models/token.rbi
|
@@ -231,6 +255,8 @@ files:
|
|
231
255
|
- sig/terminal-shop/models/address_create_response.rbs
|
232
256
|
- sig/terminal-shop/models/address_delete_params.rbs
|
233
257
|
- sig/terminal-shop/models/address_delete_response.rbs
|
258
|
+
- sig/terminal-shop/models/address_get_params.rbs
|
259
|
+
- sig/terminal-shop/models/address_get_response.rbs
|
234
260
|
- sig/terminal-shop/models/address_list_params.rbs
|
235
261
|
- sig/terminal-shop/models/address_list_response.rbs
|
236
262
|
- sig/terminal-shop/models/app.rbs
|
@@ -249,6 +275,8 @@ files:
|
|
249
275
|
- sig/terminal-shop/models/card_create_response.rbs
|
250
276
|
- sig/terminal-shop/models/card_delete_params.rbs
|
251
277
|
- sig/terminal-shop/models/card_delete_response.rbs
|
278
|
+
- sig/terminal-shop/models/card_get_params.rbs
|
279
|
+
- sig/terminal-shop/models/card_get_response.rbs
|
252
280
|
- sig/terminal-shop/models/card_list_params.rbs
|
253
281
|
- sig/terminal-shop/models/card_list_response.rbs
|
254
282
|
- sig/terminal-shop/models/cart.rbs
|
@@ -256,6 +284,10 @@ files:
|
|
256
284
|
- sig/terminal-shop/models/cart_convert_response.rbs
|
257
285
|
- sig/terminal-shop/models/cart_get_params.rbs
|
258
286
|
- sig/terminal-shop/models/cart_get_response.rbs
|
287
|
+
- sig/terminal-shop/models/cart_redeem_gift_card_params.rbs
|
288
|
+
- sig/terminal-shop/models/cart_redeem_gift_card_response.rbs
|
289
|
+
- sig/terminal-shop/models/cart_remove_gift_card_params.rbs
|
290
|
+
- sig/terminal-shop/models/cart_remove_gift_card_response.rbs
|
259
291
|
- sig/terminal-shop/models/cart_set_address_params.rbs
|
260
292
|
- sig/terminal-shop/models/cart_set_address_response.rbs
|
261
293
|
- sig/terminal-shop/models/cart_set_card_params.rbs
|
@@ -272,6 +304,8 @@ files:
|
|
272
304
|
- sig/terminal-shop/models/order_list_params.rbs
|
273
305
|
- sig/terminal-shop/models/order_list_response.rbs
|
274
306
|
- sig/terminal-shop/models/product.rbs
|
307
|
+
- sig/terminal-shop/models/product_get_params.rbs
|
308
|
+
- sig/terminal-shop/models/product_get_response.rbs
|
275
309
|
- sig/terminal-shop/models/product_list_params.rbs
|
276
310
|
- sig/terminal-shop/models/product_list_response.rbs
|
277
311
|
- sig/terminal-shop/models/product_variant.rbs
|
@@ -285,6 +319,8 @@ files:
|
|
285
319
|
- sig/terminal-shop/models/subscription_create_response.rbs
|
286
320
|
- sig/terminal-shop/models/subscription_delete_params.rbs
|
287
321
|
- sig/terminal-shop/models/subscription_delete_response.rbs
|
322
|
+
- sig/terminal-shop/models/subscription_get_params.rbs
|
323
|
+
- sig/terminal-shop/models/subscription_get_response.rbs
|
288
324
|
- sig/terminal-shop/models/subscription_list_params.rbs
|
289
325
|
- sig/terminal-shop/models/subscription_list_response.rbs
|
290
326
|
- sig/terminal-shop/models/token.rbs
|
@@ -330,9 +366,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
330
366
|
version: 3.0.0
|
331
367
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
332
368
|
requirements:
|
333
|
-
- - "
|
369
|
+
- - ">="
|
334
370
|
- !ruby/object:Gem::Version
|
335
|
-
version:
|
371
|
+
version: '0'
|
336
372
|
requirements: []
|
337
373
|
rubygems_version: 3.3.27
|
338
374
|
signing_key:
|