appnigma-sdk 0.2.1 → 2.0.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 (80) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +25 -0
  3. data/README.md +230 -97
  4. data/lib/appnigma/checks.rb +29 -5
  5. data/lib/appnigma/client.rb +38 -37
  6. data/lib/appnigma/connections.rb +25 -5
  7. data/lib/appnigma/constants.rb +15 -8
  8. data/lib/appnigma/crm.rb +63 -6
  9. data/lib/appnigma/errors.rb +45 -4
  10. data/lib/appnigma/generated/api/default_api.rb +824 -129
  11. data/lib/appnigma/generated/api_client.rb +1 -1
  12. data/lib/appnigma/generated/api_error.rb +1 -1
  13. data/lib/appnigma/generated/api_model_base.rb +1 -1
  14. data/lib/appnigma/generated/configuration.rb +1 -1
  15. data/lib/appnigma/generated/models/action_entry.rb +341 -0
  16. data/lib/appnigma/generated/models/connection_status.rb +3 -2
  17. data/lib/appnigma/generated/models/create_connection_link_input.rb +2 -13
  18. data/lib/appnigma/generated/models/create_connection_link_output.rb +2 -2
  19. data/lib/appnigma/generated/models/{post_output.rb → create_portal_link_input.rb} +20 -46
  20. data/lib/appnigma/generated/models/{pull_output_records_inner.rb → create_portal_link_output.rb} +37 -37
  21. data/lib/appnigma/generated/models/crm_company.rb +1 -1
  22. data/lib/appnigma/generated/models/crm_company_get_output.rb +1 -1
  23. data/lib/appnigma/generated/models/crm_company_list_output.rb +1 -1
  24. data/lib/appnigma/generated/models/crm_company_write_output.rb +177 -0
  25. data/lib/appnigma/generated/models/crm_contact.rb +1 -1
  26. data/lib/appnigma/generated/models/crm_contact_get_output.rb +1 -1
  27. data/lib/appnigma/generated/models/crm_contact_list_output.rb +1 -1
  28. data/lib/appnigma/generated/models/crm_contact_write_output.rb +177 -0
  29. data/lib/appnigma/generated/models/crm_create_input.rb +245 -0
  30. data/lib/appnigma/generated/models/crm_custom_field.rb +1 -1
  31. data/lib/appnigma/generated/models/crm_deal.rb +1 -1
  32. data/lib/appnigma/generated/models/{post_input.rb → crm_deal_create_input.rb} +48 -92
  33. data/lib/appnigma/generated/models/crm_deal_get_output.rb +1 -1
  34. data/lib/appnigma/generated/models/crm_deal_list_output.rb +1 -1
  35. data/lib/appnigma/generated/models/crm_deal_write_output.rb +177 -0
  36. data/lib/appnigma/generated/models/crm_email.rb +1 -1
  37. data/lib/appnigma/generated/models/crm_get_input.rb +2 -13
  38. data/lib/appnigma/generated/models/crm_labelled.rb +1 -1
  39. data/lib/appnigma/generated/models/crm_list_input.rb +2 -13
  40. data/lib/appnigma/generated/models/crm_phone.rb +1 -1
  41. data/lib/appnigma/generated/models/{pull_input.rb → crm_update_input.rb} +67 -112
  42. data/lib/appnigma/generated/models/end_customer.rb +247 -0
  43. data/lib/appnigma/generated/models/end_customer_connection.rb +239 -0
  44. data/lib/appnigma/generated/models/function_entry.rb +74 -5
  45. data/lib/appnigma/generated/models/function_owner.rb +1 -1
  46. data/lib/appnigma/generated/models/function_owner_one_of.rb +1 -1
  47. data/lib/appnigma/generated/models/function_owner_one_of1.rb +18 -17
  48. data/lib/appnigma/generated/models/get_connection_input.rb +216 -0
  49. data/lib/appnigma/generated/models/get_connection_output.rb +18 -5
  50. data/lib/appnigma/generated/models/get_guide_output.rb +1 -1
  51. data/lib/appnigma/generated/models/json_value.rb +1 -1
  52. data/lib/appnigma/generated/models/list_actions_output.rb +179 -0
  53. data/lib/appnigma/generated/models/{pull_output.rb → list_connections_output.rb} +23 -21
  54. data/lib/appnigma/generated/models/list_functions_output.rb +1 -1
  55. data/lib/appnigma/generated/models/list_platforms_output.rb +179 -0
  56. data/lib/appnigma/generated/models/logic_conditional.rb +247 -0
  57. data/lib/appnigma/generated/models/platform_entry.rb +269 -0
  58. data/lib/appnigma/generated/models/platform_entry_coverage_inner.rb +219 -0
  59. data/lib/appnigma/generated/models/platform_request_input.rb +2 -13
  60. data/lib/appnigma/generated/models/platform_request_input_body.rb +1 -1
  61. data/lib/appnigma/generated/models/platform_request_output.rb +1 -1
  62. data/lib/appnigma/generated/models/ran_as.rb +4 -6
  63. data/lib/appnigma/generated/models/run_action_input.rb +266 -0
  64. data/lib/appnigma/generated/models/run_action_output.rb +178 -0
  65. data/lib/appnigma/generated/models/run_input.rb +39 -26
  66. data/lib/appnigma/generated/models/run_output.rb +1 -1
  67. data/lib/appnigma/generated/models/sdk_error.rb +1 -1
  68. data/lib/appnigma/generated/models/sdk_error_error.rb +3 -3
  69. data/lib/appnigma/generated/models/sdk_error_error_details.rb +41 -3
  70. data/lib/appnigma/generated/models/sdk_problem.rb +1 -1
  71. data/lib/appnigma/generated/version.rb +1 -1
  72. data/lib/appnigma/generated.rb +21 -7
  73. data/lib/appnigma/names.rb +9 -0
  74. data/lib/appnigma/platforms.rb +18 -0
  75. data/lib/appnigma/portal.rb +21 -0
  76. data/lib/appnigma/retry.rb +3 -3
  77. data/lib/appnigma/transport.rb +4 -4
  78. data/lib/appnigma/version.rb +2 -2
  79. metadata +23 -7
  80. data/lib/appnigma/generated/models/post_input_record_value.rb +0 -104
@@ -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: 2.0.0
6
+ The version of the OpenAPI document: 4.0.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.26.0
@@ -87,43 +87,383 @@ module Appnigma::Generated
87
87
  return data, status_code, headers
88
88
  end
89
89
 
