license_manager 0.3.0 → 0.3.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1d2fad9e16d3194d5a682104cbf199cbadf37b8960a262943d61355963bbf5bc
4
- data.tar.gz: 423f1d92ca5ce3b5f3f47368437131f53b47bb12811e54709902ade88e691c28
3
+ metadata.gz: 68a828b5a78c2e840be0a77b50d429b1e59e88714cbbe50436934eaffaf73435
4
+ data.tar.gz: 41bee49be6e3419467fc60612ed97e70c6888d579882a2422a9835ca75b87719
5
5
  SHA512:
6
- metadata.gz: ead20ee997f6de97969a0fe24d9e3e26d4f9e665e7f15ef1776e5f71227cc1805f7078f3c6bf0ebf1f56e3054642912e8cc2aa27e7db5dd715cafc0a91bfe25d
7
- data.tar.gz: 46838fa3d3d6777363fb88e38372d21234ea1a837201c88f1942fcbf7f07076f28d28023fac6d33d95e1aa45a7942beac19500683a902a8036590df10f01227e
6
+ metadata.gz: 0b825e5dbe10c69b2ffbf8961e8d060a467612d1c12ccbcf23e078d9403ee5306bd388121fdebdb0c3d309c3adbc470c86c0183c4c62a2352078df2c83349648
7
+ data.tar.gz: f077da231328da5cb860b63972bd9508ef959373ff91d4cc83a77cbc626fdc8bdfe4a56b1978729bf5366384a08c53647059e0a9bb6b429102352eb8f2ffc960
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.1 (2026-11-04)
4
+
5
+ ### Changes
6
+
7
+ - `GET /v1/customers/{customerId}/licenses`: added the required property `data/items/customer` to the response with the `200` status
8
+ - `GET /v1/licenses/{id}`: added the required property `customer` to the response with the `200` status
9
+ - `PATCH /v1/licenses/{id}`: added the required property `customer` to the response with the `200` status
10
+ - `POST /v1/licenses/{id}/cancel`: added the required property `customer` to the response with the `200` status
11
+ - `GET /v1/products/{productId}/licenses`: added the required property `data/items/customer` to the response with the `200` status
12
+ - `POST /v1/products/{productId}/licenses`: added the required property `customer` to the response with the `201` status
13
+
3
14
  ## 0.3.0 (2026-10-27)
4
15
 
5
16
  ### Breaking changes
data/docs/License.md CHANGED
@@ -8,6 +8,7 @@
8
8
  | **product_id** | **String** | | |
9
9
  | **policy_id** | **String** | | |
10
10
  | **customer_id** | **String** | | |
11
+ | **customer** | [**LicenseCustomer**](LicenseCustomer.md) | | |
11
12
  | **key** | **String** | Unique within the product. Case sensitive: `validateKey` compares keys exactly. | |
12
13
  | **created_at** | **Time** | | |
13
14
  | **expires_at** | **Time** | `null` when the license never expires. | |
