carbon_ruby_sdk 0.2.35 → 0.2.37

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 (92) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +3 -3
  3. data/README.md +335 -2
  4. data/lib/carbon_ruby_sdk/api/crm_api.rb +909 -0
  5. data/lib/carbon_ruby_sdk/models/account.rb +398 -0
  6. data/lib/carbon_ruby_sdk/models/account_filters.rb +226 -0
  7. data/lib/carbon_ruby_sdk/models/account_response.rb +246 -0
  8. data/lib/carbon_ruby_sdk/models/accounts_order_by.rb +39 -0
  9. data/lib/carbon_ruby_sdk/models/accounts_order_by_nullable.rb +39 -0
  10. data/lib/carbon_ruby_sdk/models/accounts_request.rb +293 -0
  11. data/lib/carbon_ruby_sdk/models/address.rb +276 -0
  12. data/lib/carbon_ruby_sdk/models/base_includes.rb +36 -0
  13. data/lib/carbon_ruby_sdk/models/contact.rb +434 -0
  14. data/lib/carbon_ruby_sdk/models/contact_filters.rb +236 -0
  15. data/lib/carbon_ruby_sdk/models/contacts_order_by.rb +39 -0
  16. data/lib/carbon_ruby_sdk/models/contacts_order_by_nullable.rb +39 -0
  17. data/lib/carbon_ruby_sdk/models/contacts_request.rb +293 -0
  18. data/lib/carbon_ruby_sdk/models/contacts_response.rb +246 -0
  19. data/lib/carbon_ruby_sdk/models/data_source_type.rb +2 -1
  20. data/lib/carbon_ruby_sdk/models/data_source_type_nullable.rb +2 -1
  21. data/lib/carbon_ruby_sdk/models/email.rb +230 -0
  22. data/lib/carbon_ruby_sdk/models/event.rb +370 -0
  23. data/lib/carbon_ruby_sdk/models/file_formats.rb +2 -1
  24. data/lib/carbon_ruby_sdk/models/file_formats_nullable.rb +2 -1
  25. data/lib/carbon_ruby_sdk/models/lead.rb +468 -0
  26. data/lib/carbon_ruby_sdk/models/lead_filters.rb +246 -0
  27. data/lib/carbon_ruby_sdk/models/leads_order_by.rb +38 -0
  28. data/lib/carbon_ruby_sdk/models/leads_order_by_nullable.rb +38 -0
  29. data/lib/carbon_ruby_sdk/models/leads_request.rb +293 -0
  30. data/lib/carbon_ruby_sdk/models/leads_response.rb +246 -0
  31. data/lib/carbon_ruby_sdk/models/opportunities_order_by.rb +40 -0
  32. data/lib/carbon_ruby_sdk/models/opportunities_order_by_nullable.rb +40 -0
  33. data/lib/carbon_ruby_sdk/models/opportunities_request.rb +293 -0
  34. data/lib/carbon_ruby_sdk/models/opportunities_response.rb +246 -0
  35. data/lib/carbon_ruby_sdk/models/opportunity.rb +400 -0
  36. data/lib/carbon_ruby_sdk/models/opportunity_filters.rb +246 -0
  37. data/lib/carbon_ruby_sdk/models/opportunity_status.rb +36 -0
  38. data/lib/carbon_ruby_sdk/models/opportunity_status_nullable.rb +36 -0
  39. data/lib/carbon_ruby_sdk/models/order_dir_v2_nullable.rb +36 -0
  40. data/lib/carbon_ruby_sdk/models/partial_account.rb +216 -0
  41. data/lib/carbon_ruby_sdk/models/partial_account_nullable.rb +216 -0
  42. data/lib/carbon_ruby_sdk/models/partial_contact.rb +216 -0
  43. data/lib/carbon_ruby_sdk/models/partial_contact_nullable.rb +216 -0
  44. data/lib/carbon_ruby_sdk/models/partial_owner.rb +216 -0
  45. data/lib/carbon_ruby_sdk/models/partial_owner_nullable.rb +216 -0
  46. data/lib/carbon_ruby_sdk/models/phone_number.rb +230 -0
  47. data/lib/carbon_ruby_sdk/models/sent_webhook_payload.rb +2 -2
  48. data/lib/carbon_ruby_sdk/models/task.rb +346 -0
  49. data/lib/carbon_ruby_sdk/version.rb +1 -1
  50. data/lib/carbon_ruby_sdk.rb +42 -0
  51. data/spec/api/crm_api_spec.rb +129 -0
  52. data/spec/models/account_filters_spec.rb +34 -0
  53. data/spec/models/account_response_spec.rb +40 -0
  54. data/spec/models/account_spec.rb +118 -0
  55. data/spec/models/accounts_order_by_nullable_spec.rb +22 -0
  56. data/spec/models/accounts_order_by_spec.rb +22 -0
  57. data/spec/models/accounts_request_spec.rb +70 -0
  58. data/spec/models/address_spec.rb +64 -0
  59. data/spec/models/base_includes_spec.rb +22 -0
  60. data/spec/models/contact_filters_spec.rb +40 -0
  61. data/spec/models/contact_spec.rb +136 -0
  62. data/spec/models/contacts_order_by_nullable_spec.rb +22 -0
  63. data/spec/models/contacts_order_by_spec.rb +22 -0
  64. data/spec/models/contacts_request_spec.rb +70 -0
  65. data/spec/models/contacts_response_spec.rb +40 -0
  66. data/spec/models/email_spec.rb +34 -0
  67. data/spec/models/event_spec.rb +106 -0
  68. data/spec/models/lead_filters_spec.rb +46 -0
  69. data/spec/models/lead_spec.rb +154 -0
  70. data/spec/models/leads_order_by_nullable_spec.rb +22 -0
  71. data/spec/models/leads_order_by_spec.rb +22 -0
  72. data/spec/models/leads_request_spec.rb +70 -0
  73. data/spec/models/leads_response_spec.rb +40 -0
  74. data/spec/models/opportunities_order_by_nullable_spec.rb +22 -0
  75. data/spec/models/opportunities_order_by_spec.rb +22 -0
  76. data/spec/models/opportunities_request_spec.rb +70 -0
  77. data/spec/models/opportunities_response_spec.rb +40 -0
  78. data/spec/models/opportunity_filters_spec.rb +46 -0
  79. data/spec/models/opportunity_spec.rb +124 -0
  80. data/spec/models/opportunity_status_nullable_spec.rb +22 -0
  81. data/spec/models/opportunity_status_spec.rb +22 -0
  82. data/spec/models/order_dir_v2_nullable_spec.rb +22 -0
  83. data/spec/models/partial_account_nullable_spec.rb +28 -0
  84. data/spec/models/partial_account_spec.rb +28 -0
  85. data/spec/models/partial_contact_nullable_spec.rb +28 -0
  86. data/spec/models/partial_contact_spec.rb +28 -0
  87. data/spec/models/partial_owner_nullable_spec.rb +28 -0
  88. data/spec/models/partial_owner_spec.rb +28 -0
  89. data/spec/models/phone_number_spec.rb +34 -0
  90. data/spec/models/sent_webhook_payload_spec.rb +1 -1
  91. data/spec/models/task_spec.rb +94 -0
  92. metadata +122 -2
