Class: Svix::TransformationTemplateApi

Inherits:
Object
  • Object
show all
Defined in:
lib/svix/api/transformation_template_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ TransformationTemplateApi

Returns a new instance of TransformationTemplateApi.



19
20
21
# File 'lib/svix/api/transformation_template_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/svix/api/transformation_template_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#v1_endpoint_update_hubspot_oauth_config(app_id, endpoint_id, hubspot_oauth_config_in, opts = {}) ⇒ nil

Update Hubspot Oauth Config Create/update endpoint Hubsport OAuth configuration Specific private endpoint just for us, to avoid exposing the Hubspot secret to the client.

Parameters:

  • app_id (String)

    The app's ID or UID

  • endpoint_id (String)

    The ep's ID or UID

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

    the optional parameters

Returns:

  • (nil)


29
30
31
32
# File 'lib/svix/api/transformation_template_api.rb', line 29

def v1_endpoint_update_hubspot_oauth_config(app_id, endpoint_id, hubspot_oauth_config_in, opts = {})
  v1_endpoint_update_hubspot_oauth_config_with_http_info(app_id, endpoint_id, hubspot_oauth_config_in, opts)
  nil
end

#v1_endpoint_update_hubspot_oauth_config_with_http_info(app_id, endpoint_id, hubspot_oauth_config_in, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Update Hubspot Oauth Config Create/update endpoint Hubsport OAuth configuration Specific private endpoint just for us, to avoid exposing the Hubspot secret to the client.

Parameters:

  • app_id (String)

    The app&#39;s ID or UID

  • endpoint_id (String)

    The ep&#39;s ID or UID

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# File 'lib/svix/api/transformation_template_api.rb', line 41