@@ -38,6 +39,7 @@ instance = LicenseManager::License.new(
38
39
  product_id: x7Kp2QaZ,
39
40
  policy_id: p4Rt8LmQ,
40
41
  customer_id: c9Wd3RtE,
42
+ customer: null,
41
43
  key: 7KQ2M-X9ZPA-H4TRC-WN6EY-B3JDF,
42
44
  created_at: 2026-01-15T09:30:00.000Z,
43
45
  expires_at: 2027-01-15T09:30:00.000Z,
@@ -0,0 +1,22 @@
1
+ # LicenseManager::LicenseCustomer
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | |
8
+ | **email** | **String** | | |
9
+ | **name** | **String** | Display name of the customer. `null` when unknown. | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'license_manager'
15
+
16
+ instance = LicenseManager::LicenseCustomer.new(
17
+ id: c9Wd3RtE,
18
+ email: jane@example.com,
19
+ name: Jane Doe
20
+ )
21
+ ```
22
+
data/docs/LicensesApi.md CHANGED
@@ -479,7 +479,7 @@ opts = {
479
479
  page: 1, # Integer | Page to return. Pages are numbered from 1: `1` is the first page. A page past the last one returns an empty `data`, not an error. Defaults to `1`.
480
480
  page_size: 20, # Integer | Maximum number of items per page, from 1 to 100. Every page holds this many items except the last one, which can hold fewer. Defaults to `20`.
481
481
  sort: 'key', # String | Field to sort by, prefixed with `-` for descending order. Defaults to `-createdAt`.
482
- search: 'X9ZPA', # String | Case-insensitive text the key contains.
482
+ search: 'X9ZPA', # String | Case-insensitive text the key or the email of the customer contains.
483
483
  key: '7KQ2M-X9ZPA-H4TRC-WN6EY-B3JDF', # String | Only returns the license with this exact key, case included. Keys of test products start with `TEST-`.
484
484
  policy_id: 'p4Rt8LmQ', # String | Only returns the licenses following this policy.
485
485
  machine_version: '2.3.1', # String | Only returns the licenses with at least one active machine running this version of the product.
@@ -534,7 +534,7 @@ end
534
534
  | **page** | **Integer** | Page to return. Pages are numbered from 1: `1` is the first page. A page past the last one returns an empty `data`, not an error. Defaults to `1`. | [optional][default to 1] |
535
535
  | **page_size** | **Integer** | Maximum number of items per page, from 1 to 100. Every page holds this many items except the last one, which can hold fewer. Defaults to `20`. | [optional][default to 20] |
536
536
  | **sort** | **String** | Field to sort by, prefixed with `-` for descending order. Defaults to `-createdAt`. | [optional][default to '-createdAt'] |
537
- | **search** | **String** | Case-insensitive text the key contains. | [optional] |
537
+ | **search** | **String** | Case-insensitive text the key or the email of the customer contains. | [optional] |
538
538
  | **key** | **String** | Only returns the license with this exact key, case included. Keys of test products start with `TEST-`. | [optional] |
539
539
  | **policy_id** | **String** | Only returns the licenses following this policy. | [optional] |
540
540
  | **machine_version** | **String** | Only returns the licenses with at least one active machine running this version of the product. | [optional] |
@@ -594,7 +594,7 @@ opts = {
594
594
  page: 1, # Integer | Page to return. Pages are numbered from 1: `1` is the first page. A page past the last one returns an empty `data`, not an error. Defaults to `1`.
595
595
  page_size: 20, # Integer | Maximum number of items per page, from 1 to 100. Every page holds this many items except the last one, which can hold fewer. Defaults to `20`.
596
596
  sort: 'key', # String | Field to sort by, prefixed with `-` for descending order. Defaults to `-createdAt`.
597
- search: 'X9ZPA', # String | Case-insensitive text the key contains.
597
+ search: 'X9ZPA', # String | Case-insensitive text the key or the email of the customer contains.
598
598
  key: '7KQ2M-X9ZPA-H4TRC-WN6EY-B3JDF', # String | Only returns the license with this exact key, case included. Keys of test products start with `TEST-`.
599
599
  policy_id: 'p4Rt8LmQ', # String | Only returns the licenses following this policy.
600
600
  customer_id: 'c9Wd3RtE', # String | Only returns the licenses of this customer.
@@ -650,7 +650,7 @@ end
650
650
  | **page** | **Integer** | Page to return. Pages are numbered from 1: `1` is the first page. A page past the last one returns an empty `data`, not an error. Defaults to `1`. | [optional][default to 1] |
651
651
  | **page_size** | **Integer** | Maximum number of items per page, from 1 to 100. Every page holds this many items except the last one, which can hold fewer. Defaults to `20`. | [optional][default to 20] |
652
652
  | **sort** | **String** | Field to sort by, prefixed with `-` for descending order. Defaults to `-createdAt`. | [optional][default to '-createdAt'] |
653
- | **search** | **String** | Case-insensitive text the key contains. | [optional] |
653
+ | **search** | **String** | Case-insensitive text the key or the email of the customer contains. | [optional] |
654
654
  | **key** | **String** | Only returns the license with this exact key, case included. Keys of test products start with `TEST-`. | [optional] |
655
655
  | **policy_id** | **String** | Only returns the licenses following this policy. | [optional] |
656
656
  | **customer_id** | **String** | Only returns the licenses of this customer. | [optional] |
@@ -420,7 +420,7 @@ module LicenseManager
420
420
  # @option opts [Integer] :page Page to return. Pages are numbered from 1: `1` is the first page. A page past the last one returns an empty `data`, not an error. Defaults to `1`. (default to 1)
421
421
  # @option opts [Integer] :page_size Maximum number of items per page, from 1 to 100. Every page holds this many items except the last one, which can hold fewer. Defaults to `20`. (default to 20)
422
422
  # @option opts [String] :sort Field to sort by, prefixed with `-` for descending order. Defaults to `-createdAt`. (default to '-createdAt')
423
- # @option opts [String] :search Case-insensitive text the key contains.
423
+ # @option opts [String] :search Case-insensitive text the key or the email of the customer contains.
424
424
  # @option opts [String] :key Only returns the license with this exact key, case included. Keys of test products start with `TEST-`.
425
425
  # @option opts [String] :policy_id Only returns the licenses following this policy.
426
426
  # @option opts [String] :machine_version Only returns the licenses with at least one active machine running this version of the product.
@@ -451,7 +451,7 @@ module LicenseManager
451
451
  # @option opts [Integer] :page Page to return. Pages are numbered from 1: `1` is the first page. A page past the last one returns an empty `data`, not an error. Defaults to `1`. (default to 1)
452
452
  # @option opts [Integer] :page_size Maximum number of items per page, from 1 to 100. Every page holds this many items except the last one, which can hold fewer. Defaults to `20`. (default to 20)
453
453
  # @option opts [String] :sort Field to sort by, prefixed with `-` for descending order. Defaults to `-createdAt`. (default to '-createdAt')
454
- # @option opts [String] :search Case-insensitive text the key contains.
454
+ # @option opts [String] :search Case-insensitive text the key or the email of the customer contains.
455
455
  # @option opts [String] :key Only returns the license with this exact key, case included. Keys of test products start with `TEST-`.
456
456
  # @option opts [String] :policy_id Only returns the licenses following this policy.
457
457
  # @option opts [String] :machine_version Only returns the licenses with at least one active machine running this version of the product.
@@ -582,7 +582,7 @@ module LicenseManager
582
582
  # @option opts [Integer] :page Page to return. Pages are numbered from 1: `1` is the first page. A page past the last one returns an empty `data`, not an error. Defaults to `1`. (default to 1)
583
583
  # @option opts [Integer] :page_size Maximum number of items per page, from 1 to 100. Every page holds this many items except the last one, which can hold fewer. Defaults to `20`. (default to 20)
584
584
  # @option opts [String] :sort Field to sort by, prefixed with `-` for descending order. Defaults to `-createdAt`. (default to '-createdAt')
585
- # @option opts [String] :search Case-insensitive text the key contains.
585
+ # @option opts [String] :search Case-insensitive text the key or the email of the customer contains.
586
586
  # @option opts [String] :key Only returns the license with this exact key, case included. Keys of test products start with `TEST-`.
587
587
  # @option opts [String] :policy_id Only returns the licenses following this policy.
588
588
  # @option opts [String] :customer_id Only returns the licenses of this customer.
@@ -614,7 +614,7 @@ module LicenseManager
614
614
  # @option opts [Integer] :page Page to return. Pages are numbered from 1: `1` is the first page. A page past the last one returns an empty `data`, not an error. Defaults to `1`. (default to 1)
615
615
  # @option opts [Integer] :page_size Maximum number of items per page, from 1 to 100. Every page holds this many items except the last one, which can hold fewer. Defaults to `20`. (default to 20)
616
616
  # @option opts [String] :sort Field to sort by, prefixed with `-` for descending order. Defaults to `-createdAt`. (default to '-createdAt')
617
- # @option opts [String] :search Case-insensitive text the key contains.
617
+ # @option opts [String] :search Case-insensitive text the key or the email of the customer contains.
618
618
  # @option opts [String] :key Only returns the license with this exact key, case included. Keys of test products start with `TEST-`.
619
619
  # @option opts [String] :policy_id Only returns the licenses following this policy.
620
620
  # @option opts [String] :customer_id Only returns the licenses of this customer.
@@ -23,6 +23,8 @@ module LicenseManager
23
23
 
24
24
  attr_accessor :customer_id
25
25
 
26
+ attr_accessor :customer
27
+
26
28
  # Unique within the product. Case sensitive: `validateKey` compares keys exactly.
27
29
  attr_accessor :key
28
30
 
@@ -103,6 +105,7 @@ module LicenseManager
103
105
  :'product_id' => :'productId',
104
106
  :'policy_id' => :'policyId',
105
107
  :'customer_id' => :'customerId',
108
+ :'customer' => :'customer',
106
109
  :'key' => :'key',
107
110
  :'created_at' => :'createdAt',
108
111
  :'expires_at' => :'expiresAt',
@@ -142,6 +145,7 @@ module LicenseManager
142
145
  :'product_id' => :'String',
143
146
  :'policy_id' => :'String',
144
147
  :'customer_id' => :'String',
148
+ :'customer' => :'LicenseCustomer',
145
149
  :'key' => :'String',
146
150
  :'created_at' => :'Time',
147
151
  :'expires_at' => :'Time',
@@ -231,6 +235,12 @@ module LicenseManager
231
235
  self.customer_id = nil
232
236
  end
233
237
 
238
+ if attributes.key?(:'customer')
239
+ self.customer = attributes[:'customer']
240
+ else
241
+ self.customer = nil
242
+ end
243
+
234
244
  if attributes.key?(:'key')
235
245
  self.key = attributes[:'key']
236
246
  else
@@ -369,6 +379,10 @@ module LicenseManager
369
379
  invalid_properties.push('invalid value for "customer_id", customer_id cannot be nil.')
370
380
  end
371
381
 
382
+ if @customer.nil?
383
+ invalid_properties.push('invalid value for "customer", customer cannot be nil.')
384
+ end
385
+
372
386
  if @key.nil?
373
387
  invalid_properties.push('invalid value for "key", key cannot be nil.')
374
388
  end
@@ -412,6 +426,7 @@ module LicenseManager
412
426
  return false if @product_id.nil?
413
427
  return false if @policy_id.nil?
414
428
  return false if @customer_id.nil?
429
+ return false if @customer.nil?
415
430
  return false if @key.nil?
416
431
  return false if @created_at.nil?
417
432
  return false if @max_offline_duration_seconds.nil?
@@ -463,6 +478,16 @@ module LicenseManager
463
478
  @customer_id = customer_id
464
479
  end
465
480
 
481
+ # Custom attribute writer method with validation
482
+ # @param [Object] customer Value to be assigned
483
+ def customer=(customer)
484
+ if customer.nil?
485
+ fail ArgumentError, 'customer cannot be nil'
486
+ end
487
+
488
+ @customer = customer
489
+ end
490
+
466
491
  # Custom attribute writer method with validation
467
492
  # @param [Object] key Value to be assigned
468
493
  def key=(key)
@@ -552,6 +577,7 @@ module LicenseManager
552
577
  product_id == o.product_id &&
553
578
  policy_id == o.policy_id &&
554
579
  customer_id == o.customer_id &&
580
+ customer == o.customer &&
555
581
  key == o.key &&
556
582
  created_at == o.created_at &&
557
583
  expires_at == o.expires_at &&
@@ -582,7 +608,7 @@ module LicenseManager
582
608
  # Calculates hash code according to all attributes.
583
609
  # @return [Integer] Hash code
584
610
  def hash
585
- [id, product_id, policy_id, customer_id, key, created_at, expires_at, meta, stripe_payment_intent_id, max_machines, max_offline_duration_seconds, active_machine_count, last_activated_at, max_version, price, status, cancellable_until, canceled_at, cancellation_reason, subscription, cancellation_comment, stripe_refund_id, updated_at].hash
611
+ [id, product_id, policy_id, customer_id, customer, key, created_at, expires_at, meta, stripe_payment_intent_id, max_machines, max_offline_duration_seconds, active_machine_count, last_activated_at, max_version, price, status, cancellable_until, canceled_at, cancellation_reason, subscription, cancellation_comment, stripe_refund_id, updated_at].hash
586
612
  end
587
613
 
588
614
  # Builds the object from hash
@@ -0,0 +1,217 @@
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 'date'
14
+ require 'time'
15
+
16
+ module LicenseManager
17
+ # Customer the license belongs to, the one of `customerId`.
18
+ class LicenseCustomer < ApiModelBase
19
+ attr_accessor :id
20
+
21
+ attr_accessor :email
22
+
23
+ # Display name of the customer. `null` when unknown.
24
+ attr_accessor :name
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'id' => :'id',
30
+ :'email' => :'email',
31
+ :'name' => :'name'
32
+ }
33
+ end
34
+
35
+ # Returns attribute mapping this model knows about
36
+ def self.acceptable_attribute_map
37
+ attribute_map
38
+ end
39
+
40
+ # Returns all the JSON keys this model knows about
41
+ def self.acceptable_attributes
42
+ acceptable_attribute_map.values
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.openapi_types
47
+ {
48
+ :'id' => :'String',
49
+ :'email' => :'String',
50
+ :'name' => :'String'
51
+ }
52
+ end
53
+
54
+ # List of attributes with nullable: true
55
+ def self.openapi_nullable
56
+ Set.new([
57
+ :'name'
58
+ ])
59
+ end
60
+
61
+ # Returns attribute type mapping
62
+ def self.acceptable_openapi_types
63
+ openapi_types
64
+ end
65
+
66
+ # Returns the nullable attributes
67
+ def self.acceptable_openapi_nullable
68
+ openapi_nullable
69
+ end
70
+
71
+ # Initializes the object
72
+ # @param [Hash] attributes Model attributes in the form of hash
73
+ def initialize(attributes = {})
74
+ if (!attributes.is_a?(Hash))
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `LicenseManager::LicenseCustomer` initialize method"
76
+ end
77
+
78
+ # check to see if the attribute exists and convert string to symbol for hash key
79
+ acceptable_attribute_map = self.class.acceptable_attribute_map
80
+ attributes = attributes.each_with_object({}) { |(k, v), h|
81
+ if (!acceptable_attribute_map.key?(k.to_sym))
82
+ fail ArgumentError, "`#{k}` is not a valid attribute in `LicenseManager::LicenseCustomer`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
83
+ end
84
+ h[k.to_sym] = v
85
+ }
86
+
87
+ if attributes.key?(:'id')
88
+ self.id = attributes[:'id']
89
+ else
90
+ self.id = nil
91
+ end
92
+
93
+ if attributes.key?(:'email')
94
+ self.email = attributes[:'email']
95
+ else
96
+ self.email = nil
97
+ end
98
+
99
+ if attributes.key?(:'name')
100
+ self.name = attributes[:'name']
101
+ else
102
+ self.name = nil
103
+ end
104
+ end
105
+
106
+ # Show invalid properties with the reasons. Usually used together with valid?
107
+ # @return Array for valid properties with the reasons
108
+ def list_invalid_properties
109
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
110
+ invalid_properties = Array.new
111
+ if @id.nil?
112
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
113
+ end
114
+
115
+ if @email.nil?
116
+ invalid_properties.push('invalid value for "email", email cannot be nil.')
117
+ end
118
+
119
+ invalid_properties
120
+ end
121
+
122
+ # Check to see if the all the properties in the model are valid
123
+ # @return true if the model is valid
124
+ def valid?
125
+ warn '[DEPRECATED] the `valid?` method is obsolete'
126
+ return false if @id.nil?
127
+ return false if @email.nil?
128
+ true
129
+ end
130
+
131
+ # Custom attribute writer method with validation
132
+ # @param [Object] id Value to be assigned
133
+ def id=(id)
134
+ if id.nil?
135
+ fail ArgumentError, 'id cannot be nil'
136
+ end
137
+
138
+ @id = id
139
+ end
140
+
141
+ # Custom attribute writer method with validation
142
+ # @param [Object] email Value to be assigned
143
+ def email=(email)
144
+ if email.nil?
145
+ fail ArgumentError, 'email cannot be nil'
146
+ end
147
+
148
+ @email = email
149
+ end
150
+
151
+ # Checks equality by comparing each attribute.
152
+ # @param [Object] Object to be compared
153
+ def ==(o)
154
+ return true if self.equal?(o)
155
+ self.class == o.class &&
156
+ id == o.id &&
157
+ email == o.email &&
158
+ name == o.name
159
+ end
160
+
161
+ # @see the `==` method
162
+ # @param [Object] Object to be compared
163
+ def eql?(o)
164
+ self == o
165
+ end
166
+
167
+ # Calculates hash code according to all attributes.
168
+ # @return [Integer] Hash code
169
+ def hash
170
+ [id, email, name].hash
171
+ end
172
+
173
+ # Builds the object from hash
174
+ # @param [Hash] attributes Model attributes in the form of hash
175
+ # @return [Object] Returns the model itself
176
+ def self.build_from_hash(attributes)
177
+ return nil unless attributes.is_a?(Hash)
178
+ attributes = attributes.transform_keys(&:to_sym)
179
+ # include attributes inherited from allOf parents (the nearest declaration wins)
180
+ map = acceptable_attribute_map
181
+ transformed_hash = {}
182
+ acceptable_openapi_types.each_pair do |key, type|
183
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
184
+ transformed_hash["#{key}"] = nil
185
+ elsif type =~ /\AArray<(.*)>/i
186
+ # check to ensure the input is an array given that the attribute
187
+ # is documented as an array but the input is not
188
+ if attributes[map[key]].is_a?(Array)
189
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
190
+ end
191
+ elsif !attributes[map[key]].nil?
192
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
193
+ end
194
+ end
195
+ new(transformed_hash)
196
+ end
197
+
198
+ # Returns the object in the form of hash
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_hash
201
+ hash = {}
202
+ # include attributes inherited from allOf parents (the nearest declaration wins)
203
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
204
+ value = self.send(attr)
205
+ if value.nil?
206
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
207
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
208
+ end
209
+
210
+ hash[param] = _to_hash(value)
211
+ end
212
+ hash
213
+ end
214
+
215
+ end
216
+
217
+ end
@@ -11,5 +11,5 @@ Generator version: 7.26.0
11
11
  =end
