Class: BlueprintClient::IntegrationsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/blueprint_ruby_client/api/integrations_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ IntegrationsApi

Returns a new instance of IntegrationsApi.



19
20
21
# File 'lib/blueprint_ruby_client/api/integrations_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/blueprint_ruby_client/api/integrations_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#add_integration(namespace, body, opts = {}) ⇒ IntegrationBody

Add an integration

Parameters:

  • namespace

    identifier namespacing the blueprint.

  • body

    integration

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

    the optional parameters

Returns:



29
30
31
32
# File 'lib/blueprint_ruby_client/api/integrations_api.rb', line 29

def add_integration(namespace, body, opts = {})
  data, _status_code, _headers = add_integration_with_http_info(namespace, body, opts)
  return data
end

#add_integration_with_http_info(namespace, body, opts = {}) ⇒ Array<(IntegrationBody, Fixnum, Hash)>

Add an integration

Parameters:

  • namespace

    identifier namespacing the blueprint.

  • body

    integration

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

    the optional parameters

Returns:

  • (Array<(IntegrationBody, Fixnum, Hash)>)

    IntegrationBody data, response status code and response headers



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
89
90
91
92
93
94
95
96
# File 'lib/blueprint_ruby_client/api/integrations_api.rb', line 40

def add_integration_with_http_info(namespace, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IntegrationsApi.add_integration ..."
  end
  
  
  # verify the required parameter 'namespace' is set
  fail ArgumentError, "Missing the required parameter 'namespace' when calling IntegrationsApi.add_integration" if namespace.nil?
  
  
  
  
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationsApi.add_integration" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/{namespace}/integrations".sub('{format}','json').sub('{' + 'namespace' + '}', namespace.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/vnd.api+json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['oauth2']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'IntegrationBody')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IntegrationsApi#add_integration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_integration(namespace, integration_id, integration_type, opts = {}) ⇒ nil

Delete an integration

Parameters:

  • namespace

    identifier namespacing the blueprint.

  • integration_id

    id of an integration

  • integration_type

    Type of external integration, e.g. &#39;lti1&#39;

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

    the optional parameters

Returns:

  • (nil)


105
106
107
108
# File 'lib/blueprint_ruby_client/api/integrations_api.rb', line 105

def delete_integration(namespace, integration_id, integration_type, opts = {})
  delete_integration_with_http_info(namespace, integration_id, integration_type, opts)
  return nil
end

#delete_integration_with_http_info(namespace, integration_id, integration_type, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete an integration

Parameters:

  • namespace

    identifier namespacing the blueprint.

  • integration_id

    id of an integration

  • integration_type

    Type of external integration, e.g. &#39;lti1&#39;

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

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# File 'lib/blueprint_ruby_client/api/integrations_api.rb', line 117

def delete_integration_with_http_info(namespace, integration_id, integration_type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IntegrationsApi.delete_integration ..."
  end
  
  
  # verify the required parameter 'namespace' is set
  fail ArgumentError, "Missing the required parameter 'namespace' when calling IntegrationsApi.delete_integration" if namespace.nil?
  
  
  
  
  
  
  # verify the required parameter 'integration_id' is set
  fail ArgumentError, "Missing the required parameter 'integration_id' when calling IntegrationsApi.delete_integration" if integration_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'integration_type' is set
  fail ArgumentError, "Missing the required parameter 'integration_type' when calling IntegrationsApi.delete_integration" if integration_type.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/{namespace}/integrations/{integrationType}/{integrationId}".sub('{format}','json').sub('{' + 'namespace' + '}', namespace.to_s).sub('{' + 'integrationId' + '}', integration_id.to_s).sub('{' + 'integrationType' + '}', integration_type.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/vnd.api+json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['oauth2']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IntegrationsApi#delete_integration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_integration(namespace, integration_type, integration_id, opts = {}) ⇒ IntegrationBody

Get details of a given integration

Parameters:

  • namespace

    identifier namespacing the blueprint.

  • integration_type

    Type of external integration, e.g. &#39;lti1&#39;

  • integration_id

    id of an integration

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

    the optional parameters

Returns:



189
190
191
192
# File 'lib/blueprint_ruby_client/api/integrations_api.rb', line 189

def get_integration(namespace, integration_type, integration_id, opts = {})
  data, _status_code, _headers = get_integration_with_http_info(namespace, integration_type, integration_id, opts)
  return data
end

#get_integration_with_http_info(namespace, integration_type, integration_id, opts = {}) ⇒ Array<(IntegrationBody, Fixnum, Hash)>

Get details of a given integration

Parameters:

  • namespace

    identifier namespacing the blueprint.

  • integration_type

    Type of external integration, e.g. &#39;lti1&#39;

  • integration_id

    id of an integration

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

    the optional parameters

Returns:

  • (Array<(IntegrationBody, Fixnum, Hash)>)

    IntegrationBody data, response status code and response headers



201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
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
# File 'lib/blueprint_ruby_client/api/integrations_api.rb', line 201

def get_integration_with_http_info(namespace, integration_type, integration_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IntegrationsApi.get_integration ..."
  end
  
  
  # verify the required parameter 'namespace' is set
  fail ArgumentError, "Missing the required parameter 'namespace' when calling IntegrationsApi.get_integration" if namespace.nil?
  
  
  
  
  
  
  # verify the required parameter 'integration_type' is set
  fail ArgumentError, "Missing the required parameter 'integration_type' when calling IntegrationsApi.get_integration" if integration_type.nil?
  
  
  
  
  
  
  # verify the required parameter 'integration_id' is set
  fail ArgumentError, "Missing the required parameter 'integration_id' when calling IntegrationsApi.get_integration" if integration_id.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/{namespace}/integrations/{integrationType}/{integrationId}".sub('{format}','json').sub('{' + 'namespace' + '}', namespace.to_s).sub('{' + 'integrationType' + '}', integration_type.to_s).sub('{' + 'integrationId' + '}', integration_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/vnd.api+json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['oauth2']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'IntegrationBody')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IntegrationsApi#get_integration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post(namespace, integration_id, asset_type, asset_id, lti_message_type, lti_version, resource_link_id, opts = {}) ⇒ nil

LTI launch url for integration

Parameters:

  • namespace

    identifier namespacing the blueprint.

  • integration_id

    id of an integration

  • asset_type

    subtype of Asset, e.g. &#39;textbooks&#39;, &#39;digitisations&#39;, etc.

  • asset_id

    id of an asset

  • lti_message_type

    LTI launch data message type, must be &#39;basic-lti-launch-request&#39;

  • lti_version

    LTI launch version, must be &#39;LTI-1p0&#39;

  • resource_link_id

    LTI resource_link_id parameters

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

    the optional parameters

Options Hash (opts):

  • :oauth_consumer_key (String)

    OAuth 1.0 consumer_key parameters

  • :oauth_consumer_key2 (String)

    OAuth 1.0 consumer_key parameters

  • :oauth_signature_method (String)

    OAuth 1.0 signature method, must be &#39;HMAC-SHA1&#39;

  • :oauth_signature_method2 (String)

    OAuth 1.0 signature method, must be &#39;HMAC-SHA1&#39;

  • :oauth_timestamp (Integer)

    OAuth 1.0 timestamp of request

  • :oauth_timestamp2 (Integer)

    OAuth 1.0 timestamp of request

  • :oauth_version (Float)

    OAuth 1.0 version, must be &#39;1.0&#39;

  • :oauth_version2 (Float)

    OAuth 1.0 version, must be &#39;1.0&#39;

  • :oauth_nonce (String)

    OAuth 1.0 Nonce

  • :oauth_nonce2 (String)

    OAuth 1.0 Nonce

  • :oauth_signature (String)

    OAuth 1.0 request signature

  • :oauth_signature2 (String)

    OAuth 1.0 request signature

Returns:

  • (nil)


290
291
292
293
# File 'lib/blueprint_ruby_client/api/integrations_api.rb', line 290

def namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post(namespace, integration_id, asset_type, asset_id, lti_message_type, lti_version, resource_link_id, opts = {})
  namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post_with_http_info(namespace, integration_id, asset_type, asset_id, lti_message_type, lti_version, resource_link_id, opts)
  return nil
end

#namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post_with_http_info(namespace, integration_id, asset_type, asset_id, lti_message_type, lti_version, resource_link_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

LTI launch url for integration

Parameters:

  • namespace

    identifier namespacing the blueprint.

  • integration_id

    id of an integration

  • asset_type

    subtype of Asset, e.g. &#39;textbooks&#39;, &#39;digitisations&#39;, etc.

  • asset_id

    id of an asset

  • lti_message_type

    LTI launch data message type, must be &#39;basic-lti-launch-request&#39;

  • lti_version

    LTI launch version, must be &#39;LTI-1p0&#39;

  • resource_link_id

    LTI resource_link_id parameters

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

    the optional parameters

Options Hash (opts):

  • :oauth_consumer_key (String)

    OAuth 1.0 consumer_key parameters

  • :oauth_consumer_key2 (String)

    OAuth 1.0 consumer_key parameters

  • :oauth_signature_method (String)

    OAuth 1.0 signature method, must be &#39;HMAC-SHA1&#39;

  • :oauth_signature_method2 (String)

    OAuth 1.0 signature method, must be &#39;HMAC-SHA1&#39;

  • :oauth_timestamp (Integer)

    OAuth 1.0 timestamp of request

  • :oauth_timestamp2 (Integer)

    OAuth 1.0 timestamp of request

  • :oauth_version (Float)

    OAuth 1.0 version, must be &#39;1.0&#39;

  • :oauth_version2 (Float)

    OAuth 1.0 version, must be &#39;1.0&#39;

  • :oauth_nonce (String)

    OAuth 1.0 Nonce

  • :oauth_nonce2 (String)

    OAuth 1.0 Nonce

  • :oauth_signature (String)

    OAuth 1.0 request signature

  • :oauth_signature2 (String)

    OAuth 1.0 request signature

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



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
347
348
349
350
351
352
353
354
355
356
357
358
359
360
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
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
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
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
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
# File 'lib/blueprint_ruby_client/api/integrations_api.rb', line 318

def namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post_with_http_info(namespace, integration_id, asset_type, asset_id, lti_message_type, lti_version, resource_link_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IntegrationsApi.namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post ..."
  end
  
  
  # verify the required parameter 'namespace' is set
  fail ArgumentError, "Missing the required parameter 'namespace' when calling IntegrationsApi.namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post" if namespace.nil?
  
  
  
  
  
  
  # verify the required parameter 'integration_id' is set
  fail ArgumentError, "Missing the required parameter 'integration_id' when calling IntegrationsApi.namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post" if integration_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'asset_type' is set
  fail ArgumentError, "Missing the required parameter 'asset_type' when calling IntegrationsApi.namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post" if asset_type.nil?
  
  
  
  
  
  
  # verify the required parameter 'asset_id' is set
  fail ArgumentError, "Missing the required parameter 'asset_id' when calling IntegrationsApi.namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post" if asset_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'lti_message_type' is set
  fail ArgumentError, "Missing the required parameter 'lti_message_type' when calling IntegrationsApi.namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post" if lti_message_type.nil?
  
  # verify enum value
  unless ['basic-lti-launch-request'].include?(lti_message_type)
    fail ArgumentError, "invalid value for 'lti_message_type', must be one of basic-lti-launch-request"
  end
  
  
  
  
  
  
  # verify the required parameter 'lti_version' is set
  fail ArgumentError, "Missing the required parameter 'lti_version' when calling IntegrationsApi.namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post" if lti_version.nil?
  
  # verify enum value
  unless ['LTI-1p0'].include?(lti_version)
    fail ArgumentError, "invalid value for 'lti_version', must be one of LTI-1p0"
  end
  
  
  
  
  
  
  # verify the required parameter 'resource_link_id' is set
  fail ArgumentError, "Missing the required parameter 'resource_link_id' when calling IntegrationsApi.namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post" if resource_link_id.nil?
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  if opts[:'oauth_signature_method'] && !['HMAC-SHA1'].include?(opts[:'oauth_signature_method'])
    fail ArgumentError, 'invalid value for "oauth_signature_method", must be one of HMAC-SHA1'
  end
  
  
  
  
  
  
  
  if opts[:'oauth_signature_method2'] && !['HMAC-SHA1'].include?(opts[:'oauth_signature_method2'])
    fail ArgumentError, 'invalid value for "oauth_signature_method2", must be one of HMAC-SHA1'
  end
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/{namespace}/integrations/lti1/{integrationId}/assets/{assetType}/{assetId}".sub('{format}','json').sub('{' + 'namespace' + '}', namespace.to_s).sub('{' + 'integrationId' + '}', integration_id.to_s).sub('{' + 'assetType' + '}', asset_type.to_s).sub('{' + 'assetId' + '}', asset_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['text/html']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/x-www-form-urlencoded']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
  header_params[:'oauth_consumer_key'] = opts[:'oauth_consumer_key2'] if opts[:'oauth_consumer_key2']
  header_params[:'oauth_signature_method'] = opts[:'oauth_signature_method2'] if opts[:'oauth_signature_method2']
  header_params[:'oauth_timestamp'] = opts[:'oauth_timestamp2'] if opts[:'oauth_timestamp2']
  header_params[:'oauth_version'] = opts[:'oauth_version2'] if opts[:'oauth_version2']
  header_params[:'oauth_nonce'] = opts[:'oauth_nonce2'] if opts[:'oauth_nonce2']
  header_params[:'oauth_signature'] = opts[:'oauth_signature2'] if opts[:'oauth_signature2']

  # form parameters
  form_params = {}
  form_params["lti_message_type"] = lti_message_type
  form_params["lti_version"] = lti_version
  form_params["resource_link_id"] = resource_link_id
  form_params["oauth_consumer_key"] = opts[:'oauth_consumer_key'] if opts[:'oauth_consumer_key']
  form_params["oauth_signature_method"] = opts[:'oauth_signature_method'] if opts[:'oauth_signature_method']
  form_params["oauth_timestamp"] = opts[:'oauth_timestamp'] if opts[:'oauth_timestamp']
  form_params["oauth_version"] = opts[:'oauth_version'] if opts[:'oauth_version']
  form_params["oauth_nonce"] = opts[:'oauth_nonce'] if opts[:'oauth_nonce']
  form_params["oauth_signature"] = opts[:'oauth_signature'] if opts[:'oauth_signature']

  # http body (model)
  post_body = nil
  
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IntegrationsApi#namespace_integrations_lti1_integration_id_assets_asset_type_asset_id_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#replace_integration(namespace, integration_id, integration_type, body, opts = {}) ⇒ IntegrationBody

Replace an integration

Parameters:

  • namespace

    identifier namespacing the blueprint.

  • integration_id

    id of an integration

  • integration_type

    Type of external integration, e.g. &#39;lti1&#39;

  • body

    integration

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

    the optional parameters

Returns:



528
529
530
531
# File 'lib/blueprint_ruby_client/api/integrations_api.rb', line 528

def replace_integration(namespace, integration_id, integration_type, body, opts = {})
  data, _status_code, _headers = replace_integration_with_http_info(namespace, integration_id, integration_type, body, opts)
  return data
end

#replace_integration_with_http_info(namespace, integration_id, integration_type, body, opts = {}) ⇒ Array<(IntegrationBody, Fixnum, Hash)>

Replace an integration

Parameters:

  • namespace

    identifier namespacing the blueprint.

  • integration_id

    id of an integration

  • integration_type

    Type of external integration, e.g. &#39;lti1&#39;

  • body

    integration

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

    the optional parameters

Returns:

  • (Array<(IntegrationBody, Fixnum, Hash)>)

    IntegrationBody data, response status code and response headers



541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
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
# File 'lib/blueprint_ruby_client/api/integrations_api.rb', line 541

def replace_integration_with_http_info(namespace, integration_id, integration_type, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: IntegrationsApi.replace_integration ..."
  end
  
  
  # verify the required parameter 'namespace' is set
  fail ArgumentError, "Missing the required parameter 'namespace' when calling IntegrationsApi.replace_integration" if namespace.nil?
  
  
  
  
  
  
  # verify the required parameter 'integration_id' is set
  fail ArgumentError, "Missing the required parameter 'integration_id' when calling IntegrationsApi.replace_integration" if integration_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'integration_type' is set
  fail ArgumentError, "Missing the required parameter 'integration_type' when calling IntegrationsApi.replace_integration" if integration_type.nil?
  
  
  
  
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling IntegrationsApi.replace_integration" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/{namespace}/integrations/{integrationType}/{integrationId}".sub('{format}','json').sub('{' + 'namespace' + '}', namespace.to_s).sub('{' + 'integrationId' + '}', integration_id.to_s).sub('{' + 'integrationType' + '}', integration_type.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/vnd.api+json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['oauth2']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'IntegrationBody')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: IntegrationsApi#replace_integration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end