terminal-shop 3.8.0 → 3.8.2

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 (124) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +28 -0
  3. data/README.md +1 -1
  4. data/lib/terminal_shop/internal/util.rb +10 -2
  5. data/lib/terminal_shop/models/address.rb +2 -2
  6. data/lib/terminal_shop/models/address_get_response.rb +2 -2
  7. data/lib/terminal_shop/models/address_list_response.rb +2 -2
  8. data/lib/terminal_shop/models/app.rb +2 -2
  9. data/lib/terminal_shop/models/app_get_response.rb +2 -2
  10. data/lib/terminal_shop/models/app_list_response.rb +2 -2
  11. data/lib/terminal_shop/models/card.rb +5 -5
  12. data/lib/terminal_shop/models/card_get_response.rb +2 -2
  13. data/lib/terminal_shop/models/card_list_response.rb +2 -2
  14. data/lib/terminal_shop/models/cart.rb +9 -9
  15. data/lib/terminal_shop/models/cart_convert_response.rb +2 -2
  16. data/lib/terminal_shop/models/cart_get_response.rb +2 -2
  17. data/lib/terminal_shop/models/cart_set_item_response.rb +2 -2
  18. data/lib/terminal_shop/models/order.rb +17 -17
  19. data/lib/terminal_shop/models/order_get_response.rb +2 -2
  20. data/lib/terminal_shop/models/order_list_response.rb +2 -2
  21. data/lib/terminal_shop/models/product.rb +10 -10
  22. data/lib/terminal_shop/models/product_get_response.rb +2 -2
  23. data/lib/terminal_shop/models/product_list_response.rb +2 -2
  24. data/lib/terminal_shop/models/product_variant.rb +4 -4
  25. data/lib/terminal_shop/models/profile.rb +4 -4
  26. data/lib/terminal_shop/models/profile_me_response.rb +2 -2
  27. data/lib/terminal_shop/models/profile_update_response.rb +2 -2
  28. data/lib/terminal_shop/models/subscription.rb +5 -5
  29. data/lib/terminal_shop/models/subscription_get_response.rb +2 -2
  30. data/lib/terminal_shop/models/subscription_list_response.rb +2 -2
  31. data/lib/terminal_shop/models/subscription_update_params.rb +3 -3
  32. data/lib/terminal_shop/models/subscription_update_response.rb +2 -2
  33. data/lib/terminal_shop/models/token.rb +2 -2
  34. data/lib/terminal_shop/models/token_get_response.rb +2 -2
  35. data/lib/terminal_shop/models/token_list_response.rb +2 -2
  36. data/lib/terminal_shop/models/view_init_response.rb +20 -20
  37. data/lib/terminal_shop/resources/subscription.rb +2 -2
  38. data/lib/terminal_shop/version.rb +1 -1
  39. data/lib/terminal_shop.rb +3 -1
  40. data/sig/terminal_shop/models/address.rbs +13 -0
  41. data/sig/terminal_shop/models/address_create_params.rbs +12 -0
  42. data/sig/terminal_shop/models/address_create_response.rbs +2 -0
  43. data/sig/terminal_shop/models/address_delete_params.rbs +2 -0
  44. data/sig/terminal_shop/models/address_delete_response.rbs +2 -0
  45. data/sig/terminal_shop/models/address_get_params.rbs +2 -0
  46. data/sig/terminal_shop/models/address_get_response.rbs +2 -0
  47. data/sig/terminal_shop/models/address_list_params.rbs +2 -0
  48. data/sig/terminal_shop/models/address_list_response.rbs +2 -0
  49. data/sig/terminal_shop/models/app.rbs +7 -0
  50. data/sig/terminal_shop/models/app_create_params.rbs +6 -0
  51. data/sig/terminal_shop/models/app_create_response.rbs +4 -0
  52. data/sig/terminal_shop/models/app_delete_params.rbs +2 -0
  53. data/sig/terminal_shop/models/app_delete_response.rbs +2 -0
  54. data/sig/terminal_shop/models/app_get_params.rbs +2 -0
  55. data/sig/terminal_shop/models/app_get_response.rbs +2 -0
  56. data/sig/terminal_shop/models/app_list_params.rbs +2 -0
  57. data/sig/terminal_shop/models/app_list_response.rbs +2 -0
  58. data/sig/terminal_shop/models/card.rbs +10 -0
  59. data/sig/terminal_shop/models/card_collect_params.rbs +2 -0
  60. data/sig/terminal_shop/models/card_collect_response.rbs +4 -0
  61. data/sig/terminal_shop/models/card_create_params.rbs +5 -0
  62. data/sig/terminal_shop/models/card_create_response.rbs +2 -0
  63. data/sig/terminal_shop/models/card_delete_params.rbs +2 -0
  64. data/sig/terminal_shop/models/card_delete_response.rbs +2 -0
  65. data/sig/terminal_shop/models/card_get_params.rbs +2 -0
  66. data/sig/terminal_shop/models/card_get_response.rbs +2 -0
  67. data/sig/terminal_shop/models/card_list_params.rbs +2 -0
  68. data/sig/terminal_shop/models/card_list_response.rbs +2 -0
  69. data/sig/terminal_shop/models/cart.rbs +20 -0
  70. data/sig/terminal_shop/models/cart_clear_params.rbs +2 -0
  71. data/sig/terminal_shop/models/cart_clear_response.rbs +2 -0
  72. data/sig/terminal_shop/models/cart_convert_params.rbs +2 -0
  73. data/sig/terminal_shop/models/cart_convert_response.rbs +2 -0
  74. data/sig/terminal_shop/models/cart_get_params.rbs +2 -0
  75. data/sig/terminal_shop/models/cart_get_response.rbs +2 -0
  76. data/sig/terminal_shop/models/cart_set_address_params.rbs +5 -0
  77. data/sig/terminal_shop/models/cart_set_address_response.rbs +2 -0
  78. data/sig/terminal_shop/models/cart_set_card_params.rbs +5 -0
  79. data/sig/terminal_shop/models/cart_set_card_response.rbs +2 -0
  80. data/sig/terminal_shop/models/cart_set_item_params.rbs +6 -0
  81. data/sig/terminal_shop/models/cart_set_item_response.rbs +2 -0
  82. data/sig/terminal_shop/models/email_create_params.rbs +5 -0
  83. data/sig/terminal_shop/models/email_create_response.rbs +2 -0
  84. data/sig/terminal_shop/models/order.rbs +46 -6
  85. data/sig/terminal_shop/models/order_create_params.rbs +7 -0
  86. data/sig/terminal_shop/models/order_create_response.rbs +2 -0
  87. data/sig/terminal_shop/models/order_get_params.rbs +2 -0
  88. data/sig/terminal_shop/models/order_get_response.rbs +2 -0
  89. data/sig/terminal_shop/models/order_list_params.rbs +2 -0
  90. data/sig/terminal_shop/models/order_list_response.rbs +2 -0
  91. data/sig/terminal_shop/models/product.rbs +25 -6
  92. data/sig/terminal_shop/models/product_get_params.rbs +2 -0
  93. data/sig/terminal_shop/models/product_get_response.rbs +2 -0
  94. data/sig/terminal_shop/models/product_list_params.rbs +2 -0
  95. data/sig/terminal_shop/models/product_list_response.rbs +2 -0
  96. data/sig/terminal_shop/models/product_variant.rbs +15 -0
  97. data/sig/terminal_shop/models/profile.rbs +10 -0
  98. data/sig/terminal_shop/models/profile_me_params.rbs +2 -0
  99. data/sig/terminal_shop/models/profile_me_response.rbs +2 -0
  100. data/sig/terminal_shop/models/profile_update_params.rbs +6 -0
  101. data/sig/terminal_shop/models/profile_update_response.rbs +2 -0
  102. data/sig/terminal_shop/models/subscription.rbs +22 -6
  103. data/sig/terminal_shop/models/subscription_create_params.rbs +2 -0
  104. data/sig/terminal_shop/models/subscription_create_response.rbs +2 -0
  105. data/sig/terminal_shop/models/subscription_delete_params.rbs +2 -0
  106. data/sig/terminal_shop/models/subscription_delete_response.rbs +2 -0
  107. data/sig/terminal_shop/models/subscription_get_params.rbs +2 -0
  108. data/sig/terminal_shop/models/subscription_get_response.rbs +2 -0
  109. data/sig/terminal_shop/models/subscription_list_params.rbs +2 -0
  110. data/sig/terminal_shop/models/subscription_list_response.rbs +2 -0
  111. data/sig/terminal_shop/models/subscription_update_params.rbs +11 -0
  112. data/sig/terminal_shop/models/subscription_update_response.rbs +2 -0
  113. data/sig/terminal_shop/models/token.rbs +2 -0
  114. data/sig/terminal_shop/models/token_create_params.rbs +2 -0
  115. data/sig/terminal_shop/models/token_create_response.rbs +4 -0
  116. data/sig/terminal_shop/models/token_delete_params.rbs +2 -0
  117. data/sig/terminal_shop/models/token_delete_response.rbs +2 -0
  118. data/sig/terminal_shop/models/token_get_params.rbs +2 -0
  119. data/sig/terminal_shop/models/token_get_response.rbs +2 -0
  120. data/sig/terminal_shop/models/token_list_params.rbs +2 -0
  121. data/sig/terminal_shop/models/token_list_response.rbs +2 -0
  122. data/sig/terminal_shop/models/view_init_params.rbs +2 -0
  123. data/sig/terminal_shop/models/view_init_response.rbs +15 -0
  124. metadata +2 -2