90
+ # Create one of the companies in one shape
91
+ # Creates one of an end customer's companies in the same shape whichever CRM they use. One that already has the same domain is updated instead of made twice.
92
+ # @param crm_create_input [CrmCreateInput]
93
+ # @param [Hash] opts the optional parameters
94
+ # @return [CrmCompanyWriteOutput]
95
+ def create_crm_company(crm_create_input, opts = {})
96
+ data, _status_code, _headers = create_crm_company_with_http_info(crm_create_input, opts)
97
+ data
98
+ end
99
+
100
+ # Create one of the companies in one shape
101
+ # Creates one of an end customer's companies in the same shape whichever CRM they use. One that already has the same domain is updated instead of made twice.
102
+ # @param crm_create_input [CrmCreateInput]
103
+ # @param [Hash] opts the optional parameters
104
+ # @return [Array<(CrmCompanyWriteOutput, Integer, Hash)>] CrmCompanyWriteOutput data, response status code and response headers
105
+ def create_crm_company_with_http_info(crm_create_input, opts = {})
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug 'Calling API: DefaultApi.create_crm_company ...'
108
+ end
109
+ # verify the required parameter 'crm_create_input' is set
110
+ if @api_client.config.client_side_validation && crm_create_input.nil?
111
+ fail ArgumentError, "Missing the required parameter 'crm_create_input' when calling DefaultApi.create_crm_company"
112
+ end
113
+ # resource path
114
+ local_var_path = '/sdk/v1/crm/companies/create'
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(crm_create_input)
134
+
135
+ # return_type
136
+ return_type = opts[:debug_return_type] || 'CrmCompanyWriteOutput'
137
+
138
+ # auth_names
139
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
140
+
141
+ new_options = opts.merge(
142
+ :operation => :"DefaultApi.create_crm_company",
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#create_crm_company\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
154
+ end
155
+ return data, status_code, headers
156
+ end
157
+
158
+ # Create one of the contacts in one shape
159
+ # Creates one of an end customer's contacts in the same shape whichever CRM they use. One that already has the same email is updated instead of made twice.
160
+ # @param crm_create_input [CrmCreateInput]
161
+ # @param [Hash] opts the optional parameters
162
+ # @return [CrmContactWriteOutput]
163
+ def create_crm_contact(crm_create_input, opts = {})
164
+ data, _status_code, _headers = create_crm_contact_with_http_info(crm_create_input, opts)
165
+ data
166
+ end
167
+
168
+ # Create one of the contacts in one shape
169
+ # Creates one of an end customer&#39;s contacts in the same shape whichever CRM they use. One that already has the same email is updated instead of made twice.
170
+ # @param crm_create_input [CrmCreateInput]
171
+ # @param [Hash] opts the optional parameters
172
+ # @return [Array<(CrmContactWriteOutput, Integer, Hash)>] CrmContactWriteOutput data, response status code and response headers
173
+ def create_crm_contact_with_http_info(crm_create_input, opts = {})
174
+ if @api_client.config.debugging
175
+ @api_client.config.logger.debug 'Calling API: DefaultApi.create_crm_contact ...'
176
+ end
177
+ # verify the required parameter 'crm_create_input' is set
178
+ if @api_client.config.client_side_validation && crm_create_input.nil?
179
+ fail ArgumentError, "Missing the required parameter 'crm_create_input' when calling DefaultApi.create_crm_contact"
180
+ end
181
+ # resource path
182
+ local_var_path = '/sdk/v1/crm/contacts/create'
183
+
184
+ # query parameters
185
+ query_params = opts[:query_params] || {}
186
+
187
+ # header parameters
188
+ header_params = opts[:header_params] || {}
189
+ # HTTP header 'Accept' (if needed)
190
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
191
+ # HTTP header 'Content-Type'
192
+ content_type = @api_client.select_header_content_type(['application/json'])
193
+ if !content_type.nil?
194
+ header_params['Content-Type'] = content_type
195
+ end
196
+
197
+ # form parameters
198
+ form_params = opts[:form_params] || {}
199
+
200
+ # http body (model)
201
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(crm_create_input)
202
+
203
+ # return_type
204
+ return_type = opts[:debug_return_type] || 'CrmContactWriteOutput'
205
+
206
+ # auth_names
207
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
208
+
209
+ new_options = opts.merge(
210
+ :operation => :"DefaultApi.create_crm_contact",
211
+ :header_params => header_params,
212
+ :query_params => query_params,
213
+ :form_params => form_params,
214
+ :body => post_body,
215
+ :auth_names => auth_names,
216
+ :return_type => return_type
217
+ )
218
+
219
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
220
+ if @api_client.config.debugging
221
+ @api_client.config.logger.debug "API called: DefaultApi#create_crm_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
222
+ end
223
+ return data, status_code, headers
224
+ end
225
+
226
+ # Create one of the deals in one shape
227
+ # Creates a deal in the end customer's CRM, in the same shape whichever CRM they use. A deal has no field every CRM keeps unique, so it matches on a key of your own, such as your invoice id: the same matchKey updates the same deal.
228
+ # @param crm_deal_create_input [CrmDealCreateInput]
229
+ # @param [Hash] opts the optional parameters
230
+ # @return [CrmDealWriteOutput]
231
+ def create_crm_deal(crm_deal_create_input, opts = {})
232
+ data, _status_code, _headers = create_crm_deal_with_http_info(crm_deal_create_input, opts)
233
+ data
234
+ end
235
+
236
+ # Create one of the deals in one shape
237
+ # Creates a deal in the end customer&#39;s CRM, in the same shape whichever CRM they use. A deal has no field every CRM keeps unique, so it matches on a key of your own, such as your invoice id: the same matchKey updates the same deal.
238
+ # @param crm_deal_create_input [CrmDealCreateInput]
239
+ # @param [Hash] opts the optional parameters
240
+ # @return [Array<(CrmDealWriteOutput, Integer, Hash)>] CrmDealWriteOutput data, response status code and response headers
241
+ def create_crm_deal_with_http_info(crm_deal_create_input, opts = {})
242
+ if @api_client.config.debugging
243
+ @api_client.config.logger.debug 'Calling API: DefaultApi.create_crm_deal ...'
244
+ end
245
+ # verify the required parameter 'crm_deal_create_input' is set
246
+ if @api_client.config.client_side_validation && crm_deal_create_input.nil?
247
+ fail ArgumentError, "Missing the required parameter 'crm_deal_create_input' when calling DefaultApi.create_crm_deal"
248
+ end
249
+ # resource path
250
+ local_var_path = '/sdk/v1/crm/deals/create'
251
+
252
+ # query parameters
253
+ query_params = opts[:query_params] || {}
254
+
255
+ # header parameters
256
+ header_params = opts[:header_params] || {}
257
+ # HTTP header 'Accept' (if needed)
258
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
259
+ # HTTP header 'Content-Type'
260
+ content_type = @api_client.select_header_content_type(['application/json'])
261
+ if !content_type.nil?
262
+ header_params['Content-Type'] = content_type
263
+ end
264
+
265
+ # form parameters
266
+ form_params = opts[:form_params] || {}
267
+
268
+ # http body (model)
269
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(crm_deal_create_input)
270
+
271
+ # return_type
272
+ return_type = opts[:debug_return_type] || 'CrmDealWriteOutput'
273
+
274
+ # auth_names
275
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
276
+
277
+ new_options = opts.merge(
278
+ :operation => :"DefaultApi.create_crm_deal",
279
+ :header_params => header_params,
280
+ :query_params => query_params,
281
+ :form_params => form_params,
282
+ :body => post_body,
283
+ :auth_names => auth_names,
284
+ :return_type => return_type
285
+ )
286
+
287
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
288
+ if @api_client.config.debugging
289
+ @api_client.config.logger.debug "API called: DefaultApi#create_crm_deal\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
290
+ end
291
+ return data, status_code, headers
292
+ end
293
+
294
+ # Make a custom logic portal link for an end customer
295
+ # A link that opens the custom logic portal for one end customer, where they see and edit their own logic. Show it in an iframe on one of your sites, or open it in a new tab. It works once and expires after 15 minutes.
296
+ # @param create_portal_link_input [CreatePortalLinkInput]
297
+ # @param [Hash] opts the optional parameters
298
+ # @return [CreatePortalLinkOutput]
299
+ def create_portal_link(create_portal_link_input, opts = {})
300
+ data, _status_code, _headers = create_portal_link_with_http_info(create_portal_link_input, opts)
301
+ data
302
+ end
303
+
304
+ # Make a custom logic portal link for an end customer
305
+ # A link that opens the custom logic portal for one end customer, where they see and edit their own logic. Show it in an iframe on one of your sites, or open it in a new tab. It works once and expires after 15 minutes.
306
+ # @param create_portal_link_input [CreatePortalLinkInput]
307
+ # @param [Hash] opts the optional parameters
308
+ # @return [Array<(CreatePortalLinkOutput, Integer, Hash)>] CreatePortalLinkOutput data, response status code and response headers
309
+ def create_portal_link_with_http_info(create_portal_link_input, opts = {})
310
+ if @api_client.config.debugging
311
+ @api_client.config.logger.debug 'Calling API: DefaultApi.create_portal_link ...'
312
+ end
313
+ # verify the required parameter 'create_portal_link_input' is set
314
+ if @api_client.config.client_side_validation && create_portal_link_input.nil?
315
+ fail ArgumentError, "Missing the required parameter 'create_portal_link_input' when calling DefaultApi.create_portal_link"
316
+ end
317
+ # resource path
318
+ local_var_path = '/sdk/v1/portal/link'
319
+
320
+ # query parameters
321
+ query_params = opts[:query_params] || {}
322
+
323
+ # header parameters
324
+ header_params = opts[:header_params] || {}
325
+ # HTTP header 'Accept' (if needed)
326
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
327
+ # HTTP header 'Content-Type'
328
+ content_type = @api_client.select_header_content_type(['application/json'])
329
+ if !content_type.nil?
330
+ header_params['Content-Type'] = content_type
331
+ end
332
+
333
+ # form parameters
334
+ form_params = opts[:form_params] || {}
335
+
336
+ # http body (model)
337
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_portal_link_input)
338
+
339
+ # return_type
340
+ return_type = opts[:debug_return_type] || 'CreatePortalLinkOutput'
341
+
342
+ # auth_names
343
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
344
+
345
+ new_options = opts.merge(
346
+ :operation => :"DefaultApi.create_portal_link",
347
+ :header_params => header_params,
348
+ :query_params => query_params,
349
+ :form_params => form_params,
350
+ :body => post_body,
351
+ :auth_names => auth_names,
352
+ :return_type => return_type
353
+ )
354
+
355
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
356
+ if @api_client.config.debugging
357
+ @api_client.config.logger.debug "API called: DefaultApi#create_portal_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
358
+ end
359
+ return data, status_code, headers
360
+ end
361
+
90
362
  # Read whether an end customer is connected
