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,400 @@
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
+ module LicenseManager
14
+ class Configuration
15
+ # Defines url scheme
16
+ attr_accessor :scheme
17
+
18
+ # Defines url host
19
+ attr_accessor :host
20
+
21
+ # Defines url base path
22
+ attr_accessor :base_path
23
+
24
+ # Define server configuration index
25
+ attr_accessor :server_index
26
+
27
+ # Define server operation configuration index
28
+ attr_accessor :server_operation_index
29
+
30
+ # Default server variables
31
+ attr_accessor :server_variables
32
+
33
+ # Default server operation variables
34
+ attr_accessor :server_operation_variables
35
+
36
+ # Defines API keys used with API Key authentications.
37
+ #
38
+ # @return [Hash] key: parameter name, value: parameter value (API key)
39
+ #
40
+ # @example parameter name is "api_key", API key is "xxx" (e.g. "api_key=xxx" in query string)
41
+ # config.api_key['api_key'] = 'xxx'
42
+ attr_accessor :api_key
43
+
44
+ # Defines API key prefixes used with API Key authentications.
45
+ #
46
+ # @return [Hash] key: parameter name, value: API key prefix
47
+ #
48
+ # @example parameter name is "Authorization", API key prefix is "Token" (e.g. "Authorization: Token xxx" in headers)
49
+ # config.api_key_prefix['api_key'] = 'Token'
50
+ attr_accessor :api_key_prefix
51
+
52
+ # Defines the username used with HTTP basic authentication.
53
+ #
54
+ # @return [String]
55
+ attr_accessor :username
56
+
57
+ # Defines the password used with HTTP basic authentication.
58
+ #
59
+ # @return [String]
60
+ attr_accessor :password
61
+
62
+ # Defines the access token (Bearer) used with OAuth2.
63
+ attr_accessor :access_token
64
+
65
+ # Defines a Proc used to fetch or refresh access tokens (Bearer) used with OAuth2.
66
+ # Overrides the access_token if set
67
+ # @return [Proc]
68
+ attr_accessor :access_token_getter
69
+
70
+ # Set this to return data as binary instead of downloading a temp file. When enabled (set to true)
71
+ # HTTP responses with return type `File` will be returned as a stream of binary data.
72
+ # Default to false.
73
+ attr_accessor :return_binary_data
74
+
75
+ # Set this to enable/disable debugging. When enabled (set to true), HTTP request/response
76
+ # details will be logged with `logger.debug` (see the `logger` attribute).
77
+ # Default to false.
78
+ #
79
+ # @return [true, false]
80
+ attr_accessor :debugging
81
+
82
+ # Set this to ignore operation servers for the API client. This is useful when you need to
83
+ # send requests to a different server than the one specified in the OpenAPI document.
84
+ # Will default to the base url defined in the spec but can be overridden by setting
85
+ # `scheme`, `host`, `base_path` directly.
86
+ # Default to false.
87
+ # @return [true, false]
88
+ attr_accessor :ignore_operation_servers
89
+
90
+ # Defines the logger used for debugging.
91
+ # Default to `Rails.logger` (when in Rails) or logging to STDOUT.
92
+ #
93
+ # @return [#debug]
94
+ attr_accessor :logger
95
+
96
+ # Defines the temporary folder to store downloaded files
97
+ # (for API endpoints that have file response).
98
+ # Default to use `Tempfile`.
99
+ #
100
+ # @return [String]
101
+ attr_accessor :temp_folder_path
102
+
103
+ # The time limit for HTTP request in seconds.
104
+ # Default to 0 (never times out).
105
+ attr_accessor :timeout
106
+
107
+ # Set this to false to skip client side validation in the operation.
108
+ # Default to true.
109
+ # @return [true, false]
110
+ attr_accessor :client_side_validation
111
+
112
+ ### TLS/SSL setting
113
+ # Set this to false to skip verifying SSL certificate when calling API from https server.
114
+ # Default to true.
115
+ #
116
+ # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.
117
+ #
118
+ # @return [true, false]
119
+ attr_accessor :ssl_verify
120
+
121
+ ### TLS/SSL setting
122
+ # Any `OpenSSL::SSL::` constant (see https://ruby-doc.org/stdlib-2.5.1/libdoc/openssl/rdoc/OpenSSL/SSL.html)
123
+ #
124
+ # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.
125
+ #
126
+ attr_accessor :ssl_verify_mode
127
+
128
+ ### TLS/SSL setting
129
+ # Set this to customize the certificate file to verify the peer.
130
+ #
131
+ # @return [String] the path to the certificate file
132
+ attr_accessor :ssl_ca_file
133
+
134
+ ### TLS/SSL setting
135
+ # Client certificate file (for client certificate)
136
+ attr_accessor :ssl_client_cert
137
+
138
+ ### TLS/SSL setting
139
+ # Client private key file (for client certificate)
140
+ attr_accessor :ssl_client_key
141
+
142
+ ### Proxy setting
143
+ # HTTP Proxy settings
144
+ attr_accessor :proxy
145
+
146
+ # Set this to customize parameters encoder of array parameter.
147
+ # Default to nil. Faraday uses NestedParamsEncoder when nil.
148
+ #
149
+ # @see The params_encoder option of Faraday. Related source code:
150
+ # https://github.com/lostisland/faraday/tree/main/lib/faraday/encoders
151
+ attr_accessor :params_encoder
152
+
153
+
154
+ attr_accessor :inject_format
155
+
156
+ attr_accessor :force_ending_format
157
+
158
+ def initialize
159
+ @scheme = 'https'
160
+ @host = 'api.licensemanager.dev'
161
+ @base_path = ''
162
+ @server_index = nil
163
+ @server_operation_index = {}
164
+ @server_variables = {}
165
+ @server_operation_variables = {}
166
+ @api_key = {}
167
+ @api_key_prefix = {}
168
+ @client_side_validation = true
169
+ @ssl_verify = true
170
+ @ssl_verify_mode = nil
171
+ @ssl_ca_file = nil
172
+ @ssl_client_cert = nil
173
+ @ssl_client_key = nil
174
+ @middlewares = Hash.new { |h, k| h[k] = [] }
175
+ @configure_connection_blocks = []
176
+ @timeout = 60
177
+ # return data as binary instead of file
178
+ @return_binary_data = false
179
+ @params_encoder = nil
180
+ @debugging = false
181
+ @ignore_operation_servers = false
182
+ @inject_format = false
183
+ @force_ending_format = false
184
+ @logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
185
+
186
+ yield(self) if block_given?
187
+ end
188
+
189
+ # The default Configuration object.
190
+ def self.default
191
+ @@default ||= Configuration.new
192
+ end
193
+
194
+ def configure
195
+ yield(self) if block_given?
196
+ end
197
+
198
+ def scheme=(scheme)
199
+ # remove :// from scheme
200
+ @scheme = scheme.sub(/:\/\//, '')
201
+ end
202
+
203
+ def host=(host)
204
+ # remove http(s):// and anything after a slash
205
+ @host = host.sub(/https?:\/\//, '').split('/').first
206
+ end
207
+
208
+ def base_path=(base_path)
209
+ # Add leading and trailing slashes to base_path
210
+ @base_path = "/#{base_path}".gsub(/\/+/, '/')
211
+ @base_path = '' if @base_path == '/'
212
+ end
213
+
214
+ # Returns base URL for specified operation based on server settings
215
+ def base_url(operation = nil)
216
+ return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if ignore_operation_servers
217
+ if operation_server_settings.key?(operation) then
218
+ index = server_operation_index.fetch(operation, server_index)
219
+ server_url(index.nil? ? 0 : index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation])
220
+ else
221
+ server_index.nil? ? "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') : server_url(server_index, server_variables, nil)
222
+ end
223
+ end
224
+
225
+ # Gets API key (with prefix if set).
226
+ # @param [String] param_name the parameter name of API key auth
227
+ def api_key_with_prefix(param_name, param_alias = nil)
228
+ key = @api_key[param_name]
229
+ key = @api_key.fetch(param_alias, key) unless param_alias.nil?
230
+ if @api_key_prefix[param_name]
231
+ "#{@api_key_prefix[param_name]} #{key}"
232
+ else
233
+ key
234
+ end
235
+ end
236
+
237
+ # Gets access_token using access_token_getter or uses the static access_token
238
+ def access_token_with_refresh
239
+ return access_token if access_token_getter.nil?
240
+ access_token_getter.call
241
+ end
242
+
243
+ # Gets Basic Auth token string
244
+ def basic_auth_token
245
+ 'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n")
246
+ end
247
+
248
+ # Returns Auth Settings hash for api client.
249
+ def auth_settings
250
+ {
251
+ 'apiKey' =>
252
+ {
253
+ type: 'api_key',
254
+ in: 'header',
255
+ key: 'x-api-key',
256
+ value: api_key_with_prefix('x-api-key')
257
+ },
258
+ 'token' =>
259
+ {
260
+ type: 'bearer',
261
+ in: 'header',
262
+ format: 'JWT',
263
+ key: 'Authorization',
264
+ value: "Bearer #{access_token_with_refresh}"
265
+ },
266
+ }
267
+ end
268
+
269
+ # Returns an array of Server setting
270
+ def server_settings
271
+ [
272
+ {
273
+ url: "https://api.licensemanager.dev",
274
+ description: "No description provided",
275
+ }
276
+ ]
277
+ end
278
+
279
+ def operation_server_settings
280
+ {
281
+ }
282
+ end
283
+
284
+ # Returns URL based on server settings
285
+ #
286
+ # @param index array index of the server settings
287
+ # @param variables hash of variable and the corresponding value
288
+ def server_url(index, variables = {}, servers = nil)
289
+ servers = server_settings if servers == nil
290
+
291
+ # check array index out of bound
292
+ if (index.nil? || index < 0 || index >= servers.size)
293
+ fail ArgumentError, "Invalid index #{index} when selecting the server. Must not be nil and must be less than #{servers.size}"
294
+ end
295
+
296
+ server = servers[index]
297
+ url = server[:url]
298
+
299
+ return url unless server.key? :variables
300
+
301
+ # go through variable and assign a value
302
+ server[:variables].each do |name, variable|
303
+ if variables.key?(name)
304
+ if (!server[:variables][name].key?(:enum_values) || server[:variables][name][:enum_values].include?(variables[name]))
305
+ url.gsub! "{" + name.to_s + "}", variables[name]
306
+ else
307
+ fail ArgumentError, "The variable `#{name}` in the server URL has invalid value #{variables[name]}. Must be #{server[:variables][name][:enum_values]}."
308
+ end
309
+ else
310
+ # use default value
311
+ url.gsub! "{" + name.to_s + "}", server[:variables][name][:default_value]
312
+ end
313
+ end
314
+
315
+ url
316
+ end
317
+
318
+ # Configure Faraday connection directly.
319
+ #
320
+ # ```
321
+ # c.configure_faraday_connection do |conn|
322
+ # conn.use Faraday::HttpCache, shared_cache: false, logger: logger
323
+ # conn.response :logger, nil, headers: true, bodies: true, log_level: :debug do |logger|
324
+ # logger.filter(/(Authorization: )(.*)/, '\1[REDACTED]')
325
+ # end
326
+ # end
327
+ #
328
+ # c.configure_faraday_connection do |conn|
329
+ # conn.adapter :typhoeus
330
+ # end
331
+ # ```
332
+ #
333
+ # @param block [Proc] `#call`able object that takes one arg, the connection
334
+ def configure_faraday_connection(&block)
335
+ @configure_connection_blocks << block
336
+ end
337
+
338
+ def configure_connection(conn)
339
+ @configure_connection_blocks.each do |block|
340
+ block.call(conn)
341
+ end
342
+ end
343
+
344
+ # Adds middleware to the stack
345
+ def use(*middleware)
346
+ set_faraday_middleware(:use, *middleware)
347
+ end
348
+
349
+ # Adds request middleware to the stack
350
+ def request(*middleware)
351
+ set_faraday_middleware(:request, *middleware)
352
+ end
353
+
354
+ # Adds response middleware to the stack
355
+ def response(*middleware)
356
+ set_faraday_middleware(:response, *middleware)
357
+ end
358
+
359
+ # Adds Faraday middleware setting information to the stack
360
+ #
361
+ # @example Use the `set_faraday_middleware` method to set middleware information
362
+ # config.set_faraday_middleware(:request, :retry, max: 3, methods: [:get, :post], retry_statuses: [503])
363
+ # config.set_faraday_middleware(:response, :logger, nil, { bodies: true, log_level: :debug })
364
+ # config.set_faraday_middleware(:use, Faraday::HttpCache, store: Rails.cache, shared_cache: false)
365
+ # config.set_faraday_middleware(:insert, 0, FaradayMiddleware::FollowRedirects, { standards_compliant: true, limit: 1 })
366
+ # config.set_faraday_middleware(:swap, 0, Faraday::Response::Logger)
367
+ # config.set_faraday_middleware(:delete, Faraday::Multipart::Middleware)
368
+ #
369
+ # @see https://github.com/lostisland/faraday/blob/v2.3.0/lib/faraday/rack_builder.rb#L92-L143
370
+ def set_faraday_middleware(operation, key, *args, &block)
371
+ unless [:request, :response, :use, :insert, :insert_before, :insert_after, :swap, :delete].include?(operation)
372
+ fail ArgumentError, "Invalid faraday middleware operation #{operation}. Must be" \
373
+ " :request, :response, :use, :insert, :insert_before, :insert_after, :swap or :delete."
374
+ end
375
+
376
+ @middlewares[operation] << [key, args, block]
377
+ end
378
+ ruby2_keywords(:set_faraday_middleware) if respond_to?(:ruby2_keywords, true)
379
+
380
+ # Set up middleware on the connection
381
+ def configure_middleware(connection)
382
+ return if @middlewares.empty?
383
+
384
+ [:request, :response, :use, :insert, :insert_before, :insert_after, :swap].each do |operation|
385
+ next unless @middlewares.key?(operation)
386
+
387
+ @middlewares[operation].each do |key, args, block|
388
+ connection.builder.send(operation, key, *args, &block)
389
+ end
390
+ end
391
+
392
+ if @middlewares.key?(:delete)
393
+ @middlewares[:delete].each do |key, _args, _block|
394
+ connection.builder.delete(key)
395
+ end
396
+ end
397
+ end
398
+
399
+ end
400
+ end
@@ -0,0 +1,187 @@
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 ConnectStripe < ApiModelBase
18
+ # Restricted API key of the Stripe account (`rk_live_…` for live products, `rk_test_…` for test products), with the `requiredPermissions` of `getStripeIntegration`. A secret key works too, but gives the app more access than it needs.
19
+ attr_accessor :api_key
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'api_key' => :'apiKey'
25
+ }
26
+ end
27
+
28
+ # Returns attribute mapping this model knows about
29
+ def self.acceptable_attribute_map
30
+ attribute_map
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ acceptable_attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'api_key' => :'String'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Returns attribute type mapping
52
+ def self.acceptable_openapi_types
53
+ openapi_types
54
+ end
55
+
56
+ # Returns the nullable attributes
57
+ def self.acceptable_openapi_nullable
58
+ openapi_nullable
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `LicenseManager::ConnectStripe` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ acceptable_attribute_map = self.class.acceptable_attribute_map
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!acceptable_attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `LicenseManager::ConnectStripe`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
73
+ end
74
+ h[k.to_sym] = v
75
+ }
76
+
77
+ if attributes.key?(:'api_key')
78
+ self.api_key = attributes[:'api_key']
79
+ else
80
+ self.api_key = nil
81
+ end
82
+ end
83
+
84
+ # Show invalid properties with the reasons. Usually used together with valid?
85
+ # @return Array for valid properties with the reasons
86
+ def list_invalid_properties
87
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
88
+ invalid_properties = Array.new
89
+ if @api_key.nil?
90
+ invalid_properties.push('invalid value for "api_key", api_key cannot be nil.')
91
+ end
92
+
93
+ if @api_key.to_s.length < 1
94
+ invalid_properties.push('invalid value for "api_key", the character length must be greater than or equal to 1.')
95
+ end
96
+
97
+ invalid_properties
98
+ end
99
+
100
+ # Check to see if the all the properties in the model are valid
101
+ # @return true if the model is valid
102
+ def valid?
103
+ warn '[DEPRECATED] the `valid?` method is obsolete'
104
+ return false if @api_key.nil?
105
+ return false if @api_key.to_s.length < 1
106
+ true
107
+ end
108
+
109
+ # Custom attribute writer method with validation
110
+ # @param [Object] api_key Value to be assigned
111
+ def api_key=(api_key)
112
+ if api_key.nil?
113
+ fail ArgumentError, 'api_key cannot be nil'
114
+ end
115
+
116
+ if api_key.to_s.length < 1
117
+ fail ArgumentError, 'invalid value for "api_key", the character length must be greater than or equal to 1.'
118
+ end
119
+
120
+ @api_key = api_key
121
+ end
122
+
123
+ # Checks equality by comparing each attribute.
124
+ # @param [Object] Object to be compared
125
+ def ==(o)
126
+ return true if self.equal?(o)
127
+ self.class == o.class &&
128
+ api_key == o.api_key
129
+ end
130
+
131
+ # @see the `==` method
132
+ # @param [Object] Object to be compared
133
+ def eql?(o)
134
+ self == o
135
+ end
136
+
137
+ # Calculates hash code according to all attributes.
138
+ # @return [Integer] Hash code
139
+ def hash
140
+ [api_key].hash
141
+ end
142
+
143
+ # Builds the object from hash
144
+ # @param [Hash] attributes Model attributes in the form of hash
145
+ # @return [Object] Returns the model itself
146
+ def self.build_from_hash(attributes)
147
+ return nil unless attributes.is_a?(Hash)
148
+ attributes = attributes.transform_keys(&:to_sym)
149
+ # include attributes inherited from allOf parents (the nearest declaration wins)
150
+ map = acceptable_attribute_map
151
+ transformed_hash = {}
152
+ acceptable_openapi_types.each_pair do |key, type|
153
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
154
+ transformed_hash["#{key}"] = nil
155
+ elsif type =~ /\AArray<(.*)>/i
156
+ # check to ensure the input is an array given that the attribute
157
+ # is documented as an array but the input is not
158
+ if attributes[map[key]].is_a?(Array)
159
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
160
+ end
161
+ elsif !attributes[map[key]].nil?
162
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
163
+ end
164
+ end
165
+ new(transformed_hash)
166
+ end
167
+
168
+ # Returns the object in the form of hash
169
+ # @return [Hash] Returns the object in the form of hash
170
+ def to_hash
171
+ hash = {}
172
+ # include attributes inherited from allOf parents (the nearest declaration wins)
173
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
174
+ value = self.send(attr)
175
+ if value.nil?
176
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
177
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
178
+ end
179
+
180
+ hash[param] = _to_hash(value)
181
+ end
182
+ hash
183
+ end
184
+
185
+ end
186
+
187
+ end