Class: Mudbase::IntegrationsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/mudbase/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/mudbase/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/mudbase/api/integrations_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#create_from_template(project_id, create_from_template_request, opts = {}) ⇒ CreateIntegration201Response

Create integration from template Create a new integration using a pre-configured template. Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.

Parameters:

  • project_id (String)
  • create_from_template_request (CreateFromTemplateRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



28
29
30
31
# File 'lib/mudbase/api/integrations_api.rb', line 28

def create_from_template(project_id, create_from_template_request, opts = {})
  data, _status_code, _headers = create_from_template_with_http_info(project_id, create_from_template_request, opts)
  data
end

#create_from_template_with_http_info(project_id, create_from_template_request, opts = {}) ⇒ Array<(CreateIntegration201Response, Integer, Hash)>

Create integration from template Create a new integration using a pre-configured template. Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.

Parameters:

  • project_id (String)
  • create_from_template_request (CreateFromTemplateRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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

def create_from_template_with_http_info(project_id, create_from_template_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationsApi.create_from_template ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling IntegrationsApi.create_from_template"
  end
  # verify the required parameter 'create_from_template_request' is set
  if @api_client.config.client_side_validation && create_from_template_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_from_template_request' when calling IntegrationsApi.create_from_template"
  end
  # resource path
  local_var_path = '/api/integrations/projects/{projectId}/integrations/from-template'.sub('{' + 'projectId' + '}', CGI.escape(project_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(create_from_template_request)

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth']

  new_options = opts.merge(
    :operation => :"IntegrationsApi.create_from_template",
    :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: IntegrationsApi#create_from_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_integration(project_id, create_integration_request, opts = {}) ⇒ CreateIntegration201Response

Create new integration Create a new third-party service integration for a project. Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.

Parameters:

  • project_id (String)
  • create_integration_request (CreateIntegrationRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



102
103
104
105
# File 'lib/mudbase/api/integrations_api.rb', line 102

def create_integration(project_id, create_integration_request, opts = {})
  data, _status_code, _headers = create_integration_with_http_info(project_id, create_integration_request, opts)
  data
end

#create_integration_with_http_info(project_id, create_integration_request, opts = {}) ⇒ Array<(CreateIntegration201Response, Integer, Hash)>

Create new integration Create a new third-party service integration for a project. Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.

Parameters:

  • project_id (String)
  • create_integration_request (CreateIntegrationRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# File 'lib/mudbase/api/integrations_api.rb', line 113

def create_integration_with_http_info(project_id, create_integration_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationsApi.create_integration ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling IntegrationsApi.create_integration"
  end
  # verify the required parameter 'create_integration_request' is set
  if @api_client.config.client_side_validation && create_integration_request.nil?
    fail ArgumentError, "Missing the required parameter 'create_integration_request' when calling IntegrationsApi.create_integration"
  end
  # resource path
  local_var_path = '/api/integrations/projects/{projectId}/integrations'.sub('{' + 'projectId' + '}', CGI.escape(project_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(create_integration_request)

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth']

  new_options = opts.merge(
    :operation => :"IntegrationsApi.create_integration",
    :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: IntegrationsApi#create_integration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_integration(project_id, integration_id, opts = {}) ⇒ MessageResponse

Delete integration Delete an integration from a project. Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.

Parameters:

  • project_id (String)
  • integration_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



176
177
178
179
# File 'lib/mudbase/api/integrations_api.rb', line 176

def delete_integration(project_id, integration_id, opts = {})
  data, _status_code, _headers = delete_integration_with_http_info(project_id, integration_id, opts)
  data
end

#delete_integration_with_http_info(project_id, integration_id, opts = {}) ⇒ Array<(MessageResponse, Integer, Hash)>

Delete integration Delete an integration from a project. Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.

Parameters:

  • project_id (String)
  • integration_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    MessageResponse data, response status code and response headers



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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
# File 'lib/mudbase/api/integrations_api.rb', line 187

def delete_integration_with_http_info(project_id, integration_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationsApi.delete_integration ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling IntegrationsApi.delete_integration"
  end
  # verify the required parameter 'integration_id' is set
  if @api_client.config.client_side_validation && integration_id.nil?
    fail ArgumentError, "Missing the required parameter 'integration_id' when calling IntegrationsApi.delete_integration"
  end
  # resource path
  local_var_path = '/api/integrations/projects/{projectId}/integrations/{integrationId}'.sub('{' + 'projectId' + '}', CGI.escape(project_id.to_s)).sub('{' + 'integrationId' + '}', CGI.escape(integration_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] || 'MessageResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth']

  new_options = opts.merge(
    :operation => :"IntegrationsApi.delete_integration",
    :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: IntegrationsApi#delete_integration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#execute_integration(project_id, integration_id, execute_integration_request, opts = {}) ⇒ TestWalletWebhook200Response

Execute integration Execute an integration action (API call) with specified endpoint and parameters. Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.

Parameters:

  • project_id (String)
  • integration_id (String)
  • execute_integration_request (ExecuteIntegrationRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



246
247
248
249
# File 'lib/mudbase/api/integrations_api.rb', line 246

def execute_integration(project_id, integration_id, execute_integration_request, opts = {})
  data, _status_code, _headers = execute_integration_with_http_info(project_id, integration_id, execute_integration_request, opts)
  data
end

#execute_integration_with_http_info(project_id, integration_id, execute_integration_request, opts = {}) ⇒ Array<(TestWalletWebhook200Response, Integer, Hash)>

Execute integration Execute an integration action (API call) with specified endpoint and parameters. Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.

Parameters:

  • project_id (String)
  • integration_id (String)
  • execute_integration_request (ExecuteIntegrationRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'lib/mudbase/api/integrations_api.rb', line 258

def execute_integration_with_http_info(project_id, integration_id, execute_integration_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationsApi.execute_integration ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling IntegrationsApi.execute_integration"
  end
  # verify the required parameter 'integration_id' is set
  if @api_client.config.client_side_validation && integration_id.nil?
    fail ArgumentError, "Missing the required parameter 'integration_id' when calling IntegrationsApi.execute_integration"
  end
  # verify the required parameter 'execute_integration_request' is set
  if @api_client.config.client_side_validation && execute_integration_request.nil?
    fail ArgumentError, "Missing the required parameter 'execute_integration_request' when calling IntegrationsApi.execute_integration"
  end
  # resource path
  local_var_path = '/api/integrations/projects/{projectId}/integrations/{integrationId}/execute'.sub('{' + 'projectId' + '}', CGI.escape(project_id.to_s)).sub('{' + 'integrationId' + '}', CGI.escape(integration_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(execute_integration_request)

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth']

  new_options = opts.merge(
    :operation => :"IntegrationsApi.execute_integration",
    :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: IntegrationsApi#execute_integration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#export_integration(project_id, integration_id, opts = {}) ⇒ CreateIntegration201Response

Export integration Export integration configuration for backup or migration. Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.

Parameters:

  • project_id (String)
  • integration_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



325
326
327
328
# File 'lib/mudbase/api/integrations_api.rb', line 325

def export_integration(project_id, integration_id, opts = {})
  data, _status_code, _headers = export_integration_with_http_info(project_id, integration_id, opts)
  data
end

#export_integration_with_http_info(project_id, integration_id, opts = {}) ⇒ Array<(CreateIntegration201Response, Integer, Hash)>

Export integration Export integration configuration for backup or migration. Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.

Parameters:

  • project_id (String)
  • integration_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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
# File 'lib/mudbase/api/integrations_api.rb', line 336

def export_integration_with_http_info(project_id, integration_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationsApi.export_integration ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling IntegrationsApi.export_integration"
  end
  # verify the required parameter 'integration_id' is set
  if @api_client.config.client_side_validation && integration_id.nil?
    fail ArgumentError, "Missing the required parameter 'integration_id' when calling IntegrationsApi.export_integration"
  end
  # resource path
  local_var_path = '/api/integrations/projects/{projectId}/integrations/{integrationId}/export'.sub('{' + 'projectId' + '}', CGI.escape(project_id.to_s)).sub('{' + 'integrationId' + '}', CGI.escape(integration_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] || 'CreateIntegration201Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth']

  new_options = opts.merge(
    :operation => :"IntegrationsApi.export_integration",
    :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: IntegrationsApi#export_integration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_integration(project_id, integration_id, opts = {}) ⇒ GetIntegration200Response

Get integration details Get details of a specific integration. Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.

Parameters:

  • project_id (String)
  • integration_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



394
395
396
397
# File 'lib/mudbase/api/integrations_api.rb', line 394

def get_integration(project_id, integration_id, opts = {})
  data, _status_code, _headers = get_integration_with_http_info(project_id, integration_id, opts)
  data
end

#get_integration_with_http_info(project_id, integration_id, opts = {}) ⇒ Array<(GetIntegration200Response, Integer, Hash)>

Get integration details Get details of a specific integration. Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.

Parameters:

  • project_id (String)
  • integration_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    GetIntegration200Response data, response status code and response headers



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
# File 'lib/mudbase/api/integrations_api.rb', line 405

def get_integration_with_http_info(project_id, integration_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationsApi.get_integration ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling IntegrationsApi.get_integration"
  end
  # verify the required parameter 'integration_id' is set
  if @api_client.config.client_side_validation && integration_id.nil?
    fail ArgumentError, "Missing the required parameter 'integration_id' when calling IntegrationsApi.get_integration"
  end
  # resource path
  local_var_path = '/api/integrations/projects/{projectId}/integrations/{integrationId}'.sub('{' + 'projectId' + '}', CGI.escape(project_id.to_s)).sub('{' + 'integrationId' + '}', CGI.escape(integration_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] || 'GetIntegration200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth']

  new_options = opts.merge(
    :operation => :"IntegrationsApi.get_integration",
    :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: IntegrationsApi#get_integration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_integrations(project_id, opts = {}) ⇒ GetIntegrations200Response

Get project integrations List all integrations configured for a project. Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.

Parameters:

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

    the optional parameters

Returns:



462
463
464
465
# File 'lib/mudbase/api/integrations_api.rb', line 462

def get_integrations(project_id, opts = {})
  data, _status_code, _headers = get_integrations_with_http_info(project_id, opts)
  data
end

#get_integrations_with_http_info(project_id, opts = {}) ⇒ Array<(GetIntegrations200Response, Integer, Hash)>

Get project integrations List all integrations configured for a project. Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.

Parameters:

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

    the optional parameters

Returns:

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

    GetIntegrations200Response data, response status code and response headers



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/mudbase/api/integrations_api.rb', line 472

def get_integrations_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationsApi.get_integrations ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling IntegrationsApi.get_integrations"
  end
  # resource path
  local_var_path = '/api/integrations/projects/{projectId}/integrations'.sub('{' + 'projectId' + '}', CGI.escape(project_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] || 'GetIntegrations200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth']

  new_options = opts.merge(
    :operation => :"IntegrationsApi.get_integrations",
    :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: IntegrationsApi#get_integrations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_templates(opts = {}) ⇒ GetTemplates200Response

Get integration templates Get available integration templates for third-party service connections. Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.

Parameters:

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

    the optional parameters

Returns:



524
525
526
527
# File 'lib/mudbase/api/integrations_api.rb', line 524

def get_templates(opts = {})
  data, _status_code, _headers = get_templates_with_http_info(opts)
  data
end

#get_templates_with_http_info(opts = {}) ⇒ Array<(GetTemplates200Response, Integer, Hash)>

Get integration templates Get available integration templates for third-party service connections. Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.

Parameters:

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

    the optional parameters

Returns:

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

    GetTemplates200Response data, response status code and response headers



533
534
535
536
537
538
539
540
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
# File 'lib/mudbase/api/integrations_api.rb', line 533

def get_templates_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationsApi.get_templates ...'
  end
  # resource path
  local_var_path = '/api/integrations/templates'

  # 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] || 'GetTemplates200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth']

  new_options = opts.merge(
    :operation => :"IntegrationsApi.get_templates",
    :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: IntegrationsApi#get_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_usage_stats(project_id, integration_id, opts = {}) ⇒ GetUsageStats200Response

Get integration usage statistics Get usage statistics for an integration (total calls, success/failure rates). Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.

Parameters:

  • project_id (String)
  • integration_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :period (String) — default: default to 'month'

Returns:



584
585
586
587
# File 'lib/mudbase/api/integrations_api.rb', line 584

def get_usage_stats(project_id, integration_id, opts = {})
  data, _status_code, _headers = get_usage_stats_with_http_info(project_id, integration_id, opts)
  data
end

#get_usage_stats_with_http_info(project_id, integration_id, opts = {}) ⇒ Array<(GetUsageStats200Response, Integer, Hash)>

Get integration usage statistics Get usage statistics for an integration (total calls, success/failure rates). Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.

Parameters:

  • project_id (String)
  • integration_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :period (String) — default: default to 'month'

Returns:

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

    GetUsageStats200Response data, response status code and response headers



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
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
# File 'lib/mudbase/api/integrations_api.rb', line 596

def get_usage_stats_with_http_info(project_id, integration_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationsApi.get_usage_stats ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling IntegrationsApi.get_usage_stats"
  end
  # verify the required parameter 'integration_id' is set
  if @api_client.config.client_side_validation && integration_id.nil?
    fail ArgumentError, "Missing the required parameter 'integration_id' when calling IntegrationsApi.get_usage_stats"
  end
  allowable_values = ["day", "week", "month"]
  if @api_client.config.client_side_validation && opts[:'period'] && !allowable_values.include?(opts[:'period'])
    fail ArgumentError, "invalid value for \"period\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/api/integrations/projects/{projectId}/integrations/{integrationId}/usage'.sub('{' + 'projectId' + '}', CGI.escape(project_id.to_s)).sub('{' + 'integrationId' + '}', CGI.escape(integration_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'period'] = opts[:'period'] if !opts[:'period'].nil?

  # 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] || 'GetUsageStats200Response'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth']

  new_options = opts.merge(
    :operation => :"IntegrationsApi.get_usage_stats",
    :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: IntegrationsApi#get_usage_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#import_integration(project_id, import_integration_request, opts = {}) ⇒ CreateIntegration201Response

Import integration Import an integration configuration from exported data. Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.

Parameters:

  • project_id (String)
  • import_integration_request (ImportIntegrationRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



659
660
661
662
# File 'lib/mudbase/api/integrations_api.rb', line 659

def import_integration(project_id, import_integration_request, opts = {})
  data, _status_code, _headers = import_integration_with_http_info(project_id, import_integration_request, opts)
  data
end

#import_integration_with_http_info(project_id, import_integration_request, opts = {}) ⇒ Array<(CreateIntegration201Response, Integer, Hash)>

Import integration Import an integration configuration from exported data. Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.

Parameters:

  • project_id (String)
  • import_integration_request (ImportIntegrationRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
# File 'lib/mudbase/api/integrations_api.rb', line 670

def import_integration_with_http_info(project_id, import_integration_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationsApi.import_integration ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling IntegrationsApi.import_integration"
  end
  # verify the required parameter 'import_integration_request' is set
  if @api_client.config.client_side_validation && import_integration_request.nil?
    fail ArgumentError, "Missing the required parameter 'import_integration_request' when calling IntegrationsApi.import_integration"
  end
  # resource path
  local_var_path = '/api/integrations/projects/{projectId}/integrations/import'.sub('{' + 'projectId' + '}', CGI.escape(project_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(import_integration_request)

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth']

  new_options = opts.merge(
    :operation => :"IntegrationsApi.import_integration",
    :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: IntegrationsApi#import_integration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#test_integration(project_id, integration_id, test_integration_request, opts = {}) ⇒ TestWalletWebhook200Response

Test integration Test an integration connection and configuration. Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.

Parameters:

  • project_id (String)
  • integration_id (String)
  • test_integration_request (TestIntegrationRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



734
735
736
737
# File 'lib/mudbase/api/integrations_api.rb', line 734

def test_integration(project_id, integration_id, test_integration_request, opts = {})
  data, _status_code, _headers = test_integration_with_http_info(project_id, integration_id, test_integration_request, opts)
  data
end

#test_integration_with_http_info(project_id, integration_id, test_integration_request, opts = {}) ⇒ Array<(TestWalletWebhook200Response, Integer, Hash)>

Test integration Test an integration connection and configuration. Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.

Parameters:

  • project_id (String)
  • integration_id (String)
  • test_integration_request (TestIntegrationRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
# File 'lib/mudbase/api/integrations_api.rb', line 746

def test_integration_with_http_info(project_id, integration_id, test_integration_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationsApi.test_integration ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling IntegrationsApi.test_integration"
  end
  # verify the required parameter 'integration_id' is set
  if @api_client.config.client_side_validation && integration_id.nil?
    fail ArgumentError, "Missing the required parameter 'integration_id' when calling IntegrationsApi.test_integration"
  end
  # verify the required parameter 'test_integration_request' is set
  if @api_client.config.client_side_validation && test_integration_request.nil?
    fail ArgumentError, "Missing the required parameter 'test_integration_request' when calling IntegrationsApi.test_integration"
  end
  # resource path
  local_var_path = '/api/integrations/projects/{projectId}/integrations/{integrationId}/test'.sub('{' + 'projectId' + '}', CGI.escape(project_id.to_s)).sub('{' + 'integrationId' + '}', CGI.escape(integration_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(test_integration_request)

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth']

  new_options = opts.merge(
    :operation => :"IntegrationsApi.test_integration",
    :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: IntegrationsApi#test_integration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_integration(project_id, integration_id, update_integration_request, opts = {}) ⇒ CreateIntegration201Response

Update integration Update integration configuration (name, config, credentials). Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.

Parameters:

  • project_id (String)
  • integration_id (String)
  • update_integration_request (UpdateIntegrationRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



814
815
816
817
# File 'lib/mudbase/api/integrations_api.rb', line 814

def update_integration(project_id, integration_id, update_integration_request, opts = {})
  data, _status_code, _headers = update_integration_with_http_info(project_id, integration_id, update_integration_request, opts)
  data
end

#update_integration_with_http_info(project_id, integration_id, update_integration_request, opts = {}) ⇒ Array<(CreateIntegration201Response, Integer, Hash)>

Update integration Update integration configuration (name, config, credentials). Accepts: OrgBearerAuth (for admin users), ProjectBearerAuth (JWT for authenticated users), or ApiKeyAuth (X-API-Key for programmatic access). Both ProjectBearerAuth and ApiKeyAuth are fully implemented.

Parameters:

  • project_id (String)
  • integration_id (String)
  • update_integration_request (UpdateIntegrationRequest)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
# File 'lib/mudbase/api/integrations_api.rb', line 826

def update_integration_with_http_info(project_id, integration_id, update_integration_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: IntegrationsApi.update_integration ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling IntegrationsApi.update_integration"
  end
  # verify the required parameter 'integration_id' is set
  if @api_client.config.client_side_validation && integration_id.nil?
    fail ArgumentError, "Missing the required parameter 'integration_id' when calling IntegrationsApi.update_integration"
  end
  # verify the required parameter 'update_integration_request' is set
  if @api_client.config.client_side_validation && update_integration_request.nil?
    fail ArgumentError, "Missing the required parameter 'update_integration_request' when calling IntegrationsApi.update_integration"
  end
  # resource path
  local_var_path = '/api/integrations/projects/{projectId}/integrations/{integrationId}'.sub('{' + 'projectId' + '}', CGI.escape(project_id.to_s)).sub('{' + 'integrationId' + '}', CGI.escape(integration_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(update_integration_request)

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

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OrgBearerAuth', 'ProjectBearerAuth']

  new_options = opts.merge(
    :operation => :"IntegrationsApi.update_integration",
    :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: IntegrationsApi#update_integration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end