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
@@ -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
@@ -10,7 +10,7 @@ module TerminalShop
10
10
  product_variant_id: String,
11
11
  quantity: Integer,
12
12
  next_: String,
13
- schedule: TerminalShop::SubscriptionAPI::schedule
13
+ schedule: TerminalShop::Models::SubscriptionAPI::schedule
14
14
  }
15
15
 
16
16
  class SubscriptionAPI < TerminalShop::Internal::Type::BaseModel
@@ -32,11 +32,11 @@ module TerminalShop
32
32
 
33
33
  def next_=: (String) -> String
34
34
 
35
- attr_reader schedule: TerminalShop::SubscriptionAPI::schedule?
35
+ attr_reader schedule: TerminalShop::Models::SubscriptionAPI::schedule?
36
36
 
37
37
  def schedule=: (
38
- TerminalShop::SubscriptionAPI::schedule
39
- ) -> TerminalShop::SubscriptionAPI::schedule
38
+ TerminalShop::Models::SubscriptionAPI::schedule
39
+ ) -> TerminalShop::Models::SubscriptionAPI::schedule
40
40
 
41
41
  def initialize: (
42
42
  id: String,
@@ -47,9 +47,21 @@ module TerminalShop
47
47
  product_variant_id: String,
48
48
  quantity: Integer,
49
49
  ?next_: String,
50
- ?schedule: TerminalShop::SubscriptionAPI::schedule
50
+ ?schedule: TerminalShop::Models::SubscriptionAPI::schedule
51
51
  ) -> void
52
52
 
53
+ def to_hash: -> {
54
+ id: String,
55
+ address_id: String,
56
+ card_id: String,
57
+ created: String,
58
+ price: Integer,
59
+ product_variant_id: String,
60
+ quantity: Integer,
61
+ next_: String,
62
+ schedule: TerminalShop::Models::SubscriptionAPI::schedule
63
+ }
64
+
53
65
  type schedule =
54
66
  TerminalShop::SubscriptionAPI::Schedule::Fixed
55
67
  | TerminalShop::SubscriptionAPI::Schedule::Weekly
@@ -63,6 +75,8 @@ module TerminalShop
63
75
  attr_accessor type: :fixed
64
76
 
65
77
  def initialize: (?type: :fixed) -> void
78
+
79
+ def to_hash: -> { type: :fixed }
66
80
  end
67
81
 
68
82
  type weekly = { interval: Integer, type: :weekly }
@@ -73,9 +87,11 @@ module TerminalShop
73
87
  attr_accessor type: :weekly
74
88
 
75
89
  def initialize: (interval: Integer, ?type: :weekly) -> void
90
+
91
+ def to_hash: -> { interval: Integer, type: :weekly }
76
92
  end
77
93
 
78
- def self?.variants: -> ::Array[TerminalShop::SubscriptionAPI::schedule]
94
+ def self?.variants: -> ::Array[TerminalShop::Models::SubscriptionAPI::schedule]
79
95
  end
80
96
  end
81
97
  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: :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::SubscriptionAPI
7
7
 
8
8
  def initialize: (data: TerminalShop::SubscriptionAPI) -> void
9
+
10
+ def to_hash: -> { data: TerminalShop::SubscriptionAPI }
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
@@ -7,6 +7,8 @@ module TerminalShop
7
7
  attr_accessor data: ::Array[TerminalShop::SubscriptionAPI]
8
8
 
9
9
  def initialize: (data: ::Array[TerminalShop::SubscriptionAPI]) -> void
10
+
11
+ def to_hash: -> { data: ::Array[TerminalShop::SubscriptionAPI] }
10
12
  end
11
13
  end
12
14
  end
@@ -33,6 +33,13 @@ module TerminalShop
33
33
  ?request_options: TerminalShop::request_opts
34
34
  ) -> void
35
35
 
36
+ def to_hash: -> {
37
+ address_id: String,
38
+ card_id: String,
39
+ schedule: TerminalShop::Models::SubscriptionUpdateParams::schedule,
40
+ request_options: TerminalShop::RequestOptions
41
+ }
42
+
36
43
  type schedule =
37
44
  TerminalShop::SubscriptionUpdateParams::Schedule::Fixed
