terminal-shop 3.7.0 → 3.8.1

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 (159) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +42 -0
  3. data/README.md +81 -53
  4. data/SECURITY.md +2 -2
  5. data/lib/terminal_shop/client.rb +4 -4
  6. data/lib/terminal_shop/internal/transport/pooled_net_requester.rb +3 -1
  7. data/lib/terminal_shop/internal/type/array_of.rb +8 -0
  8. data/lib/terminal_shop/internal/type/base_model.rb +15 -0
  9. data/lib/terminal_shop/internal/type/boolean.rb +8 -0
  10. data/lib/terminal_shop/internal/type/enum.rb +12 -0
  11. data/lib/terminal_shop/internal/type/file_input.rb +7 -0
  12. data/lib/terminal_shop/internal/type/hash_of.rb +8 -0
  13. data/lib/terminal_shop/internal/type/union.rb +12 -0
  14. data/lib/terminal_shop/internal/type/unknown.rb +8 -0
  15. data/lib/terminal_shop/internal/util.rb +50 -1
  16. data/lib/terminal_shop/internal.rb +3 -0
  17. data/lib/terminal_shop/models/address.rb +2 -2
  18. data/lib/terminal_shop/models/address_get_response.rb +2 -2
  19. data/lib/terminal_shop/models/address_list_response.rb +2 -2
  20. data/lib/terminal_shop/models/app.rb +2 -2
  21. data/lib/terminal_shop/models/app_get_response.rb +2 -2
  22. data/lib/terminal_shop/models/app_list_response.rb +2 -2
  23. data/lib/terminal_shop/models/card.rb +5 -5
  24. data/lib/terminal_shop/models/card_get_response.rb +2 -2
  25. data/lib/terminal_shop/models/card_list_response.rb +2 -2
  26. data/lib/terminal_shop/models/cart.rb +9 -9
  27. data/lib/terminal_shop/models/cart_convert_response.rb +2 -2
  28. data/lib/terminal_shop/models/cart_get_response.rb +2 -2
  29. data/lib/terminal_shop/models/cart_set_item_response.rb +2 -2
  30. data/lib/terminal_shop/models/order.rb +17 -17
  31. data/lib/terminal_shop/models/order_get_response.rb +2 -2
  32. data/lib/terminal_shop/models/order_list_response.rb +2 -2
  33. data/lib/terminal_shop/models/product.rb +10 -10
  34. data/lib/terminal_shop/models/product_get_response.rb +2 -2
  35. data/lib/terminal_shop/models/product_list_response.rb +2 -2
  36. data/lib/terminal_shop/models/product_variant.rb +4 -4
  37. data/lib/terminal_shop/models/profile.rb +4 -4
  38. data/lib/terminal_shop/models/profile_me_response.rb +2 -2
  39. data/lib/terminal_shop/models/profile_update_response.rb +2 -2
  40. data/lib/terminal_shop/models/subscription.rb +5 -14
  41. data/lib/terminal_shop/models/subscription_get_response.rb +2 -2
  42. data/lib/terminal_shop/models/subscription_list_response.rb +2 -2
  43. data/lib/terminal_shop/models/subscription_update_params.rb +3 -12
  44. data/lib/terminal_shop/models/subscription_update_response.rb +2 -2
  45. data/lib/terminal_shop/models/token.rb +2 -2
  46. data/lib/terminal_shop/models/token_get_response.rb +2 -2
  47. data/lib/terminal_shop/models/token_list_response.rb +2 -2
  48. data/lib/terminal_shop/models/view_init_response.rb +20 -20
  49. data/lib/terminal_shop/models.rb +30 -19
  50. data/lib/terminal_shop/resources/subscription.rb +2 -2
  51. data/lib/terminal_shop/version.rb +1 -1
  52. data/rbi/terminal_shop/internal/transport/pooled_net_requester.rbi +5 -1
  53. data/rbi/terminal_shop/internal/type/array_of.rbi +6 -0
  54. data/rbi/terminal_shop/internal/type/base_model.rbi +5 -0
  55. data/rbi/terminal_shop/internal/type/boolean.rbi +6 -0
  56. data/rbi/terminal_shop/internal/type/enum.rbi +5 -0
  57. data/rbi/terminal_shop/internal/type/file_input.rbi +5 -0
  58. data/rbi/terminal_shop/internal/type/hash_of.rbi +6 -0
  59. data/rbi/terminal_shop/internal/type/union.rbi +5 -0
  60. data/rbi/terminal_shop/internal/type/unknown.rbi +6 -0
  61. data/rbi/terminal_shop/internal/util.rbi +34 -0
  62. data/rbi/terminal_shop/internal.rbi +5 -0
  63. data/rbi/terminal_shop/models/subscription.rbi +2 -13
  64. data/sig/terminal_shop/internal/transport/pooled_net_requester.rbs +2 -0
  65. data/sig/terminal_shop/internal/type/array_of.rbs +3 -0
  66. data/sig/terminal_shop/internal/type/base_model.rbs +2 -0
  67. data/sig/terminal_shop/internal/type/boolean.rbs +3 -0
  68. data/sig/terminal_shop/internal/type/enum.rbs +2 -0
  69. data/sig/terminal_shop/internal/type/file_input.rbs +2 -0
  70. data/sig/terminal_shop/internal/type/hash_of.rbs +3 -0
  71. data/sig/terminal_shop/internal/type/union.rbs +2 -0
  72. data/sig/terminal_shop/internal/type/unknown.rbs +3 -0
  73. data/sig/terminal_shop/internal/util.rbs +12 -0
  74. data/sig/terminal_shop/internal.rbs +2 -0
  75. data/sig/terminal_shop/models/address.rbs +13 -0
  76. data/sig/terminal_shop/models/address_create_params.rbs +12 -0
  77. data/sig/terminal_shop/models/address_create_response.rbs +2 -0
  78. data/sig/terminal_shop/models/address_delete_params.rbs +2 -0
  79. data/sig/terminal_shop/models/address_delete_response.rbs +2 -0
  80. data/sig/terminal_shop/models/address_get_params.rbs +2 -0
  81. data/sig/terminal_shop/models/address_get_response.rbs +2 -0
  82. data/sig/terminal_shop/models/address_list_params.rbs +2 -0
  83. data/sig/terminal_shop/models/address_list_response.rbs +2 -0
  84. data/sig/terminal_shop/models/app.rbs +7 -0
  85. data/sig/terminal_shop/models/app_create_params.rbs +6 -0
  86. data/sig/terminal_shop/models/app_create_response.rbs +4 -0
  87. data/sig/terminal_shop/models/app_delete_params.rbs +2 -0
  88. data/sig/terminal_shop/models/app_delete_response.rbs +2 -0
  89. data/sig/terminal_shop/models/app_get_params.rbs +2 -0
  90. data/sig/terminal_shop/models/app_get_response.rbs +2 -0
  91. data/sig/terminal_shop/models/app_list_params.rbs +2 -0
  92. data/sig/terminal_shop/models/app_list_response.rbs +2 -0
  93. data/sig/terminal_shop/models/card.rbs +10 -0
  94. data/sig/terminal_shop/models/card_collect_params.rbs +2 -0
  95. data/sig/terminal_shop/models/card_collect_response.rbs +4 -0
  96. data/sig/terminal_shop/models/card_create_params.rbs +5 -0
  97. data/sig/terminal_shop/models/card_create_response.rbs +2 -0
  98. data/sig/terminal_shop/models/card_delete_params.rbs +2 -0
  99. data/sig/terminal_shop/models/card_delete_response.rbs +2 -0
  100. data/sig/terminal_shop/models/card_get_params.rbs +2 -0
  101. data/sig/terminal_shop/models/card_get_response.rbs +2 -0
  102. data/sig/terminal_shop/models/card_list_params.rbs +2 -0
  103. data/sig/terminal_shop/models/card_list_response.rbs +2 -0
  104. data/sig/terminal_shop/models/cart.rbs +20 -0
  105. data/sig/terminal_shop/models/cart_clear_params.rbs +2 -0
  106. data/sig/terminal_shop/models/cart_clear_response.rbs +2 -0
  107. data/sig/terminal_shop/models/cart_convert_params.rbs +2 -0
  108. data/sig/terminal_shop/models/cart_convert_response.rbs +2 -0
  109. data/sig/terminal_shop/models/cart_get_params.rbs +2 -0
  110. data/sig/terminal_shop/models/cart_get_response.rbs +2 -0
  111. data/sig/terminal_shop/models/cart_set_address_params.rbs +5 -0
  112. data/sig/terminal_shop/models/cart_set_address_response.rbs +2 -0
  113. data/sig/terminal_shop/models/cart_set_card_params.rbs +5 -0
  114. data/sig/terminal_shop/models/cart_set_card_response.rbs +2 -0
  115. data/sig/terminal_shop/models/cart_set_item_params.rbs +6 -0
  116. data/sig/terminal_shop/models/cart_set_item_response.rbs +2 -0
  117. data/sig/terminal_shop/models/email_create_params.rbs +5 -0
  118. data/sig/terminal_shop/models/email_create_response.rbs +2 -0
  119. data/sig/terminal_shop/models/order.rbs +46 -6
  120. data/sig/terminal_shop/models/order_create_params.rbs +7 -0
  121. data/sig/terminal_shop/models/order_create_response.rbs +2 -0
  122. data/sig/terminal_shop/models/order_get_params.rbs +2 -0
  123. data/sig/terminal_shop/models/order_get_response.rbs +2 -0
  124. data/sig/terminal_shop/models/order_list_params.rbs +2 -0
  125. data/sig/terminal_shop/models/order_list_response.rbs +2 -0
  126. data/sig/terminal_shop/models/product.rbs +25 -6
  127. data/sig/terminal_shop/models/product_get_params.rbs +2 -0
  128. data/sig/terminal_shop/models/product_get_response.rbs +2 -0
  129. data/sig/terminal_shop/models/product_list_params.rbs +2 -0
  130. data/sig/terminal_shop/models/product_list_response.rbs +2 -0
  131. data/sig/terminal_shop/models/product_variant.rbs +15 -0
  132. data/sig/terminal_shop/models/profile.rbs +10 -0
  133. data/sig/terminal_shop/models/profile_me_params.rbs +2 -0
  134. data/sig/terminal_shop/models/profile_me_response.rbs +2 -0
  135. data/sig/terminal_shop/models/profile_update_params.rbs +6 -0
  136. data/sig/terminal_shop/models/profile_update_response.rbs +2 -0
  137. data/sig/terminal_shop/models/subscription.rbs +22 -6
  138. data/sig/terminal_shop/models/subscription_create_params.rbs +2 -0
  139. data/sig/terminal_shop/models/subscription_create_response.rbs +2 -0
  140. data/sig/terminal_shop/models/subscription_delete_params.rbs +2 -0
  141. data/sig/terminal_shop/models/subscription_delete_response.rbs +2 -0
  142. data/sig/terminal_shop/models/subscription_get_params.rbs +2 -0
  143. data/sig/terminal_shop/models/subscription_get_response.rbs +2 -0
  144. data/sig/terminal_shop/models/subscription_list_params.rbs +2 -0
  145. data/sig/terminal_shop/models/subscription_list_response.rbs +2 -0
  146. data/sig/terminal_shop/models/subscription_update_params.rbs +11 -0
  147. data/sig/terminal_shop/models/subscription_update_response.rbs +2 -0
  148. data/sig/terminal_shop/models/token.rbs +2 -0
  149. data/sig/terminal_shop/models/token_create_params.rbs +2 -0
  150. data/sig/terminal_shop/models/token_create_response.rbs +4 -0
  151. data/sig/terminal_shop/models/token_delete_params.rbs +2 -0
  152. data/sig/terminal_shop/models/token_delete_response.rbs +2 -0
  153. data/sig/terminal_shop/models/token_get_params.rbs +2 -0
  154. data/sig/terminal_shop/models/token_get_response.rbs +2 -0
  155. data/sig/terminal_shop/models/token_list_params.rbs +2 -0
  156. data/sig/terminal_shop/models/token_list_response.rbs +2 -0
  157. data/sig/terminal_shop/models/view_init_params.rbs +2 -0
  158. data/sig/terminal_shop/models/view_init_response.rbs +15 -0
  159. metadata +2 -2