12
12
 
13
13
  module LicenseManager
14
- VERSION = '0.3.0'
14
+ VERSION = '0.3.1'
15
15
  end
@@ -56,6 +56,7 @@ require 'license_manager/models/integration_mapping'
56
56
  require 'license_manager/models/integration_mapping_recurring'
57
57
  require 'license_manager/models/integration_status'
58
58
  require 'license_manager/models/license'
59
+ require 'license_manager/models/license_customer'
59
60
  require 'license_manager/models/license_list'
60
61
  require 'license_manager/models/license_max_version'
61
62
  require 'license_manager/models/license_max_version_input'
data/openapi.json CHANGED
@@ -2103,6 +2103,9 @@
2103
2103
  "type": "string",
2104
2104
  "example": "c9Wd3RtE"
2105
2105
  },
2106
+ "customer": {
2107
+ "$ref": "#/components/schemas/LicenseCustomer"
2108
+ },
2106
2109
  "key": {
2107
2110
  "type": "string",
2108
2111
  "description": "Unique within the product. Case sensitive: `validateKey` compares keys exactly.",
@@ -2240,6 +2243,7 @@
2240
2243
  "productId",
2241
2244
  "policyId",
2242
2245
  "customerId",
2246
+ "customer",
2243
2247
  "key",
2244
2248
  "createdAt",
2245
2249
  "expiresAt",
@@ -2261,6 +2265,34 @@
2261
2265
  "updatedAt"
2262
2266
  ]