91
- # The connection of one end customer on one platform. The connection is written before the end customer lands on returnUrl, so the answer is already there. An end customer the API has never seen on that platform is a 404, not a disconnected status.
92
- # @param end_customer_id [String] Your own id for the end customer.
93
- # @param platform [String] The platform key, such as hubspot.
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]
94
365
  # @param [Hash] opts the optional parameters
95
366
  # @return [GetConnectionOutput]
96
- def get_connection(end_customer_id, platform, opts = {})
97
- data, _status_code, _headers = get_connection_with_http_info(end_customer_id, platform, opts)
367
+ def get_connection(get_connection_input, opts = {})
368
+ data, _status_code, _headers = get_connection_with_http_info(get_connection_input, opts)
98
369
  data
99
370
  end
100
371
 
101
372
  # Read whether an end customer is connected
102
- # The connection of one end customer on one platform. The connection is written before the end customer lands on returnUrl, so the answer is already there. An end customer the API has never seen on that platform is a 404, not a disconnected status.
103
- # @param end_customer_id [String] Your own id for the end customer.
104
- # @param platform [String] The platform key, such as hubspot.
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]
105
375
  # @param [Hash] opts the optional parameters
106
376
  # @return [Array<(GetConnectionOutput, Integer, Hash)>] GetConnectionOutput data, response status code and response headers
107
- def get_connection_with_http_info(end_customer_id, platform, opts = {})
377
+ def get_connection_with_http_info(get_connection_input, opts = {})
108
378
  if @api_client.config.debugging
109
379
  @api_client.config.logger.debug 'Calling API: DefaultApi.get_connection ...'
110
380
  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"
384
+ end
385
+ # resource path
386
+ local_var_path = '/sdk/v1/connections/get'
387
+
388
+ # query parameters
389
+ query_params = opts[:query_params] || {}
390
+
391
+ # header parameters
392
+ header_params = opts[:header_params] || {}
393
+ # HTTP header 'Accept' (if needed)
394
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
395
+ # HTTP header 'Content-Type'
396
+ content_type = @api_client.select_header_content_type(['application/json'])
397
+ if !content_type.nil?
398
+ header_params['Content-Type'] = content_type
399
+ end
400
+
401
+ # form parameters
402
+ form_params = opts[:form_params] || {}
403
+
404
+ # http body (model)
405
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(get_connection_input)
406
+
407
+ # return_type
408
+ return_type = opts[:debug_return_type] || 'GetConnectionOutput'
409
+
410
+ # auth_names
411
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
412
+
413
+ new_options = opts.merge(
414
+ :operation => :"DefaultApi.get_connection",
415
+ :header_params => header_params,
416
+ :query_params => query_params,
417
+ :form_params => form_params,
418
+ :body => post_body,
419
+ :auth_names => auth_names,
420
+ :return_type => return_type
421
+ )
422
+
423
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
424
+ if @api_client.config.debugging
425
+ @api_client.config.logger.debug "API called: DefaultApi#get_connection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
426
+ end
427
+ return data, status_code, headers
428
+ end
429
+
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]
434
+ # @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)
438
+ data
439
+ end
440
+
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]
445
+ # @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 = {})
448
+ if @api_client.config.debugging
449
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_connection_legacy ...'
450
+ end
111
451
  # verify the required parameter 'end_customer_id' is set
