Class: ConnectWise::PortalConfigurationOpportunitySetupsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/connect_wise/api/portal_configuration_opportunity_setups_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ PortalConfigurationOpportunitySetupsApi

Returns a new instance of PortalConfigurationOpportunitySetupsApi.



17
18
19
# File 'lib/connect_wise/api/portal_configuration_opportunity_setups_api.rb', line 17

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



15
16
17
# File 'lib/connect_wise/api/portal_configuration_opportunity_setups_api.rb', line 15

def api_client
  @api_client
end

Instance Method Details

#get_company_portal_configurations_by_parent_id_opportunity_setups(parent_id, client_id, opts = {}) ⇒ Array<PortalConfigurationOpportunitySetup>

Get List of PortalConfigurationOpportunitySetup

Parameters:

  • parent_id (Integer)

    portalConfigurationId

  • client_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :conditions (String)
  • :child_conditions (String)
  • :custom_field_conditions (String)
  • :order_by (String)
  • :fields (String)
  • :page (Integer)
  • :page_size (Integer)
  • :page_id (Integer)

Returns:



34
35
36
37
# File 'lib/connect_wise/api/portal_configuration_opportunity_setups_api.rb', line 34

def get_company_portal_configurations_by_parent_id_opportunity_setups(parent_id, client_id, opts = {})
  data, _status_code, _headers = get_company_portal_configurations_by_parent_id_opportunity_setups_with_http_info(parent_id, client_id, opts)
  data
end

#get_company_portal_configurations_by_parent_id_opportunity_setups_by_id(id, parent_id, client_id, opts = {}) ⇒ PortalConfigurationOpportunitySetup

Get PortalConfigurationOpportunitySetup

Parameters:

  • id (Integer)

    opportunitySetupId

  • parent_id (Integer)

    portalConfigurationId

  • client_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :conditions (String)
  • :child_conditions (String)
  • :custom_field_conditions (String)
  • :order_by (String)
  • :fields (String)
  • :page (Integer)
  • :page_size (Integer)
  • :page_id (Integer)

Returns:



120
121
122
123
# File 'lib/connect_wise/api/portal_configuration_opportunity_setups_api.rb', line 120

def get_company_portal_configurations_by_parent_id_opportunity_setups_by_id(id, parent_id, client_id, opts = {})
  data, _status_code, _headers = get_company_portal_configurations_by_parent_id_opportunity_setups_by_id_with_http_info(id, parent_id, client_id, opts)
  data
end

#get_company_portal_configurations_by_parent_id_opportunity_setups_by_id_with_http_info(id, parent_id, client_id, opts = {}) ⇒ Array<(PortalConfigurationOpportunitySetup, Integer, Hash)>

Get PortalConfigurationOpportunitySetup

Parameters:

  • id (Integer)

    opportunitySetupId

  • parent_id (Integer)

    portalConfigurationId

  • client_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :conditions (String)
  • :child_conditions (String)
  • :custom_field_conditions (String)
  • :order_by (String)
  • :fields (String)
  • :page (Integer)
  • :page_size (Integer)
  • :page_id (Integer)

Returns:

Raises:

  • (ArgumentError)


139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
# File 'lib/connect_wise/api/portal_configuration_opportunity_setups_api.rb', line 139