@@ -6,6 +6,8 @@ module TerminalShop
6
6
  attr_accessor data: TerminalShop::CardAPI
7
7
 
8
8
  def initialize: (data: TerminalShop::CardAPI) -> void
9
+
10
+ def to_hash: -> { data: TerminalShop::CardAPI }
9
11
  end
10
12
  end
11
13
  end
@@ -8,6 +8,8 @@ module TerminalShop
8
8
  include TerminalShop::Internal::Type::RequestParameters
9
9
 
10
10
  def initialize: (?request_options: TerminalShop::request_opts) -> void
11
+
12
+ def to_hash: -> { request_options: TerminalShop::RequestOptions }
11
13
  end
12
14
  end
13
15
  end
@@ -6,6 +6,8 @@ module TerminalShop
6
6
  attr_accessor data: ::Array[TerminalShop::CardAPI]
7
7
 
8
8
  def initialize: (data: ::Array[TerminalShop::CardAPI]) -> void
9
+
10
+ def to_hash: -> { data: ::Array[TerminalShop::CardAPI] }
9
11
  end
10
12
  end
11
13
  end
@@ -40,6 +40,15 @@ module TerminalShop
40
40
  ?shipping: TerminalShop::CartAPI::Shipping
41
41
  ) -> void
42
42
 
43
+ def to_hash: -> {
44
+ amount: TerminalShop::CartAPI::Amount,
45
+ items: ::Array[TerminalShop::CartAPI::Item],
46
+ subtotal: Integer,
47
+ address_id: String,
48
+ card_id: String,
49
+ shipping: TerminalShop::CartAPI::Shipping
50
+ }
51
+
43
52
  type amount = { subtotal: Integer, shipping: Integer, total: Integer }
44
53
 
45
54
  class Amount < TerminalShop::Internal::Type::BaseModel
@@ -58,6 +67,8 @@ module TerminalShop
58
67
  ?shipping: Integer,
59
68
  ?total: Integer
60
69
  ) -> void
70
+
71
+ def to_hash: -> { subtotal: Integer, shipping: Integer, total: Integer }
61
72
  end
62
73
 
63
74
  type item =
@@ -83,6 +94,13 @@ module TerminalShop
83
94
  quantity: Integer,
84
95
  subtotal: Integer
85
96
  ) -> void
97
+
98
+ def to_hash: -> {
99
+ id: String,
100
+ product_variant_id: String,
101
+ quantity: Integer,
102
+ subtotal: Integer
103
+ }
86
104
  end
87
105
 
88
106
  type shipping = { service: String, timeframe: String }
@@ -97,6 +115,8 @@ module TerminalShop
97
115
  def timeframe=: (String) -> String
