appnigma-sdk 2.0.0 → 2.2.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.
Files changed (168) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +592 -26
  4. data/exe/appnigma +8 -0
  5. data/lib/appnigma/actions.rb +33 -0
  6. data/lib/appnigma/checks.rb +13 -0
  7. data/lib/appnigma/client.rb +30 -13
  8. data/lib/appnigma/command.rb +154 -0
  9. data/lib/appnigma/command_files.rb +46 -0
  10. data/lib/appnigma/connect_fields.rb +83 -0
  11. data/lib/appnigma/connections.rb +72 -3
  12. data/lib/appnigma/constants.rb +57 -0
  13. data/lib/appnigma/end_customers.rb +29 -0
  14. data/lib/appnigma/errors.rb +44 -6
  15. data/lib/appnigma/features.rb +19 -0
  16. data/lib/appnigma/files.rb +26 -0
  17. data/lib/appnigma/generated/api/default_api.rb +2149 -380
  18. data/lib/appnigma/generated/api_client.rb +1 -1
  19. data/lib/appnigma/generated/api_error.rb +1 -1
  20. data/lib/appnigma/generated/api_model_base.rb +1 -1
  21. data/lib/appnigma/generated/configuration.rb +1 -1
  22. data/lib/appnigma/generated/models/action_entry.rb +1 -1
  23. data/lib/appnigma/generated/models/check_logic_input.rb +276 -0
  24. data/lib/appnigma/generated/models/check_logic_output.rb +193 -0
  25. data/lib/appnigma/generated/models/client_event.rb +309 -0
  26. data/lib/appnigma/generated/models/client_event_delivery.rb +306 -0
  27. data/lib/appnigma/generated/models/client_event_type.rb +44 -0
  28. data/lib/appnigma/generated/models/client_webhook.rb +346 -0
  29. data/lib/appnigma/generated/models/connect_end_customer_input.rb +243 -0
  30. data/lib/appnigma/generated/models/connect_end_customer_output.rb +294 -0
  31. data/lib/appnigma/generated/models/connect_field.rb +308 -0
  32. data/lib/appnigma/generated/models/connection_status.rb +1 -1
  33. data/lib/appnigma/generated/models/create_connection_link_input.rb +1 -1
  34. data/lib/appnigma/generated/models/create_connection_link_output.rb +1 -1
  35. data/lib/appnigma/generated/models/create_logic_input.rb +273 -0
  36. data/lib/appnigma/generated/models/create_logic_input_trigger.rb +104 -0
  37. data/lib/appnigma/generated/models/create_logic_input_trigger_any_of.rb +257 -0
  38. data/lib/appnigma/generated/models/create_logic_input_trigger_any_of1.rb +238 -0
  39. data/lib/appnigma/generated/models/create_logic_output.rb +230 -0
  40. data/lib/appnigma/generated/models/create_portal_link_input.rb +2 -18
  41. data/lib/appnigma/generated/models/create_portal_link_output.rb +1 -1
  42. data/lib/appnigma/generated/models/create_webhook_input.rb +187 -0
  43. data/lib/appnigma/generated/models/create_webhook_output.rb +204 -0
  44. data/lib/appnigma/generated/models/crm_company.rb +1 -1
  45. data/lib/appnigma/generated/models/crm_company_get_output.rb +1 -1
  46. data/lib/appnigma/generated/models/crm_company_list_output.rb +1 -1
  47. data/lib/appnigma/generated/models/crm_company_write_output.rb +1 -1
  48. data/lib/appnigma/generated/models/crm_contact.rb +1 -1
  49. data/lib/appnigma/generated/models/crm_contact_get_output.rb +1 -1
  50. data/lib/appnigma/generated/models/crm_contact_list_output.rb +1 -1
  51. data/lib/appnigma/generated/models/crm_contact_write_output.rb +1 -1
  52. data/lib/appnigma/generated/models/crm_create_input.rb +1 -1
  53. data/lib/appnigma/generated/models/crm_custom_field.rb +1 -1
  54. data/lib/appnigma/generated/models/crm_deal.rb +1 -1
  55. data/lib/appnigma/generated/models/crm_deal_create_input.rb +1 -1
  56. data/lib/appnigma/generated/models/crm_deal_get_output.rb +1 -1
  57. data/lib/appnigma/generated/models/crm_deal_list_output.rb +1 -1
  58. data/lib/appnigma/generated/models/crm_deal_write_output.rb +1 -1
  59. data/lib/appnigma/generated/models/crm_email.rb +1 -1
  60. data/lib/appnigma/generated/models/crm_get_input.rb +1 -1
  61. data/lib/appnigma/generated/models/crm_labelled.rb +1 -1
  62. data/lib/appnigma/generated/models/crm_list_input.rb +1 -1
  63. data/lib/appnigma/generated/models/crm_phone.rb +1 -1
  64. data/lib/appnigma/generated/models/crm_update_input.rb +1 -1
  65. data/lib/appnigma/generated/models/delete_end_customer_input.rb +178 -0
  66. data/lib/appnigma/generated/models/delete_end_customer_output.rb +286 -0
  67. data/lib/appnigma/generated/models/delete_end_customer_output_connections_inner.rb +238 -0
  68. data/lib/appnigma/generated/models/delete_end_customer_output_logic_folder.rb +255 -0
  69. data/lib/appnigma/generated/models/delete_end_customer_output_steps_inner.rb +257 -0
  70. data/lib/appnigma/generated/models/delete_webhook_input.rb +189 -0
  71. data/lib/appnigma/generated/models/delete_webhook_output.rb +228 -0
  72. data/lib/appnigma/generated/models/discard_logic_input.rb +292 -0
  73. data/lib/appnigma/generated/models/discard_logic_output.rb +254 -0
  74. data/lib/appnigma/generated/models/disconnect_connection_input.rb +216 -0
  75. data/lib/appnigma/generated/models/disconnect_connection_output.rb +294 -0
  76. data/lib/appnigma/generated/models/edit_logic_input.rb +368 -0
  77. data/lib/appnigma/generated/models/edit_logic_output.rb +298 -0
  78. data/lib/appnigma/generated/models/encrypted_fields.rb +357 -0
  79. data/lib/appnigma/generated/models/end_customer.rb +17 -3
  80. data/lib/appnigma/generated/models/end_customer_connection.rb +1 -1
  81. data/lib/appnigma/generated/models/function_entry.rb +1 -1
  82. data/lib/appnigma/generated/models/function_owner.rb +1 -1
  83. data/lib/appnigma/generated/models/function_owner_one_of.rb +1 -1
  84. data/lib/appnigma/generated/models/function_owner_one_of1.rb +1 -1
  85. data/lib/appnigma/generated/models/get_alerts_output.rb +180 -0
  86. data/lib/appnigma/generated/models/get_connect_key_output.rb +256 -0
  87. data/lib/appnigma/generated/models/get_connection_input.rb +1 -1
  88. data/lib/appnigma/generated/models/get_connection_output.rb +34 -7
  89. data/lib/appnigma/generated/models/get_guide_output.rb +1 -1
  90. data/lib/appnigma/generated/models/get_logic_go_live_status_input.rb +247 -0
  91. data/lib/appnigma/generated/models/get_logic_go_live_status_output.rb +296 -0
  92. data/lib/appnigma/generated/models/get_logic_input.rb +247 -0
  93. data/lib/appnigma/generated/models/get_logic_output.rb +240 -0
  94. data/lib/appnigma/generated/models/get_logic_output_file.rb +204 -0
  95. data/lib/appnigma/generated/models/get_platform_input.rb +188 -0
  96. data/lib/appnigma/generated/models/get_platform_output.rb +326 -0
  97. data/lib/appnigma/generated/models/get_sync_output.rb +207 -0
  98. data/lib/appnigma/generated/models/go_live_logic_input.rb +316 -0
  99. data/lib/appnigma/generated/models/go_live_logic_output.rb +281 -0
  100. data/lib/appnigma/generated/models/json_value.rb +1 -1
  101. data/lib/appnigma/generated/models/list_actions_output.rb +1 -1
  102. data/lib/appnigma/generated/models/list_connections_output.rb +3 -3
  103. data/lib/appnigma/generated/models/list_events_input.rb +302 -0
  104. data/lib/appnigma/generated/models/list_events_output.rb +193 -0
  105. data/lib/appnigma/generated/models/list_features_output.rb +179 -0
  106. data/lib/appnigma/generated/models/list_features_output_features_inner.rb +229 -0
  107. data/lib/appnigma/generated/models/list_functions_output.rb +1 -1
  108. data/lib/appnigma/generated/models/list_logic_input.rb +162 -0
  109. data/lib/appnigma/generated/models/list_logic_output.rb +209 -0
  110. data/lib/appnigma/generated/models/list_logic_runs_input.rb +275 -0
  111. data/lib/appnigma/generated/models/list_logic_runs_output.rb +193 -0
  112. data/lib/appnigma/generated/models/list_platforms_output.rb +1 -1
  113. data/lib/appnigma/generated/models/list_record_changes_input.rb +375 -0
  114. data/lib/appnigma/generated/models/list_record_changes_output.rb +193 -0
  115. data/lib/appnigma/generated/models/list_webhooks_output.rb +180 -0
  116. data/lib/appnigma/generated/models/logic_check_problem.rb +203 -0
  117. data/lib/appnigma/generated/models/logic_conditional.rb +3 -3
  118. data/lib/appnigma/generated/models/logic_draft.rb +257 -0
  119. data/lib/appnigma/generated/models/logic_entry.rb +441 -0
  120. data/lib/appnigma/generated/models/logic_entry_failure.rb +205 -0
  121. data/lib/appnigma/generated/models/logic_folder_problem.rb +218 -0
  122. data/lib/appnigma/generated/models/logic_run.rb +483 -0
  123. data/lib/appnigma/generated/models/logic_test_call.rb +269 -0
  124. data/lib/appnigma/generated/models/platform_entry.rb +63 -6
  125. data/lib/appnigma/generated/models/platform_entry_coverage_inner.rb +1 -1
  126. data/lib/appnigma/generated/models/platform_request_input.rb +1 -1
  127. data/lib/appnigma/generated/models/platform_request_input_body.rb +1 -1
  128. data/lib/appnigma/generated/models/platform_request_output.rb +1 -1
  129. data/lib/appnigma/generated/models/ran_as.rb +1 -1
  130. data/lib/appnigma/generated/models/record_change.rb +231 -0
  131. data/lib/appnigma/generated/models/record_change_record.rb +105 -0
  132. data/lib/appnigma/generated/models/run_action_input.rb +1 -1
  133. data/lib/appnigma/generated/models/run_action_output.rb +1 -1
  134. data/lib/appnigma/generated/models/run_input.rb +1 -1
  135. data/lib/appnigma/generated/models/run_output.rb +1 -1
  136. data/lib/appnigma/generated/models/sdk_error.rb +1 -1
  137. data/lib/appnigma/generated/models/sdk_error_error.rb +3 -3
  138. data/lib/appnigma/generated/models/sdk_error_error_details.rb +81 -6
  139. data/lib/appnigma/generated/models/sdk_problem.rb +1 -1
  140. data/lib/appnigma/generated/models/set_alerts_input.rb +197 -0
  141. data/lib/appnigma/generated/models/set_alerts_output.rb +180 -0
  142. data/lib/appnigma/generated/models/set_sync_input.rb +177 -0
  143. data/lib/appnigma/generated/models/set_sync_output.rb +207 -0
  144. data/lib/appnigma/generated/models/switch_logic_off_input.rb +200 -0
  145. data/lib/appnigma/generated/models/switch_logic_off_output.rb +315 -0
  146. data/lib/appnigma/generated/models/switch_logic_on_input.rb +200 -0
  147. data/lib/appnigma/generated/models/switch_logic_on_output.rb +315 -0
  148. data/lib/appnigma/generated/models/sync_health.rb +231 -0
  149. data/lib/appnigma/generated/models/test_logic_input.rb +355 -0
  150. data/lib/appnigma/generated/models/test_logic_output.rb +418 -0
  151. data/lib/appnigma/generated/models/test_logic_output_error.rb +231 -0
  152. data/lib/appnigma/generated/models/update_logic_input.rb +359 -0
  153. data/lib/appnigma/generated/models/update_logic_output.rb +205 -0
  154. data/lib/appnigma/generated/version.rb +1 -1
  155. data/lib/appnigma/generated.rb +77 -1
  156. data/lib/appnigma/logic.rb +176 -0
  157. data/lib/appnigma/names.rb +4 -4
  158. data/lib/appnigma/platforms.rb +11 -1
  159. data/lib/appnigma/portal.rb +8 -5
  160. data/lib/appnigma/records.rb +46 -0
  161. data/lib/appnigma/schema_type.rb +149 -0
  162. data/lib/appnigma/sync.rb +30 -0
  163. data/lib/appnigma/types_printer.rb +154 -0
  164. data/lib/appnigma/verify_webhook.rb +107 -0
  165. data/lib/appnigma/version.rb +2 -2
  166. data/lib/appnigma/webhooks.rb +79 -0
  167. data/lib/appnigma.rb +1 -0
  168. metadata +95 -3
@@ -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: 4.0.0
6
+ The version of the OpenAPI document: 5.4.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.26.0
@@ -19,6 +19,142 @@ module Appnigma::Generated
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Check a logic before it goes live
23
+ # The quick check a go-live runs first, on its own: the file builds under the bundler's import rules, exports logic made with defineLogic, and keeps the id it has on main. Problems come by line and column. Checks the source sent, or else the saved draft, or else the file on main. Nothing is saved, and a passing file still meets the full checks of a go-live. Missing settings are not checked here.
24
+ # @param check_logic_input [CheckLogicInput]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [CheckLogicOutput]
27
+ def check_logic(check_logic_input, opts = {})
28
+ data, _status_code, _headers = check_logic_with_http_info(check_logic_input, opts)
29
+ data
30
+ end
31
+
32
+ # Check a logic before it goes live
33
+ # The quick check a go-live runs first, on its own: the file builds under the bundler's import rules, exports logic made with defineLogic, and keeps the id it has on main. Problems come by line and column. Checks the source sent, or else the saved draft, or else the file on main. Nothing is saved, and a passing file still meets the full checks of a go-live. Missing settings are not checked here.
34
+ # @param check_logic_input [CheckLogicInput]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(CheckLogicOutput, Integer, Hash)>] CheckLogicOutput data, response status code and response headers
37
+ def check_logic_with_http_info(check_logic_input, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: DefaultApi.check_logic ...'
40
+ end
41
+ # verify the required parameter 'check_logic_input' is set
42
+ if @api_client.config.client_side_validation && check_logic_input.nil?
43
+ fail ArgumentError, "Missing the required parameter 'check_logic_input' when calling DefaultApi.check_logic"
44
+ end
45
+ # resource path
46
+ local_var_path = '/sdk/v1/logic/check'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
55
+ # HTTP header 'Content-Type'
56
+ content_type = @api_client.select_header_content_type(['application/json'])
57
+ if !content_type.nil?
58
+ header_params['Content-Type'] = content_type
59
+ end
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(check_logic_input)
66
+
67
+ # return_type
68
+ return_type = opts[:debug_return_type] || 'CheckLogicOutput'
69
+
70
+ # auth_names
71
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
72
+
73
+ new_options = opts.merge(
74
+ :operation => :"DefaultApi.check_logic",
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => return_type
81
+ )
82
+
83
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: DefaultApi#check_logic\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
90
+ # Connect an end customer with the details they typed
91
+ # For a platform whose connectionType in listPlatforms is fields: send what the end customer typed into your own form, by the field names listPlatforms gives, and the connection is made and tried before the answer comes back, with no page of ours. A platform whose connectionType is oauth is refused naming platform; it connects with a link from createConnectionLink. A field missing, one the platform does not ask for, or a host that is not public is INVALID_INPUT naming the field as fields.<name>, never its value. Details the platform does not accept are CONNECT_LOGIN_REJECTED, and the end customer's earlier connection, if any, is left as it was. A refused attempt keeps nothing, not even a pending connection. It may take up to 25 seconds; after TIMED_OUT, or when your own time limit is shorter, read the connection with getConnection, since it may still have been made. Connecting again replaces the end customer's earlier login. The details are encrypted, never sent readable: a body with fields is refused. The SDKs encrypt them for you. Without an SDK: 1. Read the key with getConnectKey. 2. Make a random 32-byte AES key and a random 12-byte IV. 3. Encrypt the fields object, as JSON text in UTF-8, with AES-256-GCM under that key and IV. The additional authenticated data is the UTF-8 bytes of appnigma-connect-fields-v1, a zero byte, the platform, a zero byte and the endCustomerId, exactly as sent in this body. Put the 16-byte tag after the encrypted bytes: that is ciphertext. 4. Encrypt the AES key with the public key, RSA-OAEP with SHA-256 for both the hash and MGF1: that is wrappedKey. 5. Send keyId as getConnectKey gave it, and wrappedKey, iv and ciphertext as standard base64 with padding. Encrypted for another end customer or platform, or changed on the way, they do not decrypt: INVALID_INPUT naming encryptedFields. CONNECT_KEY_CHANGED means the key was replaced after you read it, and nothing was tried: read getConnectKey again, encrypt again and send once more. INTERNAL_ERROR on this call may come after the details reached the platform, even after the connection was made: read the connection with getConnection first, and send again only if it is not connected.
92
+ # @param connect_end_customer_input [ConnectEndCustomerInput]
93
+ # @param [Hash] opts the optional parameters
94
+ # @return [ConnectEndCustomerOutput]
95
+ def connect_end_customer(connect_end_customer_input, opts = {})
96
+ data, _status_code, _headers = connect_end_customer_with_http_info(connect_end_customer_input, opts)
97
+ data
98
+ end
99
+
100
+ # Connect an end customer with the details they typed
101
+ # For a platform whose connectionType in listPlatforms is fields: send what the end customer typed into your own form, by the field names listPlatforms gives, and the connection is made and tried before the answer comes back, with no page of ours. A platform whose connectionType is oauth is refused naming platform; it connects with a link from createConnectionLink. A field missing, one the platform does not ask for, or a host that is not public is INVALID_INPUT naming the field as fields.&lt;name&gt;, never its value. Details the platform does not accept are CONNECT_LOGIN_REJECTED, and the end customer&#39;s earlier connection, if any, is left as it was. A refused attempt keeps nothing, not even a pending connection. It may take up to 25 seconds; after TIMED_OUT, or when your own time limit is shorter, read the connection with getConnection, since it may still have been made. Connecting again replaces the end customer&#39;s earlier login. The details are encrypted, never sent readable: a body with fields is refused. The SDKs encrypt them for you. Without an SDK: 1. Read the key with getConnectKey. 2. Make a random 32-byte AES key and a random 12-byte IV. 3. Encrypt the fields object, as JSON text in UTF-8, with AES-256-GCM under that key and IV. The additional authenticated data is the UTF-8 bytes of appnigma-connect-fields-v1, a zero byte, the platform, a zero byte and the endCustomerId, exactly as sent in this body. Put the 16-byte tag after the encrypted bytes: that is ciphertext. 4. Encrypt the AES key with the public key, RSA-OAEP with SHA-256 for both the hash and MGF1: that is wrappedKey. 5. Send keyId as getConnectKey gave it, and wrappedKey, iv and ciphertext as standard base64 with padding. Encrypted for another end customer or platform, or changed on the way, they do not decrypt: INVALID_INPUT naming encryptedFields. CONNECT_KEY_CHANGED means the key was replaced after you read it, and nothing was tried: read getConnectKey again, encrypt again and send once more. INTERNAL_ERROR on this call may come after the details reached the platform, even after the connection was made: read the connection with getConnection first, and send again only if it is not connected.
102
+ # @param connect_end_customer_input [ConnectEndCustomerInput]
103
+ # @param [Hash] opts the optional parameters
104
+ # @return [Array<(ConnectEndCustomerOutput, Integer, Hash)>] ConnectEndCustomerOutput data, response status code and response headers
105
+ def connect_end_customer_with_http_info(connect_end_customer_input, opts = {})
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug 'Calling API: DefaultApi.connect_end_customer ...'
108
+ end
109
+ # verify the required parameter 'connect_end_customer_input' is set
110
+ if @api_client.config.client_side_validation && connect_end_customer_input.nil?
111
+ fail ArgumentError, "Missing the required parameter 'connect_end_customer_input' when calling DefaultApi.connect_end_customer"
112
+ end
113
+ # resource path
114
+ local_var_path = '/sdk/v1/connections/connect'
115
+
116
+ # query parameters
117
+ query_params = opts[:query_params] || {}
118
+
119
+ # header parameters
120
+ header_params = opts[:header_params] || {}
121
+ # HTTP header 'Accept' (if needed)
122
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
123
+ # HTTP header 'Content-Type'
124
+ content_type = @api_client.select_header_content_type(['application/json'])
125
+ if !content_type.nil?
126
+ header_params['Content-Type'] = content_type
127
+ end
128
+
129
+ # form parameters
130
+ form_params = opts[:form_params] || {}
131
+
132
+ # http body (model)
133
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(connect_end_customer_input)
134
+
135
+ # return_type
136
+ return_type = opts[:debug_return_type] || 'ConnectEndCustomerOutput'
137
+
138
+ # auth_names
139
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
140
+
141
+ new_options = opts.merge(
142
+ :operation => :"DefaultApi.connect_end_customer",
143
+ :header_params => header_params,
144
+ :query_params => query_params,
145
+ :form_params => form_params,
146
+ :body => post_body,
147
+ :auth_names => auth_names,
148
+ :return_type => return_type
149
+ )
150
+
151
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
152
+ if @api_client.config.debugging
153
+ @api_client.config.logger.debug "API called: DefaultApi#connect_end_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
154
+ end
155
+ return data, status_code, headers
156
+ end
157
+
22
158
  # Make a connect link for an end customer
23
159
  # A link to the connect page for one end customer on one platform. It works once and expires after 15 minutes. When they are done they land on returnUrl with status=connected, or status=failed and a reason. An end customer who is already connected can open a new link to connect again.
24
160
  # @param create_connection_link_input [CreateConnectionLinkInput]
@@ -291,31 +427,31 @@ module Appnigma::Generated
291
427
  return data, status_code, headers
292
428
  end
293
429
 
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]
430
+ # Start a new logic as a draft
431
+ # A new logic from our template, around a crm.* call on an object or an action, kept as a draft on our side; nothing reaches your repo. Without endCustomerId it is your own logic, on a platform switched on for you. With it, that end customer's, on a platform they connected; an end customer's logic can only be changed while you have one end customer, and with the portal switched on.
432
+ # @param create_logic_input [CreateLogicInput]
297
433
  # @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)