2263
2267
  },
2268
+ "LicenseCustomer": {
2269
+ "type": "object",
2270
+ "properties": {
2271
+ "id": {
2272
+ "type": "string",
2273
+ "example": "c9Wd3RtE"
2274
+ },
2275
+ "email": {
2276
+ "type": "string",
2277
+ "format": "email",
2278
+ "example": "jane@example.com"
2279
+ },
2280
+ "name": {
2281
+ "type": [
2282
+ "string",
2283
+ "null"
2284
+ ],
2285
+ "description": "Display name of the customer. `null` when unknown.",
2286
+ "example": "Jane Doe"
2287
+ }
2288
+ },
2289
+ "required": [
2290
+ "id",
2291
+ "email",
2292
+ "name"
2293
+ ],
2294
+ "description": "Customer the license belongs to, the one of `customerId`."
2295
+ },
2264
2296
  "LicenseMaxVersion": {
2265
2297
  "type": "object",
2266
2298
  "properties": {
@@ -6402,11 +6434,11 @@
6402
6434
  "type": "string",
6403
6435
  "minLength": 1,
6404
6436
  "maxLength": 200,
6405
- "description": "Case-insensitive text the key contains.",
6437
+ "description": "Case-insensitive text the key or the email of the customer contains.",
6406
6438
  "example": "X9ZPA"
6407
6439
  },
6408
6440
  "required": false,
6409
- "description": "Case-insensitive text the key contains.",
6441
+ "description": "Case-insensitive text the key or the email of the customer contains.",
6410
6442
  "name": "search",
6411
6443
  "in": "query"
6412
6444
  },
@@ -6914,11 +6946,11 @@
6914
6946
  "type": "string",
6915
6947
  "minLength": 1,
6916
6948
  "maxLength": 200,
6917
- "description": "Case-insensitive text the key contains.",
6949
+ "description": "Case-insensitive text the key or the email of the customer contains.",
6918
6950
  "example": "X9ZPA"
6919
6951
  },
6920
6952
  "required": false,
6921
- "description": "Case-insensitive text the key contains.",
6953
+ "description": "Case-insensitive text the key or the email of the customer contains.",
6922
6954
  "name": "search",
6923
6955
  "in": "query"
6924
6956
  },
@@ -113,7 +113,7 @@ describe 'LicensesApi' do
113
113
  # @option opts [Integer] :page Page to return. Pages are numbered from 1: &#x60;1&#x60; is the first page. A page past the last one returns an empty &#x60;data&#x60;, not an error. Defaults to &#x60;1&#x60;.
114
114
  # @option opts [Integer] :page_size Maximum number of items per page, from 1 to 100. Every page holds this many items except the last one, which can hold fewer. Defaults to &#x60;20&#x60;.
115
115
  # @option opts [String] :sort Field to sort by, prefixed with &#x60;-&#x60; for descending order. Defaults to &#x60;-createdAt&#x60;.
