terminal-shop 0.1.0.pre.alpha.6 → 0.1.0.pre.alpha.7

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.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/terminal-shop/base_client.rb +11 -7
  4. data/lib/terminal-shop/base_model.rb +8 -8
  5. data/lib/terminal-shop/client.rb +5 -3
  6. data/lib/terminal-shop/models/subscription.rb +78 -1
  7. data/lib/terminal-shop/resources/subscription.rb +2 -0
  8. data/lib/terminal-shop/util.rb +13 -20
  9. data/lib/terminal-shop/version.rb +1 -1
  10. data/rbi/lib/terminal-shop/base_client.rbi +6 -3
  11. data/rbi/lib/terminal-shop/client.rbi +26 -14
  12. data/rbi/lib/terminal-shop/errors.rbi +14 -7
  13. data/rbi/lib/terminal-shop/models/address.rbi +51 -15
  14. data/rbi/lib/terminal-shop/models/address_create_params.rbi +45 -14
  15. data/rbi/lib/terminal-shop/models/address_create_response.rbi +6 -1
  16. data/rbi/lib/terminal-shop/models/address_delete_response.rbi +6 -1
  17. data/rbi/lib/terminal-shop/models/address_list_response.rbi +8 -1
  18. data/rbi/lib/terminal-shop/models/app.rbi +18 -3
  19. data/rbi/lib/terminal-shop/models/app_create_response.rbi +20 -3
  20. data/rbi/lib/terminal-shop/models/app_delete_response.rbi +6 -1
  21. data/rbi/lib/terminal-shop/models/app_get_response.rbi +6 -1
  22. data/rbi/lib/terminal-shop/models/app_list_response.rbi +8 -1
  23. data/rbi/lib/terminal-shop/models/card.rbi +38 -6
  24. data/rbi/lib/terminal-shop/models/card_collect_response.rbi +14 -2
  25. data/rbi/lib/terminal-shop/models/card_create_params.rbi +6 -1
  26. data/rbi/lib/terminal-shop/models/card_create_response.rbi +6 -1
  27. data/rbi/lib/terminal-shop/models/card_delete_response.rbi +6 -1
  28. data/rbi/lib/terminal-shop/models/card_list_response.rbi +8 -1
  29. data/rbi/lib/terminal-shop/models/cart.rbi +82 -26
  30. data/rbi/lib/terminal-shop/models/cart_convert_response.rbi +6 -1
  31. data/rbi/lib/terminal-shop/models/cart_get_response.rbi +6 -1
  32. data/rbi/lib/terminal-shop/models/cart_set_address_params.rbi +6 -1
  33. data/rbi/lib/terminal-shop/models/cart_set_address_response.rbi +6 -1
  34. data/rbi/lib/terminal-shop/models/cart_set_card_params.rbi +6 -1
  35. data/rbi/lib/terminal-shop/models/cart_set_card_response.rbi +6 -1
  36. data/rbi/lib/terminal-shop/models/cart_set_item_params.rbi +12 -2
  37. data/rbi/lib/terminal-shop/models/cart_set_item_response.rbi +6 -1
  38. data/rbi/lib/terminal-shop/models/email_create_params.rbi +6 -1
  39. data/rbi/lib/terminal-shop/models/email_create_response.rbi +6 -1
  40. data/rbi/lib/terminal-shop/models/order.rbi +143 -42
  41. data/rbi/lib/terminal-shop/models/order_get_response.rbi +6 -1
  42. data/rbi/lib/terminal-shop/models/order_list_response.rbi +8 -1
  43. data/rbi/lib/terminal-shop/models/product.rbi +47 -14
  44. data/rbi/lib/terminal-shop/models/product_list_response.rbi +8 -1
  45. data/rbi/lib/terminal-shop/models/product_variant.rbi +18 -3
  46. data/rbi/lib/terminal-shop/models/profile.rbi +38 -6
  47. data/rbi/lib/terminal-shop/models/profile_me_response.rbi +6 -1
  48. data/rbi/lib/terminal-shop/models/profile_update_params.rbi +12 -2
  49. data/rbi/lib/terminal-shop/models/profile_update_response.rbi +6 -1
  50. data/rbi/lib/terminal-shop/models/subscription.rbi +147 -12
  51. data/rbi/lib/terminal-shop/models/subscription_create_response.rbi +6 -1
  52. data/rbi/lib/terminal-shop/models/subscription_delete_response.rbi +6 -1
  53. data/rbi/lib/terminal-shop/models/subscription_list_response.rbi +8 -1
  54. data/rbi/lib/terminal-shop/models/token.rbi +24 -4
  55. data/rbi/lib/terminal-shop/models/token_create_response.rbi +20 -3
  56. data/rbi/lib/terminal-shop/models/token_delete_response.rbi +6 -1
  57. data/rbi/lib/terminal-shop/models/token_get_response.rbi +6 -1
  58. data/rbi/lib/terminal-shop/models/token_list_response.rbi +8 -1
  59. data/rbi/lib/terminal-shop/models/view_init_response.rbi +76 -10
  60. data/rbi/lib/terminal-shop/request_options.rbi +69 -7
  61. data/rbi/lib/terminal-shop/resources/subscription.rbi +5 -0
  62. data/rbi/lib/terminal-shop/util.rbi +6 -1
  63. data/rbi/lib/terminal-shop/version.rbi +1 -1
  64. data/sig/terminal-shop/base_client.rbs +13 -13
  65. data/sig/terminal-shop/base_model.rbs +26 -26
  66. data/sig/terminal-shop/base_page.rbs +1 -1
  67. data/sig/terminal-shop/client.rbs +3 -3
  68. data/sig/terminal-shop/models/address.rbs +3 -3
  69. data/sig/terminal-shop/models/address_create_params.rbs +3 -3
  70. data/sig/terminal-shop/models/address_list_response.rbs +3 -3
  71. data/sig/terminal-shop/models/app_list_response.rbs +3 -3
  72. data/sig/terminal-shop/models/card_list_response.rbs +3 -3
  73. data/sig/terminal-shop/models/cart.rbs +11 -9
  74. data/sig/terminal-shop/models/order.rbs +12 -12
  75. data/sig/terminal-shop/models/order_list_response.rbs +3 -3
  76. data/sig/terminal-shop/models/product.rbs +14 -14
  77. data/sig/terminal-shop/models/product_list_response.rbs +3 -3
  78. data/sig/terminal-shop/models/subscription.rbs +52 -4
  79. data/sig/terminal-shop/models/subscription_list_response.rbs +3 -3
  80. data/sig/terminal-shop/models/token_list_response.rbs +3 -3
  81. data/sig/terminal-shop/models/view_init_response.rbs +21 -21
  82. data/sig/terminal-shop/request_options.rbs +9 -9
  83. data/sig/terminal-shop/resources/address.rbs +4 -3
  84. data/sig/terminal-shop/resources/app.rbs +4 -4
  85. data/sig/terminal-shop/resources/card.rbs +4 -4
  86. data/sig/terminal-shop/resources/cart.rbs +6 -5
  87. data/sig/terminal-shop/resources/email.rbs +1 -1
  88. data/sig/terminal-shop/resources/order.rbs +2 -2
  89. data/sig/terminal-shop/resources/product.rbs +1 -1
  90. data/sig/terminal-shop/resources/profile.rbs +3 -2
  91. data/sig/terminal-shop/resources/subscription.rbs +4 -3
  92. data/sig/terminal-shop/resources/token.rbs +4 -4
  93. data/sig/terminal-shop/resources/view.rbs +1 -1
  94. data/sig/terminal-shop/util.rbs +12 -12
  95. data/sig/terminal-shop/version.rbs +1 -1
  96. metadata +2 -2
