license_manager 0.1.0

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 (323) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +5 -0
  3. data/Gemfile +9 -0
  4. data/LICENSE +201 -0
  5. data/README.md +96 -0
  6. data/Rakefile +10 -0
  7. data/docs/ConnectStripe.md +18 -0
  8. data/docs/CreateCustomer.md +20 -0
  9. data/docs/CreateIntegrationMapping.md +20 -0
  10. data/docs/CreateLicense.md +36 -0
  11. data/docs/CreatePolicy.md +30 -0
  12. data/docs/CreatePortalLink.md +18 -0
  13. data/docs/CreateProduct.md +20 -0
  14. data/docs/CreateProductWithPolicy.md +24 -0
  15. data/docs/CreateRelease.md +20 -0
  16. data/docs/CreateToken.md +20 -0
  17. data/docs/Customer.md +30 -0
  18. data/docs/CustomerList.md +20 -0
  19. data/docs/CustomersApi.md +385 -0
  20. data/docs/Error.md +18 -0
  21. data/docs/ErrorError.md +22 -0
  22. data/docs/ErrorErrorIssuesInner.md +20 -0
  23. data/docs/ErrorErrorIssuesInnerPathInner.md +15 -0
  24. data/docs/Event.md +34 -0
  25. data/docs/EventActor.md +55 -0
  26. data/docs/EventActorOneOf.md +26 -0
  27. data/docs/EventActorOneOf1.md +24 -0
  28. data/docs/EventActorOneOf2.md +22 -0
  29. data/docs/EventActorOneOf3.md +18 -0
  30. data/docs/EventActorOneOf4.md +22 -0
  31. data/docs/EventList.md +20 -0
  32. data/docs/EventMachine.md +22 -0
  33. data/docs/EventType.md +15 -0
  34. data/docs/EventsApi.md +173 -0
  35. data/docs/FixedMaxVersion.md +20 -0
  36. data/docs/Integration.md +38 -0
  37. data/docs/IntegrationMapping.md +38 -0
  38. data/docs/IntegrationStatus.md +15 -0
  39. data/docs/IntegrationsApi.md +587 -0
  40. data/docs/License.md +50 -0
  41. data/docs/LicenseList.md +20 -0
  42. data/docs/LicenseMaxVersion.md +22 -0
  43. data/docs/LicenseMaxVersionInput.md +22 -0
  44. data/docs/LicenseStats.md +26 -0
  45. data/docs/LicenseStatsActivationsByMachineInner.md +24 -0
  46. data/docs/LicenseStatsActivationsByVersionInner.md +20 -0
  47. data/docs/LicenseStatus.md +15 -0
  48. data/docs/LicenseToken.md +18 -0
  49. data/docs/LicensesApi.md +817 -0
  50. data/docs/ListPolicyEventsTypeParameter.md +15 -0
  51. data/docs/ListStripePrices200Response.md +18 -0
  52. data/docs/LockMaxVersion.md +22 -0
  53. data/docs/LockMaxVersionMajorAfter.md +49 -0
  54. data/docs/LockMaxVersionMajorAfterOneOf.md +20 -0
  55. data/docs/LockMaxVersionMajorAfterOneOf1.md +20 -0
  56. data/docs/LockMaxVersionMinorAfter.md +20 -0
  57. data/docs/Machine.md +36 -0
  58. data/docs/MachineList.md +20 -0
  59. data/docs/MachinesApi.md +246 -0
  60. data/docs/Pagination.md +24 -0
  61. data/docs/PoliciesApi.md +388 -0
  62. data/docs/Policy.md +40 -0
  63. data/docs/PolicyDuration.md +20 -0
  64. data/docs/PolicyList.md +20 -0
  65. data/docs/PolicyMaxVersion.md +24 -0
  66. data/docs/PolicySettings.md +24 -0
  67. data/docs/PolicySettingsDuration.md +20 -0
  68. data/docs/PolicySettingsDurationAnyOf.md +20 -0
  69. data/docs/PolicySettingsDurationAnyOf1.md +20 -0
  70. data/docs/PolicySettingsMaxVersion.md +24 -0
  71. data/docs/Portal.md +30 -0
  72. data/docs/PortalApi.md +289 -0
  73. data/docs/PortalLink.md +22 -0
  74. data/docs/PortalNotFound.md +22 -0
  75. data/docs/PortalSettings.md +26 -0
  76. data/docs/Price.md +20 -0
  77. data/docs/PriceInput.md +20 -0
  78. data/docs/Product.md +32 -0
  79. data/docs/ProductList.md +20 -0
  80. data/docs/ProductStats.md +54 -0
  81. data/docs/ProductStatsActivationsByVersionInner.md +20 -0
  82. data/docs/ProductStatsActiveMachinesByPlatformInner.md +20 -0
  83. data/docs/ProductStatsActiveMachinesByVersionInner.md +20 -0
  84. data/docs/ProductStatsNewLicensesByPolicyInner.md +22 -0
  85. data/docs/ProductsApi.md +666 -0
  86. data/docs/Release.md +28 -0
  87. data/docs/ReleaseList.md +20 -0
  88. data/docs/ReleasesApi.md +388 -0
  89. data/docs/RequestPortalLink.md +20 -0
  90. data/docs/Revenue.md +34 -0
  91. data/docs/SendLicenseKeys.md +18 -0
  92. data/docs/SendPortalLink.md +18 -0
  93. data/docs/SigningKey.md +27 -0
  94. data/docs/StripeIntegration.md +26 -0
  95. data/docs/StripePermission.md +22 -0
  96. data/docs/StripePrice.md +28 -0
  97. data/docs/Token.md +24 -0
  98. data/docs/TokensApi.md +235 -0
  99. data/docs/UpdateCustomer.md +20 -0
  100. data/docs/UpdateIntegrationMapping.md +18 -0
  101. data/docs/UpdateLicense.md +28 -0
  102. data/docs/UpdatePolicy.md +30 -0
  103. data/docs/UpdateProduct.md +22 -0
  104. data/docs/UpdateProductPortal.md +26 -0
  105. data/docs/UpdateRelease.md +20 -0
  106. data/docs/ValidateKey.md +26 -0
  107. data/docs/ValidateKeyError.md +18 -0
  108. data/docs/ValidateKeyErrorError.md +24 -0
  109. data/git_push.sh +54 -0
  110. data/lib/license_manager/api/customers_api.rb +398 -0
  111. data/lib/license_manager/api/events_api.rb +207 -0
  112. data/lib/license_manager/api/integrations_api.rb +559 -0
  113. data/lib/license_manager/api/licenses_api.rb +885 -0
  114. data/lib/license_manager/api/machines_api.rb +257 -0
  115. data/lib/license_manager/api/policies_api.rb +412 -0
  116. data/lib/license_manager/api/portal_api.rb +310 -0
  117. data/lib/license_manager/api/products_api.rb +653 -0
  118. data/lib/license_manager/api/releases_api.rb +408 -0
  119. data/lib/license_manager/api/tokens_api.rb +244 -0
  120. data/lib/license_manager/api_client.rb +441 -0
  121. data/lib/license_manager/api_error.rb +58 -0
  122. data/lib/license_manager/api_model_base.rb +88 -0
  123. data/lib/license_manager/configuration.rb +400 -0
  124. data/lib/license_manager/models/connect_stripe.rb +187 -0
  125. data/lib/license_manager/models/create_customer.rb +222 -0
  126. data/lib/license_manager/models/create_integration_mapping.rb +222 -0
  127. data/lib/license_manager/models/create_license.rb +361 -0
  128. data/lib/license_manager/models/create_policy.rb +347 -0
  129. data/lib/license_manager/models/create_portal_link.rb +196 -0
  130. data/lib/license_manager/models/create_product.rb +244 -0
  131. data/lib/license_manager/models/create_product_with_policy.rb +270 -0
  132. data/lib/license_manager/models/create_release.rb +208 -0
  133. data/lib/license_manager/models/create_token.rb +237 -0
  134. data/lib/license_manager/models/customer.rb +308 -0
  135. data/lib/license_manager/models/customer_list.rb +206 -0
  136. data/lib/license_manager/models/error.rb +177 -0
  137. data/lib/license_manager/models/error_error.rb +215 -0
  138. data/lib/license_manager/models/error_error_issues_inner.rb +205 -0
  139. data/lib/license_manager/models/error_error_issues_inner_path_inner.rb +103 -0
  140. data/lib/license_manager/models/event.rb +340 -0
  141. data/lib/license_manager/models/event_actor.rb +108 -0
  142. data/lib/license_manager/models/event_actor_one_of.rb +251 -0
  143. data/lib/license_manager/models/event_actor_one_of1.rb +239 -0
  144. data/lib/license_manager/models/event_actor_one_of2.rb +257 -0
  145. data/lib/license_manager/models/event_actor_one_of3.rb +201 -0
  146. data/lib/license_manager/models/event_actor_one_of4.rb +243 -0
  147. data/lib/license_manager/models/event_list.rb +206 -0
  148. data/lib/license_manager/models/event_machine.rb +216 -0
  149. data/lib/license_manager/models/event_type.rb +46 -0
  150. data/lib/license_manager/models/fixed_max_version.rb +240 -0
  151. data/lib/license_manager/models/integration.rb +412 -0
  152. data/lib/license_manager/models/integration_mapping.rb +435 -0
  153. data/lib/license_manager/models/integration_status.rb +42 -0
  154. data/lib/license_manager/models/license.rb +542 -0
  155. data/lib/license_manager/models/license_list.rb +206 -0
  156. data/lib/license_manager/models/license_max_version.rb +208 -0
  157. data/lib/license_manager/models/license_max_version_input.rb +202 -0
  158. data/lib/license_manager/models/license_stats.rb +292 -0
  159. data/lib/license_manager/models/license_stats_activations_by_machine_inner.rb +244 -0
  160. data/lib/license_manager/models/license_stats_activations_by_version_inner.rb +206 -0
  161. data/lib/license_manager/models/license_status.rb +42 -0
  162. data/lib/license_manager/models/license_token.rb +178 -0
  163. data/lib/license_manager/models/list_policy_events_type_parameter.rb +104 -0
  164. data/lib/license_manager/models/list_stripe_prices200_response.rb +179 -0
  165. data/lib/license_manager/models/lock_max_version.rb +240 -0
  166. data/lib/license_manager/models/lock_max_version_major_after.rb +105 -0
  167. data/lib/license_manager/models/lock_max_version_major_after_one_of.rb +245 -0
  168. data/lib/license_manager/models/lock_max_version_major_after_one_of1.rb +246 -0
  169. data/lib/license_manager/models/lock_max_version_minor_after.rb +104 -0
  170. data/lib/license_manager/models/machine.rb +383 -0
  171. data/lib/license_manager/models/machine_list.rb +206 -0
  172. data/lib/license_manager/models/pagination.rb +260 -0
  173. data/lib/license_manager/models/policy.rb +425 -0
  174. data/lib/license_manager/models/policy_duration.rb +104 -0
  175. data/lib/license_manager/models/policy_list.rb +206 -0
  176. data/lib/license_manager/models/policy_max_version.rb +104 -0
  177. data/lib/license_manager/models/policy_settings.rb +244 -0
  178. data/lib/license_manager/models/policy_settings_duration.rb +104 -0
  179. data/lib/license_manager/models/policy_settings_duration_any_of.rb +245 -0
  180. data/lib/license_manager/models/policy_settings_duration_any_of1.rb +246 -0
  181. data/lib/license_manager/models/policy_settings_max_version.rb +104 -0
  182. data/lib/license_manager/models/portal.rb +281 -0
  183. data/lib/license_manager/models/portal_link.rb +232 -0
  184. data/lib/license_manager/models/portal_not_found.rb +204 -0
  185. data/lib/license_manager/models/portal_settings.rb +304 -0
  186. data/lib/license_manager/models/price.rb +206 -0
  187. data/lib/license_manager/models/price_input.rb +224 -0
  188. data/lib/license_manager/models/product.rb +333 -0
  189. data/lib/license_manager/models/product_list.rb +206 -0
  190. data/lib/license_manager/models/product_stats.rb +682 -0
  191. data/lib/license_manager/models/product_stats_activations_by_version_inner.rb +193 -0
  192. data/lib/license_manager/models/product_stats_active_machines_by_platform_inner.rb +190 -0
  193. data/lib/license_manager/models/product_stats_active_machines_by_version_inner.rb +190 -0
  194. data/lib/license_manager/models/product_stats_new_licenses_by_policy_inner.rb +235 -0
  195. data/lib/license_manager/models/release.rb +308 -0
  196. data/lib/license_manager/models/release_list.rb +206 -0
  197. data/lib/license_manager/models/request_portal_link.rb +216 -0
  198. data/lib/license_manager/models/revenue.rb +401 -0
  199. data/lib/license_manager/models/send_license_keys.rb +198 -0
  200. data/lib/license_manager/models/send_portal_link.rb +187 -0
  201. data/lib/license_manager/models/signing_key.rb +282 -0
  202. data/lib/license_manager/models/stripe_integration.rb +276 -0
  203. data/lib/license_manager/models/stripe_permission.rb +253 -0
  204. data/lib/license_manager/models/stripe_price.rb +280 -0
  205. data/lib/license_manager/models/token.rb +274 -0
  206. data/lib/license_manager/models/update_customer.rb +215 -0
  207. data/lib/license_manager/models/update_integration_mapping.rb +186 -0
  208. data/lib/license_manager/models/update_license.rb +268 -0
  209. data/lib/license_manager/models/update_policy.rb +340 -0
  210. data/lib/license_manager/models/update_product.rb +246 -0
  211. data/lib/license_manager/models/update_product_portal.rb +274 -0
  212. data/lib/license_manager/models/update_release.rb +201 -0
  213. data/lib/license_manager/models/validate_key.rb +362 -0
  214. data/lib/license_manager/models/validate_key_error.rb +177 -0
  215. data/lib/license_manager/models/validate_key_error_error.rb +226 -0
  216. data/lib/license_manager/version.rb +15 -0
  217. data/lib/license_manager.rb +142 -0
  218. data/license_manager.gemspec +41 -0
  219. data/openapi.json +9825 -0
  220. data/spec/api/customers_api_spec.rb +102 -0
  221. data/spec/api/events_api_spec.rb +68 -0
  222. data/spec/api/integrations_api_spec.rb +134 -0
  223. data/spec/api/licenses_api_spec.rb +200 -0
  224. data/spec/api/machines_api_spec.rb +77 -0
  225. data/spec/api/policies_api_spec.rb +105 -0
  226. data/spec/api/portal_api_spec.rb +87 -0
  227. data/spec/api/products_api_spec.rb +148 -0
  228. data/spec/api/releases_api_spec.rb +105 -0
  229. data/spec/api/tokens_api_spec.rb +74 -0
  230. data/spec/models/connect_stripe_spec.rb +36 -0
  231. data/spec/models/create_customer_spec.rb +42 -0
  232. data/spec/models/create_integration_mapping_spec.rb +42 -0
  233. data/spec/models/create_license_spec.rb +90 -0
  234. data/spec/models/create_policy_spec.rb +72 -0
  235. data/spec/models/create_portal_link_spec.rb +36 -0
  236. data/spec/models/create_product_spec.rb +42 -0
  237. data/spec/models/create_product_with_policy_spec.rb +54 -0
  238. data/spec/models/create_release_spec.rb +42 -0
  239. data/spec/models/create_token_spec.rb +46 -0
  240. data/spec/models/customer_list_spec.rb +42 -0
  241. data/spec/models/customer_spec.rb +72 -0
  242. data/spec/models/error_error_issues_inner_path_inner_spec.rb +21 -0
  243. data/spec/models/error_error_issues_inner_spec.rb +42 -0
  244. data/spec/models/error_error_spec.rb +48 -0
  245. data/spec/models/error_spec.rb +36 -0
  246. data/spec/models/event_actor_one_of1_spec.rb +58 -0
  247. data/spec/models/event_actor_one_of2_spec.rb +56 -0
  248. data/spec/models/event_actor_one_of3_spec.rb +40 -0
  249. data/spec/models/event_actor_one_of4_spec.rb +56 -0
  250. data/spec/models/event_actor_one_of_spec.rb +64 -0
  251. data/spec/models/event_actor_spec.rb +32 -0
  252. data/spec/models/event_list_spec.rb +42 -0
  253. data/spec/models/event_machine_spec.rb +48 -0
  254. data/spec/models/event_spec.rb +84 -0
  255. data/spec/models/event_type_spec.rb +30 -0
  256. data/spec/models/fixed_max_version_spec.rb +46 -0
  257. data/spec/models/integration_mapping_spec.rb +100 -0
  258. data/spec/models/integration_spec.rb +100 -0
  259. data/spec/models/integration_status_spec.rb +30 -0
  260. data/spec/models/license_list_spec.rb +42 -0
  261. data/spec/models/license_max_version_input_spec.rb +48 -0
  262. data/spec/models/license_max_version_spec.rb +48 -0
  263. data/spec/models/license_spec.rb +132 -0
  264. data/spec/models/license_stats_activations_by_machine_inner_spec.rb +54 -0
  265. data/spec/models/license_stats_activations_by_version_inner_spec.rb +42 -0
  266. data/spec/models/license_stats_spec.rb +60 -0
  267. data/spec/models/license_status_spec.rb +30 -0
  268. data/spec/models/license_token_spec.rb +36 -0
  269. data/spec/models/list_policy_events_type_parameter_spec.rb +21 -0
  270. data/spec/models/list_stripe_prices200_response_spec.rb +36 -0
  271. data/spec/models/lock_max_version_major_after_one_of1_spec.rb +46 -0
  272. data/spec/models/lock_max_version_major_after_one_of_spec.rb +46 -0
  273. data/spec/models/lock_max_version_major_after_spec.rb +32 -0
  274. data/spec/models/lock_max_version_minor_after_spec.rb +21 -0
  275. data/spec/models/lock_max_version_spec.rb +52 -0
  276. data/spec/models/machine_list_spec.rb +42 -0
  277. data/spec/models/machine_spec.rb +94 -0
  278. data/spec/models/pagination_spec.rb +54 -0
  279. data/spec/models/policy_duration_spec.rb +21 -0
  280. data/spec/models/policy_list_spec.rb +42 -0
  281. data/spec/models/policy_max_version_spec.rb +21 -0
  282. data/spec/models/policy_settings_duration_any_of1_spec.rb +46 -0
  283. data/spec/models/policy_settings_duration_any_of_spec.rb +46 -0
  284. data/spec/models/policy_settings_duration_spec.rb +21 -0
  285. data/spec/models/policy_settings_max_version_spec.rb +21 -0
  286. data/spec/models/policy_settings_spec.rb +54 -0
  287. data/spec/models/policy_spec.rb +102 -0
  288. data/spec/models/portal_link_spec.rb +48 -0
  289. data/spec/models/portal_not_found_spec.rb +48 -0
  290. data/spec/models/portal_settings_spec.rb +60 -0
  291. data/spec/models/portal_spec.rb +72 -0
  292. data/spec/models/price_input_spec.rb +42 -0
  293. data/spec/models/price_spec.rb +42 -0
  294. data/spec/models/product_list_spec.rb +42 -0
  295. data/spec/models/product_spec.rb +78 -0
  296. data/spec/models/product_stats_activations_by_version_inner_spec.rb +42 -0
  297. data/spec/models/product_stats_active_machines_by_platform_inner_spec.rb +42 -0
  298. data/spec/models/product_stats_active_machines_by_version_inner_spec.rb +42 -0
  299. data/spec/models/product_stats_new_licenses_by_policy_inner_spec.rb +48 -0
  300. data/spec/models/product_stats_spec.rb +144 -0
  301. data/spec/models/release_list_spec.rb +42 -0
  302. data/spec/models/release_spec.rb +66 -0
  303. data/spec/models/request_portal_link_spec.rb +42 -0
  304. data/spec/models/revenue_spec.rb +84 -0
  305. data/spec/models/send_license_keys_spec.rb +36 -0
  306. data/spec/models/send_portal_link_spec.rb +36 -0
  307. data/spec/models/signing_key_spec.rb +58 -0
  308. data/spec/models/stripe_integration_spec.rb +60 -0
  309. data/spec/models/stripe_permission_spec.rb +52 -0
  310. data/spec/models/stripe_price_spec.rb +66 -0
  311. data/spec/models/token_spec.rb +62 -0
  312. data/spec/models/update_customer_spec.rb +42 -0
  313. data/spec/models/update_integration_mapping_spec.rb +36 -0
  314. data/spec/models/update_license_spec.rb +66 -0
  315. data/spec/models/update_policy_spec.rb +72 -0
  316. data/spec/models/update_product_portal_spec.rb +60 -0
  317. data/spec/models/update_product_spec.rb +48 -0
  318. data/spec/models/update_release_spec.rb +42 -0
  319. data/spec/models/validate_key_error_error_spec.rb +54 -0
  320. data/spec/models/validate_key_error_spec.rb +36 -0
  321. data/spec/models/validate_key_spec.rb +60 -0
  322. data/spec/spec_helper.rb +111 -0
  323. metadata +532 -0