116
- # @option opts [String] :search Case-insensitive text the key contains.
116
+ # @option opts [String] :search Case-insensitive text the key or the email of the customer contains.
117
117
  # @option opts [String] :key Only returns the license with this exact key, case included. Keys of test products start with &#x60;TEST-&#x60;.
118
118
  # @option opts [String] :policy_id Only returns the licenses following this policy.
119
119
  # @option opts [String] :machine_version Only returns the licenses with at least one active machine running this version of the product.
@@ -146,7 +146,7 @@ describe 'LicensesApi' do
146
146
  # @option opts [Integer] :page Page to return. Pages are numbered from 1: &#x60;1&#x60; is the first page. A page past the last one returns an empty &#x60;data&#x60;, not an error. Defaults to &#x60;1&#x60;.
147
147
  # @option opts [Integer] :page_size Maximum number of items per page, from 1 to 100. Every page holds this many items except the last one, which can hold fewer. Defaults to &#x60;20&#x60;.
148
148
  # @option opts [String] :sort Field to sort by, prefixed with &#x60;-&#x60; for descending order. Defaults to &#x60;-createdAt&#x60;.
149
- # @option opts [String] :search Case-insensitive text the key contains.
149
+ # @option opts [String] :search Case-insensitive text the key or the email of the customer contains.
150
150
  # @option opts [String] :key Only returns the license with this exact key, case included. Keys of test products start with &#x60;TEST-&#x60;.
