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/ProductsApi.md
ADDED
|
@@ -0,0 +1,666 @@
|
|
|
1
|
+
# LicenseManager::ProductsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.licensemanager.dev*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**create_product**](ProductsApi.md#create_product) | **POST** /v1/products | Create a product |
|
|
8
|
+
| [**delete_product**](ProductsApi.md#delete_product) | **DELETE** /v1/products/{id} | Delete a product |
|
|
9
|
+
| [**delete_product_logo**](ProductsApi.md#delete_product_logo) | **DELETE** /v1/products/{id}/logo | Delete a product logo |
|
|
10
|
+
| [**get_product**](ProductsApi.md#get_product) | **GET** /v1/products/{id} | Get a product |
|
|
11
|
+
| [**get_product_stats**](ProductsApi.md#get_product_stats) | **GET** /v1/products/{id}/stats | Get the stats of a product |
|
|
12
|
+
| [**list_products**](ProductsApi.md#list_products) | **GET** /v1/products | List products |
|
|
13
|
+
| [**reset_product**](ProductsApi.md#reset_product) | **POST** /v1/products/{id}/reset | Reset a test product |
|
|
14
|
+
| [**update_product**](ProductsApi.md#update_product) | **PATCH** /v1/products/{id} | Update a product |
|
|
15
|
+
| [**upload_product_logo**](ProductsApi.md#upload_product_logo) | **PUT** /v1/products/{id}/logo | Upload a product logo |
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## create_product
|
|
19
|
+
|
|
20
|
+
> <Product> create_product(create_product_with_policy)
|
|
21
|
+
|
|
22
|
+
Create a product
|
|
23
|
+
|
|
24
|
+
Without a `slug`, the product gets one derived from its name: lower cased, without accents and special characters (`Élan Pro 2!` becomes `elan-pro-2`). When another product of the organization already uses it, a dash and 3 random lowercase letters or digits are appended (`elan-pro-2-k3f`), until the slug is free. An explicit `slug` is used as is: the request fails with a `409` when it's taken, it's never changed. Slug uniqueness is enforced by the database, so when concurrent requests end up with the same slug, only one succeeds and the others get a `409`, even without an explicit `slug`. Retrying such a request without a `slug` derives a new one. The product is created with its default policy, named `Default policy` with the `default` slug, whose settings are given by `defaultPolicy`. Omitted settings default to licenses that never expire, on a single machine, offline for one week, for every version of the product. Unlike `createPolicy`, where `maxMachines` defaults to no limit. With `isTestFromProductId`, the product is a test product: its id, its slug, and the ids, slugs and license keys of its resources start with `test_` (`TEST-` for license keys), and only test API keys reach it. It starts with copies of the policies, releases and portal settings of the live product, `defaultPolicy` is ignored. Later changes to the live product aren't copied: reset the test product to copy them again. Test API keys can only create test products, live API keys only live ones. **Required role permission**: `product:create` when called with a session, granted by the member's role. API keys aren't limited by roles.
|
|
25
|
+
|
|
26
|
+
### Examples
|
|
27
|
+
|
|
28
|
+
```ruby
|
|
29
|
+
require 'time'
|
|
30
|
+
require 'license_manager'
|
|
31
|
+
# setup authorization
|
|
32
|
+
LicenseManager.configure do |config|
|
|
33
|
+
# Configure API key authorization: apiKey
|
|
34
|
+
config.api_key['x-api-key'] = 'YOUR API KEY'
|
|
35
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
36
|
+
# config.api_key_prefix['x-api-key'] = 'Bearer'
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
api_instance = LicenseManager::ProductsApi.new
|
|
40
|
+
create_product_with_policy = LicenseManager::CreateProductWithPolicy.new({name: 'Acme Pro'}) # CreateProductWithPolicy |
|
|
41
|
+
|
|
42
|
+
begin
|
|
43
|
+
# Create a product
|
|
44
|
+
result = api_instance.create_product(create_product_with_policy)
|
|
45
|
+
p result
|
|
46
|
+
rescue LicenseManager::ApiError => e
|
|
47
|
+
puts "Error when calling ProductsApi->create_product: #{e}"
|
|
48
|
+
end
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
#### Using the create_product_with_http_info variant
|
|
52
|
+
|
|
53
|
+
This returns an Array which contains the response data, status code and headers.
|
|
54
|
+
|
|
55
|
+
> <Array(<Product>, Integer, Hash)> create_product_with_http_info(create_product_with_policy)
|
|
56
|
+
|
|
57
|
+
```ruby
|
|
58
|
+
begin
|
|
59
|
+
# Create a product
|
|
60
|
+
data, status_code, headers = api_instance.create_product_with_http_info(create_product_with_policy)
|
|
61
|
+
p status_code # => 2xx
|
|
62
|
+
p headers # => { ... }
|
|
63
|
+
p data # => <Product>
|
|
64
|
+
rescue LicenseManager::ApiError => e
|
|
65
|
+
puts "Error when calling ProductsApi->create_product_with_http_info: #{e}"
|
|
66
|
+
end
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Parameters
|
|
70
|
+
|
|
71
|
+
| Name | Type | Description | Notes |
|
|
72
|
+
| ---- | ---- | ----------- | ----- |
|
|
73
|
+
| **create_product_with_policy** | [**CreateProductWithPolicy**](CreateProductWithPolicy.md) | | |
|
|
74
|
+
|
|
75
|
+
### Return type
|
|
76
|
+
|
|
77
|
+
[**Product**](Product.md)
|
|
78
|
+
|
|
79
|
+
### Authorization
|
|
80
|
+
|
|
81
|
+
[apiKey](../README.md#apiKey)
|
|
82
|
+
|
|
83
|
+
### HTTP request headers
|
|
84
|
+
|
|
85
|
+
- **Content-Type**: application/json
|
|
86
|
+
- **Accept**: application/json
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
## delete_product
|
|
90
|
+
|
|
91
|
+
> delete_product(id)
|
|
92
|
+
|
|
93
|
+
Delete a product
|
|
94
|
+
|
|
95
|
+
Deletes the product along with its policies, customers and releases, and its test products with everything they hold. A live product that licenses belong to can't be deleted: delete them first. A test product can always be deleted, along with its licenses and machines. The events of the deleted policies and licenses can no longer be listed. **Required role permission**: `product:delete` when called with a session, granted by the member's role. API keys aren't limited by roles.
|
|
96
|
+
|
|
97
|
+
### Examples
|
|
98
|
+
|
|
99
|
+
```ruby
|
|
100
|
+
require 'time'
|
|
101
|
+
require 'license_manager'
|
|
102
|
+
# setup authorization
|
|
103
|
+
LicenseManager.configure do |config|
|
|
104
|
+
# Configure API key authorization: apiKey
|
|
105
|
+
config.api_key['x-api-key'] = 'YOUR API KEY'
|
|
106
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
107
|
+
# config.api_key_prefix['x-api-key'] = 'Bearer'
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
api_instance = LicenseManager::ProductsApi.new
|
|
111
|
+
id = 'x7Kp2QaZ' # String |
|
|
112
|
+
|
|
113
|
+
begin
|
|
114
|
+
# Delete a product
|
|
115
|
+
api_instance.delete_product(id)
|
|
116
|
+
rescue LicenseManager::ApiError => e
|
|
117
|
+
puts "Error when calling ProductsApi->delete_product: #{e}"
|
|
118
|
+
end
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
#### Using the delete_product_with_http_info variant
|
|
122
|
+
|
|
123
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
124
|
+
|
|
125
|
+
> <Array(nil, Integer, Hash)> delete_product_with_http_info(id)
|
|
126
|
+
|
|
127
|
+
```ruby
|
|
128
|
+
begin
|
|
129
|
+
# Delete a product
|
|
130
|
+
data, status_code, headers = api_instance.delete_product_with_http_info(id)
|
|
131
|
+
p status_code # => 2xx
|
|
132
|
+
p headers # => { ... }
|
|
133
|
+
p data # => nil
|
|
134
|
+
rescue LicenseManager::ApiError => e
|
|
135
|
+
puts "Error when calling ProductsApi->delete_product_with_http_info: #{e}"
|
|
136
|
+
end
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Parameters
|
|
140
|
+
|
|
141
|
+
| Name | Type | Description | Notes |
|
|
142
|
+
| ---- | ---- | ----------- | ----- |
|
|
143
|
+
| **id** | **String** | | |
|
|
144
|
+
|
|
145
|
+
### Return type
|
|
146
|
+
|
|
147
|
+
nil (empty response body)
|
|
148
|
+
|
|
149
|
+
### Authorization
|
|
150
|
+
|
|
151
|
+
[apiKey](../README.md#apiKey)
|
|
152
|
+
|
|
153
|
+
### HTTP request headers
|
|
154
|
+
|
|
155
|
+
- **Content-Type**: Not defined
|
|
156
|
+
- **Accept**: application/json
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
## delete_product_logo
|
|
160
|
+
|
|
161
|
+
> <Product> delete_product_logo(id)
|
|
162
|
+
|
|
163
|
+
Delete a product logo
|
|
164
|
+
|
|
165
|
+
Removes the logo of the product, and deletes its image. Succeeds when the product has no logo. **Required role permission**: `product:update` when called with a session, granted by the member's role. API keys aren't limited by roles.
|
|
166
|
+
|
|
167
|
+
### Examples
|
|
168
|
+
|
|
169
|
+
```ruby
|
|
170
|
+
require 'time'
|
|
171
|
+
require 'license_manager'
|
|
172
|
+
# setup authorization
|
|
173
|
+
LicenseManager.configure do |config|
|
|
174
|
+
# Configure API key authorization: apiKey
|
|
175
|
+
config.api_key['x-api-key'] = 'YOUR API KEY'
|
|
176
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
177
|
+
# config.api_key_prefix['x-api-key'] = 'Bearer'
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
api_instance = LicenseManager::ProductsApi.new
|
|
181
|
+
id = 'x7Kp2QaZ' # String |
|
|
182
|
+
|
|
183
|
+
begin
|
|
184
|
+
# Delete a product logo
|
|
185
|
+
result = api_instance.delete_product_logo(id)
|
|
186
|
+
p result
|
|
187
|
+
rescue LicenseManager::ApiError => e
|
|
188
|
+
puts "Error when calling ProductsApi->delete_product_logo: #{e}"
|
|
189
|
+
end
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
#### Using the delete_product_logo_with_http_info variant
|
|
193
|
+
|
|
194
|
+
This returns an Array which contains the response data, status code and headers.
|
|
195
|
+
|
|
196
|
+
> <Array(<Product>, Integer, Hash)> delete_product_logo_with_http_info(id)
|
|
197
|
+
|
|
198
|
+
```ruby
|
|
199
|
+
begin
|
|
200
|
+
# Delete a product logo
|
|
201
|
+
data, status_code, headers = api_instance.delete_product_logo_with_http_info(id)
|
|
202
|
+
p status_code # => 2xx
|
|
203
|
+
p headers # => { ... }
|
|
204
|
+
p data # => <Product>
|
|
205
|
+
rescue LicenseManager::ApiError => e
|
|
206
|
+
puts "Error when calling ProductsApi->delete_product_logo_with_http_info: #{e}"
|
|
207
|
+
end
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Parameters
|
|
211
|
+
|
|
212
|
+
| Name | Type | Description | Notes |
|
|
213
|
+
| ---- | ---- | ----------- | ----- |
|
|
214
|
+
| **id** | **String** | | |
|
|
215
|
+
|
|
216
|
+
### Return type
|
|
217
|
+
|
|
218
|
+
[**Product**](Product.md)
|
|
219
|
+
|
|
220
|
+
### Authorization
|
|
221
|
+
|
|
222
|
+
[apiKey](../README.md#apiKey)
|
|
223
|
+
|
|
224
|
+
### HTTP request headers
|
|
225
|
+
|
|
226
|
+
- **Content-Type**: Not defined
|
|
227
|
+
- **Accept**: application/json
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
## get_product
|
|
231
|
+
|
|
232
|
+
> <Product> get_product(id)
|
|
233
|
+
|
|
234
|
+
Get a product
|
|
235
|
+
|
|
236
|
+
### Examples
|
|
237
|
+
|
|
238
|
+
```ruby
|
|
239
|
+
require 'time'
|
|
240
|
+
require 'license_manager'
|
|
241
|
+
# setup authorization
|
|
242
|
+
LicenseManager.configure do |config|
|
|
243
|
+
# Configure API key authorization: apiKey
|
|
244
|
+
config.api_key['x-api-key'] = 'YOUR API KEY'
|
|
245
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
246
|
+
# config.api_key_prefix['x-api-key'] = 'Bearer'
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
api_instance = LicenseManager::ProductsApi.new
|
|
250
|
+
id = 'x7Kp2QaZ' # String |
|
|
251
|
+
|
|
252
|
+
begin
|
|
253
|
+
# Get a product
|
|
254
|
+
result = api_instance.get_product(id)
|
|
255
|
+
p result
|
|
256
|
+
rescue LicenseManager::ApiError => e
|
|
257
|
+
puts "Error when calling ProductsApi->get_product: #{e}"
|
|
258
|
+
end
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
#### Using the get_product_with_http_info variant
|
|
262
|
+
|
|
263
|
+
This returns an Array which contains the response data, status code and headers.
|
|
264
|
+
|
|
265
|
+
> <Array(<Product>, Integer, Hash)> get_product_with_http_info(id)
|
|
266
|
+
|
|
267
|
+
```ruby
|
|
268
|
+
begin
|
|
269
|
+
# Get a product
|
|
270
|
+
data, status_code, headers = api_instance.get_product_with_http_info(id)
|
|
271
|
+
p status_code # => 2xx
|
|
272
|
+
p headers # => { ... }
|
|
273
|
+
p data # => <Product>
|
|
274
|
+
rescue LicenseManager::ApiError => e
|
|
275
|
+
puts "Error when calling ProductsApi->get_product_with_http_info: #{e}"
|
|
276
|
+
end
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### Parameters
|
|
280
|
+
|
|
281
|
+
| Name | Type | Description | Notes |
|
|
282
|
+
| ---- | ---- | ----------- | ----- |
|
|
283
|
+
| **id** | **String** | | |
|
|
284
|
+
|
|
285
|
+
### Return type
|
|
286
|
+
|
|
287
|
+
[**Product**](Product.md)
|
|
288
|
+
|
|
289
|
+
### Authorization
|
|
290
|
+
|
|
291
|
+
[apiKey](../README.md#apiKey)
|
|
292
|
+
|
|
293
|
+
### HTTP request headers
|
|
294
|
+
|
|
295
|
+
- **Content-Type**: Not defined
|
|
296
|
+
- **Accept**: application/json
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
## get_product_stats
|
|
300
|
+
|
|
301
|
+
> <ProductStats> get_product_stats(id)
|
|
302
|
+
|
|
303
|
+
Get the stats of a product
|
|
304
|
+
|
|
305
|
+
Counts of the licenses and machines of the product, number of licenses created each day over the last 30 days and each month over the last 12 months, overall and per policy, revenue per currency over the same periods, and successful activations each day over the last 30 days. Days and months are in UTC.
|
|
306
|
+
|
|
307
|
+
### Examples
|
|
308
|
+
|
|
309
|
+
```ruby
|
|
310
|
+
require 'time'
|
|
311
|
+
require 'license_manager'
|
|
312
|
+
# setup authorization
|
|
313
|
+
LicenseManager.configure do |config|
|
|
314
|
+
# Configure API key authorization: apiKey
|
|
315
|
+
config.api_key['x-api-key'] = 'YOUR API KEY'
|
|
316
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
317
|
+
# config.api_key_prefix['x-api-key'] = 'Bearer'
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
api_instance = LicenseManager::ProductsApi.new
|
|
321
|
+
id = 'x7Kp2QaZ' # String |
|
|
322
|
+
|
|
323
|
+
begin
|
|
324
|
+
# Get the stats of a product
|
|
325
|
+
result = api_instance.get_product_stats(id)
|
|
326
|
+
p result
|
|
327
|
+
rescue LicenseManager::ApiError => e
|
|
328
|
+
puts "Error when calling ProductsApi->get_product_stats: #{e}"
|
|
329
|
+
end
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
#### Using the get_product_stats_with_http_info variant
|
|
333
|
+
|
|
334
|
+
This returns an Array which contains the response data, status code and headers.
|
|
335
|
+
|
|
336
|
+
> <Array(<ProductStats>, Integer, Hash)> get_product_stats_with_http_info(id)
|
|
337
|
+
|
|
338
|
+
```ruby
|
|
339
|
+
begin
|
|
340
|
+
# Get the stats of a product
|
|
341
|
+
data, status_code, headers = api_instance.get_product_stats_with_http_info(id)
|
|
342
|
+
p status_code # => 2xx
|
|
343
|
+
p headers # => { ... }
|
|
344
|
+
p data # => <ProductStats>
|
|
345
|
+
rescue LicenseManager::ApiError => e
|
|
346
|
+
puts "Error when calling ProductsApi->get_product_stats_with_http_info: #{e}"
|
|
347
|
+
end
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
### Parameters
|
|
351
|
+
|
|
352
|
+
| Name | Type | Description | Notes |
|
|
353
|
+
| ---- | ---- | ----------- | ----- |
|
|
354
|
+
| **id** | **String** | | |
|
|
355
|
+
|
|
356
|
+
### Return type
|
|
357
|
+
|
|
358
|
+
[**ProductStats**](ProductStats.md)
|
|
359
|
+
|
|
360
|
+
### Authorization
|
|
361
|
+
|
|
362
|
+
[apiKey](../README.md#apiKey)
|
|
363
|
+
|
|
364
|
+
### HTTP request headers
|
|
365
|
+
|
|
366
|
+
- **Content-Type**: Not defined
|
|
367
|
+
- **Accept**: application/json
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
## list_products
|
|
371
|
+
|
|
372
|
+
> <ProductList> list_products(opts)
|
|
373
|
+
|
|
374
|
+
List products
|
|
375
|
+
|
|
376
|
+
### Examples
|
|
377
|
+
|
|
378
|
+
```ruby
|
|
379
|
+
require 'time'
|
|
380
|
+
require 'license_manager'
|
|
381
|
+
# setup authorization
|
|
382
|
+
LicenseManager.configure do |config|
|
|
383
|
+
# Configure API key authorization: apiKey
|
|
384
|
+
config.api_key['x-api-key'] = 'YOUR API KEY'
|
|
385
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
386
|
+
# config.api_key_prefix['x-api-key'] = 'Bearer'
|
|
387
|
+
end
|
|
388
|
+
|
|
389
|
+
api_instance = LicenseManager::ProductsApi.new
|
|
390
|
+
opts = {
|
|
391
|
+
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`.
|
|
392
|
+
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`.
|
|
393
|
+
sort: 'name', # String | Field to sort by, prefixed with `-` for descending order. Defaults to `-createdAt`.
|
|
394
|
+
search: 'pro', # String | Case-insensitive text the name or slug contains.
|
|
395
|
+
slug: 'acme-pro', # String | Only returns the product with this exact slug.
|
|
396
|
+
is_test: 'true' # String | Only returns the test products with `true`, the live ones with `false`. API keys only list the products of their own mode.
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
begin
|
|
400
|
+
# List products
|
|
401
|
+
result = api_instance.list_products(opts)
|
|
402
|
+
p result
|
|
403
|
+
rescue LicenseManager::ApiError => e
|
|
404
|
+
puts "Error when calling ProductsApi->list_products: #{e}"
|
|
405
|
+
end
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
#### Using the list_products_with_http_info variant
|
|
409
|
+
|
|
410
|
+
This returns an Array which contains the response data, status code and headers.
|
|
411
|
+
|
|
412
|
+
> <Array(<ProductList>, Integer, Hash)> list_products_with_http_info(opts)
|
|
413
|
+
|
|
414
|
+
```ruby
|
|
415
|
+
begin
|
|
416
|
+
# List products
|
|
417
|
+
data, status_code, headers = api_instance.list_products_with_http_info(opts)
|
|
418
|
+
p status_code # => 2xx
|
|
419
|
+
p headers # => { ... }
|
|
420
|
+
p data # => <ProductList>
|
|
421
|
+
rescue LicenseManager::ApiError => e
|
|
422
|
+
puts "Error when calling ProductsApi->list_products_with_http_info: #{e}"
|
|
423
|
+
end
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
### Parameters
|
|
427
|
+
|
|
428
|
+
| Name | Type | Description | Notes |
|
|
429
|
+
| ---- | ---- | ----------- | ----- |
|
|
430
|
+
| **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] |
|
|
431
|
+
| **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] |
|
|
432
|
+
| **sort** | **String** | Field to sort by, prefixed with `-` for descending order. Defaults to `-createdAt`. | [optional][default to '-createdAt'] |
|
|
433
|
+
| **search** | **String** | Case-insensitive text the name or slug contains. | [optional] |
|
|
434
|
+
| **slug** | **String** | Only returns the product with this exact slug. | [optional] |
|
|
435
|
+
| **is_test** | **String** | Only returns the test products with `true`, the live ones with `false`. API keys only list the products of their own mode. | [optional] |
|
|
436
|
+
|
|
437
|
+
### Return type
|
|
438
|
+
|
|
439
|
+
[**ProductList**](ProductList.md)
|
|
440
|
+
|
|
441
|
+
### Authorization
|
|
442
|
+
|
|
443
|
+
[apiKey](../README.md#apiKey)
|
|
444
|
+
|
|
445
|
+
### HTTP request headers
|
|
446
|
+
|
|
447
|
+
- **Content-Type**: Not defined
|
|
448
|
+
- **Accept**: application/json
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
## reset_product
|
|
452
|
+
|
|
453
|
+
> <Product> reset_product(id)
|
|
454
|
+
|
|
455
|
+
Reset a test product
|
|
456
|
+
|
|
457
|
+
Deletes the customers, licenses, machines, policies and releases of the test product, with their events, then copies the policies, releases and portal settings of its live product again. Its id, name and slug are kept, but the copied policies get new ids. The tokens of its customers, licenses and machines stop working. **Required role permission**: `product:update` when called with a session, granted by the member's role. API keys aren't limited by roles.
|
|
458
|
+
|
|
459
|
+
### Examples
|
|
460
|
+
|
|
461
|
+
```ruby
|
|
462
|
+
require 'time'
|
|
463
|
+
require 'license_manager'
|
|
464
|
+
# setup authorization
|
|
465
|
+
LicenseManager.configure do |config|
|
|
466
|
+
# Configure API key authorization: apiKey
|
|
467
|
+
config.api_key['x-api-key'] = 'YOUR API KEY'
|
|
468
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
469
|
+
# config.api_key_prefix['x-api-key'] = 'Bearer'
|
|
470
|
+
end
|
|
471
|
+
|
|
472
|
+
api_instance = LicenseManager::ProductsApi.new
|
|
473
|
+
id = 'x7Kp2QaZ' # String |
|
|
474
|
+
|
|
475
|
+
begin
|
|
476
|
+
# Reset a test product
|
|
477
|
+
result = api_instance.reset_product(id)
|
|
478
|
+
p result
|
|
479
|
+
rescue LicenseManager::ApiError => e
|
|
480
|
+
puts "Error when calling ProductsApi->reset_product: #{e}"
|
|
481
|
+
end
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
#### Using the reset_product_with_http_info variant
|
|
485
|
+
|
|
486
|
+
This returns an Array which contains the response data, status code and headers.
|
|
487
|
+
|
|
488
|
+
> <Array(<Product>, Integer, Hash)> reset_product_with_http_info(id)
|
|
489
|
+
|
|
490
|
+
```ruby
|
|
491
|
+
begin
|
|
492
|
+
# Reset a test product
|
|
493
|
+
data, status_code, headers = api_instance.reset_product_with_http_info(id)
|
|
494
|
+
p status_code # => 2xx
|
|
495
|
+
p headers # => { ... }
|
|
496
|
+
p data # => <Product>
|
|
497
|
+
rescue LicenseManager::ApiError => e
|
|
498
|
+
puts "Error when calling ProductsApi->reset_product_with_http_info: #{e}"
|
|
499
|
+
end
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
### Parameters
|
|
503
|
+
|
|
504
|
+
| Name | Type | Description | Notes |
|
|
505
|
+
| ---- | ---- | ----------- | ----- |
|
|
506
|
+
| **id** | **String** | | |
|
|
507
|
+
|
|
508
|
+
### Return type
|
|
509
|
+
|
|
510
|
+
[**Product**](Product.md)
|
|
511
|
+
|
|
512
|
+
### Authorization
|
|
513
|
+
|
|
514
|
+
[apiKey](../README.md#apiKey)
|
|
515
|
+
|
|
516
|
+
### HTTP request headers
|
|
517
|
+
|
|
518
|
+
- **Content-Type**: Not defined
|
|
519
|
+
- **Accept**: application/json
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
## update_product
|
|
523
|
+
|
|
524
|
+
> <Product> update_product(id, update_product)
|
|
525
|
+
|
|
526
|
+
Update a product
|
|
527
|
+
|
|
528
|
+
A product can't be turned into a test product, or back: `isTestFromProductId` can't be changed. **Required role permission**: `product:update` when called with a session, granted by the member's role. API keys aren't limited by roles.
|
|
529
|
+
|
|
530
|
+
### Examples
|
|
531
|
+
|
|
532
|
+
```ruby
|
|
533
|
+
require 'time'
|
|
534
|
+
require 'license_manager'
|
|
535
|
+
# setup authorization
|
|
536
|
+
LicenseManager.configure do |config|
|
|
537
|
+
# Configure API key authorization: apiKey
|
|
538
|
+
config.api_key['x-api-key'] = 'YOUR API KEY'
|
|
539
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
540
|
+
# config.api_key_prefix['x-api-key'] = 'Bearer'
|
|
541
|
+
end
|
|
542
|
+
|
|
543
|
+
api_instance = LicenseManager::ProductsApi.new
|
|
544
|
+
id = 'x7Kp2QaZ' # String |
|
|
545
|
+
update_product = LicenseManager::UpdateProduct.new # UpdateProduct |
|
|
546
|
+
|
|
547
|
+
begin
|
|
548
|
+
# Update a product
|
|
549
|
+
result = api_instance.update_product(id, update_product)
|
|
550
|
+
p result
|
|
551
|
+
rescue LicenseManager::ApiError => e
|
|
552
|
+
puts "Error when calling ProductsApi->update_product: #{e}"
|
|
553
|
+
end
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
#### Using the update_product_with_http_info variant
|
|
557
|
+
|
|
558
|
+
This returns an Array which contains the response data, status code and headers.
|
|
559
|
+
|
|
560
|
+
> <Array(<Product>, Integer, Hash)> update_product_with_http_info(id, update_product)
|
|
561
|
+
|
|
562
|
+
```ruby
|
|
563
|
+
begin
|
|
564
|
+
# Update a product
|
|
565
|
+
data, status_code, headers = api_instance.update_product_with_http_info(id, update_product)
|
|
566
|
+
p status_code # => 2xx
|
|
567
|
+
p headers # => { ... }
|
|
568
|
+
p data # => <Product>
|
|
569
|
+
rescue LicenseManager::ApiError => e
|
|
570
|
+
puts "Error when calling ProductsApi->update_product_with_http_info: #{e}"
|
|
571
|
+
end
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
### Parameters
|
|
575
|
+
|
|
576
|
+
| Name | Type | Description | Notes |
|
|
577
|
+
| ---- | ---- | ----------- | ----- |
|
|
578
|
+
| **id** | **String** | | |
|
|
579
|
+
| **update_product** | [**UpdateProduct**](UpdateProduct.md) | | |
|
|
580
|
+
|
|
581
|
+
### Return type
|
|
582
|
+
|
|
583
|
+
[**Product**](Product.md)
|
|
584
|
+
|
|
585
|
+
### Authorization
|
|
586
|
+
|
|
587
|
+
[apiKey](../README.md#apiKey)
|
|
588
|
+
|
|
589
|
+
### HTTP request headers
|
|
590
|
+
|
|
591
|
+
- **Content-Type**: application/json
|
|
592
|
+
- **Accept**: application/json
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
## upload_product_logo
|
|
596
|
+
|
|
597
|
+
> <Product> upload_product_logo(id, file)
|
|
598
|
+
|
|
599
|
+
Upload a product logo
|
|
600
|
+
|
|
601
|
+
Replaces the logo of the product, shown in the web app and the customer portal. The previous logo is deleted. Accepts WebP, PNG, JPEG and SVG images up to 1 MB, recognized by their content. Logos are shown in squares: use square images, 256×256 pixels for bitmaps. The web app crops and resizes images to this size, and converts them to WebP, before uploading them. **Required role permission**: `product:update` when called with a session, granted by the member's role. API keys aren't limited by roles.
|
|
602
|
+
|
|
603
|
+
### Examples
|
|
604
|
+
|
|
605
|
+
```ruby
|
|
606
|
+
require 'time'
|
|
607
|
+
require 'license_manager'
|
|
608
|
+
# setup authorization
|
|
609
|
+
LicenseManager.configure do |config|
|
|
610
|
+
# Configure API key authorization: apiKey
|
|
611
|
+
config.api_key['x-api-key'] = 'YOUR API KEY'
|
|
612
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
613
|
+
# config.api_key_prefix['x-api-key'] = 'Bearer'
|
|
614
|
+
end
|
|
615
|
+
|
|
616
|
+
api_instance = LicenseManager::ProductsApi.new
|
|
617
|
+
id = 'x7Kp2QaZ' # String |
|
|
618
|
+
file = File.new('/path/to/some/file') # File | WebP, PNG, JPEG or SVG image, up to 1 MB.
|
|
619
|
+
|
|
620
|
+
begin
|
|
621
|
+
# Upload a product logo
|
|
622
|
+
result = api_instance.upload_product_logo(id, file)
|
|
623
|
+
p result
|
|
624
|
+
rescue LicenseManager::ApiError => e
|
|
625
|
+
puts "Error when calling ProductsApi->upload_product_logo: #{e}"
|
|
626
|
+
end
|
|
627
|
+
```
|
|
628
|
+
|
|
629
|
+
#### Using the upload_product_logo_with_http_info variant
|
|
630
|
+
|
|
631
|
+
This returns an Array which contains the response data, status code and headers.
|
|
632
|
+
|
|
633
|
+
> <Array(<Product>, Integer, Hash)> upload_product_logo_with_http_info(id, file)
|
|
634
|
+
|
|
635
|
+
```ruby
|
|
636
|
+
begin
|
|
637
|
+
# Upload a product logo
|
|
638
|
+
data, status_code, headers = api_instance.upload_product_logo_with_http_info(id, file)
|
|
639
|
+
p status_code # => 2xx
|
|
640
|
+
p headers # => { ... }
|
|
641
|
+
p data # => <Product>
|
|
642
|
+
rescue LicenseManager::ApiError => e
|
|
643
|
+
puts "Error when calling ProductsApi->upload_product_logo_with_http_info: #{e}"
|
|
644
|
+
end
|
|
645
|
+
```
|
|
646
|
+
|
|
647
|
+
### Parameters
|
|
648
|
+
|
|
649
|
+
| Name | Type | Description | Notes |
|
|
650
|
+
| ---- | ---- | ----------- | ----- |
|
|
651
|
+
| **id** | **String** | | |
|
|
652
|
+
| **file** | **File** | WebP, PNG, JPEG or SVG image, up to 1 MB. | |
|
|
653
|
+
|
|
654
|
+
### Return type
|
|
655
|
+
|
|
656
|
+
[**Product**](Product.md)
|
|
657
|
+
|
|
658
|
+
### Authorization
|
|
659
|
+
|
|
660
|
+
[apiKey](../README.md#apiKey)
|
|
661
|
+
|
|
662
|
+
### HTTP request headers
|
|
663
|
+
|
|
664
|
+
- **Content-Type**: multipart/form-data
|
|
665
|
+
- **Accept**: application/json
|
|
666
|
+
|
data/docs/Release.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# LicenseManager::Release
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | |
|
|
8
|
+
| **product_id** | **String** | | |
|
|
9
|
+
| **version** | **String** | | |
|
|
10
|
+
| **released_at** | **Time** | | |
|
|
11
|
+
| **created_at** | **Time** | | |
|
|
12
|
+
| **active_machine_count** | **Integer** | Number of active machines of the product's licenses running this version: the ones whose `version` is exactly the release's, so `v2.3.1` doesn't count for `2.3.1`. | |
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
require 'license_manager'
|
|
18
|
+
|
|
19
|
+
instance = LicenseManager::Release.new(
|
|
20
|
+
id: r4Lm8VwX,
|
|
21
|
+
product_id: x7Kp2QaZ,
|
|
22
|
+
version: 2.3.1,
|
|
23
|
+
released_at: 2026-03-01T12:00:00.000Z,
|
|
24
|
+
created_at: 2026-03-01T12:00:00.000Z,
|
|
25
|
+
active_machine_count: 12
|
|
26
|
+
)
|
|
27
|
+
```
|
|
28
|
+
|
data/docs/ReleaseList.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# LicenseManager::ReleaseList
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **data** | [**Array<Release>**](Release.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::ReleaseList.new(
|
|
16
|
+
data: null,
|
|
17
|
+
pagination: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|