Class: Solifyn::LicenseApi

Inherits:
Object
  • Object
show all
Defined in:
lib/solifyn/api/license_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ LicenseApi

Returns a new instance of LicenseApi.



19
20
21
# File 'lib/solifyn/api/license_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/solifyn/api/license_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#licenses_create(licenses_create_request, opts = {}) ⇒ License

Create License Key Manually issue a new license key for a specific product.

Parameters:

  • licenses_create_request (LicensesCreateRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



27
28
29
30
# File 'lib/solifyn/api/license_api.rb', line 27

def licenses_create(licenses_create_request, opts = {})
  data, _status_code, _headers = licenses_create_with_http_info(licenses_create_request, opts)
  data
end

#licenses_create_with_http_info(licenses_create_request, opts = {}) ⇒ Array<(License, Integer, Hash)>

Create License Key Manually issue a new license key for a specific product.

Parameters:

  • licenses_create_request (LicensesCreateRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(License, Integer, Hash)>)

    License data, response status code and response headers



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/solifyn/api/license_api.rb', line 37

def licenses_create_with_http_info(licenses_create_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LicenseApi.licenses_create ...'
  end
  # verify the required parameter 'licenses_create_request' is set
  if @api_client.config.client_side_validation && licenses_create_request.nil?
    fail ArgumentError, "Missing the required parameter 'licenses_create_request' when calling LicenseApi.licenses_create"
  end
  # resource path
  local_var_path = '/v1/licenses'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(licenses_create_request)

  # return_type
  return_type = opts[:debug_return_type] || 'License'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"LicenseApi.licenses_create",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LicenseApi#licenses_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#licenses_delete_instance(instance_id, opts = {}) ⇒ Instance

Force Delete Instance Administrative endpoint to force-delete an instance globally by its database ID.

Parameters:

  • instance_id (String)

    The unique hardware activation instance ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



95
96
97
98
# File 'lib/solifyn/api/license_api.rb', line 95

def licenses_delete_instance(instance_id, opts = {})
  data, _status_code, _headers = licenses_delete_instance_with_http_info(instance_id, opts)
  data
end

#licenses_delete_instance_with_http_info(instance_id, opts = {}) ⇒ Array<(Instance, Integer, Hash)>

Force Delete Instance Administrative endpoint to force-delete an instance globally by its database ID.

Parameters:

  • instance_id (String)

    The unique hardware activation instance ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Instance, Integer, Hash)>)

    Instance data, response status code and response headers



105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# File 'lib/solifyn/api/license_api.rb', line 105

def licenses_delete_instance_with_http_info(instance_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LicenseApi.licenses_delete_instance ...'
  end
  # verify the required parameter 'instance_id' is set
  if @api_client.config.client_side_validation && instance_id.nil?
    fail ArgumentError, "Missing the required parameter 'instance_id' when calling LicenseApi.licenses_delete_instance"
  end
  # resource path
  local_var_path = '/v1/licenses/instances/{instanceId}'.sub('{' + 'instanceId' + '}', CGI.escape(instance_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Instance'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"LicenseApi.licenses_delete_instance",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LicenseApi#licenses_delete_instance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#licenses_get(id, opts = {}) ⇒ License

Get License Key Retrieve complete administrative details of a specific license key.

Parameters:

  • id (String)

    The unique license key ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



158
159
160
161
# File 'lib/solifyn/api/license_api.rb', line 158

def licenses_get(id, opts = {})
  data, _status_code, _headers = licenses_get_with_http_info(id, opts)
  data
end

#licenses_get_instance(id, instance_id, opts = {}) ⇒ Instance

Get License Key Instance Retrieve administrative details of a specific software license instance.

Parameters:

  • id (String)

    The unique administrative identifier (ID) of the parent license key.

  • instance_id (String)

    The client-generated instance ID (hardware hash) or the internal database ID of the instance.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



222
223
224
225
# File 'lib/solifyn/api/license_api.rb', line 222

def licenses_get_instance(id, instance_id, opts = {})
  data, _status_code, _headers = licenses_get_instance_with_http_info(id, instance_id, opts)
  data
end

#licenses_get_instance_with_http_info(id, instance_id, opts = {}) ⇒ Array<(Instance, Integer, Hash)>

Get License Key Instance Retrieve administrative details of a specific software license instance.

Parameters:

  • id (String)

    The unique administrative identifier (ID) of the parent license key.

  • instance_id (String)

    The client-generated instance ID (hardware hash) or the internal database ID of the instance.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Instance, Integer, Hash)>)

    Instance data, response status code and response headers



233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
# File 'lib/solifyn/api/license_api.rb', line 233

def licenses_get_instance_with_http_info(id, instance_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LicenseApi.licenses_get_instance ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling LicenseApi.licenses_get_instance"
  end
  # verify the required parameter 'instance_id' is set
  if @api_client.config.client_side_validation && instance_id.nil?
    fail ArgumentError, "Missing the required parameter 'instance_id' when calling LicenseApi.licenses_get_instance"
  end
  # resource path
  local_var_path = '/v1/licenses/{id}/instances/{instanceId}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'instanceId' + '}', CGI.escape(instance_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Instance'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"LicenseApi.licenses_get_instance",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LicenseApi#licenses_get_instance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#licenses_get_instances(id, opts = {}) ⇒ Array<Instance>

Get License Key Instances Retrieve all active devices/instances for a specific administrative license key.

Parameters:

  • id (String)

    The unique administrative identifier (ID) of the parent license key.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



290
291
292
293
# File 'lib/solifyn/api/license_api.rb', line 290

def licenses_get_instances(id, opts = {})
  data, _status_code, _headers = licenses_get_instances_with_http_info(id, opts)
  data
end

#licenses_get_instances_with_http_info(id, opts = {}) ⇒ Array<(Array<Instance>, Integer, Hash)>

Get License Key Instances Retrieve all active devices/instances for a specific administrative license key.

Parameters:

  • id (String)

    The unique administrative identifier (ID) of the parent license key.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Array<Instance>, Integer, Hash)>)

    Array<Instance> data, response status code and response headers



300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
# File 'lib/solifyn/api/license_api.rb', line 300

def licenses_get_instances_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LicenseApi.licenses_get_instances ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling LicenseApi.licenses_get_instances"
  end
  # resource path
  local_var_path = '/v1/licenses/{id}/instances'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<Instance>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"LicenseApi.licenses_get_instances",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LicenseApi#licenses_get_instances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#licenses_get_with_http_info(id, opts = {}) ⇒ Array<(License, Integer, Hash)>

Get License Key Retrieve complete administrative details of a specific license key.

Parameters:

  • id (String)

    The unique license key ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(License, Integer, Hash)>)

    License data, response status code and response headers



168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
# File 'lib/solifyn/api/license_api.rb', line 168

def licenses_get_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LicenseApi.licenses_get ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling LicenseApi.licenses_get"
  end
  # resource path
  local_var_path = '/v1/licenses/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'License'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"LicenseApi.licenses_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LicenseApi#licenses_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#licenses_list(opts = {}) ⇒ Array<License>

List License Keys List all administrative license keys belonging to products under your active business.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



352
353
354
355
# File 'lib/solifyn/api/license_api.rb', line 352

def licenses_list(opts = {})
  data, _status_code, _headers = licenses_list_with_http_info(opts)
  data
end

#licenses_list_with_http_info(opts = {}) ⇒ Array<(Array<License>, Integer, Hash)>

List License Keys List all administrative license keys belonging to products under your active business.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Array<License>, Integer, Hash)>)

    Array<License> data, response status code and response headers



361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
# File 'lib/solifyn/api/license_api.rb', line 361

def licenses_list_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LicenseApi.licenses_list ...'
  end
  # resource path
  local_var_path = '/v1/licenses'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<License>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"LicenseApi.licenses_list",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LicenseApi#licenses_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#licenses_toggle(id, opts = {}) ⇒ License