98
116
 
99
117
  def initialize: (?service: String, ?timeframe: String) -> void
118
+
119
+ def to_hash: -> { service: String, timeframe: String }
100
120
  end
101
121
  end
102
122
  end
@@ -8,6 +8,8 @@ module TerminalShop
8
8
  include TerminalShop::Internal::Type::RequestParameters
9
9
 
10
10
  def initialize: (?request_options: TerminalShop::request_opts) -> void
11
+
12
+ def to_hash: -> { request_options: TerminalShop::RequestOptions }
11
13
  end
12
14
  end
13
15
  end
@@ -6,6 +6,8 @@ module TerminalShop
6
6
  attr_accessor data: :ok
7
7
 
8
8
  def initialize: (?data: :ok) -> void
9
+
10
+ def to_hash: -> { data: :ok }
9
11
  end
10
12
  end
11
13
  end
@@ -8,6 +8,8 @@ module TerminalShop
8
8
  include TerminalShop::Internal::Type::RequestParameters
9
9
 
10
10
  def initialize: (?request_options: TerminalShop::request_opts) -> void
11
+
12
+ def to_hash: -> { request_options: TerminalShop::RequestOptions }
11
13
  end
12
14
  end
13
15
  end
@@ -6,6 +6,8 @@ module TerminalShop
6
6
  attr_accessor data: TerminalShop::OrderAPI
7
7
 
8
8
  def initialize: (data: TerminalShop::OrderAPI) -> void
9
+
10
+ def to_hash: -> { data: TerminalShop::OrderAPI }
9
11
  end
10
12
  end
11
13
  end
@@ -8,6 +8,8 @@ module TerminalShop
8
8
  include TerminalShop::Internal::Type::RequestParameters
9
9
 
10
10
  def initialize: (?request_options: TerminalShop::request_opts) -> void
11
+
12
+ def to_hash: -> { request_options: TerminalShop::RequestOptions }
11
13
  end
12
14
  end
13
15
  end
@@ -6,6 +6,8 @@ module TerminalShop
6
6
  attr_accessor data: TerminalShop::CartAPI
7
7
 
8
8
  def initialize: (data: TerminalShop::CartAPI) -> void
9
+
10
+ def to_hash: -> { data: TerminalShop::CartAPI }
9
11
  end
10
12
  end
11
13
  end
@@ -13,6 +13,11 @@ module TerminalShop
13
13
  address_id: String,
14
14
  ?request_options: TerminalShop::request_opts
15
15
  ) -> void
16
+
17
+ def to_hash: -> {
18
+ address_id: String,
19
+ request_options: TerminalShop::RequestOptions
20
+ }
16
21
  end
17
22
  end
18
23
  end
@@ -6,6 +6,8 @@ module TerminalShop
6
6
  attr_accessor data: :ok
7
7
 
8
8
  def initialize: (?data: :ok) -> void
9
+
10
+ def to_hash: -> { data: :ok }
9
11
  end
10
12
  end
11
13
  end
@@ -13,6 +13,11 @@ module TerminalShop
13
13
  card_id: String,
14
14
  ?request_options: TerminalShop::request_opts
15
15
  ) -> void
16
+
17
+ def to_hash: -> {
18
+ card_id: String,
19
+ request_options: TerminalShop::RequestOptions
20
+ }
16
21
  end
17
22
  end
18
23
  end