@@ -3,23 +3,23 @@ module TerminalShop
3
3
  type request =
4
4
  {
5
5
  method: Symbol,
6
- path: String | Array[String],
7
- query: Hash[String, (Array[String] | String)?]?,
8
- headers: Hash[String, String?]?,
6
+ path: String | ::Array[String],
7
+ query: ::Hash[String, (::Array[String] | String)?]?,
8
+ headers: ::Hash[String, String?]?,
9
9
  body: top?,
10
10
  unwrap: Symbol?,
11
11
  page: Class?,
12
12
  model: TerminalShop::Converter::input?,
13
13
  options: (TerminalShop::RequestOptions
14
14
  | TerminalShop::request_options
15
- | Hash[Symbol, top])?
15
+ | ::Hash[Symbol, top])?
16
16
  }
17
17
 
18
18
  type normalized_request =
19
19
  {
20
20
  method: Symbol,
21
21
  url: URI::Generic,
22
- headers: Hash[String, String],
22
+ headers: ::Hash[String, String],
23
23
  body: top,
24
24
  max_retries: Integer,
25
25
  timeout: Float
@@ -38,11 +38,11 @@ module TerminalShop
38
38
  max_retries: Integer,
39
39
  initial_retry_delay: Float,
40
40
  max_retry_delay: Float,
41
- headers: Hash[String, String?],
41
+ headers: ::Hash[String, String?],
42
42
  idempotency_header: String?
43
43
  ) -> void