@@ -0,0 +1,333 @@
1
+ =begin
2
+ #LicenseManager API
3
+
4
+ #Public API. Authenticate with an organization API key, or with a token scoped to a customer, license or machine on the endpoints that accept one. ## Conventions - **Errors** answer `{ \"error\": { \"code\", \"message\" } }`. Branch on `code`, which is stable, not on `message`. Each response lists the codes it can return, except `404`, which answers `not_found` unless it says otherwise. Unexpected errors answer `500` with `internal_error`. - **Validation** errors answer `422`, not `400`, with the `validation_error` code and an `issues` array giving the `path` and `message` of each invalid value. - **Unknown body fields are ignored**, not rejected: sending a field an endpoint doesn't accept, like `policyId` to `updateLicense`, changes nothing and doesn't fail. - **Strings** are trimmed before they're validated and stored. Emails are stored lower cased. - **Updates** only change the fields that are sent. A field sent as `null` is cleared, when it can be. - **Dates** can be sent with any offset, and are always returned in UTC, like `2026-01-15T09:30:00.000Z`. Calendar months and days are counted in UTC. - **Ids** are 8 letters and digits, after `test_` for test products and their resources. - **Lists** are paginated with `page` and `pageSize`. Items with the same value for the `sort` field are ordered by id, so pages are stable, but items created or deleted between two requests shift the pages. Items without a value for the `sort` field come last in ascending order, and first in descending order, unless the endpoint says otherwise. - **Test products** are sandboxes of a live product. Test API keys only reach test products, live API keys only live ones: the others answer `404`, as if they didn't exist. Sessions and tokens reach both.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.26.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module LicenseManager
17
+ class Product < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :slug
21
+
22
+ attr_accessor :name
23
+
24
+ # For test products, id of the live product they're a sandbox of. `null` for live products.
25
+ attr_accessor :is_test_from_product_id
26
+
27
+ # Public URL of the product's logo, shown in the web app and the customer portal. `null` without a logo.
28
+ attr_accessor :logo_url
29
+
30
+ attr_accessor :portal
31
+
32
+ attr_accessor :created_at
33
+
34
+ attr_accessor :updated_at
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ def self.attribute_map
38
+ {
39
+ :'id' => :'id',
40
+ :'slug' => :'slug',
41
+ :'name' => :'name',
42
+ :'is_test_from_product_id' => :'isTestFromProductId',
43
+ :'logo_url' => :'logoUrl',
44
+ :'portal' => :'portal',
45
+ :'created_at' => :'createdAt',
46
+ :'updated_at' => :'updatedAt'
47
+ }
48
+ end
49
+
50
+ # Returns attribute mapping this model knows about
51
+ def self.acceptable_attribute_map
52
+ attribute_map
53
+ end
54
+
55
+ # Returns all the JSON keys this model knows about
56
+ def self.acceptable_attributes
57
+ acceptable_attribute_map.values
58
+ end
59
+
60
+ # Attribute type mapping.
61
+ def self.openapi_types
62
+ {
63
+ :'id' => :'String',
64
+ :'slug' => :'String',
65
+ :'name' => :'String',
66
+ :'is_test_from_product_id' => :'String',
67
+ :'logo_url' => :'String',
68
+ :'portal' => :'PortalSettings',
69
+ :'created_at' => :'Time',
70
+ :'updated_at' => :'Time'
71
+ }
72
+ end
73
+
74
+ # List of attributes with nullable: true
75
+ def self.openapi_nullable
76
+ Set.new([
77
+ :'is_test_from_product_id',
78
+ :'logo_url',
79
+ ])
80
+ end
81
+
82
+ # Returns attribute type mapping
83
+ def self.acceptable_openapi_types
84
+ openapi_types
85
+ end
86
+
87
+ # Returns the nullable attributes
88
+ def self.acceptable_openapi_nullable
89
+ openapi_nullable
90
+ end
91
+
92
+ # Initializes the object
93
+ # @param [Hash] attributes Model attributes in the form of hash
94
+ def initialize(attributes = {})
95
+ if (!attributes.is_a?(Hash))
96
+ fail ArgumentError, "The input argument (attributes) must be a hash in `LicenseManager::Product` initialize method"
97
+ end
98
+
99
+ # check to see if the attribute exists and convert string to symbol for hash key
100
+ acceptable_attribute_map = self.class.acceptable_attribute_map
101
+ attributes = attributes.each_with_object({}) { |(k, v), h|
102
+ if (!acceptable_attribute_map.key?(k.to_sym))
103
+ fail ArgumentError, "`#{k}` is not a valid attribute in `LicenseManager::Product`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
104
+ end
105
+ h[k.to_sym] = v
106
+ }
107
+
108
+ if attributes.key?(:'id')
109
+ self.id = attributes[:'id']
110
+ else
111
+ self.id = nil
112
+ end
113
+
114
+ if attributes.key?(:'slug')
115
+ self.slug = attributes[:'slug']
116
+ else
117
+ self.slug = nil
118
+ end
119
+
120
+ if attributes.key?(:'name')
121
+ self.name = attributes[:'name']
122
+ else
123
+ self.name = nil
124
+ end
125
+
126
+ if attributes.key?(:'is_test_from_product_id')
127
+ self.is_test_from_product_id = attributes[:'is_test_from_product_id']
128
+ else
129
+ self.is_test_from_product_id = nil
130
+ end
131
+
132
+ if attributes.key?(:'logo_url')
133
+ self.logo_url = attributes[:'logo_url']
134
+ else
135
+ self.logo_url = nil
136
+ end
137
+
138
+ if attributes.key?(:'portal')
139
+ self.portal = attributes[:'portal']
140
+ else
141
+ self.portal = nil
142
+ end
143
+
144
+ if attributes.key?(:'created_at')
145
+ self.created_at = attributes[:'created_at']
146
+ else
147
+ self.created_at = nil
148
+ end
149
+
150
+ if attributes.key?(:'updated_at')
151
+ self.updated_at = attributes[:'updated_at']
152
+ else
153
+ self.updated_at = nil
154
+ end
155
+ end
156
+
157
+ # Show invalid properties with the reasons. Usually used together with valid?
158
+ # @return Array for valid properties with the reasons
159
+ def list_invalid_properties
160
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
161
+ invalid_properties = Array.new
162
+ if @id.nil?
163
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
164
+ end
165
+
166
+ if @slug.nil?
167
+ invalid_properties.push('invalid value for "slug", slug cannot be nil.')
168
+ end
169
+
170
+ if @name.nil?
171
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
172
+ end
173
+
174
+ if @portal.nil?
175
+ invalid_properties.push('invalid value for "portal", portal cannot be nil.')
176
+ end
177
+
178
+ if @created_at.nil?
179
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
180
+ end
181
+
182
+ if @updated_at.nil?
183
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
184
+ end
185
+
186
+ invalid_properties
187
+ end
188
+
189
+ # Check to see if the all the properties in the model are valid
190
+ # @return true if the model is valid
191
+ def valid?
192
+ warn '[DEPRECATED] the `valid?` method is obsolete'
193
+ return false if @id.nil?
194
+ return false if @slug.nil?
195
+ return false if @name.nil?
196
+ return false if @portal.nil?
197
+ return false if @created_at.nil?
198
+ return false if @updated_at.nil?
199
+ true
200
+ end
201
+
202
+ # Custom attribute writer method with validation
203
+ # @param [Object] id Value to be assigned
204
+ def id=(id)
205
+ if id.nil?
206
+ fail ArgumentError, 'id cannot be nil'
207
+ end
208
+
209
+ @id = id
210
+ end
211
+
212
+ # Custom attribute writer method with validation
213
+ # @param [Object] slug Value to be assigned
214
+ def slug=(slug)
215
+ if slug.nil?
216
+ fail ArgumentError, 'slug cannot be nil'
217
+ end
218
+
219
+ @slug = slug
220
+ end
221
+
222
+ # Custom attribute writer method with validation
223
+ # @param [Object] name Value to be assigned
224
+ def name=(name)
225
+ if name.nil?
226
+ fail ArgumentError, 'name cannot be nil'
227
+ end
228
+
229
+ @name = name
230
+ end
231
+
232
+ # Custom attribute writer method with validation
233
+ # @param [Object] portal Value to be assigned
234
+ def portal=(portal)
235
+ if portal.nil?
236
+ fail ArgumentError, 'portal cannot be nil'
237
+ end
238
+
239
+ @portal = portal
240
+ end
241
+
242
+ # Custom attribute writer method with validation
243
+ # @param [Object] created_at Value to be assigned
244
+ def created_at=(created_at)
245
+ if created_at.nil?
246
+ fail ArgumentError, 'created_at cannot be nil'
247
+ end
248
+
249
+ @created_at = created_at
250
+ end
251
+
252
+ # Custom attribute writer method with validation
253
+ # @param [Object] updated_at Value to be assigned
254
+ def updated_at=(updated_at)
255
+ if updated_at.nil?
256
+ fail ArgumentError, 'updated_at cannot be nil'
257
+ end
258
+
259
+ @updated_at = updated_at
260
+ end
261
+
262
+ # Checks equality by comparing each attribute.
263
+ # @param [Object] Object to be compared
264
+ def ==(o)
265
+ return true if self.equal?(o)
266
+ self.class == o.class &&
267
+ id == o.id &&
268
+ slug == o.slug &&
269
+ name == o.name &&
270
+ is_test_from_product_id == o.is_test_from_product_id &&
271
+ logo_url == o.logo_url &&
272
+ portal == o.portal &&
273
+ created_at == o.created_at &&
274
+ updated_at == o.updated_at
275
+ end
276
+
277
+ # @see the `==` method
278
+ # @param [Object] Object to be compared
279
+ def eql?(o)
280
+ self == o
281
+ end
282
+
283
+ # Calculates hash code according to all attributes.
284
+ # @return [Integer] Hash code
285
+ def hash
286
+ [id, slug, name, is_test_from_product_id, logo_url, portal, created_at, updated_at].hash
287
+ end
288
+
289
+ # Builds the object from hash
290
+ # @param [Hash] attributes Model attributes in the form of hash
291
+ # @return [Object] Returns the model itself
292
+ def self.build_from_hash(attributes)
293
+ return nil unless attributes.is_a?(Hash)
294
+ attributes = attributes.transform_keys(&:to_sym)
295
+ # include attributes inherited from allOf parents (the nearest declaration wins)
296
+ map = acceptable_attribute_map
297
+ transformed_hash = {}
298
+ acceptable_openapi_types.each_pair do |key, type|
299
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
300
+ transformed_hash["#{key}"] = nil
301
+ elsif type =~ /\AArray<(.*)>/i
302
+ # check to ensure the input is an array given that the attribute
303
+ # is documented as an array but the input is not
304
+ if attributes[map[key]].is_a?(Array)
305
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
306
+ end
307
+ elsif !attributes[map[key]].nil?
308
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
309
+ end
310
+ end
311
+ new(transformed_hash)
312
+ end
313
+
314
+ # Returns the object in the form of hash
315
+ # @return [Hash] Returns the object in the form of hash
316
+ def to_hash
317
+ hash = {}
318
+ # include attributes inherited from allOf parents (the nearest declaration wins)
319
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
320
+ value = self.send(attr)
321
+ if value.nil?
322
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
323
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
324
+ end
325
+
326
+ hash[param] = _to_hash(value)
327
+ end
328
+ hash
329
+ end
330
+
331
+ end
332
+
333
+ end
@@ -0,0 +1,206 @@
1
+ =begin
2
+ #LicenseManager API
3
+
4
+ #Public API. Authenticate with an organization API key, or with a token scoped to a customer, license or machine on the endpoints that accept one. ## Conventions - **Errors** answer `{ \"error\": { \"code\", \"message\" } }`. Branch on `code`, which is stable, not on `message`. Each response lists the codes it can return, except `404`, which answers `not_found` unless it says otherwise. Unexpected errors answer `500` with `internal_error`. - **Validation** errors answer `422`, not `400`, with the `validation_error` code and an `issues` array giving the `path` and `message` of each invalid value. - **Unknown body fields are ignored**, not rejected: sending a field an endpoint doesn't accept, like `policyId` to `updateLicense`, changes nothing and doesn't fail. - **Strings** are trimmed before they're validated and stored. Emails are stored lower cased. - **Updates** only change the fields that are sent. A field sent as `null` is cleared, when it can be. - **Dates** can be sent with any offset, and are always returned in UTC, like `2026-01-15T09:30:00.000Z`. Calendar months and days are counted in UTC. - **Ids** are 8 letters and digits, after `test_` for test products and their resources. - **Lists** are paginated with `page` and `pageSize`. Items with the same value for the `sort` field are ordered by id, so pages are stable, but items created or deleted between two requests shift the pages. Items without a value for the `sort` field come last in ascending order, and first in descending order, unless the endpoint says otherwise. - **Test products** are sandboxes of a live product. Test API keys only reach test products, live API keys only live ones: the others answer `404`, as if they didn't exist. Sessions and tokens reach both.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.26.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module LicenseManager
17
+ class ProductList < ApiModelBase
18
+ # Items of the page, in the requested order. Empty past the last page.
19
+ attr_accessor :data
20
+
21
+ attr_accessor :pagination
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'data' => :'data',
27
+ :'pagination' => :'pagination'
28
+ }
29
+ end
30
+
31
+ # Returns attribute mapping this model knows about
32
+ def self.acceptable_attribute_map
33
+ attribute_map
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ acceptable_attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'data' => :'Array<Product>',
45
+ :'pagination' => :'Pagination'
46
+ }
47
+ end
48
+
49
+ # List of attributes with nullable: true
50
+ def self.openapi_nullable
51
+ Set.new([
52
+ ])
53
+ end
54
+
55
+ # Returns attribute type mapping
56
+ def self.acceptable_openapi_types
57
+ openapi_types
58
+ end
59
+
60
+ # Returns the nullable attributes
61
+ def self.acceptable_openapi_nullable
62
+ openapi_nullable
63
+ end
64
+
65
+ # Initializes the object
66
+ # @param [Hash] attributes Model attributes in the form of hash
67
+ def initialize(attributes = {})
68
+ if (!attributes.is_a?(Hash))
69
+ fail ArgumentError, "The input argument (attributes) must be a hash in `LicenseManager::ProductList` initialize method"
70
+ end
71
+
72
+ # check to see if the attribute exists and convert string to symbol for hash key
73
+ acceptable_attribute_map = self.class.acceptable_attribute_map
74
+ attributes = attributes.each_with_object({}) { |(k, v), h|
75
+ if (!acceptable_attribute_map.key?(k.to_sym))
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `LicenseManager::ProductList`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
77
+ end
78
+ h[k.to_sym] = v
79
+ }
80
+
81
+ if attributes.key?(:'data')
82
+ if (value = attributes[:'data']).is_a?(Array)
83
+ self.data = value
84
+ end
85
+ else
86
+ self.data = nil
87
+ end
88
+
89
+ if attributes.key?(:'pagination')
90
+ self.pagination = attributes[:'pagination']
91
+ else
92
+ self.pagination = nil
93
+ end
94
+ end
95
+
96
+ # Show invalid properties with the reasons. Usually used together with valid?
97
+ # @return Array for valid properties with the reasons
98
+ def list_invalid_properties
99
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
100
+ invalid_properties = Array.new
101
+ if @data.nil?
102
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
103
+ end
104
+
105
+ if @pagination.nil?
106
+ invalid_properties.push('invalid value for "pagination", pagination cannot be nil.')
107
+ end
108
+
109
+ invalid_properties
110
+ end
111
+
112
+ # Check to see if the all the properties in the model are valid
113
+ # @return true if the model is valid
114
+ def valid?
115
+ warn '[DEPRECATED] the `valid?` method is obsolete'
116
+ return false if @data.nil?
117
+ return false if @pagination.nil?
118
+ true
119
+ end
120
+
121
+ # Custom attribute writer method with validation
122
+ # @param [Object] data Value to be assigned
123
+ def data=(data)
124
+ if data.nil?
125
+ fail ArgumentError, 'data cannot be nil'
126
+ end
127
+
128
+ @data = data
129
+ end
130
+
131
+ # Custom attribute writer method with validation
132
+ # @param [Object] pagination Value to be assigned
133
+ def pagination=(pagination)
134
+ if pagination.nil?
135
+ fail ArgumentError, 'pagination cannot be nil'
136
+ end
137
+
138
+ @pagination = pagination
139
+ end
140
+
141
+ # Checks equality by comparing each attribute.
142
+ # @param [Object] Object to be compared
143
+ def ==(o)
144
+ return true if self.equal?(o)
145
+ self.class == o.class &&
146
+ data == o.data &&
147
+ pagination == o.pagination
148
+ end
149
+
150
+ # @see the `==` method
151
+ # @param [Object] Object to be compared
152
+ def eql?(o)
153
+ self == o
154
+ end
155
+
156
+ # Calculates hash code according to all attributes.
157
+ # @return [Integer] Hash code
158
+ def hash
159
+ [data, pagination].hash
160
+ end
161
+
162
+ # Builds the object from hash
163
+ # @param [Hash] attributes Model attributes in the form of hash
164
+ # @return [Object] Returns the model itself
165
+ def self.build_from_hash(attributes)
166
+ return nil unless attributes.is_a?(Hash)
167
+ attributes = attributes.transform_keys(&:to_sym)
168
+ # include attributes inherited from allOf parents (the nearest declaration wins)
169
+ map = acceptable_attribute_map
170
+ transformed_hash = {}
171
+ acceptable_openapi_types.each_pair do |key, type|
172
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
173
+ transformed_hash["#{key}"] = nil
174
+ elsif type =~ /\AArray<(.*)>/i
175
+ # check to ensure the input is an array given that the attribute
176
+ # is documented as an array but the input is not
177
+ if attributes[map[key]].is_a?(Array)
178
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
179
+ end
180
+ elsif !attributes[map[key]].nil?
181
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
182
+ end
183
+ end
184
+ new(transformed_hash)
185
+ end
186
+
187
+ # Returns the object in the form of hash
188
+ # @return [Hash] Returns the object in the form of hash
189
+ def to_hash
190
+ hash = {}
191
+ # include attributes inherited from allOf parents (the nearest declaration wins)
192
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
193
+ value = self.send(attr)
194
+ if value.nil?
195
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
196
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
197
+ end
198
+
199
+ hash[param] = _to_hash(value)
200
+ end
201
+ hash
202
+ end
203
+
204
+ end
205
+
206
+ end