license_manager 0.1.1 → 0.3.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.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +152 -0
  3. data/README.md +3 -3
  4. data/docs/BillingPortalSession.md +18 -0
  5. data/docs/CancelLicense.md +22 -0
  6. data/docs/CancellationReason.md +15 -0
  7. data/docs/CancellationStats.md +30 -0
  8. data/docs/CancellationStatsByReasonInner.md +20 -0
  9. data/docs/ConnectStripe.md +1 -1
  10. data/docs/CreateBillingPortalSession.md +18 -0
  11. data/docs/CreateIntegrationMapping.md +1 -1
  12. data/docs/CreateLicense.md +2 -0
  13. data/docs/CreatePolicy.md +3 -1
  14. data/docs/CreateProductWithPolicy.md +1 -1
  15. data/docs/CreateToken.md +1 -1
  16. data/docs/EventActorOneOf.md +1 -1
  17. data/docs/Integration.md +11 -1
  18. data/docs/IntegrationMapping.md +2 -0
  19. data/docs/IntegrationMappingRecurring.md +20 -0
  20. data/docs/IntegrationsApi.md +74 -0
  21. data/docs/License.md +12 -0
  22. data/docs/LicenseSubscription.md +34 -0
  23. data/docs/LicensesApi.md +80 -3
  24. data/docs/Machine.md +3 -1
  25. data/docs/MachinesApi.md +1 -1
  26. data/docs/Mrr.md +26 -0
  27. data/docs/MrrByIntervalInner.md +24 -0
  28. data/docs/MrrByPolicyInner.md +22 -0
  29. data/docs/Policy.md +2 -0
  30. data/docs/PolicySettings.md +3 -1
  31. data/docs/PortalApi.md +80 -1
  32. data/docs/PortalLink.md +2 -2
  33. data/docs/Product.md +2 -0
  34. data/docs/ProductStats.md +8 -4
  35. data/docs/ProductsApi.md +2 -2
  36. data/docs/Revenue.md +10 -2
  37. data/docs/StripeIntegration.md +1 -1
  38. data/docs/StripePermission.md +5 -1
  39. data/docs/StripePrice.md +2 -0
  40. data/docs/StripePriceRecurring.md +20 -0
  41. data/docs/SubscriptionStats.md +38 -0
  42. data/docs/UpdateIntegration.md +20 -0
  43. data/docs/UpdateLicense.md +3 -1
  44. data/docs/UpdatePolicy.md +3 -1
  45. data/docs/UpdateProduct.md +3 -1
  46. data/lib/license_manager/api/integrations_api.rb +74 -0
  47. data/lib/license_manager/api/licenses_api.rb +80 -6
  48. data/lib/license_manager/api/machines_api.rb +3 -3
  49. data/lib/license_manager/api/portal_api.rb +72 -2
  50. data/lib/license_manager/api/products_api.rb +4 -4
  51. data/lib/license_manager/models/billing_portal_session.rb +178 -0
  52. data/lib/license_manager/models/cancel_license.rb +238 -0
  53. data/lib/license_manager/models/cancellation_reason.rb +45 -0
  54. data/lib/license_manager/models/cancellation_stats.rb +347 -0
  55. data/lib/license_manager/models/cancellation_stats_by_reason_inner.rb +225 -0
  56. data/lib/license_manager/models/connect_stripe.rb +1 -1
  57. data/lib/license_manager/models/create_billing_portal_session.rb +161 -0
  58. data/lib/license_manager/models/create_integration_mapping.rb +1 -1
  59. data/lib/license_manager/models/create_license.rb +12 -1
  60. data/lib/license_manager/models/create_policy.rb +40 -5
  61. data/lib/license_manager/models/create_product_with_policy.rb +1 -1
  62. data/lib/license_manager/models/create_token.rb +1 -1
  63. data/lib/license_manager/models/event_type.rb +7 -1
  64. data/lib/license_manager/models/integration.rb +136 -1
  65. data/lib/license_manager/models/integration_mapping.rb +13 -1
  66. data/lib/license_manager/models/integration_mapping_recurring.rb +228 -0
  67. data/lib/license_manager/models/license.rb +91 -1
  68. data/lib/license_manager/models/license_status.rb +2 -1
  69. data/lib/license_manager/models/license_subscription.rb +388 -0
  70. data/lib/license_manager/models/machine.rb +17 -4
  71. data/lib/license_manager/models/mrr.rb +291 -0
  72. data/lib/license_manager/models/mrr_by_interval_inner.rb +279 -0
  73. data/lib/license_manager/models/mrr_by_policy_inner.rb +229 -0
  74. data/lib/license_manager/models/policy.rb +14 -1
  75. data/lib/license_manager/models/policy_settings.rb +40 -5
  76. data/lib/license_manager/models/portal_link.rb +1 -1
  77. data/lib/license_manager/models/product.rb +28 -1
  78. data/lib/license_manager/models/product_stats.rb +31 -5
  79. data/lib/license_manager/models/revenue.rb +112 -4
  80. data/lib/license_manager/models/stripe_integration.rb +1 -1
  81. data/lib/license_manager/models/stripe_permission.rb +58 -4
  82. data/lib/license_manager/models/stripe_price.rb +13 -1
  83. data/lib/license_manager/models/stripe_price_recurring.rb +228 -0
  84. data/lib/license_manager/models/subscription_stats.rb +456 -0
  85. data/lib/license_manager/models/update_integration.rb +199 -0
  86. data/lib/license_manager/models/update_license.rb +16 -5
  87. data/lib/license_manager/models/update_policy.rb +40 -5
  88. data/lib/license_manager/models/update_product.rb +14 -4
  89. data/lib/license_manager/version.rb +1 -1
  90. data/lib/license_manager.rb +14 -0
  91. data/openapi.json +1146 -59
  92. data/spec/api/integrations_api_spec.rb +13 -0
  93. data/spec/api/licenses_api_spec.rb +16 -3
  94. data/spec/api/machines_api_spec.rb +1 -1
  95. data/spec/api/portal_api_spec.rb +14 -1
  96. data/spec/api/products_api_spec.rb +2 -2
  97. data/spec/models/billing_portal_session_spec.rb +36 -0
  98. data/spec/models/cancel_license_spec.rb +48 -0
  99. data/spec/models/cancellation_reason_spec.rb +30 -0
  100. data/spec/models/cancellation_stats_by_reason_inner_spec.rb +42 -0
  101. data/spec/models/cancellation_stats_spec.rb +72 -0
  102. data/spec/models/create_billing_portal_session_spec.rb +36 -0
  103. data/spec/models/create_license_spec.rb +6 -0
  104. data/spec/models/create_policy_spec.rb +6 -0
  105. data/spec/models/create_token_spec.rb +1 -1
  106. data/spec/models/integration_mapping_recurring_spec.rb +46 -0
  107. data/spec/models/integration_mapping_spec.rb +6 -0
  108. data/spec/models/integration_spec.rb +30 -0
  109. data/spec/models/license_spec.rb +36 -0
  110. data/spec/models/license_subscription_spec.rb +88 -0
  111. data/spec/models/machine_spec.rb +7 -1
  112. data/spec/models/mrr_by_interval_inner_spec.rb +58 -0
  113. data/spec/models/mrr_by_policy_inner_spec.rb +48 -0
  114. data/spec/models/mrr_spec.rb +60 -0
  115. data/spec/models/policy_settings_spec.rb +6 -0
  116. data/spec/models/policy_spec.rb +6 -0
  117. data/spec/models/product_spec.rb +6 -0
  118. data/spec/models/product_stats_spec.rb +12 -0
  119. data/spec/models/revenue_spec.rb +24 -0
  120. data/spec/models/stripe_permission_spec.rb +12 -0
  121. data/spec/models/stripe_price_recurring_spec.rb +46 -0
  122. data/spec/models/stripe_price_spec.rb +6 -0
  123. data/spec/models/subscription_stats_spec.rb +96 -0
  124. data/spec/models/token_spec.rb +1 -1
  125. data/spec/models/update_integration_spec.rb +42 -0
  126. data/spec/models/update_license_spec.rb +6 -0
  127. data/spec/models/update_policy_spec.rb +6 -0
  128. data/spec/models/update_product_spec.rb +6 -0
  129. metadata +57 -1
