appnigma-sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.md +359 -0
- data/lib/appnigma/checks.rb +90 -0
- data/lib/appnigma/client.rb +118 -0
- data/lib/appnigma/connections.rb +31 -0
- data/lib/appnigma/constants.rb +80 -0
- data/lib/appnigma/crm.rb +40 -0
- data/lib/appnigma/errors.rb +135 -0
- data/lib/appnigma/generated/api/default_api.rb +972 -0
- data/lib/appnigma/generated/api_client.rb +441 -0
- data/lib/appnigma/generated/api_error.rb +58 -0
- data/lib/appnigma/generated/api_model_base.rb +88 -0
- data/lib/appnigma/generated/configuration.rb +392 -0
- data/lib/appnigma/generated/models/connection_status.rb +41 -0
- data/lib/appnigma/generated/models/create_connection_link_input.rb +265 -0
- data/lib/appnigma/generated/models/create_connection_link_output.rb +205 -0
- data/lib/appnigma/generated/models/crm_company.rb +322 -0
- data/lib/appnigma/generated/models/crm_company_get_output.rb +177 -0
- data/lib/appnigma/generated/models/crm_company_list_output.rb +192 -0
- data/lib/appnigma/generated/models/crm_contact.rb +404 -0
- data/lib/appnigma/generated/models/crm_contact_get_output.rb +177 -0
- data/lib/appnigma/generated/models/crm_contact_list_output.rb +192 -0
- data/lib/appnigma/generated/models/crm_custom_field.rb +189 -0
- data/lib/appnigma/generated/models/crm_deal.rb +479 -0
- data/lib/appnigma/generated/models/crm_deal_get_output.rb +177 -0
- data/lib/appnigma/generated/models/crm_deal_list_output.rb +192 -0
- data/lib/appnigma/generated/models/crm_email.rb +249 -0
- data/lib/appnigma/generated/models/crm_get_input.rb +272 -0
- data/lib/appnigma/generated/models/crm_labelled.rb +190 -0
- data/lib/appnigma/generated/models/crm_list_input.rb +303 -0
- data/lib/appnigma/generated/models/crm_phone.rb +249 -0
- data/lib/appnigma/generated/models/function_entry.rb +346 -0
- data/lib/appnigma/generated/models/function_owner.rb +105 -0
- data/lib/appnigma/generated/models/function_owner_one_of.rb +201 -0
- data/lib/appnigma/generated/models/function_owner_one_of1.rb +227 -0
- data/lib/appnigma/generated/models/get_connection_output.rb +251 -0
- data/lib/appnigma/generated/models/get_guide_output.rb +178 -0
- data/lib/appnigma/generated/models/json_value.rb +106 -0
- data/lib/appnigma/generated/models/list_functions_output.rb +179 -0
- data/lib/appnigma/generated/models/platform_request_input.rb +314 -0
- data/lib/appnigma/generated/models/platform_request_input_body.rb +104 -0
- data/lib/appnigma/generated/models/platform_request_output.rb +221 -0
- data/lib/appnigma/generated/models/post_input.rb +327 -0
- data/lib/appnigma/generated/models/post_input_record_value.rb +104 -0
- data/lib/appnigma/generated/models/post_output.rb +203 -0
- data/lib/appnigma/generated/models/pull_input.rb +335 -0
- data/lib/appnigma/generated/models/pull_output.rb +191 -0
- data/lib/appnigma/generated/models/pull_output_records_inner.rb +205 -0
- data/lib/appnigma/generated/models/run_input.rb +332 -0
- data/lib/appnigma/generated/models/run_output.rb +164 -0
- data/lib/appnigma/generated/models/sdk_error.rb +177 -0
- data/lib/appnigma/generated/models/sdk_error_error.rb +254 -0
- data/lib/appnigma/generated/models/sdk_error_error_details.rb +211 -0
- data/lib/appnigma/generated/models/sdk_problem.rb +205 -0
- data/lib/appnigma/generated/version.rb +15 -0
- data/lib/appnigma/generated.rb +82 -0
- data/lib/appnigma/names.rb +62 -0
- data/lib/appnigma/retry.rb +80 -0
- data/lib/appnigma/transport.rb +138 -0
- data/lib/appnigma/version.rb +9 -0
- data/lib/appnigma.rb +16 -0
- metadata +155 -0
|
@@ -0,0 +1,972 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Appnigma SDK API
|
|
3
|
+
|
|
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
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.26.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Appnigma::Generated
|
|
16
|
+
class DefaultApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Make a connect link for an end customer
|
|
23
|
+
# 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
|
+
# @param create_connection_link_input [CreateConnectionLinkInput]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [CreateConnectionLinkOutput]
|
|
27
|
+
def create_connection_link(create_connection_link_input, opts = {})
|
|
28
|
+
data, _status_code, _headers = create_connection_link_with_http_info(create_connection_link_input, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Make a connect link for an end customer
|
|
33
|
+
# 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.
|
|
34
|
+
# @param create_connection_link_input [CreateConnectionLinkInput]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(CreateConnectionLinkOutput, Integer, Hash)>] CreateConnectionLinkOutput data, response status code and response headers
|
|
37
|
+
def create_connection_link_with_http_info(create_connection_link_input, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.create_connection_link ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'create_connection_link_input' is set
|
|
42
|
+
if @api_client.config.client_side_validation && create_connection_link_input.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'create_connection_link_input' when calling DefaultApi.create_connection_link"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/sdk/v1/connections/link'
|
|
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(create_connection_link_input)
|
|
66
|
+
|
|
67
|
+
# return_type
|
|
68
|
+
return_type = opts[:debug_return_type] || 'CreateConnectionLinkOutput'
|
|
69
|
+
|
|
70
|
+
# auth_names
|
|
71
|
+
auth_names = opts[:debug_auth_names] || ['SdkKey']
|
|
72
|
+
|
|
73
|
+
new_options = opts.merge(
|
|
74
|
+
:operation => :"DefaultApi.create_connection_link",
|
|
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#create_connection_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
86
|
+
end
|
|
87
|
+
return data, status_code, headers
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# 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.
|
|
94
|
+
# @param [Hash] opts the optional parameters
|
|
95
|
+
# @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)
|
|
98
|
+
data
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# 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.
|
|
105
|
+
# @param [Hash] opts the optional parameters
|
|
106
|
+
# @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 = {})
|
|
108
|
+
if @api_client.config.debugging
|
|
109
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.get_connection ...'
|
|
110
|
+
end
|
|
111
|
+
# verify the required parameter 'end_customer_id' is set
|
|
112
|
+
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"
|
|
114
|
+
end
|
|
115
|
+
pattern = Regexp.new(/^[A-Za-z0-9._-]{1,100}$/)
|
|
116
|
+
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}."
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# verify the required parameter 'platform' is set
|
|
121
|
+
if @api_client.config.client_side_validation && platform.nil?
|
|
122
|
+
fail ArgumentError, "Missing the required parameter 'platform' when calling DefaultApi.get_connection"
|
|
123
|
+
end
|
|
124
|
+
pattern = Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
|
|
125
|
+
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}."
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# resource path
|
|
130
|
+
local_var_path = '/sdk/v1/connections/{endCustomerId}'.sub('{endCustomerId}', CGI.escape(end_customer_id.to_s))
|
|
131
|
+
|
|
132
|
+
# query parameters
|
|
133
|
+
query_params = opts[:query_params] || {}
|
|
134
|
+
query_params[:'platform'] = platform
|
|
135
|
+
|
|
136
|
+
# header parameters
|
|
137
|
+
header_params = opts[:header_params] || {}
|
|
138
|
+
# HTTP header 'Accept' (if needed)
|
|
139
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
140
|
+
|
|
141
|
+
# form parameters
|
|
142
|
+
form_params = opts[:form_params] || {}
|
|
143
|
+
|
|
144
|
+
# http body (model)
|
|
145
|
+
post_body = opts[:debug_body]
|
|
146
|
+
|
|
147
|
+
# return_type
|
|
148
|
+
return_type = opts[:debug_return_type] || 'GetConnectionOutput'
|
|
149
|
+
|
|
150
|
+
# auth_names
|
|
151
|
+
auth_names = opts[:debug_auth_names] || ['SdkKey']
|
|
152
|
+
|
|
153
|
+
new_options = opts.merge(
|
|
154
|
+
:operation => :"DefaultApi.get_connection",
|
|
155
|
+
:header_params => header_params,
|
|
156
|
+
:query_params => query_params,
|
|
157
|
+
:form_params => form_params,
|
|
158
|
+
:body => post_body,
|
|
159
|
+
:auth_names => auth_names,
|
|
160
|
+
:return_type => return_type
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
164
|
+
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}"
|
|
166
|
+
end
|
|
167
|
+
return data, status_code, headers
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Read one of the companies in one shape
|
|
171
|
+
# One of an end customer's companies by its id in the CRM, in the same shape whichever CRM they use.
|
|
172
|
+
# @param crm_get_input [CrmGetInput]
|
|
173
|
+
# @param [Hash] opts the optional parameters
|
|
174
|
+
# @return [CrmCompanyGetOutput]
|
|
175
|
+
def get_crm_company(crm_get_input, opts = {})
|
|
176
|
+
data, _status_code, _headers = get_crm_company_with_http_info(crm_get_input, opts)
|
|
177
|
+
data
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Read one of the companies in one shape
|
|
181
|
+
# One of an end customer's companies by its id in the CRM, in the same shape whichever CRM they use.
|
|
182
|
+
# @param crm_get_input [CrmGetInput]
|
|
183
|
+
# @param [Hash] opts the optional parameters
|
|
184
|
+
# @return [Array<(CrmCompanyGetOutput, Integer, Hash)>] CrmCompanyGetOutput data, response status code and response headers
|
|
185
|
+
def get_crm_company_with_http_info(crm_get_input, opts = {})
|
|
186
|
+
if @api_client.config.debugging
|
|
187
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.get_crm_company ...'
|
|
188
|
+
end
|
|
189
|
+
# verify the required parameter 'crm_get_input' is set
|
|
190
|
+
if @api_client.config.client_side_validation && crm_get_input.nil?
|
|
191
|
+
fail ArgumentError, "Missing the required parameter 'crm_get_input' when calling DefaultApi.get_crm_company"
|
|
192
|
+
end
|
|
193
|
+
# resource path
|
|
194
|
+
local_var_path = '/sdk/v1/crm/companies/get'
|
|
195
|
+
|
|
196
|
+
# query parameters
|
|
197
|
+
query_params = opts[:query_params] || {}
|
|
198
|
+
|
|
199
|
+
# header parameters
|
|
200
|
+
header_params = opts[:header_params] || {}
|
|
201
|
+
# HTTP header 'Accept' (if needed)
|
|
202
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
203
|
+
# HTTP header 'Content-Type'
|
|
204
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
205
|
+
if !content_type.nil?
|
|
206
|
+
header_params['Content-Type'] = content_type
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# form parameters
|
|
210
|
+
form_params = opts[:form_params] || {}
|
|
211
|
+
|
|
212
|
+
# http body (model)
|
|
213
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(crm_get_input)
|
|
214
|
+
|
|
215
|
+
# return_type
|
|
216
|
+
return_type = opts[:debug_return_type] || 'CrmCompanyGetOutput'
|
|
217
|
+
|
|
218
|
+
# auth_names
|
|
219
|
+
auth_names = opts[:debug_auth_names] || ['SdkKey']
|
|
220
|
+
|
|
221
|
+
new_options = opts.merge(
|
|
222
|
+
:operation => :"DefaultApi.get_crm_company",
|
|
223
|
+
:header_params => header_params,
|
|
224
|
+
:query_params => query_params,
|
|
225
|
+
:form_params => form_params,
|
|
226
|
+
:body => post_body,
|
|
227
|
+
:auth_names => auth_names,
|
|
228
|
+
:return_type => return_type
|
|
229
|
+
)
|
|
230
|
+
|
|
231
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
232
|
+
if @api_client.config.debugging
|
|
233
|
+
@api_client.config.logger.debug "API called: DefaultApi#get_crm_company\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
234
|
+
end
|
|
235
|
+
return data, status_code, headers
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# Read one of the contacts in one shape
|
|
239
|
+
# One of an end customer's contacts by its id in the CRM, in the same shape whichever CRM they use.
|
|
240
|
+
# @param crm_get_input [CrmGetInput]
|
|
241
|
+
# @param [Hash] opts the optional parameters
|
|
242
|
+
# @return [CrmContactGetOutput]
|
|
243
|
+
def get_crm_contact(crm_get_input, opts = {})
|
|
244
|
+
data, _status_code, _headers = get_crm_contact_with_http_info(crm_get_input, opts)
|
|
245
|
+
data
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# Read one of the contacts in one shape
|
|
249
|
+
# One of an end customer's contacts by its id in the CRM, in the same shape whichever CRM they use.
|
|
250
|
+
# @param crm_get_input [CrmGetInput]
|
|
251
|
+
# @param [Hash] opts the optional parameters
|
|
252
|
+
# @return [Array<(CrmContactGetOutput, Integer, Hash)>] CrmContactGetOutput data, response status code and response headers
|
|
253
|
+
def get_crm_contact_with_http_info(crm_get_input, opts = {})
|
|
254
|
+
if @api_client.config.debugging
|
|
255
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.get_crm_contact ...'
|
|
256
|
+
end
|
|
257
|
+
# verify the required parameter 'crm_get_input' is set
|
|
258
|
+
if @api_client.config.client_side_validation && crm_get_input.nil?
|
|
259
|
+
fail ArgumentError, "Missing the required parameter 'crm_get_input' when calling DefaultApi.get_crm_contact"
|
|
260
|
+
end
|
|
261
|
+
# resource path
|
|
262
|
+
local_var_path = '/sdk/v1/crm/contacts/get'
|
|
263
|
+
|
|
264
|
+
# query parameters
|
|
265
|
+
query_params = opts[:query_params] || {}
|
|
266
|
+
|
|
267
|
+
# header parameters
|
|
268
|
+
header_params = opts[:header_params] || {}
|
|
269
|
+
# HTTP header 'Accept' (if needed)
|
|
270
|
+
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
|
+
|
|
277
|
+
# form parameters
|
|
278
|
+
form_params = opts[:form_params] || {}
|
|
279
|
+
|
|
280
|
+
# http body (model)
|
|
281
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(crm_get_input)
|
|
282
|
+
|
|
283
|
+
# return_type
|
|
284
|
+
return_type = opts[:debug_return_type] || 'CrmContactGetOutput'
|
|
285
|
+
|
|
286
|
+
# auth_names
|
|
287
|
+
auth_names = opts[:debug_auth_names] || ['SdkKey']
|
|
288
|
+
|
|
289
|
+
new_options = opts.merge(
|
|
290
|
+
:operation => :"DefaultApi.get_crm_contact",
|
|
291
|
+
:header_params => header_params,
|
|
292
|
+
:query_params => query_params,
|
|
293
|
+
:form_params => form_params,
|
|
294
|
+
:body => post_body,
|
|
295
|
+
:auth_names => auth_names,
|
|
296
|
+
:return_type => return_type
|
|
297
|
+
)
|
|
298
|
+
|
|
299
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
300
|
+
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}"
|
|
302
|
+
end
|
|
303
|
+
return data, status_code, headers
|
|
304
|
+
end
|
|
305
|
+
|
|
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]
|
|
309
|
+
# @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)
|
|
313
|
+
data
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
# Read one of the deals in one shape
|
|
317
|
+
# One of an end customer's deals by its id in the CRM, in the same shape whichever CRM they use.
|
|
318
|
+
# @param crm_get_input [CrmGetInput]
|
|
319
|
+
# @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 = {})
|
|
322
|
+
if @api_client.config.debugging
|
|
323
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.get_crm_deal ...'
|
|
324
|
+
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"
|
|
328
|
+
end
|
|
329
|
+
# resource path
|
|
330
|
+
local_var_path = '/sdk/v1/crm/deals/get'
|
|
331
|
+
|
|
332
|
+
# query parameters
|
|
333
|
+
query_params = opts[:query_params] || {}
|
|
334
|
+
|
|
335
|
+
# header parameters
|
|
336
|
+
header_params = opts[:header_params] || {}
|
|
337
|
+
# HTTP header 'Accept' (if needed)
|
|
338
|
+
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
|
+
|
|
345
|
+
# form parameters
|
|
346
|
+
form_params = opts[:form_params] || {}
|
|
347
|
+
|
|
348
|
+
# http body (model)
|
|
349
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(crm_get_input)
|
|
350
|
+
|
|
351
|
+
# return_type
|
|
352
|
+
return_type = opts[:debug_return_type] || 'CrmDealGetOutput'
|
|
353
|
+
|
|
354
|
+
# auth_names
|
|
355
|
+
auth_names = opts[:debug_auth_names] || ['SdkKey']
|
|
356
|
+
|
|
357
|
+
new_options = opts.merge(
|
|
358
|
+
:operation => :"DefaultApi.get_crm_deal",
|
|
359
|
+
:header_params => header_params,
|
|
360
|
+
:query_params => query_params,
|
|
361
|
+
:form_params => form_params,
|
|
362
|
+
:body => post_body,
|
|
363
|
+
:auth_names => auth_names,
|
|
364
|
+
:return_type => return_type
|
|
365
|
+
)
|
|
366
|
+
|
|
367
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
368
|
+
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}"
|
|
370
|
+
end
|
|
371
|
+
return data, status_code, headers
|
|
372
|
+
end
|
|
373
|
+
|
|
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.
|
|
376
|
+
# @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)
|
|
380
|
+
data
|
|
381
|
+
end
|
|
382
|
+
|
|
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.
|
|
385
|
+
# @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 = {})
|
|
388
|
+
if @api_client.config.debugging
|
|
389
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.get_guide ...'
|
|
390
|
+
end
|
|
391
|
+
# resource path
|
|
392
|
+
local_var_path = '/sdk/v1/guide'
|
|
393
|
+
|
|
394
|
+
# query parameters
|
|
395
|
+
query_params = opts[:query_params] || {}
|
|
396
|
+
|
|
397
|
+
# header parameters
|
|
398
|
+
header_params = opts[:header_params] || {}
|
|
399
|
+
# HTTP header 'Accept' (if needed)
|
|
400
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
401
|
+
|
|
402
|
+
# form parameters
|
|
403
|
+
form_params = opts[:form_params] || {}
|
|
404
|
+
|
|
405
|
+
# http body (model)
|
|
406
|
+
post_body = opts[:debug_body]
|
|
407
|
+
|
|
408
|
+
# return_type
|
|
409
|
+
return_type = opts[:debug_return_type] || 'GetGuideOutput'
|
|
410
|
+
|
|
411
|
+
# auth_names
|
|
412
|
+
auth_names = opts[:debug_auth_names] || ['SdkKey']
|
|
413
|
+
|
|
414
|
+
new_options = opts.merge(
|
|
415
|
+
:operation => :"DefaultApi.get_guide",
|
|
416
|
+
:header_params => header_params,
|
|
417
|
+
:query_params => query_params,
|
|
418
|
+
:form_params => form_params,
|
|
419
|
+
:body => post_body,
|
|
420
|
+
:auth_names => auth_names,
|
|
421
|
+
:return_type => return_type
|
|
422
|
+
)
|
|
423
|
+
|
|
424
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
425
|
+
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}"
|
|
427
|
+
end
|
|
428
|
+
return data, status_code, headers
|
|
429
|
+
end
|
|
430
|
+
|
|
431
|
+
# List companies in one shape
|
|
432
|
+
# One page of an end customer's companies, in the same shape whichever CRM they use. Pass next as cursor for the following page.
|
|
433
|
+
# @param crm_list_input [CrmListInput]
|
|
434
|
+
# @param [Hash] opts the optional parameters
|
|
435
|
+
# @return [CrmCompanyListOutput]
|
|
436
|
+
def list_crm_companies(crm_list_input, opts = {})
|
|
437
|
+
data, _status_code, _headers = list_crm_companies_with_http_info(crm_list_input, opts)
|
|
438
|
+
data
|
|
439
|
+
end
|
|
440
|
+
|
|
441
|
+
# List companies in one shape
|
|
442
|
+
# One page of an end customer's companies, in the same shape whichever CRM they use. Pass next as cursor for the following page.
|
|
443
|
+
# @param crm_list_input [CrmListInput]
|
|
444
|
+
# @param [Hash] opts the optional parameters
|
|
445
|
+
# @return [Array<(CrmCompanyListOutput, Integer, Hash)>] CrmCompanyListOutput data, response status code and response headers
|
|
446
|
+
def list_crm_companies_with_http_info(crm_list_input, opts = {})
|
|
447
|
+
if @api_client.config.debugging
|
|
448
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.list_crm_companies ...'
|
|
449
|
+
end
|
|
450
|
+
# verify the required parameter 'crm_list_input' is set
|
|
451
|
+
if @api_client.config.client_side_validation && crm_list_input.nil?
|
|
452
|
+
fail ArgumentError, "Missing the required parameter 'crm_list_input' when calling DefaultApi.list_crm_companies"
|
|
453
|
+
end
|
|
454
|
+
# resource path
|
|
455
|
+
local_var_path = '/sdk/v1/crm/companies/list'
|
|
456
|
+
|
|
457
|
+
# query parameters
|
|
458
|
+
query_params = opts[:query_params] || {}
|
|
459
|
+
|
|
460
|
+
# header parameters
|
|
461
|
+
header_params = opts[:header_params] || {}
|
|
462
|
+
# HTTP header 'Accept' (if needed)
|
|
463
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
464
|
+
# HTTP header 'Content-Type'
|
|
465
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
466
|
+
if !content_type.nil?
|
|
467
|
+
header_params['Content-Type'] = content_type
|
|
468
|
+
end
|
|
469
|
+
|
|
470
|
+
# form parameters
|
|
471
|
+
form_params = opts[:form_params] || {}
|
|
472
|
+
|
|
473
|
+
# http body (model)
|
|
474
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(crm_list_input)
|
|
475
|
+
|
|
476
|
+
# return_type
|
|
477
|
+
return_type = opts[:debug_return_type] || 'CrmCompanyListOutput'
|
|
478
|
+
|
|
479
|
+
# auth_names
|
|
480
|
+
auth_names = opts[:debug_auth_names] || ['SdkKey']
|
|
481
|
+
|
|
482
|
+
new_options = opts.merge(
|
|
483
|
+
:operation => :"DefaultApi.list_crm_companies",
|
|
484
|
+
:header_params => header_params,
|
|
485
|
+
:query_params => query_params,
|
|
486
|
+
:form_params => form_params,
|
|
487
|
+
:body => post_body,
|
|
488
|
+
:auth_names => auth_names,
|
|
489
|
+
:return_type => return_type
|
|
490
|
+
)
|
|
491
|
+
|
|
492
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
493
|
+
if @api_client.config.debugging
|
|
494
|
+
@api_client.config.logger.debug "API called: DefaultApi#list_crm_companies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
495
|
+
end
|
|
496
|
+
return data, status_code, headers
|
|
497
|
+
end
|
|
498
|
+
|
|
499
|
+
# List contacts in one shape
|
|
500
|
+
# One page of an end customer's contacts, in the same shape whichever CRM they use. Pass next as cursor for the following page.
|
|
501
|
+
# @param crm_list_input [CrmListInput]
|
|
502
|
+
# @param [Hash] opts the optional parameters
|
|
503
|
+
# @return [CrmContactListOutput]
|
|
504
|
+
def list_crm_contacts(crm_list_input, opts = {})
|
|
505
|
+
data, _status_code, _headers = list_crm_contacts_with_http_info(crm_list_input, opts)
|
|
506
|
+
data
|
|
507
|
+
end
|
|
508
|
+
|
|
509
|
+
# List contacts in one shape
|
|
510
|
+
# One page of an end customer's contacts, in the same shape whichever CRM they use. Pass next as cursor for the following page.
|
|
511
|
+
# @param crm_list_input [CrmListInput]
|
|
512
|
+
# @param [Hash] opts the optional parameters
|
|
513
|
+
# @return [Array<(CrmContactListOutput, Integer, Hash)>] CrmContactListOutput data, response status code and response headers
|
|
514
|
+
def list_crm_contacts_with_http_info(crm_list_input, opts = {})
|
|
515
|
+
if @api_client.config.debugging
|
|
516
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.list_crm_contacts ...'
|
|
517
|
+
end
|
|
518
|
+
# verify the required parameter 'crm_list_input' is set
|
|
519
|
+
if @api_client.config.client_side_validation && crm_list_input.nil?
|
|
520
|
+
fail ArgumentError, "Missing the required parameter 'crm_list_input' when calling DefaultApi.list_crm_contacts"
|
|
521
|
+
end
|
|
522
|
+
# resource path
|
|
523
|
+
local_var_path = '/sdk/v1/crm/contacts/list'
|
|
524
|
+
|
|
525
|
+
# query parameters
|
|
526
|
+
query_params = opts[:query_params] || {}
|
|
527
|
+
|
|
528
|
+
# header parameters
|
|
529
|
+
header_params = opts[:header_params] || {}
|
|
530
|
+
# HTTP header 'Accept' (if needed)
|
|
531
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
532
|
+
# HTTP header 'Content-Type'
|
|
533
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
534
|
+
if !content_type.nil?
|
|
535
|
+
header_params['Content-Type'] = content_type
|
|
536
|
+
end
|
|
537
|
+
|
|
538
|
+
# form parameters
|
|
539
|
+
form_params = opts[:form_params] || {}
|
|
540
|
+
|
|
541
|
+
# http body (model)
|
|
542
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(crm_list_input)
|
|
543
|
+
|
|
544
|
+
# return_type
|
|
545
|
+
return_type = opts[:debug_return_type] || 'CrmContactListOutput'
|
|
546
|
+
|
|
547
|
+
# auth_names
|
|
548
|
+
auth_names = opts[:debug_auth_names] || ['SdkKey']
|
|
549
|
+
|
|
550
|
+
new_options = opts.merge(
|
|
551
|
+
:operation => :"DefaultApi.list_crm_contacts",
|
|
552
|
+
:header_params => header_params,
|
|
553
|
+
:query_params => query_params,
|
|
554
|
+
:form_params => form_params,
|
|
555
|
+
:body => post_body,
|
|
556
|
+
:auth_names => auth_names,
|
|
557
|
+
:return_type => return_type
|
|
558
|
+
)
|
|
559
|
+
|
|
560
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
561
|
+
if @api_client.config.debugging
|
|
562
|
+
@api_client.config.logger.debug "API called: DefaultApi#list_crm_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
563
|
+
end
|
|
564
|
+
return data, status_code, headers
|
|
565
|
+
end
|
|
566
|
+
|
|
567
|
+
# List deals in one shape
|
|
568
|
+
# One page of an end customer's deals, in the same shape whichever CRM they use. Pass next as cursor for the following page.
|
|
569
|
+
# @param crm_list_input [CrmListInput]
|
|
570
|
+
# @param [Hash] opts the optional parameters
|
|
571
|
+
# @return [CrmDealListOutput]
|
|
572
|
+
def list_crm_deals(crm_list_input, opts = {})
|
|
573
|
+
data, _status_code, _headers = list_crm_deals_with_http_info(crm_list_input, opts)
|
|
574
|
+
data
|
|
575
|
+
end
|
|
576
|
+
|
|
577
|
+
# List deals in one shape
|
|
578
|
+
# One page of an end customer's deals, in the same shape whichever CRM they use. Pass next as cursor for the following page.
|
|
579
|
+
# @param crm_list_input [CrmListInput]
|
|
580
|
+
# @param [Hash] opts the optional parameters
|
|
581
|
+
# @return [Array<(CrmDealListOutput, Integer, Hash)>] CrmDealListOutput data, response status code and response headers
|
|
582
|
+
def list_crm_deals_with_http_info(crm_list_input, opts = {})
|
|
583
|
+
if @api_client.config.debugging
|
|
584
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.list_crm_deals ...'
|
|
585
|
+
end
|
|
586
|
+
# verify the required parameter 'crm_list_input' is set
|
|
587
|
+
if @api_client.config.client_side_validation && crm_list_input.nil?
|
|
588
|
+
fail ArgumentError, "Missing the required parameter 'crm_list_input' when calling DefaultApi.list_crm_deals"
|
|
589
|
+
end
|
|
590
|
+
# resource path
|
|
591
|
+
local_var_path = '/sdk/v1/crm/deals/list'
|
|
592
|
+
|
|
593
|
+
# query parameters
|
|
594
|
+
query_params = opts[:query_params] || {}
|
|
595
|
+
|
|
596
|
+
# header parameters
|
|
597
|
+
header_params = opts[:header_params] || {}
|
|
598
|
+
# HTTP header 'Accept' (if needed)
|
|
599
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
600
|
+
# HTTP header 'Content-Type'
|
|
601
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
602
|
+
if !content_type.nil?
|
|
603
|
+
header_params['Content-Type'] = content_type
|
|
604
|
+
end
|
|
605
|
+
|
|
606
|
+
# form parameters
|
|
607
|
+
form_params = opts[:form_params] || {}
|
|
608
|
+
|
|
609
|
+
# http body (model)
|
|
610
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(crm_list_input)
|
|
611
|
+
|
|
612
|
+
# return_type
|
|
613
|
+
return_type = opts[:debug_return_type] || 'CrmDealListOutput'
|
|
614
|
+
|
|
615
|
+
# auth_names
|
|
616
|
+
auth_names = opts[:debug_auth_names] || ['SdkKey']
|
|
617
|
+
|
|
618
|
+
new_options = opts.merge(
|
|
619
|
+
:operation => :"DefaultApi.list_crm_deals",
|
|
620
|
+
:header_params => header_params,
|
|
621
|
+
:query_params => query_params,
|
|
622
|
+
:form_params => form_params,
|
|
623
|
+
:body => post_body,
|
|
624
|
+
:auth_names => auth_names,
|
|
625
|
+
:return_type => return_type
|
|
626
|
+
)
|
|
627
|
+
|
|
628
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
629
|
+
if @api_client.config.debugging
|
|
630
|
+
@api_client.config.logger.debug "API called: DefaultApi#list_crm_deals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
631
|
+
end
|
|
632
|
+
return data, status_code, headers
|
|
633
|
+
end
|
|
634
|
+
|
|
635
|
+
# 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.
|
|
637
|
+
# @param [Hash] opts the optional parameters
|
|
638
|
+
# @option opts [String] :platform Narrows the list to one platform.
|
|
639
|
+
# @return [ListFunctionsOutput]
|
|
640
|
+
def list_functions(opts = {})
|
|
641
|
+
data, _status_code, _headers = list_functions_with_http_info(opts)
|
|
642
|
+
data
|
|
643
|
+
end
|
|
644
|
+
|
|
645
|
+
# 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.
|
|
647
|
+
# @param [Hash] opts the optional parameters
|
|
648
|
+
# @option opts [String] :platform Narrows the list to one platform.
|
|
649
|
+
# @return [Array<(ListFunctionsOutput, Integer, Hash)>] ListFunctionsOutput data, response status code and response headers
|
|
650
|
+
def list_functions_with_http_info(opts = {})
|
|
651
|
+
if @api_client.config.debugging
|
|
652
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.list_functions ...'
|
|
653
|
+
end
|
|
654
|
+
pattern = Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
|
|
655
|
+
if @api_client.config.client_side_validation && !opts[:'platform'].nil? && opts[:'platform'] !~ pattern
|
|
656
|
+
fail ArgumentError, "invalid value for 'opts[:\"platform\"]' when calling DefaultApi.list_functions, must conform to the pattern #{pattern}."
|
|
657
|
+
end
|
|
658
|
+
|
|
659
|
+
# resource path
|
|
660
|
+
local_var_path = '/sdk/v1/functions'
|
|
661
|
+
|
|
662
|
+
# query parameters
|
|
663
|
+
query_params = opts[:query_params] || {}
|
|
664
|
+
query_params[:'platform'] = opts[:'platform'] if !opts[:'platform'].nil?
|
|
665
|
+
|
|
666
|
+
# header parameters
|
|
667
|
+
header_params = opts[:header_params] || {}
|
|
668
|
+
# HTTP header 'Accept' (if needed)
|
|
669
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
670
|
+
|
|
671
|
+
# form parameters
|
|
672
|
+
form_params = opts[:form_params] || {}
|
|
673
|
+
|
|
674
|
+
# http body (model)
|
|
675
|
+
post_body = opts[:debug_body]
|
|
676
|
+
|
|
677
|
+
# return_type
|
|
678
|
+
return_type = opts[:debug_return_type] || 'ListFunctionsOutput'
|
|
679
|
+
|
|
680
|
+
# auth_names
|
|
681
|
+
auth_names = opts[:debug_auth_names] || ['SdkKey']
|
|
682
|
+
|
|
683
|
+
new_options = opts.merge(
|
|
684
|
+
:operation => :"DefaultApi.list_functions",
|
|
685
|
+
:header_params => header_params,
|
|
686
|
+
:query_params => query_params,
|
|
687
|
+
:form_params => form_params,
|
|
688
|
+
:body => post_body,
|
|
689
|
+
:auth_names => auth_names,
|
|
690
|
+
:return_type => return_type
|
|
691
|
+
)
|
|
692
|
+
|
|
693
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
694
|
+
if @api_client.config.debugging
|
|
695
|
+
@api_client.config.logger.debug "API called: DefaultApi#list_functions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
696
|
+
end
|
|
697
|
+
return data, status_code, headers
|
|
698
|
+
end
|
|
699
|
+
|
|
700
|
+
# Call anything else on the end customer's platform
|
|
701
|
+
# 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
|
+
# @param platform_request_input [PlatformRequestInput]
|
|
703
|
+
# @param [Hash] opts the optional parameters
|
|
704
|
+
# @return [PlatformRequestOutput]
|
|
705
|
+
def platform_request(platform_request_input, opts = {})
|
|
706
|
+
data, _status_code, _headers = platform_request_with_http_info(platform_request_input, opts)
|
|
707
|
+
data
|
|
708
|
+
end
|
|
709
|
+
|
|
710
|
+
# Call anything else on the end customer's platform
|
|
711
|
+
# 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.
|
|
712
|
+
# @param platform_request_input [PlatformRequestInput]
|
|
713
|
+
# @param [Hash] opts the optional parameters
|
|
714
|
+
# @return [Array<(PlatformRequestOutput, Integer, Hash)>] PlatformRequestOutput data, response status code and response headers
|
|
715
|
+
def platform_request_with_http_info(platform_request_input, opts = {})
|
|
716
|
+
if @api_client.config.debugging
|
|
717
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.platform_request ...'
|
|
718
|
+
end
|
|
719
|
+
# verify the required parameter 'platform_request_input' is set
|
|
720
|
+
if @api_client.config.client_side_validation && platform_request_input.nil?
|
|
721
|
+
fail ArgumentError, "Missing the required parameter 'platform_request_input' when calling DefaultApi.platform_request"
|
|
722
|
+
end
|
|
723
|
+
# resource path
|
|
724
|
+
local_var_path = '/sdk/v1/request'
|
|
725
|
+
|
|
726
|
+
# query parameters
|
|
727
|
+
query_params = opts[:query_params] || {}
|
|
728
|
+
|
|
729
|
+
# header parameters
|
|
730
|
+
header_params = opts[:header_params] || {}
|
|
731
|
+
# HTTP header 'Accept' (if needed)
|
|
732
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
733
|
+
# HTTP header 'Content-Type'
|
|
734
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
735
|
+
if !content_type.nil?
|
|
736
|
+
header_params['Content-Type'] = content_type
|
|
737
|
+
end
|
|
738
|
+
|
|
739
|
+
# form parameters
|
|
740
|
+
form_params = opts[:form_params] || {}
|
|
741
|
+
|
|
742
|
+
# http body (model)
|
|
743
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(platform_request_input)
|
|
744
|
+
|
|
745
|
+
# return_type
|
|
746
|
+
return_type = opts[:debug_return_type] || 'PlatformRequestOutput'
|
|
747
|
+
|
|
748
|
+
# auth_names
|
|
749
|
+
auth_names = opts[:debug_auth_names] || ['SdkKey']
|
|
750
|
+
|
|
751
|
+
new_options = opts.merge(
|
|
752
|
+
:operation => :"DefaultApi.platform_request",
|
|
753
|
+
:header_params => header_params,
|
|
754
|
+
:query_params => query_params,
|
|
755
|
+
:form_params => form_params,
|
|
756
|
+
:body => post_body,
|
|
757
|
+
:auth_names => auth_names,
|
|
758
|
+
:return_type => return_type
|
|
759
|
+
)
|
|
760
|
+
|
|
761
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
762
|
+
if @api_client.config.debugging
|
|
763
|
+
@api_client.config.logger.debug "API called: DefaultApi#platform_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
764
|
+
end
|
|
765
|
+
return data, status_code, headers
|
|
766
|
+
end
|
|
767
|
+
|
|
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]
|
|
771
|
+
# @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)
|
|
775
|
+
data
|
|
776
|
+
end
|
|
777
|
+
|
|
778
|
+
# Create or update a record
|
|
779
|
+
# 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.
|
|
780
|
+
# @param post_input [PostInput]
|
|
781
|
+
# @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 = {})
|
|
784
|
+
if @api_client.config.debugging
|
|
785
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.post_record ...'
|
|
786
|
+
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"
|
|
790
|
+
end
|
|
791
|
+
# resource path
|
|
792
|
+
local_var_path = '/sdk/v1/post'
|
|
793
|
+
|
|
794
|
+
# query parameters
|
|
795
|
+
query_params = opts[:query_params] || {}
|
|
796
|
+
|
|
797
|
+
# header parameters
|
|
798
|
+
header_params = opts[:header_params] || {}
|
|
799
|
+
# HTTP header 'Accept' (if needed)
|
|
800
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
801
|
+
# HTTP header 'Content-Type'
|
|
802
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
803
|
+
if !content_type.nil?
|
|
804
|
+
header_params['Content-Type'] = content_type
|
|
805
|
+
end
|
|
806
|
+
|
|
807
|
+
# form parameters
|
|
808
|
+
form_params = opts[:form_params] || {}
|
|
809
|
+
|
|
810
|
+
# http body (model)
|
|
811
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_input)
|
|
812
|
+
|
|
813
|
+
# return_type
|
|
814
|
+
return_type = opts[:debug_return_type] || 'PostOutput'
|
|
815
|
+
|
|
816
|
+
# auth_names
|
|
817
|
+
auth_names = opts[:debug_auth_names] || ['SdkKey']
|
|
818
|
+
|
|
819
|
+
new_options = opts.merge(
|
|
820
|
+
:operation => :"DefaultApi.post_record",
|
|
821
|
+
:header_params => header_params,
|
|
822
|
+
:query_params => query_params,
|
|
823
|
+
:form_params => form_params,
|
|
824
|
+
:body => post_body,
|
|
825
|
+
:auth_names => auth_names,
|
|
826
|
+
:return_type => return_type
|
|
827
|
+
)
|
|
828
|
+
|
|
829
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
830
|
+
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}"
|
|
832
|
+
end
|
|
833
|
+
return data, status_code, headers
|
|
834
|
+
end
|
|
835
|
+
|
|
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]
|
|
839
|
+
# @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)
|
|
843
|
+
data
|
|
844
|
+
end
|
|
845
|
+
|
|
846
|
+
# Read records, one page at a time
|
|
847
|
+
# One page of records from the end customer's HubSpot and a marker for the next page. next is null on the last page.
|
|
848
|
+
# @param pull_input [PullInput]
|
|
849
|
+
# @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 = {})
|
|
852
|
+
if @api_client.config.debugging
|
|
853
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.pull_records ...'
|
|
854
|
+
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"
|
|
858
|
+
end
|
|
859
|
+
# resource path
|
|
860
|
+
local_var_path = '/sdk/v1/pull'
|
|
861
|
+
|
|
862
|
+
# query parameters
|
|
863
|
+
query_params = opts[:query_params] || {}
|
|
864
|
+
|
|
865
|
+
# header parameters
|
|
866
|
+
header_params = opts[:header_params] || {}
|
|
867
|
+
# HTTP header 'Accept' (if needed)
|
|
868
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
869
|
+
# HTTP header 'Content-Type'
|
|
870
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
871
|
+
if !content_type.nil?
|
|
872
|
+
header_params['Content-Type'] = content_type
|
|
873
|
+
end
|
|
874
|
+
|
|
875
|
+
# form parameters
|
|
876
|
+
form_params = opts[:form_params] || {}
|
|
877
|
+
|
|
878
|
+
# http body (model)
|
|
879
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(pull_input)
|
|
880
|
+
|
|
881
|
+
# return_type
|
|
882
|
+
return_type = opts[:debug_return_type] || 'PullOutput'
|
|
883
|
+
|
|
884
|
+
# auth_names
|
|
885
|
+
auth_names = opts[:debug_auth_names] || ['SdkKey']
|
|
886
|
+
|
|
887
|
+
new_options = opts.merge(
|
|
888
|
+
:operation => :"DefaultApi.pull_records",
|
|
889
|
+
:header_params => header_params,
|
|
890
|
+
:query_params => query_params,
|
|
891
|
+
:form_params => form_params,
|
|
892
|
+
:body => post_body,
|
|
893
|
+
:auth_names => auth_names,
|
|
894
|
+
:return_type => return_type
|
|
895
|
+
)
|
|
896
|
+
|
|
897
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
898
|
+
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}"
|
|
900
|
+
end
|
|
901
|
+
return data, status_code, headers
|
|
902
|
+
end
|
|
903
|
+
|
|
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.
|
|
906
|
+
# @param run_input [RunInput]
|
|
907
|
+
# @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)
|
|
911
|
+
data
|
|
912
|
+
end
|
|
913
|
+
|
|
914
|
+
# Run one of your own functions
|
|
915
|
+
# 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.
|
|
916
|
+
# @param run_input [RunInput]
|
|
917
|
+
# @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 = {})
|
|
920
|
+
if @api_client.config.debugging
|
|
921
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.run_function ...'
|
|
922
|
+
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"
|
|
926
|
+
end
|
|
927
|
+
# resource path
|
|
928
|
+
local_var_path = '/sdk/v1/run'
|
|
929
|
+
|
|
930
|
+
# query parameters
|
|
931
|
+
query_params = opts[:query_params] || {}
|
|
932
|
+
|
|
933
|
+
# header parameters
|
|
934
|
+
header_params = opts[:header_params] || {}
|
|
935
|
+
# HTTP header 'Accept' (if needed)
|
|
936
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
937
|
+
# HTTP header 'Content-Type'
|
|
938
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
939
|
+
if !content_type.nil?
|
|
940
|
+
header_params['Content-Type'] = content_type
|
|
941
|
+
end
|
|
942
|
+
|
|
943
|
+
# form parameters
|
|
944
|
+
form_params = opts[:form_params] || {}
|
|
945
|
+
|
|
946
|
+
# http body (model)
|
|
947
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(run_input)
|
|
948
|
+
|
|
949
|
+
# return_type
|
|
950
|
+
return_type = opts[:debug_return_type] || 'RunOutput'
|
|
951
|
+
|
|
952
|
+
# auth_names
|
|
953
|
+
auth_names = opts[:debug_auth_names] || ['SdkKey']
|
|
954
|
+
|
|
955
|
+
new_options = opts.merge(
|
|
956
|
+
:operation => :"DefaultApi.run_function",
|
|
957
|
+
:header_params => header_params,
|
|
958
|
+
:query_params => query_params,
|
|
959
|
+
:form_params => form_params,
|
|
960
|
+
:body => post_body,
|
|
961
|
+
:auth_names => auth_names,
|
|
962
|
+
:return_type => return_type
|
|
963
|
+
)
|
|
964
|
+
|
|
965
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
966
|
+
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}"
|
|
968
|
+
end
|
|
969
|
+
return data, status_code, headers
|
|
970
|
+
end
|
|
971
|
+
end
|
|
972
|
+
end
|