=begin PureCloud Platform API With the PureCloud Platform API, you can control all aspects of your PureCloud environment. With the APIs you can access the system configuration, manage conversations and more. OpenAPI spec version: v2 Contact: DeveloperEvangelists@genesys.com Generated by: https://github.com/swagger-api/swagger-codegen.git License: UNLICENSED https://help.mypurecloud.com/articles/terms-and-conditions/ Terms of Service: https://help.mypurecloud.com/articles/terms-and-conditions/ =end require "uri" module PureCloud class ExternalContactsApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Delete an external contact # # @param contact_id ExternalContact ID # @param [Hash] opts the optional parameters # @return [Empty] def delete_externalcontacts_contact(contact_id, opts = {}) data, _status_code, _headers = delete_externalcontacts_contact_with_http_info(contact_id, opts) return data end # Delete an external contact # # @param contact_id ExternalContact ID # @param [Hash] opts the optional parameters # @return [Array<(Empty, Fixnum, Hash)>] Empty data, response status code and response headers def delete_externalcontacts_contact_with_http_info(contact_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.delete_externalcontacts_contact ..." end # verify the required parameter 'contact_id' is set fail ArgumentError, "Missing the required parameter 'contact_id' when calling ExternalContactsApi.delete_externalcontacts_contact" if contact_id.nil? # resource path local_var_path = "/api/v2/externalcontacts/contacts/{contactId}".sub('{format}','json').sub('{' + 'contactId' + '}', contact_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Empty') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#delete_externalcontacts_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a note for an external contact # # @param contact_id ExternalContact Id # @param note_id Note Id # @param [Hash] opts the optional parameters # @return [Empty] def delete_externalcontacts_contact_note(contact_id, note_id, opts = {}) data, _status_code, _headers = delete_externalcontacts_contact_note_with_http_info(contact_id, note_id, opts) return data end # Delete a note for an external contact # # @param contact_id ExternalContact Id # @param note_id Note Id # @param [Hash] opts the optional parameters # @return [Array<(Empty, Fixnum, Hash)>] Empty data, response status code and response headers def delete_externalcontacts_contact_note_with_http_info(contact_id, note_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.delete_externalcontacts_contact_note ..." end # verify the required parameter 'contact_id' is set fail ArgumentError, "Missing the required parameter 'contact_id' when calling ExternalContactsApi.delete_externalcontacts_contact_note" if contact_id.nil? # verify the required parameter 'note_id' is set fail ArgumentError, "Missing the required parameter 'note_id' when calling ExternalContactsApi.delete_externalcontacts_contact_note" if note_id.nil? # resource path local_var_path = "/api/v2/externalcontacts/contacts/{contactId}/notes/{noteId}".sub('{format}','json').sub('{' + 'contactId' + '}', contact_id.to_s).sub('{' + 'noteId' + '}', note_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Empty') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#delete_externalcontacts_contact_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a schema # # @param schema_id Schema ID # @param [Hash] opts the optional parameters # @return [nil] def delete_externalcontacts_contacts_schema(schema_id, opts = {}) delete_externalcontacts_contacts_schema_with_http_info(schema_id, opts) return nil end # Delete a schema # # @param schema_id Schema ID # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_externalcontacts_contacts_schema_with_http_info(schema_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.delete_externalcontacts_contacts_schema ..." end # verify the required parameter 'schema_id' is set fail ArgumentError, "Missing the required parameter 'schema_id' when calling ExternalContactsApi.delete_externalcontacts_contacts_schema" if schema_id.nil? # resource path local_var_path = "/api/v2/externalcontacts/contacts/schemas/{schemaId}".sub('{format}','json').sub('{' + 'schemaId' + '}', schema_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#delete_externalcontacts_contacts_schema\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete an external organization # # @param external_organization_id External Organization ID # @param [Hash] opts the optional parameters # @return [Empty] def delete_externalcontacts_organization(external_organization_id, opts = {}) data, _status_code, _headers = delete_externalcontacts_organization_with_http_info(external_organization_id, opts) return data end # Delete an external organization # # @param external_organization_id External Organization ID # @param [Hash] opts the optional parameters # @return [Array<(Empty, Fixnum, Hash)>] Empty data, response status code and response headers def delete_externalcontacts_organization_with_http_info(external_organization_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.delete_externalcontacts_organization ..." end # verify the required parameter 'external_organization_id' is set fail ArgumentError, "Missing the required parameter 'external_organization_id' when calling ExternalContactsApi.delete_externalcontacts_organization" if external_organization_id.nil? # resource path local_var_path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Empty') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#delete_externalcontacts_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a note for an external organization # # @param external_organization_id External Organization Id # @param note_id Note Id # @param [Hash] opts the optional parameters # @return [Empty] def delete_externalcontacts_organization_note(external_organization_id, note_id, opts = {}) data, _status_code, _headers = delete_externalcontacts_organization_note_with_http_info(external_organization_id, note_id, opts) return data end # Delete a note for an external organization # # @param external_organization_id External Organization Id # @param note_id Note Id # @param [Hash] opts the optional parameters # @return [Array<(Empty, Fixnum, Hash)>] Empty data, response status code and response headers def delete_externalcontacts_organization_note_with_http_info(external_organization_id, note_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.delete_externalcontacts_organization_note ..." end # verify the required parameter 'external_organization_id' is set fail ArgumentError, "Missing the required parameter 'external_organization_id' when calling ExternalContactsApi.delete_externalcontacts_organization_note" if external_organization_id.nil? # verify the required parameter 'note_id' is set fail ArgumentError, "Missing the required parameter 'note_id' when calling ExternalContactsApi.delete_externalcontacts_organization_note" if note_id.nil? # resource path local_var_path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}/notes/{noteId}".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s).sub('{' + 'noteId' + '}', note_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Empty') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#delete_externalcontacts_organization_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Unlink the Trustor for this External Organization # # @param external_organization_id External Organization ID # @param [Hash] opts the optional parameters # @return [nil] def delete_externalcontacts_organization_trustor(external_organization_id, opts = {}) delete_externalcontacts_organization_trustor_with_http_info(external_organization_id, opts) return nil end # Unlink the Trustor for this External Organization # # @param external_organization_id External Organization ID # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_externalcontacts_organization_trustor_with_http_info(external_organization_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.delete_externalcontacts_organization_trustor ..." end # verify the required parameter 'external_organization_id' is set fail ArgumentError, "Missing the required parameter 'external_organization_id' when calling ExternalContactsApi.delete_externalcontacts_organization_trustor" if external_organization_id.nil? # resource path local_var_path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}/trustor".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#delete_externalcontacts_organization_trustor\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete a relationship # # @param relationship_id Relationship Id # @param [Hash] opts the optional parameters # @return [Empty] def delete_externalcontacts_relationship(relationship_id, opts = {}) data, _status_code, _headers = delete_externalcontacts_relationship_with_http_info(relationship_id, opts) return data end # Delete a relationship # # @param relationship_id Relationship Id # @param [Hash] opts the optional parameters # @return [Array<(Empty, Fixnum, Hash)>] Empty data, response status code and response headers def delete_externalcontacts_relationship_with_http_info(relationship_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.delete_externalcontacts_relationship ..." end # verify the required parameter 'relationship_id' is set fail ArgumentError, "Missing the required parameter 'relationship_id' when calling ExternalContactsApi.delete_externalcontacts_relationship" if relationship_id.nil? # resource path local_var_path = "/api/v2/externalcontacts/relationships/{relationshipId}".sub('{format}','json').sub('{' + 'relationshipId' + '}', relationship_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Empty') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#delete_externalcontacts_relationship\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Fetch an external contact # # @param contact_id ExternalContact ID # @param [Hash] opts the optional parameters # @option opts [Array] :expand which fields, if any, to expand (externalOrganization,externalDataSources) # @return [ExternalContact] def get_externalcontacts_contact(contact_id, opts = {}) data, _status_code, _headers = get_externalcontacts_contact_with_http_info(contact_id, opts) return data end # Fetch an external contact # # @param contact_id ExternalContact ID # @param [Hash] opts the optional parameters # @option opts [Array] :expand which fields, if any, to expand (externalOrganization,externalDataSources) # @return [Array<(ExternalContact, Fixnum, Hash)>] ExternalContact data, response status code and response headers def get_externalcontacts_contact_with_http_info(contact_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.get_externalcontacts_contact ..." end # verify the required parameter 'contact_id' is set fail ArgumentError, "Missing the required parameter 'contact_id' when calling ExternalContactsApi.get_externalcontacts_contact" if contact_id.nil? # resource path local_var_path = "/api/v2/externalcontacts/contacts/{contactId}".sub('{format}','json').sub('{' + 'contactId' + '}', contact_id.to_s) # query parameters query_params = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ExternalContact') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#get_externalcontacts_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Fetch a note for an external contact # # @param contact_id ExternalContact Id # @param note_id Note Id # @param [Hash] opts the optional parameters # @option opts [Array] :expand which fields, if any, to expand # @return [Note] def get_externalcontacts_contact_note(contact_id, note_id, opts = {}) data, _status_code, _headers = get_externalcontacts_contact_note_with_http_info(contact_id, note_id, opts) return data end # Fetch a note for an external contact # # @param contact_id ExternalContact Id # @param note_id Note Id # @param [Hash] opts the optional parameters # @option opts [Array] :expand which fields, if any, to expand # @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers def get_externalcontacts_contact_note_with_http_info(contact_id, note_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.get_externalcontacts_contact_note ..." end # verify the required parameter 'contact_id' is set fail ArgumentError, "Missing the required parameter 'contact_id' when calling ExternalContactsApi.get_externalcontacts_contact_note" if contact_id.nil? # verify the required parameter 'note_id' is set fail ArgumentError, "Missing the required parameter 'note_id' when calling ExternalContactsApi.get_externalcontacts_contact_note" if note_id.nil? # resource path local_var_path = "/api/v2/externalcontacts/contacts/{contactId}/notes/{noteId}".sub('{format}','json').sub('{' + 'contactId' + '}', contact_id.to_s).sub('{' + 'noteId' + '}', note_id.to_s) # query parameters query_params = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Note') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#get_externalcontacts_contact_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # List notes for an external contact # # @param contact_id ExternalContact Id # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) (default to 20) # @option opts [Integer] :page_number Page number (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) (default to 1) # @option opts [String] :sort_order Sort order # @option opts [Array] :expand which fields, if any, to expand # @return [NoteListing] def get_externalcontacts_contact_notes(contact_id, opts = {}) data, _status_code, _headers = get_externalcontacts_contact_notes_with_http_info(contact_id, opts) return data end # List notes for an external contact # # @param contact_id ExternalContact Id # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) # @option opts [Integer] :page_number Page number (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) # @option opts [String] :sort_order Sort order # @option opts [Array] :expand which fields, if any, to expand # @return [Array<(NoteListing, Fixnum, Hash)>] NoteListing data, response status code and response headers def get_externalcontacts_contact_notes_with_http_info(contact_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.get_externalcontacts_contact_notes ..." end # verify the required parameter 'contact_id' is set fail ArgumentError, "Missing the required parameter 'contact_id' when calling ExternalContactsApi.get_externalcontacts_contact_notes" if contact_id.nil? # resource path local_var_path = "/api/v2/externalcontacts/contacts/{contactId}/notes".sub('{format}','json').sub('{' + 'contactId' + '}', contact_id.to_s) # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'NoteListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#get_externalcontacts_contact_notes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Search for external contacts # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) (default to 20) # @option opts [Integer] :page_number Page number (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) (default to 1) # @option opts [String] :q User supplied search keywords (no special syntax is currently supported) # @option opts [String] :sort_order Sort order # @option opts [Array] :expand which fields, if any, to expand # @return [ContactListing] def get_externalcontacts_contacts(opts = {}) data, _status_code, _headers = get_externalcontacts_contacts_with_http_info(opts) return data end # Search for external contacts # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) # @option opts [Integer] :page_number Page number (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) # @option opts [String] :q User supplied search keywords (no special syntax is currently supported) # @option opts [String] :sort_order Sort order # @option opts [Array] :expand which fields, if any, to expand # @return [Array<(ContactListing, Fixnum, Hash)>] ContactListing data, response status code and response headers def get_externalcontacts_contacts_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.get_externalcontacts_contacts ..." end # resource path local_var_path = "/api/v2/externalcontacts/contacts".sub('{format}','json') # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'q'] = opts[:'q'] if opts[:'q'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ContactListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#get_externalcontacts_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a schema # # @param schema_id Schema ID # @param [Hash] opts the optional parameters # @return [DataSchema] def get_externalcontacts_contacts_schema(schema_id, opts = {}) data, _status_code, _headers = get_externalcontacts_contacts_schema_with_http_info(schema_id, opts) return data end # Get a schema # # @param schema_id Schema ID # @param [Hash] opts the optional parameters # @return [Array<(DataSchema, Fixnum, Hash)>] DataSchema data, response status code and response headers def get_externalcontacts_contacts_schema_with_http_info(schema_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.get_externalcontacts_contacts_schema ..." end # verify the required parameter 'schema_id' is set fail ArgumentError, "Missing the required parameter 'schema_id' when calling ExternalContactsApi.get_externalcontacts_contacts_schema" if schema_id.nil? # resource path local_var_path = "/api/v2/externalcontacts/contacts/schemas/{schemaId}".sub('{format}','json').sub('{' + 'schemaId' + '}', schema_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DataSchema') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#get_externalcontacts_contacts_schema\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a specific version of a schema # # @param schema_id Schema ID # @param version_id Schema version # @param [Hash] opts the optional parameters # @return [DataSchema] def get_externalcontacts_contacts_schema_version(schema_id, version_id, opts = {}) data, _status_code, _headers = get_externalcontacts_contacts_schema_version_with_http_info(schema_id, version_id, opts) return data end # Get a specific version of a schema # # @param schema_id Schema ID # @param version_id Schema version # @param [Hash] opts the optional parameters # @return [Array<(DataSchema, Fixnum, Hash)>] DataSchema data, response status code and response headers def get_externalcontacts_contacts_schema_version_with_http_info(schema_id, version_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.get_externalcontacts_contacts_schema_version ..." end # verify the required parameter 'schema_id' is set fail ArgumentError, "Missing the required parameter 'schema_id' when calling ExternalContactsApi.get_externalcontacts_contacts_schema_version" if schema_id.nil? # verify the required parameter 'version_id' is set fail ArgumentError, "Missing the required parameter 'version_id' when calling ExternalContactsApi.get_externalcontacts_contacts_schema_version" if version_id.nil? # resource path local_var_path = "/api/v2/externalcontacts/contacts/schemas/{schemaId}/versions/{versionId}".sub('{format}','json').sub('{' + 'schemaId' + '}', schema_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DataSchema') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#get_externalcontacts_contacts_schema_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get all versions of an external contact's schema # # @param schema_id Schema ID # @param [Hash] opts the optional parameters # @return [DataSchema] def get_externalcontacts_contacts_schema_versions(schema_id, opts = {}) data, _status_code, _headers = get_externalcontacts_contacts_schema_versions_with_http_info(schema_id, opts) return data end # Get all versions of an external contact's schema # # @param schema_id Schema ID # @param [Hash] opts the optional parameters # @return [Array<(DataSchema, Fixnum, Hash)>] DataSchema data, response status code and response headers def get_externalcontacts_contacts_schema_versions_with_http_info(schema_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.get_externalcontacts_contacts_schema_versions ..." end # verify the required parameter 'schema_id' is set fail ArgumentError, "Missing the required parameter 'schema_id' when calling ExternalContactsApi.get_externalcontacts_contacts_schema_versions" if schema_id.nil? # resource path local_var_path = "/api/v2/externalcontacts/contacts/schemas/{schemaId}/versions".sub('{format}','json').sub('{' + 'schemaId' + '}', schema_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DataSchema') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#get_externalcontacts_contacts_schema_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a list of schemas. # # @param [Hash] opts the optional parameters # @return [DataSchemaListing] def get_externalcontacts_contacts_schemas(opts = {}) data, _status_code, _headers = get_externalcontacts_contacts_schemas_with_http_info(opts) return data end # Get a list of schemas. # # @param [Hash] opts the optional parameters # @return [Array<(DataSchemaListing, Fixnum, Hash)>] DataSchemaListing data, response status code and response headers def get_externalcontacts_contacts_schemas_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.get_externalcontacts_contacts_schemas ..." end # resource path local_var_path = "/api/v2/externalcontacts/contacts/schemas".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DataSchemaListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#get_externalcontacts_contacts_schemas\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Fetch an external organization # # @param external_organization_id External Organization ID # @param [Hash] opts the optional parameters # @option opts [String] :expand which fields, if any, to expand (externalDataSources) # @option opts [BOOLEAN] :include_trustors (true or false) whether or not to include trustor information embedded in the externalOrganization # @return [ExternalOrganization] def get_externalcontacts_organization(external_organization_id, opts = {}) data, _status_code, _headers = get_externalcontacts_organization_with_http_info(external_organization_id, opts) return data end # Fetch an external organization # # @param external_organization_id External Organization ID # @param [Hash] opts the optional parameters # @option opts [String] :expand which fields, if any, to expand (externalDataSources) # @option opts [BOOLEAN] :include_trustors (true or false) whether or not to include trustor information embedded in the externalOrganization # @return [Array<(ExternalOrganization, Fixnum, Hash)>] ExternalOrganization data, response status code and response headers def get_externalcontacts_organization_with_http_info(external_organization_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.get_externalcontacts_organization ..." end # verify the required parameter 'external_organization_id' is set fail ArgumentError, "Missing the required parameter 'external_organization_id' when calling ExternalContactsApi.get_externalcontacts_organization" if external_organization_id.nil? if opts[:'expand'] && !['externalDataSources'].include?(opts[:'expand']) fail ArgumentError, 'invalid value for "expand", must be one of externalDataSources' end # resource path local_var_path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s) # query parameters query_params = {} query_params[:'expand'] = opts[:'expand'] if opts[:'expand'] query_params[:'includeTrustors'] = opts[:'include_trustors'] if opts[:'include_trustors'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ExternalOrganization') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#get_externalcontacts_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Search for external contacts in an external organization # # @param external_organization_id External Organization ID # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) (default to 20) # @option opts [Integer] :page_number Page number (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) (default to 1) # @option opts [String] :q User supplied search keywords (no special syntax is currently supported) # @option opts [String] :sort_order Sort order # @option opts [Array] :expand which fields, if any, to expand # @return [ContactListing] def get_externalcontacts_organization_contacts(external_organization_id, opts = {}) data, _status_code, _headers = get_externalcontacts_organization_contacts_with_http_info(external_organization_id, opts) return data end # Search for external contacts in an external organization # # @param external_organization_id External Organization ID # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) # @option opts [Integer] :page_number Page number (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) # @option opts [String] :q User supplied search keywords (no special syntax is currently supported) # @option opts [String] :sort_order Sort order # @option opts [Array] :expand which fields, if any, to expand # @return [Array<(ContactListing, Fixnum, Hash)>] ContactListing data, response status code and response headers def get_externalcontacts_organization_contacts_with_http_info(external_organization_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.get_externalcontacts_organization_contacts ..." end # verify the required parameter 'external_organization_id' is set fail ArgumentError, "Missing the required parameter 'external_organization_id' when calling ExternalContactsApi.get_externalcontacts_organization_contacts" if external_organization_id.nil? # resource path local_var_path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}/contacts".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s) # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'q'] = opts[:'q'] if opts[:'q'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ContactListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#get_externalcontacts_organization_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Fetch a note for an external organization # # @param external_organization_id External Organization Id # @param note_id Note Id # @param [Hash] opts the optional parameters # @option opts [Array] :expand which fields, if any, to expand # @return [Note] def get_externalcontacts_organization_note(external_organization_id, note_id, opts = {}) data, _status_code, _headers = get_externalcontacts_organization_note_with_http_info(external_organization_id, note_id, opts) return data end # Fetch a note for an external organization # # @param external_organization_id External Organization Id # @param note_id Note Id # @param [Hash] opts the optional parameters # @option opts [Array] :expand which fields, if any, to expand # @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers def get_externalcontacts_organization_note_with_http_info(external_organization_id, note_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.get_externalcontacts_organization_note ..." end # verify the required parameter 'external_organization_id' is set fail ArgumentError, "Missing the required parameter 'external_organization_id' when calling ExternalContactsApi.get_externalcontacts_organization_note" if external_organization_id.nil? # verify the required parameter 'note_id' is set fail ArgumentError, "Missing the required parameter 'note_id' when calling ExternalContactsApi.get_externalcontacts_organization_note" if note_id.nil? # resource path local_var_path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}/notes/{noteId}".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s).sub('{' + 'noteId' + '}', note_id.to_s) # query parameters query_params = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Note') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#get_externalcontacts_organization_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # List notes for an external organization # # @param external_organization_id External Organization Id # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) (default to 20) # @option opts [Integer] :page_number Page number (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) (default to 1) # @option opts [String] :sort_order Sort order # @option opts [Array] :expand which fields, if any, to expand # @return [NoteListing] def get_externalcontacts_organization_notes(external_organization_id, opts = {}) data, _status_code, _headers = get_externalcontacts_organization_notes_with_http_info(external_organization_id, opts) return data end # List notes for an external organization # # @param external_organization_id External Organization Id # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) # @option opts [Integer] :page_number Page number (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) # @option opts [String] :sort_order Sort order # @option opts [Array] :expand which fields, if any, to expand # @return [Array<(NoteListing, Fixnum, Hash)>] NoteListing data, response status code and response headers def get_externalcontacts_organization_notes_with_http_info(external_organization_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.get_externalcontacts_organization_notes ..." end # verify the required parameter 'external_organization_id' is set fail ArgumentError, "Missing the required parameter 'external_organization_id' when calling ExternalContactsApi.get_externalcontacts_organization_notes" if external_organization_id.nil? # resource path local_var_path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}/notes".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s) # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'NoteListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#get_externalcontacts_organization_notes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Fetch a relationship for an external organization # # @param external_organization_id External Organization ID # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) (default to 20) # @option opts [Integer] :page_number Page number (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) (default to 1) # @option opts [String] :expand which fields, if any, to expand # @option opts [String] :sort_order Sort order # @return [RelationshipListing] def get_externalcontacts_organization_relationships(external_organization_id, opts = {}) data, _status_code, _headers = get_externalcontacts_organization_relationships_with_http_info(external_organization_id, opts) return data end # Fetch a relationship for an external organization # # @param external_organization_id External Organization ID # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) # @option opts [Integer] :page_number Page number (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) # @option opts [String] :expand which fields, if any, to expand # @option opts [String] :sort_order Sort order # @return [Array<(RelationshipListing, Fixnum, Hash)>] RelationshipListing data, response status code and response headers def get_externalcontacts_organization_relationships_with_http_info(external_organization_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.get_externalcontacts_organization_relationships ..." end # verify the required parameter 'external_organization_id' is set fail ArgumentError, "Missing the required parameter 'external_organization_id' when calling ExternalContactsApi.get_externalcontacts_organization_relationships" if external_organization_id.nil? if opts[:'expand'] && !['externalDataSources'].include?(opts[:'expand']) fail ArgumentError, 'invalid value for "expand", must be one of externalDataSources' end # resource path local_var_path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}/relationships".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s) # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'expand'] = opts[:'expand'] if opts[:'expand'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'RelationshipListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#get_externalcontacts_organization_relationships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Search for external organizations # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) (default to 20) # @option opts [Integer] :page_number Page number (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) (default to 1) # @option opts [String] :q Search query # @option opts [Array] :trustor_id Search for external organizations by trustorIds (limit 25). If supplied, the 'q' parameters is ignored. Items are returned in the order requested # @option opts [String] :sort_order Sort order # @option opts [Array] :expand which fields, if any, to expand # @option opts [BOOLEAN] :include_trustors (true or false) whether or not to include trustor information embedded in the externalOrganization # @return [ExternalOrganizationListing] def get_externalcontacts_organizations(opts = {}) data, _status_code, _headers = get_externalcontacts_organizations_with_http_info(opts) return data end # Search for external organizations # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) # @option opts [Integer] :page_number Page number (limited to fetching first 1,000 records; pageNumber * pageSize must be <= 1,000) # @option opts [String] :q Search query # @option opts [Array] :trustor_id Search for external organizations by trustorIds (limit 25). If supplied, the 'q' parameters is ignored. Items are returned in the order requested # @option opts [String] :sort_order Sort order # @option opts [Array] :expand which fields, if any, to expand # @option opts [BOOLEAN] :include_trustors (true or false) whether or not to include trustor information embedded in the externalOrganization # @return [Array<(ExternalOrganizationListing, Fixnum, Hash)>] ExternalOrganizationListing data, response status code and response headers def get_externalcontacts_organizations_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.get_externalcontacts_organizations ..." end # resource path local_var_path = "/api/v2/externalcontacts/organizations".sub('{format}','json') # query parameters query_params = {} query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] query_params[:'q'] = opts[:'q'] if opts[:'q'] query_params[:'trustorId'] = @api_client.build_collection_param(opts[:'trustor_id'], :multi) if opts[:'trustor_id'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] query_params[:'includeTrustors'] = opts[:'include_trustors'] if opts[:'include_trustors'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ExternalOrganizationListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#get_externalcontacts_organizations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a schema # # @param schema_id Schema ID # @param [Hash] opts the optional parameters # @return [DataSchema] def get_externalcontacts_organizations_schema(schema_id, opts = {}) data, _status_code, _headers = get_externalcontacts_organizations_schema_with_http_info(schema_id, opts) return data end # Get a schema # # @param schema_id Schema ID # @param [Hash] opts the optional parameters # @return [Array<(DataSchema, Fixnum, Hash)>] DataSchema data, response status code and response headers def get_externalcontacts_organizations_schema_with_http_info(schema_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.get_externalcontacts_organizations_schema ..." end # verify the required parameter 'schema_id' is set fail ArgumentError, "Missing the required parameter 'schema_id' when calling ExternalContactsApi.get_externalcontacts_organizations_schema" if schema_id.nil? # resource path local_var_path = "/api/v2/externalcontacts/organizations/schemas/{schemaId}".sub('{format}','json').sub('{' + 'schemaId' + '}', schema_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DataSchema') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#get_externalcontacts_organizations_schema\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a specific version of a schema # # @param schema_id Schema ID # @param version_id Schema version # @param [Hash] opts the optional parameters # @return [DataSchema] def get_externalcontacts_organizations_schema_version(schema_id, version_id, opts = {}) data, _status_code, _headers = get_externalcontacts_organizations_schema_version_with_http_info(schema_id, version_id, opts) return data end # Get a specific version of a schema # # @param schema_id Schema ID # @param version_id Schema version # @param [Hash] opts the optional parameters # @return [Array<(DataSchema, Fixnum, Hash)>] DataSchema data, response status code and response headers def get_externalcontacts_organizations_schema_version_with_http_info(schema_id, version_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.get_externalcontacts_organizations_schema_version ..." end # verify the required parameter 'schema_id' is set fail ArgumentError, "Missing the required parameter 'schema_id' when calling ExternalContactsApi.get_externalcontacts_organizations_schema_version" if schema_id.nil? # verify the required parameter 'version_id' is set fail ArgumentError, "Missing the required parameter 'version_id' when calling ExternalContactsApi.get_externalcontacts_organizations_schema_version" if version_id.nil? # resource path local_var_path = "/api/v2/externalcontacts/organizations/schemas/{schemaId}/versions/{versionId}".sub('{format}','json').sub('{' + 'schemaId' + '}', schema_id.to_s).sub('{' + 'versionId' + '}', version_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DataSchema') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#get_externalcontacts_organizations_schema_version\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get all versions of an external organization's schema # # @param schema_id Schema ID # @param [Hash] opts the optional parameters # @return [DataSchema] def get_externalcontacts_organizations_schema_versions(schema_id, opts = {}) data, _status_code, _headers = get_externalcontacts_organizations_schema_versions_with_http_info(schema_id, opts) return data end # Get all versions of an external organization's schema # # @param schema_id Schema ID # @param [Hash] opts the optional parameters # @return [Array<(DataSchema, Fixnum, Hash)>] DataSchema data, response status code and response headers def get_externalcontacts_organizations_schema_versions_with_http_info(schema_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.get_externalcontacts_organizations_schema_versions ..." end # verify the required parameter 'schema_id' is set fail ArgumentError, "Missing the required parameter 'schema_id' when calling ExternalContactsApi.get_externalcontacts_organizations_schema_versions" if schema_id.nil? # resource path local_var_path = "/api/v2/externalcontacts/organizations/schemas/{schemaId}/versions".sub('{format}','json').sub('{' + 'schemaId' + '}', schema_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DataSchema') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#get_externalcontacts_organizations_schema_versions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get a list of schemas. # # @param [Hash] opts the optional parameters # @return [DataSchemaListing] def get_externalcontacts_organizations_schemas(opts = {}) data, _status_code, _headers = get_externalcontacts_organizations_schemas_with_http_info(opts) return data end # Get a list of schemas. # # @param [Hash] opts the optional parameters # @return [Array<(DataSchemaListing, Fixnum, Hash)>] DataSchemaListing data, response status code and response headers def get_externalcontacts_organizations_schemas_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.get_externalcontacts_organizations_schemas ..." end # resource path local_var_path = "/api/v2/externalcontacts/organizations/schemas".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DataSchemaListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#get_externalcontacts_organizations_schemas\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Fetch a relationship # # @param relationship_id Relationship Id # @param [Hash] opts the optional parameters # @option opts [String] :expand which fields, if any, to expand # @return [Relationship] def get_externalcontacts_relationship(relationship_id, opts = {}) data, _status_code, _headers = get_externalcontacts_relationship_with_http_info(relationship_id, opts) return data end # Fetch a relationship # # @param relationship_id Relationship Id # @param [Hash] opts the optional parameters # @option opts [String] :expand which fields, if any, to expand # @return [Array<(Relationship, Fixnum, Hash)>] Relationship data, response status code and response headers def get_externalcontacts_relationship_with_http_info(relationship_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.get_externalcontacts_relationship ..." end # verify the required parameter 'relationship_id' is set fail ArgumentError, "Missing the required parameter 'relationship_id' when calling ExternalContactsApi.get_externalcontacts_relationship" if relationship_id.nil? if opts[:'expand'] && !['externalDataSources'].include?(opts[:'expand']) fail ArgumentError, 'invalid value for "expand", must be one of externalDataSources' end # resource path local_var_path = "/api/v2/externalcontacts/relationships/{relationshipId}".sub('{format}','json').sub('{' + 'relationshipId' + '}', relationship_id.to_s) # query parameters query_params = {} query_params[:'expand'] = opts[:'expand'] if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Relationship') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#get_externalcontacts_relationship\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Look up contacts and externalOrganizations based on an attribute. Maximum of 25 values returned. # # @param lookup_val User supplied value to lookup contacts/externalOrganizations (supports email addresses, e164 phone numbers, Twitter screen names) # @param [Hash] opts the optional parameters # @option opts [Array] :expand which field, if any, to expand # @return [ReverseWhitepagesLookupResult] def get_externalcontacts_reversewhitepageslookup(lookup_val, opts = {}) data, _status_code, _headers = get_externalcontacts_reversewhitepageslookup_with_http_info(lookup_val, opts) return data end # Look up contacts and externalOrganizations based on an attribute. Maximum of 25 values returned. # # @param lookup_val User supplied value to lookup contacts/externalOrganizations (supports email addresses, e164 phone numbers, Twitter screen names) # @param [Hash] opts the optional parameters # @option opts [Array] :expand which field, if any, to expand # @return [Array<(ReverseWhitepagesLookupResult, Fixnum, Hash)>] ReverseWhitepagesLookupResult data, response status code and response headers def get_externalcontacts_reversewhitepageslookup_with_http_info(lookup_val, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.get_externalcontacts_reversewhitepageslookup ..." end # verify the required parameter 'lookup_val' is set fail ArgumentError, "Missing the required parameter 'lookup_val' when calling ExternalContactsApi.get_externalcontacts_reversewhitepageslookup" if lookup_val.nil? # resource path local_var_path = "/api/v2/externalcontacts/reversewhitepageslookup".sub('{format}','json') # query parameters query_params = {} query_params[:'lookupVal'] = lookup_val query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ReverseWhitepagesLookupResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#get_externalcontacts_reversewhitepageslookup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Scan for external contacts using paging # # @param [Hash] opts the optional parameters # @option opts [Integer] :limit The number of contacts per page; must be between 10 and 200, default is 100) # @option opts [String] :cursor Indicates where to resume query results (not required for first page), each page returns a new cursor with a 24h TTL # @return [CursorContactListing] def get_externalcontacts_scan_contacts(opts = {}) data, _status_code, _headers = get_externalcontacts_scan_contacts_with_http_info(opts) return data end # Scan for external contacts using paging # # @param [Hash] opts the optional parameters # @option opts [Integer] :limit The number of contacts per page; must be between 10 and 200, default is 100) # @option opts [String] :cursor Indicates where to resume query results (not required for first page), each page returns a new cursor with a 24h TTL # @return [Array<(CursorContactListing, Fixnum, Hash)>] CursorContactListing data, response status code and response headers def get_externalcontacts_scan_contacts_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.get_externalcontacts_scan_contacts ..." end # resource path local_var_path = "/api/v2/externalcontacts/scan/contacts".sub('{format}','json') # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if opts[:'limit'] query_params[:'cursor'] = opts[:'cursor'] if opts[:'cursor'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CursorContactListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#get_externalcontacts_scan_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Scan for notes using paging # # @param [Hash] opts the optional parameters # @option opts [Integer] :limit The number of notes per page; must be between 10 and 200, default is 100) # @option opts [String] :cursor Indicates where to resume query results (not required for first page), each page returns a new cursor with a 24h TTL # @return [CursorNoteListing] def get_externalcontacts_scan_notes(opts = {}) data, _status_code, _headers = get_externalcontacts_scan_notes_with_http_info(opts) return data end # Scan for notes using paging # # @param [Hash] opts the optional parameters # @option opts [Integer] :limit The number of notes per page; must be between 10 and 200, default is 100) # @option opts [String] :cursor Indicates where to resume query results (not required for first page), each page returns a new cursor with a 24h TTL # @return [Array<(CursorNoteListing, Fixnum, Hash)>] CursorNoteListing data, response status code and response headers def get_externalcontacts_scan_notes_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.get_externalcontacts_scan_notes ..." end # resource path local_var_path = "/api/v2/externalcontacts/scan/notes".sub('{format}','json') # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if opts[:'limit'] query_params[:'cursor'] = opts[:'cursor'] if opts[:'cursor'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CursorNoteListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#get_externalcontacts_scan_notes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Scan for external organizations using paging # # @param [Hash] opts the optional parameters # @option opts [Integer] :limit The number of organizations per page; must be between 10 and 200, default is 100) # @option opts [String] :cursor Indicates where to resume query results (not required for first page), each page returns a new cursor with a 24h TTL # @return [CursorOrganizationListing] def get_externalcontacts_scan_organizations(opts = {}) data, _status_code, _headers = get_externalcontacts_scan_organizations_with_http_info(opts) return data end # Scan for external organizations using paging # # @param [Hash] opts the optional parameters # @option opts [Integer] :limit The number of organizations per page; must be between 10 and 200, default is 100) # @option opts [String] :cursor Indicates where to resume query results (not required for first page), each page returns a new cursor with a 24h TTL # @return [Array<(CursorOrganizationListing, Fixnum, Hash)>] CursorOrganizationListing data, response status code and response headers def get_externalcontacts_scan_organizations_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.get_externalcontacts_scan_organizations ..." end # resource path local_var_path = "/api/v2/externalcontacts/scan/organizations".sub('{format}','json') # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if opts[:'limit'] query_params[:'cursor'] = opts[:'cursor'] if opts[:'cursor'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CursorOrganizationListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#get_externalcontacts_scan_organizations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Scan for relationships # # @param [Hash] opts the optional parameters # @option opts [Integer] :limit The number of relationships per page; must be between 10 and 200, default is 100) # @option opts [String] :cursor Indicates where to resume query results (not required for first page), each page returns a new cursor with a 24h TTL # @return [CursorRelationshipListing] def get_externalcontacts_scan_relationships(opts = {}) data, _status_code, _headers = get_externalcontacts_scan_relationships_with_http_info(opts) return data end # Scan for relationships # # @param [Hash] opts the optional parameters # @option opts [Integer] :limit The number of relationships per page; must be between 10 and 200, default is 100) # @option opts [String] :cursor Indicates where to resume query results (not required for first page), each page returns a new cursor with a 24h TTL # @return [Array<(CursorRelationshipListing, Fixnum, Hash)>] CursorRelationshipListing data, response status code and response headers def get_externalcontacts_scan_relationships_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.get_externalcontacts_scan_relationships ..." end # resource path local_var_path = "/api/v2/externalcontacts/scan/relationships".sub('{format}','json') # query parameters query_params = {} query_params[:'limit'] = opts[:'limit'] if opts[:'limit'] query_params[:'cursor'] = opts[:'cursor'] if opts[:'cursor'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'CursorRelationshipListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#get_externalcontacts_scan_relationships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a note for an external contact # # @param contact_id ExternalContact Id # @param body ExternalContact # @param [Hash] opts the optional parameters # @return [Note] def post_externalcontacts_contact_notes(contact_id, body, opts = {}) data, _status_code, _headers = post_externalcontacts_contact_notes_with_http_info(contact_id, body, opts) return data end # Create a note for an external contact # # @param contact_id ExternalContact Id # @param body ExternalContact # @param [Hash] opts the optional parameters # @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers def post_externalcontacts_contact_notes_with_http_info(contact_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.post_externalcontacts_contact_notes ..." end # verify the required parameter 'contact_id' is set fail ArgumentError, "Missing the required parameter 'contact_id' when calling ExternalContactsApi.post_externalcontacts_contact_notes" if contact_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling ExternalContactsApi.post_externalcontacts_contact_notes" if body.nil? # resource path local_var_path = "/api/v2/externalcontacts/contacts/{contactId}/notes".sub('{format}','json').sub('{' + 'contactId' + '}', contact_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] 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 => 'Note') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#post_externalcontacts_contact_notes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create an external contact # # @param body ExternalContact # @param [Hash] opts the optional parameters # @return [ExternalContact] def post_externalcontacts_contacts(body, opts = {}) data, _status_code, _headers = post_externalcontacts_contacts_with_http_info(body, opts) return data end # Create an external contact # # @param body ExternalContact # @param [Hash] opts the optional parameters # @return [Array<(ExternalContact, Fixnum, Hash)>] ExternalContact data, response status code and response headers def post_externalcontacts_contacts_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.post_externalcontacts_contacts ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling ExternalContactsApi.post_externalcontacts_contacts" if body.nil? # resource path local_var_path = "/api/v2/externalcontacts/contacts".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] 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 => 'ExternalContact') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#post_externalcontacts_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a schema # # @param body Schema # @param [Hash] opts the optional parameters # @return [DataSchema] def post_externalcontacts_contacts_schemas(body, opts = {}) data, _status_code, _headers = post_externalcontacts_contacts_schemas_with_http_info(body, opts) return data end # Create a schema # # @param body Schema # @param [Hash] opts the optional parameters # @return [Array<(DataSchema, Fixnum, Hash)>] DataSchema data, response status code and response headers def post_externalcontacts_contacts_schemas_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.post_externalcontacts_contacts_schemas ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling ExternalContactsApi.post_externalcontacts_contacts_schemas" if body.nil? # resource path local_var_path = "/api/v2/externalcontacts/contacts/schemas".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] 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 => 'DataSchema') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#post_externalcontacts_contacts_schemas\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a note for an external organization # # @param external_organization_id External Organization Id # @param body ExternalContact # @param [Hash] opts the optional parameters # @return [Note] def post_externalcontacts_organization_notes(external_organization_id, body, opts = {}) data, _status_code, _headers = post_externalcontacts_organization_notes_with_http_info(external_organization_id, body, opts) return data end # Create a note for an external organization # # @param external_organization_id External Organization Id # @param body ExternalContact # @param [Hash] opts the optional parameters # @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers def post_externalcontacts_organization_notes_with_http_info(external_organization_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.post_externalcontacts_organization_notes ..." end # verify the required parameter 'external_organization_id' is set fail ArgumentError, "Missing the required parameter 'external_organization_id' when calling ExternalContactsApi.post_externalcontacts_organization_notes" if external_organization_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling ExternalContactsApi.post_externalcontacts_organization_notes" if body.nil? # resource path local_var_path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}/notes".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] 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 => 'Note') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#post_externalcontacts_organization_notes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create an external organization # # @param body ExternalOrganization # @param [Hash] opts the optional parameters # @return [ExternalOrganization] def post_externalcontacts_organizations(body, opts = {}) data, _status_code, _headers = post_externalcontacts_organizations_with_http_info(body, opts) return data end # Create an external organization # # @param body ExternalOrganization # @param [Hash] opts the optional parameters # @return [Array<(ExternalOrganization, Fixnum, Hash)>] ExternalOrganization data, response status code and response headers def post_externalcontacts_organizations_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.post_externalcontacts_organizations ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling ExternalContactsApi.post_externalcontacts_organizations" if body.nil? # resource path local_var_path = "/api/v2/externalcontacts/organizations".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] 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 => 'ExternalOrganization') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#post_externalcontacts_organizations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a schema # # @param body Schema # @param [Hash] opts the optional parameters # @return [DataSchema] def post_externalcontacts_organizations_schemas(body, opts = {}) data, _status_code, _headers = post_externalcontacts_organizations_schemas_with_http_info(body, opts) return data end # Create a schema # # @param body Schema # @param [Hash] opts the optional parameters # @return [Array<(DataSchema, Fixnum, Hash)>] DataSchema data, response status code and response headers def post_externalcontacts_organizations_schemas_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.post_externalcontacts_organizations_schemas ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling ExternalContactsApi.post_externalcontacts_organizations_schemas" if body.nil? # resource path local_var_path = "/api/v2/externalcontacts/organizations/schemas".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] 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 => 'DataSchema') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#post_externalcontacts_organizations_schemas\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a relationship # # @param body Relationship # @param [Hash] opts the optional parameters # @return [Relationship] def post_externalcontacts_relationships(body, opts = {}) data, _status_code, _headers = post_externalcontacts_relationships_with_http_info(body, opts) return data end # Create a relationship # # @param body Relationship # @param [Hash] opts the optional parameters # @return [Array<(Relationship, Fixnum, Hash)>] Relationship data, response status code and response headers def post_externalcontacts_relationships_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.post_externalcontacts_relationships ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling ExternalContactsApi.post_externalcontacts_relationships" if body.nil? # resource path local_var_path = "/api/v2/externalcontacts/relationships".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] 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 => 'Relationship') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#post_externalcontacts_relationships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update an external contact # # @param contact_id ExternalContact ID # @param body ExternalContact # @param [Hash] opts the optional parameters # @return [ExternalContact] def put_externalcontacts_contact(contact_id, body, opts = {}) data, _status_code, _headers = put_externalcontacts_contact_with_http_info(contact_id, body, opts) return data end # Update an external contact # # @param contact_id ExternalContact ID # @param body ExternalContact # @param [Hash] opts the optional parameters # @return [Array<(ExternalContact, Fixnum, Hash)>] ExternalContact data, response status code and response headers def put_externalcontacts_contact_with_http_info(contact_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.put_externalcontacts_contact ..." end # verify the required parameter 'contact_id' is set fail ArgumentError, "Missing the required parameter 'contact_id' when calling ExternalContactsApi.put_externalcontacts_contact" if contact_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling ExternalContactsApi.put_externalcontacts_contact" if body.nil? # resource path local_var_path = "/api/v2/externalcontacts/contacts/{contactId}".sub('{format}','json').sub('{' + 'contactId' + '}', contact_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ExternalContact') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#put_externalcontacts_contact\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a note for an external contact # # @param contact_id ExternalContact Id # @param note_id Note Id # @param body Note # @param [Hash] opts the optional parameters # @return [Note] def put_externalcontacts_contact_note(contact_id, note_id, body, opts = {}) data, _status_code, _headers = put_externalcontacts_contact_note_with_http_info(contact_id, note_id, body, opts) return data end # Update a note for an external contact # # @param contact_id ExternalContact Id # @param note_id Note Id # @param body Note # @param [Hash] opts the optional parameters # @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers def put_externalcontacts_contact_note_with_http_info(contact_id, note_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.put_externalcontacts_contact_note ..." end # verify the required parameter 'contact_id' is set fail ArgumentError, "Missing the required parameter 'contact_id' when calling ExternalContactsApi.put_externalcontacts_contact_note" if contact_id.nil? # verify the required parameter 'note_id' is set fail ArgumentError, "Missing the required parameter 'note_id' when calling ExternalContactsApi.put_externalcontacts_contact_note" if note_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling ExternalContactsApi.put_externalcontacts_contact_note" if body.nil? # resource path local_var_path = "/api/v2/externalcontacts/contacts/{contactId}/notes/{noteId}".sub('{format}','json').sub('{' + 'contactId' + '}', contact_id.to_s).sub('{' + 'noteId' + '}', note_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Note') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#put_externalcontacts_contact_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a schema # # @param schema_id Schema ID # @param body Data Schema # @param [Hash] opts the optional parameters # @return [DataSchema] def put_externalcontacts_contacts_schema(schema_id, body, opts = {}) data, _status_code, _headers = put_externalcontacts_contacts_schema_with_http_info(schema_id, body, opts) return data end # Update a schema # # @param schema_id Schema ID # @param body Data Schema # @param [Hash] opts the optional parameters # @return [Array<(DataSchema, Fixnum, Hash)>] DataSchema data, response status code and response headers def put_externalcontacts_contacts_schema_with_http_info(schema_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.put_externalcontacts_contacts_schema ..." end # verify the required parameter 'schema_id' is set fail ArgumentError, "Missing the required parameter 'schema_id' when calling ExternalContactsApi.put_externalcontacts_contacts_schema" if schema_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling ExternalContactsApi.put_externalcontacts_contacts_schema" if body.nil? # resource path local_var_path = "/api/v2/externalcontacts/contacts/schemas/{schemaId}".sub('{format}','json').sub('{' + 'schemaId' + '}', schema_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DataSchema') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#put_externalcontacts_contacts_schema\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Associate/disassociate an external contact with a conversation # To associate, supply a value for the externalContactId. To disassociate, do not include the property at all. # @param body ConversationAssociation # @param conversation_id Conversation ID # @param [Hash] opts the optional parameters # @return [nil] def put_externalcontacts_conversation(body, conversation_id, opts = {}) put_externalcontacts_conversation_with_http_info(body, conversation_id, opts) return nil end # Associate/disassociate an external contact with a conversation # To associate, supply a value for the externalContactId. To disassociate, do not include the property at all. # @param body ConversationAssociation # @param conversation_id Conversation ID # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def put_externalcontacts_conversation_with_http_info(body, conversation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.put_externalcontacts_conversation ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling ExternalContactsApi.put_externalcontacts_conversation" if body.nil? # verify the required parameter 'conversation_id' is set fail ArgumentError, "Missing the required parameter 'conversation_id' when calling ExternalContactsApi.put_externalcontacts_conversation" if conversation_id.nil? # resource path local_var_path = "/api/v2/externalcontacts/conversations/{conversationId}".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#put_externalcontacts_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update an external organization # # @param external_organization_id External Organization ID # @param body ExternalOrganization # @param [Hash] opts the optional parameters # @return [ExternalOrganization] def put_externalcontacts_organization(external_organization_id, body, opts = {}) data, _status_code, _headers = put_externalcontacts_organization_with_http_info(external_organization_id, body, opts) return data end # Update an external organization # # @param external_organization_id External Organization ID # @param body ExternalOrganization # @param [Hash] opts the optional parameters # @return [Array<(ExternalOrganization, Fixnum, Hash)>] ExternalOrganization data, response status code and response headers def put_externalcontacts_organization_with_http_info(external_organization_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.put_externalcontacts_organization ..." end # verify the required parameter 'external_organization_id' is set fail ArgumentError, "Missing the required parameter 'external_organization_id' when calling ExternalContactsApi.put_externalcontacts_organization" if external_organization_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling ExternalContactsApi.put_externalcontacts_organization" if body.nil? # resource path local_var_path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ExternalOrganization') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#put_externalcontacts_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a note for an external organization # # @param external_organization_id External Organization Id # @param note_id Note Id # @param body Note # @param [Hash] opts the optional parameters # @return [Note] def put_externalcontacts_organization_note(external_organization_id, note_id, body, opts = {}) data, _status_code, _headers = put_externalcontacts_organization_note_with_http_info(external_organization_id, note_id, body, opts) return data end # Update a note for an external organization # # @param external_organization_id External Organization Id # @param note_id Note Id # @param body Note # @param [Hash] opts the optional parameters # @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers def put_externalcontacts_organization_note_with_http_info(external_organization_id, note_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.put_externalcontacts_organization_note ..." end # verify the required parameter 'external_organization_id' is set fail ArgumentError, "Missing the required parameter 'external_organization_id' when calling ExternalContactsApi.put_externalcontacts_organization_note" if external_organization_id.nil? # verify the required parameter 'note_id' is set fail ArgumentError, "Missing the required parameter 'note_id' when calling ExternalContactsApi.put_externalcontacts_organization_note" if note_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling ExternalContactsApi.put_externalcontacts_organization_note" if body.nil? # resource path local_var_path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}/notes/{noteId}".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s).sub('{' + 'noteId' + '}', note_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Note') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#put_externalcontacts_organization_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Links a Trustor with an External Organization # # @param external_organization_id External Organization ID # @param trustor_id Trustor ID # @param [Hash] opts the optional parameters # @return [ExternalOrganizationTrustorLink] def put_externalcontacts_organization_trustor_trustor_id(external_organization_id, trustor_id, opts = {}) data, _status_code, _headers = put_externalcontacts_organization_trustor_trustor_id_with_http_info(external_organization_id, trustor_id, opts) return data end # Links a Trustor with an External Organization # # @param external_organization_id External Organization ID # @param trustor_id Trustor ID # @param [Hash] opts the optional parameters # @return [Array<(ExternalOrganizationTrustorLink, Fixnum, Hash)>] ExternalOrganizationTrustorLink data, response status code and response headers def put_externalcontacts_organization_trustor_trustor_id_with_http_info(external_organization_id, trustor_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.put_externalcontacts_organization_trustor_trustor_id ..." end # verify the required parameter 'external_organization_id' is set fail ArgumentError, "Missing the required parameter 'external_organization_id' when calling ExternalContactsApi.put_externalcontacts_organization_trustor_trustor_id" if external_organization_id.nil? # verify the required parameter 'trustor_id' is set fail ArgumentError, "Missing the required parameter 'trustor_id' when calling ExternalContactsApi.put_externalcontacts_organization_trustor_trustor_id" if trustor_id.nil? # resource path local_var_path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}/trustor/{trustorId}".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s).sub('{' + 'trustorId' + '}', trustor_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ExternalOrganizationTrustorLink') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#put_externalcontacts_organization_trustor_trustor_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a schema # # @param schema_id Schema ID # @param body Data Schema # @param [Hash] opts the optional parameters # @return [DataSchema] def put_externalcontacts_organizations_schema(schema_id, body, opts = {}) data, _status_code, _headers = put_externalcontacts_organizations_schema_with_http_info(schema_id, body, opts) return data end # Update a schema # # @param schema_id Schema ID # @param body Data Schema # @param [Hash] opts the optional parameters # @return [Array<(DataSchema, Fixnum, Hash)>] DataSchema data, response status code and response headers def put_externalcontacts_organizations_schema_with_http_info(schema_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.put_externalcontacts_organizations_schema ..." end # verify the required parameter 'schema_id' is set fail ArgumentError, "Missing the required parameter 'schema_id' when calling ExternalContactsApi.put_externalcontacts_organizations_schema" if schema_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling ExternalContactsApi.put_externalcontacts_organizations_schema" if body.nil? # resource path local_var_path = "/api/v2/externalcontacts/organizations/schemas/{schemaId}".sub('{format}','json').sub('{' + 'schemaId' + '}', schema_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'DataSchema') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#put_externalcontacts_organizations_schema\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a relationship # # @param relationship_id Relationship Id # @param body Relationship # @param [Hash] opts the optional parameters # @return [Relationship] def put_externalcontacts_relationship(relationship_id, body, opts = {}) data, _status_code, _headers = put_externalcontacts_relationship_with_http_info(relationship_id, body, opts) return data end # Update a relationship # # @param relationship_id Relationship Id # @param body Relationship # @param [Hash] opts the optional parameters # @return [Array<(Relationship, Fixnum, Hash)>] Relationship data, response status code and response headers def put_externalcontacts_relationship_with_http_info(relationship_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ExternalContactsApi.put_externalcontacts_relationship ..." end # verify the required parameter 'relationship_id' is set fail ArgumentError, "Missing the required parameter 'relationship_id' when calling ExternalContactsApi.put_externalcontacts_relationship" if relationship_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling ExternalContactsApi.put_externalcontacts_relationship" if body.nil? # resource path local_var_path = "/api/v2/externalcontacts/relationships/{relationshipId}".sub('{format}','json').sub('{' + 'relationshipId' + '}', relationship_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Relationship') if @api_client.config.debugging @api_client.config.logger.debug "API called: ExternalContactsApi#put_externalcontacts_relationship\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end