112
452
  if @api_client.config.client_side_validation && end_customer_id.nil?
113
- fail ArgumentError, "Missing the required parameter 'end_customer_id' when calling DefaultApi.get_connection"
453
+ fail ArgumentError, "Missing the required parameter 'end_customer_id' when calling DefaultApi.get_connection_legacy"
114
454
  end
115
455
  pattern = Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
116
456
  if @api_client.config.client_side_validation && end_customer_id !~ pattern
117
- fail ArgumentError, "invalid value for 'end_customer_id' when calling DefaultApi.get_connection, must conform to the pattern #{pattern}."
457
+ fail ArgumentError, "invalid value for 'end_customer_id' when calling DefaultApi.get_connection_legacy, must conform to the pattern #{pattern}."
118
458
  end
119
459
 
120
460
  # verify the required parameter 'platform' is set
121
461
  if @api_client.config.client_side_validation && platform.nil?
122
- fail ArgumentError, "Missing the required parameter 'platform' when calling DefaultApi.get_connection"
462
+ fail ArgumentError, "Missing the required parameter 'platform' when calling DefaultApi.get_connection_legacy"
123
463
  end
124
464
  pattern = Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
125
465
  if @api_client.config.client_side_validation && platform !~ pattern
126
- fail ArgumentError, "invalid value for 'platform' when calling DefaultApi.get_connection, must conform to the pattern #{pattern}."
466
+ fail ArgumentError, "invalid value for 'platform' when calling DefaultApi.get_connection_legacy, must conform to the pattern #{pattern}."
127
467
  end
128
468
 
129
469
  # resource path
@@ -151,7 +491,7 @@ module Appnigma::Generated
151
491
  auth_names = opts[:debug_auth_names] || ['SdkKey']
152
492
 
153
493
  new_options = opts.merge(
154
- :operation => :"DefaultApi.get_connection",
494
+ :operation => :"DefaultApi.get_connection_legacy",
155
495
  :header_params => header_params,
156
496
  :query_params => query_params,
157
497
  :form_params => form_params,
@@ -162,7 +502,7 @@ module Appnigma::Generated
162
502
 
163
503
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
164
504
  if @api_client.config.debugging
165
- @api_client.config.logger.debug "API called: DefaultApi#get_connection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
505
+ @api_client.config.logger.debug "API called: DefaultApi#get_connection_legacy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
166
506
  end
167
507
  return data, status_code, headers
168
508
  end
@@ -259,7 +599,137 @@ module Appnigma::Generated
259
599
  fail ArgumentError, "Missing the required parameter 'crm_get_input' when calling DefaultApi.get_crm_contact"
260
600
  end
261
601
  # resource path
262
- local_var_path = '/sdk/v1/crm/contacts/get'
602
+ local_var_path = '/sdk/v1/crm/contacts/get'
603
+
604
+ # query parameters
605
+ query_params = opts[:query_params] || {}
606
+
607
+ # header parameters
608
+ header_params = opts[:header_params] || {}
609
+ # HTTP header 'Accept' (if needed)
610
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
611
+ # HTTP header 'Content-Type'
612
+ content_type = @api_client.select_header_content_type(['application/json'])
613
+ if !content_type.nil?
614
+ header_params['Content-Type'] = content_type
615
+ end
616
+
617
+ # form parameters
618
+ form_params = opts[:form_params] || {}
619
+
620
+ # http body (model)
621
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(crm_get_input)
622
+
623
+ # return_type
624
+ return_type = opts[:debug_return_type] || 'CrmContactGetOutput'
625
+
626
+ # auth_names
627
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
628
+
629
+ new_options = opts.merge(
630
+ :operation => :"DefaultApi.get_crm_contact",
631
+ :header_params => header_params,
632
+ :query_params => query_params,
633
+ :form_params => form_params,
634
+ :body => post_body,
635
+ :auth_names => auth_names,
636
+ :return_type => return_type
637
+ )
638
+
639
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
640
+ 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}"
642
+ end
643
+ return data, status_code, headers
644
+ end
645
+
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]
649
+ # @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)
653
+ data
654
+ end
655
+
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]
659
+ # @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 = {})
662
+ if @api_client.config.debugging
663
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_crm_deal ...'
664
+ 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"
668
+ end
669
+ # resource path
670
+ local_var_path = '/sdk/v1/crm/deals/get'
671
+
672
+ # query parameters
673
+ query_params = opts[:query_params] || {}
674
+
675
+ # header parameters
676
+ header_params = opts[:header_params] || {}
677
+ # HTTP header 'Accept' (if needed)
678
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
679
+ # HTTP header 'Content-Type'
680
+ content_type = @api_client.select_header_content_type(['application/json'])
681
+ if !content_type.nil?
682
+ header_params['Content-Type'] = content_type
683
+ end
684
+
685
+ # form parameters
686
+ form_params = opts[:form_params] || {}
687
+
688
+ # http body (model)
689
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(crm_get_input)
690
+
691
+ # return_type
692
+ return_type = opts[:debug_return_type] || 'CrmDealGetOutput'
693
+
694
+ # auth_names
695
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
696
+
697
+ new_options = opts.merge(
698
+ :operation => :"DefaultApi.get_crm_deal",
699
+ :header_params => header_params,
700
+ :query_params => query_params,
701
+ :form_params => form_params,
702
+ :body => post_body,
703
+ :auth_names => auth_names,
704
+ :return_type => return_type
705
+ )
706
+
707
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
708
+ 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}"
710
+ end
711
+ return data, status_code, headers
712
+ end
713
+
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.
716
+ # @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)
720
+ data
721
+ end
722
+
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.
725
+ # @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 = {})
728
+ if @api_client.config.debugging
729
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_guide ...'
730
+ end
731
+ # resource path
732
+ local_var_path = '/sdk/v1/guide'
263
733
 
264
734
  # query parameters
265
735
  query_params = opts[:query_params] || {}
@@ -268,26 +738,21 @@ module Appnigma::Generated
268
738
  header_params = opts[:header_params] || {}
269
739
  # HTTP header 'Accept' (if needed)
270
740
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
271
- # HTTP header 'Content-Type'
272
- content_type = @api_client.select_header_content_type(['application/json'])
273
- if !content_type.nil?
274
- header_params['Content-Type'] = content_type
275
- end
276
741
 
277
742
  # form parameters
278
743
  form_params = opts[:form_params] || {}
279
744
 
280
745
  # http body (model)
281
- post_body = opts[:debug_body] || @api_client.object_to_http_body(crm_get_input)
746
+ post_body = opts[:debug_body]
282
747
 
283
748
  # return_type