151
151
  # @option opts [String] :policy_id Only returns the licenses following this policy.
152
152
  # @option opts [String] :customer_id Only returns the licenses of this customer.
@@ -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::LicenseCustomer
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe LicenseManager::LicenseCustomer do
21
+ #let(:instance) { LicenseManager::LicenseCustomer.new }
22
+
23
+ describe 'test an instance of LicenseCustomer' do
24
+ it 'should create an instance of LicenseCustomer' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(LicenseManager::LicenseCustomer)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "id"' 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 "email"' 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 "name"' 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
@@ -51,6 +51,12 @@ describe LicenseManager::License do
51
51
  end
52
52
  end
53
53
 
54
+ describe 'test attribute "customer"' 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
  describe 'test attribute "key"' do
55
61
  it 'should work' do
56
62
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: license_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - LicenseManager
@@ -131,6 +131,7 @@ files:
131
131
  - docs/IntegrationStatus.md
132
132
  - docs/IntegrationsApi.md
133
133
  - docs/License.md
134
+ - docs/LicenseCustomer.md
134
135
  - docs/LicenseList.md
135
136
  - docs/LicenseMaxVersion.md
136
137
  - docs/LicenseMaxVersionInput.md
@@ -260,6 +261,7 @@ files:
260
261
  - lib/license_manager/models/integration_mapping_recurring.rb
261
262
  - lib/license_manager/models/integration_status.rb
262
263
  - lib/license_manager/models/license.rb
264
+ - lib/license_manager/models/license_customer.rb
263
265
  - lib/license_manager/models/license_list.rb
264
266
  - lib/license_manager/models/license_max_version.rb
265
267
  - lib/license_manager/models/license_max_version_input.rb
@@ -378,6 +380,7 @@ files:
378
380
  - spec/models/integration_mapping_spec.rb
379
381
  - spec/models/integration_spec.rb
380
382
  - spec/models/integration_status_spec.rb
383
+ - spec/models/license_customer_spec.rb
381
384
  - spec/models/license_list_spec.rb
382
385
  - spec/models/license_max_version_input_spec.rb
383
386
  - spec/models/license_max_version_spec.rb
@@ -517,6 +520,7 @@ test_files:
517
520
  - spec/models/integration_mapping_spec.rb
518
521
  - spec/models/integration_spec.rb
519
522
  - spec/models/integration_status_spec.rb
523
+ - spec/models/license_customer_spec.rb
520
524
  - spec/models/license_list_spec.rb
521
525
  - spec/models/license_max_version_input_spec.rb
522
526
  - spec/models/license_max_version_spec.rb