lib/purecloud/api/external_contacts_api.rb in purecloud-0.35.1 vs lib/purecloud/api/external_contacts_api.rb in purecloud-0.36.1

- old
+ new

@@ -1,53 +1,59 @@ +=begin +PureCloud API + +PureCloud API + +OpenAPI spec version: v1 +Contact: chuck.pulfer@inin.com +Generated by: https://github.com/swagger-api/swagger-codegen.git + +License: ININ +http://www.inin.com + +Terms of Service: http://www.inin.com + +=end + require "uri" module PureCloud class ExternalContactsApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end - # Search for External Contacts + # Delete a contact # + # @param contact_id ExternalContact ID # @param [Hash] opts the optional parameters - # @option opts [Integer] :page_size Page size - # @option opts [Integer] :page_number Page number - # @option opts [String] :q User supplied search keywords (no special syntax is currently supported) - # @option opts [String] :sort_order Sort order - # @option opts [Array<String>] :expand which fields, if any, to expand - # @return [ContactListing] - def get_contacts(opts = {}) - data, status_code, headers = get_contacts_with_http_info(opts) - return data + # @return [nil] + def delete_contacts_contact_id(contact_id, opts = {}) + delete_contacts_contact_id_with_http_info(contact_id, opts) + return nil end - # Search for External Contacts + # Delete a contact # + # @param contact_id ExternalContact ID # @param [Hash] opts the optional parameters - # @option opts [Integer] :page_size Page size - # @option opts [Integer] :page_number Page number - # @option opts [String] :q User supplied search keywords (no special syntax is currently supported) - # @option opts [String] :sort_order Sort order - # @option opts [Array<String>] :expand which fields, if any, to expand - # @return [Array<(ContactListing, Fixnum, Hash)>] ContactListing data, response status code and response headers - def get_contacts_with_http_info(opts = {}) + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def delete_contacts_contact_id_with_http_info(contact_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_contacts ..." + @api_client.config.logger.debug "Calling API: ExternalContactsApi#delete_contacts_contact_id ..." end + # verify the required parameter 'contact_id' is set + fail "Missing the required parameter 'contact_id' when calling delete_contacts_contact_id" if contact_id.nil? + # resource path - path = "/api/v2/externalcontacts/contacts".sub('{format}','json') + local_var_path = "/api/v2/externalcontacts/contacts/{contactId}".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[:'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) @@ -62,47 +68,53 @@ form_params = {} # http body (model) post_body = nil - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:GET, path, + 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 => 'ContactListing') + :auth_names => auth_names) if @api_client.config.debugging - @api_client.config.logger.debug "API called: ExternalContactsApi#get_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ExternalContactsApi#delete_contacts_contact_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create an ExternalContact + # Delete a note for a contact # + # @param contact_id ExternalContact Id + # @param note_id Note Id # @param [Hash] opts the optional parameters - # @option opts [ExternalContact] :body ExternalContact - # @return [ExternalContact] - def post_contacts(opts = {}) - data, status_code, headers = post_contacts_with_http_info(opts) - return data + # @return [nil] + def delete_contacts_contact_id_notes_note_id(contact_id, note_id, opts = {}) + delete_contacts_contact_id_notes_note_id_with_http_info(contact_id, note_id, opts) + return nil end - # Create an ExternalContact + # Delete a note for a contact # + # @param contact_id ExternalContact Id + # @param note_id Note Id # @param [Hash] opts the optional parameters - # @option opts [ExternalContact] :body ExternalContact - # @return [Array<(ExternalContact, Fixnum, Hash)>] ExternalContact data, response status code and response headers - def post_contacts_with_http_info(opts = {}) + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def delete_contacts_contact_id_notes_note_id_with_http_info(contact_id, note_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: ExternalContactsApi#post_contacts ..." + @api_client.config.logger.debug "Calling API: ExternalContactsApi#delete_contacts_contact_id_notes_note_id ..." end + # verify the required parameter 'contact_id' is set + fail "Missing the required parameter 'contact_id' when calling delete_contacts_contact_id_notes_note_id" if contact_id.nil? + + # verify the required parameter 'note_id' is set + fail "Missing the required parameter 'note_id' when calling delete_contacts_contact_id_notes_note_id" if note_id.nil? + # resource path - path = "/api/v2/externalcontacts/contacts".sub('{format}','json') + 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 @@ -118,58 +130,53 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + post_body = nil - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:POST, path, + 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 => 'ExternalContact') + :auth_names => auth_names) if @api_client.config.debugging - @api_client.config.logger.debug "API called: ExternalContactsApi#post_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ExternalContactsApi#delete_contacts_contact_id_notes_note_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Fetch a ExternalContact + # Delete an External Organization # - # @param contact_id ExternalContact ID + # @param external_organization_id External Organization ID # @param [Hash] opts the optional parameters - # @option opts [Array<String>] :expand which fields, if any, to expand - # @return [ExternalContact] - def get_contacts_contact_id(contact_id, opts = {}) - data, status_code, headers = get_contacts_contact_id_with_http_info(contact_id, opts) - return data + # @return [nil] + def delete_organizations_externalorganization_id(external_organization_id, opts = {}) + delete_organizations_externalorganization_id_with_http_info(external_organization_id, opts) + return nil end - # Fetch a ExternalContact + # Delete an External Organization # - # @param contact_id ExternalContact ID + # @param external_organization_id External Organization ID # @param [Hash] opts the optional parameters - # @option opts [Array<String>] :expand which fields, if any, to expand - # @return [Array<(ExternalContact, Fixnum, Hash)>] ExternalContact data, response status code and response headers - def get_contacts_contact_id_with_http_info(contact_id, opts = {}) + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def delete_organizations_externalorganization_id_with_http_info(external_organization_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_contacts_contact_id ..." + @api_client.config.logger.debug "Calling API: ExternalContactsApi#delete_organizations_externalorganization_id ..." end - # verify the required parameter 'contact_id' is set - fail "Missing the required parameter 'contact_id' when calling get_contacts_contact_id" if contact_id.nil? + # verify the required parameter 'external_organization_id' is set + fail "Missing the required parameter 'external_organization_id' when calling delete_organizations_externalorganization_id" if external_organization_id.nil? # resource path - path = "/api/v2/externalcontacts/contacts/{contactId}".sub('{format}','json').sub('{' + 'contactId' + '}', contact_id.to_s) + 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'] = @api_client.build_collection_param(opts[:'expand'], :multi) if opts[:'expand'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) @@ -184,52 +191,53 @@ form_params = {} # http body (model) post_body = nil - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:GET, path, + 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 => 'ExternalContact') + :auth_names => auth_names) if @api_client.config.debugging - @api_client.config.logger.debug "API called: ExternalContactsApi#get_contacts_contact_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ExternalContactsApi#delete_organizations_externalorganization_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update a externalContact + # Delete a note # - # @param contact_id ExternalContact ID + # @param external_organization_id External Organization Id + # @param note_id Note Id # @param [Hash] opts the optional parameters - # @option opts [ExternalContact] :body ExternalContact - # @return [ExternalContact] - def put_contacts_contact_id(contact_id, opts = {}) - data, status_code, headers = put_contacts_contact_id_with_http_info(contact_id, opts) - return data + # @return [nil] + def delete_organizations_externalorganization_id_notes_note_id(external_organization_id, note_id, opts = {}) + delete_organizations_externalorganization_id_notes_note_id_with_http_info(external_organization_id, note_id, opts) + return nil end - # Update a externalContact + # Delete a note # - # @param contact_id ExternalContact ID + # @param external_organization_id External Organization Id + # @param note_id Note Id # @param [Hash] opts the optional parameters - # @option opts [ExternalContact] :body ExternalContact - # @return [Array<(ExternalContact, Fixnum, Hash)>] ExternalContact data, response status code and response headers - def put_contacts_contact_id_with_http_info(contact_id, opts = {}) + # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers + def delete_organizations_externalorganization_id_notes_note_id_with_http_info(external_organization_id, note_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: ExternalContactsApi#put_contacts_contact_id ..." + @api_client.config.logger.debug "Calling API: ExternalContactsApi#delete_organizations_externalorganization_id_notes_note_id ..." end - # verify the required parameter 'contact_id' is set - fail "Missing the required parameter 'contact_id' when calling put_contacts_contact_id" if contact_id.nil? + # verify the required parameter 'external_organization_id' is set + fail "Missing the required parameter 'external_organization_id' when calling delete_organizations_externalorganization_id_notes_note_id" if external_organization_id.nil? + # verify the required parameter 'note_id' is set + fail "Missing the required parameter 'note_id' when calling delete_organizations_externalorganization_id_notes_note_id" if note_id.nil? + # resource path - path = "/api/v2/externalcontacts/contacts/{contactId}".sub('{format}','json').sub('{' + 'contactId' + '}', contact_id.to_s) + 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 @@ -245,52 +253,50 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + post_body = nil - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:PUT, path, + 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 => 'ExternalContact') + :auth_names => auth_names) if @api_client.config.debugging - @api_client.config.logger.debug "API called: ExternalContactsApi#put_contacts_contact_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ExternalContactsApi#delete_organizations_externalorganization_id_notes_note_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Delete a contact + # Delete a relationship # - # @param contact_id ExternalContact ID + # @param relationship_id Relationship Id # @param [Hash] opts the optional parameters # @return [nil] - def delete_contacts_contact_id(contact_id, opts = {}) - delete_contacts_contact_id_with_http_info(contact_id, opts) + def delete_relationships_relationship_id(relationship_id, opts = {}) + delete_relationships_relationship_id_with_http_info(relationship_id, opts) return nil end - # Delete a contact + # Delete a relationship # - # @param contact_id ExternalContact ID + # @param relationship_id Relationship Id # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def delete_contacts_contact_id_with_http_info(contact_id, opts = {}) + def delete_relationships_relationship_id_with_http_info(relationship_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: ExternalContactsApi#delete_contacts_contact_id ..." + @api_client.config.logger.debug "Calling API: ExternalContactsApi#delete_relationships_relationship_id ..." end - # verify the required parameter 'contact_id' is set - fail "Missing the required parameter 'contact_id' when calling delete_contacts_contact_id" if contact_id.nil? + # verify the required parameter 'relationship_id' is set + fail "Missing the required parameter 'relationship_id' when calling delete_relationships_relationship_id" if relationship_id.nil? # resource path - path = "/api/v2/externalcontacts/contacts/{contactId}".sub('{format}','json').sub('{' + 'contactId' + '}', contact_id.to_s) + local_var_path = "/api/v2/externalcontacts/relationships/{relationshipId}".sub('{format}','json').sub('{' + 'relationshipId' + '}', relationship_id.to_s) # query parameters query_params = {} # header parameters @@ -308,61 +314,61 @@ form_params = {} # http body (model) post_body = nil - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:DELETE, path, + 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_contacts_contact_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ExternalContactsApi#delete_relationships_relationship_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List Notes for an ExternalContact + # Search for External Contacts # - # @param contact_id ExternalContact Id # @param [Hash] opts the optional parameters - # @option opts [Integer] :page_size Page size - # @option opts [Integer] :page_number Page number + # @option opts [Integer] :page_size Page size (default to 20) + # @option opts [Integer] :page_number Page number (default to 1) + # @option opts [String] :q User supplied search keywords (no special syntax is currently supported) # @option opts [String] :sort_order Sort order - # @return [NoteListing] - def get_contacts_contact_id_notes(contact_id, opts = {}) - data, status_code, headers = get_contacts_contact_id_notes_with_http_info(contact_id, opts) + # @option opts [Array<String>] :expand which fields, if any, to expand + # @return [ContactListing] + def get_contacts(opts = {}) + data, status_code, headers = get_contacts_with_http_info(opts) return data end - # List Notes for an ExternalContact + # Search for External Contacts # - # @param contact_id ExternalContact Id # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number + # @option opts [String] :q User supplied search keywords (no special syntax is currently supported) # @option opts [String] :sort_order Sort order - # @return [Array<(NoteListing, Fixnum, Hash)>] NoteListing data, response status code and response headers - def get_contacts_contact_id_notes_with_http_info(contact_id, opts = {}) + # @option opts [Array<String>] :expand which fields, if any, to expand + # @return [Array<(ContactListing, Fixnum, Hash)>] ContactListing data, response status code and response headers + def get_contacts_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_contacts_contact_id_notes ..." + @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_contacts ..." end - # verify the required parameter 'contact_id' is set - fail "Missing the required parameter 'contact_id' when calling get_contacts_contact_id_notes" if contact_id.nil? - # resource path - path = "/api/v2/externalcontacts/contacts/{contactId}/notes".sub('{format}','json').sub('{' + 'contactId' + '}', contact_id.to_s) + 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) @@ -377,55 +383,55 @@ form_params = {} # http body (model) post_body = nil - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:GET, path, + 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') + :return_type => 'ContactListing') if @api_client.config.debugging - @api_client.config.logger.debug "API called: ExternalContactsApi#get_contacts_contact_id_notes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ExternalContactsApi#get_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create a Note for an ExternalContact + # Fetch a ExternalContact # - # @param contact_id ExternalContact Id + # @param contact_id ExternalContact ID # @param [Hash] opts the optional parameters - # @option opts [Note] :body ExternalContact - # @return [Note] - def post_contacts_contact_id_notes(contact_id, opts = {}) - data, status_code, headers = post_contacts_contact_id_notes_with_http_info(contact_id, opts) + # @option opts [Array<String>] :expand which fields, if any, to expand + # @return [ExternalContact] + def get_contacts_contact_id(contact_id, opts = {}) + data, status_code, headers = get_contacts_contact_id_with_http_info(contact_id, opts) return data end - # Create a Note for an ExternalContact + # Fetch a ExternalContact # - # @param contact_id ExternalContact Id + # @param contact_id ExternalContact ID # @param [Hash] opts the optional parameters - # @option opts [Note] :body ExternalContact - # @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers - def post_contacts_contact_id_notes_with_http_info(contact_id, opts = {}) + # @option opts [Array<String>] :expand which fields, if any, to expand + # @return [Array<(ExternalContact, Fixnum, Hash)>] ExternalContact data, response status code and response headers + def get_contacts_contact_id_with_http_info(contact_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: ExternalContactsApi#post_contacts_contact_id_notes ..." + @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_contacts_contact_id ..." end # verify the required parameter 'contact_id' is set - fail "Missing the required parameter 'contact_id' when calling post_contacts_contact_id_notes" if contact_id.nil? + fail "Missing the required parameter 'contact_id' when calling get_contacts_contact_id" if contact_id.nil? # resource path - path = "/api/v2/externalcontacts/contacts/{contactId}/notes".sub('{format}','json').sub('{' + 'contactId' + '}', contact_id.to_s) + 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) @@ -438,60 +444,63 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + post_body = nil - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:POST, path, + 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') + :return_type => 'ExternalContact') if @api_client.config.debugging - @api_client.config.logger.debug "API called: ExternalContactsApi#post_contacts_contact_id_notes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ExternalContactsApi#get_contacts_contact_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Fetch a note for a contact + # List Notes for an ExternalContact # # @param contact_id ExternalContact Id - # @param note_id Note Id # @param [Hash] opts the optional parameters - # @return [Note] - def get_contacts_contact_id_notes_note_id(contact_id, note_id, opts = {}) - data, status_code, headers = get_contacts_contact_id_notes_note_id_with_http_info(contact_id, note_id, opts) + # @option opts [Integer] :page_size Page size (default to 20) + # @option opts [Integer] :page_number Page number (default to 1) + # @option opts [String] :sort_order Sort order + # @return [NoteListing] + def get_contacts_contact_id_notes(contact_id, opts = {}) + data, status_code, headers = get_contacts_contact_id_notes_with_http_info(contact_id, opts) return data end - # Fetch a note for a contact + # List Notes for an ExternalContact # # @param contact_id ExternalContact Id - # @param note_id Note Id # @param [Hash] opts the optional parameters - # @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers - def get_contacts_contact_id_notes_note_id_with_http_info(contact_id, note_id, opts = {}) + # @option opts [Integer] :page_size Page size + # @option opts [Integer] :page_number Page number + # @option opts [String] :sort_order Sort order + # @return [Array<(NoteListing, Fixnum, Hash)>] NoteListing data, response status code and response headers + def get_contacts_contact_id_notes_with_http_info(contact_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_contacts_contact_id_notes_note_id ..." + @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_contacts_contact_id_notes ..." end # verify the required parameter 'contact_id' is set - fail "Missing the required parameter 'contact_id' when calling get_contacts_contact_id_notes_note_id" if contact_id.nil? + fail "Missing the required parameter 'contact_id' when calling get_contacts_contact_id_notes" if contact_id.nil? - # verify the required parameter 'note_id' is set - fail "Missing the required parameter 'note_id' when calling get_contacts_contact_id_notes_note_id" if note_id.nil? - # resource path - path = "/api/v2/externalcontacts/contacts/{contactId}/notes/{noteId}".sub('{format}','json').sub('{' + 'contactId' + '}', contact_id.to_s).sub('{' + 'noteId' + '}', note_id.to_s) + 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'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) @@ -506,57 +515,54 @@ form_params = {} # http body (model) post_body = nil - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:GET, path, + 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') + :return_type => 'NoteListing') if @api_client.config.debugging - @api_client.config.logger.debug "API called: ExternalContactsApi#get_contacts_contact_id_notes_note_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ExternalContactsApi#get_contacts_contact_id_notes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update a note for a contact + # Fetch a note for a contact # # @param contact_id ExternalContact Id # @param note_id Note Id # @param [Hash] opts the optional parameters - # @option opts [Note] :body Note # @return [Note] - def put_contacts_contact_id_notes_note_id(contact_id, note_id, opts = {}) - data, status_code, headers = put_contacts_contact_id_notes_note_id_with_http_info(contact_id, note_id, opts) + def get_contacts_contact_id_notes_note_id(contact_id, note_id, opts = {}) + data, status_code, headers = get_contacts_contact_id_notes_note_id_with_http_info(contact_id, note_id, opts) return data end - # Update a note for a contact + # Fetch a note for a contact # # @param contact_id ExternalContact Id # @param note_id Note Id # @param [Hash] opts the optional parameters - # @option opts [Note] :body Note # @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers - def put_contacts_contact_id_notes_note_id_with_http_info(contact_id, note_id, opts = {}) + def get_contacts_contact_id_notes_note_id_with_http_info(contact_id, note_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: ExternalContactsApi#put_contacts_contact_id_notes_note_id ..." + @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_contacts_contact_id_notes_note_id ..." end # verify the required parameter 'contact_id' is set - fail "Missing the required parameter 'contact_id' when calling put_contacts_contact_id_notes_note_id" if contact_id.nil? + fail "Missing the required parameter 'contact_id' when calling get_contacts_contact_id_notes_note_id" if contact_id.nil? # verify the required parameter 'note_id' is set - fail "Missing the required parameter 'note_id' when calling put_contacts_contact_id_notes_note_id" if note_id.nil? + fail "Missing the required parameter 'note_id' when calling get_contacts_contact_id_notes_note_id" if note_id.nil? # resource path - path = "/api/v2/externalcontacts/contacts/{contactId}/notes/{noteId}".sub('{format}','json').sub('{' + 'contactId' + '}', contact_id.to_s).sub('{' + 'noteId' + '}', note_id.to_s) + 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 @@ -572,60 +578,61 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + post_body = nil - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:PUT, path, + 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#put_contacts_contact_id_notes_note_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ExternalContactsApi#get_contacts_contact_id_notes_note_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Delete a note for a contact + # Search for External Organizations # - # @param contact_id ExternalContact Id - # @param note_id Note Id # @param [Hash] opts the optional parameters - # @return [nil] - def delete_contacts_contact_id_notes_note_id(contact_id, note_id, opts = {}) - delete_contacts_contact_id_notes_note_id_with_http_info(contact_id, note_id, opts) - return nil + # @option opts [Integer] :page_size Page size (default to 20) + # @option opts [Integer] :page_number Page number (default to 1) + # @option opts [String] :q Search query + # @option opts [String] :sort_order Sort order + # @return [ExternalOrganizationListing] + def get_organizations(opts = {}) + data, status_code, headers = get_organizations_with_http_info(opts) + return data end - # Delete a note for a contact + # Search for External Organizations # - # @param contact_id ExternalContact Id - # @param note_id Note Id # @param [Hash] opts the optional parameters - # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def delete_contacts_contact_id_notes_note_id_with_http_info(contact_id, note_id, opts = {}) + # @option opts [Integer] :page_size Page size + # @option opts [Integer] :page_number Page number + # @option opts [String] :q Search query + # @option opts [String] :sort_order Sort order + # @return [Array<(ExternalOrganizationListing, Fixnum, Hash)>] ExternalOrganizationListing data, response status code and response headers + def get_organizations_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: ExternalContactsApi#delete_contacts_contact_id_notes_note_id ..." + @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_organizations ..." end - # verify the required parameter 'contact_id' is set - fail "Missing the required parameter 'contact_id' when calling delete_contacts_contact_id_notes_note_id" if contact_id.nil? - - # verify the required parameter 'note_id' is set - fail "Missing the required parameter 'note_id' when calling delete_contacts_contact_id_notes_note_id" if note_id.nil? - # resource path - path = "/api/v2/externalcontacts/contacts/{contactId}/notes/{noteId}".sub('{format}','json').sub('{' + 'contactId' + '}', contact_id.to_s).sub('{' + 'noteId' + '}', note_id.to_s) + 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[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) @@ -640,59 +647,52 @@ form_params = {} # http body (model) post_body = nil - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:DELETE, path, + 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) + :auth_names => auth_names, + :return_type => 'ExternalOrganizationListing') if @api_client.config.debugging - @api_client.config.logger.debug "API called: ExternalContactsApi#delete_contacts_contact_id_notes_note_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ExternalContactsApi#get_organizations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Search for External Organizations + # Fetch an External Organization # + # @param external_organization_id External Organization ID # @param [Hash] opts the optional parameters - # @option opts [Integer] :page_size Page size - # @option opts [Integer] :page_number Page number - # @option opts [String] :q Search query - # @option opts [String] :sort_order Sort order - # @return [ExternalOrganizationListing] - def get_organizations(opts = {}) - data, status_code, headers = get_organizations_with_http_info(opts) + # @return [ExternalOrganization] + def get_organizations_externalorganization_id(external_organization_id, opts = {}) + data, status_code, headers = get_organizations_externalorganization_id_with_http_info(external_organization_id, opts) return data end - # Search for External Organizations + # Fetch an External Organization # + # @param external_organization_id External Organization ID # @param [Hash] opts the optional parameters - # @option opts [Integer] :page_size Page size - # @option opts [Integer] :page_number Page number - # @option opts [String] :q Search query - # @option opts [String] :sort_order Sort order - # @return [Array<(ExternalOrganizationListing, Fixnum, Hash)>] ExternalOrganizationListing data, response status code and response headers - def get_organizations_with_http_info(opts = {}) + # @return [Array<(ExternalOrganization, Fixnum, Hash)>] ExternalOrganization data, response status code and response headers + def get_organizations_externalorganization_id_with_http_info(external_organization_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_organizations ..." + @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_organizations_externalorganization_id ..." end + # verify the required parameter 'external_organization_id' is set + fail "Missing the required parameter 'external_organization_id' when calling get_organizations_externalorganization_id" if external_organization_id.nil? + # resource path - path = "/api/v2/externalcontacts/organizations".sub('{format}','json') + local_var_path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}".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'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) @@ -707,50 +707,67 @@ form_params = {} # http body (model) post_body = nil - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:GET, path, + 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') + :return_type => 'ExternalOrganization') if @api_client.config.debugging - @api_client.config.logger.debug "API called: ExternalContactsApi#get_organizations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ExternalContactsApi#get_organizations_externalorganization_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create an External Organization + # Search for External Contacts # + # @param external_organization_id External Organization ID # @param [Hash] opts the optional parameters - # @option opts [ExternalOrganization] :body ExternalOrganization - # @return [ExternalOrganization] - def post_organizations(opts = {}) - data, status_code, headers = post_organizations_with_http_info(opts) + # @option opts [Integer] :page_size Page size (default to 20) + # @option opts [Integer] :page_number Page number (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<String>] :expand which fields, if any, to expand + # @return [ContactListing] + def get_organizations_externalorganization_id_contacts(external_organization_id, opts = {}) + data, status_code, headers = get_organizations_externalorganization_id_contacts_with_http_info(external_organization_id, opts) return data end - # Create an External Organization + # Search for External Contacts # + # @param external_organization_id External Organization ID # @param [Hash] opts the optional parameters - # @option opts [ExternalOrganization] :body ExternalOrganization - # @return [Array<(ExternalOrganization, Fixnum, Hash)>] ExternalOrganization data, response status code and response headers - def post_organizations_with_http_info(opts = {}) + # @option opts [Integer] :page_size Page size + # @option opts [Integer] :page_number Page number + # @option opts [String] :q User supplied search keywords (no special syntax is currently supported) + # @option opts [String] :sort_order Sort order + # @option opts [Array<String>] :expand which fields, if any, to expand + # @return [Array<(ContactListing, Fixnum, Hash)>] ContactListing data, response status code and response headers + def get_organizations_externalorganization_id_contacts_with_http_info(external_organization_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: ExternalContactsApi#post_organizations ..." + @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_organizations_externalorganization_id_contacts ..." end + # verify the required parameter 'external_organization_id' is set + fail "Missing the required parameter 'external_organization_id' when calling get_organizations_externalorganization_id_contacts" if external_organization_id.nil? + # resource path - path = "/api/v2/externalcontacts/organizations".sub('{format}','json') + 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) @@ -763,55 +780,63 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + post_body = nil - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:POST, path, + 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') + :return_type => 'ContactListing') if @api_client.config.debugging - @api_client.config.logger.debug "API called: ExternalContactsApi#post_organizations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ExternalContactsApi#get_organizations_externalorganization_id_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Fetch an External Organization + # List Notes for an External Organization # - # @param external_organization_id External Organization ID + # @param external_organization_id External Organization Id # @param [Hash] opts the optional parameters - # @return [ExternalOrganization] - def get_organizations_externalorganization_id(external_organization_id, opts = {}) - data, status_code, headers = get_organizations_externalorganization_id_with_http_info(external_organization_id, opts) + # @option opts [Integer] :page_size Page size (default to 20) + # @option opts [Integer] :page_number Page number (default to 1) + # @option opts [String] :sort_order Sort order + # @return [NoteListing] + def get_organizations_externalorganization_id_notes(external_organization_id, opts = {}) + data, status_code, headers = get_organizations_externalorganization_id_notes_with_http_info(external_organization_id, opts) return data end - # Fetch an External Organization + # List Notes for an External Organization # - # @param external_organization_id External Organization ID + # @param external_organization_id External Organization Id # @param [Hash] opts the optional parameters - # @return [Array<(ExternalOrganization, Fixnum, Hash)>] ExternalOrganization data, response status code and response headers - def get_organizations_externalorganization_id_with_http_info(external_organization_id, opts = {}) + # @option opts [Integer] :page_size Page size + # @option opts [Integer] :page_number Page number + # @option opts [String] :sort_order Sort order + # @return [Array<(NoteListing, Fixnum, Hash)>] NoteListing data, response status code and response headers + def get_organizations_externalorganization_id_notes_with_http_info(external_organization_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_organizations_externalorganization_id ..." + @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_organizations_externalorganization_id_notes ..." end # verify the required parameter 'external_organization_id' is set - fail "Missing the required parameter 'external_organization_id' when calling get_organizations_externalorganization_id" if external_organization_id.nil? + fail "Missing the required parameter 'external_organization_id' when calling get_organizations_externalorganization_id_notes" if external_organization_id.nil? # resource path - path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s) + 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'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) @@ -826,52 +851,54 @@ form_params = {} # http body (model) post_body = nil - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:GET, path, + 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') + :return_type => 'NoteListing') if @api_client.config.debugging - @api_client.config.logger.debug "API called: ExternalContactsApi#get_organizations_externalorganization_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ExternalContactsApi#get_organizations_externalorganization_id_notes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update an External Organization + # Fetch a note # - # @param external_organization_id External Organization ID + # @param external_organization_id External Organization Id + # @param note_id Note Id # @param [Hash] opts the optional parameters - # @option opts [ExternalOrganization] :body ExternalOrganization - # @return [ExternalOrganization] - def put_organizations_externalorganization_id(external_organization_id, opts = {}) - data, status_code, headers = put_organizations_externalorganization_id_with_http_info(external_organization_id, opts) + # @return [Note] + def get_organizations_externalorganization_id_notes_note_id(external_organization_id, note_id, opts = {}) + data, status_code, headers = get_organizations_externalorganization_id_notes_note_id_with_http_info(external_organization_id, note_id, opts) return data end - # Update an External Organization + # Fetch a note # - # @param external_organization_id External Organization ID + # @param external_organization_id External Organization Id + # @param note_id Note Id # @param [Hash] opts the optional parameters - # @option opts [ExternalOrganization] :body ExternalOrganization - # @return [Array<(ExternalOrganization, Fixnum, Hash)>] ExternalOrganization data, response status code and response headers - def put_organizations_externalorganization_id_with_http_info(external_organization_id, opts = {}) + # @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers + def get_organizations_externalorganization_id_notes_note_id_with_http_info(external_organization_id, note_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: ExternalContactsApi#put_organizations_externalorganization_id ..." + @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_organizations_externalorganization_id_notes_note_id ..." end # verify the required parameter 'external_organization_id' is set - fail "Missing the required parameter 'external_organization_id' when calling put_organizations_externalorganization_id" if external_organization_id.nil? + fail "Missing the required parameter 'external_organization_id' when calling get_organizations_externalorganization_id_notes_note_id" if external_organization_id.nil? + # verify the required parameter 'note_id' is set + fail "Missing the required parameter 'note_id' when calling get_organizations_externalorganization_id_notes_note_id" if note_id.nil? + # resource path - path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s) + 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 @@ -887,55 +914,63 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + post_body = nil - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:PUT, path, + 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') + :return_type => 'Note') if @api_client.config.debugging - @api_client.config.logger.debug "API called: ExternalContactsApi#put_organizations_externalorganization_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ExternalContactsApi#get_organizations_externalorganization_id_notes_note_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Delete an External Organization + # Fetch an External Organization # # @param external_organization_id External Organization ID # @param [Hash] opts the optional parameters - # @return [nil] - def delete_organizations_externalorganization_id(external_organization_id, opts = {}) - delete_organizations_externalorganization_id_with_http_info(external_organization_id, opts) - return nil + # @option opts [Integer] :page_size Page size (default to 20) + # @option opts [Integer] :page_number Page number (default to 1) + # @option opts [String] :sort_order Sort order + # @return [RelationshipListing] + def get_organizations_externalorganization_id_relationships(external_organization_id, opts = {}) + data, status_code, headers = get_organizations_externalorganization_id_relationships_with_http_info(external_organization_id, opts) + return data end - # Delete an External Organization + # Fetch an 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_organizations_externalorganization_id_with_http_info(external_organization_id, opts = {}) + # @option opts [Integer] :page_size Page size + # @option opts [Integer] :page_number Page number + # @option opts [String] :sort_order Sort order + # @return [Array<(RelationshipListing, Fixnum, Hash)>] RelationshipListing data, response status code and response headers + def get_organizations_externalorganization_id_relationships_with_http_info(external_organization_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: ExternalContactsApi#delete_organizations_externalorganization_id ..." + @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_organizations_externalorganization_id_relationships ..." end # verify the required parameter 'external_organization_id' is set - fail "Missing the required parameter 'external_organization_id' when calling delete_organizations_externalorganization_id" if external_organization_id.nil? + fail "Missing the required parameter 'external_organization_id' when calling get_organizations_externalorganization_id_relationships" if external_organization_id.nil? # resource path - path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s) + 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[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) @@ -950,67 +985,52 @@ form_params = {} # http body (model) post_body = nil - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:DELETE, path, + 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) + :auth_names => auth_names, + :return_type => 'RelationshipListing') if @api_client.config.debugging - @api_client.config.logger.debug "API called: ExternalContactsApi#delete_organizations_externalorganization_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ExternalContactsApi#get_organizations_externalorganization_id_relationships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Search for External Contacts + # Fetch a relationship # - # @param external_organization_id External Organization ID + # @param relationship_id Relationship Id # @param [Hash] opts the optional parameters - # @option opts [Integer] :page_size Page size - # @option opts [Integer] :page_number Page number - # @option opts [String] :q User supplied search keywords (no special syntax is currently supported) - # @option opts [String] :sort_order Sort order - # @option opts [Array<String>] :expand which fields, if any, to expand - # @return [ContactListing] - def get_organizations_externalorganization_id_contacts(external_organization_id, opts = {}) - data, status_code, headers = get_organizations_externalorganization_id_contacts_with_http_info(external_organization_id, opts) + # @return [Relationship] + def get_relationships_relationship_id(relationship_id, opts = {}) + data, status_code, headers = get_relationships_relationship_id_with_http_info(relationship_id, opts) return data end - # Search for External Contacts + # Fetch a relationship # - # @param external_organization_id External Organization ID + # @param relationship_id Relationship Id # @param [Hash] opts the optional parameters - # @option opts [Integer] :page_size Page size - # @option opts [Integer] :page_number Page number - # @option opts [String] :q User supplied search keywords (no special syntax is currently supported) - # @option opts [String] :sort_order Sort order - # @option opts [Array<String>] :expand which fields, if any, to expand - # @return [Array<(ContactListing, Fixnum, Hash)>] ContactListing data, response status code and response headers - def get_organizations_externalorganization_id_contacts_with_http_info(external_organization_id, opts = {}) + # @return [Array<(Relationship, Fixnum, Hash)>] Relationship data, response status code and response headers + def get_relationships_relationship_id_with_http_info(relationship_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_organizations_externalorganization_id_contacts ..." + @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_relationships_relationship_id ..." end - # verify the required parameter 'external_organization_id' is set - fail "Missing the required parameter 'external_organization_id' when calling get_organizations_externalorganization_id_contacts" if external_organization_id.nil? + # verify the required parameter 'relationship_id' is set + fail "Missing the required parameter 'relationship_id' when calling get_relationships_relationship_id" if relationship_id.nil? # resource path - path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}/contacts".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s) + local_var_path = "/api/v2/externalcontacts/relationships/{relationshipId}".sub('{format}','json').sub('{' + 'relationshipId' + '}', relationship_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) @@ -1025,62 +1045,49 @@ form_params = {} # http body (model) post_body = nil - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:GET, path, + 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') + :return_type => 'Relationship') if @api_client.config.debugging - @api_client.config.logger.debug "API called: ExternalContactsApi#get_organizations_externalorganization_id_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ExternalContactsApi#get_relationships_relationship_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # List Notes for an External Organization + # Create an ExternalContact # - # @param external_organization_id External Organization Id # @param [Hash] opts the optional parameters - # @option opts [Integer] :page_size Page size - # @option opts [Integer] :page_number Page number - # @option opts [String] :sort_order Sort order - # @return [NoteListing] - def get_organizations_externalorganization_id_notes(external_organization_id, opts = {}) - data, status_code, headers = get_organizations_externalorganization_id_notes_with_http_info(external_organization_id, opts) + # @option opts [ExternalContact] :body ExternalContact + # @return [ExternalContact] + def post_contacts(opts = {}) + data, status_code, headers = post_contacts_with_http_info(opts) return data end - # List Notes for an External Organization + # Create an ExternalContact # - # @param external_organization_id External Organization Id # @param [Hash] opts the optional parameters - # @option opts [Integer] :page_size Page size - # @option opts [Integer] :page_number Page number - # @option opts [String] :sort_order Sort order - # @return [Array<(NoteListing, Fixnum, Hash)>] NoteListing data, response status code and response headers - def get_organizations_externalorganization_id_notes_with_http_info(external_organization_id, opts = {}) + # @option opts [ExternalContact] :body ExternalContact + # @return [Array<(ExternalContact, Fixnum, Hash)>] ExternalContact data, response status code and response headers + def post_contacts_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_organizations_externalorganization_id_notes ..." + @api_client.config.logger.debug "Calling API: ExternalContactsApi#post_contacts ..." end - # verify the required parameter 'external_organization_id' is set - fail "Missing the required parameter 'external_organization_id' when calling get_organizations_externalorganization_id_notes" if external_organization_id.nil? - # resource path - path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}/notes".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s) + 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[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) @@ -1093,54 +1100,53 @@ # form parameters form_params = {} # http body (model) - post_body = nil + post_body = @api_client.object_to_http_body(opts[:'body']) - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:GET, path, + 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 => 'NoteListing') + :return_type => 'ExternalContact') if @api_client.config.debugging - @api_client.config.logger.debug "API called: ExternalContactsApi#get_organizations_externalorganization_id_notes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ExternalContactsApi#post_contacts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create a Note for an External Organization + # Create a Note for an ExternalContact # - # @param external_organization_id External Organization Id + # @param contact_id ExternalContact Id # @param [Hash] opts the optional parameters # @option opts [Note] :body ExternalContact # @return [Note] - def post_organizations_externalorganization_id_notes(external_organization_id, opts = {}) - data, status_code, headers = post_organizations_externalorganization_id_notes_with_http_info(external_organization_id, opts) + def post_contacts_contact_id_notes(contact_id, opts = {}) + data, status_code, headers = post_contacts_contact_id_notes_with_http_info(contact_id, opts) return data end - # Create a Note for an External Organization + # Create a Note for an ExternalContact # - # @param external_organization_id External Organization Id + # @param contact_id ExternalContact Id # @param [Hash] opts the optional parameters # @option opts [Note] :body ExternalContact # @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers - def post_organizations_externalorganization_id_notes_with_http_info(external_organization_id, opts = {}) + def post_contacts_contact_id_notes_with_http_info(contact_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: ExternalContactsApi#post_organizations_externalorganization_id_notes ..." + @api_client.config.logger.debug "Calling API: ExternalContactsApi#post_contacts_contact_id_notes ..." end - # verify the required parameter 'external_organization_id' is set - fail "Missing the required parameter 'external_organization_id' when calling post_organizations_externalorganization_id_notes" if external_organization_id.nil? + # verify the required parameter 'contact_id' is set + fail "Missing the required parameter 'contact_id' when calling post_contacts_contact_id_notes" if contact_id.nil? # resource path - path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}/notes".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s) + local_var_path = "/api/v2/externalcontacts/contacts/{contactId}/notes".sub('{format}','json').sub('{' + 'contactId' + '}', contact_id.to_s) # query parameters query_params = {} # header parameters @@ -1158,55 +1164,46 @@ form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:POST, path, + 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_organizations_externalorganization_id_notes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ExternalContactsApi#post_contacts_contact_id_notes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Fetch a note + # Create an External Organization # - # @param external_organization_id External Organization Id - # @param note_id Note Id # @param [Hash] opts the optional parameters - # @return [Note] - def get_organizations_externalorganization_id_notes_note_id(external_organization_id, note_id, opts = {}) - data, status_code, headers = get_organizations_externalorganization_id_notes_note_id_with_http_info(external_organization_id, note_id, opts) + # @option opts [ExternalOrganization] :body ExternalOrganization + # @return [ExternalOrganization] + def post_organizations(opts = {}) + data, status_code, headers = post_organizations_with_http_info(opts) return data end - # Fetch a note + # Create an External Organization # - # @param external_organization_id External Organization Id - # @param note_id Note Id # @param [Hash] opts the optional parameters - # @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers - def get_organizations_externalorganization_id_notes_note_id_with_http_info(external_organization_id, note_id, opts = {}) + # @option opts [ExternalOrganization] :body ExternalOrganization + # @return [Array<(ExternalOrganization, Fixnum, Hash)>] ExternalOrganization data, response status code and response headers + def post_organizations_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_organizations_externalorganization_id_notes_note_id ..." + @api_client.config.logger.debug "Calling API: ExternalContactsApi#post_organizations ..." end - # verify the required parameter 'external_organization_id' is set - fail "Missing the required parameter 'external_organization_id' when calling get_organizations_externalorganization_id_notes_note_id" if external_organization_id.nil? - - # verify the required parameter 'note_id' is set - fail "Missing the required parameter 'note_id' when calling get_organizations_externalorganization_id_notes_note_id" if note_id.nil? - # resource path - path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}/notes/{noteId}".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s).sub('{' + 'noteId' + '}', note_id.to_s) + local_var_path = "/api/v2/externalcontacts/organizations".sub('{format}','json') # query parameters query_params = {} # header parameters @@ -1222,59 +1219,53 @@ # form parameters form_params = {} # http body (model) - post_body = nil + post_body = @api_client.object_to_http_body(opts[:'body']) - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:GET, path, + 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') + :return_type => 'ExternalOrganization') if @api_client.config.debugging - @api_client.config.logger.debug "API called: ExternalContactsApi#get_organizations_externalorganization_id_notes_note_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ExternalContactsApi#post_organizations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update a note + # Create 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 [Note] :body Note + # @option opts [Note] :body ExternalContact # @return [Note] - def put_organizations_externalorganization_id_notes_note_id(external_organization_id, note_id, opts = {}) - data, status_code, headers = put_organizations_externalorganization_id_notes_note_id_with_http_info(external_organization_id, note_id, opts) + def post_organizations_externalorganization_id_notes(external_organization_id, opts = {}) + data, status_code, headers = post_organizations_externalorganization_id_notes_with_http_info(external_organization_id, opts) return data end - # Update a note + # Create 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 [Note] :body Note + # @option opts [Note] :body ExternalContact # @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers - def put_organizations_externalorganization_id_notes_note_id_with_http_info(external_organization_id, note_id, opts = {}) + def post_organizations_externalorganization_id_notes_with_http_info(external_organization_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: ExternalContactsApi#put_organizations_externalorganization_id_notes_note_id ..." + @api_client.config.logger.debug "Calling API: ExternalContactsApi#post_organizations_externalorganization_id_notes ..." end # verify the required parameter 'external_organization_id' is set - fail "Missing the required parameter 'external_organization_id' when calling put_organizations_externalorganization_id_notes_note_id" if external_organization_id.nil? + fail "Missing the required parameter 'external_organization_id' when calling post_organizations_externalorganization_id_notes" if external_organization_id.nil? - # verify the required parameter 'note_id' is set - fail "Missing the required parameter 'note_id' when calling put_organizations_externalorganization_id_notes_note_id" if note_id.nil? - # resource path - path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}/notes/{noteId}".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s).sub('{' + 'noteId' + '}', note_id.to_s) + 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 @@ -1292,55 +1283,46 @@ form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:PUT, path, + 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#put_organizations_externalorganization_id_notes_note_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ExternalContactsApi#post_organizations_externalorganization_id_notes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Delete a note + # Create a relationship # - # @param external_organization_id External Organization Id - # @param note_id Note Id # @param [Hash] opts the optional parameters - # @return [nil] - def delete_organizations_externalorganization_id_notes_note_id(external_organization_id, note_id, opts = {}) - delete_organizations_externalorganization_id_notes_note_id_with_http_info(external_organization_id, note_id, opts) - return nil + # @option opts [Relationship] :body Relationship + # @return [Relationship] + def post_relationships(opts = {}) + data, status_code, headers = post_relationships_with_http_info(opts) + return data end - # Delete a note + # Create a relationship # - # @param external_organization_id External Organization Id - # @param note_id Note Id # @param [Hash] opts the optional parameters - # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def delete_organizations_externalorganization_id_notes_note_id_with_http_info(external_organization_id, note_id, opts = {}) + # @option opts [Relationship] :body Relationship + # @return [Array<(Relationship, Fixnum, Hash)>] Relationship data, response status code and response headers + def post_relationships_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: ExternalContactsApi#delete_organizations_externalorganization_id_notes_note_id ..." + @api_client.config.logger.debug "Calling API: ExternalContactsApi#post_relationships ..." end - # verify the required parameter 'external_organization_id' is set - fail "Missing the required parameter 'external_organization_id' when calling delete_organizations_externalorganization_id_notes_note_id" if external_organization_id.nil? - - # verify the required parameter 'note_id' is set - fail "Missing the required parameter 'note_id' when calling delete_organizations_externalorganization_id_notes_note_id" if note_id.nil? - # resource path - path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}/notes/{noteId}".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s).sub('{' + 'noteId' + '}', note_id.to_s) + local_var_path = "/api/v2/externalcontacts/relationships".sub('{format}','json') # query parameters query_params = {} # header parameters @@ -1356,63 +1338,56 @@ # form parameters form_params = {} # http body (model) - post_body = nil + post_body = @api_client.object_to_http_body(opts[:'body']) - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:DELETE, path, + 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) + :auth_names => auth_names, + :return_type => 'Relationship') if @api_client.config.debugging - @api_client.config.logger.debug "API called: ExternalContactsApi#delete_organizations_externalorganization_id_notes_note_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ExternalContactsApi#post_relationships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Fetch an External Organization + # Update a externalContact # - # @param external_organization_id External Organization ID + # @param contact_id ExternalContact ID # @param [Hash] opts the optional parameters - # @option opts [Integer] :page_size Page size - # @option opts [Integer] :page_number Page number - # @option opts [String] :sort_order Sort order - # @return [RelationshipListing] - def get_organizations_externalorganization_id_relationships(external_organization_id, opts = {}) - data, status_code, headers = get_organizations_externalorganization_id_relationships_with_http_info(external_organization_id, opts) + # @option opts [ExternalContact] :body ExternalContact + # @return [ExternalContact] + def put_contacts_contact_id(contact_id, opts = {}) + data, status_code, headers = put_contacts_contact_id_with_http_info(contact_id, opts) return data end - # Fetch an External Organization + # Update a externalContact # - # @param external_organization_id External Organization ID + # @param contact_id ExternalContact ID # @param [Hash] opts the optional parameters - # @option opts [Integer] :page_size Page size - # @option opts [Integer] :page_number Page number - # @option opts [String] :sort_order Sort order - # @return [Array<(RelationshipListing, Fixnum, Hash)>] RelationshipListing data, response status code and response headers - def get_organizations_externalorganization_id_relationships_with_http_info(external_organization_id, opts = {}) + # @option opts [ExternalContact] :body ExternalContact + # @return [Array<(ExternalContact, Fixnum, Hash)>] ExternalContact data, response status code and response headers + def put_contacts_contact_id_with_http_info(contact_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_organizations_externalorganization_id_relationships ..." + @api_client.config.logger.debug "Calling API: ExternalContactsApi#put_contacts_contact_id ..." end - # verify the required parameter 'external_organization_id' is set - fail "Missing the required parameter 'external_organization_id' when calling get_organizations_externalorganization_id_relationships" if external_organization_id.nil? + # verify the required parameter 'contact_id' is set + fail "Missing the required parameter 'contact_id' when calling put_contacts_contact_id" if contact_id.nil? # resource path - path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}/relationships".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s) + local_var_path = "/api/v2/externalcontacts/contacts/{contactId}".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'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) @@ -1425,49 +1400,58 @@ # form parameters form_params = {} # http body (model) - post_body = nil + post_body = @api_client.object_to_http_body(opts[:'body']) - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:GET, path, + 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 => 'RelationshipListing') + :return_type => 'ExternalContact') if @api_client.config.debugging - @api_client.config.logger.debug "API called: ExternalContactsApi#get_organizations_externalorganization_id_relationships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ExternalContactsApi#put_contacts_contact_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Create a relationship + # Update a note for a contact # + # @param contact_id ExternalContact Id + # @param note_id Note Id # @param [Hash] opts the optional parameters - # @option opts [Relationship] :body Relationship - # @return [Relationship] - def post_relationships(opts = {}) - data, status_code, headers = post_relationships_with_http_info(opts) + # @option opts [Note] :body Note + # @return [Note] + def put_contacts_contact_id_notes_note_id(contact_id, note_id, opts = {}) + data, status_code, headers = put_contacts_contact_id_notes_note_id_with_http_info(contact_id, note_id, opts) return data end - # Create a relationship + # Update a note for a contact # + # @param contact_id ExternalContact Id + # @param note_id Note Id # @param [Hash] opts the optional parameters - # @option opts [Relationship] :body Relationship - # @return [Array<(Relationship, Fixnum, Hash)>] Relationship data, response status code and response headers - def post_relationships_with_http_info(opts = {}) + # @option opts [Note] :body Note + # @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers + def put_contacts_contact_id_notes_note_id_with_http_info(contact_id, note_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: ExternalContactsApi#post_relationships ..." + @api_client.config.logger.debug "Calling API: ExternalContactsApi#put_contacts_contact_id_notes_note_id ..." end + # verify the required parameter 'contact_id' is set + fail "Missing the required parameter 'contact_id' when calling put_contacts_contact_id_notes_note_id" if contact_id.nil? + + # verify the required parameter 'note_id' is set + fail "Missing the required parameter 'note_id' when calling put_contacts_contact_id_notes_note_id" if note_id.nil? + # resource path - path = "/api/v2/externalcontacts/relationships".sub('{format}','json') + 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 @@ -1485,50 +1469,51 @@ form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:POST, path, + 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') + :return_type => 'Note') if @api_client.config.debugging - @api_client.config.logger.debug "API called: ExternalContactsApi#post_relationships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ExternalContactsApi#put_contacts_contact_id_notes_note_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Fetch a relationship + # Update an External Organization # - # @param relationship_id Relationship Id + # @param external_organization_id External Organization ID # @param [Hash] opts the optional parameters - # @return [Relationship] - def get_relationships_relationship_id(relationship_id, opts = {}) - data, status_code, headers = get_relationships_relationship_id_with_http_info(relationship_id, opts) + # @option opts [ExternalOrganization] :body ExternalOrganization + # @return [ExternalOrganization] + def put_organizations_externalorganization_id(external_organization_id, opts = {}) + data, status_code, headers = put_organizations_externalorganization_id_with_http_info(external_organization_id, opts) return data end - # Fetch a relationship + # Update an External Organization # - # @param relationship_id Relationship Id + # @param external_organization_id External Organization ID # @param [Hash] opts the optional parameters - # @return [Array<(Relationship, Fixnum, Hash)>] Relationship data, response status code and response headers - def get_relationships_relationship_id_with_http_info(relationship_id, opts = {}) + # @option opts [ExternalOrganization] :body ExternalOrganization + # @return [Array<(ExternalOrganization, Fixnum, Hash)>] ExternalOrganization data, response status code and response headers + def put_organizations_externalorganization_id_with_http_info(external_organization_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: ExternalContactsApi#get_relationships_relationship_id ..." + @api_client.config.logger.debug "Calling API: ExternalContactsApi#put_organizations_externalorganization_id ..." end - # verify the required parameter 'relationship_id' is set - fail "Missing the required parameter 'relationship_id' when calling get_relationships_relationship_id" if relationship_id.nil? + # verify the required parameter 'external_organization_id' is set + fail "Missing the required parameter 'external_organization_id' when calling put_organizations_externalorganization_id" if external_organization_id.nil? # resource path - path = "/api/v2/externalcontacts/relationships/{relationshipId}".sub('{format}','json').sub('{' + 'relationshipId' + '}', relationship_id.to_s) + local_var_path = "/api/v2/externalcontacts/organizations/{externalOrganizationId}".sub('{format}','json').sub('{' + 'externalOrganizationId' + '}', external_organization_id.to_s) # query parameters query_params = {} # header parameters @@ -1544,54 +1529,58 @@ # form parameters form_params = {} # http body (model) - post_body = nil + post_body = @api_client.object_to_http_body(opts[:'body']) - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:GET, path, + 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') + :return_type => 'ExternalOrganization') if @api_client.config.debugging - @api_client.config.logger.debug "API called: ExternalContactsApi#get_relationships_relationship_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ExternalContactsApi#put_organizations_externalorganization_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Update a relationship + # Update a note # - # @param relationship_id Relationship Id + # @param external_organization_id External Organization Id + # @param note_id Note Id # @param [Hash] opts the optional parameters - # @option opts [Relationship] :body Relationship - # @return [Relationship] - def put_relationships_relationship_id(relationship_id, opts = {}) - data, status_code, headers = put_relationships_relationship_id_with_http_info(relationship_id, opts) + # @option opts [Note] :body Note + # @return [Note] + def put_organizations_externalorganization_id_notes_note_id(external_organization_id, note_id, opts = {}) + data, status_code, headers = put_organizations_externalorganization_id_notes_note_id_with_http_info(external_organization_id, note_id, opts) return data end - # Update a relationship + # Update a note # - # @param relationship_id Relationship Id + # @param external_organization_id External Organization Id + # @param note_id Note Id # @param [Hash] opts the optional parameters - # @option opts [Relationship] :body Relationship - # @return [Array<(Relationship, Fixnum, Hash)>] Relationship data, response status code and response headers - def put_relationships_relationship_id_with_http_info(relationship_id, opts = {}) + # @option opts [Note] :body Note + # @return [Array<(Note, Fixnum, Hash)>] Note data, response status code and response headers + def put_organizations_externalorganization_id_notes_note_id_with_http_info(external_organization_id, note_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: ExternalContactsApi#put_relationships_relationship_id ..." + @api_client.config.logger.debug "Calling API: ExternalContactsApi#put_organizations_externalorganization_id_notes_note_id ..." end - # verify the required parameter 'relationship_id' is set - fail "Missing the required parameter 'relationship_id' when calling put_relationships_relationship_id" if relationship_id.nil? + # verify the required parameter 'external_organization_id' is set + fail "Missing the required parameter 'external_organization_id' when calling put_organizations_externalorganization_id_notes_note_id" if external_organization_id.nil? + # verify the required parameter 'note_id' is set + fail "Missing the required parameter 'note_id' when calling put_organizations_externalorganization_id_notes_note_id" if note_id.nil? + # resource path - path = "/api/v2/externalcontacts/relationships/{relationshipId}".sub('{format}','json').sub('{' + 'relationshipId' + '}', relationship_id.to_s) + 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 @@ -1609,50 +1598,51 @@ form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:PUT, path, + 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') + :return_type => 'Note') if @api_client.config.debugging - @api_client.config.logger.debug "API called: ExternalContactsApi#put_relationships_relationship_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ExternalContactsApi#put_organizations_externalorganization_id_notes_note_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end - # Delete a relationship + # Update a relationship # # @param relationship_id Relationship Id # @param [Hash] opts the optional parameters - # @return [nil] - def delete_relationships_relationship_id(relationship_id, opts = {}) - delete_relationships_relationship_id_with_http_info(relationship_id, opts) - return nil + # @option opts [Relationship] :body Relationship + # @return [Relationship] + def put_relationships_relationship_id(relationship_id, opts = {}) + data, status_code, headers = put_relationships_relationship_id_with_http_info(relationship_id, opts) + return data end - # Delete a relationship + # Update a relationship # # @param relationship_id Relationship Id # @param [Hash] opts the optional parameters - # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def delete_relationships_relationship_id_with_http_info(relationship_id, opts = {}) + # @option opts [Relationship] :body Relationship + # @return [Array<(Relationship, Fixnum, Hash)>] Relationship data, response status code and response headers + def put_relationships_relationship_id_with_http_info(relationship_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: ExternalContactsApi#delete_relationships_relationship_id ..." + @api_client.config.logger.debug "Calling API: ExternalContactsApi#put_relationships_relationship_id ..." end # verify the required parameter 'relationship_id' is set - fail "Missing the required parameter 'relationship_id' when calling delete_relationships_relationship_id" if relationship_id.nil? + fail "Missing the required parameter 'relationship_id' when calling put_relationships_relationship_id" if relationship_id.nil? # resource path - path = "/api/v2/externalcontacts/relationships/{relationshipId}".sub('{format}','json').sub('{' + 'relationshipId' + '}', relationship_id.to_s) + local_var_path = "/api/v2/externalcontacts/relationships/{relationshipId}".sub('{format}','json').sub('{' + 'relationshipId' + '}', relationship_id.to_s) # query parameters query_params = {} # header parameters @@ -1668,26 +1658,22 @@ # form parameters form_params = {} # http body (model) - post_body = nil + post_body = @api_client.object_to_http_body(opts[:'body']) - auth_names = ['PureCloud Auth'] - data, status_code, headers = @api_client.call_api(:DELETE, path, + 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) + :auth_names => auth_names, + :return_type => 'Relationship') if @api_client.config.debugging - @api_client.config.logger.debug "API called: ExternalContactsApi#delete_relationships_relationship_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: ExternalContactsApi#put_relationships_relationship_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end - - - -