@@ -6,6 +6,8 @@ module TerminalShop
6
6
  attr_accessor data: :ok
7
7
 
8
8
  def initialize: (?data: :ok) -> void
9
+
10
+ def to_hash: -> { data: :ok }
9
11
  end
10
12
  end
11
13
  end
@@ -17,6 +17,12 @@ module TerminalShop
17
17
  quantity: Integer,
18
18
  ?request_options: TerminalShop::request_opts
19
19
  ) -> void
20
+
21
+ def to_hash: -> {
22
+ product_variant_id: String,
23
+ quantity: Integer,
24
+ request_options: TerminalShop::RequestOptions
25
+ }
20
26
  end
21
27
  end
22
28
  end
@@ -6,6 +6,8 @@ module TerminalShop
6
6
  attr_accessor data: TerminalShop::CartAPI
7
7
 
8
8
  def initialize: (data: TerminalShop::CartAPI) -> void
9
+
10
+ def to_hash: -> { data: TerminalShop::CartAPI }
9
11
  end
10
12
  end
11
13
  end
@@ -13,6 +13,11 @@ module TerminalShop
13
13
  email: String,
14
14
  ?request_options: TerminalShop::request_opts
15
15
  ) -> void
16
+
17
+ def to_hash: -> {
18
+ email: String,
19
+ request_options: TerminalShop::RequestOptions
20
+ }
16
21
  end
17
22
  end
18
23
  end
@@ -6,6 +6,8 @@ module TerminalShop
6
6
  attr_accessor data: :ok
7
7
 
8
8
  def initialize: (?data: :ok) -> void
9
+
10
+ def to_hash: -> { data: :ok }
9
11
  end
10
12
  end
11
13
  end
@@ -38,6 +38,16 @@ module TerminalShop
38
38
  ?index: Integer
39
39
  ) -> void
40
40
 
41
+ def to_hash: -> {
42
+ id: String,
43
+ amount: TerminalShop::OrderAPI::Amount,
44
+ created: String,
45
+ items: ::Array[TerminalShop::OrderAPI::Item],
46
+ shipping: TerminalShop::OrderAPI::Shipping,
47
+ tracking: TerminalShop::OrderAPI::Tracking,
48
+ index: Integer
49
+ }
50
+
41
51
  type amount = { shipping: Integer, subtotal: Integer }
42
52
 
43
53
  class Amount < TerminalShop::Internal::Type::BaseModel
@@ -46,6 +56,8 @@ module TerminalShop
46
56
  attr_accessor subtotal: Integer
47
57
 
48
58
  def initialize: (shipping: Integer, subtotal: Integer) -> void
59
+
60
+ def to_hash: -> { shipping: Integer, subtotal: Integer }
49
61
  end
50
62
 
51
63
  type item =
@@ -79,6 +91,14 @@ module TerminalShop
79
91
  ?description: String,
80
92
  ?product_variant_id: String
81
93
  ) -> void
94
+
95
+ def to_hash: -> {
96
+ id: String,
97
+ amount: Integer,
98
+ quantity: Integer,
99
+ description: String,
100
+ product_variant_id: String
101
+ }
82
102
  end
83
103
 
84
104
  type shipping =
@@ -126,13 +146,24 @@ module TerminalShop
126
146
  ?province: String,
127
147
  ?street2: String
128
148
  ) -> void
149
+
150
+ def to_hash: -> {
151
+ city: String,
152
+ country: String,
153
+ name: String,
154
+ :street1 => String,
155
+ zip: String,
156
+ phone: String,
157
+ province: String,
158
+ :street2 => String
159
+ }
129
160
  end
130
161
 
131
162
  type tracking =
132
163
  {
133
164
  number: String,
134
165
  service: String,
135
- status: TerminalShop::OrderAPI::Tracking::status,
166
+ status: TerminalShop::Models::OrderAPI::Tracking::status,
136
167
  status_details: String,
137
168
  status_updated_at: String,
138
169
  url: String
@@ -147,11 +178,11 @@ module TerminalShop
147
178
 
148
179
  def service=: (String) -> String
149
180
 
150
- attr_reader status: TerminalShop::OrderAPI::Tracking::status?
181
+ attr_reader status: TerminalShop::Models::OrderAPI::Tracking::status?
151
182
 
152
183
  def status=: (
153
- TerminalShop::OrderAPI::Tracking::status
154
- ) -> TerminalShop::OrderAPI::Tracking::status
184
+ TerminalShop::Models::OrderAPI::Tracking::status
185
+ ) -> TerminalShop::Models::OrderAPI::Tracking::status
155
186
 
156
187
  attr_reader status_details: String?
157
188
 
@@ -168,12 +199,21 @@ module TerminalShop
168
199
  def initialize: (
169
200
  ?number: String,
170
201
  ?service: String,
171
- ?status: TerminalShop::OrderAPI::Tracking::status,
202
+ ?status: TerminalShop::Models::OrderAPI::Tracking::status,
172
203
  ?status_details: String,
173
204
  ?status_updated_at: String,
174
205
  ?url: String
175
206
  ) -> void
176
207
 
208
+ def to_hash: -> {
209
+ number: String,
210
+ service: String,
211
+ status: TerminalShop::Models::OrderAPI::Tracking::status,
212
+ status_details: String,
213
+ status_updated_at: String,
214
+ url: String
215
+ }
216
+
177
217
  type status =
178
218
  :PRE_TRANSIT | :TRANSIT | :DELIVERED | :RETURNED | :FAILURE | :UNKNOWN
179
219
 
@@ -187,7 +227,7 @@ module TerminalShop
187
227
  FAILURE: :FAILURE
188
228
  UNKNOWN: :UNKNOWN
189
229
 
190
- def self?.values: -> ::Array[TerminalShop::OrderAPI::Tracking::status]
230
+ def self?.values: -> ::Array[TerminalShop::Models::OrderAPI::Tracking::status]
191
231
  end
192
232
  end
193
233
  end
@@ -20,6 +20,13 @@ module TerminalShop
20
20
  variants: ::Hash[Symbol, Integer],
21
21
  ?request_options: TerminalShop::request_opts
22
22
  ) -> void
23
+
24
+ def to_hash: -> {
25
+ address_id: String,
26
+ card_id: String,
27
+ variants: ::Hash[Symbol, Integer],
28
+ request_options: TerminalShop::RequestOptions
29
+ }
23
30
  end
24
31
  end
25
32
  end
@@ -6,6 +6,8 @@ module TerminalShop
6
6
  attr_accessor data: String
7
7
 
8
8
  def initialize: (data: String) -> void
9
+
10
+ def to_hash: -> { data: String }
9
11
  end
10
12
  end
11
13
  end
@@ -8,6 +8,8 @@ module TerminalShop
8
8
  include TerminalShop::Internal::Type::RequestParameters
9
9
 
10
10
  def initialize: (?request_options: TerminalShop::request_opts) -> void
11
+
12
+ def to_hash: -> { request_options: TerminalShop::RequestOptions }
11
13
  end
12
14
  end
13
15
  end
@@ -6,6 +6,8 @@ module TerminalShop
6
6
  attr_accessor data: TerminalShop::OrderAPI
7
7
 
8
8
  def initialize: (data: TerminalShop::OrderAPI) -> void
9
+
10
+ def to_hash: -> { data: TerminalShop::OrderAPI }
9
11
  end
10
12
  end
11
13
  end
@@ -8,6 +8,8 @@ module TerminalShop
8
8
  include TerminalShop::Internal::Type::RequestParameters
9
9
 
10
10
  def initialize: (?request_options: TerminalShop::request_opts) -> void
11
+
12
+ def to_hash: -> { request_options: TerminalShop::RequestOptions }
11
13
  end
12
14
  end
13
15
  end