@@ -0,0 +1,388 @@
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
+ # The Stripe subscription keeping the license valid, `null` when it isn't a subscription license. The license expires when it stops being paid, includes every update, and can't be canceled during a money back guarantee.
18
+ class LicenseSubscription < ApiModelBase
19
+ attr_accessor :stripe_subscription_id
20
+
21
+ # Status of the subscription in Stripe: `active`, `trialing`, `past_due` while a failed payment is retried, `canceled`, `unpaid`, `paused`, `incomplete` or `incomplete_expired`.
22
+ attr_accessor :status
23
+
24
+ attr_accessor :interval
25
+
26
+ # Number of intervals between payments.
27
+ attr_accessor :interval_count
28
+
29
+ # Units subscribed, multiplying the policy's machines.
30
+ attr_accessor :quantity
31
+
32
+ # Price of one unit for one period, before taxes.
33
+ attr_accessor :price
34
+
35
+ # End of the paid period, when the subscription renews or ends.
36
+ attr_accessor :current_period_end
37
+
38
+ # Whether the subscription ends at the end of the period.
39
+ attr_accessor :cancel_at_period_end
40
+
41
+ attr_accessor :ended_at
42
+
43
+ class EnumAttributeValidator
44
+ attr_reader :datatype
45
+ attr_reader :allowable_values
46
+
47
+ def initialize(datatype, allowable_values)
48
+ @allowable_values = allowable_values.map do |value|
49
+ case datatype.to_s
50
+ when /Integer/i
51
+ value.to_i
52
+ when /Float/i
53
+ value.to_f
54
+ else
55
+ value
56
+ end
57
+ end
58
+ end
59
+
60
+ def valid?(value)
61
+ !value || allowable_values.include?(value)
62
+ end
63
+ end
64
+
65
+ # Attribute mapping from ruby-style variable name to JSON key.
66
+ def self.attribute_map
67
+ {
68
+ :'stripe_subscription_id' => :'stripeSubscriptionId',
69
+ :'status' => :'status',
70
+ :'interval' => :'interval',
71
+ :'interval_count' => :'intervalCount',
72
+ :'quantity' => :'quantity',
73
+ :'price' => :'price',
74
+ :'current_period_end' => :'currentPeriodEnd',
75
+ :'cancel_at_period_end' => :'cancelAtPeriodEnd',
76
+ :'ended_at' => :'endedAt'
77
+ }
78
+ end
79
+
80
+ # Returns attribute mapping this model knows about
81
+ def self.acceptable_attribute_map
82
+ attribute_map
83
+ end
84
+
85
+ # Returns all the JSON keys this model knows about
86
+ def self.acceptable_attributes
87
+ acceptable_attribute_map.values
88
+ end
89
+
90
+ # Attribute type mapping.
91
+ def self.openapi_types
92
+ {
93
+ :'stripe_subscription_id' => :'String',
94
+ :'status' => :'String',
95
+ :'interval' => :'String',
96
+ :'interval_count' => :'Integer',
97
+ :'quantity' => :'Integer',
98
+ :'price' => :'Price',
99
+ :'current_period_end' => :'Time',
100
+ :'cancel_at_period_end' => :'Boolean',
101
+ :'ended_at' => :'Time'
102
+ }
103
+ end
104
+
105
+ # List of attributes with nullable: true
106
+ def self.openapi_nullable
107
+ Set.new([
108
+ :'price',
109
+ :'ended_at'
110
+ ])
111
+ end
112
+
113
+ # Returns attribute type mapping
114
+ def self.acceptable_openapi_types
115
+ openapi_types
116
+ end
117
+
118
+ # Returns the nullable attributes
119
+ def self.acceptable_openapi_nullable
120
+ openapi_nullable
121
+ end
122
+
123
+ # Initializes the object
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ def initialize(attributes = {})
126
+ if (!attributes.is_a?(Hash))
127
+ fail ArgumentError, "The input argument (attributes) must be a hash in `LicenseManager::LicenseSubscription` initialize method"
128
+ end
129
+
130
+ # check to see if the attribute exists and convert string to symbol for hash key
131
+ acceptable_attribute_map = self.class.acceptable_attribute_map
132
+ attributes = attributes.each_with_object({}) { |(k, v), h|
133
+ if (!acceptable_attribute_map.key?(k.to_sym))
134
+ fail ArgumentError, "`#{k}` is not a valid attribute in `LicenseManager::LicenseSubscription`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
135
+ end
136
+ h[k.to_sym] = v
137
+ }
138
+
139
+ if attributes.key?(:'stripe_subscription_id')
140
+ self.stripe_subscription_id = attributes[:'stripe_subscription_id']
141
+ else
142
+ self.stripe_subscription_id = nil
143
+ end
144
+
145
+ if attributes.key?(:'status')
146
+ self.status = attributes[:'status']
147
+ else
148
+ self.status = nil
149
+ end
150
+
151
+ if attributes.key?(:'interval')
152
+ self.interval = attributes[:'interval']
153
+ else
154
+ self.interval = nil
155
+ end
156
+
157
+ if attributes.key?(:'interval_count')
158
+ self.interval_count = attributes[:'interval_count']
159
+ else
160
+ self.interval_count = nil
161
+ end
162
+
163
+ if attributes.key?(:'quantity')
164
+ self.quantity = attributes[:'quantity']
165
+ else
166
+ self.quantity = nil
167
+ end
168
+
169
+ if attributes.key?(:'price')
170
+ self.price = attributes[:'price']
171
+ else
172
+ self.price = nil
173
+ end
174
+
175
+ if attributes.key?(:'current_period_end')
176
+ self.current_period_end = attributes[:'current_period_end']
177
+ else
178
+ self.current_period_end = nil
179
+ end
180
+
181
+ if attributes.key?(:'cancel_at_period_end')
182
+ self.cancel_at_period_end = attributes[:'cancel_at_period_end']
183
+ else
184
+ self.cancel_at_period_end = nil
185
+ end
186
+
187
+ if attributes.key?(:'ended_at')
188
+ self.ended_at = attributes[:'ended_at']
189
+ else
190
+ self.ended_at = nil
191
+ end
192
+ end
193
+
194
+ # Show invalid properties with the reasons. Usually used together with valid?
195
+ # @return Array for valid properties with the reasons
196
+ def list_invalid_properties
197
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
198
+ invalid_properties = Array.new
199
+ if @stripe_subscription_id.nil?
200
+ invalid_properties.push('invalid value for "stripe_subscription_id", stripe_subscription_id cannot be nil.')
201
+ end
202
+
203
+ if @status.nil?
204
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
205
+ end
206
+
207
+ if @interval.nil?
208
+ invalid_properties.push('invalid value for "interval", interval cannot be nil.')
209
+ end
210
+
211
+ if @interval_count.nil?
212
+ invalid_properties.push('invalid value for "interval_count", interval_count cannot be nil.')
213
+ end
214
+
215
+ if @quantity.nil?
216
+ invalid_properties.push('invalid value for "quantity", quantity cannot be nil.')
217
+ end
218
+
219
+ if @current_period_end.nil?
220
+ invalid_properties.push('invalid value for "current_period_end", current_period_end cannot be nil.')
221
+ end
222
+
223
+ if @cancel_at_period_end.nil?
224
+ invalid_properties.push('invalid value for "cancel_at_period_end", cancel_at_period_end cannot be nil.')
225
+ end
226
+
227
+ invalid_properties
228
+ end
229
+
230
+ # Check to see if the all the properties in the model are valid
231
+ # @return true if the model is valid
232
+ def valid?
233
+ warn '[DEPRECATED] the `valid?` method is obsolete'
234
+ return false if @stripe_subscription_id.nil?
235
+ return false if @status.nil?
236
+ return false if @interval.nil?
237
+ interval_validator = EnumAttributeValidator.new('String', ["day", "week", "month", "year", "unknown_default_open_api"])
238
+ return false unless interval_validator.valid?(@interval)
239
+ return false if @interval_count.nil?
240
+ return false if @quantity.nil?
241
+ return false if @current_period_end.nil?
242
+ return false if @cancel_at_period_end.nil?
243
+ true
244
+ end
245
+
246
+ # Custom attribute writer method with validation
247
+ # @param [Object] stripe_subscription_id Value to be assigned
248
+ def stripe_subscription_id=(stripe_subscription_id)
249
+ if stripe_subscription_id.nil?
250
+ fail ArgumentError, 'stripe_subscription_id cannot be nil'
251
+ end
252
+
253
+ @stripe_subscription_id = stripe_subscription_id
254
+ end
255
+
256
+ # Custom attribute writer method with validation
257
+ # @param [Object] status Value to be assigned
258
+ def status=(status)
259
+ if status.nil?
260
+ fail ArgumentError, 'status cannot be nil'
261
+ end
262
+
263
+ @status = status
264
+ end
265
+
266
+ # Custom attribute writer method checking allowed values (enum).
267
+ # @param [Object] interval Object to be assigned
268
+ def interval=(interval)
269
+ validator = EnumAttributeValidator.new('String', ["day", "week", "month", "year", "unknown_default_open_api"])
270
+ unless validator.valid?(interval)
271
+ fail ArgumentError, "invalid value for \"interval\", must be one of #{validator.allowable_values}."
272
+ end
273
+ @interval = interval
274
+ end
275
+
276
+ # Custom attribute writer method with validation
277
+ # @param [Object] interval_count Value to be assigned
278
+ def interval_count=(interval_count)
279
+ if interval_count.nil?
280
+ fail ArgumentError, 'interval_count cannot be nil'
281
+ end
282
+
283
+ @interval_count = interval_count
284
+ end
285
+
286
+ # Custom attribute writer method with validation
287
+ # @param [Object] quantity Value to be assigned
288
+ def quantity=(quantity)
289
+ if quantity.nil?
290
+ fail ArgumentError, 'quantity cannot be nil'
291
+ end
292
+
293
+ @quantity = quantity
294
+ end
295
+
296
+ # Custom attribute writer method with validation
297
+ # @param [Object] current_period_end Value to be assigned
298
+ def current_period_end=(current_period_end)
299
+ if current_period_end.nil?
300
+ fail ArgumentError, 'current_period_end cannot be nil'
301
+ end
302
+
303
+ @current_period_end = current_period_end
304
+ end
305
+
306
+ # Custom attribute writer method with validation
307
+ # @param [Object] cancel_at_period_end Value to be assigned
308
+ def cancel_at_period_end=(cancel_at_period_end)
309
+ if cancel_at_period_end.nil?
310
+ fail ArgumentError, 'cancel_at_period_end cannot be nil'
311
+ end
312
+
313
+ @cancel_at_period_end = cancel_at_period_end
314
+ end
315
+
316
+ # Checks equality by comparing each attribute.
317
+ # @param [Object] Object to be compared
318
+ def ==(o)
319
+ return true if self.equal?(o)
320
+ self.class == o.class &&
321
+ stripe_subscription_id == o.stripe_subscription_id &&
322
+ status == o.status &&
323
+ interval == o.interval &&
324
+ interval_count == o.interval_count &&
325
+ quantity == o.quantity &&
326
+ price == o.price &&
327
+ current_period_end == o.current_period_end &&
328
+ cancel_at_period_end == o.cancel_at_period_end &&
329
+ ended_at == o.ended_at
330
+ end
331
+
332
+ # @see the `==` method
333
+ # @param [Object] Object to be compared
334
+ def eql?(o)
335
+ self == o
336
+ end
337
+
338
+ # Calculates hash code according to all attributes.
339
+ # @return [Integer] Hash code
340
+ def hash
341
+ [stripe_subscription_id, status, interval, interval_count, quantity, price, current_period_end, cancel_at_period_end, ended_at].hash
342
+ end
343
+
344
+ # Builds the object from hash
345
+ # @param [Hash] attributes Model attributes in the form of hash
346
+ # @return [Object] Returns the model itself
347
+ def self.build_from_hash(attributes)
348
+ return nil unless attributes.is_a?(Hash)
349
+ attributes = attributes.transform_keys(&:to_sym)
350
+ # include attributes inherited from allOf parents (the nearest declaration wins)
351
+ map = acceptable_attribute_map
352
+ transformed_hash = {}
353
+ acceptable_openapi_types.each_pair do |key, type|
354
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
355
+ transformed_hash["#{key}"] = nil
356
+ elsif type =~ /\AArray<(.*)>/i
357
+ # check to ensure the input is an array given that the attribute
358
+ # is documented as an array but the input is not
359
+ if attributes[map[key]].is_a?(Array)
360
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
361
+ end
362
+ elsif !attributes[map[key]].nil?
363
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
364
+ end
365
+ end
366
+ new(transformed_hash)
367
+ end
368
+
369
+ # Returns the object in the form of hash
370
+ # @return [Hash] Returns the object in the form of hash
371
+ def to_hash
372
+ hash = {}
373
+ # include attributes inherited from allOf parents (the nearest declaration wins)
374
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
375
+ value = self.send(attr)
376
+ if value.nil?
377
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
378
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
379
+ end
380
+
381
+ hash[param] = _to_hash(value)
382
+ end
383
+ hash
384
+ end
385
+
386
+ end
387
+
388
+ end
@@ -26,12 +26,15 @@ module LicenseManager
26
26
 