434
+ # @return [CreateLogicOutput]
435
+ def create_logic(create_logic_input, opts = {})
436
+ data, _status_code, _headers = create_logic_with_http_info(create_logic_input, opts)
301
437
  data
302
438
  end
303
439
 
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]
440
+ # Start a new logic as a draft
441
+ # A new logic from our template, around a crm.* call on an object or an action, kept as a draft on our side; nothing reaches your repo. Without endCustomerId it is your own logic, on a platform switched on for you. With it, that end customer&#39;s, on a platform they connected; an end customer&#39;s logic can only be changed while you have one end customer, and with the portal switched on.
442
+ # @param create_logic_input [CreateLogicInput]
307
443
  # @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 = {})
444
+ # @return [Array<(CreateLogicOutput, Integer, Hash)>] CreateLogicOutput data, response status code and response headers
445
+ def create_logic_with_http_info(create_logic_input, opts = {})
310
446
  if @api_client.config.debugging
311
- @api_client.config.logger.debug 'Calling API: DefaultApi.create_portal_link ...'
447
+ @api_client.config.logger.debug 'Calling API: DefaultApi.create_logic ...'
312
448
  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"
449
+ # verify the required parameter 'create_logic_input' is set
450
+ if @api_client.config.client_side_validation && create_logic_input.nil?
451
+ fail ArgumentError, "Missing the required parameter 'create_logic_input' when calling DefaultApi.create_logic"
316
452
  end
317
453
  # resource path
318
- local_var_path = '/sdk/v1/portal/link'
454
+ local_var_path = '/sdk/v1/logic/create'
319
455
 
320
456
  # query parameters
321
457
  query_params = opts[:query_params] || {}
@@ -334,16 +470,16 @@ module Appnigma::Generated
334
470
  form_params = opts[:form_params] || {}
335
471
 
336
472
  # http body (model)
337
- post_body = opts[:debug_body] || @api_client.object_to_http_body(create_portal_link_input)
473
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_logic_input)
338
474
 
339
475
  # return_type
340
- return_type = opts[:debug_return_type] || 'CreatePortalLinkOutput'
476
+ return_type = opts[:debug_return_type] || 'CreateLogicOutput'
341
477
 
342
478
  # auth_names
343
479
  auth_names = opts[:debug_auth_names] || ['SdkKey']
344
480
 
345
481
  new_options = opts.merge(
346
- :operation => :"DefaultApi.create_portal_link",
482
+ :operation => :"DefaultApi.create_logic",
347
483
  :header_params => header_params,
348
484
  :query_params => query_params,
349
485
  :form_params => form_params,
@@ -354,36 +490,36 @@ module Appnigma::Generated
354
490
 
355
491
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
356
492
  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}"
493
+ @api_client.config.logger.debug "API called: DefaultApi#create_logic\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
358
494
  end
359
495
  return data, status_code, headers
360
496
  end
361
497
 
362
- # Read whether an end customer is connected
363
- # 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.
364
- # @param get_connection_input [GetConnectionInput]
498
+ # Make a custom logic portal link for an end customer, or for yourself
499
+ # A link that opens the custom logic portal. With an endCustomerId, it is for that end customer, where they see and edit their own logic. With no endCustomerId (left out, or null), it is for you: you see your own logic, and a list of your end customers to open one at a time. 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. An end customer must have a connection: one you disconnected from their last platform, or never connected, answers END_CUSTOMER_NOT_FOUND until they connect again.
500
+ # @param create_portal_link_input [CreatePortalLinkInput]
365
501
  # @param [Hash] opts the optional parameters
366
- # @return [GetConnectionOutput]
367
- def get_connection(get_connection_input, opts = {})
368
- data, _status_code, _headers = get_connection_with_http_info(get_connection_input, opts)
502
+ # @return [CreatePortalLinkOutput]
503
+ def create_portal_link(create_portal_link_input, opts = {})
504
+ data, _status_code, _headers = create_portal_link_with_http_info(create_portal_link_input, opts)
369
505
  data
370
506
  end
371
507
 
372
- # Read whether an end customer is connected
373
- # 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.
374
- # @param get_connection_input [GetConnectionInput]
508
+ # Make a custom logic portal link for an end customer, or for yourself
509
+ # A link that opens the custom logic portal. With an endCustomerId, it is for that end customer, where they see and edit their own logic. With no endCustomerId (left out, or null), it is for you: you see your own logic, and a list of your end customers to open one at a time. 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. An end customer must have a connection: one you disconnected from their last platform, or never connected, answers END_CUSTOMER_NOT_FOUND until they connect again.
510
+ # @param create_portal_link_input [CreatePortalLinkInput]
375
511
  # @param [Hash] opts the optional parameters
376
- # @return [Array<(GetConnectionOutput, Integer, Hash)>] GetConnectionOutput data, response status code and response headers
377
- def get_connection_with_http_info(get_connection_input, opts = {})
512
+ # @return [Array<(CreatePortalLinkOutput, Integer, Hash)>] CreatePortalLinkOutput data, response status code and response headers
513
+ def create_portal_link_with_http_info(create_portal_link_input, opts = {})
378
514
  if @api_client.config.debugging
379
- @api_client.config.logger.debug 'Calling API: DefaultApi.get_connection ...'
515
+ @api_client.config.logger.debug 'Calling API: DefaultApi.create_portal_link ...'
380
516
  end
381
- # verify the required parameter 'get_connection_input' is set
382
- if @api_client.config.client_side_validation && get_connection_input.nil?
383
- fail ArgumentError, "Missing the required parameter 'get_connection_input' when calling DefaultApi.get_connection"
517
+ # verify the required parameter 'create_portal_link_input' is set
518
+ if @api_client.config.client_side_validation && create_portal_link_input.nil?
519
+ fail ArgumentError, "Missing the required parameter 'create_portal_link_input' when calling DefaultApi.create_portal_link"
384
520
  end
385
521
  # resource path
386
- local_var_path = '/sdk/v1/connections/get'
522
+ local_var_path = '/sdk/v1/portal/link'
387
523
 
388
524
  # query parameters
389
525
  query_params = opts[:query_params] || {}
@@ -402,16 +538,16 @@ module Appnigma::Generated
402
538
  form_params = opts[:form_params] || {}
403
539
 
404
540
  # http body (model)
405
- post_body = opts[:debug_body] || @api_client.object_to_http_body(get_connection_input)
541
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_portal_link_input)
406
542
 
407
543
  # return_type
408
- return_type = opts[:debug_return_type] || 'GetConnectionOutput'
544
+ return_type = opts[:debug_return_type] || 'CreatePortalLinkOutput'
409
545
 
410
546
  # auth_names
411
547
  auth_names = opts[:debug_auth_names] || ['SdkKey']
412
548
 
413
549
  new_options = opts.merge(
414
- :operation => :"DefaultApi.get_connection",
550
+ :operation => :"DefaultApi.create_portal_link",
415
551
  :header_params => header_params,
416
552
  :query_params => query_params,
417
553
  :form_params => form_params,
@@ -422,76 +558,64 @@ module Appnigma::Generated
422
558
 
423
559
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
424
560
  if @api_client.config.debugging
425
- @api_client.config.logger.debug "API called: DefaultApi#get_connection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
561
+ @api_client.config.logger.debug "API called: DefaultApi#create_portal_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
426
562
  end
427
563
  return data, status_code, headers
428
564
  end
429
565
 
430
- # Read whether an end customer is connected (older SDKs)
431
- # 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.
432
- # @param end_customer_id [String]
433
- # @param platform [String]
566
+ # Add an address your server is told what happened at
567
+ # From now on, every event whose type is switched on in your alerts is posted to this address as JSON: { id, type, createdAt, data }. Each post carries Appnigma-Event-Id, the event's id, and Appnigma-Signature: t=<unix seconds>,v1=<HMAC-SHA256 of \"<t>.<body>\" with the secret, in hex>. Check the signature on the body exactly as it arrived, refuse an old t, and drop an id you have seen: the same event can arrive more than once. Answer 2xx within 10 seconds; anything else is tried again, 10 tries over about 8 hours. A webhook whose every send failed for 3 days is switched off. HTTPS only; the host must resolve only to public addresses, and a redirect is never followed. At most 5 webhooks. The secret is in this answer only. records.changed is different: while the sync is on, each page of up to 100 changes of one object for one end customer is one post whose data is { endCustomerId, platform, object, changes: [{ recordId, updatedAt, record }] }, record in the crm.* shape. It is posted to every webhook with the type on at once and not tried again: answer 2xx from any one of them and the page is done; when none does, the sync reads those records from the platform again on its next run and posts them again. No record is ever kept, so it is never in listEvents. Apply a change only when its updatedAt is newer than what you hold, and drop one whose recordId and updatedAt you have already applied.
568
+ # @param create_webhook_input [CreateWebhookInput]
434
569
  # @param [Hash] opts the optional parameters
435
- # @return [GetConnectionOutput]
436
- def get_connection_legacy(end_customer_id, platform, opts = {})
437
- data, _status_code, _headers = get_connection_legacy_with_http_info(end_customer_id, platform, opts)
570
+ # @return [CreateWebhookOutput]
571
+ def create_webhook(create_webhook_input, opts = {})
572
+ data, _status_code, _headers = create_webhook_with_http_info(create_webhook_input, opts)
438
573
  data
439
574
  end
440
575
 
441
- # Read whether an end customer is connected (older SDKs)
442
- # 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.
443
- # @param end_customer_id [String]
444
- # @param platform [String]
576
+ # Add an address your server is told what happened at
577
+ # From now on, every event whose type is switched on in your alerts is posted to this address as JSON: { id, type, createdAt, data }. Each post carries Appnigma-Event-Id, the event&#39;s id, and Appnigma-Signature: t&#x3D;&lt;unix seconds&gt;,v1&#x3D;&lt;HMAC-SHA256 of \&quot;&lt;t&gt;.&lt;body&gt;\&quot; with the secret, in hex&gt;. Check the signature on the body exactly as it arrived, refuse an old t, and drop an id you have seen: the same event can arrive more than once. Answer 2xx within 10 seconds; anything else is tried again, 10 tries over about 8 hours. A webhook whose every send failed for 3 days is switched off. HTTPS only; the host must resolve only to public addresses, and a redirect is never followed. At most 5 webhooks. The secret is in this answer only. records.changed is different: while the sync is on, each page of up to 100 changes of one object for one end customer is one post whose data is { endCustomerId, platform, object, changes: [{ recordId, updatedAt, record }] }, record in the crm.* shape. It is posted to every webhook with the type on at once and not tried again: answer 2xx from any one of them and the page is done; when none does, the sync reads those records from the platform again on its next run and posts them again. No record is ever kept, so it is never in listEvents. Apply a change only when its updatedAt is newer than what you hold, and drop one whose recordId and updatedAt you have already applied.
578
+ # @param create_webhook_input [CreateWebhookInput]
445
579
  # @param [Hash] opts the optional parameters
446
- # @return [Array<(GetConnectionOutput, Integer, Hash)>] GetConnectionOutput data, response status code and response headers
447
- def get_connection_legacy_with_http_info(end_customer_id, platform, opts = {})
580
+ # @return [Array<(CreateWebhookOutput, Integer, Hash)>] CreateWebhookOutput data, response status code and response headers
581
+ def create_webhook_with_http_info(create_webhook_input, opts = {})
448
582
  if @api_client.config.debugging
449
- @api_client.config.logger.debug 'Calling API: DefaultApi.get_connection_legacy ...'
450
- end
451
- # verify the required parameter 'end_customer_id' is set
452
- if @api_client.config.client_side_validation && end_customer_id.nil?
453
- fail ArgumentError, "Missing the required parameter 'end_customer_id' when calling DefaultApi.get_connection_legacy"
454
- end
455
- pattern = Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
456
- if @api_client.config.client_side_validation && end_customer_id !~ pattern
457
- fail ArgumentError, "invalid value for 'end_customer_id' when calling DefaultApi.get_connection_legacy, must conform to the pattern #{pattern}."
458
- end
459
-
460
- # verify the required parameter 'platform' is set
461
- if @api_client.config.client_side_validation && platform.nil?
462
- fail ArgumentError, "Missing the required parameter 'platform' when calling DefaultApi.get_connection_legacy"
583
+ @api_client.config.logger.debug 'Calling API: DefaultApi.create_webhook ...'
463
584
  end
464
- pattern = Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
465
- if @api_client.config.client_side_validation && platform !~ pattern
466
- fail ArgumentError, "invalid value for 'platform' when calling DefaultApi.get_connection_legacy, must conform to the pattern #{pattern}."
585
+ # verify the required parameter 'create_webhook_input' is set
586
+ if @api_client.config.client_side_validation && create_webhook_input.nil?
587
+ fail ArgumentError, "Missing the required parameter 'create_webhook_input' when calling DefaultApi.create_webhook"
467
588
  end
468
-
469
589
  # resource path
470
- local_var_path = '/sdk/v1/connections/{endCustomerId}'.sub('{endCustomerId}', CGI.escape(end_customer_id.to_s))
590
+ local_var_path = '/sdk/v1/webhooks/create'
471
591
 
472
592
  # query parameters
473
593
  query_params = opts[:query_params] || {}
474
- query_params[:'platform'] = platform
475
594
 
476
595
  # header parameters
477
596
  header_params = opts[:header_params] || {}
478
597
  # HTTP header 'Accept' (if needed)
479
598
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
599
+ # HTTP header 'Content-Type'
600
+ content_type = @api_client.select_header_content_type(['application/json'])
601
+ if !content_type.nil?
602
+ header_params['Content-Type'] = content_type
603
+ end
480
604
 
481
605
  # form parameters
482
606
  form_params = opts[:form_params] || {}
483
607
 
484
608
  # http body (model)
485
- post_body = opts[:debug_body]
609
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_webhook_input)
486
610
 
487
611
  # return_type
488
- return_type = opts[:debug_return_type] || 'GetConnectionOutput'
612
+ return_type = opts[:debug_return_type] || 'CreateWebhookOutput'
489
613
 
490
614
  # auth_names
491
615
  auth_names = opts[:debug_auth_names] || ['SdkKey']
492
616
 
493
617
  new_options = opts.merge(
494
- :operation => :"DefaultApi.get_connection_legacy",
618
+ :operation => :"DefaultApi.create_webhook",
495
619
  :header_params => header_params,
496
620
  :query_params => query_params,
497
621
  :form_params => form_params,
@@ -500,38 +624,38 @@ module Appnigma::Generated
500
624
  :return_type => return_type
501
625
  )
502
626
 
503
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
627
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
504
628
  if @api_client.config.debugging
505
- @api_client.config.logger.debug "API called: DefaultApi#get_connection_legacy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
629
+ @api_client.config.logger.debug "API called: DefaultApi#create_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
506
630
  end
507
631
  return data, status_code, headers
508
632
  end
509
633
 
510
- # Read one of the companies in one shape
511
- # One of an end customer's companies by its id in the CRM, in the same shape whichever CRM they use.
512
- # @param crm_get_input [CrmGetInput]
634
+ # Remove an end customer
635
+ # When an end customer leaves your product: removes every connection of theirs, each login first and then the connection, then their connect links, settings, drafts, logic switches and portal links, and ends any portal session they have open. The answer says what each connection and each step did. Their folder in your logic repo is yours and is left as it is; the answer names it. If a login cannot be removed just now, or they connect again while this runs, that connection is failed, the row steps are skipped, completed is false and nothing of theirs is lost: call again. Calling again, or naming an end customer the API has nothing for, answers already_gone everywhere, never an error. The id travels in the body because it may be any text.
636
+ # @param delete_end_customer_input [DeleteEndCustomerInput]
513
637
  # @param [Hash] opts the optional parameters
514
- # @return [CrmCompanyGetOutput]
515
- def get_crm_company(crm_get_input, opts = {})
516
- data, _status_code, _headers = get_crm_company_with_http_info(crm_get_input, opts)
638
+ # @return [DeleteEndCustomerOutput]
639
+ def delete_end_customer(delete_end_customer_input, opts = {})
640
+ data, _status_code, _headers = delete_end_customer_with_http_info(delete_end_customer_input, opts)
517
641
  data
518
642
  end
519
643
 
520
- # Read one of the companies in one shape
521
- # One of an end customer&#39;s companies by its id in the CRM, in the same shape whichever CRM they use.
522
- # @param crm_get_input [CrmGetInput]
644
+ # Remove an end customer
645
+ # When an end customer leaves your product: removes every connection of theirs, each login first and then the connection, then their connect links, settings, drafts, logic switches and portal links, and ends any portal session they have open. The answer says what each connection and each step did. Their folder in your logic repo is yours and is left as it is; the answer names it. If a login cannot be removed just now, or they connect again while this runs, that connection is failed, the row steps are skipped, completed is false and nothing of theirs is lost: call again. Calling again, or naming an end customer the API has nothing for, answers already_gone everywhere, never an error. The id travels in the body because it may be any text.
646
+ # @param delete_end_customer_input [DeleteEndCustomerInput]
523
647
  # @param [Hash] opts the optional parameters
524
- # @return [Array<(CrmCompanyGetOutput, Integer, Hash)>] CrmCompanyGetOutput data, response status code and response headers
525
- def get_crm_company_with_http_info(crm_get_input, opts = {})
648
+ # @return [Array<(DeleteEndCustomerOutput, Integer, Hash)>] DeleteEndCustomerOutput data, response status code and response headers
649
+ def delete_end_customer_with_http_info(delete_end_customer_input, opts = {})
526
650
  if @api_client.config.debugging
527
- @api_client.config.logger.debug 'Calling API: DefaultApi.get_crm_company ...'
651
+ @api_client.config.logger.debug 'Calling API: DefaultApi.delete_end_customer ...'
528
652
  end
529
- # verify the required parameter 'crm_get_input' is set
530
- if @api_client.config.client_side_validation && crm_get_input.nil?
531
- fail ArgumentError, "Missing the required parameter 'crm_get_input' when calling DefaultApi.get_crm_company"
653
+ # verify the required parameter 'delete_end_customer_input' is set
654
+ if @api_client.config.client_side_validation && delete_end_customer_input.nil?
655
+ fail ArgumentError, "Missing the required parameter 'delete_end_customer_input' when calling DefaultApi.delete_end_customer"
532
656
  end
533
657
  # resource path
534
- local_var_path = '/sdk/v1/crm/companies/get'
658
+ local_var_path = '/sdk/v1/end-customers/delete'
535
659
 
536
660
  # query parameters
537
661
  query_params = opts[:query_params] || {}
@@ -550,16 +674,16 @@ module Appnigma::Generated
550
674
  form_params = opts[:form_params] || {}
551
675
 
552
676
  # http body (model)
553
- post_body = opts[:debug_body] || @api_client.object_to_http_body(crm_get_input)
677
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(delete_end_customer_input)
554
678
 
555
679
  # return_type
556
- return_type = opts[:debug_return_type] || 'CrmCompanyGetOutput'
680
+ return_type = opts[:debug_return_type] || 'DeleteEndCustomerOutput'
557
681
 
558
682
  # auth_names
559
683
  auth_names = opts[:debug_auth_names] || ['SdkKey']
560
684
 