def get_company_portal_configurations_by_parent_id_opportunity_setups_by_id_with_http_info(id, parent_id, client_id, opts = {})
  @api_client.config.logger.debug 'Calling API: PortalConfigurationOpportunitySetupsApi.get_company_portal_configurations_by_parent_id_opportunity_setups_by_id ...' if @api_client.config.debugging
  # verify the required parameter 'id' is set
  raise ArgumentError, "Missing the required parameter 'id' when calling PortalConfigurationOpportunitySetupsApi.get_company_portal_configurations_by_parent_id_opportunity_setups_by_id" if @api_client.config.client_side_validation && id.nil?
  # verify the required parameter 'parent_id' is set
  raise ArgumentError, "Missing the required parameter 'parent_id' when calling PortalConfigurationOpportunitySetupsApi.get_company_portal_configurations_by_parent_id_opportunity_setups_by_id" if @api_client.config.client_side_validation && parent_id.nil?
  # verify the required parameter 'client_id' is set
  raise ArgumentError, "Missing the required parameter 'client_id' when calling PortalConfigurationOpportunitySetupsApi.get_company_portal_configurations_by_parent_id_opportunity_setups_by_id" if @api_client.config.client_side_validation && client_id.nil?

  # resource path
  local_var_path = '/company/portalConfigurations/{parentId}/opportunitySetups/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'parentId' + '}', CGI.escape(parent_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:conditions] = opts[:conditions] unless opts[:conditions].nil?
  query_params[:childConditions] = opts[:child_conditions] unless opts[:child_conditions].nil?
  query_params[:customFieldConditions] = opts[:custom_field_conditions] unless opts[:custom_field_conditions].nil?
  query_params[:orderBy] = opts[:order_by] unless opts[:order_by].nil?
  query_params[:fields] = opts[:fields] unless opts[:fields].nil?
  query_params[:page] = opts[:page] unless opts[:page].nil?
  query_params[:pageSize] = opts[:page_size] unless opts[:page_size].nil?
  query_params[:pageId] = opts[:page_id] unless opts[:page_id].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/vnd.connectwise.com+json; version=2022.1'])
  header_params[:clientId] = client_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'PortalConfigurationOpportunitySetup'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    operation: :'PortalConfigurationOpportunitySetupsApi.get_company_portal_configurations_by_parent_id_opportunity_setups_by_id',
    header_params: header_params,
    query_params: query_params,
    form_params: form_params,
    body: post_body,
    auth_names: auth_names,
    return_type: return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  @api_client.config.logger.debug "API called: PortalConfigurationOpportunitySetupsApi#get_company_portal_configurations_by_parent_id_opportunity_setups_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
  [data, status_code, headers]
end

#get_company_portal_configurations_by_parent_id_opportunity_setups_with_http_info(parent_id, client_id, opts = {}) ⇒ Array<(Array<PortalConfigurationOpportunitySetup>, Integer, Hash)>

Get List of PortalConfigurationOpportunitySetup