284
- return_type = opts[:debug_return_type] || 'CrmContactGetOutput'
749
+ return_type = opts[:debug_return_type] || 'GetGuideOutput'
285
750
 
286
751
  # auth_names
287
752
  auth_names = opts[:debug_auth_names] || ['SdkKey']
288
753
 
289
754
  new_options = opts.merge(
290
- :operation => :"DefaultApi.get_crm_contact",
755
+ :operation => :"DefaultApi.get_guide",
291
756
  :header_params => header_params,
292
757
  :query_params => query_params,
293
758
  :form_params => form_params,
@@ -296,66 +761,63 @@ module Appnigma::Generated
296
761
  :return_type => return_type
297
762
  )
298
763
 
299
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
764
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
300
765
  if @api_client.config.debugging
301
- @api_client.config.logger.debug "API called: DefaultApi#get_crm_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
766
+ @api_client.config.logger.debug "API called: DefaultApi#get_guide\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
302
767
  end
303
768
  return data, status_code, headers
304
769
  end
305
770
 
306
- # Read one of the deals in one shape
307
- # One of an end customer's deals by its id in the CRM, in the same shape whichever CRM they use.
308
- # @param crm_get_input [CrmGetInput]
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.
309
773
  # @param [Hash] opts the optional parameters
310
- # @return [CrmDealGetOutput]
311
- def get_crm_deal(crm_get_input, opts = {})
312
- data, _status_code, _headers = get_crm_deal_with_http_info(crm_get_input, opts)
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)
313
778
  data
314
779
  end
315
780
 
316
- # Read one of the deals in one shape
317
- # One of an end customer&#39;s deals by its id in the CRM, in the same shape whichever CRM they use.
318
- # @param crm_get_input [CrmGetInput]
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.
319
783
  # @param [Hash] opts the optional parameters
320
- # @return [Array<(CrmDealGetOutput, Integer, Hash)>] CrmDealGetOutput data, response status code and response headers
321
- def get_crm_deal_with_http_info(crm_get_input, opts = {})
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 = {})
322
787
  if @api_client.config.debugging
323
- @api_client.config.logger.debug 'Calling API: DefaultApi.get_crm_deal ...'
788
+ @api_client.config.logger.debug 'Calling API: DefaultApi.list_actions ...'
324
789
  end
325
- # verify the required parameter 'crm_get_input' is set
326
- if @api_client.config.client_side_validation && crm_get_input.nil?
327
- fail ArgumentError, "Missing the required parameter 'crm_get_input' when calling DefaultApi.get_crm_deal"
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}."
328
793
  end
794
+
329
795
  # resource path
330
- local_var_path = '/sdk/v1/crm/deals/get'
796
+ local_var_path = '/sdk/v1/actions'
331
797
 
332
798
  # query parameters
333
799
  query_params = opts[:query_params] || {}
800
+ query_params[:'platform'] = opts[:'platform'] if !opts[:'platform'].nil?
334
801
 
335
802
  # header parameters
336
803
  header_params = opts[:header_params] || {}
337
804
  # HTTP header 'Accept' (if needed)
338
805
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
339
- # HTTP header 'Content-Type'
340
- content_type = @api_client.select_header_content_type(['application/json'])
341
- if !content_type.nil?
342
- header_params['Content-Type'] = content_type
343
- end
344
806
 
345
807
  # form parameters
346
808
  form_params = opts[:form_params] || {}
347
809
 
348
810
  # http body (model)
349
- post_body = opts[:debug_body] || @api_client.object_to_http_body(crm_get_input)
811
+ post_body = opts[:debug_body]
350
812
 
351
813
  # return_type
352
- return_type = opts[:debug_return_type] || 'CrmDealGetOutput'
814
+ return_type = opts[:debug_return_type] || 'ListActionsOutput'
353
815
 
354
816
  # auth_names
355
817
  auth_names = opts[:debug_auth_names] || ['SdkKey']
356
818
 
357
819
  new_options = opts.merge(
358
- :operation => :"DefaultApi.get_crm_deal",
820
+ :operation => :"DefaultApi.list_actions",
359
821
  :header_params => header_params,
360
822
  :query_params => query_params,
361
823
  :form_params => form_params,
@@ -364,35 +826,72 @@ module Appnigma::Generated
364
826
  :return_type => return_type
365
827
  )
366
828
 
367
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
829
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
368
830
  if @api_client.config.debugging
369
- @api_client.config.logger.debug "API called: DefaultApi#get_crm_deal\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
831
+ @api_client.config.logger.debug "API called: DefaultApi#list_actions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
370
832
  end
371
833
  return data, status_code, headers
372
834
  end
373
835
 
374
- # Read the guide written for your company
375
- # 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.
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.
376
838
  # @param [Hash] opts the optional parameters
377
- # @return [GetGuideOutput]
378
- def get_guide(opts = {})
379
- data, _status_code, _headers = get_guide_with_http_info(opts)
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)
380
846
  data
381
847
  end
382
848
 
383
- # Read the guide written for your company
384
- # 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.
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.
385
851
  # @param [Hash] opts the optional parameters
386
- # @return [Array<(GetGuideOutput, Integer, Hash)>] GetGuideOutput data, response status code and response headers
387
- def get_guide_with_http_info(opts = {})
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 = {})
388
858
  if @api_client.config.debugging
389
- @api_client.config.logger.debug 'Calling API: DefaultApi.get_guide ...'
859
+ @api_client.config.logger.debug 'Calling API: DefaultApi.list_connections ...'
860
+ 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}."
864
+ end
865
+
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}"
869
+ 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.'
872
+ end
873
+
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
877
+
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.'
880
+ end
881
+
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.'
390
884
  end
885
+
391
886
  # resource path
392
- local_var_path = '/sdk/v1/guide'
887
+ local_var_path = '/sdk/v1/connections'
393
888
 
394
889
  # query parameters
395
890
  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?
396
895
 
397
896
  # header parameters
398
897
  header_params = opts[:header_params] || {}
@@ -406,13 +905,13 @@ module Appnigma::Generated
406
905
  post_body = opts[:debug_body]
407
906
 
408
907
  # return_type
409
- return_type = opts[:debug_return_type] || 'GetGuideOutput'
908
+ return_type = opts[:debug_return_type] || 'ListConnectionsOutput'
410
909
 
411
910
  # auth_names
412
911
  auth_names = opts[:debug_auth_names] || ['SdkKey']
413
912
 