38
45
  | TerminalShop::SubscriptionUpdateParams::Schedule::Weekly
@@ -46,6 +53,8 @@ module TerminalShop
46
53
  attr_accessor type: :fixed
47
54
 
48
55
  def initialize: (?type: :fixed) -> void
56
+
57
+ def to_hash: -> { type: :fixed }
49
58
  end
50
59
 
51
60
  type weekly = { interval: Integer, type: :weekly }
@@ -56,6 +65,8 @@ module TerminalShop
56
65
  attr_accessor type: :weekly
57
66
 
58
67
  def initialize: (interval: Integer, ?type: :weekly) -> void
68
+
69
+ def to_hash: -> { interval: Integer, type: :weekly }
59
70
  end
60
71
 
61
72
  def self?.variants: -> ::Array[TerminalShop::Models::SubscriptionUpdateParams::schedule]
@@ -6,6 +6,8 @@ module TerminalShop
6
6
  attr_accessor data: TerminalShop::SubscriptionAPI
7
7
 
8
8
  def initialize: (data: TerminalShop::SubscriptionAPI) -> void
9
+
10
+ def to_hash: -> { data: TerminalShop::SubscriptionAPI }
9
11
  end
10
12
  end
11
13
  end
@@ -10,6 +10,8 @@ module TerminalShop
10
10
  attr_accessor created: String
11
11
 
12
12
  def initialize: (id: String, token: String, created: String) -> void
13
+
14
+ def to_hash: -> { id: String, token: String, created: String }
13
15
  end
14
16
  end
15
17
  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,6 +10,8 @@ module TerminalShop
10
10
  data: TerminalShop::Models::TokenCreateResponse::Data
11
11
  ) -> void
12
12
 
13
+ def to_hash: -> { data: TerminalShop::Models::TokenCreateResponse::Data }
14
+
13
15
  type data = { id: String, token: String }
14
16
 
15
17
  class Data < TerminalShop::Internal::Type::BaseModel
@@ -18,6 +20,8 @@ module TerminalShop
18
20
  attr_accessor token: String
19
21
 
20
22
  def initialize: (id: String, token: String) -> void
23
+
24
+ def to_hash: -> { id: String, token: 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::TokenAPI
7
7
 
8
8
  def initialize: (data: TerminalShop::TokenAPI) -> void
9
+
10
+ def to_hash: -> { data: TerminalShop::TokenAPI }
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::TokenAPI]
7
7
 
8
8
  def initialize: (data: ::Array[TerminalShop::TokenAPI]) -> void
9
+
10
+ def to_hash: -> { data: ::Array[TerminalShop::TokenAPI] }
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
@@ -10,6 +10,8 @@ module TerminalShop
10
10
  data: TerminalShop::Models::ViewInitResponse::Data
11
11
  ) -> void
12
12
 
13
+ def to_hash: -> { data: TerminalShop::Models::ViewInitResponse::Data }
14
+
13
15
  type data =
14
16
  {
15
17
  addresses: ::Array[TerminalShop::AddressAPI],
@@ -57,6 +59,19 @@ module TerminalShop
57
59
  subscriptions: ::Array[TerminalShop::SubscriptionAPI],
58
60
  tokens: ::Array[TerminalShop::TokenAPI]
59
61
  ) -> void
62
+
63
+ def to_hash: -> {
64
+ addresses: ::Array[TerminalShop::AddressAPI],
65
+ apps: ::Array[TerminalShop::AppAPI],
66
+ cards: ::Array[TerminalShop::CardAPI],
67
+ cart: TerminalShop::CartAPI,
68
+ orders: ::Array[TerminalShop::OrderAPI],
69
+ products: ::Array[TerminalShop::ProductAPI],
70
+ profile: TerminalShop::ProfileAPI,
71
+ region: TerminalShop::Models::region,
72
+ subscriptions: ::Array[TerminalShop::SubscriptionAPI],
73
+ tokens: ::Array[TerminalShop::TokenAPI]
74
+ }
60
75
  end
61
76
  end
62
77
  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: 3.7.0
4
+ version: 3.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Terminal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-05-14 00:00:00.000000000 Z
11
+ date: 2025-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool