Method: PureCloud::PresenceApi#post_presencedefinitions_with_http_info
- Defined in:
- lib/purecloud/api/presence_api.rb
#post_presencedefinitions_with_http_info(body, opts = {}) ⇒ Array<(OrganizationPresence, Fixnum, Hash)>
Create a Presence Definition
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 |
# File 'lib/purecloud/api/presence_api.rb', line 422 def post_presencedefinitions_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: PresenceApi#post_presencedefinitions ..." end # verify the required parameter 'body' is set fail "Missing the required parameter 'body' when calling post_presencedefinitions" if body.nil? # resource path local_var_path = "/api/v2/presencedefinitions".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OrganizationPresence') if @api_client.config.debugging @api_client.config.logger.debug "API called: PresenceApi#post_presencedefinitions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |