appnigma-sdk 1.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -0
- data/README.md +172 -35
- data/lib/appnigma/checks.rb +29 -5
- data/lib/appnigma/client.rb +20 -12
- data/lib/appnigma/connections.rb +41 -5
- data/lib/appnigma/constants.rb +14 -8
- data/lib/appnigma/errors.rb +31 -5
- data/lib/appnigma/generated/api/default_api.rb +321 -20
- data/lib/appnigma/generated/api_client.rb +1 -1
- data/lib/appnigma/generated/api_error.rb +1 -1
- data/lib/appnigma/generated/api_model_base.rb +1 -1
- data/lib/appnigma/generated/configuration.rb +1 -1
- data/lib/appnigma/generated/models/action_entry.rb +1 -1
- data/lib/appnigma/generated/models/connection_status.rb +3 -2
- data/lib/appnigma/generated/models/create_connection_link_input.rb +2 -13
- data/lib/appnigma/generated/models/create_connection_link_output.rb +1 -1
- data/lib/appnigma/generated/models/create_portal_link_input.rb +177 -0
- data/lib/appnigma/generated/models/create_portal_link_output.rb +205 -0
- data/lib/appnigma/generated/models/crm_company.rb +1 -1
- data/lib/appnigma/generated/models/crm_company_get_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_company_list_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_company_write_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_contact.rb +1 -1
- data/lib/appnigma/generated/models/crm_contact_get_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_contact_list_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_contact_write_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_create_input.rb +2 -13
- data/lib/appnigma/generated/models/crm_custom_field.rb +1 -1
- data/lib/appnigma/generated/models/crm_deal.rb +1 -1
- data/lib/appnigma/generated/models/crm_deal_create_input.rb +2 -13
- data/lib/appnigma/generated/models/crm_deal_get_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_deal_list_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_deal_write_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_email.rb +1 -1
- data/lib/appnigma/generated/models/crm_get_input.rb +2 -13
- data/lib/appnigma/generated/models/crm_labelled.rb +1 -1
- data/lib/appnigma/generated/models/crm_list_input.rb +2 -13
- data/lib/appnigma/generated/models/crm_phone.rb +1 -1
- data/lib/appnigma/generated/models/crm_update_input.rb +2 -13
- data/lib/appnigma/generated/models/disconnect_connection_input.rb +216 -0
- data/lib/appnigma/generated/models/disconnect_connection_output.rb +281 -0
- data/lib/appnigma/generated/models/end_customer.rb +247 -0
- data/lib/appnigma/generated/models/end_customer_connection.rb +239 -0
- data/lib/appnigma/generated/models/function_entry.rb +74 -5
- data/lib/appnigma/generated/models/function_owner.rb +1 -1
- data/lib/appnigma/generated/models/function_owner_one_of.rb +1 -1
- data/lib/appnigma/generated/models/function_owner_one_of1.rb +18 -17
- data/lib/appnigma/generated/models/get_connection_input.rb +216 -0
- data/lib/appnigma/generated/models/get_connection_output.rb +18 -5
- data/lib/appnigma/generated/models/get_guide_output.rb +1 -1
- data/lib/appnigma/generated/models/json_value.rb +1 -1
- data/lib/appnigma/generated/models/list_actions_output.rb +1 -1
- data/lib/appnigma/generated/models/list_connections_output.rb +193 -0
- data/lib/appnigma/generated/models/list_functions_output.rb +1 -1
- data/lib/appnigma/generated/models/list_platforms_output.rb +1 -1
- data/lib/appnigma/generated/models/logic_conditional.rb +247 -0
- data/lib/appnigma/generated/models/platform_entry.rb +1 -1
- data/lib/appnigma/generated/models/platform_entry_coverage_inner.rb +1 -1
- data/lib/appnigma/generated/models/platform_request_input.rb +2 -13
- data/lib/appnigma/generated/models/platform_request_input_body.rb +1 -1
- data/lib/appnigma/generated/models/platform_request_output.rb +1 -1
- data/lib/appnigma/generated/models/ran_as.rb +1 -1
- data/lib/appnigma/generated/models/run_action_input.rb +2 -13
- data/lib/appnigma/generated/models/run_action_output.rb +1 -1
- data/lib/appnigma/generated/models/run_input.rb +37 -24
- data/lib/appnigma/generated/models/run_output.rb +1 -1
- data/lib/appnigma/generated/models/sdk_error.rb +1 -1
- data/lib/appnigma/generated/models/sdk_error_error.rb +3 -3
- data/lib/appnigma/generated/models/sdk_error_error_details.rb +12 -3
- data/lib/appnigma/generated/models/sdk_problem.rb +1 -1
- data/lib/appnigma/generated/version.rb +1 -1
- data/lib/appnigma/generated.rb +10 -1
- data/lib/appnigma/portal.rb +21 -0
- data/lib/appnigma/transport.rb +4 -4
- data/lib/appnigma/version.rb +2 -2
- metadata +11 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 4.1.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.26.0
|
|
@@ -291,43 +291,247 @@ module Appnigma::Generated
|
|
|
291
291
|
return data, status_code, headers
|
|
292
292
|
end
|
|
293
293
|
|
|
294
|
+
# Make a custom logic portal link for an end customer
|
|
295
|
+
# A link that opens the custom logic portal for one end customer, where they see and edit their own logic. Show it in an iframe on one of your sites, or open it in a new tab. It works once and expires after 15 minutes.
|
|
296
|
+
# @param create_portal_link_input [CreatePortalLinkInput]
|
|
297
|
+
# @param [Hash] opts the optional parameters
|
|
298
|
+
# @return [CreatePortalLinkOutput]
|
|
299
|
+
def create_portal_link(create_portal_link_input, opts = {})
|
|
300
|
+
data, _status_code, _headers = create_portal_link_with_http_info(create_portal_link_input, opts)
|
|
301
|
+
data
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
# Make a custom logic portal link for an end customer
|
|
305
|
+
# A link that opens the custom logic portal for one end customer, where they see and edit their own logic. Show it in an iframe on one of your sites, or open it in a new tab. It works once and expires after 15 minutes.
|
|
306
|
+
# @param create_portal_link_input [CreatePortalLinkInput]
|
|
307
|
+
# @param [Hash] opts the optional parameters
|
|
308
|
+
# @return [Array<(CreatePortalLinkOutput, Integer, Hash)>] CreatePortalLinkOutput data, response status code and response headers
|
|
309
|
+
def create_portal_link_with_http_info(create_portal_link_input, opts = {})
|
|
310
|
+
if @api_client.config.debugging
|
|
311
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.create_portal_link ...'
|
|
312
|
+
end
|
|
313
|
+
# verify the required parameter 'create_portal_link_input' is set
|
|
314
|
+
if @api_client.config.client_side_validation && create_portal_link_input.nil?
|
|
315
|
+
fail ArgumentError, "Missing the required parameter 'create_portal_link_input' when calling DefaultApi.create_portal_link"
|
|
316
|
+
end
|
|
317
|
+
# resource path
|
|
318
|
+
local_var_path = '/sdk/v1/portal/link'
|
|
319
|
+
|
|
320
|
+
# query parameters
|
|
321
|
+
query_params = opts[:query_params] || {}
|
|
322
|
+
|
|
323
|
+
# header parameters
|
|
324
|
+
header_params = opts[:header_params] || {}
|
|
325
|
+
# HTTP header 'Accept' (if needed)
|
|
326
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
327
|
+
# HTTP header 'Content-Type'
|
|
328
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
329
|
+
if !content_type.nil?
|
|
330
|
+
header_params['Content-Type'] = content_type
|
|
331
|
+
end
|
|
332
|
+
|
|
333
|
+
# form parameters
|
|
334
|
+
form_params = opts[:form_params] || {}
|
|
335
|
+
|
|
336
|
+
# http body (model)
|
|
337
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_portal_link_input)
|
|
338
|
+
|
|
339
|
+
# return_type
|
|
340
|
+
return_type = opts[:debug_return_type] || 'CreatePortalLinkOutput'
|
|
341
|
+
|
|
342
|
+
# auth_names
|
|
343
|
+
auth_names = opts[:debug_auth_names] || ['SdkKey']
|
|
344
|
+
|
|
345
|
+
new_options = opts.merge(
|
|
346
|
+
:operation => :"DefaultApi.create_portal_link",
|
|
347
|
+
:header_params => header_params,
|
|
348
|
+
:query_params => query_params,
|
|
349
|
+
:form_params => form_params,
|
|
350
|
+
:body => post_body,
|
|
351
|
+
:auth_names => auth_names,
|
|
352
|
+
:return_type => return_type
|
|
353
|
+
)
|
|
354
|
+
|
|
355
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
356
|
+
if @api_client.config.debugging
|
|
357
|
+
@api_client.config.logger.debug "API called: DefaultApi#create_portal_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
358
|
+
end
|
|
359
|
+
return data, status_code, headers
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
# Disconnect an end customer from a platform
|
|
363
|
+
# Removes one end customer's login on one platform and deletes the connection, so reading it then answers END_CUSTOMER_NOT_FOUND. A pending connection, whose end customer was sent a link and has not finished, is deleted too. They can connect again with a new link. Disconnecting an end customer the API has no connection for on that platform, or disconnecting twice, answers END_CUSTOMER_NOT_FOUND. When the login cannot be removed just now the answer is INTERNAL_ERROR and nothing is changed, so the call can be made again. The id travels in the body because it may be any text.
|
|
364
|
+
# @param disconnect_connection_input [DisconnectConnectionInput]
|
|
365
|
+
# @param [Hash] opts the optional parameters
|
|
366
|
+
# @return [DisconnectConnectionOutput]
|
|
367
|
+
def disconnect_connection(disconnect_connection_input, opts = {})
|
|
368
|
+
data, _status_code, _headers = disconnect_connection_with_http_info(disconnect_connection_input, opts)
|
|
369
|
+
data
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
# Disconnect an end customer from a platform
|
|
373
|
+
# Removes one end customer's login on one platform and deletes the connection, so reading it then answers END_CUSTOMER_NOT_FOUND. A pending connection, whose end customer was sent a link and has not finished, is deleted too. They can connect again with a new link. Disconnecting an end customer the API has no connection for on that platform, or disconnecting twice, answers END_CUSTOMER_NOT_FOUND. When the login cannot be removed just now the answer is INTERNAL_ERROR and nothing is changed, so the call can be made again. The id travels in the body because it may be any text.
|
|
374
|
+
# @param disconnect_connection_input [DisconnectConnectionInput]
|
|
375
|
+
# @param [Hash] opts the optional parameters
|
|
376
|
+
# @return [Array<(DisconnectConnectionOutput, Integer, Hash)>] DisconnectConnectionOutput data, response status code and response headers
|
|
377
|
+
def disconnect_connection_with_http_info(disconnect_connection_input, opts = {})
|
|
378
|
+
if @api_client.config.debugging
|
|
379
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.disconnect_connection ...'
|
|
380
|
+
end
|
|
381
|
+
# verify the required parameter 'disconnect_connection_input' is set
|
|
382
|
+
if @api_client.config.client_side_validation && disconnect_connection_input.nil?
|
|
383
|
+
fail ArgumentError, "Missing the required parameter 'disconnect_connection_input' when calling DefaultApi.disconnect_connection"
|
|
384
|
+
end
|
|
385
|
+
# resource path
|
|
386
|
+
local_var_path = '/sdk/v1/connections/disconnect'
|
|
387
|
+
|
|
388
|
+
# query parameters
|
|
389
|
+
query_params = opts[:query_params] || {}
|
|
390
|
+
|
|
391
|
+
# header parameters
|
|
392
|
+
header_params = opts[:header_params] || {}
|
|
393
|
+
# HTTP header 'Accept' (if needed)
|
|
394
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
395
|
+
# HTTP header 'Content-Type'
|
|
396
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
397
|
+
if !content_type.nil?
|
|
398
|
+
header_params['Content-Type'] = content_type
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
# form parameters
|
|
402
|
+
form_params = opts[:form_params] || {}
|
|
403
|
+
|
|
404
|
+
# http body (model)
|
|
405
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(disconnect_connection_input)
|
|
406
|
+
|
|
407
|
+
# return_type
|
|
408
|
+
return_type = opts[:debug_return_type] || 'DisconnectConnectionOutput'
|
|
409
|
+
|
|
410
|
+
# auth_names
|
|
411
|
+
auth_names = opts[:debug_auth_names] || ['SdkKey']
|
|
412
|
+
|
|
413
|
+
new_options = opts.merge(
|
|
414
|
+
:operation => :"DefaultApi.disconnect_connection",
|
|
415
|
+
:header_params => header_params,
|
|
416
|
+
:query_params => query_params,
|
|
417
|
+
:form_params => form_params,
|
|
418
|
+
:body => post_body,
|
|
419
|
+
:auth_names => auth_names,
|
|
420
|
+
:return_type => return_type
|
|
421
|
+
)
|
|
422
|
+
|
|
423
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
424
|
+
if @api_client.config.debugging
|
|
425
|
+
@api_client.config.logger.debug "API called: DefaultApi#disconnect_connection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
426
|
+
end
|
|
427
|
+
return data, status_code, headers
|
|
428
|
+
end
|
|
429
|
+
|
|
294
430
|
# Read whether an end customer is connected
|
|
295
|
-
# The connection of one end customer on one platform. The
|
|
296
|
-
# @param
|
|
297
|
-
# @param platform [String] The platform key, such as hubspot.
|
|
431
|
+
# The connection of one end customer on one platform, and the key of their logic folder. The row exists from the moment a connect link is made, so an end customer who was sent a link and has not finished is pending; one the API has never made a link for on that platform is a 404, not a disconnected status. The id travels in the body because it may be any text.
|
|
432
|
+
# @param get_connection_input [GetConnectionInput]
|
|
298
433
|
# @param [Hash] opts the optional parameters
|
|
299
434
|
# @return [GetConnectionOutput]
|
|
300
|
-
def get_connection(
|
|
301
|
-
data, _status_code, _headers = get_connection_with_http_info(
|
|
435
|
+
def get_connection(get_connection_input, opts = {})
|
|
436
|
+
data, _status_code, _headers = get_connection_with_http_info(get_connection_input, opts)
|
|
302
437
|
data
|
|
303
438
|
end
|
|
304
439
|
|
|
305
440
|
# Read whether an end customer is connected
|
|
306
|
-
# The connection of one end customer on one platform. The
|
|
307
|
-
# @param
|
|
308
|
-
# @param platform [String] The platform key, such as hubspot.
|
|
441
|
+
# The connection of one end customer on one platform, and the key of their logic folder. The row exists from the moment a connect link is made, so an end customer who was sent a link and has not finished is pending; one the API has never made a link for on that platform is a 404, not a disconnected status. The id travels in the body because it may be any text.
|
|
442
|
+
# @param get_connection_input [GetConnectionInput]
|
|
309
443
|
# @param [Hash] opts the optional parameters
|
|
310
444
|
# @return [Array<(GetConnectionOutput, Integer, Hash)>] GetConnectionOutput data, response status code and response headers
|
|
311
|
-
def get_connection_with_http_info(
|
|
445
|
+
def get_connection_with_http_info(get_connection_input, opts = {})
|
|
312
446
|
if @api_client.config.debugging
|
|
313
447
|
@api_client.config.logger.debug 'Calling API: DefaultApi.get_connection ...'
|
|
314
448
|
end
|
|
449
|
+
# verify the required parameter 'get_connection_input' is set
|
|
450
|
+
if @api_client.config.client_side_validation && get_connection_input.nil?
|
|
451
|
+
fail ArgumentError, "Missing the required parameter 'get_connection_input' when calling DefaultApi.get_connection"
|
|
452
|
+
end
|
|
453
|
+
# resource path
|
|
454
|
+
local_var_path = '/sdk/v1/connections/get'
|
|
455
|
+
|
|
456
|
+
# query parameters
|
|
457
|
+
query_params = opts[:query_params] || {}
|
|
458
|
+
|
|
459
|
+
# header parameters
|
|
460
|
+
header_params = opts[:header_params] || {}
|
|
461
|
+
# HTTP header 'Accept' (if needed)
|
|
462
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
463
|
+
# HTTP header 'Content-Type'
|
|
464
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
465
|
+
if !content_type.nil?
|
|
466
|
+
header_params['Content-Type'] = content_type
|
|
467
|
+
end
|
|
468
|
+
|
|
469
|
+
# form parameters
|
|
470
|
+
form_params = opts[:form_params] || {}
|
|
471
|
+
|
|
472
|
+
# http body (model)
|
|
473
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(get_connection_input)
|
|
474
|
+
|
|
475
|
+
# return_type
|
|
476
|
+
return_type = opts[:debug_return_type] || 'GetConnectionOutput'
|
|
477
|
+
|
|
478
|
+
# auth_names
|
|
479
|
+
auth_names = opts[:debug_auth_names] || ['SdkKey']
|
|
480
|
+
|
|
481
|
+
new_options = opts.merge(
|
|
482
|
+
:operation => :"DefaultApi.get_connection",
|
|
483
|
+
:header_params => header_params,
|
|
484
|
+
:query_params => query_params,
|
|
485
|
+
:form_params => form_params,
|
|
486
|
+
:body => post_body,
|
|
487
|
+
:auth_names => auth_names,
|
|
488
|
+
:return_type => return_type
|
|
489
|
+
)
|
|
490
|
+
|
|
491
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
492
|
+
if @api_client.config.debugging
|
|
493
|
+
@api_client.config.logger.debug "API called: DefaultApi#get_connection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
494
|
+
end
|
|
495
|
+
return data, status_code, headers
|
|
496
|
+
end
|
|
497
|
+
|
|
498
|
+
# Read whether an end customer is connected (older SDKs)
|
|
499
|
+
# The route SDKs before 19.2 call; new code uses POST /v1/connections/get. It answers exactly the same, but takes only ids of the shape those SDKs could send: 1 to 100 characters of letters, digits, dot, dash or underscore.
|
|
500
|
+
# @param end_customer_id [String]
|
|
501
|
+
# @param platform [String]
|
|
502
|
+
# @param [Hash] opts the optional parameters
|
|
503
|
+
# @return [GetConnectionOutput]
|
|
504
|
+
def get_connection_legacy(end_customer_id, platform, opts = {})
|
|
505
|
+
data, _status_code, _headers = get_connection_legacy_with_http_info(end_customer_id, platform, opts)
|
|
506
|
+
data
|
|
507
|
+
end
|
|
508
|
+
|
|
509
|
+
# Read whether an end customer is connected (older SDKs)
|
|
510
|
+
# The route SDKs before 19.2 call; new code uses POST /v1/connections/get. It answers exactly the same, but takes only ids of the shape those SDKs could send: 1 to 100 characters of letters, digits, dot, dash or underscore.
|
|
511
|
+
# @param end_customer_id [String]
|
|
512
|
+
# @param platform [String]
|
|
513
|
+
# @param [Hash] opts the optional parameters
|
|
514
|
+
# @return [Array<(GetConnectionOutput, Integer, Hash)>] GetConnectionOutput data, response status code and response headers
|
|
515
|
+
def get_connection_legacy_with_http_info(end_customer_id, platform, opts = {})
|
|
516
|
+
if @api_client.config.debugging
|
|
517
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.get_connection_legacy ...'
|
|
518
|
+
end
|
|
315
519
|
# verify the required parameter 'end_customer_id' is set
|
|
316
520
|
if @api_client.config.client_side_validation && end_customer_id.nil?
|
|
317
|
-
fail ArgumentError, "Missing the required parameter 'end_customer_id' when calling DefaultApi.
|
|
521
|
+
fail ArgumentError, "Missing the required parameter 'end_customer_id' when calling DefaultApi.get_connection_legacy"
|
|
318
522
|
end
|
|
319
523
|
pattern = Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
|
|
320
524
|
if @api_client.config.client_side_validation && end_customer_id !~ pattern
|
|
321
|
-
fail ArgumentError, "invalid value for 'end_customer_id' when calling DefaultApi.
|
|
525
|
+
fail ArgumentError, "invalid value for 'end_customer_id' when calling DefaultApi.get_connection_legacy, must conform to the pattern #{pattern}."
|
|
322
526
|
end
|
|
323
527
|
|
|
324
528
|
# verify the required parameter 'platform' is set
|
|
325
529
|
if @api_client.config.client_side_validation && platform.nil?
|
|
326
|
-
fail ArgumentError, "Missing the required parameter 'platform' when calling DefaultApi.
|
|
530
|
+
fail ArgumentError, "Missing the required parameter 'platform' when calling DefaultApi.get_connection_legacy"
|
|
327
531
|
end
|
|
328
532
|
pattern = Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
|
|
329
533
|
if @api_client.config.client_side_validation && platform !~ pattern
|
|
330
|
-
fail ArgumentError, "invalid value for 'platform' when calling DefaultApi.
|
|
534
|
+
fail ArgumentError, "invalid value for 'platform' when calling DefaultApi.get_connection_legacy, must conform to the pattern #{pattern}."
|
|
331
535
|
end
|
|
332
536
|
|
|
333
537
|
# resource path
|
|
@@ -355,7 +559,7 @@ module Appnigma::Generated
|
|
|
355
559
|
auth_names = opts[:debug_auth_names] || ['SdkKey']
|
|
356
560
|
|
|
357
561
|
new_options = opts.merge(
|
|
358
|
-
:operation => :"DefaultApi.
|
|
562
|
+
:operation => :"DefaultApi.get_connection_legacy",
|
|
359
563
|
:header_params => header_params,
|
|
360
564
|
:query_params => query_params,
|
|
361
565
|
:form_params => form_params,
|
|
@@ -366,7 +570,7 @@ module Appnigma::Generated
|
|
|
366
570
|
|
|
367
571
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
368
572
|
if @api_client.config.debugging
|
|
369
|
-
@api_client.config.logger.debug "API called: DefaultApi#
|
|
573
|
+
@api_client.config.logger.debug "API called: DefaultApi#get_connection_legacy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
370
574
|
end
|
|
371
575
|
return data, status_code, headers
|
|
372
576
|
end
|
|
@@ -697,6 +901,100 @@ module Appnigma::Generated
|
|
|
697
901
|
return data, status_code, headers
|
|
698
902
|
end
|
|
699
903
|
|
|
904
|
+
# List your end customers
|
|
905
|
+
# Your end customers, one entry each with every connection of theirs, their logic folder key, and whether the live version holds a function written for them. platform and status list the end customers with at least one connection that matches; with neither, every end customer. Pages of 50 by default, at most 100, in end customer id order: pass next back as cursor until it is null.
|
|
906
|
+
# @param [Hash] opts the optional parameters
|
|
907
|
+
# @option opts [String] :platform Lists the end customers with a connection on this platform; it must be switched on for your company.
|
|
908
|
+
# @option opts [String] :status Lists the end customers with a connection in this status.
|
|
909
|
+
# @option opts [Integer] :limit 1 to 100. Default 50.
|
|
910
|
+
# @option opts [String] :cursor The next value from the previous page.
|
|
911
|
+
# @return [ListConnectionsOutput]
|
|
912
|
+
def list_connections(opts = {})
|
|
913
|
+
data, _status_code, _headers = list_connections_with_http_info(opts)
|
|
914
|
+
data
|
|
915
|
+
end
|
|
916
|
+
|
|
917
|
+
# List your end customers
|
|
918
|
+
# Your end customers, one entry each with every connection of theirs, their logic folder key, and whether the live version holds a function written for them. platform and status list the end customers with at least one connection that matches; with neither, every end customer. Pages of 50 by default, at most 100, in end customer id order: pass next back as cursor until it is null.
|
|
919
|
+
# @param [Hash] opts the optional parameters
|
|
920
|
+
# @option opts [String] :platform Lists the end customers with a connection on this platform; it must be switched on for your company.
|
|
921
|
+
# @option opts [String] :status Lists the end customers with a connection in this status.
|
|
922
|
+
# @option opts [Integer] :limit 1 to 100. Default 50.
|
|
923
|
+
# @option opts [String] :cursor The next value from the previous page.
|
|
924
|
+
# @return [Array<(ListConnectionsOutput, Integer, Hash)>] ListConnectionsOutput data, response status code and response headers
|
|
925
|
+
def list_connections_with_http_info(opts = {})
|
|
926
|
+
if @api_client.config.debugging
|
|
927
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.list_connections ...'
|
|
928
|
+
end
|
|
929
|
+
pattern = Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
|
|
930
|
+
if @api_client.config.client_side_validation && !opts[:'platform'].nil? && opts[:'platform'] !~ pattern
|
|
931
|
+
fail ArgumentError, "invalid value for 'opts[:\"platform\"]' when calling DefaultApi.list_connections, must conform to the pattern #{pattern}."
|
|
932
|
+
end
|
|
933
|
+
|
|
934
|
+
allowable_values = ["pending", "connected", "needs_reconnect", "disconnected"]
|
|
935
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
|
936
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
|
937
|
+
end
|
|
938
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
939
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DefaultApi.list_connections, must be smaller than or equal to 100.'
|
|
940
|
+
end
|
|
941
|
+
|
|
942
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
943
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DefaultApi.list_connections, must be greater than or equal to 1.'
|
|
944
|
+
end
|
|
945
|
+
|
|
946
|
+
if @api_client.config.client_side_validation && !opts[:'cursor'].nil? && opts[:'cursor'].to_s.length > 1500
|
|
947
|
+
fail ArgumentError, 'invalid value for "opts[:"cursor"]" when calling DefaultApi.list_connections, the character length must be smaller than or equal to 1500.'
|
|
948
|
+
end
|
|
949
|
+
|
|
950
|
+
if @api_client.config.client_side_validation && !opts[:'cursor'].nil? && opts[:'cursor'].to_s.length < 1
|
|
951
|
+
fail ArgumentError, 'invalid value for "opts[:"cursor"]" when calling DefaultApi.list_connections, the character length must be greater than or equal to 1.'
|
|
952
|
+
end
|
|
953
|
+
|
|
954
|
+
# resource path
|
|
955
|
+
local_var_path = '/sdk/v1/connections'
|
|
956
|
+
|
|
957
|
+
# query parameters
|
|
958
|
+
query_params = opts[:query_params] || {}
|
|
959
|
+
query_params[:'platform'] = opts[:'platform'] if !opts[:'platform'].nil?
|
|
960
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
961
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
962
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
963
|
+
|
|
964
|
+
# header parameters
|
|
965
|
+
header_params = opts[:header_params] || {}
|
|
966
|
+
# HTTP header 'Accept' (if needed)
|
|
967
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
968
|
+
|
|
969
|
+
# form parameters
|
|
970
|
+
form_params = opts[:form_params] || {}
|
|
971
|
+
|
|
972
|
+
# http body (model)
|
|
973
|
+
post_body = opts[:debug_body]
|
|
974
|
+
|
|
975
|
+
# return_type
|
|
976
|
+
return_type = opts[:debug_return_type] || 'ListConnectionsOutput'
|
|
977
|
+
|
|
978
|
+
# auth_names
|
|
979
|
+
auth_names = opts[:debug_auth_names] || ['SdkKey']
|
|
980
|
+
|
|
981
|
+
new_options = opts.merge(
|
|
982
|
+
:operation => :"DefaultApi.list_connections",
|
|
983
|
+
:header_params => header_params,
|
|
984
|
+
:query_params => query_params,
|
|
985
|
+
:form_params => form_params,
|
|
986
|
+
:body => post_body,
|
|
987
|
+
:auth_names => auth_names,
|
|
988
|
+
:return_type => return_type
|
|
989
|
+
)
|
|
990
|
+
|
|
991
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
992
|
+
if @api_client.config.debugging
|
|
993
|
+
@api_client.config.logger.debug "API called: DefaultApi#list_connections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
994
|
+
end
|
|
995
|
+
return data, status_code, headers
|
|
996
|
+
end
|
|
997
|
+
|
|
700
998
|
# List companies in one shape
|
|
701
999
|
# One page of an end customer's companies, in the same shape whichever CRM they use. Pass next as cursor for the following page.
|
|
702
1000
|
# @param crm_list_input [CrmListInput]
|
|
@@ -902,9 +1200,10 @@ module Appnigma::Generated
|
|
|
902
1200
|
end
|
|
903
1201
|
|
|
904
1202
|
# List your own functions
|
|
905
|
-
# Every function that is live for your company, with its input and output shapes. platform narrows the list to one platform.
|
|
1203
|
+
# Every function that is live for your company, with its id, its input and output shapes, and whether it is always on. platform narrows the list to one platform. endCustomerId narrows it to your own functions and that end customer's: their versions of yours, which keep your function's id, and their own.
|
|
906
1204
|
# @param [Hash] opts the optional parameters
|
|
907
1205
|
# @option opts [String] :platform Narrows the list to one platform.
|
|
1206
|
+
# @option opts [String] :end_customer_id Narrows the list to your own functions and this end customer's. Left out, every end customer's are listed too.
|
|
908
1207
|
# @return [ListFunctionsOutput]
|
|
909
1208
|
def list_functions(opts = {})
|
|
910
1209
|
data, _status_code, _headers = list_functions_with_http_info(opts)
|
|
@@ -912,9 +1211,10 @@ module Appnigma::Generated
|
|
|
912
1211
|
end
|
|
913
1212
|
|
|
914
1213
|
# List your own functions
|
|
915
|
-
# Every function that is live for your company, with its input and output shapes. platform narrows the list to one platform.
|
|
1214
|
+
# Every function that is live for your company, with its id, its input and output shapes, and whether it is always on. platform narrows the list to one platform. endCustomerId narrows it to your own functions and that end customer's: their versions of yours, which keep your function's id, and their own.
|
|
916
1215
|
# @param [Hash] opts the optional parameters
|
|
917
1216
|
# @option opts [String] :platform Narrows the list to one platform.
|
|
1217
|
+
# @option opts [String] :end_customer_id Narrows the list to your own functions and this end customer's. Left out, every end customer's are listed too.
|
|
918
1218
|
# @return [Array<(ListFunctionsOutput, Integer, Hash)>] ListFunctionsOutput data, response status code and response headers
|
|
919
1219
|
def list_functions_with_http_info(opts = {})
|
|
920
1220
|
if @api_client.config.debugging
|
|
@@ -931,6 +1231,7 @@ module Appnigma::Generated
|
|
|
931
1231
|
# query parameters
|
|
932
1232
|
query_params = opts[:query_params] || {}
|
|
933
1233
|
query_params[:'platform'] = opts[:'platform'] if !opts[:'platform'].nil?
|
|
1234
|
+
query_params[:'endCustomerId'] = opts[:'end_customer_id'] if !opts[:'end_customer_id'].nil?
|
|
934
1235
|
|
|
935
1236
|
# header parameters
|
|
936
1237
|
header_params = opts[:header_params] || {}
|
|
@@ -1160,7 +1461,7 @@ module Appnigma::Generated
|
|
|
1160
1461
|
end
|
|
1161
1462
|
|
|
1162
1463
|
# Run one of your own functions
|
|
1163
|
-
# Runs one
|
|
1464
|
+
# Runs one function once on the end customer's account, by platform and either functionName or functionId, never both. A name finds your own function, and runs the end customer's version of it instead when they have one. An id, from listFunctions, finds the end customer's own version first, then yours; an id only another end customer has is not found. An always-on function runs too, once, without what its conditionals say and without setting off any other. The input is checked against the shape the function declared.
|
|
1164
1465
|
# @param run_input [RunInput]
|
|
1165
1466
|
# @param [Hash] opts the optional parameters
|
|
1166
1467
|
# @return [RunOutput]
|
|
@@ -1170,7 +1471,7 @@ module Appnigma::Generated
|
|
|
1170
1471
|
end
|
|
1171
1472
|
|
|
1172
1473
|
# Run one of your own functions
|
|
1173
|
-
# Runs one
|
|
1474
|
+
# Runs one function once on the end customer's account, by platform and either functionName or functionId, never both. A name finds your own function, and runs the end customer's version of it instead when they have one. An id, from listFunctions, finds the end customer's own version first, then yours; an id only another end customer has is not found. An always-on function runs too, once, without what its conditionals say and without setting off any other. The input is checked against the shape the function declared.
|
|
1174
1475
|
# @param run_input [RunInput]
|
|
1175
1476
|
# @param [Hash] opts the optional parameters
|
|
1176
1477
|
# @return [Array<(RunOutput, Integer, Hash)>] RunOutput data, response status code and response headers
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 4.1.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.26.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 4.1.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.26.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 4.1.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.26.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 4.1.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.26.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 4.1.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.26.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 4.1.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.26.0
|
|
@@ -15,12 +15,13 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Appnigma::Generated
|
|
17
17
|
class ConnectionStatus
|
|
18
|
+
PENDING = "pending".freeze
|
|
18
19
|
CONNECTED = "connected".freeze
|
|
19
20
|
NEEDS_RECONNECT = "needs_reconnect".freeze
|
|
20
21
|
DISCONNECTED = "disconnected".freeze
|
|
21
22
|
|
|
22
23
|
def self.all_vars
|
|
23
|
-
@all_vars ||= [CONNECTED, NEEDS_RECONNECT, DISCONNECTED].freeze
|
|
24
|
+
@all_vars ||= [PENDING, CONNECTED, NEEDS_RECONNECT, DISCONNECTED].freeze
|
|
24
25
|
end
|
|
25
26
|
|
|
26
27
|
# Builds the enum from string
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 4.1.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.26.0
|
|
@@ -15,7 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Appnigma::Generated
|
|
17
17
|
class CreateConnectionLinkInput < ApiModelBase
|
|
18
|
-
# Your own id for the end customer.
|
|
18
|
+
# Your own id for the end customer: it must be 1 to 255 characters, with no control characters and not only spaces. Stored exactly as sent: ids that differ only in case or spaces are different end customers.
|
|
19
19
|
attr_accessor :end_customer_id
|
|
20
20
|
|
|
21
21
|
# The platform to connect; it must be switched on for your company.
|
|
@@ -112,11 +112,6 @@ module Appnigma::Generated
|
|
|
112
112
|
invalid_properties.push('invalid value for "end_customer_id", end_customer_id cannot be nil.')
|
|
113
113
|
end
|
|
114
114
|
|
|
115
|
-
pattern = Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
|
|
116
|
-
if @end_customer_id !~ pattern
|
|
117
|
-
invalid_properties.push("invalid value for \"end_customer_id\", must conform to the pattern #{pattern}.")
|
|
118
|
-
end
|
|
119
|
-
|
|
120
115
|
if @platform.nil?
|
|
121
116
|
invalid_properties.push('invalid value for "platform", platform cannot be nil.')
|
|
122
117
|
end
|
|
@@ -143,7 +138,6 @@ module Appnigma::Generated
|
|
|
143
138
|
def valid?
|
|
144
139
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
145
140
|
return false if @end_customer_id.nil?
|
|
146
|
-
return false if @end_customer_id !~ Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
|
|
147
141
|
return false if @platform.nil?
|
|
148
142
|
return false if @platform !~ Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
|
|
149
143
|
return false if @return_url.nil?
|
|
@@ -158,11 +152,6 @@ module Appnigma::Generated
|
|
|
158
152
|
fail ArgumentError, 'end_customer_id cannot be nil'
|
|
159
153
|
end
|
|
160
154
|
|
|
161
|
-
pattern = Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
|
|
162
|
-
if end_customer_id !~ pattern
|
|
163
|
-
fail ArgumentError, "invalid value for \"end_customer_id\", must conform to the pattern #{pattern}."
|
|
164
|
-
end
|
|
165
|
-
|
|
166
155
|
@end_customer_id = end_customer_id
|
|
167
156
|
end
|
|
168
157
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document:
|
|
6
|
+
The version of the OpenAPI document: 4.1.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.26.0
|