license_manager 0.1.1 → 0.2.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 +4 -4
- data/CHANGELOG.md +95 -0
- data/README.md +2 -2
- data/docs/CancelLicense.md +22 -0
- data/docs/CancellationReason.md +15 -0
- data/docs/CancellationStats.md +30 -0
- data/docs/CancellationStatsByReasonInner.md +20 -0
- data/docs/ConnectStripe.md +1 -1
- data/docs/CreateLicense.md +2 -0
- data/docs/CreatePolicy.md +3 -1
- data/docs/CreateProductWithPolicy.md +1 -1
- data/docs/CreateToken.md +1 -1
- data/docs/EventActorOneOf.md +1 -1
- data/docs/Integration.md +5 -1
- data/docs/IntegrationsApi.md +74 -0
- data/docs/License.md +10 -0
- data/docs/LicensesApi.md +80 -3
- data/docs/Machine.md +3 -1
- data/docs/MachinesApi.md +1 -1
- data/docs/Policy.md +2 -0
- data/docs/PolicySettings.md +3 -1
- data/docs/PortalApi.md +1 -1
- data/docs/PortalLink.md +2 -2
- data/docs/Product.md +2 -0
- data/docs/ProductStats.md +6 -4
- data/docs/ProductsApi.md +2 -2
- data/docs/Revenue.md +6 -2
- data/docs/StripeIntegration.md +1 -1
- data/docs/StripePermission.md +3 -1
- data/docs/UpdateIntegration.md +18 -0
- data/docs/UpdateLicense.md +3 -1
- data/docs/UpdatePolicy.md +3 -1
- data/docs/UpdateProduct.md +3 -1
- data/lib/license_manager/api/integrations_api.rb +74 -0
- data/lib/license_manager/api/licenses_api.rb +80 -6
- data/lib/license_manager/api/machines_api.rb +3 -3
- data/lib/license_manager/api/portal_api.rb +2 -2
- data/lib/license_manager/api/products_api.rb +4 -4
- data/lib/license_manager/models/cancel_license.rb +238 -0
- data/lib/license_manager/models/cancellation_reason.rb +45 -0
- data/lib/license_manager/models/cancellation_stats.rb +347 -0
- data/lib/license_manager/models/cancellation_stats_by_reason_inner.rb +225 -0
- data/lib/license_manager/models/connect_stripe.rb +1 -1
- data/lib/license_manager/models/create_license.rb +12 -1
- data/lib/license_manager/models/create_policy.rb +40 -5
- data/lib/license_manager/models/create_product_with_policy.rb +1 -1
- data/lib/license_manager/models/create_token.rb +1 -1
- data/lib/license_manager/models/event_type.rb +4 -1
- data/lib/license_manager/models/integration.rb +55 -1
- data/lib/license_manager/models/license.rb +79 -1
- data/lib/license_manager/models/license_status.rb +2 -1
- data/lib/license_manager/models/machine.rb +17 -4
- data/lib/license_manager/models/policy.rb +14 -1
- data/lib/license_manager/models/policy_settings.rb +40 -5
- data/lib/license_manager/models/portal_link.rb +1 -1
- data/lib/license_manager/models/product.rb +28 -1
- data/lib/license_manager/models/product_stats.rb +18 -5
- data/lib/license_manager/models/revenue.rb +58 -4
- data/lib/license_manager/models/stripe_integration.rb +1 -1
- data/lib/license_manager/models/stripe_permission.rb +31 -4
- data/lib/license_manager/models/update_integration.rb +161 -0
- data/lib/license_manager/models/update_license.rb +16 -5
- data/lib/license_manager/models/update_policy.rb +40 -5
- data/lib/license_manager/models/update_product.rb +14 -4
- data/lib/license_manager/version.rb +1 -1
- data/lib/license_manager.rb +5 -0
- data/openapi.json +566 -32
- data/spec/api/integrations_api_spec.rb +13 -0
- data/spec/api/licenses_api_spec.rb +16 -3
- data/spec/api/machines_api_spec.rb +1 -1
- data/spec/api/portal_api_spec.rb +1 -1
- data/spec/api/products_api_spec.rb +2 -2
- data/spec/models/cancel_license_spec.rb +48 -0
- data/spec/models/cancellation_reason_spec.rb +30 -0
- data/spec/models/cancellation_stats_by_reason_inner_spec.rb +42 -0
- data/spec/models/cancellation_stats_spec.rb +72 -0
- data/spec/models/create_license_spec.rb +6 -0
- data/spec/models/create_policy_spec.rb +6 -0
- data/spec/models/create_token_spec.rb +1 -1
- data/spec/models/integration_spec.rb +12 -0
- data/spec/models/license_spec.rb +30 -0
- data/spec/models/machine_spec.rb +7 -1
- data/spec/models/policy_settings_spec.rb +6 -0
- data/spec/models/policy_spec.rb +6 -0
- data/spec/models/product_spec.rb +6 -0
- data/spec/models/product_stats_spec.rb +6 -0
- data/spec/models/revenue_spec.rb +12 -0
- data/spec/models/stripe_permission_spec.rb +6 -0
- data/spec/models/token_spec.rb +1 -1
- data/spec/models/update_integration_spec.rb +36 -0
- data/spec/models/update_license_spec.rb +6 -0
- data/spec/models/update_policy_spec.rb +6 -0
- data/spec/models/update_product_spec.rb +6 -0
- metadata +21 -1
|
@@ -118,6 +118,19 @@ describe 'IntegrationsApi' do
|
|
|
118
118
|
end
|
|
119
119
|
end
|
|
120
120
|
|
|
121
|
+
# unit tests for update_integration
|
|
122
|
+
# Update an integration
|
|
123
|
+
# Changes the settings of the integration, for every product of its mode. 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.
|
|
124
|
+
# @param id
|
|
125
|
+
# @param update_integration
|
|
126
|
+
# @param [Hash] opts the optional parameters
|
|
127
|
+
# @return [Integration]
|
|
128
|
+
describe 'update_integration test' do
|
|
129
|
+
it 'should work' do
|
|
130
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
|
|
121
134
|
# unit tests for update_stripe_mapping
|
|
122
135
|
# Change the policy of a mapping
|
|
123
136
|
# 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.
|
|
@@ -32,9 +32,22 @@ describe 'LicensesApi' do
|
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
+
# unit tests for cancel_license
|
|
36
|
+
# Cancel a license
|
|
37
|
+
# Cancels the license right away: validating its key then fails with `license_expired`, like an expired license, and its status is `canceled`. A cancellation can't be undone. Customers can cancel their licenses until their `cancellableUntil`, the end of their money back guarantee: tokens can't cancel a license past it, or without one. API keys and sessions can cancel any license. When the license was bought through the Stripe integration, its payment is refunded in the background, unless the integration disables `autoRefund`, its API key lacks the optional Refunds: Write permission (`canRefund`), or `refund` is `false`: the refund is its price paid, taxes included, and its id is set as `stripeRefundId`. The customer is emailed a confirmation, and the owners and admins of the organization are told about the cancellation and its refund. In test products, the customer is only emailed when their email is a member's of the organization. Records a `license.canceled` event, then a `license.refunded` or `license.refund_failed` one once the refund is done. **Token access**: customer, license tokens with the `license:cancel` permission (or the matching write one). A token reaches the license it's scoped to, or the licenses of its customer. **Required role permission**: `license:cancel` when called with a session, granted by the member's role. API keys aren't limited by roles.
|
|
38
|
+
# @param id
|
|
39
|
+
# @param cancel_license
|
|
40
|
+
# @param [Hash] opts the optional parameters
|
|
41
|
+
# @return [License]
|
|
42
|
+
describe 'cancel_license test' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
35
48
|
# unit tests for create_license
|
|
36
49
|
# Create a license
|
|
37
|
-
# Without a `key`, the license gets a random one, like `7KQ2M-X9ZPA-H4TRC-WN6EY-B3JDF`: 5 groups of 5 characters separated by dashes, each character an upper case letter or a digit other than `O`, `0`, `I` and `1`. That's 32 possible characters encoding 5 bits each, for 125 random bits. Without a `policyId`, the license follows the product's default policy. Without an `expiresAt`, the license expires after the duration of its policy, or never when the policy has none. `expiresAt: null` makes it never expire. Without a `price`, the price paid for the license is unknown: it's left out of the revenue stats. The values of `maxVersion` left out are taken from the max version of the policy: its hard-coded version, or the times after the creation of the license its versions lock. The license belongs to the product's customer with the given `email`, which is created when there's none. With `sendKey: true`, the key is emailed to the customer once the license is created. The license copies the settings of its policy when it's created: later changes to the policy don't affect it. Its key, policy and customer can't be changed afterwards. **Required role permission**: `license:create` when called with a session, granted by the member's role. API keys aren't limited by roles.
|
|
50
|
+
# Without a `key`, the license gets a random one, like `7KQ2M-X9ZPA-H4TRC-WN6EY-B3JDF`: 5 groups of 5 characters separated by dashes, each character an upper case letter or a digit other than `O`, `0`, `I` and `1`. That's 32 possible characters encoding 5 bits each, for 125 random bits. Without a `policyId`, the license follows the product's default policy. Without an `expiresAt`, the license expires after the duration of its policy, or never when the policy has none. `expiresAt: null` makes it never expire. Without a `price`, the price paid for the license is unknown: it's left out of the revenue stats. Without a `cancellableUntil`, the customer can cancel the license during the policy's `moneyBackGuaranteeDays` after its creation, or never when the policy has none. The values of `maxVersion` left out are taken from the max version of the policy: its hard-coded version, or the times after the creation of the license its versions lock. The license belongs to the product's customer with the given `email`, which is created when there's none. With `sendKey: true`, the key is emailed to the customer once the license is created. The license copies the settings of its policy when it's created: later changes to the policy don't affect it. Its key, policy and customer can't be changed afterwards. **Required role permission**: `license:create` when called with a session, granted by the member's role. API keys aren't limited by roles.
|
|
38
51
|
# @param product_id
|
|
39
52
|
# @param create_license
|
|
40
53
|
# @param [Hash] opts the optional parameters
|
|
@@ -173,7 +186,7 @@ describe 'LicensesApi' do
|
|
|
173
186
|
|
|
174
187
|
# unit tests for update_license
|
|
175
188
|
# Update a license
|
|
176
|
-
# The key, policy and customer of a license can't be changed: sending them does nothing. The changes apply to the next validations of the key, not to the license tokens `validateKey` already returned, which stay valid until they expire. Lowering `maxMachines` doesn't deactivate machines: the ones already active keep validating, and new ones are refused until enough are deactivated. **Required role permission**: `license:update` when called with a session, granted by the member's role. API keys aren't limited by roles.
|
|
189
|
+
# The key, policy and customer of a license can't be changed: sending them does nothing. The changes apply to the next validations of the key, not to the license tokens `validateKey` already returned, which stay valid until they expire. Lowering `maxMachines` doesn't deactivate machines: the ones already active keep validating, and new ones replace them one at a time when the product has `autoMachineChange`, or are refused until enough are deactivated. **Required role permission**: `license:update` when called with a session, granted by the member's role. API keys aren't limited by roles.
|
|
177
190
|
# @param id
|
|
178
191
|
# @param update_license
|
|
179
192
|
# @param [Hash] opts the optional parameters
|
|
@@ -186,7 +199,7 @@ describe 'LicensesApi' do
|
|
|
186
199
|
|
|
187
200
|
# unit tests for validate_key
|
|
188
201
|
# Validate a license key
|
|
189
|
-
# Checks the license key of the product on a machine and returns a token the application can verify offline with the organization's public key. Doesn't need authentication. The license must allow the `version`: up to its `maxVersion.version` when it has one, like `\"2.3\"` for every 2.3.z version and older. Its `maxVersion.lockMajorAt` and `maxVersion.lockMinorAt` are enforced once they hard-code `maxVersion.version`, within the hour they're reached. When it doesn't, the error's `latestAllowedVersion` is the latest release of the product the license allows, so the application can offer to install it. The machine with the `fingerprint` is created when the license has none, and activated when it's deactivated, unless the license is already active on its maximum number of machines. A machine that's already active is never refused for the maximum number of machines, even when it was lowered below the number of active machines. Its `version`, and its `name` and `platform` when given, are updated: they can't be cleared. The checks run in this order, and the first one failing answers: the license has expired, then it doesn't allow the version, then it's on its maximum number of machines. Each failure is recorded as a `license.validation_failed` event, except for keys that don't exist. Changes to the license, like deactivating the machine or shortening its expiration, don't revoke the tokens already returned: the application only sees them when it validates its key again, at the latest when its token expires.
|
|
202
|
+
# Checks the license key of the product on a machine and returns a token the application can verify offline with the organization's public key. Doesn't need authentication. The license must allow the `version`: up to its `maxVersion.version` when it has one, like `\"2.3\"` for every 2.3.z version and older. Its `maxVersion.lockMajorAt` and `maxVersion.lockMinorAt` are enforced once they hard-code `maxVersion.version`, within the hour they're reached. When it doesn't, the error's `latestAllowedVersion` is the latest release of the product the license allows, so the application can offer to install it. The machine with the `fingerprint` is created when the license has none, and activated when it's deactivated, unless the license is already active on its maximum number of machines. A machine that's already active is never refused for the maximum number of machines, even when it was lowered below the number of active machines. Its `version`, and its `name` and `platform` when given, are updated: they can't be cleared. Unless the product disables `autoMachineChange`, a new machine isn't refused when the license is on its maximum number of machines: it takes the place of the active machine validated the longest ago, which is deactivated with its `overriddenByMachineId` set to the new machine, and recorded as a `machine.deactivated` event. When a machine deactivated this way is validated again, it takes its place back: the machine that overrode it, and the ones that overrode that one in turn, are locked, with their `overriddenByMachineId` set to the machine coming back. A locked machine is always refused, so two machines can't take turns on one place. The checks run in this order, and the first one failing answers: the license has expired or was canceled, then it doesn't allow the version, then the machine is locked, then it's on its maximum number of machines. Each failure is recorded as a `license.validation_failed` event, except for keys that don't exist. Changes to the license, like deactivating the machine or shortening its expiration, don't revoke the tokens already returned: the application only sees them when it validates its key again, at the latest when its token expires.
|
|
190
203
|
# @param product_id
|
|
191
204
|
# @param validate_key
|
|
192
205
|
# @param [Hash] opts the optional parameters
|
|
@@ -34,7 +34,7 @@ describe 'MachinesApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for deactivate_machine
|
|
36
36
|
# Deactivate a machine
|
|
37
|
-
# The machine no longer counts as using the license, freeing its place when the license has a maximum number of machines. Validating the license key on the machine activates it again, unless the license is on its maximum number of machines by then. Deactivating a deactivated machine does nothing. The license token `validateKey` returned to the machine isn't revoked: the application can keep running offline until it expires. Machines can't be deleted: they're deleted with their license. **Token access**: customer, license, machine tokens with the `machine:write` permission (or the matching write one). A token reaches the machine it's scoped to, or the machines of its license or customer. **Required role permission**: `machine:deactivate` when called with a session, granted by the member's role. API keys aren't limited by roles.
|
|
37
|
+
# The machine no longer counts as using the license, freeing its place when the license has a maximum number of machines. Validating the license key on the machine activates it again, unless the license is on its maximum number of machines by then. Deactivating a deactivated or locked machine does nothing. The license token `validateKey` returned to the machine isn't revoked: the application can keep running offline until it expires. Machines can't be deleted: they're deleted with their license. **Token access**: customer, license, machine tokens with the `machine:write` permission (or the matching write one). A token reaches the machine it's scoped to, or the machines of its license or customer. **Required role permission**: `machine:deactivate` when called with a session, granted by the member's role. API keys aren't limited by roles.
|
|
38
38
|
# @param id
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
|
40
40
|
# @return [Machine]
|
data/spec/api/portal_api_spec.rb
CHANGED
|
@@ -34,7 +34,7 @@ describe 'PortalApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for create_portal_link
|
|
36
36
|
# Create a link to the customer portal
|
|
37
|
-
# Link letting the customer see their licenses and deactivate their machines in the customer portal, without signing in. Anyone with the link can, until it expires or the customer is deleted: it can't be revoked otherwise. The token also works with the API endpoints that accept customer tokens. Links can be created while the product's customer portal is disabled, but the portal answers `404` until it's enabled, and `sendPortalLink` refuses to email them. **Required role permission**: `portalLink:create` when called with a session, granted by the member's role. API keys aren't limited by roles.
|
|
37
|
+
# Link letting the customer see their licenses, cancel them during their money back guarantee, and deactivate their machines in the customer portal, without signing in. Anyone with the link can, until it expires or the customer is deleted: it can't be revoked otherwise. The token also works with the API endpoints that accept customer tokens. Links can be created while the product's customer portal is disabled, but the portal answers `404` until it's enabled, and `sendPortalLink` refuses to email them. **Required role permission**: `portalLink:create` when called with a session, granted by the member's role. API keys aren't limited by roles.
|
|
38
38
|
# @param id
|
|
39
39
|
# @param create_portal_link
|
|
40
40
|
# @param [Hash] opts the optional parameters
|
|
@@ -34,7 +34,7 @@ describe 'ProductsApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for create_product
|
|
36
36
|
# Create a product
|
|
37
|
-
# 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
|
|
37
|
+
# 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, portal settings and `autoMachineChange` 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.
|
|
38
38
|
# @param create_product_with_policy
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
|
40
40
|
# @return [Product]
|
|
@@ -109,7 +109,7 @@ describe 'ProductsApi' do
|
|
|
109
109
|
|
|
110
110
|
# unit tests for reset_product
|
|
111
111
|
# Reset a test product
|
|
112
|
-
# Deletes the customers, licenses, machines, policies and releases of the test product, with their events, then copies the policies, releases
|
|
112
|
+
# Deletes the customers, licenses, machines, policies and releases of the test product, with their events, then copies the policies, releases, portal settings and `autoMachineChange` 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.
|
|
113
113
|
# @param id
|
|
114
114
|
# @param [Hash] opts the optional parameters
|
|
115
115
|
# @return [Product]
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#LicenseManager API
|
|
3
|
+
|
|
4
|
+
#Public API. Authenticate with an organization API key, or with a token scoped to a customer, license or machine on the endpoints that accept one. ## Conventions - **Errors** answer `{ \"error\": { \"code\", \"message\" } }`. Branch on `code`, which is stable, not on `message`. Each response lists the codes it can return, except `404`, which answers `not_found` unless it says otherwise. Unexpected errors answer `500` with `internal_error`. - **Validation** errors answer `422`, not `400`, with the `validation_error` code and an `issues` array giving the `path` and `message` of each invalid value. - **Unknown body fields are ignored**, not rejected: sending a field an endpoint doesn't accept, like `policyId` to `updateLicense`, changes nothing and doesn't fail. - **Strings** are trimmed before they're validated and stored. Emails are stored lower cased. - **Updates** only change the fields that are sent. A field sent as `null` is cleared, when it can be. - **Dates** can be sent with any offset, and are always returned in UTC, like `2026-01-15T09:30:00.000Z`. Calendar months and days are counted in UTC. - **Ids** are 8 letters and digits, after `test_` for test products and their resources. - **Lists** are paginated with `page` and `pageSize`. Items with the same value for the `sort` field are ordered by id, so pages are stable, but items created or deleted between two requests shift the pages. Items without a value for the `sort` field come last in ascending order, and first in descending order, unless the endpoint says otherwise. - **Test products** are sandboxes of a live product. Test API keys only reach test products, live API keys only live ones: the others answer `404`, as if they didn't exist. Sessions and tokens reach both.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.26.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for LicenseManager::CancelLicense
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe LicenseManager::CancelLicense do
|
|
21
|
+
#let(:instance) { LicenseManager::CancelLicense.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CancelLicense' do
|
|
24
|
+
it 'should create an instance of CancelLicense' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(LicenseManager::CancelLicense)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "reason"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "comment"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
describe 'test attribute "refund"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#LicenseManager API
|
|
3
|
+
|
|
4
|
+
#Public API. Authenticate with an organization API key, or with a token scoped to a customer, license or machine on the endpoints that accept one. ## Conventions - **Errors** answer `{ \"error\": { \"code\", \"message\" } }`. Branch on `code`, which is stable, not on `message`. Each response lists the codes it can return, except `404`, which answers `not_found` unless it says otherwise. Unexpected errors answer `500` with `internal_error`. - **Validation** errors answer `422`, not `400`, with the `validation_error` code and an `issues` array giving the `path` and `message` of each invalid value. - **Unknown body fields are ignored**, not rejected: sending a field an endpoint doesn't accept, like `policyId` to `updateLicense`, changes nothing and doesn't fail. - **Strings** are trimmed before they're validated and stored. Emails are stored lower cased. - **Updates** only change the fields that are sent. A field sent as `null` is cleared, when it can be. - **Dates** can be sent with any offset, and are always returned in UTC, like `2026-01-15T09:30:00.000Z`. Calendar months and days are counted in UTC. - **Ids** are 8 letters and digits, after `test_` for test products and their resources. - **Lists** are paginated with `page` and `pageSize`. Items with the same value for the `sort` field are ordered by id, so pages are stable, but items created or deleted between two requests shift the pages. Items without a value for the `sort` field come last in ascending order, and first in descending order, unless the endpoint says otherwise. - **Test products** are sandboxes of a live product. Test API keys only reach test products, live API keys only live ones: the others answer `404`, as if they didn't exist. Sessions and tokens reach both.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.26.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for LicenseManager::CancellationReason
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe LicenseManager::CancellationReason do
|
|
21
|
+
#let(:instance) { LicenseManager::CancellationReason.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CancellationReason' do
|
|
24
|
+
it 'should create an instance of CancellationReason' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(LicenseManager::CancellationReason)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#LicenseManager API
|
|
3
|
+
|
|
4
|
+
#Public API. Authenticate with an organization API key, or with a token scoped to a customer, license or machine on the endpoints that accept one. ## Conventions - **Errors** answer `{ \"error\": { \"code\", \"message\" } }`. Branch on `code`, which is stable, not on `message`. Each response lists the codes it can return, except `404`, which answers `not_found` unless it says otherwise. Unexpected errors answer `500` with `internal_error`. - **Validation** errors answer `422`, not `400`, with the `validation_error` code and an `issues` array giving the `path` and `message` of each invalid value. - **Unknown body fields are ignored**, not rejected: sending a field an endpoint doesn't accept, like `policyId` to `updateLicense`, changes nothing and doesn't fail. - **Strings** are trimmed before they're validated and stored. Emails are stored lower cased. - **Updates** only change the fields that are sent. A field sent as `null` is cleared, when it can be. - **Dates** can be sent with any offset, and are always returned in UTC, like `2026-01-15T09:30:00.000Z`. Calendar months and days are counted in UTC. - **Ids** are 8 letters and digits, after `test_` for test products and their resources. - **Lists** are paginated with `page` and `pageSize`. Items with the same value for the `sort` field are ordered by id, so pages are stable, but items created or deleted between two requests shift the pages. Items without a value for the `sort` field come last in ascending order, and first in descending order, unless the endpoint says otherwise. - **Test products** are sandboxes of a live product. Test API keys only reach test products, live API keys only live ones: the others answer `404`, as if they didn't exist. Sessions and tokens reach both.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.26.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for LicenseManager::CancellationStatsByReasonInner
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe LicenseManager::CancellationStatsByReasonInner do
|
|
21
|
+
#let(:instance) { LicenseManager::CancellationStatsByReasonInner.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CancellationStatsByReasonInner' do
|
|
24
|
+
it 'should create an instance of CancellationStatsByReasonInner' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(LicenseManager::CancellationStatsByReasonInner)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "reason"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "count"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
end
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#LicenseManager API
|
|
3
|
+
|
|
4
|
+
#Public API. Authenticate with an organization API key, or with a token scoped to a customer, license or machine on the endpoints that accept one. ## Conventions - **Errors** answer `{ \"error\": { \"code\", \"message\" } }`. Branch on `code`, which is stable, not on `message`. Each response lists the codes it can return, except `404`, which answers `not_found` unless it says otherwise. Unexpected errors answer `500` with `internal_error`. - **Validation** errors answer `422`, not `400`, with the `validation_error` code and an `issues` array giving the `path` and `message` of each invalid value. - **Unknown body fields are ignored**, not rejected: sending a field an endpoint doesn't accept, like `policyId` to `updateLicense`, changes nothing and doesn't fail. - **Strings** are trimmed before they're validated and stored. Emails are stored lower cased. - **Updates** only change the fields that are sent. A field sent as `null` is cleared, when it can be. - **Dates** can be sent with any offset, and are always returned in UTC, like `2026-01-15T09:30:00.000Z`. Calendar months and days are counted in UTC. - **Ids** are 8 letters and digits, after `test_` for test products and their resources. - **Lists** are paginated with `page` and `pageSize`. Items with the same value for the `sort` field are ordered by id, so pages are stable, but items created or deleted between two requests shift the pages. Items without a value for the `sort` field come last in ascending order, and first in descending order, unless the endpoint says otherwise. - **Test products** are sandboxes of a live product. Test API keys only reach test products, live API keys only live ones: the others answer `404`, as if they didn't exist. Sessions and tokens reach both.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.26.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for LicenseManager::CancellationStats
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe LicenseManager::CancellationStats do
|
|
21
|
+
#let(:instance) { LicenseManager::CancellationStats.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CancellationStats' do
|
|
24
|
+
it 'should create an instance of CancellationStats' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(LicenseManager::CancellationStats)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "license_count"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "canceled_license_count"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
describe 'test attribute "cancellable_license_count"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
describe 'test attribute "rate"' do
|
|
49
|
+
it 'should work' do
|
|
50
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
describe 'test attribute "canceled_by_day"' do
|
|
55
|
+
it 'should work' do
|
|
56
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
describe 'test attribute "canceled_by_month"' do
|
|
61
|
+
it 'should work' do
|
|
62
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
describe 'test attribute "by_reason"' do
|
|
67
|
+
it 'should work' do
|
|
68
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
end
|
|
@@ -81,6 +81,12 @@ describe LicenseManager::CreateLicense do
|
|
|
81
81
|
end
|
|
82
82
|
end
|
|
83
83
|
|
|
84
|
+
describe 'test attribute "cancellable_until"' do
|
|
85
|
+
it 'should work' do
|
|
86
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
84
90
|
describe 'test attribute "send_key"' do
|
|
85
91
|
it 'should work' do
|
|
86
92
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -69,4 +69,10 @@ describe LicenseManager::CreatePolicy do
|
|
|
69
69
|
end
|
|
70
70
|
end
|
|
71
71
|
|
|
72
|
+
describe 'test attribute "money_back_guarantee_days"' do
|
|
73
|
+
it 'should work' do
|
|
74
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
72
78
|
end
|
|
@@ -30,7 +30,7 @@ describe LicenseManager::CreateToken do
|
|
|
30
30
|
describe 'test attribute "scope"' do
|
|
31
31
|
it 'should work' do
|
|
32
32
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
-
# validator = Petstore::EnumTest::EnumAttributeValidator.new('Array<String>', ["customer:read", "customer:write", "license:read", "license:write", "machine:read", "machine:write", "unknown_default_open_api"])
|
|
33
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('Array<String>', ["customer:read", "customer:write", "license:read", "license:write", "license:cancel", "machine:read", "machine:write", "unknown_default_open_api"])
|
|
34
34
|
# validator.allowable_values.each do |value|
|
|
35
35
|
# expect { instance.scope = value }.not_to raise_error
|
|
36
36
|
# end
|
|
@@ -91,6 +91,18 @@ describe LicenseManager::Integration do
|
|
|
91
91
|
end
|
|
92
92
|
end
|
|
93
93
|
|
|
94
|
+
describe 'test attribute "auto_refund"' do
|
|
95
|
+
it 'should work' do
|
|
96
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
describe 'test attribute "can_refund"' do
|
|
101
|
+
it 'should work' do
|
|
102
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
|
|
94
106
|
describe 'test attribute "created_at"' do
|
|
95
107
|
it 'should work' do
|
|
96
108
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
data/spec/models/license_spec.rb
CHANGED
|
@@ -123,6 +123,36 @@ describe LicenseManager::License do
|
|
|
123
123
|
end
|
|
124
124
|
end
|
|
125
125
|
|
|
126
|
+
describe 'test attribute "cancellable_until"' do
|
|
127
|
+
it 'should work' do
|
|
128
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
describe 'test attribute "canceled_at"' do
|
|
133
|
+
it 'should work' do
|
|
134
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
describe 'test attribute "cancellation_reason"' do
|
|
139
|
+
it 'should work' do
|
|
140
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
describe 'test attribute "cancellation_comment"' do
|
|
145
|
+
it 'should work' do
|
|
146
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
describe 'test attribute "stripe_refund_id"' do
|
|
151
|
+
it 'should work' do
|
|
152
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
|
|
126
156
|
describe 'test attribute "updated_at"' do
|
|
127
157
|
it 'should work' do
|
|
128
158
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
data/spec/models/machine_spec.rb
CHANGED
|
@@ -60,7 +60,7 @@ describe LicenseManager::Machine do
|
|
|
60
60
|
describe 'test attribute "status"' do
|
|
61
61
|
it 'should work' do
|
|
62
62
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
63
|
-
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["active", "deactivated", "unknown_default_open_api"])
|
|
63
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["active", "deactivated", "locked", "unknown_default_open_api"])
|
|
64
64
|
# validator.allowable_values.each do |value|
|
|
65
65
|
# expect { instance.status = value }.not_to raise_error
|
|
66
66
|
# end
|
|
@@ -73,6 +73,12 @@ describe LicenseManager::Machine do
|
|
|
73
73
|
end
|
|
74
74
|
end
|
|
75
75
|
|
|
76
|
+
describe 'test attribute "overridden_by_machine_id"' do
|
|
77
|
+
it 'should work' do
|
|
78
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
76
82
|
describe 'test attribute "last_validated_at"' do
|
|
77
83
|
it 'should work' do
|
|
78
84
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -51,4 +51,10 @@ describe LicenseManager::PolicySettings do
|
|
|
51
51
|
end
|
|
52
52
|
end
|
|
53
53
|
|
|
54
|
+
describe 'test attribute "money_back_guarantee_days"' do
|
|
55
|
+
it 'should work' do
|
|
56
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
54
60
|
end
|
data/spec/models/policy_spec.rb
CHANGED
|
@@ -81,6 +81,12 @@ describe LicenseManager::Policy do
|
|
|
81
81
|
end
|
|
82
82
|
end
|
|
83
83
|
|
|
84
|
+
describe 'test attribute "money_back_guarantee_days"' do
|
|
85
|
+
it 'should work' do
|
|
86
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
84
90
|
describe 'test attribute "license_count"' do
|
|
85
91
|
it 'should work' do
|
|
86
92
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
data/spec/models/product_spec.rb
CHANGED
|
@@ -63,6 +63,12 @@ describe LicenseManager::Product do
|
|
|
63
63
|
end
|
|
64
64
|
end
|
|
65
65
|
|
|
66
|
+
describe 'test attribute "auto_machine_change"' do
|
|
67
|
+
it 'should work' do
|
|
68
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
66
72
|
describe 'test attribute "created_at"' do
|
|
67
73
|
it 'should work' do
|
|
68
74
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -117,6 +117,12 @@ describe LicenseManager::ProductStats do
|
|
|
117
117
|
end
|
|
118
118
|
end
|
|
119
119
|
|
|
120
|
+
describe 'test attribute "cancellation"' do
|
|
121
|
+
it 'should work' do
|
|
122
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
|
|
120
126
|
describe 'test attribute "revenue"' do
|
|
121
127
|
it 'should work' do
|
|
122
128
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
data/spec/models/revenue_spec.rb
CHANGED
|
@@ -45,6 +45,18 @@ describe LicenseManager::Revenue do
|
|
|
45
45
|
end
|
|
46
46
|
end
|
|
47
47
|
|
|
48
|
+
describe 'test attribute "canceled_license_count"' do
|
|
49
|
+
it 'should work' do
|
|
50
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
describe 'test attribute "canceled_total"' do
|
|
55
|
+
it 'should work' do
|
|
56
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
48
60
|
describe 'test attribute "this_month"' do
|
|
49
61
|
it 'should work' do
|
|
50
62
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
data/spec/models/token_spec.rb
CHANGED
|
@@ -46,7 +46,7 @@ describe LicenseManager::Token do
|
|
|
46
46
|
describe 'test attribute "scope"' do
|
|
47
47
|
it 'should work' do
|
|
48
48
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
49
|
-
# validator = Petstore::EnumTest::EnumAttributeValidator.new('Array<String>', ["customer:read", "customer:write", "license:read", "license:write", "machine:read", "machine:write", "unknown_default_open_api"])
|
|
49
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('Array<String>', ["customer:read", "customer:write", "license:read", "license:write", "license:cancel", "machine:read", "machine:write", "unknown_default_open_api"])
|
|
50
50
|
# validator.allowable_values.each do |value|
|
|
51
51
|
# expect { instance.scope = value }.not_to raise_error
|
|
52
52
|
# end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#LicenseManager API
|
|
3
|
+
|
|
4
|
+
#Public API. Authenticate with an organization API key, or with a token scoped to a customer, license or machine on the endpoints that accept one. ## Conventions - **Errors** answer `{ \"error\": { \"code\", \"message\" } }`. Branch on `code`, which is stable, not on `message`. Each response lists the codes it can return, except `404`, which answers `not_found` unless it says otherwise. Unexpected errors answer `500` with `internal_error`. - **Validation** errors answer `422`, not `400`, with the `validation_error` code and an `issues` array giving the `path` and `message` of each invalid value. - **Unknown body fields are ignored**, not rejected: sending a field an endpoint doesn't accept, like `policyId` to `updateLicense`, changes nothing and doesn't fail. - **Strings** are trimmed before they're validated and stored. Emails are stored lower cased. - **Updates** only change the fields that are sent. A field sent as `null` is cleared, when it can be. - **Dates** can be sent with any offset, and are always returned in UTC, like `2026-01-15T09:30:00.000Z`. Calendar months and days are counted in UTC. - **Ids** are 8 letters and digits, after `test_` for test products and their resources. - **Lists** are paginated with `page` and `pageSize`. Items with the same value for the `sort` field are ordered by id, so pages are stable, but items created or deleted between two requests shift the pages. Items without a value for the `sort` field come last in ascending order, and first in descending order, unless the endpoint says otherwise. - **Test products** are sandboxes of a live product. Test API keys only reach test products, live API keys only live ones: the others answer `404`, as if they didn't exist. Sessions and tokens reach both.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.26.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for LicenseManager::UpdateIntegration
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe LicenseManager::UpdateIntegration do
|
|
21
|
+
#let(:instance) { LicenseManager::UpdateIntegration.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of UpdateIntegration' do
|
|
24
|
+
it 'should create an instance of UpdateIntegration' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(LicenseManager::UpdateIntegration)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "auto_refund"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
end
|
|
@@ -69,4 +69,10 @@ describe LicenseManager::UpdatePolicy do
|
|
|
69
69
|
end
|
|
70
70
|
end
|
|
71
71
|
|
|
72
|
+
describe 'test attribute "money_back_guarantee_days"' do
|
|
73
|
+
it 'should work' do
|
|
74
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
72
78
|
end
|