27
27
  attr_accessor :name
28
28
 
29
- # Whether the machine counts as using the license.
29
+ # Whether the machine counts as using the license. A `locked` machine doesn't, and its validations are refused with `machine_locked`: it overrode a machine that came back. See `validateKey`.
30
30
  attr_accessor :status
31
31
 
32
32
  # Version of the application last validated on the machine.
33
33
  attr_accessor :version
34
34
 
35
+ # For a machine deactivated or locked by automatic machine changes, the machine that took its place. Validating the key on a deactivated machine that has one takes its place back. `null` otherwise.
36
+ attr_accessor :overridden_by_machine_id
37
+
35
38
  # When the license was last validated on the machine.
36
39
  attr_accessor :last_validated_at
37
40
 
@@ -71,6 +74,7 @@ module LicenseManager
71
74
  :'name' => :'name',
72
75
  :'status' => :'status',
73
76
  :'version' => :'version',
77
+ :'overridden_by_machine_id' => :'overriddenByMachineId',
74
78
  :'last_validated_at' => :'lastValidatedAt',
75
79
  :'created_at' => :'createdAt',
76
80
  :'updated_at' => :'updatedAt'
@@ -97,6 +101,7 @@ module LicenseManager
97
101
  :'name' => :'String',
98
102
  :'status' => :'String',
