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,388 @@
1
+ # LicenseManager::PoliciesApi
2
+
3
+ All URIs are relative to *https://api.licensemanager.dev*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**create_policy**](PoliciesApi.md#create_policy) | **POST** /v1/products/{productId}/policies | Create a policy |
8
+ | [**delete_policy**](PoliciesApi.md#delete_policy) | **DELETE** /v1/policies/{id} | Delete a policy |
9
+ | [**get_policy**](PoliciesApi.md#get_policy) | **GET** /v1/policies/{id} | Get a policy |
10
+ | [**list_policies**](PoliciesApi.md#list_policies) | **GET** /v1/products/{productId}/policies | List the policies of a product |
11
+ | [**update_policy**](PoliciesApi.md#update_policy) | **PATCH** /v1/policies/{id} | Update a policy |
12
+
13
+
14
+ ## create_policy
15
+
16
+ > <Policy> create_policy(product_id, create_policy)
17
+
18
+ Create a policy
19
+
20
+ Without a `slug`, the policy gets one derived from its name, made unique within the product by appending a dash and 3 random lowercase letters or digits when needed. An explicit `slug` is used as is: the request fails with a `409` when it's taken. With `isDefault: true`, the new policy replaces the product's current default policy. A product always has a default policy, so when it has no policies the new one becomes the default: the request fails with a `409` when `isDefault` is `false`. **Required role permission**: `policy:create` when called with a session, granted by the member's role. API keys aren't limited by roles.
21
+
22
+ ### Examples
23
+
24
+ ```ruby
25
+ require 'time'
26
+ require 'license_manager'
27
+ # setup authorization
28
+ LicenseManager.configure do |config|
29
+ # Configure API key authorization: apiKey
30
+ config.api_key['x-api-key'] = 'YOUR API KEY'
31
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
32
+ # config.api_key_prefix['x-api-key'] = 'Bearer'
33
+ end
34
+
35
+ api_instance = LicenseManager::PoliciesApi.new
36
+ product_id = 'x7Kp2QaZ' # String |
37
+ create_policy = LicenseManager::CreatePolicy.new({name: 'Yearly'}) # CreatePolicy |
38
+
39
+ begin
40
+ # Create a policy
41
+ result = api_instance.create_policy(product_id, create_policy)
42
+ p result
43
+ rescue LicenseManager::ApiError => e
44
+ puts "Error when calling PoliciesApi->create_policy: #{e}"
45
+ end
46
+ ```
47
+
48
+ #### Using the create_policy_with_http_info variant
49
+
50
+ This returns an Array which contains the response data, status code and headers.
51
+
52
+ > <Array(<Policy>, Integer, Hash)> create_policy_with_http_info(product_id, create_policy)
53
+
54
+ ```ruby
55
+ begin
56
+ # Create a policy
57
+ data, status_code, headers = api_instance.create_policy_with_http_info(product_id, create_policy)
58
+ p status_code # => 2xx
59
+ p headers # => { ... }
60
+ p data # => <Policy>
61
+ rescue LicenseManager::ApiError => e
62
+ puts "Error when calling PoliciesApi->create_policy_with_http_info: #{e}"
63
+ end
64
+ ```
65
+
66
+ ### Parameters
67
+
68
+ | Name | Type | Description | Notes |
69
+ | ---- | ---- | ----------- | ----- |
70
+ | **product_id** | **String** | | |
71
+ | **create_policy** | [**CreatePolicy**](CreatePolicy.md) | | |
72
+
73
+ ### Return type
74
+
75
+ [**Policy**](Policy.md)
76
+
77
+ ### Authorization
78
+
79
+ [apiKey](../README.md#apiKey)
80
+
81
+ ### HTTP request headers
82
+
83
+ - **Content-Type**: application/json
84
+ - **Accept**: application/json
85
+
86
+
87
+ ## delete_policy
88
+
89
+ > delete_policy(id)
90
+
91
+ Delete a policy
92
+
93
+ Deleting the default policy makes the oldest remaining policy of the product the default. The last policy of a product can't be deleted, nor a policy that licenses follow. Its events can no longer be listed. **Required role permission**: `policy:delete` when called with a session, granted by the member's role. API keys aren't limited by roles.
94
+
95
+ ### Examples
96
+
97
+ ```ruby
98
+ require 'time'
99
+ require 'license_manager'
100
+ # setup authorization
101
+ LicenseManager.configure do |config|
102
+ # Configure API key authorization: apiKey
103
+ config.api_key['x-api-key'] = 'YOUR API KEY'
104
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
105
+ # config.api_key_prefix['x-api-key'] = 'Bearer'
106
+ end
107
+
108
+ api_instance = LicenseManager::PoliciesApi.new
109
+ id = 'p4Rt8LmQ' # String |
110
+
111
+ begin
112
+ # Delete a policy
113
+ api_instance.delete_policy(id)
114
+ rescue LicenseManager::ApiError => e
115
+ puts "Error when calling PoliciesApi->delete_policy: #{e}"
116
+ end
117
+ ```
118
+
119
+ #### Using the delete_policy_with_http_info variant
120
+
121
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
122
+
123
+ > <Array(nil, Integer, Hash)> delete_policy_with_http_info(id)
124
+
125
+ ```ruby
126
+ begin
127
+ # Delete a policy
128
+ data, status_code, headers = api_instance.delete_policy_with_http_info(id)
129
+ p status_code # => 2xx
130
+ p headers # => { ... }
131
+ p data # => nil
132
+ rescue LicenseManager::ApiError => e
133
+ puts "Error when calling PoliciesApi->delete_policy_with_http_info: #{e}"
134
+ end
135
+ ```
136
+
137
+ ### Parameters
138
+
139
+ | Name | Type | Description | Notes |
140
+ | ---- | ---- | ----------- | ----- |
141
+ | **id** | **String** | | |
142
+
143
+ ### Return type
144
+
145
+ nil (empty response body)
146
+
147
+ ### Authorization
148
+
149
+ [apiKey](../README.md#apiKey)
150
+
151
+ ### HTTP request headers
152
+
153
+ - **Content-Type**: Not defined
154
+ - **Accept**: application/json
155
+
156
+
157
+ ## get_policy
158
+
159
+ > <Policy> get_policy(id)
160
+
161
+ Get a policy
162
+
163
+ ### Examples
164
+
165
+ ```ruby
166
+ require 'time'
167
+ require 'license_manager'
168
+ # setup authorization
169
+ LicenseManager.configure do |config|
170
+ # Configure API key authorization: apiKey
171
+ config.api_key['x-api-key'] = 'YOUR API KEY'
172
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
173
+ # config.api_key_prefix['x-api-key'] = 'Bearer'
174
+ end
175
+
176
+ api_instance = LicenseManager::PoliciesApi.new
177
+ id = 'p4Rt8LmQ' # String |
178
+
179
+ begin
180
+ # Get a policy
181
+ result = api_instance.get_policy(id)
182
+ p result
183
+ rescue LicenseManager::ApiError => e
184
+ puts "Error when calling PoliciesApi->get_policy: #{e}"
185
+ end
186
+ ```
187
+
188
+ #### Using the get_policy_with_http_info variant
189
+
190
+ This returns an Array which contains the response data, status code and headers.
191
+
192
+ > <Array(<Policy>, Integer, Hash)> get_policy_with_http_info(id)
193
+
194
+ ```ruby
195
+ begin
196
+ # Get a policy
197
+ data, status_code, headers = api_instance.get_policy_with_http_info(id)
198
+ p status_code # => 2xx
199
+ p headers # => { ... }
200
+ p data # => <Policy>
201
+ rescue LicenseManager::ApiError => e
202
+ puts "Error when calling PoliciesApi->get_policy_with_http_info: #{e}"
203
+ end
204
+ ```
205
+
206
+ ### Parameters
207
+
208
+ | Name | Type | Description | Notes |
209
+ | ---- | ---- | ----------- | ----- |
210
+ | **id** | **String** | | |
211
+
212
+ ### Return type
213
+
214
+ [**Policy**](Policy.md)
215
+
216
+ ### Authorization
217
+
218
+ [apiKey](../README.md#apiKey)
219
+
220
+ ### HTTP request headers
221
+
222
+ - **Content-Type**: Not defined
223
+ - **Accept**: application/json
224
+
225
+
226
+ ## list_policies
227
+
228
+ > <PolicyList> list_policies(product_id, opts)
229
+
230
+ List the policies of a product
231
+
232
+ `?isDefault=true` returns the product's default policy alone: a product always has exactly one. Sorting by `duration` counts months for their average length, about 30.4 days.
233
+
234
+ ### Examples
235
+
236
+ ```ruby
237
+ require 'time'
238
+ require 'license_manager'
239
+ # setup authorization
240
+ LicenseManager.configure do |config|
241
+ # Configure API key authorization: apiKey
242
+ config.api_key['x-api-key'] = 'YOUR API KEY'
243
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
244
+ # config.api_key_prefix['x-api-key'] = 'Bearer'
245
+ end
246
+
247
+ api_instance = LicenseManager::PoliciesApi.new
248
+ product_id = 'x7Kp2QaZ' # String |
249
+ opts = {
250
+ page: 1, # Integer | Page to return. Pages are numbered from 1: `1` is the first page. A page past the last one returns an empty `data`, not an error. Defaults to `1`.
251
+ page_size: 20, # Integer | Maximum number of items per page, from 1 to 100. Every page holds this many items except the last one, which can hold fewer. Defaults to `20`.
252
+ sort: 'name', # String | Field to sort by, prefixed with `-` for descending order. Defaults to `name`.
253
+ search: 'pro', # String | Case-insensitive text the name or slug contains.
254
+ slug: 'yearly', # String | Only returns the policy with this exact slug.
255
+ is_default: 'true', # String | `true` only returns the product's default policy, `false` only the other ones.
256
+ license_count: 1, # Integer | Only returns the policies followed by exactly this number of licenses.
257
+ license_count_min: 1, # Integer | Only returns the policies followed by at least this number of licenses.
258
+ license_count_max: 1 # Integer | Only returns the policies followed by at most this number of licenses.
259
+ }
260
+
261
+ begin
262
+ # List the policies of a product
263
+ result = api_instance.list_policies(product_id, opts)
264
+ p result
265
+ rescue LicenseManager::ApiError => e
266
+ puts "Error when calling PoliciesApi->list_policies: #{e}"
267
+ end
268
+ ```
269
+
270
+ #### Using the list_policies_with_http_info variant
271
+
272
+ This returns an Array which contains the response data, status code and headers.
273
+
274
+ > <Array(<PolicyList>, Integer, Hash)> list_policies_with_http_info(product_id, opts)
275
+
276
+ ```ruby
277
+ begin
278
+ # List the policies of a product
279
+ data, status_code, headers = api_instance.list_policies_with_http_info(product_id, opts)
280
+ p status_code # => 2xx
281
+ p headers # => { ... }
282
+ p data # => <PolicyList>
283
+ rescue LicenseManager::ApiError => e
284
+ puts "Error when calling PoliciesApi->list_policies_with_http_info: #{e}"
285
+ end
286
+ ```
287
+
288
+ ### Parameters
289
+
290
+ | Name | Type | Description | Notes |
291
+ | ---- | ---- | ----------- | ----- |
292
+ | **product_id** | **String** | | |
293
+ | **page** | **Integer** | Page to return. Pages are numbered from 1: &#x60;1&#x60; is the first page. A page past the last one returns an empty &#x60;data&#x60;, not an error. Defaults to &#x60;1&#x60;. | [optional][default to 1] |
294
+ | **page_size** | **Integer** | Maximum number of items per page, from 1 to 100. Every page holds this many items except the last one, which can hold fewer. Defaults to &#x60;20&#x60;. | [optional][default to 20] |
295
+ | **sort** | **String** | Field to sort by, prefixed with &#x60;-&#x60; for descending order. Defaults to &#x60;name&#x60;. | [optional][default to &#39;name&#39;] |
296
+ | **search** | **String** | Case-insensitive text the name or slug contains. | [optional] |
297
+ | **slug** | **String** | Only returns the policy with this exact slug. | [optional] |
298
+ | **is_default** | **String** | &#x60;true&#x60; only returns the product&#39;s default policy, &#x60;false&#x60; only the other ones. | [optional] |
299
+ | **license_count** | **Integer** | Only returns the policies followed by exactly this number of licenses. | [optional] |
300
+ | **license_count_min** | **Integer** | Only returns the policies followed by at least this number of licenses. | [optional] |
301
+ | **license_count_max** | **Integer** | Only returns the policies followed by at most this number of licenses. | [optional] |
302
+
303
+ ### Return type
304
+
305
+ [**PolicyList**](PolicyList.md)
306
+
307
+ ### Authorization
308
+
309
+ [apiKey](../README.md#apiKey)
310
+
311
+ ### HTTP request headers
312
+
313
+ - **Content-Type**: Not defined
314
+ - **Accept**: application/json
315
+
316
+
317
+ ## update_policy
318
+
319
+ > <Policy> update_policy(id, update_policy)
320
+
321
+ Update a policy
322
+
323
+ `isDefault: true` makes the policy the product's default, in place of the current one. A product always has a default policy, so the default can't be unset with `isDefault: false`: make another policy the default instead. Licenses copy the settings of their policy when they're created, so changing them only affects the licenses created afterwards: update the existing licenses to change theirs. **Required role permission**: `policy:update` when called with a session, granted by the member's role. API keys aren't limited by roles.
324
+
325
+ ### Examples
326
+
327
+ ```ruby
328
+ require 'time'
329
+ require 'license_manager'
330
+ # setup authorization
331
+ LicenseManager.configure do |config|
332
+ # Configure API key authorization: apiKey
333
+ config.api_key['x-api-key'] = 'YOUR API KEY'
334
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
335
+ # config.api_key_prefix['x-api-key'] = 'Bearer'
336
+ end
337
+
338
+ api_instance = LicenseManager::PoliciesApi.new
339
+ id = 'p4Rt8LmQ' # String |
340
+ update_policy = LicenseManager::UpdatePolicy.new # UpdatePolicy |
341
+
342
+ begin
343
+ # Update a policy
344
+ result = api_instance.update_policy(id, update_policy)
345
+ p result
346
+ rescue LicenseManager::ApiError => e
347
+ puts "Error when calling PoliciesApi->update_policy: #{e}"
348
+ end
349
+ ```
350
+
351
+ #### Using the update_policy_with_http_info variant
352
+
353
+ This returns an Array which contains the response data, status code and headers.
354
+
355
+ > <Array(<Policy>, Integer, Hash)> update_policy_with_http_info(id, update_policy)
356
+
357
+ ```ruby
358
+ begin
359
+ # Update a policy
360
+ data, status_code, headers = api_instance.update_policy_with_http_info(id, update_policy)
361
+ p status_code # => 2xx
362
+ p headers # => { ... }
363
+ p data # => <Policy>
364
+ rescue LicenseManager::ApiError => e
365
+ puts "Error when calling PoliciesApi->update_policy_with_http_info: #{e}"
366
+ end
367
+ ```
368
+
369
+ ### Parameters
370
+
371
+ | Name | Type | Description | Notes |
372
+ | ---- | ---- | ----------- | ----- |
373
+ | **id** | **String** | | |
374
+ | **update_policy** | [**UpdatePolicy**](UpdatePolicy.md) | | |
375
+
376
+ ### Return type
377
+
378
+ [**Policy**](Policy.md)
379
+
380
+ ### Authorization
381
+
382
+ [apiKey](../README.md#apiKey)
383
+
384
+ ### HTTP request headers
385
+
386
+ - **Content-Type**: application/json
387
+ - **Accept**: application/json
388
+
data/docs/Policy.md ADDED
@@ -0,0 +1,40 @@
1
+ # LicenseManager::Policy
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | |
8
+ | **product_id** | **String** | | |
9
+ | **slug** | **String** | | |
10
+ | **name** | **String** | | |
11
+ | **is_default** | **Boolean** | Whether this is the product&#39;s default policy. Each product has exactly one. | |
12
+ | **duration** | [**PolicyDuration**](PolicyDuration.md) | | |
13
+ | **max_machines** | **Integer** | Maximum number of active machines of the licenses created with this policy. &#x60;null&#x60; when there&#39;s no limit. | |
14
+ | **max_offline_duration_seconds** | **Integer** | Longest the applications can run offline with the licenses created with this policy, in seconds. | |
15
+ | **max_version** | [**PolicyMaxVersion**](PolicyMaxVersion.md) | | |
16
+ | **license_count** | **Integer** | Number of licenses following this policy. | |
17
+ | **created_at** | **Time** | | |
18
+ | **updated_at** | **Time** | | |
19
+
20
+ ## Example
21
+
22
+ ```ruby
23
+ require 'license_manager'
24
+
25
+ instance = LicenseManager::Policy.new(
26
+ id: p4Rt8LmQ,
27
+ product_id: x7Kp2QaZ,
28
+ slug: yearly,
29
+ name: Yearly,
30
+ is_default: false,
31
+ duration: null,
32
+ max_machines: 3,
33
+ max_offline_duration_seconds: 604800,
34
+ max_version: null,
35
+ license_count: 12,
36
+ created_at: 2026-01-15T09:30:00.000Z,
37
+ updated_at: 2026-01-15T09:30:00.000Z
38
+ )
39
+ ```
40
+
@@ -0,0 +1,20 @@
1
+ # LicenseManager::PolicyDuration
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **value** | **Integer** | | |
8
+ | **unit** | **String** | Calendar months: a license created on January 31 with a 1 month duration expires on the last day of February. | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'license_manager'
14
+
15
+ instance = LicenseManager::PolicyDuration.new(
16
+ value: 12,
17
+ unit: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,20 @@
1
+ # LicenseManager::PolicyList
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**Array&lt;Policy&gt;**](Policy.md) | Items of the page, in the requested order. Empty past the last page. | |
8
+ | **pagination** | [**Pagination**](Pagination.md) | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'license_manager'
14
+
15
+ instance = LicenseManager::PolicyList.new(
16
+ data: null,
17
+ pagination: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,24 @@
1
+ # LicenseManager::PolicyMaxVersion
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **type** | **String** | | |
8
+ | **version** | **String** | &#x60;\&quot;2\&quot;&#x60; allows every 2.y.z version: the minor versions and bug fixes of version 2. &#x60;\&quot;2.3\&quot;&#x60; allows every 2.3.z version: the bug fixes of version 2.3. Bug fixes can&#39;t be locked, so patch numbers like &#x60;\&quot;2.3.1\&quot;&#x60; are rejected. | |
9
+ | **major_after** | [**LockMaxVersionMajorAfter**](LockMaxVersionMajorAfter.md) | | |
10
+ | **minor_after** | [**LockMaxVersionMinorAfter**](LockMaxVersionMinorAfter.md) | | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'license_manager'
16
+
17
+ instance = LicenseManager::PolicyMaxVersion.new(
18
+ type: null,
19
+ version: 2.3,
20
+ major_after: null,
21
+ minor_after: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,24 @@
1
+ # LicenseManager::PolicySettings
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **duration** | [**PolicySettingsDuration**](PolicySettingsDuration.md) | | [optional] |
8
+ | **max_machines** | **Integer** | Maximum number of active machines of the licenses created with this policy, copied to each of them. &#x60;null&#x60; for no limit. Defaults to &#x60;null&#x60;. | [optional] |
9
+ | **max_offline_duration_seconds** | **Integer** | Longest the applications can run offline with the licenses created with this policy, in seconds, copied to each of them. At least one hour (&#x60;3600&#x60;). Defaults to one week. | [optional] |
10
+ | **max_version** | [**PolicySettingsMaxVersion**](PolicySettingsMaxVersion.md) | | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'license_manager'
16
+
17
+ instance = LicenseManager::PolicySettings.new(
18
+ duration: null,
19
+ max_machines: 3,
20
+ max_offline_duration_seconds: 604800,
21
+ max_version: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,20 @@
1
+ # LicenseManager::PolicySettingsDuration
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **value** | **Integer** | | |
8
+ | **unit** | **String** | Calendar months: a license created on January 31 with a 1 month duration expires on the last day of February. | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'license_manager'
14
+
15
+ instance = LicenseManager::PolicySettingsDuration.new(
16
+ value: 12,
17
+ unit: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,20 @@
1
+ # LicenseManager::PolicySettingsDurationAnyOf
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **value** | **Integer** | | |
8
+ | **unit** | **String** | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'license_manager'
14
+
15
+ instance = LicenseManager::PolicySettingsDurationAnyOf.new(
16
+ value: 86400,
17
+ unit: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,20 @@
1
+ # LicenseManager::PolicySettingsDurationAnyOf1
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **value** | **Integer** | | |
8
+ | **unit** | **String** | Calendar months: a license created on January 31 with a 1 month duration expires on the last day of February. | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'license_manager'
14
+
15
+ instance = LicenseManager::PolicySettingsDurationAnyOf1.new(
16
+ value: 12,
17
+ unit: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,24 @@
1
+ # LicenseManager::PolicySettingsMaxVersion
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **type** | **String** | | |
8
+ | **version** | **String** | &#x60;\&quot;2\&quot;&#x60; allows every 2.y.z version: the minor versions and bug fixes of version 2. &#x60;\&quot;2.3\&quot;&#x60; allows every 2.3.z version: the bug fixes of version 2.3. Bug fixes can&#39;t be locked, so patch numbers like &#x60;\&quot;2.3.1\&quot;&#x60; are rejected. | |
9
+ | **major_after** | [**LockMaxVersionMajorAfter**](LockMaxVersionMajorAfter.md) | | |
10
+ | **minor_after** | [**LockMaxVersionMinorAfter**](LockMaxVersionMinorAfter.md) | | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'license_manager'
16
+
17
+ instance = LicenseManager::PolicySettingsMaxVersion.new(
18
+ type: null,
19
+ version: 2.3,
20
+ major_after: null,
21
+ minor_after: null
22
+ )
23
+ ```
24
+
data/docs/Portal.md ADDED
@@ -0,0 +1,30 @@
1
+ # LicenseManager::Portal
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **product_id** | **String** | | |
8
+ | **product_name** | **String** | | |
9
+ | **organization_name** | **String** | | |
10
+ | **logo_url** | **String** | Public URL of the product&#39;s logo. &#x60;null&#x60; without a logo. | |
11
+ | **brand_color** | **String** | Background of the side panel, as &#x60;#rrggbb&#x60;. &#x60;null&#x60; for the default color. | |
12
+ | **accent_color** | **String** | Color of the inputs and buttons, as &#x60;#rrggbb&#x60;. &#x60;null&#x60; for the default color. | |
13
+ | **return_url** | **String** | Link back to the product&#39;s website: the requested &#x60;returnUrl&#x60; when its domain is allowed, the product&#39;s default return link otherwise. &#x60;null&#x60; for no link. | |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'license_manager'
19
+
20
+ instance = LicenseManager::Portal.new(
21
+ product_id: x7Kp2QaZ,
22
+ product_name: Acme Pro,
23
+ organization_name: Acme,
24
+ logo_url: https://cdn.example.com/logos/x7Kp2QaZ/k3f9a2LpQ7xw.webp,
25
+ brand_color: #1e3a8a,
26
+ accent_color: #2563eb,
27
+ return_url: https://example.com/account
28
+ )
29
+ ```
30
+