561
685
  new_options = opts.merge(
562
- :operation => :"DefaultApi.get_crm_company",
686
+ :operation => :"DefaultApi.delete_end_customer",
563
687
  :header_params => header_params,
564
688
  :query_params => query_params,
565
689
  :form_params => form_params,
@@ -570,36 +694,36 @@ module Appnigma::Generated
570
694
 
571
695
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
572
696
  if @api_client.config.debugging
573
- @api_client.config.logger.debug "API called: DefaultApi#get_crm_company\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
697
+ @api_client.config.logger.debug "API called: DefaultApi#delete_end_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
574
698
  end
575
699
  return data, status_code, headers
576
700
  end
577
701
 
578
- # Read one of the contacts in one shape
579
- # One of an end customer's contacts by its id in the CRM, in the same shape whichever CRM they use.
580
- # @param crm_get_input [CrmGetInput]
702
+ # Remove a webhook
703
+ # Nothing more is sent to it, including tries still waiting. Its events stay in listEvents, without its deliveries. To switch a switched-off webhook back on, delete it and create it again, which gives it a new secret.
704
+ # @param delete_webhook_input [DeleteWebhookInput]
581
705
  # @param [Hash] opts the optional parameters
582
- # @return [CrmContactGetOutput]
583
- def get_crm_contact(crm_get_input, opts = {})
584
- data, _status_code, _headers = get_crm_contact_with_http_info(crm_get_input, opts)
706
+ # @return [DeleteWebhookOutput]
707
+ def delete_webhook(delete_webhook_input, opts = {})
708
+ data, _status_code, _headers = delete_webhook_with_http_info(delete_webhook_input, opts)
585
709
  data
586
710
  end
587
711
 
588
- # Read one of the contacts in one shape
589
- # One of an end customer&#39;s contacts by its id in the CRM, in the same shape whichever CRM they use.
590
- # @param crm_get_input [CrmGetInput]
712
+ # Remove a webhook
713
+ # Nothing more is sent to it, including tries still waiting. Its events stay in listEvents, without its deliveries. To switch a switched-off webhook back on, delete it and create it again, which gives it a new secret.
714
+ # @param delete_webhook_input [DeleteWebhookInput]
591
715
  # @param [Hash] opts the optional parameters
592
- # @return [Array<(CrmContactGetOutput, Integer, Hash)>] CrmContactGetOutput data, response status code and response headers
593
- def get_crm_contact_with_http_info(crm_get_input, opts = {})
716
+ # @return [Array<(DeleteWebhookOutput, Integer, Hash)>] DeleteWebhookOutput data, response status code and response headers
717
+ def delete_webhook_with_http_info(delete_webhook_input, opts = {})
594
718
  if @api_client.config.debugging
595
- @api_client.config.logger.debug 'Calling API: DefaultApi.get_crm_contact ...'
719
+ @api_client.config.logger.debug 'Calling API: DefaultApi.delete_webhook ...'
596
720
  end
597
- # verify the required parameter 'crm_get_input' is set
598
- if @api_client.config.client_side_validation && crm_get_input.nil?
599
- fail ArgumentError, "Missing the required parameter 'crm_get_input' when calling DefaultApi.get_crm_contact"
721
+ # verify the required parameter 'delete_webhook_input' is set
722
+ if @api_client.config.client_side_validation && delete_webhook_input.nil?
723
+ fail ArgumentError, "Missing the required parameter 'delete_webhook_input' when calling DefaultApi.delete_webhook"
600
724
  end
601
725
  # resource path
602
- local_var_path = '/sdk/v1/crm/contacts/get'
726
+ local_var_path = '/sdk/v1/webhooks/delete'
603
727
 
604
728
  # query parameters
605
729
  query_params = opts[:query_params] || {}
@@ -618,16 +742,16 @@ module Appnigma::Generated
618
742
  form_params = opts[:form_params] || {}
619
743
 
620
744
  # http body (model)
621
- post_body = opts[:debug_body] || @api_client.object_to_http_body(crm_get_input)
745
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(delete_webhook_input)
622
746
 
623
747
  # return_type
624
- return_type = opts[:debug_return_type] || 'CrmContactGetOutput'
748
+ return_type = opts[:debug_return_type] || 'DeleteWebhookOutput'
625
749
 
626
750
  # auth_names
627
751
  auth_names = opts[:debug_auth_names] || ['SdkKey']
628
752
 
629
753
  new_options = opts.merge(
630
- :operation => :"DefaultApi.get_crm_contact",
754
+ :operation => :"DefaultApi.delete_webhook",
631
755
  :header_params => header_params,
632
756
  :query_params => query_params,
633
757
  :form_params => form_params,
@@ -638,36 +762,36 @@ module Appnigma::Generated
638
762
 
639
763
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
640
764
  if @api_client.config.debugging
641
- @api_client.config.logger.debug "API called: DefaultApi#get_crm_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
765
+ @api_client.config.logger.debug "API called: DefaultApi#delete_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
642
766
  end
643
767
  return data, status_code, headers
644
768
  end
645
769
 
646
- # Read one of the deals in one shape
647
- # One of an end customer's deals by its id in the CRM, in the same shape whichever CRM they use.
648
- # @param crm_get_input [CrmGetInput]
770
+ # Discard a logic's draft
771
+ # Throws the draft away, only on the revision it was made on: a newer save is kept and answered with DRAFT_CHANGED. A logic on main is back to its file; a new logic that was only a draft is gone. A logic with no draft is already discarded. The same rules as createLogic for an end customer's.
772
+ # @param discard_logic_input [DiscardLogicInput]
649
773
  # @param [Hash] opts the optional parameters
650
- # @return [CrmDealGetOutput]
651
- def get_crm_deal(crm_get_input, opts = {})
652
- data, _status_code, _headers = get_crm_deal_with_http_info(crm_get_input, opts)
774
+ # @return [DiscardLogicOutput]
775
+ def discard_logic(discard_logic_input, opts = {})
776
+ data, _status_code, _headers = discard_logic_with_http_info(discard_logic_input, opts)
653
777
  data
654
778
  end
655
779
 
656
- # Read one of the deals in one shape
657
- # One of an end customer&#39;s deals by its id in the CRM, in the same shape whichever CRM they use.
658
- # @param crm_get_input [CrmGetInput]
780
+ # Discard a logic&#39;s draft
781
+ # Throws the draft away, only on the revision it was made on: a newer save is kept and answered with DRAFT_CHANGED. A logic on main is back to its file; a new logic that was only a draft is gone. A logic with no draft is already discarded. The same rules as createLogic for an end customer&#39;s.
782
+ # @param discard_logic_input [DiscardLogicInput]
659
783
  # @param [Hash] opts the optional parameters
660
- # @return [Array<(CrmDealGetOutput, Integer, Hash)>] CrmDealGetOutput data, response status code and response headers
661
- def get_crm_deal_with_http_info(crm_get_input, opts = {})
784
+ # @return [Array<(DiscardLogicOutput, Integer, Hash)>] DiscardLogicOutput data, response status code and response headers
785
+ def discard_logic_with_http_info(discard_logic_input, opts = {})
662
786
  if @api_client.config.debugging
663
- @api_client.config.logger.debug 'Calling API: DefaultApi.get_crm_deal ...'
787
+ @api_client.config.logger.debug 'Calling API: DefaultApi.discard_logic ...'
664
788
  end
665
- # verify the required parameter 'crm_get_input' is set
666
- if @api_client.config.client_side_validation && crm_get_input.nil?
667
- fail ArgumentError, "Missing the required parameter 'crm_get_input' when calling DefaultApi.get_crm_deal"
789
+ # verify the required parameter 'discard_logic_input' is set
790
+ if @api_client.config.client_side_validation && discard_logic_input.nil?
791
+ fail ArgumentError, "Missing the required parameter 'discard_logic_input' when calling DefaultApi.discard_logic"
668
792
  end
669
793
  # resource path
670
- local_var_path = '/sdk/v1/crm/deals/get'
794
+ local_var_path = '/sdk/v1/logic/discard'
671
795
 
672
796
  # query parameters
673
797
  query_params = opts[:query_params] || {}
@@ -686,16 +810,16 @@ module Appnigma::Generated
686
810
  form_params = opts[:form_params] || {}
687
811
 
688
812
  # http body (model)
689
- post_body = opts[:debug_body] || @api_client.object_to_http_body(crm_get_input)
813
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(discard_logic_input)
690
814
 
691
815
  # return_type
692
- return_type = opts[:debug_return_type] || 'CrmDealGetOutput'
816
+ return_type = opts[:debug_return_type] || 'DiscardLogicOutput'
693
817
 
694
818
  # auth_names
695
819
  auth_names = opts[:debug_auth_names] || ['SdkKey']
696
820
 
697
821
  new_options = opts.merge(
698
- :operation => :"DefaultApi.get_crm_deal",
822
+ :operation => :"DefaultApi.discard_logic",
699
823
  :header_params => header_params,
700
824
  :query_params => query_params,
701
825
  :form_params => form_params,
@@ -706,30 +830,36 @@ module Appnigma::Generated
706
830
 
707
831
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
708
832
  if @api_client.config.debugging
709
- @api_client.config.logger.debug "API called: DefaultApi#get_crm_deal\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
833
+ @api_client.config.logger.debug "API called: DefaultApi#discard_logic\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
710
834
  end
711
835
  return data, status_code, headers
712
836
  end
713
837
 
714
- # Read the guide written for your company
715
- # The guide for your developers, as markdown, written for your company from what is live right now. Takes no values; a query value is refused.
838
+ # Disconnect an end customer from a platform
839
+ # 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.
840
+ # @param disconnect_connection_input [DisconnectConnectionInput]
716
841
  # @param [Hash] opts the optional parameters
717
- # @return [GetGuideOutput]
718
- def get_guide(opts = {})
719
- data, _status_code, _headers = get_guide_with_http_info(opts)
842
+ # @return [DisconnectConnectionOutput]
843
+ def disconnect_connection(disconnect_connection_input, opts = {})
844
+ data, _status_code, _headers = disconnect_connection_with_http_info(disconnect_connection_input, opts)
720
845
  data
721
846
  end
722
847
 
723
- # Read the guide written for your company
724
- # The guide for your developers, as markdown, written for your company from what is live right now. Takes no values; a query value is refused.
848
+ # Disconnect an end customer from a platform
849
+ # Removes one end customer&#39;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.
850
+ # @param disconnect_connection_input [DisconnectConnectionInput]
725
851
  # @param [Hash] opts the optional parameters
726
- # @return [Array<(GetGuideOutput, Integer, Hash)>] GetGuideOutput data, response status code and response headers
727
- def get_guide_with_http_info(opts = {})
852
+ # @return [Array<(DisconnectConnectionOutput, Integer, Hash)>] DisconnectConnectionOutput data, response status code and response headers
853
+ def disconnect_connection_with_http_info(disconnect_connection_input, opts = {})
728
854
  if @api_client.config.debugging
729
- @api_client.config.logger.debug 'Calling API: DefaultApi.get_guide ...'
855
+ @api_client.config.logger.debug 'Calling API: DefaultApi.disconnect_connection ...'
856
+ end
857
+ # verify the required parameter 'disconnect_connection_input' is set
858
+ if @api_client.config.client_side_validation && disconnect_connection_input.nil?
859
+ fail ArgumentError, "Missing the required parameter 'disconnect_connection_input' when calling DefaultApi.disconnect_connection"
730
860
  end
731
861
  # resource path
732
- local_var_path = '/sdk/v1/guide'
862
+ local_var_path = '/sdk/v1/connections/disconnect'
733
863
 
734
864
  # query parameters
735
865
  query_params = opts[:query_params] || {}
@@ -738,21 +868,26 @@ module Appnigma::Generated
738
868
  header_params = opts[:header_params] || {}
739
869
  # HTTP header 'Accept' (if needed)
740
870
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
871
+ # HTTP header 'Content-Type'
872
+ content_type = @api_client.select_header_content_type(['application/json'])
873
+ if !content_type.nil?
874
+ header_params['Content-Type'] = content_type
875
+ end
741
876
 
742
877
  # form parameters
743
878
  form_params = opts[:form_params] || {}
744
879
 
745
880
  # http body (model)
746
- post_body = opts[:debug_body]
881
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(disconnect_connection_input)
747
882
 
748
883
  # return_type
749
- return_type = opts[:debug_return_type] || 'GetGuideOutput'
884
+ return_type = opts[:debug_return_type] || 'DisconnectConnectionOutput'
750
885
 
751
886
  # auth_names
752
887
  auth_names = opts[:debug_auth_names] || ['SdkKey']
753
888
 
754
889
  new_options = opts.merge(
755
- :operation => :"DefaultApi.get_guide",
890
+ :operation => :"DefaultApi.disconnect_connection",
756
891
  :header_params => header_params,
757
892
  :query_params => query_params,
758
893
  :form_params => form_params,
@@ -761,43 +896,103 @@ module Appnigma::Generated
761
896
  :return_type => return_type
762
897
  )
763
898
 
764
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
899
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
765
900
  if @api_client.config.debugging
766
- @api_client.config.logger.debug "API called: DefaultApi#get_guide\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
901
+ @api_client.config.logger.debug "API called: DefaultApi#disconnect_connection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
767
902
  end
768
903
  return data, status_code, headers
769
904
  end
770
905
 
771
- # List the ready-made actions
772
- # Every ready-made action on the platforms switched on for your company, with what each takes, answers and needs from the connection. platform narrows the list to one platform.
906
+ # Change a logic's draft from one prompt
907
+ # Say what to change in plain words, and it is written: from the draft, or from the file on main when there is no draft. The result must pass the quick check before it is saved as the draft; when it fails, nothing is saved and the answer says why, with the file that was written. It never goes live: that is still goLiveLogic, by a person. One request and one answer, with no memory of earlier prompts. Send revision to change only the draft you last had. The same rules as createLogic for an end customer's. requestedBy is kept on the call's record. Takes up to a minute or so.
908
+ # @param edit_logic_input [EditLogicInput]
773
909
  # @param [Hash] opts the optional parameters
774
- # @option opts [String] :platform Narrows the list to one platform.
775
- # @return [ListActionsOutput]
776
- def list_actions(opts = {})
777
- data, _status_code, _headers = list_actions_with_http_info(opts)
910
+ # @return [EditLogicOutput]
911
+ def edit_logic(edit_logic_input, opts = {})
912
+ data, _status_code, _headers = edit_logic_with_http_info(edit_logic_input, opts)
778
913
  data
779
914
  end
780
915
 
781
- # List the ready-made actions
782
- # Every ready-made action on the platforms switched on for your company, with what each takes, answers and needs from the connection. platform narrows the list to one platform.
916
+ # Change a logic&#39;s draft from one prompt
917
+ # Say what to change in plain words, and it is written: from the draft, or from the file on main when there is no draft. The result must pass the quick check before it is saved as the draft; when it fails, nothing is saved and the answer says why, with the file that was written. It never goes live: that is still goLiveLogic, by a person. One request and one answer, with no memory of earlier prompts. Send revision to change only the draft you last had. The same rules as createLogic for an end customer&#39;s. requestedBy is kept on the call&#39;s record. Takes up to a minute or so.
918
+ # @param edit_logic_input [EditLogicInput]
783
919
  # @param [Hash] opts the optional parameters
784
- # @option opts [String] :platform Narrows the list to one platform.
785
- # @return [Array<(ListActionsOutput, Integer, Hash)>] ListActionsOutput data, response status code and response headers
786
- def list_actions_with_http_info(opts = {})
920
+ # @return [Array<(EditLogicOutput, Integer, Hash)>] EditLogicOutput data, response status code and response headers
921
+ def edit_logic_with_http_info(edit_logic_input, opts = {})
787
922
  if @api_client.config.debugging
788
- @api_client.config.logger.debug 'Calling API: DefaultApi.list_actions ...'
923
+ @api_client.config.logger.debug 'Calling API: DefaultApi.edit_logic ...'
789
924
  end
790
- pattern = Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
791
- if @api_client.config.client_side_validation && !opts[:'platform'].nil? && opts[:'platform'] !~ pattern
792
- fail ArgumentError, "invalid value for 'opts[:\"platform\"]' when calling DefaultApi.list_actions, must conform to the pattern #{pattern}."
925
+ # verify the required parameter 'edit_logic_input' is set
926
+ if @api_client.config.client_side_validation && edit_logic_input.nil?
927
+ fail ArgumentError, "Missing the required parameter 'edit_logic_input' when calling DefaultApi.edit_logic"
928
+ end
929
+ # resource path
930
+ local_var_path = '/sdk/v1/logic/edit'
931
+
932
+ # query parameters
933
+ query_params = opts[:query_params] || {}
934
+
935
+ # header parameters
936
+ header_params = opts[:header_params] || {}
937
+ # HTTP header 'Accept' (if needed)
938
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
939
+ # HTTP header 'Content-Type'
940
+ content_type = @api_client.select_header_content_type(['application/json'])
941
+ if !content_type.nil?
942
+ header_params['Content-Type'] = content_type
943
+ end
944
+
945
+ # form parameters
946
+ form_params = opts[:form_params] || {}
947
+
948
+ # http body (model)
949
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(edit_logic_input)
950
+
951
+ # return_type
952
+ return_type = opts[:debug_return_type] || 'EditLogicOutput'
953
+
954
+ # auth_names
955
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
956
+
957
+ new_options = opts.merge(
958
+ :operation => :"DefaultApi.edit_logic",
959
+ :header_params => header_params,
960
+ :query_params => query_params,
961
+ :form_params => form_params,
962
+ :body => post_body,
963
+ :auth_names => auth_names,
964
+ :return_type => return_type
965
+ )
966
+
967
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
968
+ if @api_client.config.debugging
969
+ @api_client.config.logger.debug "API called: DefaultApi#edit_logic\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
793
970
  end
971
+ return data, status_code, headers
972
+ end
973
+
974
+ # Read which events are sent to your webhooks
975
+ # The event types switched on. Every type is on until you set them. Takes no values; a query value is refused.
976
+ # @param [Hash] opts the optional parameters
977
+ # @return [GetAlertsOutput]
978
+ def get_alerts(opts = {})
979
+ data, _status_code, _headers = get_alerts_with_http_info(opts)
980
+ data
981
+ end
794
982
 
983
+ # Read which events are sent to your webhooks
984
+ # The event types switched on. Every type is on until you set them. Takes no values; a query value is refused.
985
+ # @param [Hash] opts the optional parameters
986
+ # @return [Array<(GetAlertsOutput, Integer, Hash)>] GetAlertsOutput data, response status code and response headers
987
+ def get_alerts_with_http_info(opts = {})
988
+ if @api_client.config.debugging
989
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_alerts ...'
990
+ end
795
991
  # resource path
796
- local_var_path = '/sdk/v1/actions'
992
+ local_var_path = '/sdk/v1/alerts'
797
993
 
798
994
  # query parameters
799
995
  query_params = opts[:query_params] || {}
800
- query_params[:'platform'] = opts[:'platform'] if !opts[:'platform'].nil?
801
996
 
802
997
  # header parameters
803
998
  header_params = opts[:header_params] || {}
@@ -811,13 +1006,13 @@ module Appnigma::Generated
811
1006
  post_body = opts[:debug_body]
812
1007
 
813
1008
  # return_type
814
- return_type = opts[:debug_return_type] || 'ListActionsOutput'
1009
+ return_type = opts[:debug_return_type] || 'GetAlertsOutput'
815
1010
 
816
1011
  # auth_names
817
1012
  auth_names = opts[:debug_auth_names] || ['SdkKey']
818
1013
 
819
1014
  new_options = opts.merge(
820
- :operation => :"DefaultApi.list_actions",
1015
+ :operation => :"DefaultApi.get_alerts",
821
1016
  :header_params => header_params,
822
1017
  :query_params => query_params,
823
1018
  :form_params => form_params,
@@ -828,90 +1023,189 @@ module Appnigma::Generated
828
1023
 
829
1024
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
830
1025
  if @api_client.config.debugging
831
- @api_client.config.logger.debug "API called: DefaultApi#list_actions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1026
+ @api_client.config.logger.debug "API called: DefaultApi#get_alerts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
832
1027
  end
833
1028
  return data, status_code, headers
834
1029
  end
835
1030
 
836
- # List your end customers
837
- # 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.
1031
+ # Read the key connectEndCustomer's fields are encrypted to
1032
+ # The public key the fields of connectEndCustomer are encrypted to, so they are never readable between your server and ours. The SDKs read it and encrypt for you; call it yourself only when you call the API without one. The same for every company. Takes no values; a query value is refused.
838
1033
  # @param [Hash] opts the optional parameters
839
- # @option opts [String] :platform Lists the end customers with a connection on this platform; it must be switched on for your company.
840
- # @option opts [String] :status Lists the end customers with a connection in this status.
841
- # @option opts [Integer] :limit 1 to 100. Default 50.
842
- # @option opts [String] :cursor The next value from the previous page.
843
- # @return [ListConnectionsOutput]
844
- def list_connections(opts = {})
845
- data, _status_code, _headers = list_connections_with_http_info(opts)
1034
+ # @return [GetConnectKeyOutput]
1035
+ def get_connect_key(opts = {})
1036
+ data, _status_code, _headers = get_connect_key_with_http_info(opts)
846
1037
  data
847
1038
  end
848
1039
 
849
- # List your end customers
850
- # 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.
1040
+ # Read the key connectEndCustomer&#39;s fields are encrypted to
1041
+ # The public key the fields of connectEndCustomer are encrypted to, so they are never readable between your server and ours. The SDKs read it and encrypt for you; call it yourself only when you call the API without one. The same for every company. Takes no values; a query value is refused.
851
1042
  # @param [Hash] opts the optional parameters
852
- # @option opts [String] :platform Lists the end customers with a connection on this platform; it must be switched on for your company.
853
- # @option opts [String] :status Lists the end customers with a connection in this status.
854
- # @option opts [Integer] :limit 1 to 100. Default 50.
855
- # @option opts [String] :cursor The next value from the previous page.
856
- # @return [Array<(ListConnectionsOutput, Integer, Hash)>] ListConnectionsOutput data, response status code and response headers
857
- def list_connections_with_http_info(opts = {})
1043
+ # @return [Array<(GetConnectKeyOutput, Integer, Hash)>] GetConnectKeyOutput data, response status code and response headers
1044
+ def get_connect_key_with_http_info(opts = {})
858
1045
  if @api_client.config.debugging
859
- @api_client.config.logger.debug 'Calling API: DefaultApi.list_connections ...'
1046
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_connect_key ...'
860
1047
  end
861
- pattern = Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
862
- if @api_client.config.client_side_validation && !opts[:'platform'].nil? && opts[:'platform'] !~ pattern
863
- fail ArgumentError, "invalid value for 'opts[:\"platform\"]' when calling DefaultApi.list_connections, must conform to the pattern #{pattern}."
1048
+ # resource path
1049
+ local_var_path = '/sdk/v1/connect-key'
1050
+
1051
+ # query parameters
1052
+ query_params = opts[:query_params] || {}
1053
+
1054
+ # header parameters
1055
+ header_params = opts[:header_params] || {}
1056
+ # HTTP header 'Accept' (if needed)
1057
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1058
+
1059
+ # form parameters
1060
+ form_params = opts[:form_params] || {}
1061
+
1062
+ # http body (model)
1063
+ post_body = opts[:debug_body]
1064
+
1065
+ # return_type
1066
+ return_type = opts[:debug_return_type] || 'GetConnectKeyOutput'
1067
+
1068
+ # auth_names
1069
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
1070
+
1071
+ new_options = opts.merge(
1072
+ :operation => :"DefaultApi.get_connect_key",
1073
+ :header_params => header_params,
1074
+ :query_params => query_params,
1075
+ :form_params => form_params,
1076
+ :body => post_body,
1077
+ :auth_names => auth_names,
1078
+ :return_type => return_type
1079
+ )
1080
+
1081
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1082
+ if @api_client.config.debugging
1083
+ @api_client.config.logger.debug "API called: DefaultApi#get_connect_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
864
1084
  end
1085
+ return data, status_code, headers
1086
+ end
865
1087
 
866
- allowable_values = ["pending", "connected", "needs_reconnect", "disconnected"]
867
- if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
868
- fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
1088
+ # Read whether an end customer is connected
1089
+ # 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. sync says how noticing changes in this account has gone: when it was last read, the last read that failed and why, and whether it has recovered since; null until it has been read once. The id travels in the body because it may be any text.
1090
+ # @param get_connection_input [GetConnectionInput]
1091
+ # @param [Hash] opts the optional parameters
1092
+ # @return [GetConnectionOutput]
1093
+ def get_connection(get_connection_input, opts = {})
1094
+ data, _status_code, _headers = get_connection_with_http_info(get_connection_input, opts)
1095
+ data
1096
+ end
1097
+
1098
+ # Read whether an end customer is connected
1099
+ # 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. sync says how noticing changes in this account has gone: when it was last read, the last read that failed and why, and whether it has recovered since; null until it has been read once. The id travels in the body because it may be any text.
1100
+ # @param get_connection_input [GetConnectionInput]
1101
+ # @param [Hash] opts the optional parameters
1102
+ # @return [Array<(GetConnectionOutput, Integer, Hash)>] GetConnectionOutput data, response status code and response headers
1103
+ def get_connection_with_http_info(get_connection_input, opts = {})
1104
+ if @api_client.config.debugging
1105
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_connection ...'
869
1106
  end
870
- if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
871
- fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DefaultApi.list_connections, must be smaller than or equal to 100.'
1107
+ # verify the required parameter 'get_connection_input' is set
1108
+ if @api_client.config.client_side_validation && get_connection_input.nil?
1109
+ fail ArgumentError, "Missing the required parameter 'get_connection_input' when calling DefaultApi.get_connection"
872
1110
  end
1111
+ # resource path
1112
+ local_var_path = '/sdk/v1/connections/get'
873
1113
 
874
- if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
875
- fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DefaultApi.list_connections, must be greater than or equal to 1.'
876
- end
1114
+ # query parameters
1115
+ query_params = opts[:query_params] || {}
877
1116
 
878
- if @api_client.config.client_side_validation && !opts[:'cursor'].nil? && opts[:'cursor'].to_s.length > 1500
879
- fail ArgumentError, 'invalid value for "opts[:"cursor"]" when calling DefaultApi.list_connections, the character length must be smaller than or equal to 1500.'
1117
+ # header parameters
1118
+ header_params = opts[:header_params] || {}
1119
+ # HTTP header 'Accept' (if needed)
1120
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1121
+ # HTTP header 'Content-Type'
1122
+ content_type = @api_client.select_header_content_type(['application/json'])
1123
+ if !content_type.nil?
1124
+ header_params['Content-Type'] = content_type
880
1125
  end
881
1126
 
882
- if @api_client.config.client_side_validation && !opts[:'cursor'].nil? && opts[:'cursor'].to_s.length < 1
883
- fail ArgumentError, 'invalid value for "opts[:"cursor"]" when calling DefaultApi.list_connections, the character length must be greater than or equal to 1.'
1127
+ # form parameters
1128
+ form_params = opts[:form_params] || {}
1129
+
1130
+ # http body (model)
1131
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(get_connection_input)
1132
+
1133
+ # return_type
1134
+ return_type = opts[:debug_return_type] || 'GetConnectionOutput'
1135
+
1136
+ # auth_names
1137
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
1138
+
1139
+ new_options = opts.merge(
1140
+ :operation => :"DefaultApi.get_connection",
1141
+ :header_params => header_params,
1142
+ :query_params => query_params,
1143
+ :form_params => form_params,
1144
+ :body => post_body,
1145
+ :auth_names => auth_names,
1146
+ :return_type => return_type
1147
+ )
1148
+
1149
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1150
+ if @api_client.config.debugging
1151
+ @api_client.config.logger.debug "API called: DefaultApi#get_connection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
884
1152
  end
1153
+ return data, status_code, headers
1154
+ end
1155
+
1156
+ # Read one of the companies in one shape
1157
+ # One of an end customer's companies by its id in the CRM, in the same shape whichever CRM they use.
1158
+ # @param crm_get_input [CrmGetInput]
1159
+ # @param [Hash] opts the optional parameters
1160
+ # @return [CrmCompanyGetOutput]
1161
+ def get_crm_company(crm_get_input, opts = {})
1162
+ data, _status_code, _headers = get_crm_company_with_http_info(crm_get_input, opts)
1163
+ data
1164
+ end
885
1165
 
1166
+ # Read one of the companies in one shape
1167
+ # One of an end customer&#39;s companies by its id in the CRM, in the same shape whichever CRM they use.
1168
+ # @param crm_get_input [CrmGetInput]
1169
+ # @param [Hash] opts the optional parameters
1170
+ # @return [Array<(CrmCompanyGetOutput, Integer, Hash)>] CrmCompanyGetOutput data, response status code and response headers
1171
+ def get_crm_company_with_http_info(crm_get_input, opts = {})
1172
+ if @api_client.config.debugging
1173
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_crm_company ...'
1174
+ end
1175
+ # verify the required parameter 'crm_get_input' is set
1176
+ if @api_client.config.client_side_validation && crm_get_input.nil?
1177
+ fail ArgumentError, "Missing the required parameter 'crm_get_input' when calling DefaultApi.get_crm_company"
1178
+ end
886
1179
  # resource path
887
- local_var_path = '/sdk/v1/connections'
1180
+ local_var_path = '/sdk/v1/crm/companies/get'
888
1181
 
889
1182
  # query parameters
890
1183
  query_params = opts[:query_params] || {}
891
- query_params[:'platform'] = opts[:'platform'] if !opts[:'platform'].nil?
892
- query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
893
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
894
- query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
895
1184
 
896
1185
  # header parameters
897
1186
  header_params = opts[:header_params] || {}
898
1187
  # HTTP header 'Accept' (if needed)
899
1188
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1189
+ # HTTP header 'Content-Type'
1190
+ content_type = @api_client.select_header_content_type(['application/json'])
1191
+ if !content_type.nil?
1192
+ header_params['Content-Type'] = content_type
1193
+ end
900
1194
 
901
1195
  # form parameters
902
1196
  form_params = opts[:form_params] || {}
903
1197
 
904
1198
  # http body (model)
905
- post_body = opts[:debug_body]
1199
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(crm_get_input)
906
1200
 
907
1201
  # return_type
908
- return_type = opts[:debug_return_type] || 'ListConnectionsOutput'
1202
+ return_type = opts[:debug_return_type] || 'CrmCompanyGetOutput'
909
1203
 
910
1204
  # auth_names
911
1205
  auth_names = opts[:debug_auth_names] || ['SdkKey']
912
1206
 
913
1207
  new_options = opts.merge(
914
- :operation => :"DefaultApi.list_connections",
1208
+ :operation => :"DefaultApi.get_crm_company",
915
1209
  :header_params => header_params,
916
1210
  :query_params => query_params,
917
1211
  :form_params => form_params,
@@ -920,38 +1214,1434 @@ module Appnigma::Generated
920
1214
  :return_type => return_type
921
1215
  )
922
1216
 
923
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1217
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
924
1218
  if @api_client.config.debugging
925
- @api_client.config.logger.debug "API called: DefaultApi#list_connections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1219
+ @api_client.config.logger.debug "API called: DefaultApi#get_crm_company\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
926
1220
  end
927
1221
  return data, status_code, headers
928
1222
  end
929
1223
 
930
- # List companies in one shape
931
- # One page of an end customer's companies, in the same shape whichever CRM they use. Pass next as cursor for the following page.
932
- # @param crm_list_input [CrmListInput]
1224
+ # Read one of the contacts in one shape
1225
+ # One of an end customer's contacts by its id in the CRM, in the same shape whichever CRM they use.
1226
+ # @param crm_get_input [CrmGetInput]
933
1227
  # @param [Hash] opts the optional parameters
934
- # @return [CrmCompanyListOutput]
935
- def list_crm_companies(crm_list_input, opts = {})
936
- data, _status_code, _headers = list_crm_companies_with_http_info(crm_list_input, opts)
1228
+ # @return [CrmContactGetOutput]
1229
+ def get_crm_contact(crm_get_input, opts = {})
1230
+ data, _status_code, _headers = get_crm_contact_with_http_info(crm_get_input, opts)
937
1231
  data
938
1232
  end
939
1233
 
940
- # List companies in one shape
941
- # One page of an end customer&#39;s companies, in the same shape whichever CRM they use. Pass next as cursor for the following page.
942
- # @param crm_list_input [CrmListInput]
1234
+ # Read one of the contacts in one shape
1235
+ # One of an end customer&#39;s contacts by its id in the CRM, in the same shape whichever CRM they use.
1236
+ # @param crm_get_input [CrmGetInput]
943
1237
  # @param [Hash] opts the optional parameters
944
- # @return [Array<(CrmCompanyListOutput, Integer, Hash)>] CrmCompanyListOutput data, response status code and response headers
945
- def list_crm_companies_with_http_info(crm_list_input, opts = {})
1238
+ # @return [Array<(CrmContactGetOutput, Integer, Hash)>] CrmContactGetOutput data, response status code and response headers
1239
+ def get_crm_contact_with_http_info(crm_get_input, opts = {})
946
1240
  if @api_client.config.debugging
947
- @api_client.config.logger.debug 'Calling API: DefaultApi.list_crm_companies ...'
1241
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_crm_contact ...'
948
1242
  end
949
- # verify the required parameter 'crm_list_input' is set
950
- if @api_client.config.client_side_validation && crm_list_input.nil?
951
- fail ArgumentError, "Missing the required parameter 'crm_list_input' when calling DefaultApi.list_crm_companies"
1243
+ # verify the required parameter 'crm_get_input' is set
1244
+ if @api_client.config.client_side_validation && crm_get_input.nil?
1245
+ fail ArgumentError, "Missing the required parameter 'crm_get_input' when calling DefaultApi.get_crm_contact"
1246
+ end
1247
+ # resource path
1248
+ local_var_path = '/sdk/v1/crm/contacts/get'
1249
+
1250
+ # query parameters
1251
+ query_params = opts[:query_params] || {}
1252
+
1253
+ # header parameters
1254
+ header_params = opts[:header_params] || {}
1255
+ # HTTP header 'Accept' (if needed)
1256
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1257
+ # HTTP header 'Content-Type'
1258
+ content_type = @api_client.select_header_content_type(['application/json'])
1259
+ if !content_type.nil?
1260
+ header_params['Content-Type'] = content_type
1261
+ end
1262
+
1263
+ # form parameters
1264
+ form_params = opts[:form_params] || {}
1265
+
1266
+ # http body (model)
1267
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(crm_get_input)
1268
+
1269
+ # return_type
1270
+ return_type = opts[:debug_return_type] || 'CrmContactGetOutput'
1271
+
1272
+ # auth_names
1273
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
1274
+
1275
+ new_options = opts.merge(
1276
+ :operation => :"DefaultApi.get_crm_contact",
1277
+ :header_params => header_params,
1278
+ :query_params => query_params,
1279
+ :form_params => form_params,
1280
+ :body => post_body,
1281
+ :auth_names => auth_names,
1282
+ :return_type => return_type
1283
+ )
1284
+
1285
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1286
+ if @api_client.config.debugging
1287
+ @api_client.config.logger.debug "API called: DefaultApi#get_crm_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1288
+ end
1289
+ return data, status_code, headers
1290
+ end
1291
+
1292
+ # Read one of the deals in one shape
1293
+ # One of an end customer's deals by its id in the CRM, in the same shape whichever CRM they use.
1294
+ # @param crm_get_input [CrmGetInput]
1295
+ # @param [Hash] opts the optional parameters
1296
+ # @return [CrmDealGetOutput]
1297
+ def get_crm_deal(crm_get_input, opts = {})
1298
+ data, _status_code, _headers = get_crm_deal_with_http_info(crm_get_input, opts)
1299
+ data
1300
+ end
1301
+
1302
+ # Read one of the deals in one shape
1303
+ # One of an end customer&#39;s deals by its id in the CRM, in the same shape whichever CRM they use.
1304
+ # @param crm_get_input [CrmGetInput]
1305
+ # @param [Hash] opts the optional parameters
1306
+ # @return [Array<(CrmDealGetOutput, Integer, Hash)>] CrmDealGetOutput data, response status code and response headers
1307
+ def get_crm_deal_with_http_info(crm_get_input, opts = {})
1308
+ if @api_client.config.debugging
1309
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_crm_deal ...'
1310
+ end
1311
+ # verify the required parameter 'crm_get_input' is set
1312
+ if @api_client.config.client_side_validation && crm_get_input.nil?
1313
+ fail ArgumentError, "Missing the required parameter 'crm_get_input' when calling DefaultApi.get_crm_deal"
1314
+ end
1315
+ # resource path
1316
+ local_var_path = '/sdk/v1/crm/deals/get'
1317
+
1318
+ # query parameters
1319
+ query_params = opts[:query_params] || {}
1320
+
1321
+ # header parameters
1322
+ header_params = opts[:header_params] || {}
1323
+ # HTTP header 'Accept' (if needed)
1324
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1325
+ # HTTP header 'Content-Type'
1326
+ content_type = @api_client.select_header_content_type(['application/json'])
1327
+ if !content_type.nil?
1328
+ header_params['Content-Type'] = content_type
1329
+ end
1330
+
1331
+ # form parameters
1332
+ form_params = opts[:form_params] || {}
1333
+
1334
+ # http body (model)
1335
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(crm_get_input)
1336
+
1337
+ # return_type
1338
+ return_type = opts[:debug_return_type] || 'CrmDealGetOutput'
1339
+
1340
+ # auth_names
1341
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
1342
+
1343
+ new_options = opts.merge(
1344
+ :operation => :"DefaultApi.get_crm_deal",
1345
+ :header_params => header_params,
1346
+ :query_params => query_params,
1347
+ :form_params => form_params,
1348
+ :body => post_body,
1349
+ :auth_names => auth_names,
1350
+ :return_type => return_type
1351
+ )
1352
+
1353
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1354
+ if @api_client.config.debugging
1355
+ @api_client.config.logger.debug "API called: DefaultApi#get_crm_deal\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1356
+ end
1357
+ return data, status_code, headers
1358
+ end
1359
+
1360
+ # Read the guide written for your company
1361
+ # The guide for your developers, as markdown, written for your company from what is live right now. Takes no values; a query value is refused.
1362
+ # @param [Hash] opts the optional parameters
1363
+ # @return [GetGuideOutput]
1364
+ def get_guide(opts = {})
1365
+ data, _status_code, _headers = get_guide_with_http_info(opts)
1366
+ data
1367
+ end
1368
+
1369
+ # Read the guide written for your company
1370
+ # The guide for your developers, as markdown, written for your company from what is live right now. Takes no values; a query value is refused.
1371
+ # @param [Hash] opts the optional parameters
1372
+ # @return [Array<(GetGuideOutput, Integer, Hash)>] GetGuideOutput data, response status code and response headers
1373
+ def get_guide_with_http_info(opts = {})
1374
+ if @api_client.config.debugging
1375
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_guide ...'
1376
+ end
1377
+ # resource path
1378
+ local_var_path = '/sdk/v1/guide'
1379
+
1380
+ # query parameters
1381
+ query_params = opts[:query_params] || {}
1382
+
1383
+ # header parameters
1384
+ header_params = opts[:header_params] || {}
1385
+ # HTTP header 'Accept' (if needed)
1386
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1387
+
1388
+ # form parameters
1389
+ form_params = opts[:form_params] || {}
1390
+
1391
+ # http body (model)
1392
+ post_body = opts[:debug_body]
1393
+
1394
+ # return_type
1395
+ return_type = opts[:debug_return_type] || 'GetGuideOutput'
1396
+
1397
+ # auth_names
1398
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
1399
+
1400
+ new_options = opts.merge(
1401
+ :operation => :"DefaultApi.get_guide",
1402
+ :header_params => header_params,
1403
+ :query_params => query_params,
1404
+ :form_params => form_params,
1405
+ :body => post_body,
1406
+ :auth_names => auth_names,
1407
+ :return_type => return_type
1408
+ )
1409
+
1410
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1411
+ if @api_client.config.debugging
1412
+ @api_client.config.logger.debug "API called: DefaultApi#get_guide\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1413
+ end
1414
+ return data, status_code, headers
1415
+ end
1416
+
1417
+ # Read one logic's file and draft
1418
+ # One logic: its file on your repo's main branch, the draft we keep of it, and the logic as listLogic has it. Without endCustomerId it is your own logic; with it, that end customer's. A logic with neither a file nor a draft answers LOGIC_NOT_FOUND.
1419
+ # @param get_logic_input [GetLogicInput]
1420
+ # @param [Hash] opts the optional parameters
1421
+ # @return [GetLogicOutput]
1422
+ def get_logic(get_logic_input, opts = {})
1423
+ data, _status_code, _headers = get_logic_with_http_info(get_logic_input, opts)
1424
+ data
1425
+ end
1426
+
1427
+ # Read one logic&#39;s file and draft
1428
+ # One logic: its file on your repo&#39;s main branch, the draft we keep of it, and the logic as listLogic has it. Without endCustomerId it is your own logic; with it, that end customer&#39;s. A logic with neither a file nor a draft answers LOGIC_NOT_FOUND.
1429
+ # @param get_logic_input [GetLogicInput]
1430
+ # @param [Hash] opts the optional parameters
1431
+ # @return [Array<(GetLogicOutput, Integer, Hash)>] GetLogicOutput data, response status code and response headers
1432
+ def get_logic_with_http_info(get_logic_input, opts = {})
1433
+ if @api_client.config.debugging
1434
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_logic ...'
1435
+ end
1436
+ # verify the required parameter 'get_logic_input' is set
1437
+ if @api_client.config.client_side_validation && get_logic_input.nil?
1438
+ fail ArgumentError, "Missing the required parameter 'get_logic_input' when calling DefaultApi.get_logic"
1439
+ end
1440
+ # resource path
1441
+ local_var_path = '/sdk/v1/logic/get'
1442
+
1443
+ # query parameters
1444
+ query_params = opts[:query_params] || {}
1445
+
1446
+ # header parameters
1447
+ header_params = opts[:header_params] || {}
1448
+ # HTTP header 'Accept' (if needed)
1449
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1450
+ # HTTP header 'Content-Type'
1451
+ content_type = @api_client.select_header_content_type(['application/json'])
1452
+ if !content_type.nil?
1453
+ header_params['Content-Type'] = content_type
1454
+ end
1455
+
1456
+ # form parameters
1457
+ form_params = opts[:form_params] || {}
1458
+
1459
+ # http body (model)
1460
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(get_logic_input)
1461
+
1462
+ # return_type
1463
+ return_type = opts[:debug_return_type] || 'GetLogicOutput'
1464
+
1465
+ # auth_names
1466
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
1467
+
1468
+ new_options = opts.merge(
1469
+ :operation => :"DefaultApi.get_logic",
1470
+ :header_params => header_params,
1471
+ :query_params => query_params,
1472
+ :form_params => form_params,
1473
+ :body => post_body,
1474
+ :auth_names => auth_names,
1475
+ :return_type => return_type
1476
+ )
1477
+
1478
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1479
+ if @api_client.config.debugging
1480
+ @api_client.config.logger.debug "API called: DefaultApi#get_logic\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1481
+ end
1482
+ return data, status_code, headers
1483
+ end
1484
+
1485
+ # Read where a logic's go-live stands
1486
+ # Where the logic's last go-live stands: checking, live with the version, failed with why, or none. The first read that sees it live settles it, and listLogic reads too, so a later read answers none: none and live both carry the version and id live now, so compare the version to tell whether yours went live. Reading changes nothing else.
1487
+ # @param get_logic_go_live_status_input [GetLogicGoLiveStatusInput]
1488
+ # @param [Hash] opts the optional parameters
1489
+ # @return [GetLogicGoLiveStatusOutput]
1490
+ def get_logic_go_live_status(get_logic_go_live_status_input, opts = {})
1491
+ data, _status_code, _headers = get_logic_go_live_status_with_http_info(get_logic_go_live_status_input, opts)
1492
+ data
1493
+ end
1494
+
1495
+ # Read where a logic&#39;s go-live stands
1496
+ # Where the logic&#39;s last go-live stands: checking, live with the version, failed with why, or none. The first read that sees it live settles it, and listLogic reads too, so a later read answers none: none and live both carry the version and id live now, so compare the version to tell whether yours went live. Reading changes nothing else.
1497
+ # @param get_logic_go_live_status_input [GetLogicGoLiveStatusInput]
1498
+ # @param [Hash] opts the optional parameters
1499
+ # @return [Array<(GetLogicGoLiveStatusOutput, Integer, Hash)>] GetLogicGoLiveStatusOutput data, response status code and response headers
1500
+ def get_logic_go_live_status_with_http_info(get_logic_go_live_status_input, opts = {})
1501
+ if @api_client.config.debugging
1502
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_logic_go_live_status ...'
1503
+ end
1504
+ # verify the required parameter 'get_logic_go_live_status_input' is set
1505
+ if @api_client.config.client_side_validation && get_logic_go_live_status_input.nil?
1506
+ fail ArgumentError, "Missing the required parameter 'get_logic_go_live_status_input' when calling DefaultApi.get_logic_go_live_status"
1507
+ end
1508
+ # resource path
1509
+ local_var_path = '/sdk/v1/logic/go-live-status'
1510
+
1511
+ # query parameters
1512
+ query_params = opts[:query_params] || {}
1513
+
1514
+ # header parameters
1515
+ header_params = opts[:header_params] || {}
1516
+ # HTTP header 'Accept' (if needed)
1517
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1518
+ # HTTP header 'Content-Type'
1519
+ content_type = @api_client.select_header_content_type(['application/json'])
1520
+ if !content_type.nil?
1521
+ header_params['Content-Type'] = content_type
1522
+ end
1523
+
1524
+ # form parameters
1525
+ form_params = opts[:form_params] || {}
1526
+
1527
+ # http body (model)
1528
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(get_logic_go_live_status_input)
1529
+
1530
+ # return_type
1531
+ return_type = opts[:debug_return_type] || 'GetLogicGoLiveStatusOutput'
1532
+
1533
+ # auth_names
1534
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
1535
+
1536
+ new_options = opts.merge(
1537
+ :operation => :"DefaultApi.get_logic_go_live_status",
1538
+ :header_params => header_params,
1539
+ :query_params => query_params,
1540
+ :form_params => form_params,
1541
+ :body => post_body,
1542
+ :auth_names => auth_names,
1543
+ :return_type => return_type
1544
+ )
1545
+
1546
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1547
+ if @api_client.config.debugging
1548
+ @api_client.config.logger.debug "API called: DefaultApi#get_logic_go_live_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1549
+ end
1550
+ return data, status_code, headers
1551
+ end
1552
+
1553
+ # Read one platform switched on for you
1554
+ # One platform, exactly as listPlatforms describes it: its name and logo, what we offer on it, and how an end customer connects it. The platform travels in the body like every other single read. One that is not switched on for your company is PLATFORM_NOT_ENABLED; a key that is not a platform is INVALID_INPUT naming platform.
1555
+ # @param get_platform_input [GetPlatformInput]
1556
+ # @param [Hash] opts the optional parameters
1557
+ # @return [GetPlatformOutput]
1558
+ def get_platform(get_platform_input, opts = {})
1559
+ data, _status_code, _headers = get_platform_with_http_info(get_platform_input, opts)
1560
+ data
1561
+ end
1562
+
1563
+ # Read one platform switched on for you
1564
+ # One platform, exactly as listPlatforms describes it: its name and logo, what we offer on it, and how an end customer connects it. The platform travels in the body like every other single read. One that is not switched on for your company is PLATFORM_NOT_ENABLED; a key that is not a platform is INVALID_INPUT naming platform.
1565
+ # @param get_platform_input [GetPlatformInput]
1566
+ # @param [Hash] opts the optional parameters
1567
+ # @return [Array<(GetPlatformOutput, Integer, Hash)>] GetPlatformOutput data, response status code and response headers
1568
+ def get_platform_with_http_info(get_platform_input, opts = {})
1569
+ if @api_client.config.debugging
1570
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_platform ...'
1571
+ end
1572
+ # verify the required parameter 'get_platform_input' is set
1573
+ if @api_client.config.client_side_validation && get_platform_input.nil?
1574
+ fail ArgumentError, "Missing the required parameter 'get_platform_input' when calling DefaultApi.get_platform"
1575
+ end
1576
+ # resource path
1577
+ local_var_path = '/sdk/v1/platforms/get'
1578
+
1579
+ # query parameters
1580
+ query_params = opts[:query_params] || {}
1581
+
1582
+ # header parameters
1583
+ header_params = opts[:header_params] || {}
1584
+ # HTTP header 'Accept' (if needed)
1585
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1586
+ # HTTP header 'Content-Type'
1587
+ content_type = @api_client.select_header_content_type(['application/json'])
1588
+ if !content_type.nil?
1589
+ header_params['Content-Type'] = content_type
1590
+ end
1591
+
1592
+ # form parameters
1593
+ form_params = opts[:form_params] || {}
1594
+
1595
+ # http body (model)
1596
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(get_platform_input)
1597
+
1598
+ # return_type
1599
+ return_type = opts[:debug_return_type] || 'GetPlatformOutput'
1600
+
1601
+ # auth_names
1602
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
1603
+
1604
+ new_options = opts.merge(
1605
+ :operation => :"DefaultApi.get_platform",
1606
+ :header_params => header_params,
1607
+ :query_params => query_params,
1608
+ :form_params => form_params,
1609
+ :body => post_body,
1610
+ :auth_names => auth_names,
1611
+ :return_type => return_type
1612
+ )
1613
+
1614
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1615
+ if @api_client.config.debugging
1616
+ @api_client.config.logger.debug "API called: DefaultApi#get_platform\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1617
+ end
1618
+ return data, status_code, headers
1619
+ end
1620
+
1621
+ # Read whether changes in your end customers' accounts are noticed
1622
+ # Whether the sync is on for your company, and the platforms it reads. Off until you set it. Takes no values; a query value is refused.
1623
+ # @param [Hash] opts the optional parameters
1624
+ # @return [GetSyncOutput]
1625
+ def get_sync(opts = {})
1626
+ data, _status_code, _headers = get_sync_with_http_info(opts)
1627
+ data
1628
+ end
1629
+
1630
+ # Read whether changes in your end customers&#39; accounts are noticed
1631
+ # Whether the sync is on for your company, and the platforms it reads. Off until you set it. Takes no values; a query value is refused.
1632
+ # @param [Hash] opts the optional parameters
1633
+ # @return [Array<(GetSyncOutput, Integer, Hash)>] GetSyncOutput data, response status code and response headers
1634
+ def get_sync_with_http_info(opts = {})
1635
+ if @api_client.config.debugging
1636
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_sync ...'
1637
+ end
1638
+ # resource path
1639
+ local_var_path = '/sdk/v1/sync'
1640
+
1641
+ # query parameters
1642
+ query_params = opts[:query_params] || {}
1643
+
1644
+ # header parameters
1645
+ header_params = opts[:header_params] || {}
1646
+ # HTTP header 'Accept' (if needed)
1647
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1648
+
1649
+ # form parameters
1650
+ form_params = opts[:form_params] || {}
1651
+
1652
+ # http body (model)
1653
+ post_body = opts[:debug_body]
1654
+
1655
+ # return_type
1656
+ return_type = opts[:debug_return_type] || 'GetSyncOutput'
1657
+
1658
+ # auth_names
1659
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
1660
+
1661
+ new_options = opts.merge(
1662
+ :operation => :"DefaultApi.get_sync",
1663
+ :header_params => header_params,
1664
+ :query_params => query_params,
1665
+ :form_params => form_params,
1666
+ :body => post_body,
1667
+ :auth_names => auth_names,
1668
+ :return_type => return_type
1669
+ )
1670
+
1671
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1672
+ if @api_client.config.debugging
1673
+ @api_client.config.logger.debug "API called: DefaultApi#get_sync\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1674
+ end
1675
+ return data, status_code, headers
1676
+ end
1677
+
1678
+ # Put a logic's draft live
1679
+ # Checks the draft at the revision you last had, commits it to your repo's main branch through our GitHub app, and starts the go-live a push gets, which runs the full checks. It answers once committed; follow it with getLogicGoLiveStatus. The file on main must still be the one the draft began from, or it answers FILE_CHANGED unless replaceLatest is sent. An end customer's logic that reads settings they have not set answers SETTINGS_MISSING unless ignoreMissingSettings is sent. Sent once: the client never repeats it on its own. The same rules as createLogic for an end customer's.
1680
+ # @param go_live_logic_input [GoLiveLogicInput]
1681
+ # @param [Hash] opts the optional parameters
1682
+ # @return [GoLiveLogicOutput]
1683
+ def go_live_logic(go_live_logic_input, opts = {})
1684
+ data, _status_code, _headers = go_live_logic_with_http_info(go_live_logic_input, opts)
1685
+ data
1686
+ end
1687
+
1688
+ # Put a logic&#39;s draft live
1689
+ # Checks the draft at the revision you last had, commits it to your repo&#39;s main branch through our GitHub app, and starts the go-live a push gets, which runs the full checks. It answers once committed; follow it with getLogicGoLiveStatus. The file on main must still be the one the draft began from, or it answers FILE_CHANGED unless replaceLatest is sent. An end customer&#39;s logic that reads settings they have not set answers SETTINGS_MISSING unless ignoreMissingSettings is sent. Sent once: the client never repeats it on its own. The same rules as createLogic for an end customer&#39;s.
1690
+ # @param go_live_logic_input [GoLiveLogicInput]
1691
+ # @param [Hash] opts the optional parameters
1692
+ # @return [Array<(GoLiveLogicOutput, Integer, Hash)>] GoLiveLogicOutput data, response status code and response headers
1693
+ def go_live_logic_with_http_info(go_live_logic_input, opts = {})
1694
+ if @api_client.config.debugging
1695
+ @api_client.config.logger.debug 'Calling API: DefaultApi.go_live_logic ...'
1696
+ end
1697
+ # verify the required parameter 'go_live_logic_input' is set
1698
+ if @api_client.config.client_side_validation && go_live_logic_input.nil?
1699
+ fail ArgumentError, "Missing the required parameter 'go_live_logic_input' when calling DefaultApi.go_live_logic"
1700
+ end
1701
+ # resource path
1702
+ local_var_path = '/sdk/v1/logic/go-live'
1703
+
1704
+ # query parameters
1705
+ query_params = opts[:query_params] || {}
1706
+
1707
+ # header parameters
1708
+ header_params = opts[:header_params] || {}
1709
+ # HTTP header 'Accept' (if needed)
1710
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1711
+ # HTTP header 'Content-Type'
1712
+ content_type = @api_client.select_header_content_type(['application/json'])
1713
+ if !content_type.nil?
1714
+ header_params['Content-Type'] = content_type
1715
+ end
1716
+
1717
+ # form parameters
1718
+ form_params = opts[:form_params] || {}
1719
+
1720
+ # http body (model)
1721
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(go_live_logic_input)
1722
+
1723
+ # return_type
1724
+ return_type = opts[:debug_return_type] || 'GoLiveLogicOutput'
1725
+
1726
+ # auth_names
1727
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
1728
+
1729
+ new_options = opts.merge(
1730
+ :operation => :"DefaultApi.go_live_logic",
1731
+ :header_params => header_params,
1732
+ :query_params => query_params,
1733
+ :form_params => form_params,
1734
+ :body => post_body,
1735
+ :auth_names => auth_names,
1736
+ :return_type => return_type
1737
+ )
1738
+
1739
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1740
+ if @api_client.config.debugging
1741
+ @api_client.config.logger.debug "API called: DefaultApi#go_live_logic\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1742
+ end
1743
+ return data, status_code, headers
1744
+ end
1745
+
1746
+ # List the ready-made actions
1747
+ # Every ready-made action on the platforms switched on for your company, with what each takes, answers and needs from the connection. platform narrows the list to one platform.
1748
+ # @param [Hash] opts the optional parameters
1749
+ # @option opts [String] :platform Narrows the list to one platform.
1750
+ # @return [ListActionsOutput]
1751
+ def list_actions(opts = {})
1752
+ data, _status_code, _headers = list_actions_with_http_info(opts)
1753
+ data
1754
+ end
1755
+
1756
+ # List the ready-made actions
1757
+ # Every ready-made action on the platforms switched on for your company, with what each takes, answers and needs from the connection. platform narrows the list to one platform.
1758
+ # @param [Hash] opts the optional parameters
1759
+ # @option opts [String] :platform Narrows the list to one platform.
1760
+ # @return [Array<(ListActionsOutput, Integer, Hash)>] ListActionsOutput data, response status code and response headers
1761
+ def list_actions_with_http_info(opts = {})
1762
+ if @api_client.config.debugging
1763
+ @api_client.config.logger.debug 'Calling API: DefaultApi.list_actions ...'
1764
+ end
1765
+ pattern = Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
1766
+ if @api_client.config.client_side_validation && !opts[:'platform'].nil? && opts[:'platform'] !~ pattern
1767
+ fail ArgumentError, "invalid value for 'opts[:\"platform\"]' when calling DefaultApi.list_actions, must conform to the pattern #{pattern}."
1768
+ end
1769
+
1770
+ # resource path
1771
+ local_var_path = '/sdk/v1/actions'
1772
+
1773
+ # query parameters
1774
+ query_params = opts[:query_params] || {}
1775
+ query_params[:'platform'] = opts[:'platform'] if !opts[:'platform'].nil?
1776
+
1777
+ # header parameters
1778
+ header_params = opts[:header_params] || {}
1779
+ # HTTP header 'Accept' (if needed)
1780
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1781
+
1782
+ # form parameters
1783
+ form_params = opts[:form_params] || {}
1784
+
1785
+ # http body (model)
1786
+ post_body = opts[:debug_body]
1787
+
1788
+ # return_type
1789
+ return_type = opts[:debug_return_type] || 'ListActionsOutput'
1790
+
1791
+ # auth_names
1792
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
1793
+
1794
+ new_options = opts.merge(
1795
+ :operation => :"DefaultApi.list_actions",
1796
+ :header_params => header_params,
1797
+ :query_params => query_params,
1798
+ :form_params => form_params,
1799
+ :body => post_body,
1800
+ :auth_names => auth_names,
1801
+ :return_type => return_type
1802
+ )
1803
+
1804
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1805
+ if @api_client.config.debugging
1806
+ @api_client.config.logger.debug "API called: DefaultApi#list_actions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1807
+ end
1808
+ return data, status_code, headers
1809
+ end
1810
+
1811
+ # List your end customers
1812
+ # 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 logic folder key order: pass next back unchanged as cursor until it is null. A cursor from before 5.0.0 is refused.
1813
+ # @param [Hash] opts the optional parameters
1814
+ # @option opts [String] :platform Lists the end customers with a connection on this platform; it must be switched on for your company.
1815
+ # @option opts [String] :status Lists the end customers with a connection in this status.
1816
+ # @option opts [Integer] :limit 1 to 100. Default 50.
1817
+ # @option opts [String] :cursor The next value from the previous page, exactly as it came. It is opaque: do not read it or build one.
1818
+ # @return [ListConnectionsOutput]
1819
+ def list_connections(opts = {})
1820
+ data, _status_code, _headers = list_connections_with_http_info(opts)
1821
+ data
1822
+ end
1823
+
1824
+ # List your end customers
1825
+ # 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 logic folder key order: pass next back unchanged as cursor until it is null. A cursor from before 5.0.0 is refused.
1826
+ # @param [Hash] opts the optional parameters
1827
+ # @option opts [String] :platform Lists the end customers with a connection on this platform; it must be switched on for your company.
1828
+ # @option opts [String] :status Lists the end customers with a connection in this status.
1829
+ # @option opts [Integer] :limit 1 to 100. Default 50.
1830
+ # @option opts [String] :cursor The next value from the previous page, exactly as it came. It is opaque: do not read it or build one.
1831
+ # @return [Array<(ListConnectionsOutput, Integer, Hash)>] ListConnectionsOutput data, response status code and response headers
1832
+ def list_connections_with_http_info(opts = {})
1833
+ if @api_client.config.debugging
1834
+ @api_client.config.logger.debug 'Calling API: DefaultApi.list_connections ...'
1835
+ end
1836
+ pattern = Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
1837
+ if @api_client.config.client_side_validation && !opts[:'platform'].nil? && opts[:'platform'] !~ pattern
1838
+ fail ArgumentError, "invalid value for 'opts[:\"platform\"]' when calling DefaultApi.list_connections, must conform to the pattern #{pattern}."
1839
+ end
1840
+
1841
+ allowable_values = ["pending", "connected", "needs_reconnect", "disconnected"]
1842
+ if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
1843
+ fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
1844
+ end
1845
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
1846
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DefaultApi.list_connections, must be smaller than or equal to 100.'
1847
+ end
1848
+
1849
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
1850
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling DefaultApi.list_connections, must be greater than or equal to 1.'
1851
+ end
1852
+
1853
+ if @api_client.config.client_side_validation && !opts[:'cursor'].nil? && opts[:'cursor'].to_s.length > 1500
1854
+ fail ArgumentError, 'invalid value for "opts[:"cursor"]" when calling DefaultApi.list_connections, the character length must be smaller than or equal to 1500.'
1855
+ end
1856
+
1857
+ if @api_client.config.client_side_validation && !opts[:'cursor'].nil? && opts[:'cursor'].to_s.length < 1
1858
+ fail ArgumentError, 'invalid value for "opts[:"cursor"]" when calling DefaultApi.list_connections, the character length must be greater than or equal to 1.'
1859
+ end
1860
+
1861
+ # resource path
1862
+ local_var_path = '/sdk/v1/connections'
1863
+
1864
+ # query parameters
1865
+ query_params = opts[:query_params] || {}
1866
+ query_params[:'platform'] = opts[:'platform'] if !opts[:'platform'].nil?
1867
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
1868
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1869
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
1870
+
1871
+ # header parameters
1872
+ header_params = opts[:header_params] || {}
1873
+ # HTTP header 'Accept' (if needed)
1874
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1875
+
1876
+ # form parameters
1877
+ form_params = opts[:form_params] || {}
1878
+
1879
+ # http body (model)
1880
+ post_body = opts[:debug_body]
1881
+
1882
+ # return_type
1883
+ return_type = opts[:debug_return_type] || 'ListConnectionsOutput'
1884
+
1885
+ # auth_names
1886
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
1887
+
1888
+ new_options = opts.merge(
1889
+ :operation => :"DefaultApi.list_connections",
1890
+ :header_params => header_params,
1891
+ :query_params => query_params,
1892
+ :form_params => form_params,
1893
+ :body => post_body,
1894
+ :auth_names => auth_names,
1895
+ :return_type => return_type
1896
+ )
1897
+
1898
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1899
+ if @api_client.config.debugging
1900
+ @api_client.config.logger.debug "API called: DefaultApi#list_connections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1901
+ end
1902
+ return data, status_code, headers
1903
+ end
1904
+
1905
+ # List companies in one shape
1906
+ # One page of an end customer's companies, in the same shape whichever CRM they use. Pass next as cursor for the following page.
1907
+ # @param crm_list_input [CrmListInput]
1908
+ # @param [Hash] opts the optional parameters
1909
+ # @return [CrmCompanyListOutput]
1910
+ def list_crm_companies(crm_list_input, opts = {})
1911
+ data, _status_code, _headers = list_crm_companies_with_http_info(crm_list_input, opts)
1912
+ data
1913
+ end
1914
+
1915
+ # List companies in one shape
1916
+ # One page of an end customer&#39;s companies, in the same shape whichever CRM they use. Pass next as cursor for the following page.
1917
+ # @param crm_list_input [CrmListInput]
1918
+ # @param [Hash] opts the optional parameters
1919
+ # @return [Array<(CrmCompanyListOutput, Integer, Hash)>] CrmCompanyListOutput data, response status code and response headers
1920
+ def list_crm_companies_with_http_info(crm_list_input, opts = {})
1921
+ if @api_client.config.debugging
1922
+ @api_client.config.logger.debug 'Calling API: DefaultApi.list_crm_companies ...'
1923
+ end
1924
+ # verify the required parameter 'crm_list_input' is set
1925
+ if @api_client.config.client_side_validation && crm_list_input.nil?
1926
+ fail ArgumentError, "Missing the required parameter 'crm_list_input' when calling DefaultApi.list_crm_companies"
1927
+ end
1928
+ # resource path
1929
+ local_var_path = '/sdk/v1/crm/companies/list'
1930
+
1931
+ # query parameters
1932
+ query_params = opts[:query_params] || {}
1933
+
1934
+ # header parameters
1935
+ header_params = opts[:header_params] || {}
1936
+ # HTTP header 'Accept' (if needed)
1937
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1938
+ # HTTP header 'Content-Type'
1939
+ content_type = @api_client.select_header_content_type(['application/json'])
1940
+ if !content_type.nil?
1941
+ header_params['Content-Type'] = content_type
1942
+ end
1943
+
1944
+ # form parameters
1945
+ form_params = opts[:form_params] || {}
1946
+
1947
+ # http body (model)
1948
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(crm_list_input)
1949
+
1950
+ # return_type
1951
+ return_type = opts[:debug_return_type] || 'CrmCompanyListOutput'
1952
+
1953
+ # auth_names
1954
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
1955
+
1956
+ new_options = opts.merge(
1957
+ :operation => :"DefaultApi.list_crm_companies",
1958
+ :header_params => header_params,
1959
+ :query_params => query_params,
1960
+ :form_params => form_params,
1961
+ :body => post_body,
1962
+ :auth_names => auth_names,
1963
+ :return_type => return_type
1964
+ )
1965
+
1966
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1967
+ if @api_client.config.debugging
1968
+ @api_client.config.logger.debug "API called: DefaultApi#list_crm_companies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1969
+ end
1970
+ return data, status_code, headers
1971
+ end
1972
+
1973
+ # List contacts in one shape
1974
+ # One page of an end customer's contacts, in the same shape whichever CRM they use. Pass next as cursor for the following page.
1975
+ # @param crm_list_input [CrmListInput]
1976
+ # @param [Hash] opts the optional parameters
1977
+ # @return [CrmContactListOutput]
1978
+ def list_crm_contacts(crm_list_input, opts = {})
1979
+ data, _status_code, _headers = list_crm_contacts_with_http_info(crm_list_input, opts)
1980
+ data
1981
+ end
1982
+
1983
+ # List contacts in one shape
1984
+ # One page of an end customer&#39;s contacts, in the same shape whichever CRM they use. Pass next as cursor for the following page.
1985
+ # @param crm_list_input [CrmListInput]
1986
+ # @param [Hash] opts the optional parameters
1987
+ # @return [Array<(CrmContactListOutput, Integer, Hash)>] CrmContactListOutput data, response status code and response headers
1988
+ def list_crm_contacts_with_http_info(crm_list_input, opts = {})
1989
+ if @api_client.config.debugging
1990
+ @api_client.config.logger.debug 'Calling API: DefaultApi.list_crm_contacts ...'
1991
+ end
1992
+ # verify the required parameter 'crm_list_input' is set
1993
+ if @api_client.config.client_side_validation && crm_list_input.nil?
1994
+ fail ArgumentError, "Missing the required parameter 'crm_list_input' when calling DefaultApi.list_crm_contacts"
1995
+ end
1996
+ # resource path
1997
+ local_var_path = '/sdk/v1/crm/contacts/list'
1998
+
1999
+ # query parameters
2000
+ query_params = opts[:query_params] || {}
2001
+
2002
+ # header parameters
2003
+ header_params = opts[:header_params] || {}
2004
+ # HTTP header 'Accept' (if needed)
2005
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2006
+ # HTTP header 'Content-Type'
2007
+ content_type = @api_client.select_header_content_type(['application/json'])
2008
+ if !content_type.nil?
2009
+ header_params['Content-Type'] = content_type
2010
+ end
2011
+
2012
+ # form parameters
2013
+ form_params = opts[:form_params] || {}
2014
+
2015
+ # http body (model)
2016
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(crm_list_input)
2017
+
2018
+ # return_type
2019
+ return_type = opts[:debug_return_type] || 'CrmContactListOutput'
2020
+
2021
+ # auth_names
2022
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
2023
+
2024
+ new_options = opts.merge(
2025
+ :operation => :"DefaultApi.list_crm_contacts",
2026
+ :header_params => header_params,
2027
+ :query_params => query_params,
2028
+ :form_params => form_params,
2029
+ :body => post_body,
2030
+ :auth_names => auth_names,
2031
+ :return_type => return_type
2032
+ )
2033
+
2034
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2035
+ if @api_client.config.debugging
2036
+ @api_client.config.logger.debug "API called: DefaultApi#list_crm_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2037
+ end
2038
+ return data, status_code, headers
2039
+ end
2040
+
2041
+ # List deals in one shape
2042
+ # One page of an end customer's deals, in the same shape whichever CRM they use. Pass next as cursor for the following page.
2043
+ # @param crm_list_input [CrmListInput]
2044
+ # @param [Hash] opts the optional parameters
2045
+ # @return [CrmDealListOutput]
2046
+ def list_crm_deals(crm_list_input, opts = {})
2047
+ data, _status_code, _headers = list_crm_deals_with_http_info(crm_list_input, opts)
2048
+ data
2049
+ end
2050
+
2051
+ # List deals in one shape
2052
+ # One page of an end customer&#39;s deals, in the same shape whichever CRM they use. Pass next as cursor for the following page.
2053
+ # @param crm_list_input [CrmListInput]
2054
+ # @param [Hash] opts the optional parameters
2055
+ # @return [Array<(CrmDealListOutput, Integer, Hash)>] CrmDealListOutput data, response status code and response headers
2056
+ def list_crm_deals_with_http_info(crm_list_input, opts = {})
2057
+ if @api_client.config.debugging
2058
+ @api_client.config.logger.debug 'Calling API: DefaultApi.list_crm_deals ...'
2059
+ end
2060
+ # verify the required parameter 'crm_list_input' is set
2061
+ if @api_client.config.client_side_validation && crm_list_input.nil?
2062
+ fail ArgumentError, "Missing the required parameter 'crm_list_input' when calling DefaultApi.list_crm_deals"
2063
+ end
2064
+ # resource path
2065
+ local_var_path = '/sdk/v1/crm/deals/list'
2066
+
2067
+ # query parameters
2068
+ query_params = opts[:query_params] || {}
2069
+
2070
+ # header parameters
2071
+ header_params = opts[:header_params] || {}
2072
+ # HTTP header 'Accept' (if needed)
2073
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2074
+ # HTTP header 'Content-Type'
2075
+ content_type = @api_client.select_header_content_type(['application/json'])
2076
+ if !content_type.nil?
2077
+ header_params['Content-Type'] = content_type
2078
+ end
2079
+
2080
+ # form parameters
2081
+ form_params = opts[:form_params] || {}
2082
+
2083
+ # http body (model)
2084
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(crm_list_input)
2085
+
2086
+ # return_type
2087
+ return_type = opts[:debug_return_type] || 'CrmDealListOutput'
2088
+
2089
+ # auth_names
2090
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
2091
+
2092
+ new_options = opts.merge(
2093
+ :operation => :"DefaultApi.list_crm_deals",
2094
+ :header_params => header_params,
2095
+ :query_params => query_params,
2096
+ :form_params => form_params,
2097
+ :body => post_body,
2098
+ :auth_names => auth_names,
2099
+ :return_type => return_type
2100
+ )
2101
+
2102
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2103
+ if @api_client.config.debugging
2104
+ @api_client.config.logger.debug "API called: DefaultApi#list_crm_deals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2105
+ end
2106
+ return data, status_code, headers
2107
+ end
2108
+
2109
+ # List what happened
2110
+ # Your events, newest first, a page at a time, each with how it went at every webhook it was sent to. Every event is kept here for 30 days whatever your alerts say: alerts only choose what is sent. The types: connection.dropped, connection.restored, go_live.finished, go_live.failed, logic.failed. records.changed carries records, which we never keep, so it is sent to your webhooks and never listed here.
2111
+ # @param list_events_input [ListEventsInput]
2112
+ # @param [Hash] opts the optional parameters
2113
+ # @return [ListEventsOutput]
2114
+ def list_events(list_events_input, opts = {})
2115
+ data, _status_code, _headers = list_events_with_http_info(list_events_input, opts)
2116
+ data
2117
+ end
2118
+
2119
+ # List what happened
2120
+ # Your events, newest first, a page at a time, each with how it went at every webhook it was sent to. Every event is kept here for 30 days whatever your alerts say: alerts only choose what is sent. The types: connection.dropped, connection.restored, go_live.finished, go_live.failed, logic.failed. records.changed carries records, which we never keep, so it is sent to your webhooks and never listed here.
2121
+ # @param list_events_input [ListEventsInput]
2122
+ # @param [Hash] opts the optional parameters
2123
+ # @return [Array<(ListEventsOutput, Integer, Hash)>] ListEventsOutput data, response status code and response headers
2124
+ def list_events_with_http_info(list_events_input, opts = {})
2125
+ if @api_client.config.debugging
2126
+ @api_client.config.logger.debug 'Calling API: DefaultApi.list_events ...'
2127
+ end
2128
+ # verify the required parameter 'list_events_input' is set
2129
+ if @api_client.config.client_side_validation && list_events_input.nil?
2130
+ fail ArgumentError, "Missing the required parameter 'list_events_input' when calling DefaultApi.list_events"
2131
+ end
2132
+ # resource path
2133
+ local_var_path = '/sdk/v1/events/list'
2134
+
2135
+ # query parameters
2136
+ query_params = opts[:query_params] || {}
2137
+
2138
+ # header parameters
2139
+ header_params = opts[:header_params] || {}
2140
+ # HTTP header 'Accept' (if needed)
2141
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2142
+ # HTTP header 'Content-Type'
2143
+ content_type = @api_client.select_header_content_type(['application/json'])
2144
+ if !content_type.nil?
2145
+ header_params['Content-Type'] = content_type
2146
+ end
2147
+
2148
+ # form parameters
2149
+ form_params = opts[:form_params] || {}
2150
+
2151
+ # http body (model)
2152
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(list_events_input)
2153
+
2154
+ # return_type
2155
+ return_type = opts[:debug_return_type] || 'ListEventsOutput'
2156
+
2157
+ # auth_names
2158
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
2159
+
2160
+ new_options = opts.merge(
2161
+ :operation => :"DefaultApi.list_events",
2162
+ :header_params => header_params,
2163
+ :query_params => query_params,
2164
+ :form_params => form_params,
2165
+ :body => post_body,
2166
+ :auth_names => auth_names,
2167
+ :return_type => return_type
2168
+ )
2169
+
2170
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2171
+ if @api_client.config.debugging
2172
+ @api_client.config.logger.debug "API called: DefaultApi#list_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2173
+ end
2174
+ return data, status_code, headers
2175
+ end
2176
+
2177
+ # List which features are on for you
2178
+ # Each feature your product can offer its end customers, and whether it is on for your company, so your page can hide what is off: the calls of a feature that is off are refused. portal is the custom logic portal, opened with createPortalLink; sync is noticing changes in end customers' accounts, switched on with setSync. Takes no values; a query value is refused.
2179
+ # @param [Hash] opts the optional parameters
2180
+ # @return [ListFeaturesOutput]
2181
+ def list_features(opts = {})
2182
+ data, _status_code, _headers = list_features_with_http_info(opts)
2183
+ data
2184
+ end
2185
+
2186
+ # List which features are on for you
2187
+ # Each feature your product can offer its end customers, and whether it is on for your company, so your page can hide what is off: the calls of a feature that is off are refused. portal is the custom logic portal, opened with createPortalLink; sync is noticing changes in end customers&#39; accounts, switched on with setSync. Takes no values; a query value is refused.
2188
+ # @param [Hash] opts the optional parameters
2189
+ # @return [Array<(ListFeaturesOutput, Integer, Hash)>] ListFeaturesOutput data, response status code and response headers
2190
+ def list_features_with_http_info(opts = {})
2191
+ if @api_client.config.debugging
2192
+ @api_client.config.logger.debug 'Calling API: DefaultApi.list_features ...'
2193
+ end
2194
+ # resource path
2195
+ local_var_path = '/sdk/v1/features'
2196
+
2197
+ # query parameters
2198
+ query_params = opts[:query_params] || {}
2199
+
2200
+ # header parameters
2201
+ header_params = opts[:header_params] || {}
2202
+ # HTTP header 'Accept' (if needed)
2203
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2204
+
2205
+ # form parameters
2206
+ form_params = opts[:form_params] || {}
2207
+
2208
+ # http body (model)
2209
+ post_body = opts[:debug_body]
2210
+
2211
+ # return_type
2212
+ return_type = opts[:debug_return_type] || 'ListFeaturesOutput'
2213
+
2214
+ # auth_names
2215
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
2216
+
2217
+ new_options = opts.merge(
2218
+ :operation => :"DefaultApi.list_features",
2219
+ :header_params => header_params,
2220
+ :query_params => query_params,
2221
+ :form_params => form_params,
2222
+ :body => post_body,
2223
+ :auth_names => auth_names,
2224
+ :return_type => return_type
2225
+ )
2226
+
2227
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2228
+ if @api_client.config.debugging
2229
+ @api_client.config.logger.debug "API called: DefaultApi#list_features\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2230
+ end
2231
+ return data, status_code, headers
2232
+ end
2233
+
2234
+ # List your own functions
2235
+ # 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.
2236
+ # @param [Hash] opts the optional parameters
2237
+ # @option opts [String] :platform Narrows the list to one platform.
2238
+ # @option opts [String] :end_customer_id Narrows the list to your own functions and this end customer&#39;s. Left out, every end customer&#39;s are listed too.
2239
+ # @return [ListFunctionsOutput]
2240
+ def list_functions(opts = {})
2241
+ data, _status_code, _headers = list_functions_with_http_info(opts)
2242
+ data
2243
+ end
2244
+
2245
+ # List your own functions
2246
+ # 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&#39;s: their versions of yours, which keep your function&#39;s id, and their own.
2247
+ # @param [Hash] opts the optional parameters
2248
+ # @option opts [String] :platform Narrows the list to one platform.
2249
+ # @option opts [String] :end_customer_id Narrows the list to your own functions and this end customer&#39;s. Left out, every end customer&#39;s are listed too.
2250
+ # @return [Array<(ListFunctionsOutput, Integer, Hash)>] ListFunctionsOutput data, response status code and response headers
2251
+ def list_functions_with_http_info(opts = {})
2252
+ if @api_client.config.debugging
2253
+ @api_client.config.logger.debug 'Calling API: DefaultApi.list_functions ...'
2254
+ end
2255
+ pattern = Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
2256
+ if @api_client.config.client_side_validation && !opts[:'platform'].nil? && opts[:'platform'] !~ pattern
2257
+ fail ArgumentError, "invalid value for 'opts[:\"platform\"]' when calling DefaultApi.list_functions, must conform to the pattern #{pattern}."
2258
+ end
2259
+
2260
+ # resource path
2261
+ local_var_path = '/sdk/v1/functions'
2262
+
2263
+ # query parameters
2264
+ query_params = opts[:query_params] || {}
2265
+ query_params[:'platform'] = opts[:'platform'] if !opts[:'platform'].nil?
2266
+ query_params[:'endCustomerId'] = opts[:'end_customer_id'] if !opts[:'end_customer_id'].nil?
2267
+
2268
+ # header parameters
2269
+ header_params = opts[:header_params] || {}
2270
+ # HTTP header 'Accept' (if needed)
2271
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2272
+
2273
+ # form parameters
2274
+ form_params = opts[:form_params] || {}
2275
+
2276
+ # http body (model)
2277
+ post_body = opts[:debug_body]
2278
+
2279
+ # return_type
2280
+ return_type = opts[:debug_return_type] || 'ListFunctionsOutput'
2281
+
2282
+ # auth_names
2283
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
2284
+
2285
+ new_options = opts.merge(
2286
+ :operation => :"DefaultApi.list_functions",
2287
+ :header_params => header_params,
2288
+ :query_params => query_params,
2289
+ :form_params => form_params,
2290
+ :body => post_body,
2291
+ :auth_names => auth_names,
2292
+ :return_type => return_type
2293
+ )
2294
+
2295
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2296
+ if @api_client.config.debugging
2297
+ @api_client.config.logger.debug "API called: DefaultApi#list_functions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2298
+ end
2299
+ return data, status_code, headers
2300
+ end
2301
+
2302
+ # List your logic and your end customers'
2303
+ # Every logic of yours and of each end customer: whose it is, whether it is on, and where it stands: live, failed, a new draft, or a go-live being checked. folderProblems names each end customer whose whole folder was kept at the version before, and why. Send endCustomerId to list one end customer's, or null for your own. Read from what is live and the drafts we keep, never from your repo. A POST, since an end customer id may be any text.
2304
+ # @param list_logic_input [ListLogicInput]
2305
+ # @param [Hash] opts the optional parameters
2306
+ # @return [ListLogicOutput]
2307
+ def list_logic(list_logic_input, opts = {})
2308
+ data, _status_code, _headers = list_logic_with_http_info(list_logic_input, opts)
2309
+ data
2310
+ end
2311
+
2312
+ # List your logic and your end customers&#39;
2313
+ # Every logic of yours and of each end customer: whose it is, whether it is on, and where it stands: live, failed, a new draft, or a go-live being checked. folderProblems names each end customer whose whole folder was kept at the version before, and why. Send endCustomerId to list one end customer&#39;s, or null for your own. Read from what is live and the drafts we keep, never from your repo. A POST, since an end customer id may be any text.
2314
+ # @param list_logic_input [ListLogicInput]
2315
+ # @param [Hash] opts the optional parameters
2316
+ # @return [Array<(ListLogicOutput, Integer, Hash)>] ListLogicOutput data, response status code and response headers
2317
+ def list_logic_with_http_info(list_logic_input, opts = {})
2318
+ if @api_client.config.debugging
2319
+ @api_client.config.logger.debug 'Calling API: DefaultApi.list_logic ...'
2320
+ end
2321
+ # verify the required parameter 'list_logic_input' is set
2322
+ if @api_client.config.client_side_validation && list_logic_input.nil?
2323
+ fail ArgumentError, "Missing the required parameter 'list_logic_input' when calling DefaultApi.list_logic"
2324
+ end
2325
+ # resource path
2326
+ local_var_path = '/sdk/v1/logic/list'
2327
+
2328
+ # query parameters
2329
+ query_params = opts[:query_params] || {}
2330
+
2331
+ # header parameters
2332
+ header_params = opts[:header_params] || {}
2333
+ # HTTP header 'Accept' (if needed)
2334
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2335
+ # HTTP header 'Content-Type'
2336
+ content_type = @api_client.select_header_content_type(['application/json'])
2337
+ if !content_type.nil?
2338
+ header_params['Content-Type'] = content_type
2339
+ end
2340
+
2341
+ # form parameters
2342
+ form_params = opts[:form_params] || {}
2343
+
2344
+ # http body (model)
2345
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(list_logic_input)
2346
+
2347
+ # return_type
2348
+ return_type = opts[:debug_return_type] || 'ListLogicOutput'
2349
+
2350
+ # auth_names
2351
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
2352
+
2353
+ new_options = opts.merge(
2354
+ :operation => :"DefaultApi.list_logic",
2355
+ :header_params => header_params,
2356
+ :query_params => query_params,
2357
+ :form_params => form_params,
2358
+ :body => post_body,
2359
+ :auth_names => auth_names,
2360
+ :return_type => return_type
2361
+ )
2362
+
2363
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2364
+ if @api_client.config.debugging
2365
+ @api_client.config.logger.debug "API called: DefaultApi#list_logic\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2366
+ end
2367
+ return data, status_code, headers
2368
+ end
2369
+
2370
+ # List what an always-on logic did
2371
+ # One row for each time the logic ran around a call, newest first, a page at a time: how it went, by ids and codes only, never the call's data or an error's message. Kept as long as the call log is. Named by the id listLogic gives a live logic.
2372
+ # @param list_logic_runs_input [ListLogicRunsInput]
2373
+ # @param [Hash] opts the optional parameters
2374
+ # @return [ListLogicRunsOutput]
2375
+ def list_logic_runs(list_logic_runs_input, opts = {})
2376
+ data, _status_code, _headers = list_logic_runs_with_http_info(list_logic_runs_input, opts)
2377
+ data
2378
+ end
2379
+
2380
+ # List what an always-on logic did
2381
+ # One row for each time the logic ran around a call, newest first, a page at a time: how it went, by ids and codes only, never the call&#39;s data or an error&#39;s message. Kept as long as the call log is. Named by the id listLogic gives a live logic.
2382
+ # @param list_logic_runs_input [ListLogicRunsInput]
2383
+ # @param [Hash] opts the optional parameters
2384
+ # @return [Array<(ListLogicRunsOutput, Integer, Hash)>] ListLogicRunsOutput data, response status code and response headers
2385
+ def list_logic_runs_with_http_info(list_logic_runs_input, opts = {})
2386
+ if @api_client.config.debugging
2387
+ @api_client.config.logger.debug 'Calling API: DefaultApi.list_logic_runs ...'
2388
+ end
2389
+ # verify the required parameter 'list_logic_runs_input' is set
2390
+ if @api_client.config.client_side_validation && list_logic_runs_input.nil?
2391
+ fail ArgumentError, "Missing the required parameter 'list_logic_runs_input' when calling DefaultApi.list_logic_runs"
2392
+ end
2393
+ # resource path
2394
+ local_var_path = '/sdk/v1/logic/runs'
2395
+
2396
+ # query parameters
2397
+ query_params = opts[:query_params] || {}
2398
+
2399
+ # header parameters
2400
+ header_params = opts[:header_params] || {}
2401
+ # HTTP header 'Accept' (if needed)
2402
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2403
+ # HTTP header 'Content-Type'
2404
+ content_type = @api_client.select_header_content_type(['application/json'])
2405
+ if !content_type.nil?
2406
+ header_params['Content-Type'] = content_type
2407
+ end
2408
+
2409
+ # form parameters
2410
+ form_params = opts[:form_params] || {}
2411
+
2412
+ # http body (model)
2413
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(list_logic_runs_input)
2414
+
2415
+ # return_type
2416
+ return_type = opts[:debug_return_type] || 'ListLogicRunsOutput'
2417
+
2418
+ # auth_names
2419
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
2420
+
2421
+ new_options = opts.merge(
2422
+ :operation => :"DefaultApi.list_logic_runs",
2423
+ :header_params => header_params,
2424
+ :query_params => query_params,
2425
+ :form_params => form_params,
2426
+ :body => post_body,
2427
+ :auth_names => auth_names,
2428
+ :return_type => return_type
2429
+ )
2430
+
2431
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2432
+ if @api_client.config.debugging
2433
+ @api_client.config.logger.debug "API called: DefaultApi#list_logic_runs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2434
+ end
2435
+ return data, status_code, headers
2436
+ end
2437
+
2438
+ # List the platforms switched on for you
2439
+ # Every platform switched on for your company, and what we offer on it: supported (an adapter, so crm.* answers in the shared shapes for what coverage lists), experimental (no adapter: only request() and run, with no support promise), or unknown (we could not check just now; try again shortly). Each also says how an end customer connects it: oauth, on the platform's own screen, or fields, with the details to ask them for, and gives its logo. Takes no values; a query value is refused.
2440
+ # @param [Hash] opts the optional parameters
2441
+ # @return [ListPlatformsOutput]
2442
+ def list_platforms(opts = {})
2443
+ data, _status_code, _headers = list_platforms_with_http_info(opts)
2444
+ data
2445
+ end
2446
+
2447
+ # List the platforms switched on for you
2448
+ # Every platform switched on for your company, and what we offer on it: supported (an adapter, so crm.* answers in the shared shapes for what coverage lists), experimental (no adapter: only request() and run, with no support promise), or unknown (we could not check just now; try again shortly). Each also says how an end customer connects it: oauth, on the platform&#39;s own screen, or fields, with the details to ask them for, and gives its logo. Takes no values; a query value is refused.
2449
+ # @param [Hash] opts the optional parameters
2450
+ # @return [Array<(ListPlatformsOutput, Integer, Hash)>] ListPlatformsOutput data, response status code and response headers
2451
+ def list_platforms_with_http_info(opts = {})
2452
+ if @api_client.config.debugging
2453
+ @api_client.config.logger.debug 'Calling API: DefaultApi.list_platforms ...'
2454
+ end
2455
+ # resource path
2456
+ local_var_path = '/sdk/v1/platforms'
2457
+
2458
+ # query parameters
2459
+ query_params = opts[:query_params] || {}
2460
+
2461
+ # header parameters
2462
+ header_params = opts[:header_params] || {}
2463
+ # HTTP header 'Accept' (if needed)
2464
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2465
+
2466
+ # form parameters
2467
+ form_params = opts[:form_params] || {}
2468
+
2469
+ # http body (model)
2470
+ post_body = opts[:debug_body]
2471
+
2472
+ # return_type
2473
+ return_type = opts[:debug_return_type] || 'ListPlatformsOutput'
2474
+
2475
+ # auth_names
2476
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
2477
+
2478
+ new_options = opts.merge(
2479
+ :operation => :"DefaultApi.list_platforms",
2480
+ :header_params => header_params,
2481
+ :query_params => query_params,
2482
+ :form_params => form_params,
2483
+ :body => post_body,
2484
+ :auth_names => auth_names,
2485
+ :return_type => return_type
2486
+ )
2487
+
2488
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2489
+ if @api_client.config.debugging
2490
+ @api_client.config.logger.debug "API called: DefaultApi#list_platforms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2491
+ end
2492
+ return data, status_code, headers
2493
+ end
2494
+
2495
+ # List an end customer's records changed since a time
2496
+ # The contact, company, deal records of one end customer changed since your own since, read from their account as you ask, a page at a time: the same changes the sync posts to your webhooks as records.changed, for a server that would rather ask. Records your own crm writes changed are left out, and a change your logic on changes failed on is left out of the page. No bookmark is kept for you: keep since yourself, and move it to the latest updatedAt you applied. Pass nextCursor back as cursor with the same since. A change can come more than once; apply one only when its updatedAt is newer than what you hold. Works whether the sync is switched on or off, but needs the feature for your company. A platform that cannot list changes by time is refused naming platform; those that can: hubspot, pipedrive. The reads count against the end customer's own API limits.
2497
+ # @param list_record_changes_input [ListRecordChangesInput]
2498
+ # @param [Hash] opts the optional parameters
2499
+ # @return [ListRecordChangesOutput]
2500
+ def list_record_changes(list_record_changes_input, opts = {})
2501
+ data, _status_code, _headers = list_record_changes_with_http_info(list_record_changes_input, opts)
2502
+ data
2503
+ end
2504
+
2505
+ # List an end customer&#39;s records changed since a time
2506
+ # The contact, company, deal records of one end customer changed since your own since, read from their account as you ask, a page at a time: the same changes the sync posts to your webhooks as records.changed, for a server that would rather ask. Records your own crm writes changed are left out, and a change your logic on changes failed on is left out of the page. No bookmark is kept for you: keep since yourself, and move it to the latest updatedAt you applied. Pass nextCursor back as cursor with the same since. A change can come more than once; apply one only when its updatedAt is newer than what you hold. Works whether the sync is switched on or off, but needs the feature for your company. A platform that cannot list changes by time is refused naming platform; those that can: hubspot, pipedrive. The reads count against the end customer&#39;s own API limits.
2507
+ # @param list_record_changes_input [ListRecordChangesInput]
2508
+ # @param [Hash] opts the optional parameters
2509
+ # @return [Array<(ListRecordChangesOutput, Integer, Hash)>] ListRecordChangesOutput data, response status code and response headers
2510
+ def list_record_changes_with_http_info(list_record_changes_input, opts = {})
2511
+ if @api_client.config.debugging
2512
+ @api_client.config.logger.debug 'Calling API: DefaultApi.list_record_changes ...'
2513
+ end
2514
+ # verify the required parameter 'list_record_changes_input' is set
2515
+ if @api_client.config.client_side_validation && list_record_changes_input.nil?
2516
+ fail ArgumentError, "Missing the required parameter 'list_record_changes_input' when calling DefaultApi.list_record_changes"
2517
+ end
2518
+ # resource path
2519
+ local_var_path = '/sdk/v1/records/changes'
2520
+
2521
+ # query parameters
2522
+ query_params = opts[:query_params] || {}
2523
+
2524
+ # header parameters
2525
+ header_params = opts[:header_params] || {}
2526
+ # HTTP header 'Accept' (if needed)
2527
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2528
+ # HTTP header 'Content-Type'
2529
+ content_type = @api_client.select_header_content_type(['application/json'])
2530
+ if !content_type.nil?
2531
+ header_params['Content-Type'] = content_type
2532
+ end
2533
+
2534
+ # form parameters
2535
+ form_params = opts[:form_params] || {}
2536
+
2537
+ # http body (model)
2538
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(list_record_changes_input)
2539
+
2540
+ # return_type
2541
+ return_type = opts[:debug_return_type] || 'ListRecordChangesOutput'
2542
+
2543
+ # auth_names
2544
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
2545
+
2546
+ new_options = opts.merge(
2547
+ :operation => :"DefaultApi.list_record_changes",
2548
+ :header_params => header_params,
2549
+ :query_params => query_params,
2550
+ :form_params => form_params,
2551
+ :body => post_body,
2552
+ :auth_names => auth_names,
2553
+ :return_type => return_type
2554
+ )
2555
+
2556
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2557
+ if @api_client.config.debugging
2558
+ @api_client.config.logger.debug "API called: DefaultApi#list_record_changes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2559
+ end
2560
+ return data, status_code, headers
2561
+ end
2562
+
2563
+ # List your webhooks
2564
+ # Every address events are sent to, oldest first, with whether it is switched off and when a send to it last got through. Never the secret. Takes no values; a query value is refused.
2565
+ # @param [Hash] opts the optional parameters
2566
+ # @return [ListWebhooksOutput]
2567
+ def list_webhooks(opts = {})
2568
+ data, _status_code, _headers = list_webhooks_with_http_info(opts)
2569
+ data
2570
+ end
2571
+
2572
+ # List your webhooks
2573
+ # Every address events are sent to, oldest first, with whether it is switched off and when a send to it last got through. Never the secret. Takes no values; a query value is refused.
2574
+ # @param [Hash] opts the optional parameters
2575
+ # @return [Array<(ListWebhooksOutput, Integer, Hash)>] ListWebhooksOutput data, response status code and response headers
2576
+ def list_webhooks_with_http_info(opts = {})
2577
+ if @api_client.config.debugging
2578
+ @api_client.config.logger.debug 'Calling API: DefaultApi.list_webhooks ...'
2579
+ end
2580
+ # resource path
2581
+ local_var_path = '/sdk/v1/webhooks'
2582
+
2583
+ # query parameters
2584
+ query_params = opts[:query_params] || {}
2585
+
2586
+ # header parameters
2587
+ header_params = opts[:header_params] || {}
2588
+ # HTTP header 'Accept' (if needed)
2589
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2590
+
2591
+ # form parameters
2592
+ form_params = opts[:form_params] || {}
2593
+
2594
+ # http body (model)
2595
+ post_body = opts[:debug_body]
2596
+
2597
+ # return_type
2598
+ return_type = opts[:debug_return_type] || 'ListWebhooksOutput'
2599
+
2600
+ # auth_names
2601
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
2602
+
2603
+ new_options = opts.merge(
2604
+ :operation => :"DefaultApi.list_webhooks",
2605
+ :header_params => header_params,
2606
+ :query_params => query_params,
2607
+ :form_params => form_params,
2608
+ :body => post_body,
2609
+ :auth_names => auth_names,
2610
+ :return_type => return_type
2611
+ )
2612
+
2613
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2614
+ if @api_client.config.debugging
2615
+ @api_client.config.logger.debug "API called: DefaultApi#list_webhooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2616
+ end
2617
+ return data, status_code, headers
2618
+ end
2619
+
2620
+ # Call anything else on the end customer's platform
2621
+ # Sends one call to the platform's own API with the end customer's login, and answers as the platform answered, refusals included. A GET reads; any other method may change the platform.
2622
+ # @param platform_request_input [PlatformRequestInput]
2623
+ # @param [Hash] opts the optional parameters
2624
+ # @return [PlatformRequestOutput]
2625
+ def platform_request(platform_request_input, opts = {})
2626
+ data, _status_code, _headers = platform_request_with_http_info(platform_request_input, opts)
2627
+ data
2628
+ end
2629
+
2630
+ # Call anything else on the end customer&#39;s platform
2631
+ # Sends one call to the platform&#39;s own API with the end customer&#39;s login, and answers as the platform answered, refusals included. A GET reads; any other method may change the platform.
2632
+ # @param platform_request_input [PlatformRequestInput]
2633
+ # @param [Hash] opts the optional parameters
2634
+ # @return [Array<(PlatformRequestOutput, Integer, Hash)>] PlatformRequestOutput data, response status code and response headers
2635
+ def platform_request_with_http_info(platform_request_input, opts = {})
2636
+ if @api_client.config.debugging
2637
+ @api_client.config.logger.debug 'Calling API: DefaultApi.platform_request ...'
2638
+ end
2639
+ # verify the required parameter 'platform_request_input' is set
2640
+ if @api_client.config.client_side_validation && platform_request_input.nil?
2641
+ fail ArgumentError, "Missing the required parameter 'platform_request_input' when calling DefaultApi.platform_request"
952
2642
  end
953
2643
  # resource path
954
- local_var_path = '/sdk/v1/crm/companies/list'
2644
+ local_var_path = '/sdk/v1/request'
955
2645
 
956
2646
  # query parameters
957
2647
  query_params = opts[:query_params] || {}
@@ -970,16 +2660,16 @@ module Appnigma::Generated
970
2660
  form_params = opts[:form_params] || {}
971
2661
 
972
2662
  # http body (model)
973
- post_body = opts[:debug_body] || @api_client.object_to_http_body(crm_list_input)
2663
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(platform_request_input)
974
2664
 
975
2665
  # return_type
976
- return_type = opts[:debug_return_type] || 'CrmCompanyListOutput'
2666
+ return_type = opts[:debug_return_type] || 'PlatformRequestOutput'
977
2667
 
978
2668
  # auth_names
979
2669
  auth_names = opts[:debug_auth_names] || ['SdkKey']
980
2670
 
981
2671
  new_options = opts.merge(
982
- :operation => :"DefaultApi.list_crm_companies",
2672
+ :operation => :"DefaultApi.platform_request",
983
2673
  :header_params => header_params,
984
2674
  :query_params => query_params,
985
2675
  :form_params => form_params,
@@ -990,36 +2680,36 @@ module Appnigma::Generated
990
2680
 
991
2681
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
992
2682
  if @api_client.config.debugging
993
- @api_client.config.logger.debug "API called: DefaultApi#list_crm_companies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2683
+ @api_client.config.logger.debug "API called: DefaultApi#platform_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
994
2684
  end
995
2685
  return data, status_code, headers
996
2686
  end
997
2687
 
998
- # List contacts in one shape
999
- # One page of an end customer's contacts, in the same shape whichever CRM they use. Pass next as cursor for the following page.
1000
- # @param crm_list_input [CrmListInput]
2688
+ # Run a ready-made action
2689
+ # Runs one ready-made action, by platform and name, on the end customer's account. The input is checked against the action's input schema; an input it refuses is INVALID_INPUT with the problems named.
2690
+ # @param run_action_input [RunActionInput]
1001
2691
  # @param [Hash] opts the optional parameters
1002
- # @return [CrmContactListOutput]
1003
- def list_crm_contacts(crm_list_input, opts = {})
1004
- data, _status_code, _headers = list_crm_contacts_with_http_info(crm_list_input, opts)
2692
+ # @return [RunActionOutput]
2693
+ def run_action(run_action_input, opts = {})
2694
+ data, _status_code, _headers = run_action_with_http_info(run_action_input, opts)
1005
2695
  data
1006
2696
  end
1007
2697
 
1008
- # List contacts in one shape
1009
- # One page of an end customer&#39;s contacts, in the same shape whichever CRM they use. Pass next as cursor for the following page.
1010
- # @param crm_list_input [CrmListInput]
2698
+ # Run a ready-made action
2699
+ # Runs one ready-made action, by platform and name, on the end customer&#39;s account. The input is checked against the action&#39;s input schema; an input it refuses is INVALID_INPUT with the problems named.
2700
+ # @param run_action_input [RunActionInput]
1011
2701
  # @param [Hash] opts the optional parameters
1012
- # @return [Array<(CrmContactListOutput, Integer, Hash)>] CrmContactListOutput data, response status code and response headers
1013
- def list_crm_contacts_with_http_info(crm_list_input, opts = {})
2702
+ # @return [Array<(RunActionOutput, Integer, Hash)>] RunActionOutput data, response status code and response headers
2703
+ def run_action_with_http_info(run_action_input, opts = {})
1014
2704
  if @api_client.config.debugging
1015
- @api_client.config.logger.debug 'Calling API: DefaultApi.list_crm_contacts ...'
2705
+ @api_client.config.logger.debug 'Calling API: DefaultApi.run_action ...'
1016
2706
  end
1017
- # verify the required parameter 'crm_list_input' is set
1018
- if @api_client.config.client_side_validation && crm_list_input.nil?
1019
- fail ArgumentError, "Missing the required parameter 'crm_list_input' when calling DefaultApi.list_crm_contacts"
2707
+ # verify the required parameter 'run_action_input' is set
2708
+ if @api_client.config.client_side_validation && run_action_input.nil?
2709
+ fail ArgumentError, "Missing the required parameter 'run_action_input' when calling DefaultApi.run_action"
1020
2710
  end
1021
2711
  # resource path
1022
- local_var_path = '/sdk/v1/crm/contacts/list'
2712
+ local_var_path = '/sdk/v1/actions/run'
1023
2713
 
1024
2714
  # query parameters
1025
2715
  query_params = opts[:query_params] || {}
@@ -1038,16 +2728,16 @@ module Appnigma::Generated
1038
2728
  form_params = opts[:form_params] || {}
1039
2729
 
1040
2730
  # http body (model)
1041
- post_body = opts[:debug_body] || @api_client.object_to_http_body(crm_list_input)
2731
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(run_action_input)
1042
2732
 
1043
2733
  # return_type
1044
- return_type = opts[:debug_return_type] || 'CrmContactListOutput'
2734
+ return_type = opts[:debug_return_type] || 'RunActionOutput'
1045
2735
 
1046
2736
  # auth_names
1047
2737
  auth_names = opts[:debug_auth_names] || ['SdkKey']
1048
2738
 
1049
2739
  new_options = opts.merge(
1050
- :operation => :"DefaultApi.list_crm_contacts",
2740
+ :operation => :"DefaultApi.run_action",
1051
2741
  :header_params => header_params,
1052
2742
  :query_params => query_params,
1053
2743
  :form_params => form_params,
@@ -1058,36 +2748,36 @@ module Appnigma::Generated
1058
2748
 
1059
2749
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1060
2750
  if @api_client.config.debugging
1061
- @api_client.config.logger.debug "API called: DefaultApi#list_crm_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2751
+ @api_client.config.logger.debug "API called: DefaultApi#run_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1062
2752
  end
1063
2753
  return data, status_code, headers
1064
2754
  end
1065
2755
 
1066
- # List deals in one shape
1067
- # One page of an end customer's deals, in the same shape whichever CRM they use. Pass next as cursor for the following page.
1068
- # @param crm_list_input [CrmListInput]
2756
+ # Run one of your own functions
2757
+ # 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.
2758
+ # @param run_input [RunInput]
1069
2759
  # @param [Hash] opts the optional parameters
1070
- # @return [CrmDealListOutput]
1071
- def list_crm_deals(crm_list_input, opts = {})
1072
- data, _status_code, _headers = list_crm_deals_with_http_info(crm_list_input, opts)
2760
+ # @return [RunOutput]
2761
+ def run_function(run_input, opts = {})
2762
+ data, _status_code, _headers = run_function_with_http_info(run_input, opts)
1073
2763
  data
1074
2764
  end
1075
2765
 
1076
- # List deals in one shape
1077
- # One page of an end customer&#39;s deals, in the same shape whichever CRM they use. Pass next as cursor for the following page.
1078
- # @param crm_list_input [CrmListInput]
2766
+ # Run one of your own functions
2767
+ # Runs one function once on the end customer&#39;s account, by platform and either functionName or functionId, never both. A name finds your own function, and runs the end customer&#39;s version of it instead when they have one. An id, from listFunctions, finds the end customer&#39;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.
2768
+ # @param run_input [RunInput]
1079
2769
  # @param [Hash] opts the optional parameters
1080
- # @return [Array<(CrmDealListOutput, Integer, Hash)>] CrmDealListOutput data, response status code and response headers
1081
- def list_crm_deals_with_http_info(crm_list_input, opts = {})
2770
+ # @return [Array<(RunOutput, Integer, Hash)>] RunOutput data, response status code and response headers
2771
+ def run_function_with_http_info(run_input, opts = {})
1082
2772
  if @api_client.config.debugging
1083
- @api_client.config.logger.debug 'Calling API: DefaultApi.list_crm_deals ...'
2773
+ @api_client.config.logger.debug 'Calling API: DefaultApi.run_function ...'
1084
2774
  end
1085
- # verify the required parameter 'crm_list_input' is set
1086
- if @api_client.config.client_side_validation && crm_list_input.nil?
1087
- fail ArgumentError, "Missing the required parameter 'crm_list_input' when calling DefaultApi.list_crm_deals"
2775
+ # verify the required parameter 'run_input' is set
2776
+ if @api_client.config.client_side_validation && run_input.nil?
2777
+ fail ArgumentError, "Missing the required parameter 'run_input' when calling DefaultApi.run_function"
1088
2778
  end
1089
2779
  # resource path
1090
- local_var_path = '/sdk/v1/crm/deals/list'
2780
+ local_var_path = '/sdk/v1/run'
1091
2781
 
1092
2782
  # query parameters
1093
2783
  query_params = opts[:query_params] || {}
@@ -1106,16 +2796,16 @@ module Appnigma::Generated
1106
2796
  form_params = opts[:form_params] || {}
1107
2797
 
1108
2798
  # http body (model)
1109
- post_body = opts[:debug_body] || @api_client.object_to_http_body(crm_list_input)
2799
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(run_input)
1110
2800
 
1111
2801
  # return_type
1112
- return_type = opts[:debug_return_type] || 'CrmDealListOutput'
2802
+ return_type = opts[:debug_return_type] || 'RunOutput'
1113
2803
 
1114
2804
  # auth_names
1115
2805
  auth_names = opts[:debug_auth_names] || ['SdkKey']
1116
2806
 
1117
2807
  new_options = opts.merge(
1118
- :operation => :"DefaultApi.list_crm_deals",
2808
+ :operation => :"DefaultApi.run_function",
1119
2809
  :header_params => header_params,
1120
2810
  :query_params => query_params,
1121
2811
  :form_params => form_params,
@@ -1126,64 +2816,64 @@ module Appnigma::Generated
1126
2816
 
1127
2817
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1128
2818
  if @api_client.config.debugging
1129
- @api_client.config.logger.debug "API called: DefaultApi#list_crm_deals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2819
+ @api_client.config.logger.debug "API called: DefaultApi#run_function\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1130
2820
  end
1131
2821
  return data, status_code, headers
1132
2822
  end
1133
2823
 
1134
- # List your own functions
1135
- # 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.
2824
+ # Choose which events are sent to your webhooks
2825
+ # Replaces the list: a type left out is no longer sent, though it is still in listEvents. An empty list sends nothing. Applies to events from now on; tries already waiting carry on.
2826
+ # @param set_alerts_input [SetAlertsInput]
1136
2827
  # @param [Hash] opts the optional parameters
1137
- # @option opts [String] :platform Narrows the list to one platform.
1138
- # @option opts [String] :end_customer_id Narrows the list to your own functions and this end customer&#39;s. Left out, every end customer&#39;s are listed too.
1139
- # @return [ListFunctionsOutput]
1140
- def list_functions(opts = {})
1141
- data, _status_code, _headers = list_functions_with_http_info(opts)
2828
+ # @return [SetAlertsOutput]
2829
+ def set_alerts(set_alerts_input, opts = {})
2830
+ data, _status_code, _headers = set_alerts_with_http_info(set_alerts_input, opts)
1142
2831
  data
1143
2832
  end
1144
2833
 
1145
- # List your own functions
1146
- # 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&#39;s: their versions of yours, which keep your function&#39;s id, and their own.
2834
+ # Choose which events are sent to your webhooks
2835
+ # Replaces the list: a type left out is no longer sent, though it is still in listEvents. An empty list sends nothing. Applies to events from now on; tries already waiting carry on.
2836
+ # @param set_alerts_input [SetAlertsInput]
1147
2837
  # @param [Hash] opts the optional parameters
1148
- # @option opts [String] :platform Narrows the list to one platform.
1149
- # @option opts [String] :end_customer_id Narrows the list to your own functions and this end customer&#39;s. Left out, every end customer&#39;s are listed too.
1150
- # @return [Array<(ListFunctionsOutput, Integer, Hash)>] ListFunctionsOutput data, response status code and response headers
1151
- def list_functions_with_http_info(opts = {})
2838
+ # @return [Array<(SetAlertsOutput, Integer, Hash)>] SetAlertsOutput data, response status code and response headers
2839
+ def set_alerts_with_http_info(set_alerts_input, opts = {})
1152
2840
  if @api_client.config.debugging
1153
- @api_client.config.logger.debug 'Calling API: DefaultApi.list_functions ...'
2841
+ @api_client.config.logger.debug 'Calling API: DefaultApi.set_alerts ...'
1154
2842
  end
1155
- pattern = Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
1156
- if @api_client.config.client_side_validation && !opts[:'platform'].nil? && opts[:'platform'] !~ pattern
1157
- fail ArgumentError, "invalid value for 'opts[:\"platform\"]' when calling DefaultApi.list_functions, must conform to the pattern #{pattern}."
2843
+ # verify the required parameter 'set_alerts_input' is set
2844
+ if @api_client.config.client_side_validation && set_alerts_input.nil?
2845
+ fail ArgumentError, "Missing the required parameter 'set_alerts_input' when calling DefaultApi.set_alerts"
1158
2846
  end
1159
-
1160
2847
  # resource path
1161
- local_var_path = '/sdk/v1/functions'
2848
+ local_var_path = '/sdk/v1/alerts/set'
1162
2849
 
1163
2850
  # query parameters
1164
2851
  query_params = opts[:query_params] || {}
1165
- query_params[:'platform'] = opts[:'platform'] if !opts[:'platform'].nil?
1166
- query_params[:'endCustomerId'] = opts[:'end_customer_id'] if !opts[:'end_customer_id'].nil?
1167
2852
 
1168
2853
  # header parameters
1169
2854
  header_params = opts[:header_params] || {}
1170
2855
  # HTTP header 'Accept' (if needed)
1171
2856
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2857
+ # HTTP header 'Content-Type'
2858
+ content_type = @api_client.select_header_content_type(['application/json'])
2859
+ if !content_type.nil?
2860
+ header_params['Content-Type'] = content_type
2861
+ end
1172
2862
 
1173
2863
  # form parameters
1174
2864
  form_params = opts[:form_params] || {}
1175
2865
 
1176
2866
  # http body (model)
1177
- post_body = opts[:debug_body]
2867
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(set_alerts_input)
1178
2868
 
1179
2869
  # return_type
1180
- return_type = opts[:debug_return_type] || 'ListFunctionsOutput'
2870
+ return_type = opts[:debug_return_type] || 'SetAlertsOutput'
1181
2871
 
1182
2872
  # auth_names
1183
2873
  auth_names = opts[:debug_auth_names] || ['SdkKey']
1184
2874
 
1185
2875
  new_options = opts.merge(
1186
- :operation => :"DefaultApi.list_functions",
2876
+ :operation => :"DefaultApi.set_alerts",
1187
2877
  :header_params => header_params,
1188
2878
  :query_params => query_params,
1189
2879
  :form_params => form_params,
@@ -1192,32 +2882,38 @@ module Appnigma::Generated
1192
2882
  :return_type => return_type
1193
2883
  )
1194
2884
 
1195
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2885
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1196
2886
  if @api_client.config.debugging
1197
- @api_client.config.logger.debug "API called: DefaultApi#list_functions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2887
+ @api_client.config.logger.debug "API called: DefaultApi#set_alerts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1198
2888
  end
1199
2889
  return data, status_code, headers
1200
2890
  end
1201
2891
 
1202
- # List the platforms switched on for you
1203
- # Every platform switched on for your company, and what we offer on it: supported (an adapter, so crm.* answers in the shared shapes for what coverage lists), experimental (no adapter: only request() and run, with no support promise), or unknown (we could not check just now; try again shortly). Takes no values; a query value is refused.
2892
+ # Switch noticing changes in your end customers' accounts on or off
2893
+ # On: every 5 minutes, each connected hubspot and pipedrive account is asked for the contacts, companies and deals changed since the last read, from the moment it is first read. Records your own crm writes changed are left out. No record is kept, only how far each account has been read. The reads count against each end customer's own API limits. Off: reading stops; switching on again carries on from where it stopped. Switching on while the feature is off for your company is refused.
2894
+ # @param set_sync_input [SetSyncInput]
1204
2895
  # @param [Hash] opts the optional parameters
1205
- # @return [ListPlatformsOutput]
1206
- def list_platforms(opts = {})
1207
- data, _status_code, _headers = list_platforms_with_http_info(opts)
2896
+ # @return [SetSyncOutput]
2897
+ def set_sync(set_sync_input, opts = {})
2898
+ data, _status_code, _headers = set_sync_with_http_info(set_sync_input, opts)
1208
2899
  data
1209
2900
  end
1210
2901
 
1211
- # List the platforms switched on for you
1212
- # Every platform switched on for your company, and what we offer on it: supported (an adapter, so crm.* answers in the shared shapes for what coverage lists), experimental (no adapter: only request() and run, with no support promise), or unknown (we could not check just now; try again shortly). Takes no values; a query value is refused.
2902
+ # Switch noticing changes in your end customers&#39; accounts on or off
2903
+ # On: every 5 minutes, each connected hubspot and pipedrive account is asked for the contacts, companies and deals changed since the last read, from the moment it is first read. Records your own crm writes changed are left out. No record is kept, only how far each account has been read. The reads count against each end customer&#39;s own API limits. Off: reading stops; switching on again carries on from where it stopped. Switching on while the feature is off for your company is refused.
2904
+ # @param set_sync_input [SetSyncInput]
1213
2905
  # @param [Hash] opts the optional parameters
1214
- # @return [Array<(ListPlatformsOutput, Integer, Hash)>] ListPlatformsOutput data, response status code and response headers
1215
- def list_platforms_with_http_info(opts = {})
2906
+ # @return [Array<(SetSyncOutput, Integer, Hash)>] SetSyncOutput data, response status code and response headers
2907
+ def set_sync_with_http_info(set_sync_input, opts = {})
1216
2908
  if @api_client.config.debugging
1217
- @api_client.config.logger.debug 'Calling API: DefaultApi.list_platforms ...'
2909
+ @api_client.config.logger.debug 'Calling API: DefaultApi.set_sync ...'
2910
+ end
2911
+ # verify the required parameter 'set_sync_input' is set
2912
+ if @api_client.config.client_side_validation && set_sync_input.nil?
2913
+ fail ArgumentError, "Missing the required parameter 'set_sync_input' when calling DefaultApi.set_sync"
1218
2914
  end
1219
2915
  # resource path
1220
- local_var_path = '/sdk/v1/platforms'
2916
+ local_var_path = '/sdk/v1/sync/set'
1221
2917
 
1222
2918
  # query parameters
1223
2919
  query_params = opts[:query_params] || {}
@@ -1226,21 +2922,26 @@ module Appnigma::Generated
1226
2922
  header_params = opts[:header_params] || {}
1227
2923
  # HTTP header 'Accept' (if needed)
1228
2924
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
2925
+ # HTTP header 'Content-Type'
2926
+ content_type = @api_client.select_header_content_type(['application/json'])
2927
+ if !content_type.nil?
2928
+ header_params['Content-Type'] = content_type
2929
+ end
1229
2930
 
1230
2931
  # form parameters
1231
2932
  form_params = opts[:form_params] || {}
1232
2933
 
1233
2934
  # http body (model)
1234
- post_body = opts[:debug_body]
2935
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(set_sync_input)
1235
2936
 
1236
2937
  # return_type
1237
- return_type = opts[:debug_return_type] || 'ListPlatformsOutput'
2938
+ return_type = opts[:debug_return_type] || 'SetSyncOutput'
1238
2939
 
1239
2940
  # auth_names
1240
2941
  auth_names = opts[:debug_auth_names] || ['SdkKey']
1241
2942
 
1242
2943
  new_options = opts.merge(
1243
- :operation => :"DefaultApi.list_platforms",
2944
+ :operation => :"DefaultApi.set_sync",
1244
2945
  :header_params => header_params,
1245
2946
  :query_params => query_params,
1246
2947
  :form_params => form_params,
@@ -1249,38 +2950,38 @@ module Appnigma::Generated
1249
2950
  :return_type => return_type
1250
2951
  )
1251
2952
 
1252
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2953
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1253
2954
  if @api_client.config.debugging
1254
- @api_client.config.logger.debug "API called: DefaultApi#list_platforms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2955
+ @api_client.config.logger.debug "API called: DefaultApi#set_sync\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1255
2956
  end
1256
2957
  return data, status_code, headers
1257
2958
  end
1258
2959
 
1259
- # Call anything else on the end customer's platform
1260
- # Sends one call to the platform's own API with the end customer's login, and answers as the platform answered, refusals included. A GET reads; any other method may change the platform.
1261
- # @param platform_request_input [PlatformRequestInput]
2960
+ # Switch an always-on logic off
2961
+ # Stops an always-on logic running, for one end customer or, without endCustomerId, for everyone, from the next call on. Nothing is pushed or put live, and the logic stays in your repo. Named by the id listLogic gives a live logic; an end customer's copy of your logic shares its id, so one end customer's switch covers whichever copy they run. Switching off what is already off answers changed false.
2962
+ # @param switch_logic_off_input [SwitchLogicOffInput]
1262
2963
  # @param [Hash] opts the optional parameters
1263
- # @return [PlatformRequestOutput]
1264
- def platform_request(platform_request_input, opts = {})
1265
- data, _status_code, _headers = platform_request_with_http_info(platform_request_input, opts)
2964
+ # @return [SwitchLogicOffOutput]
2965
+ def switch_logic_off(switch_logic_off_input, opts = {})
2966
+ data, _status_code, _headers = switch_logic_off_with_http_info(switch_logic_off_input, opts)
1266
2967
  data
1267
2968
  end
1268
2969
 
1269
- # Call anything else on the end customer&#39;s platform
1270
- # Sends one call to the platform&#39;s own API with the end customer&#39;s login, and answers as the platform answered, refusals included. A GET reads; any other method may change the platform.
1271
- # @param platform_request_input [PlatformRequestInput]
2970
+ # Switch an always-on logic off
2971
+ # Stops an always-on logic running, for one end customer or, without endCustomerId, for everyone, from the next call on. Nothing is pushed or put live, and the logic stays in your repo. Named by the id listLogic gives a live logic; an end customer&#39;s copy of your logic shares its id, so one end customer&#39;s switch covers whichever copy they run. Switching off what is already off answers changed false.
2972
+ # @param switch_logic_off_input [SwitchLogicOffInput]
1272
2973
  # @param [Hash] opts the optional parameters
1273
- # @return [Array<(PlatformRequestOutput, Integer, Hash)>] PlatformRequestOutput data, response status code and response headers
1274
- def platform_request_with_http_info(platform_request_input, opts = {})
2974
+ # @return [Array<(SwitchLogicOffOutput, Integer, Hash)>] SwitchLogicOffOutput data, response status code and response headers
2975
+ def switch_logic_off_with_http_info(switch_logic_off_input, opts = {})
1275
2976
  if @api_client.config.debugging
1276
- @api_client.config.logger.debug 'Calling API: DefaultApi.platform_request ...'
2977
+ @api_client.config.logger.debug 'Calling API: DefaultApi.switch_logic_off ...'
1277
2978
  end
1278
- # verify the required parameter 'platform_request_input' is set
1279
- if @api_client.config.client_side_validation && platform_request_input.nil?
1280
- fail ArgumentError, "Missing the required parameter 'platform_request_input' when calling DefaultApi.platform_request"
2979
+ # verify the required parameter 'switch_logic_off_input' is set
2980
+ if @api_client.config.client_side_validation && switch_logic_off_input.nil?
2981
+ fail ArgumentError, "Missing the required parameter 'switch_logic_off_input' when calling DefaultApi.switch_logic_off"
1281
2982
  end
1282
2983
  # resource path
1283
- local_var_path = '/sdk/v1/request'
2984
+ local_var_path = '/sdk/v1/logic/switch-off'
1284
2985
 
1285
2986
  # query parameters
1286
2987
  query_params = opts[:query_params] || {}
@@ -1299,16 +3000,16 @@ module Appnigma::Generated
1299
3000
  form_params = opts[:form_params] || {}
1300
3001
 
1301
3002
  # http body (model)
1302
- post_body = opts[:debug_body] || @api_client.object_to_http_body(platform_request_input)
3003
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(switch_logic_off_input)
1303
3004
 
1304
3005
  # return_type
1305
- return_type = opts[:debug_return_type] || 'PlatformRequestOutput'
3006
+ return_type = opts[:debug_return_type] || 'SwitchLogicOffOutput'
1306
3007
 
1307
3008
  # auth_names
1308
3009
  auth_names = opts[:debug_auth_names] || ['SdkKey']
1309
3010
 
1310
3011
  new_options = opts.merge(
1311
- :operation => :"DefaultApi.platform_request",
3012
+ :operation => :"DefaultApi.switch_logic_off",
1312
3013
  :header_params => header_params,
1313
3014
  :query_params => query_params,
1314
3015
  :form_params => form_params,
@@ -1319,36 +3020,36 @@ module Appnigma::Generated
1319
3020
 
1320
3021
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1321
3022
  if @api_client.config.debugging
1322
- @api_client.config.logger.debug "API called: DefaultApi#platform_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3023
+ @api_client.config.logger.debug "API called: DefaultApi#switch_logic_off\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1323
3024
  end
1324
3025
  return data, status_code, headers
1325
3026
  end
1326
3027
 
1327
- # Run a ready-made action
1328
- # Runs one ready-made action, by platform and name, on the end customer's account. The input is checked against the action's input schema; an input it refuses is INVALID_INPUT with the problems named.
1329
- # @param run_action_input [RunActionInput]
3028
+ # Switch an always-on logic back on
3029
+ # Takes away a switch switchLogicOff made, for one end customer or, without endCustomerId, for everyone's. The two are separate: while everyone's is off, one end customer's switched on answers on true but runs false, with reason switched_off_for_everyone. Switching on what is already on answers changed false.
3030
+ # @param switch_logic_on_input [SwitchLogicOnInput]
1330
3031
  # @param [Hash] opts the optional parameters
1331
- # @return [RunActionOutput]
1332
- def run_action(run_action_input, opts = {})
1333
- data, _status_code, _headers = run_action_with_http_info(run_action_input, opts)
3032
+ # @return [SwitchLogicOnOutput]
3033
+ def switch_logic_on(switch_logic_on_input, opts = {})
3034
+ data, _status_code, _headers = switch_logic_on_with_http_info(switch_logic_on_input, opts)
1334
3035
  data
1335
3036
  end
1336
3037
 
1337
- # Run a ready-made action
1338
- # Runs one ready-made action, by platform and name, on the end customer&#39;s account. The input is checked against the action&#39;s input schema; an input it refuses is INVALID_INPUT with the problems named.
1339
- # @param run_action_input [RunActionInput]
3038
+ # Switch an always-on logic back on
3039
+ # Takes away a switch switchLogicOff made, for one end customer or, without endCustomerId, for everyone&#39;s. The two are separate: while everyone&#39;s is off, one end customer&#39;s switched on answers on true but runs false, with reason switched_off_for_everyone. Switching on what is already on answers changed false.
3040
+ # @param switch_logic_on_input [SwitchLogicOnInput]
1340
3041
  # @param [Hash] opts the optional parameters
1341
- # @return [Array<(RunActionOutput, Integer, Hash)>] RunActionOutput data, response status code and response headers
1342
- def run_action_with_http_info(run_action_input, opts = {})
3042
+ # @return [Array<(SwitchLogicOnOutput, Integer, Hash)>] SwitchLogicOnOutput data, response status code and response headers
3043
+ def switch_logic_on_with_http_info(switch_logic_on_input, opts = {})
1343
3044
  if @api_client.config.debugging
1344
- @api_client.config.logger.debug 'Calling API: DefaultApi.run_action ...'
3045
+ @api_client.config.logger.debug 'Calling API: DefaultApi.switch_logic_on ...'
1345
3046
  end
1346
- # verify the required parameter 'run_action_input' is set
1347
- if @api_client.config.client_side_validation && run_action_input.nil?
1348
- fail ArgumentError, "Missing the required parameter 'run_action_input' when calling DefaultApi.run_action"
3047
+ # verify the required parameter 'switch_logic_on_input' is set
3048
+ if @api_client.config.client_side_validation && switch_logic_on_input.nil?
3049
+ fail ArgumentError, "Missing the required parameter 'switch_logic_on_input' when calling DefaultApi.switch_logic_on"
1349
3050
  end
1350
3051
  # resource path
1351
- local_var_path = '/sdk/v1/actions/run'
3052
+ local_var_path = '/sdk/v1/logic/switch-on'
1352
3053
 
1353
3054
  # query parameters
1354
3055
  query_params = opts[:query_params] || {}
@@ -1367,16 +3068,16 @@ module Appnigma::Generated
1367
3068
  form_params = opts[:form_params] || {}
1368
3069
 
1369
3070
  # http body (model)
1370
- post_body = opts[:debug_body] || @api_client.object_to_http_body(run_action_input)
3071
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(switch_logic_on_input)
1371
3072
 
1372
3073
  # return_type
1373
- return_type = opts[:debug_return_type] || 'RunActionOutput'
3074
+ return_type = opts[:debug_return_type] || 'SwitchLogicOnOutput'
1374
3075
 
1375
3076
  # auth_names
1376
3077
  auth_names = opts[:debug_auth_names] || ['SdkKey']
1377
3078
 
1378
3079
  new_options = opts.merge(
1379
- :operation => :"DefaultApi.run_action",
3080
+ :operation => :"DefaultApi.switch_logic_on",
1380
3081
  :header_params => header_params,
1381
3082
  :query_params => query_params,
1382
3083
  :form_params => form_params,
@@ -1387,36 +3088,36 @@ module Appnigma::Generated
1387
3088
 
1388
3089
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1389
3090
  if @api_client.config.debugging
1390
- @api_client.config.logger.debug "API called: DefaultApi#run_action\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3091
+ @api_client.config.logger.debug "API called: DefaultApi#switch_logic_on\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1391
3092
  end
1392
3093
  return data, status_code, headers
1393
3094
  end
1394
3095
 
1395
- # Run one of your own functions
1396
- # 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.
1397
- # @param run_input [RunInput]
3096
+ # Run a logic once on sample input
3097
+ # Runs the source sent, or else the saved draft, or else the file on main, once on the input you give, to see how it behaves before it goes live. It runs in a sandbox with no internet, with the settings you send and never the end customer's own. Every call it makes through hubspot, http or fetch is written down in calls and answered empty (a list finds no records; an upsert answers the records it was sent), so no end customer data is read or changed. A file that fails the quick check, or imports another file of your repo, does not run. Nothing is saved. requestedBy is kept on the call's record.
3098
+ # @param test_logic_input [TestLogicInput]
1398
3099
  # @param [Hash] opts the optional parameters
1399
- # @return [RunOutput]
1400
- def run_function(run_input, opts = {})
1401
- data, _status_code, _headers = run_function_with_http_info(run_input, opts)
3100
+ # @return [TestLogicOutput]
3101
+ def test_logic(test_logic_input, opts = {})
3102
+ data, _status_code, _headers = test_logic_with_http_info(test_logic_input, opts)
1402
3103
  data
1403
3104
  end
1404
3105
 
1405
- # Run one of your own functions
1406
- # Runs one function once on the end customer&#39;s account, by platform and either functionName or functionId, never both. A name finds your own function, and runs the end customer&#39;s version of it instead when they have one. An id, from listFunctions, finds the end customer&#39;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.
1407
- # @param run_input [RunInput]
3106
+ # Run a logic once on sample input
3107
+ # Runs the source sent, or else the saved draft, or else the file on main, once on the input you give, to see how it behaves before it goes live. It runs in a sandbox with no internet, with the settings you send and never the end customer&#39;s own. Every call it makes through hubspot, http or fetch is written down in calls and answered empty (a list finds no records; an upsert answers the records it was sent), so no end customer data is read or changed. A file that fails the quick check, or imports another file of your repo, does not run. Nothing is saved. requestedBy is kept on the call&#39;s record.
3108
+ # @param test_logic_input [TestLogicInput]
1408
3109
  # @param [Hash] opts the optional parameters
1409
- # @return [Array<(RunOutput, Integer, Hash)>] RunOutput data, response status code and response headers
1410
- def run_function_with_http_info(run_input, opts = {})
3110
+ # @return [Array<(TestLogicOutput, Integer, Hash)>] TestLogicOutput data, response status code and response headers
3111
+ def test_logic_with_http_info(test_logic_input, opts = {})
1411
3112
  if @api_client.config.debugging
1412
- @api_client.config.logger.debug 'Calling API: DefaultApi.run_function ...'
3113
+ @api_client.config.logger.debug 'Calling API: DefaultApi.test_logic ...'
1413
3114
  end
1414
- # verify the required parameter 'run_input' is set
1415
- if @api_client.config.client_side_validation && run_input.nil?
1416
- fail ArgumentError, "Missing the required parameter 'run_input' when calling DefaultApi.run_function"
3115
+ # verify the required parameter 'test_logic_input' is set
3116
+ if @api_client.config.client_side_validation && test_logic_input.nil?
3117
+ fail ArgumentError, "Missing the required parameter 'test_logic_input' when calling DefaultApi.test_logic"
1417
3118
  end
1418
3119
  # resource path
1419
- local_var_path = '/sdk/v1/run'
3120
+ local_var_path = '/sdk/v1/logic/test'
1420
3121
 
1421
3122
  # query parameters
1422
3123
  query_params = opts[:query_params] || {}
@@ -1435,16 +3136,16 @@ module Appnigma::Generated
1435
3136
  form_params = opts[:form_params] || {}
1436
3137
 
1437
3138
  # http body (model)
1438
- post_body = opts[:debug_body] || @api_client.object_to_http_body(run_input)
3139
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(test_logic_input)
1439
3140
 
1440
3141
  # return_type
1441
- return_type = opts[:debug_return_type] || 'RunOutput'
3142
+ return_type = opts[:debug_return_type] || 'TestLogicOutput'
1442
3143
 
1443
3144
  # auth_names
1444
3145
  auth_names = opts[:debug_auth_names] || ['SdkKey']
1445
3146
 
1446
3147
  new_options = opts.merge(
1447
- :operation => :"DefaultApi.run_function",
3148
+ :operation => :"DefaultApi.test_logic",
1448
3149
  :header_params => header_params,
1449
3150
  :query_params => query_params,
1450
3151
  :form_params => form_params,
@@ -1455,7 +3156,7 @@ module Appnigma::Generated
1455
3156
 
1456
3157
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1457
3158
  if @api_client.config.debugging
1458
- @api_client.config.logger.debug "API called: DefaultApi#run_function\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3159
+ @api_client.config.logger.debug "API called: DefaultApi#test_logic\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1459
3160
  end
1460
3161
  return data, status_code, headers
1461
3162
  end
@@ -1663,5 +3364,73 @@ module Appnigma::Generated
1663
3364
  end
1664
3365
  return data, status_code, headers
1665
3366
  end
3367
+
3368
+ # Save a logic's draft
3369
+ # Saves the whole source as the logic's draft, only on the revision it was made on: a save on an older one answers DRAFT_CHANGED with the draft now, and nothing is written over. Revision 0 starts the draft of a logic on main; send the file's sha from getLogic as baseSha, so a file changed since you read it stops it going live. Nothing reaches your repo. The same rules as createLogic for an end customer's.
3370
+ # @param update_logic_input [UpdateLogicInput]
3371
+ # @param [Hash] opts the optional parameters
3372
+ # @return [UpdateLogicOutput]
3373
+ def update_logic(update_logic_input, opts = {})
3374
+ data, _status_code, _headers = update_logic_with_http_info(update_logic_input, opts)
3375
+ data
3376
+ end
3377
+
3378
+ # Save a logic&#39;s draft
3379
+ # Saves the whole source as the logic&#39;s draft, only on the revision it was made on: a save on an older one answers DRAFT_CHANGED with the draft now, and nothing is written over. Revision 0 starts the draft of a logic on main; send the file&#39;s sha from getLogic as baseSha, so a file changed since you read it stops it going live. Nothing reaches your repo. The same rules as createLogic for an end customer&#39;s.
3380
+ # @param update_logic_input [UpdateLogicInput]
3381
+ # @param [Hash] opts the optional parameters
3382
+ # @return [Array<(UpdateLogicOutput, Integer, Hash)>] UpdateLogicOutput data, response status code and response headers
3383
+ def update_logic_with_http_info(update_logic_input, opts = {})
3384
+ if @api_client.config.debugging
3385
+ @api_client.config.logger.debug 'Calling API: DefaultApi.update_logic ...'
3386
+ end
3387
+ # verify the required parameter 'update_logic_input' is set
3388
+ if @api_client.config.client_side_validation && update_logic_input.nil?
3389
+ fail ArgumentError, "Missing the required parameter 'update_logic_input' when calling DefaultApi.update_logic"
3390
+ end
3391
+ # resource path
3392
+ local_var_path = '/sdk/v1/logic/update'
3393
+
3394
+ # query parameters
3395
+ query_params = opts[:query_params] || {}
3396
+
3397
+ # header parameters
3398
+ header_params = opts[:header_params] || {}
3399
+ # HTTP header 'Accept' (if needed)
3400
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
3401
+ # HTTP header 'Content-Type'
3402
+ content_type = @api_client.select_header_content_type(['application/json'])
3403
+ if !content_type.nil?
3404
+ header_params['Content-Type'] = content_type
3405
+ end
3406
+
3407
+ # form parameters
3408
+ form_params = opts[:form_params] || {}
3409
+
3410
+ # http body (model)
3411
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_logic_input)
3412
+
3413
+ # return_type
3414
+ return_type = opts[:debug_return_type] || 'UpdateLogicOutput'
3415
+
3416
+ # auth_names
3417
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
3418
+
3419
+ new_options = opts.merge(
3420
+ :operation => :"DefaultApi.update_logic",
3421
+ :header_params => header_params,
3422
+ :query_params => query_params,
3423
+ :form_params => form_params,
3424
+ :body => post_body,
3425
+ :auth_names => auth_names,
3426
+ :return_type => return_type
3427
+ )
3428
+
3429
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3430
+ if @api_client.config.debugging
3431
+ @api_client.config.logger.debug "API called: DefaultApi#update_logic\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3432
+ end
3433
+ return data, status_code, headers
3434
+ end
1666
3435
  end
1667
3436
  end