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.
- checksums.yaml +7 -0
- data/CHANGELOG.md +5 -0
- data/Gemfile +9 -0
- data/LICENSE +201 -0
- data/README.md +96 -0
- data/Rakefile +10 -0
- data/docs/ConnectStripe.md +18 -0
- data/docs/CreateCustomer.md +20 -0
- data/docs/CreateIntegrationMapping.md +20 -0
- data/docs/CreateLicense.md +36 -0
- data/docs/CreatePolicy.md +30 -0
- data/docs/CreatePortalLink.md +18 -0
- data/docs/CreateProduct.md +20 -0
- data/docs/CreateProductWithPolicy.md +24 -0
- data/docs/CreateRelease.md +20 -0
- data/docs/CreateToken.md +20 -0
- data/docs/Customer.md +30 -0
- data/docs/CustomerList.md +20 -0
- data/docs/CustomersApi.md +385 -0
- data/docs/Error.md +18 -0
- data/docs/ErrorError.md +22 -0
- data/docs/ErrorErrorIssuesInner.md +20 -0
- data/docs/ErrorErrorIssuesInnerPathInner.md +15 -0
- data/docs/Event.md +34 -0
- data/docs/EventActor.md +55 -0
- data/docs/EventActorOneOf.md +26 -0
- data/docs/EventActorOneOf1.md +24 -0
- data/docs/EventActorOneOf2.md +22 -0
- data/docs/EventActorOneOf3.md +18 -0
- data/docs/EventActorOneOf4.md +22 -0
- data/docs/EventList.md +20 -0
- data/docs/EventMachine.md +22 -0
- data/docs/EventType.md +15 -0
- data/docs/EventsApi.md +173 -0
- data/docs/FixedMaxVersion.md +20 -0
- data/docs/Integration.md +38 -0
- data/docs/IntegrationMapping.md +38 -0
- data/docs/IntegrationStatus.md +15 -0
- data/docs/IntegrationsApi.md +587 -0
- data/docs/License.md +50 -0
- data/docs/LicenseList.md +20 -0
- data/docs/LicenseMaxVersion.md +22 -0
- data/docs/LicenseMaxVersionInput.md +22 -0
- data/docs/LicenseStats.md +26 -0
- data/docs/LicenseStatsActivationsByMachineInner.md +24 -0
- data/docs/LicenseStatsActivationsByVersionInner.md +20 -0
- data/docs/LicenseStatus.md +15 -0
- data/docs/LicenseToken.md +18 -0
- data/docs/LicensesApi.md +817 -0
- data/docs/ListPolicyEventsTypeParameter.md +15 -0
- data/docs/ListStripePrices200Response.md +18 -0
- data/docs/LockMaxVersion.md +22 -0
- data/docs/LockMaxVersionMajorAfter.md +49 -0
- data/docs/LockMaxVersionMajorAfterOneOf.md +20 -0
- data/docs/LockMaxVersionMajorAfterOneOf1.md +20 -0
- data/docs/LockMaxVersionMinorAfter.md +20 -0
- data/docs/Machine.md +36 -0
- data/docs/MachineList.md +20 -0
- data/docs/MachinesApi.md +246 -0
- data/docs/Pagination.md +24 -0
- data/docs/PoliciesApi.md +388 -0
- data/docs/Policy.md +40 -0
- data/docs/PolicyDuration.md +20 -0
- data/docs/PolicyList.md +20 -0
- data/docs/PolicyMaxVersion.md +24 -0
- data/docs/PolicySettings.md +24 -0
- data/docs/PolicySettingsDuration.md +20 -0
- data/docs/PolicySettingsDurationAnyOf.md +20 -0
- data/docs/PolicySettingsDurationAnyOf1.md +20 -0
- data/docs/PolicySettingsMaxVersion.md +24 -0
- data/docs/Portal.md +30 -0
- data/docs/PortalApi.md +289 -0
- data/docs/PortalLink.md +22 -0
- data/docs/PortalNotFound.md +22 -0
- data/docs/PortalSettings.md +26 -0
- data/docs/Price.md +20 -0
- data/docs/PriceInput.md +20 -0
- data/docs/Product.md +32 -0
- data/docs/ProductList.md +20 -0
- data/docs/ProductStats.md +54 -0
- data/docs/ProductStatsActivationsByVersionInner.md +20 -0
- data/docs/ProductStatsActiveMachinesByPlatformInner.md +20 -0
- data/docs/ProductStatsActiveMachinesByVersionInner.md +20 -0
- data/docs/ProductStatsNewLicensesByPolicyInner.md +22 -0
- data/docs/ProductsApi.md +666 -0
- data/docs/Release.md +28 -0
- data/docs/ReleaseList.md +20 -0
- data/docs/ReleasesApi.md +388 -0
- data/docs/RequestPortalLink.md +20 -0
- data/docs/Revenue.md +34 -0
- data/docs/SendLicenseKeys.md +18 -0
- data/docs/SendPortalLink.md +18 -0
- data/docs/SigningKey.md +27 -0
- data/docs/StripeIntegration.md +26 -0
- data/docs/StripePermission.md +22 -0
- data/docs/StripePrice.md +28 -0
- data/docs/Token.md +24 -0
- data/docs/TokensApi.md +235 -0
- data/docs/UpdateCustomer.md +20 -0
- data/docs/UpdateIntegrationMapping.md +18 -0
- data/docs/UpdateLicense.md +28 -0
- data/docs/UpdatePolicy.md +30 -0
- data/docs/UpdateProduct.md +22 -0
- data/docs/UpdateProductPortal.md +26 -0
- data/docs/UpdateRelease.md +20 -0
- data/docs/ValidateKey.md +26 -0
- data/docs/ValidateKeyError.md +18 -0
- data/docs/ValidateKeyErrorError.md +24 -0
- data/git_push.sh +54 -0
- data/lib/license_manager/api/customers_api.rb +398 -0
- data/lib/license_manager/api/events_api.rb +207 -0
- data/lib/license_manager/api/integrations_api.rb +559 -0
- data/lib/license_manager/api/licenses_api.rb +885 -0
- data/lib/license_manager/api/machines_api.rb +257 -0
- data/lib/license_manager/api/policies_api.rb +412 -0
- data/lib/license_manager/api/portal_api.rb +310 -0
- data/lib/license_manager/api/products_api.rb +653 -0
- data/lib/license_manager/api/releases_api.rb +408 -0
- data/lib/license_manager/api/tokens_api.rb +244 -0
- data/lib/license_manager/api_client.rb +441 -0
- data/lib/license_manager/api_error.rb +58 -0
- data/lib/license_manager/api_model_base.rb +88 -0
- data/lib/license_manager/configuration.rb +400 -0
- data/lib/license_manager/models/connect_stripe.rb +187 -0
- data/lib/license_manager/models/create_customer.rb +222 -0
- data/lib/license_manager/models/create_integration_mapping.rb +222 -0
- data/lib/license_manager/models/create_license.rb +361 -0
- data/lib/license_manager/models/create_policy.rb +347 -0
- data/lib/license_manager/models/create_portal_link.rb +196 -0
- data/lib/license_manager/models/create_product.rb +244 -0
- data/lib/license_manager/models/create_product_with_policy.rb +270 -0
- data/lib/license_manager/models/create_release.rb +208 -0
- data/lib/license_manager/models/create_token.rb +237 -0
- data/lib/license_manager/models/customer.rb +308 -0
- data/lib/license_manager/models/customer_list.rb +206 -0
- data/lib/license_manager/models/error.rb +177 -0
- data/lib/license_manager/models/error_error.rb +215 -0
- data/lib/license_manager/models/error_error_issues_inner.rb +205 -0
- data/lib/license_manager/models/error_error_issues_inner_path_inner.rb +103 -0
- data/lib/license_manager/models/event.rb +340 -0
- data/lib/license_manager/models/event_actor.rb +108 -0
- data/lib/license_manager/models/event_actor_one_of.rb +251 -0
- data/lib/license_manager/models/event_actor_one_of1.rb +239 -0
- data/lib/license_manager/models/event_actor_one_of2.rb +257 -0
- data/lib/license_manager/models/event_actor_one_of3.rb +201 -0
- data/lib/license_manager/models/event_actor_one_of4.rb +243 -0
- data/lib/license_manager/models/event_list.rb +206 -0
- data/lib/license_manager/models/event_machine.rb +216 -0
- data/lib/license_manager/models/event_type.rb +46 -0
- data/lib/license_manager/models/fixed_max_version.rb +240 -0
- data/lib/license_manager/models/integration.rb +412 -0
- data/lib/license_manager/models/integration_mapping.rb +435 -0
- data/lib/license_manager/models/integration_status.rb +42 -0
- data/lib/license_manager/models/license.rb +542 -0
- data/lib/license_manager/models/license_list.rb +206 -0
- data/lib/license_manager/models/license_max_version.rb +208 -0
- data/lib/license_manager/models/license_max_version_input.rb +202 -0
- data/lib/license_manager/models/license_stats.rb +292 -0
- data/lib/license_manager/models/license_stats_activations_by_machine_inner.rb +244 -0
- data/lib/license_manager/models/license_stats_activations_by_version_inner.rb +206 -0
- data/lib/license_manager/models/license_status.rb +42 -0
- data/lib/license_manager/models/license_token.rb +178 -0
- data/lib/license_manager/models/list_policy_events_type_parameter.rb +104 -0
- data/lib/license_manager/models/list_stripe_prices200_response.rb +179 -0
- data/lib/license_manager/models/lock_max_version.rb +240 -0
- data/lib/license_manager/models/lock_max_version_major_after.rb +105 -0
- data/lib/license_manager/models/lock_max_version_major_after_one_of.rb +245 -0
- data/lib/license_manager/models/lock_max_version_major_after_one_of1.rb +246 -0
- data/lib/license_manager/models/lock_max_version_minor_after.rb +104 -0
- data/lib/license_manager/models/machine.rb +383 -0
- data/lib/license_manager/models/machine_list.rb +206 -0
- data/lib/license_manager/models/pagination.rb +260 -0
- data/lib/license_manager/models/policy.rb +425 -0
- data/lib/license_manager/models/policy_duration.rb +104 -0
- data/lib/license_manager/models/policy_list.rb +206 -0
- data/lib/license_manager/models/policy_max_version.rb +104 -0
- data/lib/license_manager/models/policy_settings.rb +244 -0
- data/lib/license_manager/models/policy_settings_duration.rb +104 -0
- data/lib/license_manager/models/policy_settings_duration_any_of.rb +245 -0
- data/lib/license_manager/models/policy_settings_duration_any_of1.rb +246 -0
- data/lib/license_manager/models/policy_settings_max_version.rb +104 -0
- data/lib/license_manager/models/portal.rb +281 -0
- data/lib/license_manager/models/portal_link.rb +232 -0
- data/lib/license_manager/models/portal_not_found.rb +204 -0
- data/lib/license_manager/models/portal_settings.rb +304 -0
- data/lib/license_manager/models/price.rb +206 -0
- data/lib/license_manager/models/price_input.rb +224 -0
- data/lib/license_manager/models/product.rb +333 -0
- data/lib/license_manager/models/product_list.rb +206 -0
- data/lib/license_manager/models/product_stats.rb +682 -0
- data/lib/license_manager/models/product_stats_activations_by_version_inner.rb +193 -0
- data/lib/license_manager/models/product_stats_active_machines_by_platform_inner.rb +190 -0
- data/lib/license_manager/models/product_stats_active_machines_by_version_inner.rb +190 -0
- data/lib/license_manager/models/product_stats_new_licenses_by_policy_inner.rb +235 -0
- data/lib/license_manager/models/release.rb +308 -0
- data/lib/license_manager/models/release_list.rb +206 -0
- data/lib/license_manager/models/request_portal_link.rb +216 -0
- data/lib/license_manager/models/revenue.rb +401 -0
- data/lib/license_manager/models/send_license_keys.rb +198 -0
- data/lib/license_manager/models/send_portal_link.rb +187 -0
- data/lib/license_manager/models/signing_key.rb +282 -0
- data/lib/license_manager/models/stripe_integration.rb +276 -0
- data/lib/license_manager/models/stripe_permission.rb +253 -0
- data/lib/license_manager/models/stripe_price.rb +280 -0
- data/lib/license_manager/models/token.rb +274 -0
- data/lib/license_manager/models/update_customer.rb +215 -0
- data/lib/license_manager/models/update_integration_mapping.rb +186 -0
- data/lib/license_manager/models/update_license.rb +268 -0
- data/lib/license_manager/models/update_policy.rb +340 -0
- data/lib/license_manager/models/update_product.rb +246 -0
- data/lib/license_manager/models/update_product_portal.rb +274 -0
- data/lib/license_manager/models/update_release.rb +201 -0
- data/lib/license_manager/models/validate_key.rb +362 -0
- data/lib/license_manager/models/validate_key_error.rb +177 -0
- data/lib/license_manager/models/validate_key_error_error.rb +226 -0
- data/lib/license_manager/version.rb +15 -0
- data/lib/license_manager.rb +142 -0
- data/license_manager.gemspec +41 -0
- data/openapi.json +9825 -0
- data/spec/api/customers_api_spec.rb +102 -0
- data/spec/api/events_api_spec.rb +68 -0
- data/spec/api/integrations_api_spec.rb +134 -0
- data/spec/api/licenses_api_spec.rb +200 -0
- data/spec/api/machines_api_spec.rb +77 -0
- data/spec/api/policies_api_spec.rb +105 -0
- data/spec/api/portal_api_spec.rb +87 -0
- data/spec/api/products_api_spec.rb +148 -0
- data/spec/api/releases_api_spec.rb +105 -0
- data/spec/api/tokens_api_spec.rb +74 -0
- data/spec/models/connect_stripe_spec.rb +36 -0
- data/spec/models/create_customer_spec.rb +42 -0
- data/spec/models/create_integration_mapping_spec.rb +42 -0
- data/spec/models/create_license_spec.rb +90 -0
- data/spec/models/create_policy_spec.rb +72 -0
- data/spec/models/create_portal_link_spec.rb +36 -0
- data/spec/models/create_product_spec.rb +42 -0
- data/spec/models/create_product_with_policy_spec.rb +54 -0
- data/spec/models/create_release_spec.rb +42 -0
- data/spec/models/create_token_spec.rb +46 -0
- data/spec/models/customer_list_spec.rb +42 -0
- data/spec/models/customer_spec.rb +72 -0
- data/spec/models/error_error_issues_inner_path_inner_spec.rb +21 -0
- data/spec/models/error_error_issues_inner_spec.rb +42 -0
- data/spec/models/error_error_spec.rb +48 -0
- data/spec/models/error_spec.rb +36 -0
- data/spec/models/event_actor_one_of1_spec.rb +58 -0
- data/spec/models/event_actor_one_of2_spec.rb +56 -0
- data/spec/models/event_actor_one_of3_spec.rb +40 -0
- data/spec/models/event_actor_one_of4_spec.rb +56 -0
- data/spec/models/event_actor_one_of_spec.rb +64 -0
- data/spec/models/event_actor_spec.rb +32 -0
- data/spec/models/event_list_spec.rb +42 -0
- data/spec/models/event_machine_spec.rb +48 -0
- data/spec/models/event_spec.rb +84 -0
- data/spec/models/event_type_spec.rb +30 -0
- data/spec/models/fixed_max_version_spec.rb +46 -0
- data/spec/models/integration_mapping_spec.rb +100 -0
- data/spec/models/integration_spec.rb +100 -0
- data/spec/models/integration_status_spec.rb +30 -0
- data/spec/models/license_list_spec.rb +42 -0
- data/spec/models/license_max_version_input_spec.rb +48 -0
- data/spec/models/license_max_version_spec.rb +48 -0
- data/spec/models/license_spec.rb +132 -0
- data/spec/models/license_stats_activations_by_machine_inner_spec.rb +54 -0
- data/spec/models/license_stats_activations_by_version_inner_spec.rb +42 -0
- data/spec/models/license_stats_spec.rb +60 -0
- data/spec/models/license_status_spec.rb +30 -0
- data/spec/models/license_token_spec.rb +36 -0
- data/spec/models/list_policy_events_type_parameter_spec.rb +21 -0
- data/spec/models/list_stripe_prices200_response_spec.rb +36 -0
- data/spec/models/lock_max_version_major_after_one_of1_spec.rb +46 -0
- data/spec/models/lock_max_version_major_after_one_of_spec.rb +46 -0
- data/spec/models/lock_max_version_major_after_spec.rb +32 -0
- data/spec/models/lock_max_version_minor_after_spec.rb +21 -0
- data/spec/models/lock_max_version_spec.rb +52 -0
- data/spec/models/machine_list_spec.rb +42 -0
- data/spec/models/machine_spec.rb +94 -0
- data/spec/models/pagination_spec.rb +54 -0
- data/spec/models/policy_duration_spec.rb +21 -0
- data/spec/models/policy_list_spec.rb +42 -0
- data/spec/models/policy_max_version_spec.rb +21 -0
- data/spec/models/policy_settings_duration_any_of1_spec.rb +46 -0
- data/spec/models/policy_settings_duration_any_of_spec.rb +46 -0
- data/spec/models/policy_settings_duration_spec.rb +21 -0
- data/spec/models/policy_settings_max_version_spec.rb +21 -0
- data/spec/models/policy_settings_spec.rb +54 -0
- data/spec/models/policy_spec.rb +102 -0
- data/spec/models/portal_link_spec.rb +48 -0
- data/spec/models/portal_not_found_spec.rb +48 -0
- data/spec/models/portal_settings_spec.rb +60 -0
- data/spec/models/portal_spec.rb +72 -0
- data/spec/models/price_input_spec.rb +42 -0
- data/spec/models/price_spec.rb +42 -0
- data/spec/models/product_list_spec.rb +42 -0
- data/spec/models/product_spec.rb +78 -0
- data/spec/models/product_stats_activations_by_version_inner_spec.rb +42 -0
- data/spec/models/product_stats_active_machines_by_platform_inner_spec.rb +42 -0
- data/spec/models/product_stats_active_machines_by_version_inner_spec.rb +42 -0
- data/spec/models/product_stats_new_licenses_by_policy_inner_spec.rb +48 -0
- data/spec/models/product_stats_spec.rb +144 -0
- data/spec/models/release_list_spec.rb +42 -0
- data/spec/models/release_spec.rb +66 -0
- data/spec/models/request_portal_link_spec.rb +42 -0
- data/spec/models/revenue_spec.rb +84 -0
- data/spec/models/send_license_keys_spec.rb +36 -0
- data/spec/models/send_portal_link_spec.rb +36 -0
- data/spec/models/signing_key_spec.rb +58 -0
- data/spec/models/stripe_integration_spec.rb +60 -0
- data/spec/models/stripe_permission_spec.rb +52 -0
- data/spec/models/stripe_price_spec.rb +66 -0
- data/spec/models/token_spec.rb +62 -0
- data/spec/models/update_customer_spec.rb +42 -0
- data/spec/models/update_integration_mapping_spec.rb +36 -0
- data/spec/models/update_license_spec.rb +66 -0
- data/spec/models/update_policy_spec.rb +72 -0
- data/spec/models/update_product_portal_spec.rb +60 -0
- data/spec/models/update_product_spec.rb +48 -0
- data/spec/models/update_release_spec.rb +42 -0
- data/spec/models/validate_key_error_error_spec.rb +54 -0
- data/spec/models/validate_key_error_spec.rb +36 -0
- data/spec/models/validate_key_spec.rb +60 -0
- data/spec/spec_helper.rb +111 -0
- metadata +532 -0
data/docs/ReleasesApi.md
ADDED
|
@@ -0,0 +1,388 @@
|
|
|
1
|
+
# LicenseManager::ReleasesApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.licensemanager.dev*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**create_release**](ReleasesApi.md#create_release) | **POST** /v1/products/{productId}/releases | Create a release |
|
|
8
|
+
| [**delete_release**](ReleasesApi.md#delete_release) | **DELETE** /v1/releases/{id} | Delete a release |
|
|
9
|
+
| [**get_release**](ReleasesApi.md#get_release) | **GET** /v1/releases/{id} | Get a release |
|
|
10
|
+
| [**list_releases**](ReleasesApi.md#list_releases) | **GET** /v1/products/{productId}/releases | List the releases of a product |
|
|
11
|
+
| [**update_release**](ReleasesApi.md#update_release) | **PATCH** /v1/releases/{id} | Update a release |
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## create_release
|
|
15
|
+
|
|
16
|
+
> <Release> create_release(product_id, create_release)
|
|
17
|
+
|
|
18
|
+
Create a release
|
|
19
|
+
|
|
20
|
+
Releases don't restrict which versions `validateKey` accepts: a machine can run a version without a release. They give the `latestAllowedVersion` of its `version_not_allowed` errors, among the stable releases already released, and the number of active machines running each version. **Required role permission**: `release: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::ReleasesApi.new
|
|
36
|
+
product_id = 'x7Kp2QaZ' # String |
|
|
37
|
+
create_release = LicenseManager::CreateRelease.new({version: '2.3.1'}) # CreateRelease |
|
|
38
|
+
|
|
39
|
+
begin
|
|
40
|
+
# Create a release
|
|
41
|
+
result = api_instance.create_release(product_id, create_release)
|
|
42
|
+
p result
|
|
43
|
+
rescue LicenseManager::ApiError => e
|
|
44
|
+
puts "Error when calling ReleasesApi->create_release: #{e}"
|
|
45
|
+
end
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
#### Using the create_release_with_http_info variant
|
|
49
|
+
|
|
50
|
+
This returns an Array which contains the response data, status code and headers.
|
|
51
|
+
|
|
52
|
+
> <Array(<Release>, Integer, Hash)> create_release_with_http_info(product_id, create_release)
|
|
53
|
+
|
|
54
|
+
```ruby
|
|
55
|
+
begin
|
|
56
|
+
# Create a release
|
|
57
|
+
data, status_code, headers = api_instance.create_release_with_http_info(product_id, create_release)
|
|
58
|
+
p status_code # => 2xx
|
|
59
|
+
p headers # => { ... }
|
|
60
|
+
p data # => <Release>
|
|
61
|
+
rescue LicenseManager::ApiError => e
|
|
62
|
+
puts "Error when calling ReleasesApi->create_release_with_http_info: #{e}"
|
|
63
|
+
end
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Parameters
|
|
67
|
+
|
|
68
|
+
| Name | Type | Description | Notes |
|
|
69
|
+
| ---- | ---- | ----------- | ----- |
|
|
70
|
+
| **product_id** | **String** | | |
|
|
71
|
+
| **create_release** | [**CreateRelease**](CreateRelease.md) | | |
|
|
72
|
+
|
|
73
|
+
### Return type
|
|
74
|
+
|
|
75
|
+
[**Release**](Release.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_release
|
|
88
|
+
|
|
89
|
+
> delete_release(id)
|
|
90
|
+
|
|
91
|
+
Delete a release
|
|
92
|
+
|
|
93
|
+
**Required role permission**: `release: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::ReleasesApi.new
|
|
109
|
+
id = 'r4Lm8VwX' # String |
|
|
110
|
+
|
|
111
|
+
begin
|
|
112
|
+
# Delete a release
|
|
113
|
+
api_instance.delete_release(id)
|
|
114
|
+
rescue LicenseManager::ApiError => e
|
|
115
|
+
puts "Error when calling ReleasesApi->delete_release: #{e}"
|
|
116
|
+
end
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
#### Using the delete_release_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_release_with_http_info(id)
|
|
124
|
+
|
|
125
|
+
```ruby
|
|
126
|
+
begin
|
|
127
|
+
# Delete a release
|
|
128
|
+
data, status_code, headers = api_instance.delete_release_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 ReleasesApi->delete_release_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_release
|
|
158
|
+
|
|
159
|
+
> <Release> get_release(id)
|
|
160
|
+
|
|
161
|
+
Get a release
|
|
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::ReleasesApi.new
|
|
177
|
+
id = 'r4Lm8VwX' # String |
|
|
178
|
+
|
|
179
|
+
begin
|
|
180
|
+
# Get a release
|
|
181
|
+
result = api_instance.get_release(id)
|
|
182
|
+
p result
|
|
183
|
+
rescue LicenseManager::ApiError => e
|
|
184
|
+
puts "Error when calling ReleasesApi->get_release: #{e}"
|
|
185
|
+
end
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
#### Using the get_release_with_http_info variant
|
|
189
|
+
|
|
190
|
+
This returns an Array which contains the response data, status code and headers.
|
|
191
|
+
|
|
192
|
+
> <Array(<Release>, Integer, Hash)> get_release_with_http_info(id)
|
|
193
|
+
|
|
194
|
+
```ruby
|
|
195
|
+
begin
|
|
196
|
+
# Get a release
|
|
197
|
+
data, status_code, headers = api_instance.get_release_with_http_info(id)
|
|
198
|
+
p status_code # => 2xx
|
|
199
|
+
p headers # => { ... }
|
|
200
|
+
p data # => <Release>
|
|
201
|
+
rescue LicenseManager::ApiError => e
|
|
202
|
+
puts "Error when calling ReleasesApi->get_release_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
|
+
[**Release**](Release.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_releases
|
|
227
|
+
|
|
228
|
+
> <ReleaseList> list_releases(product_id, opts)
|
|
229
|
+
|
|
230
|
+
List the releases of a product
|
|
231
|
+
|
|
232
|
+
Sorting by `version` compares the major, minor and patch numbers as numbers, then puts a pre-release before its stable release. Pre-releases of the same version compare as text, unlike semantic versioning: `2.0.0-beta.10` comes before `2.0.0-beta.2`. Build metadata is ignored.
|
|
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::ReleasesApi.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: 'version', # String | Field to sort by, prefixed with `-` for descending order. Defaults to `-version`.
|
|
253
|
+
search: '2.3', # String | Case-insensitive text the version contains.
|
|
254
|
+
released_from: Time.parse('2026-01-01T00:00:00.000Z'), # Time | Only returns the releases released at or after this date.
|
|
255
|
+
released_to: Time.parse('2026-02-01T00:00:00.000Z'), # Time | Only returns the releases released at or before this date.
|
|
256
|
+
active_machine_count: 1, # Integer | Only returns the releases running on exactly this number of active machines.
|
|
257
|
+
active_machine_count_min: 1, # Integer | Only returns the releases running on at least this number of active machines.
|
|
258
|
+
active_machine_count_max: 1 # Integer | Only returns the releases running on at most this number of active machines.
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
begin
|
|
262
|
+
# List the releases of a product
|
|
263
|
+
result = api_instance.list_releases(product_id, opts)
|
|
264
|
+
p result
|
|
265
|
+
rescue LicenseManager::ApiError => e
|
|
266
|
+
puts "Error when calling ReleasesApi->list_releases: #{e}"
|
|
267
|
+
end
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
#### Using the list_releases_with_http_info variant
|
|
271
|
+
|
|
272
|
+
This returns an Array which contains the response data, status code and headers.
|
|
273
|
+
|
|
274
|
+
> <Array(<ReleaseList>, Integer, Hash)> list_releases_with_http_info(product_id, opts)
|
|
275
|
+
|
|
276
|
+
```ruby
|
|
277
|
+
begin
|
|
278
|
+
# List the releases of a product
|
|
279
|
+
data, status_code, headers = api_instance.list_releases_with_http_info(product_id, opts)
|
|
280
|
+
p status_code # => 2xx
|
|
281
|
+
p headers # => { ... }
|
|
282
|
+
p data # => <ReleaseList>
|
|
283
|
+
rescue LicenseManager::ApiError => e
|
|
284
|
+
puts "Error when calling ReleasesApi->list_releases_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: `1` is the first page. A page past the last one returns an empty `data`, not an error. Defaults to `1`. | [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 `20`. | [optional][default to 20] |
|
|
295
|
+
| **sort** | **String** | Field to sort by, prefixed with `-` for descending order. Defaults to `-version`. | [optional][default to '-version'] |
|
|
296
|
+
| **search** | **String** | Case-insensitive text the version contains. | [optional] |
|
|
297
|
+
| **released_from** | **Time** | Only returns the releases released at or after this date. | [optional] |
|
|
298
|
+
| **released_to** | **Time** | Only returns the releases released at or before this date. | [optional] |
|
|
299
|
+
| **active_machine_count** | **Integer** | Only returns the releases running on exactly this number of active machines. | [optional] |
|
|
300
|
+
| **active_machine_count_min** | **Integer** | Only returns the releases running on at least this number of active machines. | [optional] |
|
|
301
|
+
| **active_machine_count_max** | **Integer** | Only returns the releases running on at most this number of active machines. | [optional] |
|
|
302
|
+
|
|
303
|
+
### Return type
|
|
304
|
+
|
|
305
|
+
[**ReleaseList**](ReleaseList.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_release
|
|
318
|
+
|
|
319
|
+
> <Release> update_release(id, update_release)
|
|
320
|
+
|
|
321
|
+
Update a release
|
|
322
|
+
|
|
323
|
+
**Required role permission**: `release: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::ReleasesApi.new
|
|
339
|
+
id = 'r4Lm8VwX' # String |
|
|
340
|
+
update_release = LicenseManager::UpdateRelease.new # UpdateRelease |
|
|
341
|
+
|
|
342
|
+
begin
|
|
343
|
+
# Update a release
|
|
344
|
+
result = api_instance.update_release(id, update_release)
|
|
345
|
+
p result
|
|
346
|
+
rescue LicenseManager::ApiError => e
|
|
347
|
+
puts "Error when calling ReleasesApi->update_release: #{e}"
|
|
348
|
+
end
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
#### Using the update_release_with_http_info variant
|
|
352
|
+
|
|
353
|
+
This returns an Array which contains the response data, status code and headers.
|
|
354
|
+
|
|
355
|
+
> <Array(<Release>, Integer, Hash)> update_release_with_http_info(id, update_release)
|
|
356
|
+
|
|
357
|
+
```ruby
|
|
358
|
+
begin
|
|
359
|
+
# Update a release
|
|
360
|
+
data, status_code, headers = api_instance.update_release_with_http_info(id, update_release)
|
|
361
|
+
p status_code # => 2xx
|
|
362
|
+
p headers # => { ... }
|
|
363
|
+
p data # => <Release>
|
|
364
|
+
rescue LicenseManager::ApiError => e
|
|
365
|
+
puts "Error when calling ReleasesApi->update_release_with_http_info: #{e}"
|
|
366
|
+
end
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
### Parameters
|
|
370
|
+
|
|
371
|
+
| Name | Type | Description | Notes |
|
|
372
|
+
| ---- | ---- | ----------- | ----- |
|
|
373
|
+
| **id** | **String** | | |
|
|
374
|
+
| **update_release** | [**UpdateRelease**](UpdateRelease.md) | | |
|
|
375
|
+
|
|
376
|
+
### Return type
|
|
377
|
+
|
|
378
|
+
[**Release**](Release.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
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# LicenseManager::RequestPortalLink
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **email** | **String** | Email of the customer. | |
|
|
8
|
+
| **return_url** | **String** | Link back to your website, kept in the emailed link when its domain is one of the product's `returnDomains`. | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'license_manager'
|
|
14
|
+
|
|
15
|
+
instance = LicenseManager::RequestPortalLink.new(
|
|
16
|
+
email: jane@example.com,
|
|
17
|
+
return_url: https://example.com/account
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
data/docs/Revenue.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# LicenseManager::Revenue
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **currency** | **String** | ISO 4217 code of the currency of the revenue. | |
|
|
8
|
+
| **license_count** | **Integer** | Number of licenses sold in the currency, free ones included. | |
|
|
9
|
+
| **total** | **Float** | Sum of the prices of the licenses sold in the currency, in major units. | |
|
|
10
|
+
| **this_month** | **Float** | Revenue of the current month, in UTC. | |
|
|
11
|
+
| **last_month** | **Float** | Revenue of the previous month, in UTC. | |
|
|
12
|
+
| **last30_days** | **Float** | Revenue of the last 30 days, today included, in UTC. | |
|
|
13
|
+
| **by_day** | **Array<Float>** | Revenue each day, aligned on `days`. | |
|
|
14
|
+
| **by_month** | **Array<Float>** | Revenue each month, aligned on `months`. | |
|
|
15
|
+
| **by_policy** | [**Array<ProductStatsNewLicensesByPolicyInner>**](ProductStatsNewLicensesByPolicyInner.md) | Revenue of the licenses of each policy, for the policies with licenses sold in the currency over the covered months. | |
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```ruby
|
|
20
|
+
require 'license_manager'
|
|
21
|
+
|
|
22
|
+
instance = LicenseManager::Revenue.new(
|
|
23
|
+
currency: USD,
|
|
24
|
+
license_count: 42,
|
|
25
|
+
total: 2099.58,
|
|
26
|
+
this_month: 349.93,
|
|
27
|
+
last_month: 299.94,
|
|
28
|
+
last30_days: 399.92,
|
|
29
|
+
by_day: [0, 49.99, 99.98],
|
|
30
|
+
by_month: [199.96, 249.95, 349.93],
|
|
31
|
+
by_policy: null
|
|
32
|
+
)
|
|
33
|
+
```
|
|
34
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# LicenseManager::SendLicenseKeys
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **ids** | **Array<String>** | Ids of the licenses whose keys to email, up to 100. | |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'license_manager'
|
|
13
|
+
|
|
14
|
+
instance = LicenseManager::SendLicenseKeys.new(
|
|
15
|
+
ids: [l3Nv8KwB]
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# LicenseManager::SendPortalLink
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **token** | **String** | Token of a link created for the customer. | |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'license_manager'
|
|
13
|
+
|
|
14
|
+
instance = LicenseManager::SendPortalLink.new(
|
|
15
|
+
token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
data/docs/SigningKey.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# LicenseManager::SigningKey
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | Id of the key, in the `kid` header of the tokens it signs. | |
|
|
8
|
+
| **algorithm** | **String** | JWT algorithm of the tokens it signs, with an Ed25519 key. | |
|
|
9
|
+
| **public_key** | **String** | PEM encoded SPKI public key. | |
|
|
10
|
+
| **created_at** | **Time** | | |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'license_manager'
|
|
16
|
+
|
|
17
|
+
instance = LicenseManager::SigningKey.new(
|
|
18
|
+
id: k8R2vNqW,
|
|
19
|
+
algorithm: null,
|
|
20
|
+
public_key: -----BEGIN PUBLIC KEY-----
|
|
21
|
+
MCowBQYDK2VwAyEA…
|
|
22
|
+
-----END PUBLIC KEY-----
|
|
23
|
+
,
|
|
24
|
+
created_at: 2026-01-15T09:30:00.000Z
|
|
25
|
+
)
|
|
26
|
+
```
|
|
27
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# LicenseManager::StripeIntegration
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **livemode** | **Boolean** | Mode of the Stripe connection the product uses: live for live products, test for test products. | |
|
|
8
|
+
| **webhook_url_reachable** | **Boolean** | Whether Stripe can reach the API's webhook URL. A local URL can't be: set `WEBHOOK_URL` on the server, like to a tunnel in development. | |
|
|
9
|
+
| **required_permissions** | [**Array<StripePermission>**](StripePermission.md) | Permissions the restricted API key needs, and why. Every other permission can stay `None`. | |
|
|
10
|
+
| **integration** | [**Integration**](Integration.md) | The organization's Stripe connection in this mode, `null` when there's none. | |
|
|
11
|
+
| **mappings** | [**Array<IntegrationMapping>**](IntegrationMapping.md) | Stripe prices creating licenses of the product. | |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'license_manager'
|
|
17
|
+
|
|
18
|
+
instance = LicenseManager::StripeIntegration.new(
|
|
19
|
+
livemode: null,
|
|
20
|
+
webhook_url_reachable: null,
|
|
21
|
+
required_permissions: null,
|
|
22
|
+
integration: null,
|
|
23
|
+
mappings: null
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# LicenseManager::StripePermission
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **resource** | **String** | | |
|
|
8
|
+
| **access** | **String** | | |
|
|
9
|
+
| **reason** | **String** | | |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'license_manager'
|
|
15
|
+
|
|
16
|
+
instance = LicenseManager::StripePermission.new(
|
|
17
|
+
resource: Prices,
|
|
18
|
+
access: null,
|
|
19
|
+
reason: Lists your prices so you can choose which ones create licenses, and checks they can still be paid.
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
data/docs/StripePrice.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# LicenseManager::StripePrice
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | |
|
|
8
|
+
| **product_id** | **String** | | |
|
|
9
|
+
| **product_name** | **String** | | |
|
|
10
|
+
| **nickname** | **String** | | |
|
|
11
|
+
| **price** | [**Price**](Price.md) | | |
|
|
12
|
+
| **mapped** | **Boolean** | Whether the price already creates licenses of a product. | |
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
require 'license_manager'
|
|
18
|
+
|
|
19
|
+
instance = LicenseManager::StripePrice.new(
|
|
20
|
+
id: price_1MoBy5LkdIwHu7ix,
|
|
21
|
+
product_id: prod_NWjs8kKbJWmuuc,
|
|
22
|
+
product_name: Acme Pro,
|
|
23
|
+
nickname: Launch price,
|
|
24
|
+
price: null,
|
|
25
|
+
mapped: null
|
|
26
|
+
)
|
|
27
|
+
```
|
|
28
|
+
|
data/docs/Token.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# LicenseManager::Token
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **token** | **String** | Token to send as `Authorization: Bearer <token>`. | |
|
|
8
|
+
| **type** | **String** | Type of resource the token is scoped to. | |
|
|
9
|
+
| **scope** | **Array<String>** | | |
|
|
10
|
+
| **expires_at** | **Time** | When the token stops working. | |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'license_manager'
|
|
16
|
+
|
|
17
|
+
instance = LicenseManager::Token.new(
|
|
18
|
+
token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9…,
|
|
19
|
+
type: license,
|
|
20
|
+
scope: [license:read, machine:write],
|
|
21
|
+
expires_at: 2026-01-15T10:30:00.000Z
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|