44
44
 
45
- private def auth_headers: -> Hash[String, String]
45
+ private def auth_headers: -> ::Hash[String, String]
46
46
 
47
47
  private def generate_idempotency_key: -> String
48
48
 
@@ -53,11 +53,11 @@ module TerminalShop
53
53
 
54
54
  private def should_retry?: (
55
55
  Integer status,
56
- headers: Hash[String, String]
56
+ headers: ::Hash[String, String]
57
57
  ) -> bool
58
58
 
59
59
  private def retry_delay: (
60
- Hash[String, String] headers,
60
+ ::Hash[String, String] headers,
61
61
  retry_count: Integer
62
62
  ) -> Float
63
63
 
@@ -82,16 +82,16 @@ module TerminalShop
82
82
  def request:
83
83
  (
84
84
  Symbol method,
85
- String | Array[String] path,
86
- query: Hash[String, (Array[String] | String)?]?,
87
- headers: Hash[String, String?]?,
85
+ String | ::Array[String] path,
86
+ query: ::Hash[String, (::Array[String] | String)?]?,
87
+ headers: ::Hash[String, String?]?,
88
88
  body: top?,
89
89
  unwrap: Symbol?,
90
90
  page: Class?,
91
91
  model: TerminalShop::Converter::input?,
92
92
  options: (TerminalShop::RequestOptions
93
93
  | TerminalShop::request_options
94
- | Hash[Symbol, top])?
94
+ | ::Hash[Symbol, top])?
95
95
  ) -> top
96
96
  | (TerminalShop::BaseClient::request req) -> top
97
97
 
@@ -65,7 +65,7 @@ module TerminalShop
65
65
  class Enum
66
66
  extend TerminalShop::Converter
67
67
 
68
- def self.values: -> Array[(nil | bool | Integer | Float | Symbol)]
68
+ def self.values: -> ::Array[(nil | bool | Integer | Float | Symbol)]
69
69
 
70
70
  private def self.finalize!: -> void
71
71
 
@@ -86,18 +86,18 @@ module TerminalShop
86
86
  extend TerminalShop::Extern
87
87
  extend TerminalShop::Converter
88
88
 
89
- private def self.known_variants: -> Array[[Symbol?, Proc]]
89
+ private def self.known_variants: -> ::Array[[Symbol?, Proc]]
90
90
 
91
- def self.variants: -> Array[[Symbol?, top]]
91
+ def self.variants: -> ::Array[[Symbol?, top]]
92
92
 
93
93
  private def self.discriminator: (Symbol property) -> void
94
94
 
95
95
  private def self.variant: (
96
96
  Symbol
97
- | Hash[Symbol, top]
97
+ | ::Hash[Symbol, top]
98
98
  | ^-> TerminalShop::Converter::input
99
99
  | TerminalShop::Converter::input key,
100
- ?Hash[Symbol, top]
100
+ ?::Hash[Symbol, top]
101
101
  | ^-> TerminalShop::Converter::input
102
102
  | TerminalShop::Converter::input spec
103
103
  ) -> void
@@ -126,9 +126,9 @@ module TerminalShop
126
126
 
127
127
  def ==: (top other) -> bool
128
128
 
129
- def coerce: (Enumerable[top] | top value) -> (Array[top] | top)
129
+ def coerce: (Enumerable[top] | top value) -> (::Array[top] | top)
130
130
 
131
- def dump: (Enumerable[top] | top value) -> (Array[top] | top)
131
+ def dump: (Enumerable[top] | top value) -> (::Array[top] | top)
132
132
 