@@ -0,0 +1,909 @@
1
+ =begin
2
+ #Carbon
3
+
4
+ #Connect external data to LLMs, no matter the source.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ =end
8
+
9
+ require 'cgi'
10
+
11
+ module Carbon
12
+ class CRMApi
13
+ attr_accessor :api_client
14
+
15
+ def initialize(api_client = ApiClient.default)
16
+ @api_client = api_client
17
+ end
18
+
19
+ # Get Account
20
+ #
21
+ # @param id [String]
22
+ # @param data_source_id [Integer]
23
+ # @param include_remote_data [Boolean]
24
+ # @param includes [Array<BaseIncludes>]
25
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
26
+ def get_account(id:, data_source_id:, include_remote_data: false, includes: SENTINEL, extra: {})
27
+ extra[:include_remote_data] = include_remote_data if include_remote_data != SENTINEL
28
+ extra[:includes] = includes if includes != SENTINEL
29
+ api_response = get_account_with_http_info_impl(id, data_source_id, extra)
30
+ api_response.data
31
+ end
32
+
33
+ # Get Account
34
+ #
35
+ # @param id [String]
36
+ # @param data_source_id [Integer]
37
+ # @param include_remote_data [Boolean]
38
+ # @param includes [Array<BaseIncludes>]
39
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
40
+ def get_account_with_http_info(id:, data_source_id:, include_remote_data: false, includes: SENTINEL, extra: {})
41
+ extra[:include_remote_data] = include_remote_data if include_remote_data != SENTINEL
42
+ extra[:includes] = includes if includes != SENTINEL
43
+ get_account_with_http_info_impl(id, data_source_id, extra)
44
+ end
45
+
46
+ # Get Account
47
+ # @param id [String]
48
+ # @param data_source_id [Integer]
49
+ # @param [Hash] opts the optional parameters
50
+ # @option opts [Boolean] :include_remote_data (default to false)
51
+ # @option opts [Array<BaseIncludes>] :includes
52
+ # @return [Account]
53
+ private def get_account_impl(id, data_source_id, opts = {})
54
+ data, _status_code, _headers = get_account_with_http_info(id, data_source_id, opts)
55
+ data
56
+ end
57
+
58
+ # Get Account
59
+ # @param id [String]
60
+ # @param data_source_id [Integer]
61
+ # @param [Hash] opts the optional parameters
62
+ # @option opts [Boolean] :include_remote_data (default to false)
63
+ # @option opts [Array<BaseIncludes>] :includes
64
+ # @return [APIResponse] data is Account, status code, headers and response
65
+ private def get_account_with_http_info_impl(id, data_source_id, opts = {})
66
+ if @api_client.config.debugging
67
+ @api_client.config.logger.debug 'Calling API: CRMApi.get_account ...'
68
+ end
69
+ # verify the required parameter 'id' is set
70
+ if @api_client.config.client_side_validation && id.nil?
71
+ fail ArgumentError, "Missing the required parameter 'id' when calling CRMApi.get_account"
72
+ end
73
+ # verify the required parameter 'data_source_id' is set
74
+ if @api_client.config.client_side_validation && data_source_id.nil?
75
+ fail ArgumentError, "Missing the required parameter 'data_source_id' when calling CRMApi.get_account"
76
+ end
77
+ # resource path
78
+ local_var_path = '/integrations/data/crm/accounts/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
79
+
80
+ # query parameters
81
+ query_params = opts[:query_params] || {}
82
+ query_params[:'data_source_id'] = data_source_id
83
+ query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
84
+ query_params[:'includes'] = @api_client.build_collection_param(opts[:'includes'], :multi) if !opts[:'includes'].nil?
85
+
86
+ # header parameters
87
+ header_params = opts[:header_params] || {}
88
+ # HTTP header 'Accept' (if needed)
89
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
90
+
91
+ # form parameters
92
+ form_params = opts[:form_params] || {}
93
+
94
+ # http body (model)
95
+ post_body = opts[:debug_body]
96
+
97
+ # return_type
98
+ return_type = opts[:debug_return_type] || 'Account'
99
+
100
+ # auth_names
101
+ auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
102
+
103
+ new_options = opts.merge(
104
+ :operation => :"CRMApi.get_account",
105
+ :header_params => header_params,
106
+ :query_params => query_params,
107
+ :form_params => form_params,
108
+ :body => post_body,
109
+ :auth_names => auth_names,
110
+ :return_type => return_type
111
+ )
112
+
113
+ data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
114
+ if @api_client.config.debugging
115
+ @api_client.config.logger.debug "API called: CRMApi#get_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
116
+ end
117
+ APIResponse::new(data, status_code, headers, response)
118
+ end
119
+
120
+
121
+ # Get Accounts
122
+ #
123
+ # @param data_source_id [Integer]
124
+ # @param include_remote_data [Boolean]
125
+ # @param next_cursor [String]
126
+ # @param page_size [Integer]
127
+ # @param order_dir [OrderDirV2Nullable]
128
+ # @param includes [Array<BaseIncludes>]
129
+ # @param filters [AccountFilters]
130
+ # @param order_by [AccountsOrderByNullable]
131
+ # @param body [AccountsRequest]
132
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
133
+ def get_accounts(data_source_id:, include_remote_data: false, next_cursor: SENTINEL, page_size: SENTINEL, order_dir: 'asc', includes: SENTINEL, filters: SENTINEL, order_by: SENTINEL, extra: {})
134
+ _body = {}
135
+ _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
136
+ _body[:include_remote_data] = include_remote_data if include_remote_data != SENTINEL
137
+ _body[:next_cursor] = next_cursor if next_cursor != SENTINEL
138
+ _body[:page_size] = page_size if page_size != SENTINEL
139
+ _body[:order_dir] = order_dir if order_dir != SENTINEL
140
+ _body[:includes] = includes if includes != SENTINEL
141
+ _body[:filters] = filters if filters != SENTINEL
142
+ _body[:order_by] = order_by if order_by != SENTINEL
143
+ accounts_request = _body
144
+ api_response = get_accounts_with_http_info_impl(accounts_request, extra)
145
+ api_response.data
146
+ end
147
+
148
+ # Get Accounts
149
+ #
150
+ # @param data_source_id [Integer]
151
+ # @param include_remote_data [Boolean]
152
+ # @param next_cursor [String]
153
+ # @param page_size [Integer]
154
+ # @param order_dir [OrderDirV2Nullable]
155
+ # @param includes [Array<BaseIncludes>]
156
+ # @param filters [AccountFilters]
157
+ # @param order_by [AccountsOrderByNullable]
158
+ # @param body [AccountsRequest]
159
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
160
+ def get_accounts_with_http_info(data_source_id:, include_remote_data: false, next_cursor: SENTINEL, page_size: SENTINEL, order_dir: 'asc', includes: SENTINEL, filters: SENTINEL, order_by: SENTINEL, extra: {})
161
+ _body = {}
162
+ _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
163
+ _body[:include_remote_data] = include_remote_data if include_remote_data != SENTINEL
164
+ _body[:next_cursor] = next_cursor if next_cursor != SENTINEL
165
+ _body[:page_size] = page_size if page_size != SENTINEL
166
+ _body[:order_dir] = order_dir if order_dir != SENTINEL
167
+ _body[:includes] = includes if includes != SENTINEL
168
+ _body[:filters] = filters if filters != SENTINEL
169
+ _body[:order_by] = order_by if order_by != SENTINEL
170
+ accounts_request = _body
171
+ get_accounts_with_http_info_impl(accounts_request, extra)
172
+ end
173
+
174
+ # Get Accounts
175
+ # @param accounts_request [AccountsRequest]
176
+ # @param [Hash] opts the optional parameters
177
+ # @return [AccountResponse]
178
+ private def get_accounts_impl(accounts_request, opts = {})
179
+ data, _status_code, _headers = get_accounts_with_http_info(accounts_request, opts)
180
+ data
181
+ end
182
+
183
+ # Get Accounts
184
+ # @param accounts_request [AccountsRequest]
185
+ # @param [Hash] opts the optional parameters
186
+ # @return [APIResponse] data is AccountResponse, status code, headers and response
187
+ private def get_accounts_with_http_info_impl(accounts_request, opts = {})
188
+ if @api_client.config.debugging
189
+ @api_client.config.logger.debug 'Calling API: CRMApi.get_accounts ...'
190
+ end
191
+ # verify the required parameter 'accounts_request' is set
192
+ if @api_client.config.client_side_validation && accounts_request.nil?
193
+ fail ArgumentError, "Missing the required parameter 'accounts_request' when calling CRMApi.get_accounts"
194
+ end
195
+ # resource path
196
+ local_var_path = '/integrations/data/crm/accounts'
197
+
198
+ # query parameters
199
+ query_params = opts[:query_params] || {}
200
+
201
+ # header parameters
202
+ header_params = opts[:header_params] || {}
203
+ # HTTP header 'Accept' (if needed)
204
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
205
+ # HTTP header 'Content-Type'
206
+ content_type = @api_client.select_header_content_type(['application/json'])
207
+ if !content_type.nil?
208
+ header_params['Content-Type'] = content_type
209
+ end
210
+
211
+ # form parameters
212
+ form_params = opts[:form_params] || {}
213
+
214
+ # http body (model)
215
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(accounts_request)
216
+
217
+ # return_type
218
+ return_type = opts[:debug_return_type] || 'AccountResponse'
219
+
220
+ # auth_names
221
+ auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
222
+
223
+ new_options = opts.merge(
224
+ :operation => :"CRMApi.get_accounts",
225
+ :header_params => header_params,
226
+ :query_params => query_params,
227
+ :form_params => form_params,
228
+ :body => post_body,
229
+ :auth_names => auth_names,
230
+ :return_type => return_type
231
+ )
232
+
233
+ data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
234
+ if @api_client.config.debugging
235
+ @api_client.config.logger.debug "API called: CRMApi#get_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
236
+ end
237
+ APIResponse::new(data, status_code, headers, response)
238
+ end
239
+
240
+
241
+ # Get Contact
242
+ #
243
+ # @param id [String]
244
+ # @param data_source_id [Integer]
245
+ # @param include_remote_data [Boolean]
246
+ # @param includes [Array<BaseIncludes>]
247
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
248
+ def get_contact(id:, data_source_id:, include_remote_data: false, includes: SENTINEL, extra: {})
249
+ extra[:include_remote_data] = include_remote_data if include_remote_data != SENTINEL
250
+ extra[:includes] = includes if includes != SENTINEL
251
+ api_response = get_contact_with_http_info_impl(id, data_source_id, extra)
252
+ api_response.data
253
+ end
254
+
255
+ # Get Contact
256
+ #
257
+ # @param id [String]
258
+ # @param data_source_id [Integer]
259
+ # @param include_remote_data [Boolean]
260
+ # @param includes [Array<BaseIncludes>]
261
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
262
+ def get_contact_with_http_info(id:, data_source_id:, include_remote_data: false, includes: SENTINEL, extra: {})
263
+ extra[:include_remote_data] = include_remote_data if include_remote_data != SENTINEL
264
+ extra[:includes] = includes if includes != SENTINEL
265
+ get_contact_with_http_info_impl(id, data_source_id, extra)
266
+ end
267
+
268
+ # Get Contact
269
+ # @param id [String]
270
+ # @param data_source_id [Integer]
271
+ # @param [Hash] opts the optional parameters
272
+ # @option opts [Boolean] :include_remote_data (default to false)
273
+ # @option opts [Array<BaseIncludes>] :includes
274
+ # @return [Contact]
275
+ private def get_contact_impl(id, data_source_id, opts = {})
276
+ data, _status_code, _headers = get_contact_with_http_info(id, data_source_id, opts)
277
+ data
278
+ end
279
+
280
+ # Get Contact
281
+ # @param id [String]
282
+ # @param data_source_id [Integer]
283
+ # @param [Hash] opts the optional parameters
284
+ # @option opts [Boolean] :include_remote_data (default to false)
285
+ # @option opts [Array<BaseIncludes>] :includes
286
+ # @return [APIResponse] data is Contact, status code, headers and response
287
+ private def get_contact_with_http_info_impl(id, data_source_id, opts = {})
288
+ if @api_client.config.debugging
289
+ @api_client.config.logger.debug 'Calling API: CRMApi.get_contact ...'
290
+ end
291
+ # verify the required parameter 'id' is set
292
+ if @api_client.config.client_side_validation && id.nil?
293
+ fail ArgumentError, "Missing the required parameter 'id' when calling CRMApi.get_contact"
294
+ end
295
+ # verify the required parameter 'data_source_id' is set
296
+ if @api_client.config.client_side_validation && data_source_id.nil?
297
+ fail ArgumentError, "Missing the required parameter 'data_source_id' when calling CRMApi.get_contact"
298
+ end
299
+ # resource path
300
+ local_var_path = '/integrations/data/crm/contacts/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
301
+
302
+ # query parameters
303
+ query_params = opts[:query_params] || {}
304
+ query_params[:'data_source_id'] = data_source_id
305
+ query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
306
+ query_params[:'includes'] = @api_client.build_collection_param(opts[:'includes'], :multi) if !opts[:'includes'].nil?
307
+
308
+ # header parameters
309
+ header_params = opts[:header_params] || {}
310
+ # HTTP header 'Accept' (if needed)
311
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
312
+
313
+ # form parameters
314
+ form_params = opts[:form_params] || {}
315
+
316
+ # http body (model)
317
+ post_body = opts[:debug_body]
318
+
319
+ # return_type
320
+ return_type = opts[:debug_return_type] || 'Contact'
321
+
322
+ # auth_names
323
+ auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
324
+
325
+ new_options = opts.merge(
326
+ :operation => :"CRMApi.get_contact",
327
+ :header_params => header_params,
328
+ :query_params => query_params,
329
+ :form_params => form_params,
330
+ :body => post_body,
331
+ :auth_names => auth_names,
332
+ :return_type => return_type
333
+ )
334
+
335
+ data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
336
+ if @api_client.config.debugging
337
+ @api_client.config.logger.debug "API called: CRMApi#get_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
338
+ end
339
+ APIResponse::new(data, status_code, headers, response)
340
+ end
341
+
342
+
343
+ # Get Contacts
344
+ #
345
+ # @param data_source_id [Integer]
346
+ # @param include_remote_data [Boolean]
347
+ # @param next_cursor [String]
348
+ # @param page_size [Integer]
349
+ # @param order_dir [OrderDirV2Nullable]
350
+ # @param includes [Array<BaseIncludes>]
351
+ # @param filters [ContactFilters]
352
+ # @param order_by [ContactsOrderByNullable]
353
+ # @param body [ContactsRequest]
354
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
355
+ def get_contacts(data_source_id:, include_remote_data: false, next_cursor: SENTINEL, page_size: SENTINEL, order_dir: 'asc', includes: SENTINEL, filters: SENTINEL, order_by: SENTINEL, extra: {})
356
+ _body = {}
357
+ _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
358
+ _body[:include_remote_data] = include_remote_data if include_remote_data != SENTINEL
359
+ _body[:next_cursor] = next_cursor if next_cursor != SENTINEL
360
+ _body[:page_size] = page_size if page_size != SENTINEL
361
+ _body[:order_dir] = order_dir if order_dir != SENTINEL
362
+ _body[:includes] = includes if includes != SENTINEL
363
+ _body[:filters] = filters if filters != SENTINEL
364
+ _body[:order_by] = order_by if order_by != SENTINEL
365
+ contacts_request = _body
366
+ api_response = get_contacts_with_http_info_impl(contacts_request, extra)
367
+ api_response.data
368
+ end
369
+
370
+ # Get Contacts
371
+ #
372
+ # @param data_source_id [Integer]
373
+ # @param include_remote_data [Boolean]
374
+ # @param next_cursor [String]
375
+ # @param page_size [Integer]
376
+ # @param order_dir [OrderDirV2Nullable]
377
+ # @param includes [Array<BaseIncludes>]
378
+ # @param filters [ContactFilters]
379
+ # @param order_by [ContactsOrderByNullable]
380
+ # @param body [ContactsRequest]
381
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
382
+ def get_contacts_with_http_info(data_source_id:, include_remote_data: false, next_cursor: SENTINEL, page_size: SENTINEL, order_dir: 'asc', includes: SENTINEL, filters: SENTINEL, order_by: SENTINEL, extra: {})
383
+ _body = {}
384
+ _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
385
+ _body[:include_remote_data] = include_remote_data if include_remote_data != SENTINEL
386
+ _body[:next_cursor] = next_cursor if next_cursor != SENTINEL
387
+ _body[:page_size] = page_size if page_size != SENTINEL
388
+ _body[:order_dir] = order_dir if order_dir != SENTINEL
389
+ _body[:includes] = includes if includes != SENTINEL
390
+ _body[:filters] = filters if filters != SENTINEL
391
+ _body[:order_by] = order_by if order_by != SENTINEL
392
+ contacts_request = _body
393
+ get_contacts_with_http_info_impl(contacts_request, extra)
394
+ end
395
+
396
+ # Get Contacts
397
+ # @param contacts_request [ContactsRequest]
398
+ # @param [Hash] opts the optional parameters
399
+ # @return [ContactsResponse]
400
+ private def get_contacts_impl(contacts_request, opts = {})
401
+ data, _status_code, _headers = get_contacts_with_http_info(contacts_request, opts)
402
+ data
403
+ end
404
+
405
+ # Get Contacts
406
+ # @param contacts_request [ContactsRequest]
407
+ # @param [Hash] opts the optional parameters
408
+ # @return [APIResponse] data is ContactsResponse, status code, headers and response
409
+ private def get_contacts_with_http_info_impl(contacts_request, opts = {})
410
+ if @api_client.config.debugging
411
+ @api_client.config.logger.debug 'Calling API: CRMApi.get_contacts ...'
412
+ end
413
+ # verify the required parameter 'contacts_request' is set
414
+ if @api_client.config.client_side_validation && contacts_request.nil?
415
+ fail ArgumentError, "Missing the required parameter 'contacts_request' when calling CRMApi.get_contacts"
416
+ end
417
+ # resource path
418
+ local_var_path = '/integrations/data/crm/contacts'
419
+
420
+ # query parameters
421
+ query_params = opts[:query_params] || {}
422
+
423
+ # header parameters
424
+ header_params = opts[:header_params] || {}
425
+ # HTTP header 'Accept' (if needed)
426
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
427
+ # HTTP header 'Content-Type'
428
+ content_type = @api_client.select_header_content_type(['application/json'])
429
+ if !content_type.nil?
430
+ header_params['Content-Type'] = content_type
431
+ end
432
+
433
+ # form parameters
434
+ form_params = opts[:form_params] || {}
435
+
436
+ # http body (model)
437
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(contacts_request)
438
+
439
+ # return_type
440
+ return_type = opts[:debug_return_type] || 'ContactsResponse'
441
+
442
+ # auth_names
443
+ auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
444
+
445
+ new_options = opts.merge(
446
+ :operation => :"CRMApi.get_contacts",
447
+ :header_params => header_params,
448
+ :query_params => query_params,
449
+ :form_params => form_params,
450
+ :body => post_body,
451
+ :auth_names => auth_names,
452
+ :return_type => return_type
453
+ )
454
+
455
+ data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
456
+ if @api_client.config.debugging
457
+ @api_client.config.logger.debug "API called: CRMApi#get_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
458
+ end
459
+ APIResponse::new(data, status_code, headers, response)
460
+ end
461
+
462
+
463
+ # Get Lead
464
+ #
465
+ # @param id [String]
466
+ # @param data_source_id [Integer]
467
+ # @param include_remote_data [Boolean]
468
+ # @param includes [Array<BaseIncludes>]
469
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
470
+ def get_lead(id:, data_source_id:, include_remote_data: false, includes: SENTINEL, extra: {})
471
+ extra[:include_remote_data] = include_remote_data if include_remote_data != SENTINEL
472
+ extra[:includes] = includes if includes != SENTINEL
473
+ api_response = get_lead_with_http_info_impl(id, data_source_id, extra)
474
+ api_response.data
475
+ end
476
+
477
+ # Get Lead
478
+ #
479
+ # @param id [String]
480
+ # @param data_source_id [Integer]
481
+ # @param include_remote_data [Boolean]
482
+ # @param includes [Array<BaseIncludes>]
483
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
484
+ def get_lead_with_http_info(id:, data_source_id:, include_remote_data: false, includes: SENTINEL, extra: {})
485
+ extra[:include_remote_data] = include_remote_data if include_remote_data != SENTINEL
486
+ extra[:includes] = includes if includes != SENTINEL
487
+ get_lead_with_http_info_impl(id, data_source_id, extra)
488
+ end
489
+
490
+ # Get Lead
491
+ # @param id [String]
492
+ # @param data_source_id [Integer]
493
+ # @param [Hash] opts the optional parameters
494
+ # @option opts [Boolean] :include_remote_data (default to false)
495
+ # @option opts [Array<BaseIncludes>] :includes
496
+ # @return [Lead]
497
+ private def get_lead_impl(id, data_source_id, opts = {})
498
+ data, _status_code, _headers = get_lead_with_http_info(id, data_source_id, opts)
499
+ data
500
+ end
501
+
502
+ # Get Lead
503
+ # @param id [String]
504
+ # @param data_source_id [Integer]
505
+ # @param [Hash] opts the optional parameters
506
+ # @option opts [Boolean] :include_remote_data (default to false)
507
+ # @option opts [Array<BaseIncludes>] :includes
508
+ # @return [APIResponse] data is Lead, status code, headers and response
509
+ private def get_lead_with_http_info_impl(id, data_source_id, opts = {})
510
+ if @api_client.config.debugging
511
+ @api_client.config.logger.debug 'Calling API: CRMApi.get_lead ...'
512
+ end
513
+ # verify the required parameter 'id' is set
514
+ if @api_client.config.client_side_validation && id.nil?
515
+ fail ArgumentError, "Missing the required parameter 'id' when calling CRMApi.get_lead"
516
+ end
517
+ # verify the required parameter 'data_source_id' is set
518
+ if @api_client.config.client_side_validation && data_source_id.nil?
519
+ fail ArgumentError, "Missing the required parameter 'data_source_id' when calling CRMApi.get_lead"
520
+ end
521
+ # resource path
522
+ local_var_path = '/integrations/data/crm/leads/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
523
+
524
+ # query parameters
525
+ query_params = opts[:query_params] || {}
526
+ query_params[:'data_source_id'] = data_source_id
527
+ query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
528
+ query_params[:'includes'] = @api_client.build_collection_param(opts[:'includes'], :multi) if !opts[:'includes'].nil?
529
+
530
+ # header parameters
531
+ header_params = opts[:header_params] || {}
532
+ # HTTP header 'Accept' (if needed)
533
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
534
+
535
+ # form parameters
536
+ form_params = opts[:form_params] || {}
537
+
538
+ # http body (model)
539
+ post_body = opts[:debug_body]
540
+
541
+ # return_type
542
+ return_type = opts[:debug_return_type] || 'Lead'
543
+
544
+ # auth_names
545
+ auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
546
+
547
+ new_options = opts.merge(
548
+ :operation => :"CRMApi.get_lead",
549
+ :header_params => header_params,
550
+ :query_params => query_params,
551
+ :form_params => form_params,
552
+ :body => post_body,
553
+ :auth_names => auth_names,
554
+ :return_type => return_type
555
+ )
556
+
557
+ data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
558
+ if @api_client.config.debugging
559
+ @api_client.config.logger.debug "API called: CRMApi#get_lead\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
560
+ end
561
+ APIResponse::new(data, status_code, headers, response)
562
+ end
563
+
564
+
565
+ # Get Leads
566
+ #
567
+ # @param data_source_id [Integer]
568
+ # @param include_remote_data [Boolean]
569
+ # @param next_cursor [String]
570
+ # @param page_size [Integer]
571
+ # @param order_dir [OrderDirV2Nullable]
572
+ # @param includes [Array<BaseIncludes>]
573
+ # @param filters [LeadFilters]
574
+ # @param order_by [LeadsOrderByNullable]
575
+ # @param body [LeadsRequest]
576
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
577
+ def get_leads(data_source_id:, include_remote_data: false, next_cursor: SENTINEL, page_size: SENTINEL, order_dir: 'asc', includes: SENTINEL, filters: SENTINEL, order_by: SENTINEL, extra: {})
578
+ _body = {}
579
+ _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
580
+ _body[:include_remote_data] = include_remote_data if include_remote_data != SENTINEL
581
+ _body[:next_cursor] = next_cursor if next_cursor != SENTINEL
582
+ _body[:page_size] = page_size if page_size != SENTINEL
583
+ _body[:order_dir] = order_dir if order_dir != SENTINEL
584
+ _body[:includes] = includes if includes != SENTINEL
585
+ _body[:filters] = filters if filters != SENTINEL
586
+ _body[:order_by] = order_by if order_by != SENTINEL
587
+ leads_request = _body
588
+ api_response = get_leads_with_http_info_impl(leads_request, extra)
589
+ api_response.data
590
+ end
591
+
592
+ # Get Leads
593
+ #
594
+ # @param data_source_id [Integer]
595
+ # @param include_remote_data [Boolean]
596
+ # @param next_cursor [String]
597
+ # @param page_size [Integer]
598
+ # @param order_dir [OrderDirV2Nullable]
599
+ # @param includes [Array<BaseIncludes>]
600
+ # @param filters [LeadFilters]
601
+ # @param order_by [LeadsOrderByNullable]
602
+ # @param body [LeadsRequest]
603
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
604
+ def get_leads_with_http_info(data_source_id:, include_remote_data: false, next_cursor: SENTINEL, page_size: SENTINEL, order_dir: 'asc', includes: SENTINEL, filters: SENTINEL, order_by: SENTINEL, extra: {})
605
+ _body = {}
606
+ _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
607
+ _body[:include_remote_data] = include_remote_data if include_remote_data != SENTINEL
608
+ _body[:next_cursor] = next_cursor if next_cursor != SENTINEL
609
+ _body[:page_size] = page_size if page_size != SENTINEL
610
+ _body[:order_dir] = order_dir if order_dir != SENTINEL
611
+ _body[:includes] = includes if includes != SENTINEL
612
+ _body[:filters] = filters if filters != SENTINEL
613
+ _body[:order_by] = order_by if order_by != SENTINEL
614
+ leads_request = _body
615
+ get_leads_with_http_info_impl(leads_request, extra)
616
+ end
617
+
618
+ # Get Leads
619
+ # @param leads_request [LeadsRequest]
620
+ # @param [Hash] opts the optional parameters
621
+ # @return [LeadsResponse]
622
+ private def get_leads_impl(leads_request, opts = {})
623
+ data, _status_code, _headers = get_leads_with_http_info(leads_request, opts)
624
+ data
625
+ end
626
+
627
+ # Get Leads
628
+ # @param leads_request [LeadsRequest]
629
+ # @param [Hash] opts the optional parameters
630
+ # @return [APIResponse] data is LeadsResponse, status code, headers and response
631
+ private def get_leads_with_http_info_impl(leads_request, opts = {})
632
+ if @api_client.config.debugging
633
+ @api_client.config.logger.debug 'Calling API: CRMApi.get_leads ...'
634
+ end
635
+ # verify the required parameter 'leads_request' is set
636
+ if @api_client.config.client_side_validation && leads_request.nil?
637
+ fail ArgumentError, "Missing the required parameter 'leads_request' when calling CRMApi.get_leads"
638
+ end
639
+ # resource path
640
+ local_var_path = '/integrations/data/crm/leads'
641
+
642
+ # query parameters
643
+ query_params = opts[:query_params] || {}
644
+
645
+ # header parameters
646
+ header_params = opts[:header_params] || {}
647
+ # HTTP header 'Accept' (if needed)
648
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
649
+ # HTTP header 'Content-Type'
650
+ content_type = @api_client.select_header_content_type(['application/json'])
651
+ if !content_type.nil?
652
+ header_params['Content-Type'] = content_type
653
+ end
654
+
655
+ # form parameters
656
+ form_params = opts[:form_params] || {}
657
+
658
+ # http body (model)
659
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(leads_request)
660
+
661
+ # return_type
662
+ return_type = opts[:debug_return_type] || 'LeadsResponse'
663
+
664
+ # auth_names
665
+ auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
666
+
667
+ new_options = opts.merge(
668
+ :operation => :"CRMApi.get_leads",
669
+ :header_params => header_params,
670
+ :query_params => query_params,
671
+ :form_params => form_params,
672
+ :body => post_body,
673
+ :auth_names => auth_names,
674
+ :return_type => return_type
675
+ )
676
+
677
+ data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
678
+ if @api_client.config.debugging
679
+ @api_client.config.logger.debug "API called: CRMApi#get_leads\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
680
+ end
681
+ APIResponse::new(data, status_code, headers, response)
682
+ end
683
+
684
+
685
+ # Get Opportunities
686
+ #
687
+ # @param data_source_id [Integer]
688
+ # @param include_remote_data [Boolean]
689
+ # @param next_cursor [String]
690
+ # @param page_size [Integer]
691
+ # @param order_dir [OrderDirV2Nullable]
692
+ # @param includes [Array<BaseIncludes>]
693
+ # @param filters [OpportunityFilters]
694
+ # @param order_by [OpportunitiesOrderByNullable]
695
+ # @param body [OpportunitiesRequest]
696
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
697
+ def get_opportunities(data_source_id:, include_remote_data: false, next_cursor: SENTINEL, page_size: SENTINEL, order_dir: 'asc', includes: SENTINEL, filters: SENTINEL, order_by: SENTINEL, extra: {})
698
+ _body = {}
699
+ _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
700
+ _body[:include_remote_data] = include_remote_data if include_remote_data != SENTINEL
701
+ _body[:next_cursor] = next_cursor if next_cursor != SENTINEL
702
+ _body[:page_size] = page_size if page_size != SENTINEL
703
+ _body[:order_dir] = order_dir if order_dir != SENTINEL
704
+ _body[:includes] = includes if includes != SENTINEL
705
+ _body[:filters] = filters if filters != SENTINEL
706
+ _body[:order_by] = order_by if order_by != SENTINEL
707
+ opportunities_request = _body
708
+ api_response = get_opportunities_with_http_info_impl(opportunities_request, extra)
709
+ api_response.data
710
+ end
711
+
712
+ # Get Opportunities
713
+ #
714
+ # @param data_source_id [Integer]
715
+ # @param include_remote_data [Boolean]
716
+ # @param next_cursor [String]
717
+ # @param page_size [Integer]
718
+ # @param order_dir [OrderDirV2Nullable]
719
+ # @param includes [Array<BaseIncludes>]
720
+ # @param filters [OpportunityFilters]
721
+ # @param order_by [OpportunitiesOrderByNullable]
722
+ # @param body [OpportunitiesRequest]
723
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
724
+ def get_opportunities_with_http_info(data_source_id:, include_remote_data: false, next_cursor: SENTINEL, page_size: SENTINEL, order_dir: 'asc', includes: SENTINEL, filters: SENTINEL, order_by: SENTINEL, extra: {})
725
+ _body = {}
726
+ _body[:data_source_id] = data_source_id if data_source_id != SENTINEL
727
+ _body[:include_remote_data] = include_remote_data if include_remote_data != SENTINEL
728
+ _body[:next_cursor] = next_cursor if next_cursor != SENTINEL
729
+ _body[:page_size] = page_size if page_size != SENTINEL
730
+ _body[:order_dir] = order_dir if order_dir != SENTINEL
731
+ _body[:includes] = includes if includes != SENTINEL
732
+ _body[:filters] = filters if filters != SENTINEL
733
+ _body[:order_by] = order_by if order_by != SENTINEL
734
+ opportunities_request = _body
735
+ get_opportunities_with_http_info_impl(opportunities_request, extra)
736
+ end
737
+
738
+ # Get Opportunities
739
+ # @param opportunities_request [OpportunitiesRequest]
740
+ # @param [Hash] opts the optional parameters
741
+ # @return [OpportunitiesResponse]
742
+ private def get_opportunities_impl(opportunities_request, opts = {})
743
+ data, _status_code, _headers = get_opportunities_with_http_info(opportunities_request, opts)
744
+ data
745
+ end
746
+
747
+ # Get Opportunities
748
+ # @param opportunities_request [OpportunitiesRequest]
749
+ # @param [Hash] opts the optional parameters
750
+ # @return [APIResponse] data is OpportunitiesResponse, status code, headers and response
751
+ private def get_opportunities_with_http_info_impl(opportunities_request, opts = {})
752
+ if @api_client.config.debugging
753
+ @api_client.config.logger.debug 'Calling API: CRMApi.get_opportunities ...'
754
+ end
755
+ # verify the required parameter 'opportunities_request' is set
756
+ if @api_client.config.client_side_validation && opportunities_request.nil?
757
+ fail ArgumentError, "Missing the required parameter 'opportunities_request' when calling CRMApi.get_opportunities"
758
+ end
759
+ # resource path
760
+ local_var_path = '/integrations/data/crm/opportunities'
761
+
762
+ # query parameters
763
+ query_params = opts[:query_params] || {}
764
+
765
+ # header parameters
766
+ header_params = opts[:header_params] || {}
767
+ # HTTP header 'Accept' (if needed)
768
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
769
+ # HTTP header 'Content-Type'
770
+ content_type = @api_client.select_header_content_type(['application/json'])
771
+ if !content_type.nil?
772
+ header_params['Content-Type'] = content_type
773
+ end
774
+
775
+ # form parameters
776
+ form_params = opts[:form_params] || {}
777
+
778
+ # http body (model)
779
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opportunities_request)
780
+
781
+ # return_type
782
+ return_type = opts[:debug_return_type] || 'OpportunitiesResponse'
783
+
784
+ # auth_names
785
+ auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
786
+
787
+ new_options = opts.merge(
788
+ :operation => :"CRMApi.get_opportunities",
789
+ :header_params => header_params,
790
+ :query_params => query_params,
791
+ :form_params => form_params,
792
+ :body => post_body,
793
+ :auth_names => auth_names,
794
+ :return_type => return_type
795
+ )
796
+
797
+ data, status_code, headers, response = @api_client.call_api(:POST, local_var_path, new_options)
798
+ if @api_client.config.debugging
799
+ @api_client.config.logger.debug "API called: CRMApi#get_opportunities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
800
+ end
801
+ APIResponse::new(data, status_code, headers, response)
802
+ end
803
+
804
+
805
+ # Get Opportunity
806
+ #
807
+ # @param id [String]
808
+ # @param data_source_id [Integer]
809
+ # @param include_remote_data [Boolean]
810
+ # @param includes [Array<BaseIncludes>]
811
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
812
+ def get_opportunity(id:, data_source_id:, include_remote_data: false, includes: SENTINEL, extra: {})
813
+ extra[:include_remote_data] = include_remote_data if include_remote_data != SENTINEL
814
+ extra[:includes] = includes if includes != SENTINEL
815
+ api_response = get_opportunity_with_http_info_impl(id, data_source_id, extra)
816
+ api_response.data
817
+ end
818
+
819
+ # Get Opportunity
820
+ #
821
+ # @param id [String]
822
+ # @param data_source_id [Integer]
823
+ # @param include_remote_data [Boolean]
824
+ # @param includes [Array<BaseIncludes>]
825
+ # @param [Hash] extra additional parameters to pass along through :header_params, :query_params, or parameter name
826
+ def get_opportunity_with_http_info(id:, data_source_id:, include_remote_data: false, includes: SENTINEL, extra: {})
827
+ extra[:include_remote_data] = include_remote_data if include_remote_data != SENTINEL
828
+ extra[:includes] = includes if includes != SENTINEL
829
+ get_opportunity_with_http_info_impl(id, data_source_id, extra)
830
+ end
831
+
832
+ # Get Opportunity
833
+ # @param id [String]
834
+ # @param data_source_id [Integer]
835
+ # @param [Hash] opts the optional parameters
836
+ # @option opts [Boolean] :include_remote_data (default to false)
837
+ # @option opts [Array<BaseIncludes>] :includes
838
+ # @return [Opportunity]
839
+ private def get_opportunity_impl(id, data_source_id, opts = {})
840
+ data, _status_code, _headers = get_opportunity_with_http_info(id, data_source_id, opts)
841
+ data
842
+ end
843
+
844
+ # Get Opportunity
845
+ # @param id [String]
846
+ # @param data_source_id [Integer]
847
+ # @param [Hash] opts the optional parameters
848
+ # @option opts [Boolean] :include_remote_data (default to false)
849
+ # @option opts [Array<BaseIncludes>] :includes
850
+ # @return [APIResponse] data is Opportunity, status code, headers and response
851
+ private def get_opportunity_with_http_info_impl(id, data_source_id, opts = {})
852
+ if @api_client.config.debugging
853
+ @api_client.config.logger.debug 'Calling API: CRMApi.get_opportunity ...'
854
+ end
855
+ # verify the required parameter 'id' is set
856
+ if @api_client.config.client_side_validation && id.nil?
857
+ fail ArgumentError, "Missing the required parameter 'id' when calling CRMApi.get_opportunity"
858
+ end
859
+ # verify the required parameter 'data_source_id' is set
860
+ if @api_client.config.client_side_validation && data_source_id.nil?
861
+ fail ArgumentError, "Missing the required parameter 'data_source_id' when calling CRMApi.get_opportunity"
862
+ end
863
+ # resource path
864
+ local_var_path = '/integrations/data/crm/opportunities/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
865
+
866
+ # query parameters
867
+ query_params = opts[:query_params] || {}
868
+ query_params[:'data_source_id'] = data_source_id
869
+ query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
870
+ query_params[:'includes'] = @api_client.build_collection_param(opts[:'includes'], :multi) if !opts[:'includes'].nil?
871
+
872
+ # header parameters
873
+ header_params = opts[:header_params] || {}
874
+ # HTTP header 'Accept' (if needed)
875
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
876
+
877
+ # form parameters
878
+ form_params = opts[:form_params] || {}
879
+
880
+ # http body (model)
881
+ post_body = opts[:debug_body]
882
+
883
+ # return_type
884
+ return_type = opts[:debug_return_type] || 'Opportunity'
885
+
886
+ # auth_names
887
+ auth_names = opts[:debug_auth_names] || ['accessToken', 'apiKey', 'customerId']
888
+
889
+ new_options = opts.merge(
890
+ :operation => :"CRMApi.get_opportunity",
891
+ :header_params => header_params,
892
+ :query_params => query_params,
893
+ :form_params => form_params,
894
+ :body => post_body,
895
+ :auth_names => auth_names,
896
+ :return_type => return_type
897
+ )
898
+
899
+ data, status_code, headers, response = @api_client.call_api(:GET, local_var_path, new_options)
900
+ if @api_client.config.debugging
901
+ @api_client.config.logger.debug "API called: CRMApi#get_opportunity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
902
+ end
903
+ APIResponse::new(data, status_code, headers, response)
904
+ end
905
+ end
906
+
907
+ # top-level client access to avoid having the user to insantiate their own API instances
908
+ CRM = CRMApi::new
909
+ end