@@ -6,6 +6,8 @@ module TerminalShop
6
6
  attr_accessor data: ::Array[TerminalShop::OrderAPI]
7
7
 
8
8
  def initialize: (data: ::Array[TerminalShop::OrderAPI]) -> void
9
+
10
+ def to_hash: -> { data: ::Array[TerminalShop::OrderAPI] }
9
11
  end
10
12
  end
11
13
  end
@@ -7,7 +7,7 @@ module TerminalShop
7
7
  name: String,
8
8
  variants: ::Array[TerminalShop::ProductVariant],
9
9
  order: Integer,
10
- subscription: TerminalShop::ProductAPI::subscription,
10
+ subscription: TerminalShop::Models::ProductAPI::subscription,
11
11
  tags: TerminalShop::ProductAPI::Tags
12
12
  }
13
13
 
@@ -24,11 +24,11 @@ module TerminalShop
24
24
 
25
25
  def order=: (Integer) -> Integer
26
26
 
27
- attr_reader subscription: TerminalShop::ProductAPI::subscription?
27
+ attr_reader subscription: TerminalShop::Models::ProductAPI::subscription?
28
28
 
29
29
  def subscription=: (
30
- TerminalShop::ProductAPI::subscription
31
- ) -> TerminalShop::ProductAPI::subscription
30
+ TerminalShop::Models::ProductAPI::subscription
31
+ ) -> TerminalShop::Models::ProductAPI::subscription
32
32
 
33
33
  attr_reader tags: TerminalShop::ProductAPI::Tags?
34
34
 
@@ -42,10 +42,20 @@ module TerminalShop
42
42
  name: String,
43
43
  variants: ::Array[TerminalShop::ProductVariant],
44
44
  ?order: Integer,
45
- ?subscription: TerminalShop::ProductAPI::subscription,
45
+ ?subscription: TerminalShop::Models::ProductAPI::subscription,
46
46
  ?tags: TerminalShop::ProductAPI::Tags
47
47
  ) -> void
48
48
 
49
+ def to_hash: -> {
50
+ id: String,
51
+ description: String,
52
+ name: String,
53
+ variants: ::Array[TerminalShop::ProductVariant],
54
+ order: Integer,
55
+ subscription: TerminalShop::Models::ProductAPI::subscription,
56
+ tags: TerminalShop::ProductAPI::Tags
57
+ }
58
+
49
59
  type subscription = :allowed | :required
50
60
 
51
61
  module Subscription
@@ -54,7 +64,7 @@ module TerminalShop
54
64
  ALLOWED: :allowed
55
65
  REQUIRED: :required
56
66
 
57
- def self?.values: -> ::Array[TerminalShop::ProductAPI::subscription]
67
+ def self?.values: -> ::Array[TerminalShop::Models::ProductAPI::subscription]
58
68
  end
59
69
 
60
70
  type tags =
@@ -100,6 +110,15 @@ module TerminalShop
100
110
  ?market_global: bool,
101
111
  ?market_na: bool
102
112
  ) -> void
113
+
114
+ def to_hash: -> {
115
+ app: String,
116
+ color: String,
117
+ featured: bool,
118
+ market_eu: bool,
119
+ market_global: bool,
120
+ market_na: bool
121
+ }
103
122
  end
104
123
  end
105
124
  end
@@ -8,6 +8,8 @@ module TerminalShop
8
8
  include TerminalShop::Internal::Type::RequestParameters
9
9
 
10
10
  def initialize: (?request_options: TerminalShop::request_opts) -> void
11
+
12
+ def to_hash: -> { request_options: TerminalShop::RequestOptions }
11
13
  end
12
14
  end
13
15
  end
@@ -6,6 +6,8 @@ module TerminalShop
6
6
  attr_accessor data: TerminalShop::ProductAPI
7
7
 
8
8
  def initialize: (data: TerminalShop::ProductAPI) -> void
9
+
10
+ def to_hash: -> { data: TerminalShop::ProductAPI }
9
11
  end
