terminal-shop 0.1.0.pre.alpha.5

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 (276) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +127 -0
  3. data/lib/terminal-shop/base_client.rb +452 -0
  4. data/lib/terminal-shop/base_model.rb +1189 -0
  5. data/lib/terminal-shop/base_page.rb +44 -0
  6. data/lib/terminal-shop/client.rb +135 -0
  7. data/lib/terminal-shop/errors.rb +187 -0
  8. data/lib/terminal-shop/extern.rb +10 -0
  9. data/lib/terminal-shop/models/address.rb +101 -0
  10. data/lib/terminal-shop/models/address_create_params.rb +86 -0
  11. data/lib/terminal-shop/models/address_create_response.rb +26 -0
  12. data/lib/terminal-shop/models/address_delete_params.rb +18 -0
  13. data/lib/terminal-shop/models/address_delete_response.rb +25 -0
  14. data/lib/terminal-shop/models/address_list_params.rb +18 -0
  15. data/lib/terminal-shop/models/address_list_response.rb +26 -0
  16. data/lib/terminal-shop/models/app.rb +44 -0
  17. data/lib/terminal-shop/models/app_create_params.rb +18 -0
  18. data/lib/terminal-shop/models/app_create_response.rb +54 -0
  19. data/lib/terminal-shop/models/app_delete_params.rb +18 -0
  20. data/lib/terminal-shop/models/app_delete_response.rb +25 -0
  21. data/lib/terminal-shop/models/app_get_params.rb +18 -0
  22. data/lib/terminal-shop/models/app_get_response.rb +26 -0
  23. data/lib/terminal-shop/models/app_list_params.rb +18 -0
  24. data/lib/terminal-shop/models/app_list_response.rb +26 -0
  25. data/lib/terminal-shop/models/card.rb +83 -0
  26. data/lib/terminal-shop/models/card_collect_params.rb +18 -0
  27. data/lib/terminal-shop/models/card_collect_response.rb +50 -0
  28. data/lib/terminal-shop/models/card_create_params.rb +26 -0
  29. data/lib/terminal-shop/models/card_create_response.rb +26 -0
  30. data/lib/terminal-shop/models/card_delete_params.rb +18 -0
  31. data/lib/terminal-shop/models/card_delete_response.rb +25 -0
  32. data/lib/terminal-shop/models/card_list_params.rb +18 -0
  33. data/lib/terminal-shop/models/card_list_response.rb +26 -0
  34. data/lib/terminal-shop/models/cart.rb +200 -0
  35. data/lib/terminal-shop/models/cart_convert_params.rb +18 -0
  36. data/lib/terminal-shop/models/cart_convert_response.rb +26 -0
  37. data/lib/terminal-shop/models/cart_get_params.rb +18 -0
  38. data/lib/terminal-shop/models/cart_get_response.rb +26 -0
  39. data/lib/terminal-shop/models/cart_set_address_params.rb +25 -0
  40. data/lib/terminal-shop/models/cart_set_address_response.rb +25 -0
  41. data/lib/terminal-shop/models/cart_set_card_params.rb +25 -0
  42. data/lib/terminal-shop/models/cart_set_card_response.rb +25 -0
  43. data/lib/terminal-shop/models/cart_set_item_params.rb +32 -0
  44. data/lib/terminal-shop/models/cart_set_item_response.rb +26 -0
  45. data/lib/terminal-shop/models/email_create_params.rb +25 -0
  46. data/lib/terminal-shop/models/email_create_response.rb +25 -0
  47. data/lib/terminal-shop/models/order.rb +303 -0
  48. data/lib/terminal-shop/models/order_get_params.rb +18 -0
  49. data/lib/terminal-shop/models/order_get_response.rb +26 -0
  50. data/lib/terminal-shop/models/order_list_params.rb +18 -0
  51. data/lib/terminal-shop/models/order_list_response.rb +26 -0
  52. data/lib/terminal-shop/models/product.rb +141 -0
  53. data/lib/terminal-shop/models/product_list_params.rb +18 -0
  54. data/lib/terminal-shop/models/product_list_response.rb +26 -0
  55. data/lib/terminal-shop/models/product_variant.rb +44 -0
  56. data/lib/terminal-shop/models/profile.rb +83 -0
  57. data/lib/terminal-shop/models/profile_me_params.rb +18 -0
  58. data/lib/terminal-shop/models/profile_me_response.rb +26 -0
  59. data/lib/terminal-shop/models/profile_update_params.rb +32 -0
  60. data/lib/terminal-shop/models/profile_update_response.rb +26 -0
  61. data/lib/terminal-shop/models/subscription.rb +113 -0
  62. data/lib/terminal-shop/models/subscription_create_params.rb +18 -0
  63. data/lib/terminal-shop/models/subscription_create_response.rb +25 -0
  64. data/lib/terminal-shop/models/subscription_delete_params.rb +18 -0
  65. data/lib/terminal-shop/models/subscription_delete_response.rb +25 -0
  66. data/lib/terminal-shop/models/subscription_list_params.rb +18 -0
  67. data/lib/terminal-shop/models/subscription_list_response.rb +26 -0
  68. data/lib/terminal-shop/models/token.rb +68 -0
  69. data/lib/terminal-shop/models/token_create_params.rb +18 -0
  70. data/lib/terminal-shop/models/token_create_response.rb +55 -0
  71. data/lib/terminal-shop/models/token_delete_params.rb +18 -0
  72. data/lib/terminal-shop/models/token_delete_response.rb +25 -0
  73. data/lib/terminal-shop/models/token_get_params.rb +18 -0
  74. data/lib/terminal-shop/models/token_get_response.rb +27 -0
  75. data/lib/terminal-shop/models/token_list_params.rb +18 -0
  76. data/lib/terminal-shop/models/token_list_response.rb +26 -0
  77. data/lib/terminal-shop/models/view_init_params.rb +18 -0
  78. data/lib/terminal-shop/models/view_init_response.rb +103 -0
  79. data/lib/terminal-shop/pooled_net_requester.rb +94 -0
  80. data/lib/terminal-shop/request_options.rb +115 -0
  81. data/lib/terminal-shop/resources/address.rb +84 -0
  82. data/lib/terminal-shop/resources/app.rb +93 -0
  83. data/lib/terminal-shop/resources/card.rb +89 -0
  84. data/lib/terminal-shop/resources/cart.rb +112 -0
  85. data/lib/terminal-shop/resources/email.rb +34 -0
  86. data/lib/terminal-shop/resources/order.rb +49 -0
  87. data/lib/terminal-shop/resources/product.rb +30 -0
  88. data/lib/terminal-shop/resources/profile.rb +53 -0
  89. data/lib/terminal-shop/resources/subscription.rb +82 -0
  90. data/lib/terminal-shop/resources/token.rb +85 -0
  91. data/lib/terminal-shop/resources/view.rb +31 -0
  92. data/lib/terminal-shop/util.rb +460 -0
  93. data/lib/terminal-shop/version.rb +5 -0
  94. data/lib/terminal-shop.rb +110 -0
  95. data/manifest.yaml +12 -0
  96. data/rbi/lib/terminal-shop/base_client.rbi +145 -0
  97. data/rbi/lib/terminal-shop/base_model.rbi +514 -0
  98. data/rbi/lib/terminal-shop/base_page.rbi +38 -0
  99. data/rbi/lib/terminal-shop/client.rbi +80 -0
  100. data/rbi/lib/terminal-shop/errors.rbi +133 -0
  101. data/rbi/lib/terminal-shop/extern.rbi +7 -0
  102. data/rbi/lib/terminal-shop/models/address.rbi +77 -0
  103. data/rbi/lib/terminal-shop/models/address_create_params.rbi +87 -0
  104. data/rbi/lib/terminal-shop/models/address_create_response.rbi +18 -0
  105. data/rbi/lib/terminal-shop/models/address_delete_params.rbi +18 -0
  106. data/rbi/lib/terminal-shop/models/address_delete_response.rbi +18 -0
  107. data/rbi/lib/terminal-shop/models/address_list_params.rbi +18 -0
  108. data/rbi/lib/terminal-shop/models/address_list_response.rbi +18 -0
  109. data/rbi/lib/terminal-shop/models/app.rbi +24 -0
  110. data/rbi/lib/terminal-shop/models/app_create_params.rbi +18 -0
  111. data/rbi/lib/terminal-shop/models/app_create_response.rbi +34 -0
  112. data/rbi/lib/terminal-shop/models/app_delete_params.rbi +18 -0
  113. data/rbi/lib/terminal-shop/models/app_delete_response.rbi +18 -0
  114. data/rbi/lib/terminal-shop/models/app_get_params.rbi +18 -0
  115. data/rbi/lib/terminal-shop/models/app_get_response.rbi +18 -0
  116. data/rbi/lib/terminal-shop/models/app_list_params.rbi +18 -0
  117. data/rbi/lib/terminal-shop/models/app_list_response.rbi +18 -0
  118. data/rbi/lib/terminal-shop/models/card.rbi +59 -0
  119. data/rbi/lib/terminal-shop/models/card_collect_params.rbi +18 -0
  120. data/rbi/lib/terminal-shop/models/card_collect_response.rbi +31 -0
  121. data/rbi/lib/terminal-shop/models/card_create_params.rbi +26 -0
  122. data/rbi/lib/terminal-shop/models/card_create_response.rbi +18 -0
  123. data/rbi/lib/terminal-shop/models/card_delete_params.rbi +18 -0
  124. data/rbi/lib/terminal-shop/models/card_delete_response.rbi +18 -0
  125. data/rbi/lib/terminal-shop/models/card_list_params.rbi +18 -0
  126. data/rbi/lib/terminal-shop/models/card_list_response.rbi +18 -0
  127. data/rbi/lib/terminal-shop/models/cart.rbi +127 -0
  128. data/rbi/lib/terminal-shop/models/cart_convert_params.rbi +18 -0
  129. data/rbi/lib/terminal-shop/models/cart_convert_response.rbi +18 -0
  130. data/rbi/lib/terminal-shop/models/cart_get_params.rbi +18 -0
  131. data/rbi/lib/terminal-shop/models/cart_get_response.rbi +18 -0
  132. data/rbi/lib/terminal-shop/models/cart_set_address_params.rbi +26 -0
  133. data/rbi/lib/terminal-shop/models/cart_set_address_response.rbi +18 -0
  134. data/rbi/lib/terminal-shop/models/cart_set_card_params.rbi +26 -0
  135. data/rbi/lib/terminal-shop/models/cart_set_card_response.rbi +18 -0
  136. data/rbi/lib/terminal-shop/models/cart_set_item_params.rbi +38 -0
  137. data/rbi/lib/terminal-shop/models/cart_set_item_response.rbi +18 -0
  138. data/rbi/lib/terminal-shop/models/email_create_params.rbi +26 -0
  139. data/rbi/lib/terminal-shop/models/email_create_response.rbi +18 -0
  140. data/rbi/lib/terminal-shop/models/order.rbi +216 -0
  141. data/rbi/lib/terminal-shop/models/order_get_params.rbi +18 -0
  142. data/rbi/lib/terminal-shop/models/order_get_response.rbi +18 -0
  143. data/rbi/lib/terminal-shop/models/order_list_params.rbi +18 -0
  144. data/rbi/lib/terminal-shop/models/order_list_response.rbi +18 -0
  145. data/rbi/lib/terminal-shop/models/product.rbi +94 -0
  146. data/rbi/lib/terminal-shop/models/product_list_params.rbi +18 -0
  147. data/rbi/lib/terminal-shop/models/product_list_response.rbi +18 -0
  148. data/rbi/lib/terminal-shop/models/product_variant.rbi +24 -0
  149. data/rbi/lib/terminal-shop/models/profile.rbi +61 -0
  150. data/rbi/lib/terminal-shop/models/profile_me_params.rbi +18 -0
  151. data/rbi/lib/terminal-shop/models/profile_me_response.rbi +18 -0
  152. data/rbi/lib/terminal-shop/models/profile_update_params.rbi +38 -0
  153. data/rbi/lib/terminal-shop/models/profile_update_response.rbi +18 -0
  154. data/rbi/lib/terminal-shop/models/subscription.rbi +75 -0
  155. data/rbi/lib/terminal-shop/models/subscription_create_params.rbi +18 -0
  156. data/rbi/lib/terminal-shop/models/subscription_create_response.rbi +18 -0
  157. data/rbi/lib/terminal-shop/models/subscription_delete_params.rbi +18 -0
  158. data/rbi/lib/terminal-shop/models/subscription_delete_response.rbi +18 -0
  159. data/rbi/lib/terminal-shop/models/subscription_list_params.rbi +18 -0
  160. data/rbi/lib/terminal-shop/models/subscription_list_response.rbi +18 -0
  161. data/rbi/lib/terminal-shop/models/token.rbi +37 -0
  162. data/rbi/lib/terminal-shop/models/token_create_params.rbi +18 -0
  163. data/rbi/lib/terminal-shop/models/token_create_response.rbi +34 -0
  164. data/rbi/lib/terminal-shop/models/token_delete_params.rbi +18 -0
  165. data/rbi/lib/terminal-shop/models/token_delete_response.rbi +18 -0
  166. data/rbi/lib/terminal-shop/models/token_get_params.rbi +18 -0
  167. data/rbi/lib/terminal-shop/models/token_get_response.rbi +18 -0
  168. data/rbi/lib/terminal-shop/models/token_list_params.rbi +18 -0
  169. data/rbi/lib/terminal-shop/models/token_list_response.rbi +18 -0
  170. data/rbi/lib/terminal-shop/models/view_init_params.rbi +18 -0
  171. data/rbi/lib/terminal-shop/models/view_init_response.rbi +91 -0
  172. data/rbi/lib/terminal-shop/request_options.rbi +40 -0
  173. data/rbi/lib/terminal-shop/resources/address.rbi +60 -0
  174. data/rbi/lib/terminal-shop/resources/app.rbi +54 -0
  175. data/rbi/lib/terminal-shop/resources/card.rbi +57 -0
  176. data/rbi/lib/terminal-shop/resources/cart.rbi +67 -0
  177. data/rbi/lib/terminal-shop/resources/email.rbi +20 -0
  178. data/rbi/lib/terminal-shop/resources/order.rbi +34 -0
  179. data/rbi/lib/terminal-shop/resources/product.rbi +25 -0
  180. data/rbi/lib/terminal-shop/resources/profile.rbi +35 -0
  181. data/rbi/lib/terminal-shop/resources/subscription.rbi +58 -0
  182. data/rbi/lib/terminal-shop/resources/token.rbi +57 -0
  183. data/rbi/lib/terminal-shop/resources/view.rbi +25 -0
  184. data/rbi/lib/terminal-shop/util.rbi +128 -0
  185. data/rbi/lib/terminal-shop/version.rbi +5 -0
  186. data/sig/terminal-shop/base_client.rbs +100 -0
  187. data/sig/terminal-shop/base_model.rbs +246 -0
  188. data/sig/terminal-shop/base_page.rbs +20 -0
  189. data/sig/terminal-shop/client.rbs +52 -0
  190. data/sig/terminal-shop/errors.rbs +98 -0
  191. data/sig/terminal-shop/extern.rbs +4 -0
  192. data/sig/terminal-shop/models/address.rbs +60 -0
  193. data/sig/terminal-shop/models/address_create_params.rbs +62 -0
  194. data/sig/terminal-shop/models/address_create_response.rbs +18 -0
  195. data/sig/terminal-shop/models/address_delete_params.rbs +19 -0
  196. data/sig/terminal-shop/models/address_delete_response.rbs +18 -0
  197. data/sig/terminal-shop/models/address_list_params.rbs +19 -0
  198. data/sig/terminal-shop/models/address_list_response.rbs +19 -0
  199. data/sig/terminal-shop/models/app.rbs +21 -0
  200. data/sig/terminal-shop/models/app_create_params.rbs +19 -0
  201. data/sig/terminal-shop/models/app_create_response.rbs +36 -0
  202. data/sig/terminal-shop/models/app_delete_params.rbs +19 -0
  203. data/sig/terminal-shop/models/app_delete_response.rbs +18 -0
  204. data/sig/terminal-shop/models/app_get_params.rbs +18 -0
  205. data/sig/terminal-shop/models/app_get_response.rbs +17 -0
  206. data/sig/terminal-shop/models/app_list_params.rbs +18 -0
  207. data/sig/terminal-shop/models/app_list_response.rbs +18 -0
  208. data/sig/terminal-shop/models/card.rbs +51 -0
  209. data/sig/terminal-shop/models/card_collect_params.rbs +19 -0
  210. data/sig/terminal-shop/models/card_collect_response.rbs +34 -0
  211. data/sig/terminal-shop/models/card_create_params.rbs +22 -0
  212. data/sig/terminal-shop/models/card_create_response.rbs +18 -0
  213. data/sig/terminal-shop/models/card_delete_params.rbs +19 -0
  214. data/sig/terminal-shop/models/card_delete_response.rbs +18 -0
  215. data/sig/terminal-shop/models/card_list_params.rbs +18 -0
  216. data/sig/terminal-shop/models/card_list_response.rbs +18 -0
  217. data/sig/terminal-shop/models/cart.rbs +119 -0
  218. data/sig/terminal-shop/models/cart_convert_params.rbs +19 -0
  219. data/sig/terminal-shop/models/cart_convert_response.rbs +18 -0
  220. data/sig/terminal-shop/models/cart_get_params.rbs +18 -0
  221. data/sig/terminal-shop/models/cart_get_response.rbs +18 -0
  222. data/sig/terminal-shop/models/cart_set_address_params.rbs +25 -0
  223. data/sig/terminal-shop/models/cart_set_address_response.rbs +18 -0
  224. data/sig/terminal-shop/models/cart_set_card_params.rbs +22 -0
  225. data/sig/terminal-shop/models/cart_set_card_response.rbs +18 -0
  226. data/sig/terminal-shop/models/cart_set_item_params.rbs +29 -0
  227. data/sig/terminal-shop/models/cart_set_item_response.rbs +18 -0
  228. data/sig/terminal-shop/models/email_create_params.rbs +22 -0
  229. data/sig/terminal-shop/models/email_create_response.rbs +18 -0
  230. data/sig/terminal-shop/models/order.rbs +179 -0
  231. data/sig/terminal-shop/models/order_get_params.rbs +18 -0
  232. data/sig/terminal-shop/models/order_get_response.rbs +18 -0
  233. data/sig/terminal-shop/models/order_list_params.rbs +19 -0
  234. data/sig/terminal-shop/models/order_list_response.rbs +18 -0
  235. data/sig/terminal-shop/models/product.rbs +76 -0
  236. data/sig/terminal-shop/models/product_list_params.rbs +19 -0
  237. data/sig/terminal-shop/models/product_list_response.rbs +19 -0
  238. data/sig/terminal-shop/models/product_variant.rbs +21 -0
  239. data/sig/terminal-shop/models/profile.rbs +53 -0
  240. data/sig/terminal-shop/models/profile_me_params.rbs +19 -0
  241. data/sig/terminal-shop/models/profile_me_response.rbs +18 -0
  242. data/sig/terminal-shop/models/profile_update_params.rbs +28 -0
  243. data/sig/terminal-shop/models/profile_update_response.rbs +18 -0
  244. data/sig/terminal-shop/models/subscription.rbs +60 -0
  245. data/sig/terminal-shop/models/subscription_create_params.rbs +19 -0
  246. data/sig/terminal-shop/models/subscription_create_response.rbs +18 -0
  247. data/sig/terminal-shop/models/subscription_delete_params.rbs +19 -0
  248. data/sig/terminal-shop/models/subscription_delete_response.rbs +18 -0
  249. data/sig/terminal-shop/models/subscription_list_params.rbs +19 -0
  250. data/sig/terminal-shop/models/subscription_list_response.rbs +19 -0
  251. data/sig/terminal-shop/models/token.rbs +40 -0
  252. data/sig/terminal-shop/models/token_create_params.rbs +19 -0
  253. data/sig/terminal-shop/models/token_create_response.rbs +36 -0
  254. data/sig/terminal-shop/models/token_delete_params.rbs +19 -0
  255. data/sig/terminal-shop/models/token_delete_response.rbs +18 -0
  256. data/sig/terminal-shop/models/token_get_params.rbs +18 -0
  257. data/sig/terminal-shop/models/token_get_response.rbs +18 -0
  258. data/sig/terminal-shop/models/token_list_params.rbs +19 -0
  259. data/sig/terminal-shop/models/token_list_response.rbs +18 -0
  260. data/sig/terminal-shop/models/view_init_params.rbs +18 -0
  261. data/sig/terminal-shop/models/view_init_response.rbs +71 -0
  262. data/sig/terminal-shop/request_options.rbs +42 -0
  263. data/sig/terminal-shop/resources/address.rbs +41 -0
  264. data/sig/terminal-shop/resources/app.rbs +46 -0
  265. data/sig/terminal-shop/resources/card.rbs +42 -0
  266. data/sig/terminal-shop/resources/cart.rbs +51 -0
  267. data/sig/terminal-shop/resources/email.rbs +16 -0
  268. data/sig/terminal-shop/resources/order.rbs +25 -0
  269. data/sig/terminal-shop/resources/product.rbs +15 -0
  270. data/sig/terminal-shop/resources/profile.rbs +25 -0
  271. data/sig/terminal-shop/resources/subscription.rbs +43 -0
  272. data/sig/terminal-shop/resources/token.rbs +43 -0
  273. data/sig/terminal-shop/resources/view.rbs +15 -0
  274. data/sig/terminal-shop/util.rbs +85 -0
  275. data/sig/terminal-shop/version.rbs +3 -0
  276. metadata +333 -0
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TerminalShop
4
+ module Models
5
+ class ProfileMeParams < TerminalShop::BaseModel
6
+ # @!parse
7
+ # extend TerminalShop::RequestParameters::Converter
8
+ include TerminalShop::RequestParameters
9
+
10
+ # @!parse
11
+ # # @param request_options [TerminalShop::RequestOptions, Hash{Symbol=>Object}]
12
+ # #
13
+ # def initialize(request_options: {}, **) = super
14
+
15
+ # def initialize: (Hash | TerminalShop::BaseModel) -> void
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TerminalShop
4
+ module Models
5
+ # @example
6
+ # ```ruby
7
+ # profile_me_response => {
8
+ # data: TerminalShop::Models::ProfileAPI
9
+ # }
10
+ # ```
11
+ class ProfileMeResponse < TerminalShop::BaseModel
12
+ # @!attribute data
13
+ # A Terminal shop user's profile. (We have users, btw.)
14
+ #
15
+ # @return [TerminalShop::Models::ProfileAPI]
16
+ required :data, -> { TerminalShop::Models::ProfileAPI }
17
+
18
+ # @!parse
19
+ # # @param data [TerminalShop::Models::ProfileAPI]
20
+ # #
21
+ # def initialize(data:, **) = super
22
+
23
+ # def initialize: (Hash | TerminalShop::BaseModel) -> void
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TerminalShop
4
+ module Models
5
+ class ProfileUpdateParams < TerminalShop::BaseModel
6
+ # @!parse
7
+ # extend TerminalShop::RequestParameters::Converter
8
+ include TerminalShop::RequestParameters
9
+
10
+ # @!attribute email
11
+ # Email address of the user.
12
+ #
13
+ # @return [String, nil]
14
+ optional :email, String, nil?: true
15
+
16
+ # @!attribute name
17
+ # Name of the user.
18
+ #
19
+ # @return [String, nil]
20
+ optional :name, String, nil?: true
21
+
22
+ # @!parse
23
+ # # @param email [String, nil]
24
+ # # @param name [String, nil]
25
+ # # @param request_options [TerminalShop::RequestOptions, Hash{Symbol=>Object}]
26
+ # #
27
+ # def initialize(email: nil, name: nil, request_options: {}, **) = super
28
+
29
+ # def initialize: (Hash | TerminalShop::BaseModel) -> void
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TerminalShop
4
+ module Models
5
+ # @example
6
+ # ```ruby
7
+ # profile_update_response => {
8
+ # data: TerminalShop::Models::ProfileAPI
9
+ # }
10
+ # ```
11
+ class ProfileUpdateResponse < TerminalShop::BaseModel
12
+ # @!attribute data
13
+ # A Terminal shop user's profile. (We have users, btw.)
14
+ #
15
+ # @return [TerminalShop::Models::ProfileAPI]
16
+ required :data, -> { TerminalShop::Models::ProfileAPI }
17
+
18
+ # @!parse
19
+ # # @param data [TerminalShop::Models::ProfileAPI]
20
+ # #
21
+ # def initialize(data:, **) = super
22
+
23
+ # def initialize: (Hash | TerminalShop::BaseModel) -> void
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,113 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TerminalShop
4
+ module Models
5
+ # @example
6
+ # ```ruby
7
+ # subscription_api => {
8
+ # id: String,
9
+ # address_id: String,
10
+ # card_id: String,
11
+ # frequency: TerminalShop::Models::SubscriptionAPI::Frequency,
12
+ # product_variant_id: String,
13
+ # **_
14
+ # }
15
+ # ```
16
+ class SubscriptionAPI < TerminalShop::BaseModel
17
+ # @!attribute id
18
+ # Unique object identifier. The format and length of IDs may change over time.
19
+ #
20
+ # @return [String]
21
+ required :id, String
22
+
23
+ # @!attribute address_id
24
+ # ID of the shipping address used for the subscription.
25
+ #
26
+ # @return [String]
27
+ required :address_id, String, api_name: :addressID
28
+
29
+ # @!attribute card_id
30
+ # ID of the card used for the subscription.
31
+ #
32
+ # @return [String]
33
+ required :card_id, String, api_name: :cardID
34
+
35
+ # @!attribute frequency
36
+ # Frequency of the subscription.
37
+ #
38
+ # @return [Symbol, TerminalShop::Models::SubscriptionAPI::Frequency]
39
+ required :frequency, enum: -> { TerminalShop::Models::SubscriptionAPI::Frequency }
40
+
41
+ # @!attribute product_variant_id
42
+ # ID of the product variant being subscribed to.
43
+ #
44
+ # @return [String]
45
+ required :product_variant_id, String, api_name: :productVariantID
46
+
47
+ # @!attribute quantity
48
+ # Quantity of the subscription.
49
+ #
50
+ # @return [Integer]
51
+ required :quantity, Integer
52
+
53
+ # @!attribute [r] next_
54
+ # Next shipment and billing date for the subscription.
55
+ #
56
+ # @return [String, nil]
57
+ optional :next_, String, api_name: :next
58
+
59
+ # @!parse
60
+ # # @return [String]
61
+ # attr_writer :next_
62
+
63
+ # @!parse
64
+ # # Subscription to a Terminal shop product.
65
+ # #
66
+ # # @param id [String]
67
+ # # @param address_id [String]
68
+ # # @param card_id [String]
69
+ # # @param frequency [Symbol, TerminalShop::Models::SubscriptionAPI::Frequency]
70
+ # # @param product_variant_id [String]
71
+ # # @param quantity [Integer]
72
+ # # @param next_ [String]
73
+ # #
74
+ # def initialize(id:, address_id:, card_id:, frequency:, product_variant_id:, quantity:, next_: nil, **) = super
75
+
76
+ # def initialize: (Hash | TerminalShop::BaseModel) -> void
77
+
78
+ # @abstract
79
+ #
80
+ # Frequency of the subscription.
81
+ #
82
+ # @example
83
+ # ```ruby
84
+ # case frequency
85
+ # in :fixed
86
+ # # ...
87
+ # in :daily
88
+ # # ...
89
+ # in :weekly
90
+ # # ...
91
+ # in :monthly
92
+ # # ...
93
+ # in :yearly
94
+ # # ...
95
+ # end
96
+ # ```
97
+ class Frequency < TerminalShop::Enum
98
+ FIXED = :fixed
99
+ DAILY = :daily
100
+ WEEKLY = :weekly
101
+ MONTHLY = :monthly
102
+ YEARLY = :yearly
103
+
104
+ finalize!
105
+
106
+ # @!parse
107
+ # # @return [Array<Symbol>]
108
+ # #
109
+ # def self.values; end
110
+ end
111
+ end
112
+ end
113
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TerminalShop
4
+ module Models
5
+ class SubscriptionCreateParams < TerminalShop::Models::SubscriptionAPI
6
+ # @!parse
7
+ # extend TerminalShop::RequestParameters::Converter
8
+ include TerminalShop::RequestParameters
9
+
10
+ # @!parse
11
+ # # @param request_options [TerminalShop::RequestOptions, Hash{Symbol=>Object}]
12
+ # #
13
+ # def initialize(request_options: {}, **) = super
14
+
15
+ # def initialize: (Hash | TerminalShop::BaseModel) -> void
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TerminalShop
4
+ module Models
5
+ # @example
6
+ # ```ruby
7
+ # subscription_create_response => {
8
+ # data: :ok
9
+ # }
10
+ # ```
11
+ class SubscriptionCreateResponse < TerminalShop::BaseModel
12
+ # @!attribute data
13
+ #
14
+ # @return [Symbol, :ok]
15
+ required :data, const: :ok
16
+
17
+ # @!parse
18
+ # # @param data [Symbol, :ok]
19
+ # #
20
+ # def initialize(data: :ok, **) = super
21
+
22
+ # def initialize: (Hash | TerminalShop::BaseModel) -> void
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TerminalShop
4
+ module Models
5
+ class SubscriptionDeleteParams < TerminalShop::BaseModel
6
+ # @!parse
7
+ # extend TerminalShop::RequestParameters::Converter
8
+ include TerminalShop::RequestParameters
9
+
10
+ # @!parse
11
+ # # @param request_options [TerminalShop::RequestOptions, Hash{Symbol=>Object}]
12
+ # #
13
+ # def initialize(request_options: {}, **) = super
14
+
15
+ # def initialize: (Hash | TerminalShop::BaseModel) -> void
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TerminalShop
4
+ module Models
5
+ # @example
6
+ # ```ruby
7
+ # subscription_delete_response => {
8
+ # data: :ok
9
+ # }
10
+ # ```
11
+ class SubscriptionDeleteResponse < TerminalShop::BaseModel
12
+ # @!attribute data
13
+ #
14
+ # @return [Symbol, :ok]
15
+ required :data, const: :ok
16
+
17
+ # @!parse
18
+ # # @param data [Symbol, :ok]
19
+ # #
20
+ # def initialize(data: :ok, **) = super
21
+
22
+ # def initialize: (Hash | TerminalShop::BaseModel) -> void
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TerminalShop
4
+ module Models
5
+ class SubscriptionListParams < TerminalShop::BaseModel
6
+ # @!parse
7
+ # extend TerminalShop::RequestParameters::Converter
8
+ include TerminalShop::RequestParameters
9
+
10
+ # @!parse
11
+ # # @param request_options [TerminalShop::RequestOptions, Hash{Symbol=>Object}]
12
+ # #
13
+ # def initialize(request_options: {}, **) = super
14
+
15
+ # def initialize: (Hash | TerminalShop::BaseModel) -> void
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TerminalShop
4
+ module Models
5
+ # @example
6
+ # ```ruby
7
+ # subscription_list_response => {
8
+ # data: -> { TerminalShop::ArrayOf[TerminalShop::Models::SubscriptionAPI] === _1 }
9
+ # }
10
+ # ```
11
+ class SubscriptionListResponse < TerminalShop::BaseModel
12
+ # @!attribute data
13
+ # List of subscriptions.
14
+ #
15
+ # @return [Array<TerminalShop::Models::SubscriptionAPI>]
16
+ required :data, -> { TerminalShop::ArrayOf[TerminalShop::Models::SubscriptionAPI] }
17
+
18
+ # @!parse
19
+ # # @param data [Array<TerminalShop::Models::SubscriptionAPI>]
20
+ # #
21
+ # def initialize(data:, **) = super
22
+
23
+ # def initialize: (Hash | TerminalShop::BaseModel) -> void
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,68 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TerminalShop
4
+ module Models
5
+ # @example
6
+ # ```ruby
7
+ # token_api => {
8
+ # id: String,
9
+ # token: String,
10
+ # time: TerminalShop::Models::TokenAPI::Time
11
+ # }
12
+ # ```
13
+ class TokenAPI < TerminalShop::BaseModel
14
+ # @!attribute id
15
+ # Unique object identifier. The format and length of IDs may change over time.
16
+ #
17
+ # @return [String]
18
+ required :id, String
19
+
20
+ # @!attribute token
21
+ # Personal access token (obfuscated).
22
+ #
23
+ # @return [String]
24
+ required :token, String
25
+
26
+ # @!attribute time
27
+ # Relevant timestamps for the token.
28
+ #
29
+ # @return [TerminalShop::Models::TokenAPI::Time]
30
+ required :time, -> { TerminalShop::Models::TokenAPI::Time }
31
+
32
+ # @!parse
33
+ # # A personal access token used to access the Terminal API. If you leak this,
34
+ # # expect large sums of coffee to be ordered on your credit card.
35
+ # #
36
+ # # @param id [String]
37
+ # # @param token [String]
38
+ # # @param time [TerminalShop::Models::TokenAPI::Time]
39
+ # #
40
+ # def initialize(id:, token:, time:, **) = super
41
+
42
+ # def initialize: (Hash | TerminalShop::BaseModel) -> void
43
+
44
+ # @example
45
+ # ```ruby
46
+ # time => {
47
+ # created: String
48
+ # }
49
+ # ```
50
+ class Time < TerminalShop::BaseModel
51
+ # @!attribute created
52
+ # The created time for the token.
53
+ #
54
+ # @return [String]
55
+ required :created, String
56
+
57
+ # @!parse
58
+ # # Relevant timestamps for the token.
59
+ # #
60
+ # # @param created [String]
61
+ # #
62
+ # def initialize(created:, **) = super
63
+
64
+ # def initialize: (Hash | TerminalShop::BaseModel) -> void
65
+ end
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TerminalShop
4
+ module Models
5
+ class TokenCreateParams < TerminalShop::BaseModel
6
+ # @!parse
7
+ # extend TerminalShop::RequestParameters::Converter
8
+ include TerminalShop::RequestParameters
9
+
10
+ # @!parse
11
+ # # @param request_options [TerminalShop::RequestOptions, Hash{Symbol=>Object}]
12
+ # #
13
+ # def initialize(request_options: {}, **) = super
14
+
15
+ # def initialize: (Hash | TerminalShop::BaseModel) -> void
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TerminalShop
4
+ module Models
5
+ # @example
6
+ # ```ruby
7
+ # token_create_response => {
8
+ # data: TerminalShop::Models::TokenCreateResponse::Data
9
+ # }
10
+ # ```
11
+ class TokenCreateResponse < TerminalShop::BaseModel
12
+ # @!attribute data
13
+ #
14
+ # @return [TerminalShop::Models::TokenCreateResponse::Data]
15
+ required :data, -> { TerminalShop::Models::TokenCreateResponse::Data }
16
+
17
+ # @!parse
18
+ # # @param data [TerminalShop::Models::TokenCreateResponse::Data]
19
+ # #
20
+ # def initialize(data:, **) = super
21
+
22
+ # def initialize: (Hash | TerminalShop::BaseModel) -> void
23
+
24
+ # @example
25
+ # ```ruby
26
+ # data => {
27
+ # id: String,
28
+ # token: String
29
+ # }
30
+ # ```
31
+ class Data < TerminalShop::BaseModel
32
+ # @!attribute id
33
+ # Personal token ID.
34
+ #
35
+ # @return [String]
36
+ required :id, String
37
+
38
+ # @!attribute token
39
+ # Personal access token. Include this in the Authorization header
40
+ # (`Bearer <token>`) when accessing the Terminal API.
41
+ #
42
+ # @return [String]
43
+ required :token, String
44
+
45
+ # @!parse
46
+ # # @param id [String]
47
+ # # @param token [String]
48
+ # #
49
+ # def initialize(id:, token:, **) = super
50
+
51
+ # def initialize: (Hash | TerminalShop::BaseModel) -> void
52
+ end
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TerminalShop
4
+ module Models
5
+ class TokenDeleteParams < TerminalShop::BaseModel
6
+ # @!parse
7
+ # extend TerminalShop::RequestParameters::Converter
8
+ include TerminalShop::RequestParameters
9
+
10
+ # @!parse
11
+ # # @param request_options [TerminalShop::RequestOptions, Hash{Symbol=>Object}]
12
+ # #
13
+ # def initialize(request_options: {}, **) = super
14
+
15
+ # def initialize: (Hash | TerminalShop::BaseModel) -> void
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TerminalShop
4
+ module Models
5
+ # @example
6
+ # ```ruby
7
+ # token_delete_response => {
8
+ # data: :ok
9
+ # }
10
+ # ```
11
+ class TokenDeleteResponse < TerminalShop::BaseModel
12
+ # @!attribute data
13
+ #
14
+ # @return [Symbol, :ok]
15
+ required :data, const: :ok
16
+
17
+ # @!parse
18
+ # # @param data [Symbol, :ok]
19
+ # #
20
+ # def initialize(data: :ok, **) = super
21
+
22
+ # def initialize: (Hash | TerminalShop::BaseModel) -> void
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TerminalShop
4
+ module Models
5
+ class TokenGetParams < TerminalShop::BaseModel
6
+ # @!parse
7
+ # extend TerminalShop::RequestParameters::Converter
8
+ include TerminalShop::RequestParameters
9
+
10
+ # @!parse
11
+ # # @param request_options [TerminalShop::RequestOptions, Hash{Symbol=>Object}]
12
+ # #
13
+ # def initialize(request_options: {}, **) = super
14
+
15
+ # def initialize: (Hash | TerminalShop::BaseModel) -> void
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TerminalShop
4
+ module Models
5
+ # @example
6
+ # ```ruby
7
+ # token_get_response => {
8
+ # data: TerminalShop::Models::TokenAPI
9
+ # }
10
+ # ```
11
+ class TokenGetResponse < TerminalShop::BaseModel
12
+ # @!attribute data
13
+ # A personal access token used to access the Terminal API. If you leak this,
14
+ # expect large sums of coffee to be ordered on your credit card.
15
+ #
16
+ # @return [TerminalShop::Models::TokenAPI]
17
+ required :data, -> { TerminalShop::Models::TokenAPI }
18
+
19
+ # @!parse
20
+ # # @param data [TerminalShop::Models::TokenAPI]
21
+ # #
22
+ # def initialize(data:, **) = super
23
+
24
+ # def initialize: (Hash | TerminalShop::BaseModel) -> void
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TerminalShop
4
+ module Models
5
+ class TokenListParams < TerminalShop::BaseModel
6
+ # @!parse
7
+ # extend TerminalShop::RequestParameters::Converter
8
+ include TerminalShop::RequestParameters
9
+
10
+ # @!parse
11
+ # # @param request_options [TerminalShop::RequestOptions, Hash{Symbol=>Object}]
12
+ # #
13
+ # def initialize(request_options: {}, **) = super
14
+
15
+ # def initialize: (Hash | TerminalShop::BaseModel) -> void
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TerminalShop
4
+ module Models
5
+ # @example
6
+ # ```ruby
7
+ # token_list_response => {
8
+ # data: -> { TerminalShop::ArrayOf[TerminalShop::Models::TokenAPI] === _1 }
9
+ # }
10
+ # ```
11
+ class TokenListResponse < TerminalShop::BaseModel
12
+ # @!attribute data
13
+ # List of personal access tokens.
14
+ #
15
+ # @return [Array<TerminalShop::Models::TokenAPI>]
16
+ required :data, -> { TerminalShop::ArrayOf[TerminalShop::Models::TokenAPI] }
17
+
18
+ # @!parse
19
+ # # @param data [Array<TerminalShop::Models::TokenAPI>]
20
+ # #
21
+ # def initialize(data:, **) = super
22
+
23
+ # def initialize: (Hash | TerminalShop::BaseModel) -> void
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TerminalShop
4
+ module Models
5
+ class ViewInitParams < TerminalShop::BaseModel
6
+ # @!parse
7
+ # extend TerminalShop::RequestParameters::Converter
8
+ include TerminalShop::RequestParameters
9
+
10
+ # @!parse
11
+ # # @param request_options [TerminalShop::RequestOptions, Hash{Symbol=>Object}]
12
+ # #
13
+ # def initialize(request_options: {}, **) = super
14
+
15
+ # def initialize: (Hash | TerminalShop::BaseModel) -> void
16
+ end
17
+ end
18
+ end