@@ -53,6 +53,19 @@ module TerminalShop
53
53
  ?province: String,
54
54
  ?street2: String
55
55
  ) -> void
56
+
57
+ def to_hash: -> {
58
+ id: String,
59
+ city: String,
60
+ country: String,
61
+ created: String,
62
+ name: String,
63
+ :street1 => String,
64
+ zip: String,
65
+ phone: String,
66
+ province: String,
67
+ :street2 => String
68
+ }
56
69
  end
57
70
  end
58
71
  end
@@ -50,6 +50,18 @@ module TerminalShop
50
50
  ?street2: String,
51
51
  ?request_options: TerminalShop::request_opts
52
52
  ) -> void
53
+
54
+ def to_hash: -> {
55
+ city: String,
56
+ country: String,
57
+ name: String,
58
+ :street1 => String,
59
+ zip: String,
60
+ phone: String,
61
+ province: String,
62
+ :street2 => String,
63
+ request_options: TerminalShop::RequestOptions
64
+ }
53
65
  end
54
66
  end
55
67
  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: :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::AddressAPI
7
7
 
8
8
  def initialize: (data: TerminalShop::AddressAPI) -> void
9
+
10
+ def to_hash: -> { data: TerminalShop::AddressAPI }
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::AddressAPI]
7
7
 
8
8
  def initialize: (data: ::Array[TerminalShop::AddressAPI]) -> void
9
+
10
+ def to_hash: -> { data: ::Array[TerminalShop::AddressAPI] }
9
11
  end
10
12
  end
11
13
  end
@@ -18,6 +18,13 @@ module TerminalShop
18
18
  redirect_uri: String,
19
19
  secret: String
20
20
  ) -> void
21
+
22
+ def to_hash: -> {
23
+ id: String,
24
+ name: String,
25
+ redirect_uri: String,
26
+ secret: String
27
+ }
21
28
  end
22
29
  end
23
30
  end
@@ -17,6 +17,12 @@ module TerminalShop
17
17
  redirect_uri: String,
18
18
  ?request_options: TerminalShop::request_opts
19
19
  ) -> void
20
+
21
+ def to_hash: -> {
22
+ name: String,
23
+ redirect_uri: String,
24
+ request_options: TerminalShop::RequestOptions
25
+ }
20
26
  end
21
27
  end
22
28
  end
@@ -10,6 +10,8 @@ module TerminalShop
10
10
  data: TerminalShop::Models::AppCreateResponse::Data
11
11
  ) -> void
12
12
 
13
+ def to_hash: -> { data: TerminalShop::Models::AppCreateResponse::Data }
14
+
13
15
  type data = { id: String, secret: String }