414
913
  new_options = opts.merge(
415
- :operation => :"DefaultApi.get_guide",
914
+ :operation => :"DefaultApi.list_connections",
416
915
  :header_params => header_params,
417
916
  :query_params => query_params,
418
917
  :form_params => form_params,
@@ -423,7 +922,7 @@ module Appnigma::Generated
423
922
 
424
923
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
425
924
  if @api_client.config.debugging
426
- @api_client.config.logger.debug "API called: DefaultApi#get_guide\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
925
+ @api_client.config.logger.debug "API called: DefaultApi#list_connections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
427
926
  end
428
927
  return data, status_code, headers
429
928
  end
@@ -633,9 +1132,10 @@ module Appnigma::Generated
633
1132
  end
634
1133
 
635
1134
  # List your own functions
636
- # Every function that is live for your company, with its input and output shapes. platform narrows the list to one platform.
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.
637
1136
  # @param [Hash] opts the optional parameters
638
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.
639
1139
  # @return [ListFunctionsOutput]
640
1140
  def list_functions(opts = {})
641
1141
  data, _status_code, _headers = list_functions_with_http_info(opts)
@@ -643,9 +1143,10 @@ module Appnigma::Generated
643
1143
  end
644
1144
 
645
1145
  # List your own functions
646
- # Every function that is live for your company, with its input and output shapes. platform narrows the list to one platform.
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.
647
1147
  # @param [Hash] opts the optional parameters
648
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.
649
1150
  # @return [Array<(ListFunctionsOutput, Integer, Hash)>] ListFunctionsOutput data, response status code and response headers
650
1151
  def list_functions_with_http_info(opts = {})
651
1152
  if @api_client.config.debugging
@@ -662,6 +1163,7 @@ module Appnigma::Generated
662
1163
  # query parameters
663
1164
  query_params = opts[:query_params] || {}
664
1165
  query_params[:'platform'] = opts[:'platform'] if !opts[:'platform'].nil?
1166
+ query_params[:'endCustomerId'] = opts[:'end_customer_id'] if !opts[:'end_customer_id'].nil?
665
1167
 
666
1168
  # header parameters
667
1169
  header_params = opts[:header_params] || {}
@@ -697,6 +1199,63 @@ module Appnigma::Generated
697
1199
  return data, status_code, headers
698
1200
  end
699
1201
 
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.
1204
+ # @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)
1208
+ data
1209
+ end
1210
+
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.
1213
+ # @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 = {})
1216
+ if @api_client.config.debugging
1217
+ @api_client.config.logger.debug 'Calling API: DefaultApi.list_platforms ...'
1218
+ end
1219
+ # resource path
1220
+ local_var_path = '/sdk/v1/platforms'
1221
+
1222
+ # query parameters
1223
+ query_params = opts[:query_params] || {}
1224
+
1225
+ # header parameters
1226
+ header_params = opts[:header_params] || {}
1227
+ # HTTP header 'Accept' (if needed)
1228
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1229
+
1230
+ # form parameters
1231
+ form_params = opts[:form_params] || {}
1232
+
1233
+ # http body (model)
1234
+ post_body = opts[:debug_body]
1235
+
1236
+ # return_type
1237
+ return_type = opts[:debug_return_type] || 'ListPlatformsOutput'
1238
+
1239
+ # auth_names
1240
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
1241
+
1242
+ new_options = opts.merge(
1243
+ :operation => :"DefaultApi.list_platforms",
1244
+ :header_params => header_params,
1245
+ :query_params => query_params,
1246
+ :form_params => form_params,
1247
+ :body => post_body,
1248
+ :auth_names => auth_names,
1249
+ :return_type => return_type
1250
+ )
1251
+
1252
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1253
+ 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}"
1255
+ end
1256
+ return data, status_code, headers
1257
+ end
1258
+
700
1259
  # Call anything else on the end customer's platform
701
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.
702
1261
  # @param platform_request_input [PlatformRequestInput]
@@ -765,31 +1324,99 @@ module Appnigma::Generated
765
1324
  return data, status_code, headers
766
1325
  end
767
1326
 
768
- # Create or update a record
769
- # Creates a record in the end customer's HubSpot, or updates the one that already matches on uniqueBy (email for a contact unless you name another property). A repeated call is safe: it is an update when the record exists.
770
- # @param post_input [PostInput]
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]
1330
+ # @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)
1334
+ data
1335
+ end
1336
+
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]
1340
+ # @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 = {})
1343
+ if @api_client.config.debugging
1344
+ @api_client.config.logger.debug 'Calling API: DefaultApi.run_action ...'
1345
+ 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"
1349
+ end
1350
+ # resource path
1351
+ local_var_path = '/sdk/v1/actions/run'
1352
+
1353
+ # query parameters
1354
+ query_params = opts[:query_params] || {}
1355
+
1356
+ # header parameters
1357
+ header_params = opts[:header_params] || {}
1358
+ # HTTP header 'Accept' (if needed)
1359
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1360
+ # HTTP header 'Content-Type'
1361
+ content_type = @api_client.select_header_content_type(['application/json'])
1362
+ if !content_type.nil?
1363
+ header_params['Content-Type'] = content_type
1364
+ end
1365
+
1366
+ # form parameters
1367
+ form_params = opts[:form_params] || {}
1368
+
1369
+ # http body (model)
1370
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(run_action_input)
1371
+
1372
+ # return_type
1373
+ return_type = opts[:debug_return_type] || 'RunActionOutput'
1374
+
1375
+ # auth_names
1376
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
1377
+
1378
+ new_options = opts.merge(
1379
+ :operation => :"DefaultApi.run_action",
1380
+ :header_params => header_params,
1381
+ :query_params => query_params,
1382
+ :form_params => form_params,
1383
+ :body => post_body,
1384
+ :auth_names => auth_names,
1385
+ :return_type => return_type
1386
+ )
1387
+
1388
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1389
+ 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}"
1391
+ end
1392
+ return data, status_code, headers
1393
+ end
1394
+
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]
771
1398
  # @param [Hash] opts the optional parameters
772
- # @return [PostOutput]
773
- def post_record(post_input, opts = {})
774
- data, _status_code, _headers = post_record_with_http_info(post_input, opts)
1399
+ # @return [RunOutput]
1400
+ def run_function(run_input, opts = {})
1401
+ data, _status_code, _headers = run_function_with_http_info(run_input, opts)
775
1402
  data
776
1403
  end
777
1404
 
778
- # Create or update a record
779
- # Creates a record in the end customer&#39;s HubSpot, or updates the one that already matches on uniqueBy (email for a contact unless you name another property). A repeated call is safe: it is an update when the record exists.
780
- # @param post_input [PostInput]
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]
781
1408
  # @param [Hash] opts the optional parameters
782
- # @return [Array<(PostOutput, Integer, Hash)>] PostOutput data, response status code and response headers
783
- def post_record_with_http_info(post_input, opts = {})
1409
+ # @return [Array<(RunOutput, Integer, Hash)>] RunOutput data, response status code and response headers
1410
+ def run_function_with_http_info(run_input, opts = {})
784
1411
  if @api_client.config.debugging
785
- @api_client.config.logger.debug 'Calling API: DefaultApi.post_record ...'
1412
+ @api_client.config.logger.debug 'Calling API: DefaultApi.run_function ...'
786
1413
  end