Toggle License Status Toggle the status of a specific license key between ACTIVE and DISABLED.

Parameters:

  • id (String)

    The unique license key ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



410
411
412
413
# File 'lib/solifyn/api/license_api.rb', line 410

def licenses_toggle(id, opts = {})
  data, _status_code, _headers = licenses_toggle_with_http_info(id, opts)
  data
end

#licenses_toggle_with_http_info(id, opts = {}) ⇒ Array<(License, Integer, Hash)>

Toggle License Status Toggle the status of a specific license key between ACTIVE and DISABLED.

Parameters:

  • id (String)

    The unique license key ID.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(License, Integer, Hash)>)

    License data, response status code and response headers



420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
# File 'lib/solifyn/api/license_api.rb', line 420

def licenses_toggle_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LicenseApi.licenses_toggle ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling LicenseApi.licenses_toggle"
  end
  # resource path
  local_var_path = '/v1/licenses/{id}/toggle'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'License'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"LicenseApi.licenses_toggle",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LicenseApi#licenses_toggle\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#licenses_update(id, licenses_update_request, opts = {}) ⇒ License

Update License Key Update limits or status of an existing license key.

Parameters:

  • id (String)

    The unique license key ID.

  • licenses_update_request (LicensesUpdateRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



474
475
476
477
# File 'lib/solifyn/api/license_api.rb', line 474

def licenses_update(id, licenses_update_request, opts = {})
  data, _status_code, _headers = licenses_update_with_http_info(id, licenses_update_request, opts)
  data
end

#licenses_update_instance(instance_id, id, licenses_update_instance_post_request, opts = {}) ⇒ Instance

Update License Key Instance Update administrative details (like friendly display name or custom IP) of an active license device instance.

Parameters:

  • instance_id (String)

    The client-generated instance ID (hardware hash) or the internal database ID of the instance.

  • id (String)

    The unique administrative identifier (ID) of the parent license key.

  • licenses_update_instance_post_request (LicensesUpdateInstancePostRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



549
550
551
552
# File 'lib/solifyn/api/license_api.rb', line 549

def licenses_update_instance(instance_id, id, licenses_update_instance_post_request, opts = {})
  data, _status_code, _headers = licenses_update_instance_with_http_info(instance_id, id, licenses_update_instance_post_request, opts)
  data
end

#licenses_update_instance_post(instance_id, id, licenses_update_instance_post_request, opts = {}) ⇒ Instance

Update License Key Instance (POST) Alternative POST endpoint to update administrative details (like friendly display name or custom IP) of an active license device instance.

Parameters:

  • instance_id (String)

    The client-generated instance ID (hardware hash) or the internal database ID of the instance.

  • id (String)

    The unique administrative identifier (ID) of the parent license key.

  • licenses_update_instance_post_request (LicensesUpdateInstancePostRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



629
630
631
632
# File 'lib/solifyn/api/license_api.rb', line 629

def licenses_update_instance_post(instance_id, id, licenses_update_instance_post_request, opts = {})
  data, _status_code, _headers = licenses_update_instance_post_with_http_info(instance_id, id, licenses_update_instance_post_request, opts)
  data
end

#licenses_update_instance_post_with_http_info(instance_id, id, licenses_update_instance_post_request, opts = {}) ⇒ Array<(Instance, Integer, Hash)>

Update License Key Instance (POST) Alternative POST endpoint to update administrative details (like friendly display name or custom IP) of an active license device instance.

Parameters:

  • instance_id (String)

    The client-generated instance ID (hardware hash) or the internal database ID of the instance.

  • id (String)

    The unique administrative identifier (ID) of the parent license key.

  • licenses_update_instance_post_request (LicensesUpdateInstancePostRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Instance, Integer, Hash)>)

    Instance data, response status code and response headers



641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
# File 'lib/solifyn/api/license_api.rb', line 641

def licenses_update_instance_post_with_http_info(instance_id, id, licenses_update_instance_post_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LicenseApi.licenses_update_instance_post ...'
  end
  # verify the required parameter 'instance_id' is set
  if @api_client.config.client_side_validation && instance_id.nil?
    fail ArgumentError, "Missing the required parameter 'instance_id' when calling LicenseApi.licenses_update_instance_post"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling LicenseApi.licenses_update_instance_post"
  end
  # verify the required parameter 'licenses_update_instance_post_request' is set
  if @api_client.config.client_side_validation && licenses_update_instance_post_request.nil?
    fail ArgumentError, "Missing the required parameter 'licenses_update_instance_post_request' when calling LicenseApi.licenses_update_instance_post"
  end
  # resource path
  local_var_path = '/v1/licenses/{id}/instances/{instanceId}'.sub('{' + 'instanceId' + '}', CGI.escape(instance_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(licenses_update_instance_post_request)

  # return_type
  return_type = opts[:debug_return_type] || 'Instance'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"LicenseApi.licenses_update_instance_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LicenseApi#licenses_update_instance_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#licenses_update_instance_with_http_info(instance_id, id, licenses_update_instance_post_request, opts = {}) ⇒ Array<(Instance, Integer, Hash)>

Update License Key Instance Update administrative details (like friendly display name or custom IP) of an active license device instance.

Parameters:

  • instance_id (String)

    The client-generated instance ID (hardware hash) or the internal database ID of the instance.

  • id (String)

    The unique administrative identifier (ID) of the parent license key.

  • licenses_update_instance_post_request (LicensesUpdateInstancePostRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Instance, Integer, Hash)>)

    Instance data, response status code and response headers



561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
# File 'lib/solifyn/api/license_api.rb', line 561

def licenses_update_instance_with_http_info(instance_id, id, licenses_update_instance_post_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LicenseApi.licenses_update_instance ...'
  end
  # verify the required parameter 'instance_id' is set
  if @api_client.config.client_side_validation && instance_id.nil?
    fail ArgumentError, "Missing the required parameter 'instance_id' when calling LicenseApi.licenses_update_instance"
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling LicenseApi.licenses_update_instance"
  end
  # verify the required parameter 'licenses_update_instance_post_request' is set
  if @api_client.config.client_side_validation && licenses_update_instance_post_request.nil?
    fail ArgumentError, "Missing the required parameter 'licenses_update_instance_post_request' when calling LicenseApi.licenses_update_instance"
  end
  # resource path
  local_var_path = '/v1/licenses/{id}/instances/{instanceId}'.sub('{' + 'instanceId' + '}', CGI.escape(instance_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(licenses_update_instance_post_request)

  # return_type
  return_type = opts[:debug_return_type] || 'Instance'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"LicenseApi.licenses_update_instance",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LicenseApi#licenses_update_instance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#licenses_update_with_http_info(id, licenses_update_request, opts = {}) ⇒ Array<(License, Integer, Hash)>

Update License Key Update limits or status of an existing license key.

Parameters:

  • id (String)

    The unique license key ID.

  • licenses_update_request (LicensesUpdateRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(License, Integer, Hash)>)

    License data, response status code and response headers



485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
# File 'lib/solifyn/api/license_api.rb', line 485

def licenses_update_with_http_info(id, licenses_update_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LicenseApi.licenses_update ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling LicenseApi.licenses_update"
  end
  # verify the required parameter 'licenses_update_request' is set
  if @api_client.config.client_side_validation && licenses_update_request.nil?
    fail ArgumentError, "Missing the required parameter 'licenses_update_request' when calling LicenseApi.licenses_update"
  end
  # resource path
  local_var_path = '/v1/licenses/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(licenses_update_request)

  # return_type
  return_type = opts[:debug_return_type] || 'License'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['ApiKeyAuth']

  new_options = opts.merge(
    :operation => :"LicenseApi.licenses_update",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LicenseApi#licenses_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end