14
16
 
15
17
  class Data < TerminalShop::Internal::Type::BaseModel
@@ -18,6 +20,8 @@ module TerminalShop
18
20
  attr_accessor secret: String
19
21
 
20
22
  def initialize: (id: String, secret: String) -> void
23
+
24
+ def to_hash: -> { id: String, secret: String }
21
25
  end
22
26
  end
23
27
  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::AppAPI
7
7
 
8
8
  def initialize: (data: TerminalShop::AppAPI) -> void
9
+
10
+ def to_hash: -> { data: TerminalShop::AppAPI }
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::AppAPI]
7
7
 
8
8
  def initialize: (data: ::Array[TerminalShop::AppAPI]) -> void
9
+
10
+ def to_hash: -> { data: ::Array[TerminalShop::AppAPI] }
9
11
  end
10
12
  end
11
13
  end
@@ -28,6 +28,14 @@ module TerminalShop
28
28
  last4: String
29
29
  ) -> void
30
30
 
31
+ def to_hash: -> {
32
+ id: String,
33
+ brand: String,
34
+ created: String,
35
+ expiration: TerminalShop::CardAPI::Expiration,
36
+ :last4 => String
37
+ }
38
+
31
39
  type expiration = { month: Integer, year: Integer }
32
40
 
33
41
  class Expiration < TerminalShop::Internal::Type::BaseModel
@@ -36,6 +44,8 @@ module TerminalShop
36
44
  attr_accessor year: Integer
37
45
 
38
46
  def initialize: (month: Integer, year: Integer) -> void
47
+
48
+ def to_hash: -> { month: Integer, year: Integer }
39
49
  end
40
50
  end
41
51
  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
@@ -10,12 +10,16 @@ module TerminalShop
10
10
  data: TerminalShop::Models::CardCollectResponse::Data
11
11
  ) -> void
12
12
 
13
+ def to_hash: -> { data: TerminalShop::Models::CardCollectResponse::Data }
14
+
13
15
  type data = { url: String }
14
16
 
15
17
  class Data < TerminalShop::Internal::Type::BaseModel
16
18
  attr_accessor url: String
17
19
 
18
20
  def initialize: (url: String) -> void
21
+
22
+ def to_hash: -> { url: String }
19
23
  end
20
24
  end
21
25
  end
@@ -13,6 +13,11 @@ module TerminalShop
13
13
  token: String,
14
14
  ?request_options: TerminalShop::request_opts
15
15
  ) -> void
16
+
17
+ def to_hash: -> {
18
+ token: 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: 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: :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::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