787
- # verify the required parameter 'post_input' is set
788
- if @api_client.config.client_side_validation && post_input.nil?
789
- fail ArgumentError, "Missing the required parameter 'post_input' when calling DefaultApi.post_record"
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"
790
1417
  end
791
1418
  # resource path
792
- local_var_path = '/sdk/v1/post'
1419
+ local_var_path = '/sdk/v1/run'
793
1420
 
794
1421
  # query parameters
795
1422
  query_params = opts[:query_params] || {}
@@ -808,16 +1435,16 @@ module Appnigma::Generated
808
1435
  form_params = opts[:form_params] || {}
809
1436
 
810
1437
  # http body (model)
811
- post_body = opts[:debug_body] || @api_client.object_to_http_body(post_input)
1438
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(run_input)
812
1439
 
813
1440
  # return_type
814
- return_type = opts[:debug_return_type] || 'PostOutput'
1441
+ return_type = opts[:debug_return_type] || 'RunOutput'
815
1442
 
816
1443
  # auth_names
817
1444
  auth_names = opts[:debug_auth_names] || ['SdkKey']
818
1445
 
819
1446
  new_options = opts.merge(
820
- :operation => :"DefaultApi.post_record",
1447
+ :operation => :"DefaultApi.run_function",
821
1448
  :header_params => header_params,
822
1449
  :query_params => query_params,
823
1450
  :form_params => form_params,
@@ -828,36 +1455,36 @@ module Appnigma::Generated
828
1455
 
829
1456
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
830
1457
  if @api_client.config.debugging
831
- @api_client.config.logger.debug "API called: DefaultApi#post_record\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1458
+ @api_client.config.logger.debug "API called: DefaultApi#run_function\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
832
1459
  end
833
1460
  return data, status_code, headers
834
1461
  end
835
1462
 
836
- # Read records, one page at a time
837
- # One page of records from the end customer's HubSpot and a marker for the next page. next is null on the last page.
838
- # @param pull_input [PullInput]
1463
+ # Update one of the companies in one shape
1464
+ # Sets the fields you send on one of an end customer's companies, by its id in the CRM. A field left out is left alone; null clears it.
1465
+ # @param crm_update_input [CrmUpdateInput]
839
1466
  # @param [Hash] opts the optional parameters
840
- # @return [PullOutput]
841
- def pull_records(pull_input, opts = {})
842
- data, _status_code, _headers = pull_records_with_http_info(pull_input, opts)
1467
+ # @return [CrmCompanyWriteOutput]
1468
+ def update_crm_company(crm_update_input, opts = {})
1469
+ data, _status_code, _headers = update_crm_company_with_http_info(crm_update_input, opts)
843
1470
  data
844
1471
  end
845
1472
 
846
- # Read records, one page at a time
847
- # One page of records from the end customer&#39;s HubSpot and a marker for the next page. next is null on the last page.
848
- # @param pull_input [PullInput]
1473
+ # Update one of the companies in one shape
1474
+ # Sets the fields you send on one of an end customer&#39;s companies, by its id in the CRM. A field left out is left alone; null clears it.
1475
+ # @param crm_update_input [CrmUpdateInput]
849
1476
  # @param [Hash] opts the optional parameters
850
- # @return [Array<(PullOutput, Integer, Hash)>] PullOutput data, response status code and response headers
851
- def pull_records_with_http_info(pull_input, opts = {})
1477
+ # @return [Array<(CrmCompanyWriteOutput, Integer, Hash)>] CrmCompanyWriteOutput data, response status code and response headers
1478
+ def update_crm_company_with_http_info(crm_update_input, opts = {})
852
1479
  if @api_client.config.debugging
853
- @api_client.config.logger.debug 'Calling API: DefaultApi.pull_records ...'
1480
+ @api_client.config.logger.debug 'Calling API: DefaultApi.update_crm_company ...'
854
1481
  end
855
- # verify the required parameter 'pull_input' is set
856
- if @api_client.config.client_side_validation && pull_input.nil?
857
- fail ArgumentError, "Missing the required parameter 'pull_input' when calling DefaultApi.pull_records"
1482
+ # verify the required parameter 'crm_update_input' is set
1483
+ if @api_client.config.client_side_validation && crm_update_input.nil?
1484
+ fail ArgumentError, "Missing the required parameter 'crm_update_input' when calling DefaultApi.update_crm_company"
858
1485
  end
859
1486
  # resource path
860
- local_var_path = '/sdk/v1/pull'
1487
+ local_var_path = '/sdk/v1/crm/companies/update'
861
1488
 
862
1489
  # query parameters
863
1490
  query_params = opts[:query_params] || {}
@@ -876,16 +1503,16 @@ module Appnigma::Generated
876
1503
  form_params = opts[:form_params] || {}
877
1504
 
878
1505
  # http body (model)
879
- post_body = opts[:debug_body] || @api_client.object_to_http_body(pull_input)
1506
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(crm_update_input)
880
1507
 
881
1508
  # return_type
882
- return_type = opts[:debug_return_type] || 'PullOutput'
1509
+ return_type = opts[:debug_return_type] || 'CrmCompanyWriteOutput'
883
1510
 
884
1511
  # auth_names
885
1512
  auth_names = opts[:debug_auth_names] || ['SdkKey']
886
1513
 
887
1514
  new_options = opts.merge(
888
- :operation => :"DefaultApi.pull_records",
1515
+ :operation => :"DefaultApi.update_crm_company",
889
1516
  :header_params => header_params,
890
1517
  :query_params => query_params,
891
1518
  :form_params => form_params,
@@ -896,36 +1523,36 @@ module Appnigma::Generated
896
1523
 
897
1524
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
898
1525
  if @api_client.config.debugging
899
- @api_client.config.logger.debug "API called: DefaultApi#pull_records\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1526
+ @api_client.config.logger.debug "API called: DefaultApi#update_crm_company\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
900
1527
  end
901
1528
  return data, status_code, headers
902
1529
  end
903
1530
 
904
- # Run one of your own functions
905
- # Runs one of your functions, by platform and name, on the end customer's account. The input is checked against the shape the function declared. What runs is always the function's live version, and ranAs says whose it was, the end customer's own or yours, and which version. A version sent by an older SDK is ignored. A function removed from your logic is retired and answers FUNCTION_RETIRED.
906
- # @param run_input [RunInput]
1531
+ # Update one of the contacts in one shape
1532
+ # Sets the fields you send on one of an end customer's contacts, by its id in the CRM. A field left out is left alone; null clears it.
1533
+ # @param crm_update_input [CrmUpdateInput]
907
1534
  # @param [Hash] opts the optional parameters
908
- # @return [RunOutput]
909
- def run_function(run_input, opts = {})
910
- data, _status_code, _headers = run_function_with_http_info(run_input, opts)
1535
+ # @return [CrmContactWriteOutput]
1536
+ def update_crm_contact(crm_update_input, opts = {})
1537
+ data, _status_code, _headers = update_crm_contact_with_http_info(crm_update_input, opts)
911
1538
  data
912
1539
  end
913
1540
 
914
- # Run one of your own functions
915
- # Runs one of your functions, by platform and name, on the end customer&#39;s account. The input is checked against the shape the function declared. What runs is always the function&#39;s live version, and ranAs says whose it was, the end customer&#39;s own or yours, and which version. A version sent by an older SDK is ignored. A function removed from your logic is retired and answers FUNCTION_RETIRED.
916
- # @param run_input [RunInput]
1541
+ # Update one of the contacts in one shape
1542
+ # Sets the fields you send on one of an end customer&#39;s contacts, by its id in the CRM. A field left out is left alone; null clears it.
1543
+ # @param crm_update_input [CrmUpdateInput]
917
1544
  # @param [Hash] opts the optional parameters
918
- # @return [Array<(RunOutput, Integer, Hash)>] RunOutput data, response status code and response headers
919
- def run_function_with_http_info(run_input, opts = {})
1545
+ # @return [Array<(CrmContactWriteOutput, Integer, Hash)>] CrmContactWriteOutput data, response status code and response headers
1546
+ def update_crm_contact_with_http_info(crm_update_input, opts = {})
920
1547
  if @api_client.config.debugging
921
- @api_client.config.logger.debug 'Calling API: DefaultApi.run_function ...'
1548
+ @api_client.config.logger.debug 'Calling API: DefaultApi.update_crm_contact ...'
922
1549
  end
923
- # verify the required parameter 'run_input' is set
924
- if @api_client.config.client_side_validation && run_input.nil?
925
- fail ArgumentError, "Missing the required parameter 'run_input' when calling DefaultApi.run_function"
1550
+ # verify the required parameter 'crm_update_input' is set
1551
+ if @api_client.config.client_side_validation && crm_update_input.nil?
1552
+ fail ArgumentError, "Missing the required parameter 'crm_update_input' when calling DefaultApi.update_crm_contact"
926
1553
  end
927
1554
  # resource path
928
- local_var_path = '/sdk/v1/run'
1555
+ local_var_path = '/sdk/v1/crm/contacts/update'
929
1556
 
930
1557
  # query parameters
931
1558
  query_params = opts[:query_params] || {}
@@ -944,16 +1571,16 @@ module Appnigma::Generated
944
1571
  form_params = opts[:form_params] || {}
945
1572
 
946
1573
  # http body (model)
947
- post_body = opts[:debug_body] || @api_client.object_to_http_body(run_input)
1574
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(crm_update_input)
948
1575
 
949
1576
  # return_type
950
- return_type = opts[:debug_return_type] || 'RunOutput'
1577
+ return_type = opts[:debug_return_type] || 'CrmContactWriteOutput'
951
1578
 
952
1579
  # auth_names
953
1580
  auth_names = opts[:debug_auth_names] || ['SdkKey']
954
1581
 
955
1582
  new_options = opts.merge(
956
- :operation => :"DefaultApi.run_function",
1583
+ :operation => :"DefaultApi.update_crm_contact",
957
1584
  :header_params => header_params,
958
1585
  :query_params => query_params,
959
1586
  :form_params => form_params,
@@ -964,7 +1591,75 @@ module Appnigma::Generated
964
1591
 
965
1592
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
966
1593
  if @api_client.config.debugging
967
- @api_client.config.logger.debug "API called: DefaultApi#run_function\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1594
+ @api_client.config.logger.debug "API called: DefaultApi#update_crm_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1595
+ end
1596
+ return data, status_code, headers
1597
+ end
1598
+
1599
+ # Update one of the deals in one shape
1600
+ # Sets the fields you send on one of an end customer's deals, by its id in the CRM. A field left out is left alone; null clears it.
1601
+ # @param crm_update_input [CrmUpdateInput]
1602
+ # @param [Hash] opts the optional parameters
1603
+ # @return [CrmDealWriteOutput]
1604
+ def update_crm_deal(crm_update_input, opts = {})
1605
+ data, _status_code, _headers = update_crm_deal_with_http_info(crm_update_input, opts)
1606
+ data
1607
+ end
1608
+
1609
+ # Update one of the deals in one shape
1610
+ # Sets the fields you send on one of an end customer&#39;s deals, by its id in the CRM. A field left out is left alone; null clears it.
1611
+ # @param crm_update_input [CrmUpdateInput]
1612
+ # @param [Hash] opts the optional parameters
1613
+ # @return [Array<(CrmDealWriteOutput, Integer, Hash)>] CrmDealWriteOutput data, response status code and response headers
1614
+ def update_crm_deal_with_http_info(crm_update_input, opts = {})
1615
+ if @api_client.config.debugging
1616
+ @api_client.config.logger.debug 'Calling API: DefaultApi.update_crm_deal ...'
1617
+ end
1618
+ # verify the required parameter 'crm_update_input' is set
1619
+ if @api_client.config.client_side_validation && crm_update_input.nil?
1620
+ fail ArgumentError, "Missing the required parameter 'crm_update_input' when calling DefaultApi.update_crm_deal"
1621
+ end
1622
+ # resource path
1623
+ local_var_path = '/sdk/v1/crm/deals/update'
1624
+
1625
+ # query parameters
1626
+ query_params = opts[:query_params] || {}
1627
+
1628
+ # header parameters
1629
+ header_params = opts[:header_params] || {}
1630
+ # HTTP header 'Accept' (if needed)
1631
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1632
+ # HTTP header 'Content-Type'
1633
+ content_type = @api_client.select_header_content_type(['application/json'])
1634
+ if !content_type.nil?
1635
+ header_params['Content-Type'] = content_type
1636
+ end
1637
+
1638
+ # form parameters
1639
+ form_params = opts[:form_params] || {}
1640
+
1641
+ # http body (model)
1642
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(crm_update_input)
1643
+
1644
+ # return_type
1645
+ return_type = opts[:debug_return_type] || 'CrmDealWriteOutput'
1646
+
1647
+ # auth_names
1648
+ auth_names = opts[:debug_auth_names] || ['SdkKey']
1649
+
1650
+ new_options = opts.merge(
1651
+ :operation => :"DefaultApi.update_crm_deal",
1652
+ :header_params => header_params,
1653
+ :query_params => query_params,
1654
+ :form_params => form_params,
1655
+ :body => post_body,
1656
+ :auth_names => auth_names,
1657
+ :return_type => return_type
1658
+ )
1659
+
1660
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1661
+ if @api_client.config.debugging
1662
+ @api_client.config.logger.debug "API called: DefaultApi#update_crm_deal\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
968
1663
  end
969
1664
  return data, status_code, headers
970
1665
  end