99
103
  :'version' => :'String',
104
+ :'overridden_by_machine_id' => :'String',
100
105
  :'last_validated_at' => :'Time',
101
106
  :'created_at' => :'Time',
102
107
  :'updated_at' => :'Time'
@@ -109,6 +114,7 @@ module LicenseManager
109
114
  :'platform',
110
115
  :'name',
111
116
  :'version',
117
+ :'overridden_by_machine_id',
112
118
  :'last_validated_at',
113
119
  ])
114
120
  end
@@ -181,6 +187,12 @@ module LicenseManager
181
187
  self.version = nil
182
188
  end
183
189
 
190
+ if attributes.key?(:'overridden_by_machine_id')
191
+ self.overridden_by_machine_id = attributes[:'overridden_by_machine_id']
192
+ else
193
+ self.overridden_by_machine_id = nil
194
+ end
195
+
184
196
  if attributes.key?(:'last_validated_at')
185
197
  self.last_validated_at = attributes[:'last_validated_at']
186
198
  else
@@ -240,7 +252,7 @@ module LicenseManager
240
252
  return false if @license_id.nil?
241
253
  return false if @fingerprint.nil?
242
254
  return false if @status.nil?
243
- status_validator = EnumAttributeValidator.new('String', ["active", "deactivated", "unknown_default_open_api"])
255
+ status_validator = EnumAttributeValidator.new('String', ["active", "deactivated", "locked", "unknown_default_open_api"])
244
256
  return false unless status_validator.valid?(@status)