10
12
  end
11
13
  end
@@ -8,6 +8,8 @@ module TerminalShop
8
8
  include TerminalShop::Internal::Type::RequestParameters
9
9
 
10
10
  def initialize: (?request_options: TerminalShop::request_opts) -> void
11
+
12
+ def to_hash: -> { request_options: TerminalShop::RequestOptions }
11
13
  end
12
14
  end
13
15
  end
@@ -6,6 +6,8 @@ module TerminalShop
6
6
  attr_accessor data: ::Array[TerminalShop::ProductAPI]
7
7
 
8
8
  def initialize: (data: ::Array[TerminalShop::ProductAPI]) -> void
9
+
10
+ def to_hash: -> { data: ::Array[TerminalShop::ProductAPI] }
9
11
  end
10
12
  end
11
13
  end
@@ -34,6 +34,14 @@ module TerminalShop
34
34
  ?tags: TerminalShop::ProductVariant::Tags
35
35
  ) -> void
36
36
 
37
+ def to_hash: -> {
38
+ id: String,
39
+ name: String,
40
+ price: Integer,
41
+ description: String,
42
+ tags: TerminalShop::ProductVariant::Tags
43
+ }
44
+
37
45
  type tags =
38
46
  { app: String, market_eu: bool, market_global: bool, market_na: bool }
39
47
 
@@ -60,6 +68,13 @@ module TerminalShop
60
68
  ?market_global: bool,
61
69
  ?market_na: bool
62
70
  ) -> void
71
+
72
+ def to_hash: -> {
73
+ app: String,
74
+ market_eu: bool,
75
+ market_global: bool,
76
+ market_na: bool
77
+ }
63
78
  end
64
79
  end
65
80
  end
@@ -7,6 +7,8 @@ module TerminalShop
7
7
 
8
8
  def initialize: (user: TerminalShop::ProfileAPI::User) -> void
9
9
 
10
+ def to_hash: -> { user: TerminalShop::ProfileAPI::User }
11
+
10
12
  type user =
11
13
  {
12
14
  id: String,
@@ -34,6 +36,14 @@ module TerminalShop
34
36
  name: String?,
35
37
  stripe_customer_id: String
36
38
  ) -> void
39
+
40
+ def to_hash: -> {
41
+ id: String,
42
+ email: String?,
43
+ fingerprint: String?,
44
+ name: String?,
45
+ stripe_customer_id: String
46
+ }
37
47
  end
38
48
  end
39
49
  end
@@ -8,6 +8,8 @@ module TerminalShop
8
8
  include TerminalShop::Internal::Type::RequestParameters
9
9
 
10
10
  def initialize: (?request_options: TerminalShop::request_opts) -> void
11
+
12
+ def to_hash: -> { request_options: TerminalShop::RequestOptions }
11
13
  end
12
14
  end
13
15
  end
@@ -6,6 +6,8 @@ module TerminalShop
6
6
  attr_accessor data: TerminalShop::ProfileAPI
7
7
 
8
8
  def initialize: (data: TerminalShop::ProfileAPI) -> void
9
+
10
+ def to_hash: -> { data: TerminalShop::ProfileAPI }
9
11
  end
10
12
  end
11
13
  end
@@ -17,6 +17,12 @@ module TerminalShop
17
17
  name: String,
18
18
  ?request_options: TerminalShop::request_opts
19
19
  ) -> void
20
+
21
+ def to_hash: -> {
22
+ email: String,
23
+ name: String,
24
+ request_options: TerminalShop::RequestOptions
25
+ }
20
26
  end
21
27
  end
22
28
  end
@@ -6,6 +6,8 @@ module TerminalShop
6
6
  attr_accessor data: TerminalShop::ProfileAPI
7
7
 
8
8
  def initialize: (data: TerminalShop::ProfileAPI) -> void
9
+
10
+ def to_hash: -> { data: TerminalShop::ProfileAPI }
9
11
  end
10
12
  end
11
13
  end