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
|
@@ -0,0 +1,587 @@
|
|
|
1
|
+
# LicenseManager::IntegrationsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.licensemanager.dev*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**check_integration**](IntegrationsApi.md#check_integration) | **POST** /v1/integrations/{id}/check | Check an integration |
|
|
8
|
+
| [**connect_stripe**](IntegrationsApi.md#connect_stripe) | **PUT** /v1/products/{productId}/integrations/stripe | Connect Stripe |
|
|
9
|
+
| [**create_stripe_mapping**](IntegrationsApi.md#create_stripe_mapping) | **POST** /v1/products/{productId}/integrations/stripe/mappings | Map a Stripe price to a policy |
|
|
10
|
+
| [**delete_stripe_mapping**](IntegrationsApi.md#delete_stripe_mapping) | **DELETE** /v1/integration-mappings/{id} | Delete a mapping |
|
|
11
|
+
| [**disconnect_integration**](IntegrationsApi.md#disconnect_integration) | **DELETE** /v1/integrations/{id} | Disconnect an integration |
|
|
12
|
+
| [**get_stripe_integration**](IntegrationsApi.md#get_stripe_integration) | **GET** /v1/products/{productId}/integrations/stripe | Get the Stripe integration of a product |
|
|
13
|
+
| [**list_stripe_prices**](IntegrationsApi.md#list_stripe_prices) | **GET** /v1/integrations/{id}/stripe/prices | List the Stripe prices of an integration |
|
|
14
|
+
| [**update_stripe_mapping**](IntegrationsApi.md#update_stripe_mapping) | **PATCH** /v1/integration-mappings/{id} | Change the policy of a mapping |
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## check_integration
|
|
18
|
+
|
|
19
|
+
> <Integration> check_integration(id)
|
|
20
|
+
|
|
21
|
+
Check an integration
|
|
22
|
+
|
|
23
|
+
Checks right away, as done every day, that the API key still works and can manage the webhook endpoint, which is pointed at the server's webhook URL again (or created again when it was deleted). Updates the status. Doesn't accept tokens: only API keys and sessions. **Required role permission**: `integration:update` when called with a session, granted by the member's role. API keys aren't limited by roles.
|
|
24
|
+
|
|
25
|
+
### Examples
|
|
26
|
+
|
|
27
|
+
```ruby
|
|
28
|
+
require 'time'
|
|
29
|
+
require 'license_manager'
|
|
30
|
+
# setup authorization
|
|
31
|
+
LicenseManager.configure do |config|
|
|
32
|
+
# Configure API key authorization: apiKey
|
|
33
|
+
config.api_key['x-api-key'] = 'YOUR API KEY'
|
|
34
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
35
|
+
# config.api_key_prefix['x-api-key'] = 'Bearer'
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
api_instance = LicenseManager::IntegrationsApi.new
|
|
39
|
+
id = 'i8Fz4QnRt' # String |
|
|
40
|
+
|
|
41
|
+
begin
|
|
42
|
+
# Check an integration
|
|
43
|
+
result = api_instance.check_integration(id)
|
|
44
|
+
p result
|
|
45
|
+
rescue LicenseManager::ApiError => e
|
|
46
|
+
puts "Error when calling IntegrationsApi->check_integration: #{e}"
|
|
47
|
+
end
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
#### Using the check_integration_with_http_info variant
|
|
51
|
+
|
|
52
|
+
This returns an Array which contains the response data, status code and headers.
|
|
53
|
+
|
|
54
|
+
> <Array(<Integration>, Integer, Hash)> check_integration_with_http_info(id)
|
|
55
|
+
|
|
56
|
+
```ruby
|
|
57
|
+
begin
|
|
58
|
+
# Check an integration
|
|
59
|
+
data, status_code, headers = api_instance.check_integration_with_http_info(id)
|
|
60
|
+
p status_code # => 2xx
|
|
61
|
+
p headers # => { ... }
|
|
62
|
+
p data # => <Integration>
|
|
63
|
+
rescue LicenseManager::ApiError => e
|
|
64
|
+
puts "Error when calling IntegrationsApi->check_integration_with_http_info: #{e}"
|
|
65
|
+
end
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Parameters
|
|
69
|
+
|
|
70
|
+
| Name | Type | Description | Notes |
|
|
71
|
+
| ---- | ---- | ----------- | ----- |
|
|
72
|
+
| **id** | **String** | | |
|
|
73
|
+
|
|
74
|
+
### Return type
|
|
75
|
+
|
|
76
|
+
[**Integration**](Integration.md)
|
|
77
|
+
|
|
78
|
+
### Authorization
|
|
79
|
+
|
|
80
|
+
[apiKey](../README.md#apiKey)
|
|
81
|
+
|
|
82
|
+
### HTTP request headers
|
|
83
|
+
|
|
84
|
+
- **Content-Type**: Not defined
|
|
85
|
+
- **Accept**: application/json
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
## connect_stripe
|
|
89
|
+
|
|
90
|
+
> <StripeIntegration> connect_stripe(product_id, connect_stripe)
|
|
91
|
+
|
|
92
|
+
Connect Stripe
|
|
93
|
+
|
|
94
|
+
Connects the Stripe account of the API key for the organization's products of the product's mode, or replaces the key of the existing connection. Checks the key works and has the required permissions, then creates a webhook endpoint on the account, telling the app about payments. Doesn't accept tokens: only API keys and sessions. **Required role permission**: `integration:create` when called with a session, granted by the member's role. API keys aren't limited by roles.
|
|
95
|
+
|
|
96
|
+
### Examples
|
|
97
|
+
|
|
98
|
+
```ruby
|
|
99
|
+
require 'time'
|
|
100
|
+
require 'license_manager'
|
|
101
|
+
# setup authorization
|
|
102
|
+
LicenseManager.configure do |config|
|
|
103
|
+
# Configure API key authorization: apiKey
|
|
104
|
+
config.api_key['x-api-key'] = 'YOUR API KEY'
|
|
105
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
106
|
+
# config.api_key_prefix['x-api-key'] = 'Bearer'
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
api_instance = LicenseManager::IntegrationsApi.new
|
|
110
|
+
product_id = 'x7Kp2QaZ' # String |
|
|
111
|
+
connect_stripe = LicenseManager::ConnectStripe.new({api_key: 'rk_live_51Nv0FG…'}) # ConnectStripe |
|
|
112
|
+
|
|
113
|
+
begin
|
|
114
|
+
# Connect Stripe
|
|
115
|
+
result = api_instance.connect_stripe(product_id, connect_stripe)
|
|
116
|
+
p result
|
|
117
|
+
rescue LicenseManager::ApiError => e
|
|
118
|
+
puts "Error when calling IntegrationsApi->connect_stripe: #{e}"
|
|
119
|
+
end
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
#### Using the connect_stripe_with_http_info variant
|
|
123
|
+
|
|
124
|
+
This returns an Array which contains the response data, status code and headers.
|
|
125
|
+
|
|
126
|
+
> <Array(<StripeIntegration>, Integer, Hash)> connect_stripe_with_http_info(product_id, connect_stripe)
|
|
127
|
+
|
|
128
|
+
```ruby
|
|
129
|
+
begin
|
|
130
|
+
# Connect Stripe
|
|
131
|
+
data, status_code, headers = api_instance.connect_stripe_with_http_info(product_id, connect_stripe)
|
|
132
|
+
p status_code # => 2xx
|
|
133
|
+
p headers # => { ... }
|
|
134
|
+
p data # => <StripeIntegration>
|
|
135
|
+
rescue LicenseManager::ApiError => e
|
|
136
|
+
puts "Error when calling IntegrationsApi->connect_stripe_with_http_info: #{e}"
|
|
137
|
+
end
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Parameters
|
|
141
|
+
|
|
142
|
+
| Name | Type | Description | Notes |
|
|
143
|
+
| ---- | ---- | ----------- | ----- |
|
|
144
|
+
| **product_id** | **String** | | |
|
|
145
|
+
| **connect_stripe** | [**ConnectStripe**](ConnectStripe.md) | | |
|
|
146
|
+
|
|
147
|
+
### Return type
|
|
148
|
+
|
|
149
|
+
[**StripeIntegration**](StripeIntegration.md)
|
|
150
|
+
|
|
151
|
+
### Authorization
|
|
152
|
+
|
|
153
|
+
[apiKey](../README.md#apiKey)
|
|
154
|
+
|
|
155
|
+
### HTTP request headers
|
|
156
|
+
|
|
157
|
+
- **Content-Type**: application/json
|
|
158
|
+
- **Accept**: application/json
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
## create_stripe_mapping
|
|
162
|
+
|
|
163
|
+
> <IntegrationMapping> create_stripe_mapping(product_id, create_integration_mapping)
|
|
164
|
+
|
|
165
|
+
Map a Stripe price to a policy
|
|
166
|
+
|
|
167
|
+
Paying the price then creates licenses of the product with the policy: one per unit bought. Doesn't accept tokens: only API keys and sessions. **Required role permission**: `integration:update` when called with a session, granted by the member's role. API keys aren't limited by roles.
|
|
168
|
+
|
|
169
|
+
### Examples
|
|
170
|
+
|
|
171
|
+
```ruby
|
|
172
|
+
require 'time'
|
|
173
|
+
require 'license_manager'
|
|
174
|
+
# setup authorization
|
|
175
|
+
LicenseManager.configure do |config|
|
|
176
|
+
# Configure API key authorization: apiKey
|
|
177
|
+
config.api_key['x-api-key'] = 'YOUR API KEY'
|
|
178
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
179
|
+
# config.api_key_prefix['x-api-key'] = 'Bearer'
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
api_instance = LicenseManager::IntegrationsApi.new
|
|
183
|
+
product_id = 'x7Kp2QaZ' # String |
|
|
184
|
+
create_integration_mapping = LicenseManager::CreateIntegrationMapping.new({stripe_price_id: 'price_1MoBy5LkdIwHu7ix', policy_id: 'p4Rt8LmQ'}) # CreateIntegrationMapping |
|
|
185
|
+
|
|
186
|
+
begin
|
|
187
|
+
# Map a Stripe price to a policy
|
|
188
|
+
result = api_instance.create_stripe_mapping(product_id, create_integration_mapping)
|
|
189
|
+
p result
|
|
190
|
+
rescue LicenseManager::ApiError => e
|
|
191
|
+
puts "Error when calling IntegrationsApi->create_stripe_mapping: #{e}"
|
|
192
|
+
end
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
#### Using the create_stripe_mapping_with_http_info variant
|
|
196
|
+
|
|
197
|
+
This returns an Array which contains the response data, status code and headers.
|
|
198
|
+
|
|
199
|
+
> <Array(<IntegrationMapping>, Integer, Hash)> create_stripe_mapping_with_http_info(product_id, create_integration_mapping)
|
|
200
|
+
|
|
201
|
+
```ruby
|
|
202
|
+
begin
|
|
203
|
+
# Map a Stripe price to a policy
|
|
204
|
+
data, status_code, headers = api_instance.create_stripe_mapping_with_http_info(product_id, create_integration_mapping)
|
|
205
|
+
p status_code # => 2xx
|
|
206
|
+
p headers # => { ... }
|
|
207
|
+
p data # => <IntegrationMapping>
|
|
208
|
+
rescue LicenseManager::ApiError => e
|
|
209
|
+
puts "Error when calling IntegrationsApi->create_stripe_mapping_with_http_info: #{e}"
|
|
210
|
+
end
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Parameters
|
|
214
|
+
|
|
215
|
+
| Name | Type | Description | Notes |
|
|
216
|
+
| ---- | ---- | ----------- | ----- |
|
|
217
|
+
| **product_id** | **String** | | |
|
|
218
|
+
| **create_integration_mapping** | [**CreateIntegrationMapping**](CreateIntegrationMapping.md) | | |
|
|
219
|
+
|
|
220
|
+
### Return type
|
|
221
|
+
|
|
222
|
+
[**IntegrationMapping**](IntegrationMapping.md)
|
|
223
|
+
|
|
224
|
+
### Authorization
|
|
225
|
+
|
|
226
|
+
[apiKey](../README.md#apiKey)
|
|
227
|
+
|
|
228
|
+
### HTTP request headers
|
|
229
|
+
|
|
230
|
+
- **Content-Type**: application/json
|
|
231
|
+
- **Accept**: application/json
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
## delete_stripe_mapping
|
|
235
|
+
|
|
236
|
+
> delete_stripe_mapping(id)
|
|
237
|
+
|
|
238
|
+
Delete a mapping
|
|
239
|
+
|
|
240
|
+
Paying the price no longer creates licenses. The licenses it created stay. Doesn't accept tokens: only API keys and sessions. **Required role permission**: `integration:update` when called with a session, granted by the member's role. API keys aren't limited by roles.
|
|
241
|
+
|
|
242
|
+
### Examples
|
|
243
|
+
|
|
244
|
+
```ruby
|
|
245
|
+
require 'time'
|
|
246
|
+
require 'license_manager'
|
|
247
|
+
# setup authorization
|
|
248
|
+
LicenseManager.configure do |config|
|
|
249
|
+
# Configure API key authorization: apiKey
|
|
250
|
+
config.api_key['x-api-key'] = 'YOUR API KEY'
|
|
251
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
252
|
+
# config.api_key_prefix['x-api-key'] = 'Bearer'
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
api_instance = LicenseManager::IntegrationsApi.new
|
|
256
|
+
id = 'i8Fz4QnRt' # String |
|
|
257
|
+
|
|
258
|
+
begin
|
|
259
|
+
# Delete a mapping
|
|
260
|
+
api_instance.delete_stripe_mapping(id)
|
|
261
|
+
rescue LicenseManager::ApiError => e
|
|
262
|
+
puts "Error when calling IntegrationsApi->delete_stripe_mapping: #{e}"
|
|
263
|
+
end
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
#### Using the delete_stripe_mapping_with_http_info variant
|
|
267
|
+
|
|
268
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
269
|
+
|
|
270
|
+
> <Array(nil, Integer, Hash)> delete_stripe_mapping_with_http_info(id)
|
|
271
|
+
|
|
272
|
+
```ruby
|
|
273
|
+
begin
|
|
274
|
+
# Delete a mapping
|
|
275
|
+
data, status_code, headers = api_instance.delete_stripe_mapping_with_http_info(id)
|
|
276
|
+
p status_code # => 2xx
|
|
277
|
+
p headers # => { ... }
|
|
278
|
+
p data # => nil
|
|
279
|
+
rescue LicenseManager::ApiError => e
|
|
280
|
+
puts "Error when calling IntegrationsApi->delete_stripe_mapping_with_http_info: #{e}"
|
|
281
|
+
end
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### Parameters
|
|
285
|
+
|
|
286
|
+
| Name | Type | Description | Notes |
|
|
287
|
+
| ---- | ---- | ----------- | ----- |
|
|
288
|
+
| **id** | **String** | | |
|
|
289
|
+
|
|
290
|
+
### Return type
|
|
291
|
+
|
|
292
|
+
nil (empty response body)
|
|
293
|
+
|
|
294
|
+
### Authorization
|
|
295
|
+
|
|
296
|
+
[apiKey](../README.md#apiKey)
|
|
297
|
+
|
|
298
|
+
### HTTP request headers
|
|
299
|
+
|
|
300
|
+
- **Content-Type**: Not defined
|
|
301
|
+
- **Accept**: application/json
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
## disconnect_integration
|
|
305
|
+
|
|
306
|
+
> disconnect_integration(id)
|
|
307
|
+
|
|
308
|
+
Disconnect an integration
|
|
309
|
+
|
|
310
|
+
Deletes the webhook endpoint from the Stripe account first, then the integration with its mappings, for every product. The endpoint is skipped when it's already gone or the key no longer works; otherwise, when it can't be deleted, the integration is kept. The licenses it created stay. Revoke the API key in Stripe afterwards. Doesn't accept tokens: only API keys and sessions. **Required role permission**: `integration:delete` when called with a session, granted by the member's role. API keys aren't limited by roles.
|
|
311
|
+
|
|
312
|
+
### Examples
|
|
313
|
+
|
|
314
|
+
```ruby
|
|
315
|
+
require 'time'
|
|
316
|
+
require 'license_manager'
|
|
317
|
+
# setup authorization
|
|
318
|
+
LicenseManager.configure do |config|
|
|
319
|
+
# Configure API key authorization: apiKey
|
|
320
|
+
config.api_key['x-api-key'] = 'YOUR API KEY'
|
|
321
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
322
|
+
# config.api_key_prefix['x-api-key'] = 'Bearer'
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
api_instance = LicenseManager::IntegrationsApi.new
|
|
326
|
+
id = 'i8Fz4QnRt' # String |
|
|
327
|
+
|
|
328
|
+
begin
|
|
329
|
+
# Disconnect an integration
|
|
330
|
+
api_instance.disconnect_integration(id)
|
|
331
|
+
rescue LicenseManager::ApiError => e
|
|
332
|
+
puts "Error when calling IntegrationsApi->disconnect_integration: #{e}"
|
|
333
|
+
end
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
#### Using the disconnect_integration_with_http_info variant
|
|
337
|
+
|
|
338
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
339
|
+
|
|
340
|
+
> <Array(nil, Integer, Hash)> disconnect_integration_with_http_info(id)
|
|
341
|
+
|
|
342
|
+
```ruby
|
|
343
|
+
begin
|
|
344
|
+
# Disconnect an integration
|
|
345
|
+
data, status_code, headers = api_instance.disconnect_integration_with_http_info(id)
|
|
346
|
+
p status_code # => 2xx
|
|
347
|
+
p headers # => { ... }
|
|
348
|
+
p data # => nil
|
|
349
|
+
rescue LicenseManager::ApiError => e
|
|
350
|
+
puts "Error when calling IntegrationsApi->disconnect_integration_with_http_info: #{e}"
|
|
351
|
+
end
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
### Parameters
|
|
355
|
+
|
|
356
|
+
| Name | Type | Description | Notes |
|
|
357
|
+
| ---- | ---- | ----------- | ----- |
|
|
358
|
+
| **id** | **String** | | |
|
|
359
|
+
|
|
360
|
+
### Return type
|
|
361
|
+
|
|
362
|
+
nil (empty response body)
|
|
363
|
+
|
|
364
|
+
### Authorization
|
|
365
|
+
|
|
366
|
+
[apiKey](../README.md#apiKey)
|
|
367
|
+
|
|
368
|
+
### HTTP request headers
|
|
369
|
+
|
|
370
|
+
- **Content-Type**: Not defined
|
|
371
|
+
- **Accept**: application/json
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
## get_stripe_integration
|
|
375
|
+
|
|
376
|
+
> <StripeIntegration> get_stripe_integration(product_id)
|
|
377
|
+
|
|
378
|
+
Get the Stripe integration of a product
|
|
379
|
+
|
|
380
|
+
The organization connects one Stripe account for its live products, and one in test mode for its test products. Its mappings tell which Stripe prices create licenses of the product. Doesn't accept tokens: only API keys and sessions.
|
|
381
|
+
|
|
382
|
+
### Examples
|
|
383
|
+
|
|
384
|
+
```ruby
|
|
385
|
+
require 'time'
|
|
386
|
+
require 'license_manager'
|
|
387
|
+
# setup authorization
|
|
388
|
+
LicenseManager.configure do |config|
|
|
389
|
+
# Configure API key authorization: apiKey
|
|
390
|
+
config.api_key['x-api-key'] = 'YOUR API KEY'
|
|
391
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
392
|
+
# config.api_key_prefix['x-api-key'] = 'Bearer'
|
|
393
|
+
end
|
|
394
|
+
|
|
395
|
+
api_instance = LicenseManager::IntegrationsApi.new
|
|
396
|
+
product_id = 'x7Kp2QaZ' # String |
|
|
397
|
+
|
|
398
|
+
begin
|
|
399
|
+
# Get the Stripe integration of a product
|
|
400
|
+
result = api_instance.get_stripe_integration(product_id)
|
|
401
|
+
p result
|
|
402
|
+
rescue LicenseManager::ApiError => e
|
|
403
|
+
puts "Error when calling IntegrationsApi->get_stripe_integration: #{e}"
|
|
404
|
+
end
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
#### Using the get_stripe_integration_with_http_info variant
|
|
408
|
+
|
|
409
|
+
This returns an Array which contains the response data, status code and headers.
|
|
410
|
+
|
|
411
|
+
> <Array(<StripeIntegration>, Integer, Hash)> get_stripe_integration_with_http_info(product_id)
|
|
412
|
+
|
|
413
|
+
```ruby
|
|
414
|
+
begin
|
|
415
|
+
# Get the Stripe integration of a product
|
|
416
|
+
data, status_code, headers = api_instance.get_stripe_integration_with_http_info(product_id)
|
|
417
|
+
p status_code # => 2xx
|
|
418
|
+
p headers # => { ... }
|
|
419
|
+
p data # => <StripeIntegration>
|
|
420
|
+
rescue LicenseManager::ApiError => e
|
|
421
|
+
puts "Error when calling IntegrationsApi->get_stripe_integration_with_http_info: #{e}"
|
|
422
|
+
end
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
### Parameters
|
|
426
|
+
|
|
427
|
+
| Name | Type | Description | Notes |
|
|
428
|
+
| ---- | ---- | ----------- | ----- |
|
|
429
|
+
| **product_id** | **String** | | |
|
|
430
|
+
|
|
431
|
+
### Return type
|
|
432
|
+
|
|
433
|
+
[**StripeIntegration**](StripeIntegration.md)
|
|
434
|
+
|
|
435
|
+
### Authorization
|
|
436
|
+
|
|
437
|
+
[apiKey](../README.md#apiKey)
|
|
438
|
+
|
|
439
|
+
### HTTP request headers
|
|
440
|
+
|
|
441
|
+
- **Content-Type**: Not defined
|
|
442
|
+
- **Accept**: application/json
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
## list_stripe_prices
|
|
446
|
+
|
|
447
|
+
> <ListStripePrices200Response> list_stripe_prices(id)
|
|
448
|
+
|
|
449
|
+
List the Stripe prices of an integration
|
|
450
|
+
|
|
451
|
+
Active one-time prices of active products of the Stripe account, the ones that can be mapped, up to 500. Doesn't accept tokens: only API keys and sessions.
|
|
452
|
+
|
|
453
|
+
### Examples
|
|
454
|
+
|
|
455
|
+
```ruby
|
|
456
|
+
require 'time'
|
|
457
|
+
require 'license_manager'
|
|
458
|
+
# setup authorization
|
|
459
|
+
LicenseManager.configure do |config|
|
|
460
|
+
# Configure API key authorization: apiKey
|
|
461
|
+
config.api_key['x-api-key'] = 'YOUR API KEY'
|
|
462
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
463
|
+
# config.api_key_prefix['x-api-key'] = 'Bearer'
|
|
464
|
+
end
|
|
465
|
+
|
|
466
|
+
api_instance = LicenseManager::IntegrationsApi.new
|
|
467
|
+
id = 'i8Fz4QnRt' # String |
|
|
468
|
+
|
|
469
|
+
begin
|
|
470
|
+
# List the Stripe prices of an integration
|
|
471
|
+
result = api_instance.list_stripe_prices(id)
|
|
472
|
+
p result
|
|
473
|
+
rescue LicenseManager::ApiError => e
|
|
474
|
+
puts "Error when calling IntegrationsApi->list_stripe_prices: #{e}"
|
|
475
|
+
end
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
#### Using the list_stripe_prices_with_http_info variant
|
|
479
|
+
|
|
480
|
+
This returns an Array which contains the response data, status code and headers.
|
|
481
|
+
|
|
482
|
+
> <Array(<ListStripePrices200Response>, Integer, Hash)> list_stripe_prices_with_http_info(id)
|
|
483
|
+
|
|
484
|
+
```ruby
|
|
485
|
+
begin
|
|
486
|
+
# List the Stripe prices of an integration
|
|
487
|
+
data, status_code, headers = api_instance.list_stripe_prices_with_http_info(id)
|
|
488
|
+
p status_code # => 2xx
|
|
489
|
+
p headers # => { ... }
|
|
490
|
+
p data # => <ListStripePrices200Response>
|
|
491
|
+
rescue LicenseManager::ApiError => e
|
|
492
|
+
puts "Error when calling IntegrationsApi->list_stripe_prices_with_http_info: #{e}"
|
|
493
|
+
end
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
### Parameters
|
|
497
|
+
|
|
498
|
+
| Name | Type | Description | Notes |
|
|
499
|
+
| ---- | ---- | ----------- | ----- |
|
|
500
|
+
| **id** | **String** | | |
|
|
501
|
+
|
|
502
|
+
### Return type
|
|
503
|
+
|
|
504
|
+
[**ListStripePrices200Response**](ListStripePrices200Response.md)
|
|
505
|
+
|
|
506
|
+
### Authorization
|
|
507
|
+
|
|
508
|
+
[apiKey](../README.md#apiKey)
|
|
509
|
+
|
|
510
|
+
### HTTP request headers
|
|
511
|
+
|
|
512
|
+
- **Content-Type**: Not defined
|
|
513
|
+
- **Accept**: application/json
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
## update_stripe_mapping
|
|
517
|
+
|
|
518
|
+
> <IntegrationMapping> update_stripe_mapping(id, update_integration_mapping)
|
|
519
|
+
|
|
520
|
+
Change the policy of a mapping
|
|
521
|
+
|
|
522
|
+
Only affects the licenses created afterwards. Doesn't accept tokens: only API keys and sessions. **Required role permission**: `integration:update` when called with a session, granted by the member's role. API keys aren't limited by roles.
|
|
523
|
+
|
|
524
|
+
### Examples
|
|
525
|
+
|
|
526
|
+
```ruby
|
|
527
|
+
require 'time'
|
|
528
|
+
require 'license_manager'
|
|
529
|
+
# setup authorization
|
|
530
|
+
LicenseManager.configure do |config|
|
|
531
|
+
# Configure API key authorization: apiKey
|
|
532
|
+
config.api_key['x-api-key'] = 'YOUR API KEY'
|
|
533
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
534
|
+
# config.api_key_prefix['x-api-key'] = 'Bearer'
|
|
535
|
+
end
|
|
536
|
+
|
|
537
|
+
api_instance = LicenseManager::IntegrationsApi.new
|
|
538
|
+
id = 'i8Fz4QnRt' # String |
|
|
539
|
+
update_integration_mapping = LicenseManager::UpdateIntegrationMapping.new({policy_id: 'p4Rt8LmQ'}) # UpdateIntegrationMapping |
|
|
540
|
+
|
|
541
|
+
begin
|
|
542
|
+
# Change the policy of a mapping
|
|
543
|
+
result = api_instance.update_stripe_mapping(id, update_integration_mapping)
|
|
544
|
+
p result
|
|
545
|
+
rescue LicenseManager::ApiError => e
|
|
546
|
+
puts "Error when calling IntegrationsApi->update_stripe_mapping: #{e}"
|
|
547
|
+
end
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
#### Using the update_stripe_mapping_with_http_info variant
|
|
551
|
+
|
|
552
|
+
This returns an Array which contains the response data, status code and headers.
|
|
553
|
+
|
|
554
|
+
> <Array(<IntegrationMapping>, Integer, Hash)> update_stripe_mapping_with_http_info(id, update_integration_mapping)
|
|
555
|
+
|
|
556
|
+
```ruby
|
|
557
|
+
begin
|
|
558
|
+
# Change the policy of a mapping
|
|
559
|
+
data, status_code, headers = api_instance.update_stripe_mapping_with_http_info(id, update_integration_mapping)
|
|
560
|
+
p status_code # => 2xx
|
|
561
|
+
p headers # => { ... }
|
|
562
|
+
p data # => <IntegrationMapping>
|
|
563
|
+
rescue LicenseManager::ApiError => e
|
|
564
|
+
puts "Error when calling IntegrationsApi->update_stripe_mapping_with_http_info: #{e}"
|
|
565
|
+
end
|
|
566
|
+
```
|
|
567
|
+
|
|
568
|
+
### Parameters
|
|
569
|
+
|
|
570
|
+
| Name | Type | Description | Notes |
|
|
571
|
+
| ---- | ---- | ----------- | ----- |
|
|
572
|
+
| **id** | **String** | | |
|
|
573
|
+
| **update_integration_mapping** | [**UpdateIntegrationMapping**](UpdateIntegrationMapping.md) | | |
|
|
574
|
+
|
|
575
|
+
### Return type
|
|
576
|
+
|
|
577
|
+
[**IntegrationMapping**](IntegrationMapping.md)
|
|
578
|
+
|
|
579
|
+
### Authorization
|
|
580
|
+
|
|
581
|
+
[apiKey](../README.md#apiKey)
|
|
582
|
+
|
|
583
|
+
### HTTP request headers
|
|
584
|
+
|
|
585
|
+
- **Content-Type**: application/json
|
|
586
|
+
- **Accept**: application/json
|
|
587
|
+
|
data/docs/License.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# LicenseManager::License
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | |
|
|
8
|
+
| **product_id** | **String** | | |
|
|
9
|
+
| **policy_id** | **String** | | |
|
|
10
|
+
| **customer_id** | **String** | | |
|
|
11
|
+
| **key** | **String** | Unique within the product. Case sensitive: `validateKey` compares keys exactly. | |
|
|
12
|
+
| **created_at** | **Time** | | |
|
|
13
|
+
| **expires_at** | **Time** | `null` when the license never expires. | |
|
|
14
|
+
| **meta** | **Hash<String, Object>** | Free-form JSON object. | |
|
|
15
|
+
| **stripe_payment_intent_id** | **String** | Id of the Stripe payment intent that paid the license, when it was bought through the Stripe integration. `null` otherwise, or when nothing was paid. | |
|
|
16
|
+
| **max_machines** | **Integer** | Maximum number of active machines the license can be used on. `null` when there's no limit. Can be lower than `activeMachineCount` after it was lowered: machines aren't deactivated to match it. | |
|
|
17
|
+
| **max_offline_duration_seconds** | **Integer** | Longest the applications can run offline with the license: the license tokens returned by `validateKey` expire this long after they're issued, unless the license expires sooner. | |
|
|
18
|
+
| **active_machine_count** | **Integer** | Number of active machines the license is used on. | |
|
|
19
|
+
| **last_activated_at** | **Time** | Last time a machine validated the license key. `null` when it was never validated. | |
|
|
20
|
+
| **max_version** | [**LicenseMaxVersion**](LicenseMaxVersion.md) | | |
|
|
21
|
+
| **price** | [**Price**](Price.md) | | |
|
|
22
|
+
| **status** | [**LicenseStatus**](LicenseStatus.md) | | |
|
|
23
|
+
| **updated_at** | **Time** | Last time the license's settings were edited, not when its key was validated. | |
|
|
24
|
+
|
|
25
|
+
## Example
|
|
26
|
+
|
|
27
|
+
```ruby
|
|
28
|
+
require 'license_manager'
|
|
29
|
+
|
|
30
|
+
instance = LicenseManager::License.new(
|
|
31
|
+
id: l3Nv8KwB,
|
|
32
|
+
product_id: x7Kp2QaZ,
|
|
33
|
+
policy_id: p4Rt8LmQ,
|
|
34
|
+
customer_id: c9Wd3RtE,
|
|
35
|
+
key: 7KQ2M-X9ZPA-H4TRC-WN6EY-B3JDF,
|
|
36
|
+
created_at: 2026-01-15T09:30:00.000Z,
|
|
37
|
+
expires_at: 2027-01-15T09:30:00.000Z,
|
|
38
|
+
meta: {seats=5},
|
|
39
|
+
stripe_payment_intent_id: pi_3MtwBwLkdIwHu7ix28a3tqPa,
|
|
40
|
+
max_machines: 3,
|
|
41
|
+
max_offline_duration_seconds: 604800,
|
|
42
|
+
active_machine_count: 2,
|
|
43
|
+
last_activated_at: 2026-03-02T14:05:00.000Z,
|
|
44
|
+
max_version: null,
|
|
45
|
+
price: null,
|
|
46
|
+
status: null,
|
|
47
|
+
updated_at: 2026-01-15T09:30:00.000Z
|
|
48
|
+
)
|
|
49
|
+
```
|
|
50
|
+
|
data/docs/LicenseList.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# LicenseManager::LicenseList
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **data** | [**Array<License>**](License.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::LicenseList.new(
|
|
16
|
+
data: null,
|
|
17
|
+
pagination: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# LicenseManager::LicenseMaxVersion
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **version** | **String** | Hard-coded latest version, taking precedence over `lockMajorAt` and `lockMinorAt`. `\"2\"` allows every 2.y.z version: its minor versions and bug fixes. `\"2.3\"` allows every 2.3.z version: its bug fixes. `null` when it's not hard-coded. | |
|
|
8
|
+
| **lock_major_at** | **Time** | When the major version of the license locks: it then only gets the minor versions and bug fixes of the major version released by then. Once reached, within the hour, the major version of the latest stable release by then is hard-coded in `version`, unless a version already is, and the lock is cleared. A lock reached before any stable release is cleared without hard-coding anything. `null` when it's never locked. | |
|
|
9
|
+
| **lock_minor_at** | **Time** | When the minor version of the license locks: it then only gets the bug fixes of the minor version released by then, within the hard-coded major version when there's one. Never before `lockMajorAt`; without it, the major version locks along with the minor version. Once reached, within the hour, the major and minor version of the latest stable release by then is hard-coded in `version`, unless a minor version already is, and the lock is cleared. A lock reached before any matching stable release is cleared without hard-coding anything. `null` when it's never locked. | |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'license_manager'
|
|
15
|
+
|
|
16
|
+
instance = LicenseManager::LicenseMaxVersion.new(
|
|
17
|
+
version: 2.3,
|
|
18
|
+
lock_major_at: 2026-02-15T09:30:00.000Z,
|
|
19
|
+
lock_minor_at: 2027-01-15T09:30:00.000Z
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|