245
257
  return false if @created_at.nil?
246
258
  return false if @updated_at.nil?
@@ -280,7 +292,7 @@ module LicenseManager
280
292
  # Custom attribute writer method checking allowed values (enum).
281
293
  # @param [Object] status Object to be assigned
282
294
  def status=(status)
283
- validator = EnumAttributeValidator.new('String', ["active", "deactivated", "unknown_default_open_api"])
295
+ validator = EnumAttributeValidator.new('String', ["active", "deactivated", "locked", "unknown_default_open_api"])
284
296
  unless validator.valid?(status)
285
297
  fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
286
298
  end
@@ -319,6 +331,7 @@ module LicenseManager
319
331
  name == o.name &&
320
332
  status == o.status &&
321
333
  version == o.version &&
334
+ overridden_by_machine_id == o.overridden_by_machine_id &&
322
335
  last_validated_at == o.last_validated_at &&
323
336
  created_at == o.created_at &&
324
337
  updated_at == o.updated_at
@@ -333,7 +346,7 @@ module LicenseManager
333
346
  # Calculates hash code according to all attributes.
334
347
  # @return [Integer] Hash code
335
348
  def hash
336
- [id, license_id, fingerprint, platform, name, status, version, last_validated_at, created_at, updated_at].hash
349
+ [id, license_id, fingerprint, platform, name, status, version, overridden_by_machine_id, last_validated_at, created_at, updated_at].hash
337
350
  end
338
351
 
339
352
  # Builds the object from hash