Parameters:

  • parent_id (Integer)

    portalConfigurationId

  • client_id (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :conditions (String)
  • :child_conditions (String)
  • :custom_field_conditions (String)
  • :order_by (String)
  • :fields (String)
  • :page (Integer)
  • :page_size (Integer)
  • :page_id (Integer)

Returns:

Raises:

  • (ArgumentError)


52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/connect_wise/api/portal_configuration_opportunity_setups_api.rb', line 52

def get_company_portal_configurations_by_parent_id_opportunity_setups_with_http_info(parent_id, client_id, opts = {})
  @api_client.config.logger.debug 'Calling API: PortalConfigurationOpportunitySetupsApi.get_company_portal_configurations_by_parent_id_opportunity_setups ...' if @api_client.config.debugging
  # verify the required parameter 'parent_id' is set
  raise ArgumentError, "Missing the required parameter 'parent_id' when calling PortalConfigurationOpportunitySetupsApi.get_company_portal_configurations_by_parent_id_opportunity_setups" if @api_client.config.client_side_validation && parent_id.nil?
  # verify the required parameter 'client_id' is set
  raise ArgumentError, "Missing the required parameter 'client_id' when calling PortalConfigurationOpportunitySetupsApi.get_company_portal_configurations_by_parent_id_opportunity_setups" if @api_client.config.client_side_validation && client_id.nil?

  # resource path
  local_var_path = '/company/portalConfigurations/{parentId}/opportunitySetups'.sub('{' + 'parentId' + '}', CGI.escape(parent_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:conditions] = opts[:conditions] unless opts[:conditions].nil?
  query_params[:childConditions] = opts[:child_conditions] unless opts[:child_conditions].nil?
  query_params[:customFieldConditions] = opts[:custom_field_conditions] unless opts[:custom_field_conditions].nil?
  query_params[:orderBy] = opts[:order_by] unless opts[:order_by].nil?
  query_params[:fields] = opts[:fields] unless opts[:fields].nil?
  query_params[:page] = opts[:page] unless opts[:page].nil?
  query_params[:pageSize] = opts[:page_size] unless opts[:page_size].nil?
  query_params[:pageId] = opts[:page_id] unless opts[:page_id].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/vnd.connectwise.com+json; version=2022.1'])
  header_params[:clientId] = client_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<PortalConfigurationOpportunitySetup>'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    operation: :'PortalConfigurationOpportunitySetupsApi.get_company_portal_configurations_by_parent_id_opportunity_setups',
    header_params: header_params,
    query_params: query_params,
    form_params: form_params,
    body: post_body,
    auth_names: auth_names,
    return_type: return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  @api_client.config.logger.debug "API called: PortalConfigurationOpportunitySetupsApi#get_company_portal_configurations_by_parent_id_opportunity_setups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
  [data, status_code, headers]
end

#patch_company_portal_configurations_by_parent_id_opportunity_setups(parent_id, client_id, patch_operation, opts = {}) ⇒ PortalConfigurationOpportunitySetup

Patch PortalConfigurationOpportunitySetup

Parameters:

  • parent_id (Integer)

    portalConfigurationId

  • client_id (String)
  • patch_operation (Array<PatchOperation>)

    List of PatchOperation

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



201
202
203
204
# File 'lib/connect_wise/api/portal_configuration_opportunity_setups_api.rb', line 201

def patch_company_portal_configurations_by_parent_id_opportunity_setups(parent_id, client_id, patch_operation, opts = {})
  data, _status_code, _headers = patch_company_portal_configurations_by_parent_id_opportunity_setups_with_http_info(parent_id, client_id, patch_operation, opts)
  data
end

#patch_company_portal_configurations_by_parent_id_opportunity_setups_by_id(id, parent_id, client_id, patch_operation, opts = {}) ⇒ PortalConfigurationOpportunitySetup

Patch PortalConfigurationOpportunitySetup

Parameters:

  • id (Integer)

    opportunitySetupId

  • parent_id (Integer)

    portalConfigurationId

  • client_id (String)
  • patch_operation (Array<PatchOperation>)

    List of PatchOperation

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



270
271
272
273
# File 'lib/connect_wise/api/portal_configuration_opportunity_setups_api.rb', line 270

def patch_company_portal_configurations_by_parent_id_opportunity_setups_by_id(id, parent_id, client_id, patch_operation, opts = {})
  data, _status_code, _headers = patch_company_portal_configurations_by_parent_id_opportunity_setups_by_id_with_http_info(id, parent_id, client_id, patch_operation, opts)
  data
end

#patch_company_portal_configurations_by_parent_id_opportunity_setups_by_id_with_http_info(id, parent_id, client_id, patch_operation, opts = {}) ⇒ Array<(PortalConfigurationOpportunitySetup, Integer, Hash)>

Patch PortalConfigurationOpportunitySetup

Parameters:

  • id (Integer)

    opportunitySetupId

  • parent_id (Integer)

    portalConfigurationId

  • client_id (String)
  • patch_operation (Array<PatchOperation>)

    List of PatchOperation

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

Raises:

  • (ArgumentError)


282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
# File 'lib/connect_wise/api/portal_configuration_opportunity_setups_api.rb', line 282

def patch_company_portal_configurations_by_parent_id_opportunity_setups_by_id_with_http_info(id, parent_id, client_id, patch_operation, opts = {})
  @api_client.config.logger.debug 'Calling API: PortalConfigurationOpportunitySetupsApi.patch_company_portal_configurations_by_parent_id_opportunity_setups_by_id ...' if @api_client.config.debugging
  # verify the required parameter 'id' is set
  raise ArgumentError, "Missing the required parameter 'id' when calling PortalConfigurationOpportunitySetupsApi.patch_company_portal_configurations_by_parent_id_opportunity_setups_by_id" if @api_client.config.client_side_validation && id.nil?
  # verify the required parameter 'parent_id' is set
  raise ArgumentError, "Missing the required parameter 'parent_id' when calling PortalConfigurationOpportunitySetupsApi.patch_company_portal_configurations_by_parent_id_opportunity_setups_by_id" if @api_client.config.client_side_validation && parent_id.nil?
  # verify the required parameter 'client_id' is set
  raise ArgumentError, "Missing the required parameter 'client_id' when calling PortalConfigurationOpportunitySetupsApi.patch_company_portal_configurations_by_parent_id_opportunity_setups_by_id" if @api_client.config.client_side_validation && client_id.nil?
  # verify the required parameter 'patch_operation' is set
  raise ArgumentError, "Missing the required parameter 'patch_operation' when calling PortalConfigurationOpportunitySetupsApi.patch_company_portal_configurations_by_parent_id_opportunity_setups_by_id" if @api_client.config.client_side_validation && patch_operation.nil?

  # resource path
  local_var_path = '/company/portalConfigurations/{parentId}/opportunitySetups/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'parentId' + '}', CGI.escape(parent_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/vnd.connectwise.com+json; version=2022.1'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  header_params['Content-Type'] = content_type unless content_type.nil?
  header_params[:clientId] = client_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(patch_operation)

  # return_type
  return_type = opts[:debug_return_type] || 'PortalConfigurationOpportunitySetup'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    operation: :'PortalConfigurationOpportunitySetupsApi.patch_company_portal_configurations_by_parent_id_opportunity_setups_by_id',
    header_params: header_params,
    query_params: query_params,
    form_params: form_params,
    body: post_body,
    auth_names: auth_names,
    return_type: return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  @api_client.config.logger.debug "API called: PortalConfigurationOpportunitySetupsApi#patch_company_portal_configurations_by_parent_id_opportunity_setups_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
  [data, status_code, headers]
end

#patch_company_portal_configurations_by_parent_id_opportunity_setups_with_http_info(parent_id, client_id, patch_operation, opts = {}) ⇒ Array<(PortalConfigurationOpportunitySetup, Integer, Hash)>

Patch PortalConfigurationOpportunitySetup

Parameters:

  • parent_id (Integer)

    portalConfigurationId

  • client_id (String)
  • patch_operation (Array<PatchOperation>)

    List of PatchOperation

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

Raises:

  • (ArgumentError)


212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
# File 'lib/connect_wise/api/portal_configuration_opportunity_setups_api.rb', line 212

def patch_company_portal_configurations_by_parent_id_opportunity_setups_with_http_info(parent_id, client_id, patch_operation, opts = {})
  @api_client.config.logger.debug 'Calling API: PortalConfigurationOpportunitySetupsApi.patch_company_portal_configurations_by_parent_id_opportunity_setups ...' if @api_client.config.debugging
  # verify the required parameter 'parent_id' is set
  raise ArgumentError, "Missing the required parameter 'parent_id' when calling PortalConfigurationOpportunitySetupsApi.patch_company_portal_configurations_by_parent_id_opportunity_setups" if @api_client.config.client_side_validation && parent_id.nil?
  # verify the required parameter 'client_id' is set
  raise ArgumentError, "Missing the required parameter 'client_id' when calling PortalConfigurationOpportunitySetupsApi.patch_company_portal_configurations_by_parent_id_opportunity_setups" if @api_client.config.client_side_validation && client_id.nil?
  # verify the required parameter 'patch_operation' is set
  raise ArgumentError, "Missing the required parameter 'patch_operation' when calling PortalConfigurationOpportunitySetupsApi.patch_company_portal_configurations_by_parent_id_opportunity_setups" if @api_client.config.client_side_validation && patch_operation.nil?

  # resource path
  local_var_path = '/company/portalConfigurations/{parentId}/opportunitySetups'.sub('{' + 'parentId' + '}', CGI.escape(parent_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/vnd.connectwise.com+json; version=2022.1'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  header_params['Content-Type'] = content_type unless content_type.nil?
  header_params[:clientId] = client_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(patch_operation)

  # return_type
  return_type = opts[:debug_return_type] || 'PortalConfigurationOpportunitySetup'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    operation: :'PortalConfigurationOpportunitySetupsApi.patch_company_portal_configurations_by_parent_id_opportunity_setups',
    header_params: header_params,
    query_params: query_params,
    form_params: form_params,
    body: post_body,
    auth_names: auth_names,
    return_type: return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  @api_client.config.logger.debug "API called: PortalConfigurationOpportunitySetupsApi#patch_company_portal_configurations_by_parent_id_opportunity_setups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
  [data, status_code, headers]
end

#put_company_portal_configurations_by_parent_id_opportunity_setups(parent_id, client_id, portal_configuration_opportunity_setup, opts = {}) ⇒ PortalConfigurationOpportunitySetup

Put PortalConfigurationOpportunitySetup

Parameters:

  • parent_id (Integer)

    portalConfigurationId

  • client_id (String)
  • portal_configuration_opportunity_setup (PortalConfigurationOpportunitySetup)

    opportunitySetup

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



341
342
343
344
# File 'lib/connect_wise/api/portal_configuration_opportunity_setups_api.rb', line 341

def put_company_portal_configurations_by_parent_id_opportunity_setups(parent_id, client_id, portal_configuration_opportunity_setup, opts = {})
  data, _status_code, _headers = put_company_portal_configurations_by_parent_id_opportunity_setups_with_http_info(parent_id, client_id, portal_configuration_opportunity_setup, opts)
  data
end

#put_company_portal_configurations_by_parent_id_opportunity_setups_by_id(id, parent_id, client_id, portal_configuration_opportunity_setup, opts = {}) ⇒ PortalConfigurationOpportunitySetup

Put PortalConfigurationOpportunitySetup

Parameters:

  • id (Integer)

    opportunitySetupId

  • parent_id (Integer)

    portalConfigurationId

  • client_id (String)
  • portal_configuration_opportunity_setup (PortalConfigurationOpportunitySetup)

    opportunitySetup

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



410
411
412
413
# File 'lib/connect_wise/api/portal_configuration_opportunity_setups_api.rb', line 410

def put_company_portal_configurations_by_parent_id_opportunity_setups_by_id(id, parent_id, client_id, portal_configuration_opportunity_setup, opts = {})
  data, _status_code, _headers = put_company_portal_configurations_by_parent_id_opportunity_setups_by_id_with_http_info(id, parent_id, client_id, portal_configuration_opportunity_setup, opts)
  data
end

#put_company_portal_configurations_by_parent_id_opportunity_setups_by_id_with_http_info(id, parent_id, client_id, portal_configuration_opportunity_setup, opts = {}) ⇒ Array<(PortalConfigurationOpportunitySetup, Integer, Hash)>

Put PortalConfigurationOpportunitySetup

Parameters:

  • id (Integer)

    opportunitySetupId

  • parent_id (Integer)

    portalConfigurationId

  • client_id (String)
  • portal_configuration_opportunity_setup (PortalConfigurationOpportunitySetup)

    opportunitySetup

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

Raises:

  • (ArgumentError)


422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
# File 'lib/connect_wise/api/portal_configuration_opportunity_setups_api.rb', line 422

def put_company_portal_configurations_by_parent_id_opportunity_setups_by_id_with_http_info(id, parent_id, client_id, portal_configuration_opportunity_setup, opts = {})
  @api_client.config.logger.debug 'Calling API: PortalConfigurationOpportunitySetupsApi.put_company_portal_configurations_by_parent_id_opportunity_setups_by_id ...' if @api_client.config.debugging
  # verify the required parameter 'id' is set
  raise ArgumentError, "Missing the required parameter 'id' when calling PortalConfigurationOpportunitySetupsApi.put_company_portal_configurations_by_parent_id_opportunity_setups_by_id" if @api_client.config.client_side_validation && id.nil?
  # verify the required parameter 'parent_id' is set
  raise ArgumentError, "Missing the required parameter 'parent_id' when calling PortalConfigurationOpportunitySetupsApi.put_company_portal_configurations_by_parent_id_opportunity_setups_by_id" if @api_client.config.client_side_validation && parent_id.nil?
  # verify the required parameter 'client_id' is set
  raise ArgumentError, "Missing the required parameter 'client_id' when calling PortalConfigurationOpportunitySetupsApi.put_company_portal_configurations_by_parent_id_opportunity_setups_by_id" if @api_client.config.client_side_validation && client_id.nil?
  # verify the required parameter 'portal_configuration_opportunity_setup' is set
  raise ArgumentError, "Missing the required parameter 'portal_configuration_opportunity_setup' when calling PortalConfigurationOpportunitySetupsApi.put_company_portal_configurations_by_parent_id_opportunity_setups_by_id" if @api_client.config.client_side_validation && portal_configuration_opportunity_setup.nil?

  # resource path
  local_var_path = '/company/portalConfigurations/{parentId}/opportunitySetups/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'parentId' + '}', CGI.escape(parent_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/vnd.connectwise.com+json; version=2022.1'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  header_params['Content-Type'] = content_type unless content_type.nil?
  header_params[:clientId] = client_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(portal_configuration_opportunity_setup)

  # return_type
  return_type = opts[:debug_return_type] || 'PortalConfigurationOpportunitySetup'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    operation: :'PortalConfigurationOpportunitySetupsApi.put_company_portal_configurations_by_parent_id_opportunity_setups_by_id',
    header_params: header_params,
    query_params: query_params,
    form_params: form_params,
    body: post_body,
    auth_names: auth_names,
    return_type: return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  @api_client.config.logger.debug "API called: PortalConfigurationOpportunitySetupsApi#put_company_portal_configurations_by_parent_id_opportunity_setups_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
  [data, status_code, headers]
end

#put_company_portal_configurations_by_parent_id_opportunity_setups_with_http_info(parent_id, client_id, portal_configuration_opportunity_setup, opts = {}) ⇒ Array<(PortalConfigurationOpportunitySetup, Integer, Hash)>

Put PortalConfigurationOpportunitySetup

Parameters:

  • parent_id (Integer)

    portalConfigurationId

  • client_id (String)
  • portal_configuration_opportunity_setup (PortalConfigurationOpportunitySetup)

    opportunitySetup

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

Raises:

  • (ArgumentError)


352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
# File 'lib/connect_wise/api/portal_configuration_opportunity_setups_api.rb', line 352

def put_company_portal_configurations_by_parent_id_opportunity_setups_with_http_info(parent_id, client_id, portal_configuration_opportunity_setup, opts = {})
  @api_client.config.logger.debug 'Calling API: PortalConfigurationOpportunitySetupsApi.put_company_portal_configurations_by_parent_id_opportunity_setups ...' if @api_client.config.debugging
  # verify the required parameter 'parent_id' is set
  raise ArgumentError, "Missing the required parameter 'parent_id' when calling PortalConfigurationOpportunitySetupsApi.put_company_portal_configurations_by_parent_id_opportunity_setups" if @api_client.config.client_side_validation && parent_id.nil?
  # verify the required parameter 'client_id' is set
  raise ArgumentError, "Missing the required parameter 'client_id' when calling PortalConfigurationOpportunitySetupsApi.put_company_portal_configurations_by_parent_id_opportunity_setups" if @api_client.config.client_side_validation && client_id.nil?
  # verify the required parameter 'portal_configuration_opportunity_setup' is set
  raise ArgumentError, "Missing the required parameter 'portal_configuration_opportunity_setup' when calling PortalConfigurationOpportunitySetupsApi.put_company_portal_configurations_by_parent_id_opportunity_setups" if @api_client.config.client_side_validation && portal_configuration_opportunity_setup.nil?

  # resource path
  local_var_path = '/company/portalConfigurations/{parentId}/opportunitySetups'.sub('{' + 'parentId' + '}', CGI.escape(parent_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/vnd.connectwise.com+json; version=2022.1'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  header_params['Content-Type'] = content_type unless content_type.nil?
  header_params[:clientId] = client_id

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(portal_configuration_opportunity_setup)

  # return_type
  return_type = opts[:debug_return_type] || 'PortalConfigurationOpportunitySetup'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    operation: :'PortalConfigurationOpportunitySetupsApi.put_company_portal_configurations_by_parent_id_opportunity_setups',
    header_params: header_params,
    query_params: query_params,
    form_params: form_params,
    body: post_body,
    auth_names: auth_names,
    return_type: return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  @api_client.config.logger.debug "API called: PortalConfigurationOpportunitySetupsApi#put_company_portal_configurations_by_parent_id_opportunity_setups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" if @api_client.config.debugging
  [data, status_code, headers]
end