133
133
  def try_strict_coerce: (
134
134
  top value
@@ -137,10 +137,10 @@ module TerminalShop
137
137
  def item_type: -> TerminalShop::Converter::input
138
138
 
139
139
  def initialize: (
140
- Hash[Symbol, top]
140
+ ::Hash[Symbol, top]
141
141
  | ^-> TerminalShop::Converter::input
142
142
  | TerminalShop::Converter::input type_info,
143
- ?Hash[Symbol, top] spec
143
+ ?::Hash[Symbol, top] spec
144
144
  ) -> void
145
145
  end
146
146
 
@@ -151,9 +151,9 @@ module TerminalShop
151
151
 
152
152
  def ==: (top other) -> bool
153
153
 
154
- def coerce: (Hash[top, top] | top value) -> (Hash[Symbol, top] | top)
154
+ def coerce: (::Hash[top, top] | top value) -> (::Hash[Symbol, top] | top)
155
155
 
156
- def dump: (Hash[top, top] | top value) -> (Hash[Symbol, top] | top)
156
+ def dump: (::Hash[top, top] | top value) -> (::Hash[Symbol, top] | top)
157
157
 
158
158
  def try_strict_coerce: (
159
159
  top value
@@ -162,10 +162,10 @@ module TerminalShop
162
162
  def item_type: -> TerminalShop::Converter::input
163
163
 
164
164
  def initialize: (
165
- Hash[Symbol, top]
165
+ ::Hash[Symbol, top]
166
166
  | ^-> TerminalShop::Converter::input
167
167
  | TerminalShop::Converter::input type_info,
168
- ?Hash[Symbol, top] spec
168
+ ?::Hash[Symbol, top] spec
169
169
  ) -> void
170
170
  end
171
171
 
@@ -175,13 +175,13 @@ module TerminalShop
175
175
 
176
176
  type known_field = { mode: (:coerce | :dump)?, required: bool }
177
177
 
178
- def self.known_fields: -> Hash[Symbol, (TerminalShop::BaseModel::known_field
178
+ def self.known_fields: -> ::Hash[Symbol, (TerminalShop::BaseModel::known_field
179
179
  & { type_fn: (^-> TerminalShop::Converter::input) })]
180
180
 
181
- def self.fields: -> Hash[Symbol, (TerminalShop::BaseModel::known_field
181
+ def self.fields: -> ::Hash[Symbol, (TerminalShop::BaseModel::known_field
182
182
  & { type: TerminalShop::Converter::input })]
183
183
 
184
- def self.defaults: -> Hash[Symbol, (^-> Class)]
184
+ def self.defaults: -> ::Hash[Symbol, (^-> Class)]
185
185
 
186
186
  private def self.add_field: (
187
187
  Symbol name_sym,
@@ -194,23 +194,23 @@ module TerminalShop
194
194
  }
195
195
  | ^-> TerminalShop::Converter::input
196
196
  | TerminalShop::Converter::input,
197
- spec: Hash[Symbol, top]
197
+ spec: ::Hash[Symbol, top]
198
198
  ) -> void
199
199
 
200
200
  def self.required: (
201
201
  Symbol name_sym,
202
- Hash[Symbol, top]
202
+ ::Hash[Symbol, top]
203
203
  | ^-> TerminalShop::Converter::input
204
204
  | TerminalShop::Converter::input type_info,
205
- ?Hash[Symbol, top] spec
205
+ ?::Hash[Symbol, top] spec
206
206
  ) -> void
207
207
 
208
208
  def self.optional: (
209
209
  Symbol name_sym,
210
- Hash[Symbol, top]
210
+ ::Hash[Symbol, top]
211
211
  | ^-> TerminalShop::Converter::input
212
212
  | TerminalShop::Converter::input type_info,
213
- ?Hash[Symbol, top] spec
213
+ ?::Hash[Symbol, top] spec
214
214
  ) -> void
215
215
 
216
216
  private def self.request_only: { -> void } -> void
@@ -220,10 +220,10 @@ module TerminalShop
220
220
  def ==: (top other) -> bool
221
221
 
222
222
  def self.coerce: (
223
- TerminalShop::BaseModel | Hash[top, top] | top value
223
+ TerminalShop::BaseModel | ::Hash[top, top] | top value
224
224
  ) -> (instance | top)
225
225
 
226
- def self.dump: (instance | top value) -> (Hash[top, top] | top)
226
+ def self.dump: (instance | top value) -> (::Hash[top, top] | top)
227
227
 
228
228
  def self.try_strict_coerce: (
229
229
  top value
@@ -231,13 +231,13 @@ module TerminalShop
231
231
 
232
232
  def []: (Symbol key) -> top?
233
233
 
234
- def to_h: -> Hash[Symbol, top]
234
+ def to_h: -> ::Hash[Symbol, top]
235
235
 
236
236
  alias to_hash to_h
237
237
 
238
- def deconstruct_keys: (Array[Symbol]? keys) -> Hash[Symbol, top]
238
+ def deconstruct_keys: (::Array[Symbol]? keys) -> ::Hash[Symbol, top]
239
239
 
240
- def initialize: (?Hash[Symbol, top] | self data) -> void
240
+ def initialize: (?::Hash[Symbol, top] | self data) -> void
241
241
 
242
242
  def to_s: -> String
243
243
 
@@ -13,7 +13,7 @@ module TerminalShop
13
13
  def initialize: (
14
14
  client: TerminalShop::BaseClient,
15
15
  req: TerminalShop::BaseClient::request,
16
- headers: Hash[String, String],
16
+ headers: ::Hash[String, String],
17
17
  unwrapped: top
18
18
  ) -> void
19
19
  end
@@ -10,7 +10,7 @@ module TerminalShop
10
10
 
11
11
  ENVIRONMENTS: {
12
12
  production: "https://api.terminal.shop/",
13
- sandbox: "https://sandbox.terminal.shop/"
13
+ dev: "https://api.dev.terminal.shop/"
14
14
  }
15
15
 
16
16
  attr_reader bearer_token: String
@@ -37,10 +37,10 @@ module TerminalShop
37
37
 
38
38
  attr_reader view: TerminalShop::Resources::View
39
39
 
40
- private def auth_headers: -> Hash[String, String]
40
+ private def auth_headers: -> ::Hash[String, String]
41
41
 
42
42
  def initialize: (
43
- environment: :production | :sandbox | nil,
43
+ environment: :production | :dev | nil,
44
44
  base_url: String?,
45
45
  bearer_token: String?,
46
46
  max_retries: Integer,
@@ -28,15 +28,15 @@ module TerminalShop
28
28
 
29
29
  attr_reader phone: String?
30
30
 
31
- def phone=: (String) -> void
31
+ def phone=: (String) -> String
32
32
 
33
33
  attr_reader province: String?
34
34
 
35
- def province=: (String) -> void
35
+ def province=: (String) -> String
36
36
 
37
37
  attr_reader street2: String?
38
38
 
39
- def street2=: (String) -> void
39
+ def street2=: (String) -> String
40
40
 
41
41
  def initialize:
42
42
  (
@@ -29,15 +29,15 @@ module TerminalShop
29
29
 
30
30
  attr_reader phone: String?
31
31
 
32
- def phone=: (String) -> void
32
+ def phone=: (String) -> String
33
33
 
34
34
  attr_reader province: String?
35
35
 
36
- def province=: (String) -> void
36
+ def province=: (String) -> String
37
37
 
38
38
  attr_reader street2: String?
39
39
 
40
- def street2=: (String) -> void
40
+ def street2=: (String) -> String
41
41
 
42
42
  def initialize:
43
43
  (
@@ -1,13 +1,13 @@
1
1
  module TerminalShop
2
2
  module Models
3
3
  type address_list_response =
4
- { data: Array[TerminalShop::Models::AddressAPI] }
4
+ { data: ::Array[TerminalShop::Models::AddressAPI] }
5
5
 
6
6
  class AddressListResponse < TerminalShop::BaseModel
7
- attr_accessor data: Array[TerminalShop::Models::AddressAPI]
7
+ attr_accessor data: ::Array[TerminalShop::Models::AddressAPI]
8
8
 
9
9
  def initialize:
10
- (data: Array[TerminalShop::Models::AddressAPI]) -> void
10
+ (data: ::Array[TerminalShop::Models::AddressAPI]) -> void
11
11
  | (
12
12
  ?TerminalShop::Models::address_list_response
13
13
  | TerminalShop::BaseModel data
@@ -1,12 +1,12 @@
1
1
  module TerminalShop
2
2
  module Models
3
- type app_list_response = { data: Array[TerminalShop::Models::AppAPI] }
3
+ type app_list_response = { data: ::Array[TerminalShop::Models::AppAPI] }
4
4
 
5
5
  class AppListResponse < TerminalShop::BaseModel
6
- attr_accessor data: Array[TerminalShop::Models::AppAPI]
6
+ attr_accessor data: ::Array[TerminalShop::Models::AppAPI]
7
7
 
8
8
  def initialize:
9
- (data: Array[TerminalShop::Models::AppAPI]) -> void
9
+ (data: ::Array[TerminalShop::Models::AppAPI]) -> void
10
10
  | (
11
11
  ?TerminalShop::Models::app_list_response
12
12
  | TerminalShop::BaseModel data
@@ -1,12 +1,12 @@
1
1
  module TerminalShop
2
2
  module Models
3
- type card_list_response = { data: Array[TerminalShop::Models::CardAPI] }
3
+ type card_list_response = { data: ::Array[TerminalShop::Models::CardAPI] }
4
4
 
5
5
  class CardListResponse < TerminalShop::BaseModel
6
- attr_accessor data: Array[TerminalShop::Models::CardAPI]
6
+ attr_accessor data: ::Array[TerminalShop::Models::CardAPI]
7
7
 
8
8
  def initialize:
9
- (data: Array[TerminalShop::Models::CardAPI]) -> void
9
+ (data: ::Array[TerminalShop::Models::CardAPI]) -> void
10
10
  | (
11
11
  ?TerminalShop::Models::card_list_response
12
12
  | TerminalShop::BaseModel data
@@ -3,7 +3,7 @@ module TerminalShop
3
3
  type cart_api =
4
4
  {
5
5
  amount: TerminalShop::Models::CartAPI::Amount,
6
- items: Array[TerminalShop::Models::CartAPI::Item],
6
+ items: ::Array[TerminalShop::Models::CartAPI::Item],
7
7
  subtotal: Integer,
8
8
  address_id: String,
9
9
  card_id: String,
@@ -13,26 +13,28 @@ module TerminalShop
13
13
  class CartAPI < TerminalShop::BaseModel
14
14
  attr_accessor amount: TerminalShop::Models::CartAPI::Amount
15
15
 
16
- attr_accessor items: Array[TerminalShop::Models::CartAPI::Item]
16
+ attr_accessor items: ::Array[TerminalShop::Models::CartAPI::Item]
17
17
 
18
18
  attr_accessor subtotal: Integer
19
19
 
20
20
  attr_reader address_id: String?
21
21
 
22
- def address_id=: (String) -> void
22
+ def address_id=: (String) -> String
23
23
 
24
24
  attr_reader card_id: String?
25
25
 
26
- def card_id=: (String) -> void
26
+ def card_id=: (String) -> String
27
27
 
28
28
  attr_reader shipping: TerminalShop::Models::CartAPI::Shipping?
29
29
 
30
- def shipping=: (TerminalShop::Models::CartAPI::Shipping) -> void
30
+ def shipping=: (
31
+ TerminalShop::Models::CartAPI::Shipping
32
+ ) -> TerminalShop::Models::CartAPI::Shipping
31
33
 
32
34
  def initialize:
33
35
  (
34
36
  amount: TerminalShop::Models::CartAPI::Amount,
35
- items: Array[TerminalShop::Models::CartAPI::Item],
37
+ items: ::Array[TerminalShop::Models::CartAPI::Item],
36
38
  subtotal: Integer,
37
39
  address_id: String,
38
40
  card_id: String,
@@ -51,7 +53,7 @@ module TerminalShop
51
53
 
52
54
  attr_reader shipping: Integer?
53
55
 
54
- def shipping=: (Integer) -> void
56
+ def shipping=: (Integer) -> Integer
55
57
 
56
58
  def initialize:
57
59
  (subtotal: Integer, shipping: Integer) -> void
@@ -99,11 +101,11 @@ module TerminalShop
99
101
  class Shipping < TerminalShop::BaseModel
100
102
  attr_reader service: String?
101
103
 
102
- def service=: (String) -> void
104
+ def service=: (String) -> String
103
105
 
104
106
  attr_reader timeframe: String?
105
107
 
106
- def timeframe=: (String) -> void
108
+ def timeframe=: (String) -> String
107
109
 
108
110
  def initialize:
109
111
  (service: String, timeframe: String) -> void
@@ -4,7 +4,7 @@ module TerminalShop
4
4
  {
5
5
  id: String,
6
6
  amount: TerminalShop::Models::OrderAPI::Amount,
7
- items: Array[TerminalShop::Models::OrderAPI::Item],
7
+ items: ::Array[TerminalShop::Models::OrderAPI::Item],
8
8
  shipping: TerminalShop::Models::OrderAPI::Shipping,
9
9
  tracking: TerminalShop::Models::OrderAPI::Tracking,
10
10
  index: Integer
@@ -15,7 +15,7 @@ module TerminalShop
15
15
 
16
16
  attr_accessor amount: TerminalShop::Models::OrderAPI::Amount
17
17
 
18
- attr_accessor items: Array[TerminalShop::Models::OrderAPI::Item]
18
+ attr_accessor items: ::Array[TerminalShop::Models::OrderAPI::Item]
19
19
 
20
20
  attr_accessor shipping: TerminalShop::Models::OrderAPI::Shipping
21
21
 
@@ -23,13 +23,13 @@ module TerminalShop
23
23
 
24
24
  attr_reader index: Integer?
25
25
 
26
- def index=: (Integer) -> void
26
+ def index=: (Integer) -> Integer
27
27
 
28
28
  def initialize:
29
29
  (
30
30
  id: String,
31
31
  amount: TerminalShop::Models::OrderAPI::Amount,
32
- items: Array[TerminalShop::Models::OrderAPI::Item],
32
+ items: ::Array[TerminalShop::Models::OrderAPI::Item],
33
33
  shipping: TerminalShop::Models::OrderAPI::Shipping,
34
34
  tracking: TerminalShop::Models::OrderAPI::Tracking,
35
35
  index: Integer
@@ -75,11 +75,11 @@ module TerminalShop
75
75
 
76
76
  attr_reader description: String?
77
77
 
78
- def description=: (String) -> void
78
+ def description=: (String) -> String
79
79
 
80
80
  attr_reader product_variant_id: String?
81
81
 
82
- def product_variant_id=: (String) -> void
82
+ def product_variant_id=: (String) -> String
83
83
 
84
84
  def initialize:
85
85
  (
@@ -121,15 +121,15 @@ module TerminalShop
121
121
 
122
122
  attr_reader phone: String?
123
123
 
124
- def phone=: (String) -> void
124
+ def phone=: (String) -> String
125
125
 
126
126
  attr_reader province: String?
127
127
 
128
- def province=: (String) -> void
128
+ def province=: (String) -> String
129
129
 
130
130
  attr_reader street2: String?
131
131
 
132
- def street2=: (String) -> void
132
+ def street2=: (String) -> String
133
133
 
134
134
  def initialize:
135
135
  (
@@ -155,15 +155,15 @@ module TerminalShop
155
155
  class Tracking < TerminalShop::BaseModel
156
156
  attr_reader number: String?
157
157
 
158
- def number=: (String) -> void
158
+ def number=: (String) -> String
159
159
 
160
160
  attr_reader service: String?
161
161
 
162
- def service=: (String) -> void
162
+ def service=: (String) -> String
163
163
 
164
164
  attr_reader url: String?
165
165
 
166
- def url=: (String) -> void
166
+ def url=: (String) -> String
167
167
 
168
168
  def initialize:
169
169
  (number: String, service: String, url: String) -> void
@@ -1,12 +1,12 @@
1
1
  module TerminalShop
2
2
  module Models
3
- type order_list_response = { data: Array[TerminalShop::Models::OrderAPI] }
3
+ type order_list_response = { data: ::Array[TerminalShop::Models::OrderAPI] }
4
4
 
5
5
  class OrderListResponse < TerminalShop::BaseModel
6
- attr_accessor data: Array[TerminalShop::Models::OrderAPI]
6
+ attr_accessor data: ::Array[TerminalShop::Models::OrderAPI]
7
7
 
8
8
  def initialize:
9
- (data: Array[TerminalShop::Models::OrderAPI]) -> void
9
+ (data: ::Array[TerminalShop::Models::OrderAPI]) -> void
10
10
  | (
11
11
  ?TerminalShop::Models::order_list_response
12
12
  | TerminalShop::BaseModel data
@@ -4,12 +4,12 @@ module TerminalShop
4
4
  {
5
5
  id: String,
6
6
  description: String,
7
- filters: Array[TerminalShop::Models::ProductAPI::filter],
7
+ filters: ::Array[TerminalShop::Models::ProductAPI::filter],
8
8
  name: String,
9
- variants: Array[TerminalShop::Models::ProductVariant],
9
+ variants: ::Array[TerminalShop::Models::ProductVariant],
10
10
  order: Integer,
11
11
  subscription: TerminalShop::Models::ProductAPI::subscription,
12
- tags: Hash[Symbol, String]
12
+ tags: ::Hash[Symbol, String]
13
13
  }
14
14
 
15
15
  class ProductAPI < TerminalShop::BaseModel
@@ -17,36 +17,36 @@ module TerminalShop
17
17
 
18
18
  attr_accessor description: String
19
19
 
20
- attr_accessor filters: Array[TerminalShop::Models::ProductAPI::filter]
20
+ attr_accessor filters: ::Array[TerminalShop::Models::ProductAPI::filter]
21
21
 
22
22
  attr_accessor name: String
23
23
 
24
- attr_accessor variants: Array[TerminalShop::Models::ProductVariant]
24
+ attr_accessor variants: ::Array[TerminalShop::Models::ProductVariant]
25
25
 
26
26
  attr_reader order: Integer?
27
27
 
28
- def order=: (Integer) -> void
28
+ def order=: (Integer) -> Integer
29
29
 
30
30
  attr_reader subscription: TerminalShop::Models::ProductAPI::subscription?
31
31
 
32
32
  def subscription=: (
33
33
  TerminalShop::Models::ProductAPI::subscription
34
- ) -> void
34
+ ) -> TerminalShop::Models::ProductAPI::subscription
35
35
 
36
- attr_reader tags: Hash[Symbol, String]?
36
+ attr_reader tags: ::Hash[Symbol, String]?
37
37
 
38
- def tags=: (Hash[Symbol, String]) -> void
38
+ def tags=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
39
39
 
40
40
  def initialize:
41
41
  (
42
42
  id: String,
43
43
  description: String,
44
- filters: Array[TerminalShop::Models::ProductAPI::filter],
44
+ filters: ::Array[TerminalShop::Models::ProductAPI::filter],
45
45
  name: String,
46
- variants: Array[TerminalShop::Models::ProductVariant],
46
+ variants: ::Array[TerminalShop::Models::ProductVariant],
47
47
  order: Integer,
48
48
  subscription: TerminalShop::Models::ProductAPI::subscription,
49
- tags: Hash[Symbol, String]
49
+ tags: ::Hash[Symbol, String]
50
50
  ) -> void
51
51
  | (
52
52
  ?TerminalShop::Models::product_api | TerminalShop::BaseModel data
@@ -60,7 +60,7 @@ module TerminalShop
60
60
  EU: :eu
61
61
  NA: :na
62
62
 
63
- def self.values: -> Array[TerminalShop::Models::ProductAPI::filter]
63
+ def self.values: -> ::Array[TerminalShop::Models::ProductAPI::filter]
64
64
  end
65
65
 
66
66
  type subscription = :allowed | :required
@@ -69,7 +69,7 @@ module TerminalShop
69
69
  ALLOWED: :allowed
70
70
  REQUIRED: :required
71
71
 
72
- def self.values: -> Array[TerminalShop::Models::ProductAPI::subscription]
72
+ def self.values: -> ::Array[TerminalShop::Models::ProductAPI::subscription]
73
73
  end
74
74
  end
75
75
  end
@@ -1,13 +1,13 @@
1
1
  module TerminalShop
2
2
  module Models
3
3
  type product_list_response =
4
- { data: Array[TerminalShop::Models::ProductAPI] }
4
+ { data: ::Array[TerminalShop::Models::ProductAPI] }
5
5
 
6
6
  class ProductListResponse < TerminalShop::BaseModel
7
- attr_accessor data: Array[TerminalShop::Models::ProductAPI]
7
+ attr_accessor data: ::Array[TerminalShop::Models::ProductAPI]
8
8
 
9
9
  def initialize:
10
- (data: Array[TerminalShop::Models::ProductAPI]) -> void
10
+ (data: ::Array[TerminalShop::Models::ProductAPI]) -> void
11
11
  | (
12
12
  ?TerminalShop::Models::product_list_response
13
13
  | TerminalShop::BaseModel data