def v1_endpoint_update_hubspot_oauth_config_with_http_info(app_id, endpoint_id, hubspot_oauth_config_in, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TransformationTemplateApi.v1_endpoint_update_hubspot_oauth_config ...'
  end
  # verify the required parameter 'app_id' is set
  if @api_client.config.client_side_validation && app_id.nil?
    fail ArgumentError, "Missing the required parameter 'app_id' when calling TransformationTemplateApi.v1_endpoint_update_hubspot_oauth_config"
  end
  if @api_client.config.client_side_validation && app_id.to_s.length > 256
    fail ArgumentError, 'invalid value for "app_id" when calling TransformationTemplateApi.v1_endpoint_update_hubspot_oauth_config, the character length must be smaller than or equal to 256.'
  end

  if @api_client.config.client_side_validation && app_id.to_s.length < 1
    fail ArgumentError, 'invalid value for "app_id" when calling TransformationTemplateApi.v1_endpoint_update_hubspot_oauth_config, the character length must be great than or equal to 1.'
  end

  pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
  if @api_client.config.client_side_validation && app_id !~ pattern
    fail ArgumentError, "invalid value for 'app_id' when calling TransformationTemplateApi.v1_endpoint_update_hubspot_oauth_config, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'endpoint_id' is set
  if @api_client.config.client_side_validation && endpoint_id.nil?
    fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling TransformationTemplateApi.v1_endpoint_update_hubspot_oauth_config"
  end
  if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
    fail ArgumentError, 'invalid value for "endpoint_id" when calling TransformationTemplateApi.v1_endpoint_update_hubspot_oauth_config, the character length must be smaller than or equal to 256.'
  end

  if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
    fail ArgumentError, 'invalid value for "endpoint_id" when calling TransformationTemplateApi.v1_endpoint_update_hubspot_oauth_config, the character length must be great than or equal to 1.'
  end

  pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
  if @api_client.config.client_side_validation && endpoint_id !~ pattern
    fail ArgumentError, "invalid value for 'endpoint_id' when calling TransformationTemplateApi.v1_endpoint_update_hubspot_oauth_config, must conform to the pattern #{pattern}."
  end

  # verify the required parameter 'hubspot_oauth_config_in' is set
  if @api_client.config.client_side_validation && hubspot_oauth_config_in.nil?
    fail ArgumentError, "Missing the required parameter 'hubspot_oauth_config_in' when calling TransformationTemplateApi.v1_endpoint_update_hubspot_oauth_config"
  end
  # resource path
  local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation-template/oauth/hubspot'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"TransformationTemplateApi.v1_endpoint_update_hubspot_oauth_config",
    :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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TransformationTemplateApi#v1_endpoint_update_hubspot_oauth_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#v1_transformation_template_create(template_in, opts = {}) ⇒ TemplateOut

Create Transformation Template Create a new transformation template

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :idempotency_key (String)

    The request&#39;s idempotency key

Returns:



131
132
133
134
# File 'lib/svix/api/transformation_template_api.rb', line 131

def v1_transformation_template_create(template_in, opts = {})
  data, _status_code, _headers = v1_transformation_template_create_with_http_info(template_in, opts)
  data
end

#v1_transformation_template_create_with_http_info(template_in, opts = {}) ⇒ Array<(TemplateOut, Integer, Hash)>

Create Transformation Template Create a new transformation template

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :idempotency_key (String)

    The request&#39;s idempotency key

Returns:

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

    TemplateOut data, response status code and response headers



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
181
182
183
184
185
186
187
188
189
190
191
# File 'lib/svix/api/transformation_template_api.rb', line 142

def v1_transformation_template_create_with_http_info(template_in, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TransformationTemplateApi.v1_transformation_template_create ...'
  end
  # verify the required parameter 'template_in' is set
  if @api_client.config.client_side_validation && template_in.nil?
    fail ArgumentError, "Missing the required parameter 'template_in' when calling TransformationTemplateApi.v1_transformation_template_create"
  end
  # resource path
  local_var_path = '/api/v1/transformation-template'

  # 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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?

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

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

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

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

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

#v1_transformation_template_delete(transformation_template_id, opts = {}) ⇒ nil

Delete Transformation Template Delete a transformation template

Parameters:

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

    the optional parameters

Returns:

  • (nil)


198
199
200
201
# File 'lib/svix/api/transformation_template_api.rb', line 198

def v1_transformation_template_delete(transformation_template_id, opts = {})
  v1_transformation_template_delete_with_http_info(transformation_template_id, opts)
  nil
end

#v1_transformation_template_delete_with_http_info(transformation_template_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete Transformation Template Delete a transformation template

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
# File 'lib/svix/api/transformation_template_api.rb', line 208

def v1_transformation_template_delete_with_http_info(transformation_template_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TransformationTemplateApi.v1_transformation_template_delete ...'
  end
  # verify the required parameter 'transformation_template_id' is set
  if @api_client.config.client_side_validation && transformation_template_id.nil?
    fail ArgumentError, "Missing the required parameter 'transformation_template_id' when calling TransformationTemplateApi.v1_transformation_template_delete"
  end
  # resource path
  local_var_path = '/api/v1/transformation-template/{transformation_template_id}'.sub('{' + 'transformation_template_id' + '}', CGI.escape(transformation_template_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'])

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

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

#v1_transformation_template_generate(generate_in, opts = {}) ⇒ GenerateOut

Generate Use OpenAI’s Completion API to generate code for a transformation template

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :idempotency_key (String)

    The request&#39;s idempotency key

Returns:



262
263
264
265
# File 'lib/svix/api/transformation_template_api.rb', line 262

def v1_transformation_template_generate(generate_in, opts = {})
  data, _status_code, _headers = v1_transformation_template_generate_with_http_info(generate_in, opts)
  data
end

#v1_transformation_template_generate_with_http_info(generate_in, opts = {}) ⇒ Array<(GenerateOut, Integer, Hash)>

Generate Use OpenAI&#39;s Completion API to generate code for a transformation template

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :idempotency_key (String)

    The request&#39;s idempotency key

Returns:

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

    GenerateOut data, response status code and response headers



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
318
319
320
321
322
# File 'lib/svix/api/transformation_template_api.rb', line 273

def v1_transformation_template_generate_with_http_info(generate_in, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TransformationTemplateApi.v1_transformation_template_generate ...'
  end
  # verify the required parameter 'generate_in' is set
  if @api_client.config.client_side_validation && generate_in.nil?
    fail ArgumentError, "Missing the required parameter 'generate_in' when calling TransformationTemplateApi.v1_transformation_template_generate"
  end
  # resource path
  local_var_path = '/api/v1/transformation-template/generate'

  # 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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?

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

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

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

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

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

#v1_transformation_template_get(transformation_template_id, opts = {}) ⇒ TemplateOut

Get Transformation Template Get a transformation template

Parameters:

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

    the optional parameters

Returns:



329
330
331
332
# File 'lib/svix/api/transformation_template_api.rb', line 329

def v1_transformation_template_get(transformation_template_id, opts = {})
  data, _status_code, _headers = v1_transformation_template_get_with_http_info(transformation_template_id, opts)
  data
end

#v1_transformation_template_get_with_http_info(transformation_template_id, opts = {}) ⇒ Array<(TemplateOut, Integer, Hash)>

Get Transformation Template Get a transformation template

Parameters:

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

    the optional parameters

Returns:

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

    TemplateOut data, response status code and response headers



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
# File 'lib/svix/api/transformation_template_api.rb', line 339

def v1_transformation_template_get_with_http_info(transformation_template_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TransformationTemplateApi.v1_transformation_template_get ...'
  end
  # verify the required parameter 'transformation_template_id' is set
  if @api_client.config.client_side_validation && transformation_template_id.nil?
    fail ArgumentError, "Missing the required parameter 'transformation_template_id' when calling TransformationTemplateApi.v1_transformation_template_get"
  end
  # resource path
  local_var_path = '/api/v1/transformation-template/{transformation_template_id}'.sub('{' + 'transformation_template_id' + '}', CGI.escape(transformation_template_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'])

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

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

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

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

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

#v1_transformation_template_list(opts = {}) ⇒ ListResponseTemplateOut

List Transformation Templates List all transformation templates for an application

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    Limit the number of returned items

  • :iterator (String)

    The iterator returned from a prior invocation

  • :order (Ordering)

    The sorting order of the returned items

Returns:



394
395
396
397
# File 'lib/svix/api/transformation_template_api.rb', line 394

def v1_transformation_template_list(opts = {})
  data, _status_code, _headers = v1_transformation_template_list_with_http_info(opts)
  data
end

#v1_transformation_template_list_with_http_info(opts = {}) ⇒ Array<(ListResponseTemplateOut, Integer, Hash)>

List Transformation Templates List all transformation templates for an application

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    Limit the number of returned items

  • :iterator (String)

    The iterator returned from a prior invocation

  • :order (Ordering)

    The sorting order of the returned items

Returns:

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

    ListResponseTemplateOut data, response status code and response headers



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
# File 'lib/svix/api/transformation_template_api.rb', line 406

def v1_transformation_template_list_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TransformationTemplateApi.v1_transformation_template_list ...'
  end
  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransformationTemplateApi.v1_transformation_template_list, must be smaller than or equal to 250.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling TransformationTemplateApi.v1_transformation_template_list, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/api/v1/transformation-template'

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

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

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

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

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

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

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

#v1_transformation_template_oauth_discord(o_auth_payload_in, opts = {}) ⇒ IncomingWebhookPayloadOut

Authorize Discord Get Discord Incoming webhook URL

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :idempotency_key (String)

    The request&#39;s idempotency key

Returns:



467
468
469
470
# File 'lib/svix/api/transformation_template_api.rb', line 467

def v1_transformation_template_oauth_discord(o_auth_payload_in, opts = {})
  data, _status_code, _headers = v1_transformation_template_oauth_discord_with_http_info(o_auth_payload_in, opts)
  data
end

#v1_transformation_template_oauth_discord_with_http_info(o_auth_payload_in, opts = {}) ⇒ Array<(IncomingWebhookPayloadOut, Integer, Hash)>

Authorize Discord Get Discord Incoming webhook URL

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :idempotency_key (String)

    The request&#39;s idempotency key

Returns:

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

    IncomingWebhookPayloadOut data, response status code and response headers



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
519
520
521
522
523
524
525
526
527
# File 'lib/svix/api/transformation_template_api.rb', line 478

def v1_transformation_template_oauth_discord_with_http_info(o_auth_payload_in, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TransformationTemplateApi.v1_transformation_template_oauth_discord ...'
  end
  # verify the required parameter 'o_auth_payload_in' is set
  if @api_client.config.client_side_validation && o_auth_payload_in.nil?
    fail ArgumentError, "Missing the required parameter 'o_auth_payload_in' when calling TransformationTemplateApi.v1_transformation_template_oauth_discord"
  end
  # resource path
  local_var_path = '/api/v1/transformation-template/oauth/discord'

  # 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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?

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

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

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

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

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

#v1_transformation_template_oauth_hubspot(o_auth_payload_in, opts = {}) ⇒ OAuthPayloadOut

Authorize Hubspot Get Hubspot access token using authorization code

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :idempotency_key (String)

    The request&#39;s idempotency key

Returns:



535
536
537
538
# File 'lib/svix/api/transformation_template_api.rb', line 535

def v1_transformation_template_oauth_hubspot(o_auth_payload_in, opts = {})
  data, _status_code, _headers = v1_transformation_template_oauth_hubspot_with_http_info(o_auth_payload_in, opts)
  data
end

#v1_transformation_template_oauth_hubspot_with_http_info(o_auth_payload_in, opts = {}) ⇒ Array<(OAuthPayloadOut, Integer, Hash)>

Authorize Hubspot Get Hubspot access token using authorization code

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :idempotency_key (String)

    The request&#39;s idempotency key

Returns:

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

    OAuthPayloadOut data, response status code and response headers



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
# File 'lib/svix/api/transformation_template_api.rb', line 546

def v1_transformation_template_oauth_hubspot_with_http_info(o_auth_payload_in, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TransformationTemplateApi.v1_transformation_template_oauth_hubspot ...'
  end
  # verify the required parameter 'o_auth_payload_in' is set
  if @api_client.config.client_side_validation && o_auth_payload_in.nil?
    fail ArgumentError, "Missing the required parameter 'o_auth_payload_in' when calling TransformationTemplateApi.v1_transformation_template_oauth_hubspot"
  end
  # resource path
  local_var_path = '/api/v1/transformation-template/oauth/hubspot'

  # 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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?

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

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

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

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

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

#v1_transformation_template_oauth_slack(o_auth_payload_in, opts = {}) ⇒ IncomingWebhookPayloadOut

Authorize Slack Get Slack Incoming webhook URL

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :idempotency_key (String)

    The request&#39;s idempotency key

Returns:



603
604
605
606
# File 'lib/svix/api/transformation_template_api.rb', line 603

def v1_transformation_template_oauth_slack(o_auth_payload_in, opts = {})
  data, _status_code, _headers = v1_transformation_template_oauth_slack_with_http_info(o_auth_payload_in, opts)
  data
end

#v1_transformation_template_oauth_slack_with_http_info(o_auth_payload_in, opts = {}) ⇒ Array<(IncomingWebhookPayloadOut, Integer, Hash)>

Authorize Slack Get Slack Incoming webhook URL

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :idempotency_key (String)

    The request&#39;s idempotency key

Returns:

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

    IncomingWebhookPayloadOut data, response status code and response headers



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
652
653
654
655
656
657
658
659
660
661
662
663
# File 'lib/svix/api/transformation_template_api.rb', line 614

def v1_transformation_template_oauth_slack_with_http_info(o_auth_payload_in, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TransformationTemplateApi.v1_transformation_template_oauth_slack ...'
  end
  # verify the required parameter 'o_auth_payload_in' is set
  if @api_client.config.client_side_validation && o_auth_payload_in.nil?
    fail ArgumentError, "Missing the required parameter 'o_auth_payload_in' when calling TransformationTemplateApi.v1_transformation_template_oauth_slack"
  end
  # resource path
  local_var_path = '/api/v1/transformation-template/oauth/slack'

  # 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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?

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

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

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

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

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

#v1_transformation_template_patch(transformation_template_id, template_patch, opts = {}) ⇒ TemplateOut

Patch Transformation Template Partially update a transformation template

Parameters:

  • transformation_template_id (String)
  • template_patch (TemplatePatch)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



671
672
673
674
# File 'lib/svix/api/transformation_template_api.rb', line 671

def v1_transformation_template_patch(transformation_template_id, template_patch, opts = {})
  data, _status_code, _headers = v1_transformation_template_patch_with_http_info(transformation_template_id, template_patch, opts)
  data
end

#v1_transformation_template_patch_with_http_info(transformation_template_id, template_patch, opts = {}) ⇒ Array<(TemplateOut, Integer, Hash)>

Patch Transformation Template Partially update a transformation template

Parameters:

  • transformation_template_id (String)
  • template_patch (TemplatePatch)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    TemplateOut data, response status code and response headers



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
726
727
728
729
730
731
732
733
734
# File 'lib/svix/api/transformation_template_api.rb', line 682

def v1_transformation_template_patch_with_http_info(transformation_template_id, template_patch, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TransformationTemplateApi.v1_transformation_template_patch ...'
  end
  # verify the required parameter 'transformation_template_id' is set
  if @api_client.config.client_side_validation && transformation_template_id.nil?
    fail ArgumentError, "Missing the required parameter 'transformation_template_id' when calling TransformationTemplateApi.v1_transformation_template_patch"
  end
  # verify the required parameter 'template_patch' is set
  if @api_client.config.client_side_validation && template_patch.nil?
    fail ArgumentError, "Missing the required parameter 'template_patch' when calling TransformationTemplateApi.v1_transformation_template_patch"
  end
  # resource path
  local_var_path = '/api/v1/transformation-template/{transformation_template_id}'.sub('{' + 'transformation_template_id' + '}', CGI.escape(transformation_template_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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

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

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

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

#v1_transformation_template_simulate(transformation_simulate_in, opts = {}) ⇒ TransformationSimulateOut

Simulate Simulate running the transformation on the payload and code

Parameters:

Options Hash (opts):

  • :idempotency_key (String)

    The request&#39;s idempotency key

Returns:



742
743
744
745
# File 'lib/svix/api/transformation_template_api.rb', line 742

def v1_transformation_template_simulate(transformation_simulate_in, opts = {})
  data, _status_code, _headers = v1_transformation_template_simulate_with_http_info(transformation_simulate_in, opts)
  data
end

#v1_transformation_template_simulate_with_http_info(transformation_simulate_in, opts = {}) ⇒ Array<(TransformationSimulateOut, Integer, Hash)>

Simulate Simulate running the transformation on the payload and code

Parameters:

Options Hash (opts):

  • :idempotency_key (String)

    The request&#39;s idempotency key

Returns:

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

    TransformationSimulateOut data, response status code and response headers



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
# File 'lib/svix/api/transformation_template_api.rb', line 753

def v1_transformation_template_simulate_with_http_info(transformation_simulate_in, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TransformationTemplateApi.v1_transformation_template_simulate ...'
  end
  # verify the required parameter 'transformation_simulate_in' is set
  if @api_client.config.client_side_validation && transformation_simulate_in.nil?
    fail ArgumentError, "Missing the required parameter 'transformation_simulate_in' when calling TransformationTemplateApi.v1_transformation_template_simulate"
  end
  # resource path
  local_var_path = '/api/v1/transformation-template/simulate'

  # 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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?

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

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

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

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

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

#v1_transformation_template_update(transformation_template_id, template_update, opts = {}) ⇒ TemplateOut

Update Transformation Template Update a transformation template

Parameters:

  • transformation_template_id (String)
  • template_update (TemplateUpdate)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



810
811
812
813
# File 'lib/svix/api/transformation_template_api.rb', line 810

def v1_transformation_template_update(transformation_template_id, template_update, opts = {})
  data, _status_code, _headers = v1_transformation_template_update_with_http_info(transformation_template_id, template_update, opts)
  data
end

#v1_transformation_template_update_with_http_info(transformation_template_id, template_update, opts = {}) ⇒ Array<(TemplateOut, Integer, Hash)>

Update Transformation Template Update a transformation template

Parameters:

  • transformation_template_id (String)
  • template_update (TemplateUpdate)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    TemplateOut data, response status code and response headers



821
822
823
824
825
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
# File 'lib/svix/api/transformation_template_api.rb', line 821

def v1_transformation_template_update_with_http_info(transformation_template_id, template_update, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TransformationTemplateApi.v1_transformation_template_update ...'
  end
  # verify the required parameter 'transformation_template_id' is set
  if @api_client.config.client_side_validation && transformation_template_id.nil?
    fail ArgumentError, "Missing the required parameter 'transformation_template_id' when calling TransformationTemplateApi.v1_transformation_template_update"
  end
  # verify the required parameter 'template_update' is set
  if @api_client.config.client_side_validation && template_update.nil?
    fail ArgumentError, "Missing the required parameter 'template_update' when calling TransformationTemplateApi.v1_transformation_template_update"
  end
  # resource path
  local_var_path = '/api/v1/transformation-template/{transformation_template_id}'.sub('{' + 'transformation_template_id' + '}', CGI.escape(transformation_template_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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

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

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

  new_options = opts.merge(
    :operation => :"TransformationTemplateApi.v1_transformation_template_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(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TransformationTemplateApi#v1_transformation_template_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end