=begin PureCloud Platform API With the PureCloud Platform API, you can control all aspects of your PureCloud environment. With the APIs you can access the system configuration, manage conversations and more. OpenAPI spec version: v2 Contact: DeveloperEvangelists@genesys.com Generated by: https://github.com/swagger-api/swagger-codegen.git License: ININ http://www.inin.com Terms of Service: https://developer.mypurecloud.com/tos =end require "uri" module PureCloud class OrganizationAuthorizationApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Delete Org Trust # # @param trustee_org_id Trustee Organization Id # @param [Hash] opts the optional parameters # @return [nil] def delete_orgauthorization_trustee(trustee_org_id, opts = {}) delete_orgauthorization_trustee_with_http_info(trustee_org_id, opts) return nil end # Delete Org Trust # # @param trustee_org_id Trustee Organization Id # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_orgauthorization_trustee_with_http_info(trustee_org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OrganizationAuthorizationApi.delete_orgauthorization_trustee ..." end # verify the required parameter 'trustee_org_id' is set fail ArgumentError, "Missing the required parameter 'trustee_org_id' when calling OrganizationAuthorizationApi.delete_orgauthorization_trustee" if trustee_org_id.nil? # resource path local_var_path = "/api/v2/orgauthorization/trustees/{trusteeOrgId}".sub('{format}','json').sub('{' + 'trusteeOrgId' + '}', trustee_org_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] 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: OrganizationAuthorizationApi#delete_orgauthorization_trustee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete Trustee User # # @param trustee_org_id Trustee Organization Id # @param trustee_user_id Trustee User Id # @param [Hash] opts the optional parameters # @return [nil] def delete_orgauthorization_trustee_user(trustee_org_id, trustee_user_id, opts = {}) delete_orgauthorization_trustee_user_with_http_info(trustee_org_id, trustee_user_id, opts) return nil end # Delete Trustee User # # @param trustee_org_id Trustee Organization Id # @param trustee_user_id Trustee User Id # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_orgauthorization_trustee_user_with_http_info(trustee_org_id, trustee_user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OrganizationAuthorizationApi.delete_orgauthorization_trustee_user ..." end # verify the required parameter 'trustee_org_id' is set fail ArgumentError, "Missing the required parameter 'trustee_org_id' when calling OrganizationAuthorizationApi.delete_orgauthorization_trustee_user" if trustee_org_id.nil? # verify the required parameter 'trustee_user_id' is set fail ArgumentError, "Missing the required parameter 'trustee_user_id' when calling OrganizationAuthorizationApi.delete_orgauthorization_trustee_user" if trustee_user_id.nil? # resource path local_var_path = "/api/v2/orgauthorization/trustees/{trusteeOrgId}/users/{trusteeUserId}".sub('{format}','json').sub('{' + 'trusteeOrgId' + '}', trustee_org_id.to_s).sub('{' + 'trusteeUserId' + '}', trustee_user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] 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: OrganizationAuthorizationApi#delete_orgauthorization_trustee_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete Trustee User Roles # # @param trustee_org_id Trustee Organization Id # @param trustee_user_id Trustee User Id # @param [Hash] opts the optional parameters # @return [nil] def delete_orgauthorization_trustee_user_roles(trustee_org_id, trustee_user_id, opts = {}) delete_orgauthorization_trustee_user_roles_with_http_info(trustee_org_id, trustee_user_id, opts) return nil end # Delete Trustee User Roles # # @param trustee_org_id Trustee Organization Id # @param trustee_user_id Trustee User Id # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_orgauthorization_trustee_user_roles_with_http_info(trustee_org_id, trustee_user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OrganizationAuthorizationApi.delete_orgauthorization_trustee_user_roles ..." end # verify the required parameter 'trustee_org_id' is set fail ArgumentError, "Missing the required parameter 'trustee_org_id' when calling OrganizationAuthorizationApi.delete_orgauthorization_trustee_user_roles" if trustee_org_id.nil? # verify the required parameter 'trustee_user_id' is set fail ArgumentError, "Missing the required parameter 'trustee_user_id' when calling OrganizationAuthorizationApi.delete_orgauthorization_trustee_user_roles" if trustee_user_id.nil? # resource path local_var_path = "/api/v2/orgauthorization/trustees/{trusteeOrgId}/users/{trusteeUserId}/roles".sub('{format}','json').sub('{' + 'trusteeOrgId' + '}', trustee_org_id.to_s).sub('{' + 'trusteeUserId' + '}', trustee_user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] 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: OrganizationAuthorizationApi#delete_orgauthorization_trustee_user_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete Org Trust # # @param trustor_org_id Trustor Organization Id # @param [Hash] opts the optional parameters # @return [nil] def delete_orgauthorization_trustor(trustor_org_id, opts = {}) delete_orgauthorization_trustor_with_http_info(trustor_org_id, opts) return nil end # Delete Org Trust # # @param trustor_org_id Trustor Organization Id # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_orgauthorization_trustor_with_http_info(trustor_org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OrganizationAuthorizationApi.delete_orgauthorization_trustor ..." end # verify the required parameter 'trustor_org_id' is set fail ArgumentError, "Missing the required parameter 'trustor_org_id' when calling OrganizationAuthorizationApi.delete_orgauthorization_trustor" if trustor_org_id.nil? # resource path local_var_path = "/api/v2/orgauthorization/trustors/{trustorOrgId}".sub('{format}','json').sub('{' + 'trustorOrgId' + '}', trustor_org_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] 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: OrganizationAuthorizationApi#delete_orgauthorization_trustor\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete Trustee User # # @param trustor_org_id Trustor Organization Id # @param trustee_user_id Trustee User Id # @param [Hash] opts the optional parameters # @return [nil] def delete_orgauthorization_trustor_user(trustor_org_id, trustee_user_id, opts = {}) delete_orgauthorization_trustor_user_with_http_info(trustor_org_id, trustee_user_id, opts) return nil end # Delete Trustee User # # @param trustor_org_id Trustor Organization Id # @param trustee_user_id Trustee User Id # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_orgauthorization_trustor_user_with_http_info(trustor_org_id, trustee_user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OrganizationAuthorizationApi.delete_orgauthorization_trustor_user ..." end # verify the required parameter 'trustor_org_id' is set fail ArgumentError, "Missing the required parameter 'trustor_org_id' when calling OrganizationAuthorizationApi.delete_orgauthorization_trustor_user" if trustor_org_id.nil? # verify the required parameter 'trustee_user_id' is set fail ArgumentError, "Missing the required parameter 'trustee_user_id' when calling OrganizationAuthorizationApi.delete_orgauthorization_trustor_user" if trustee_user_id.nil? # resource path local_var_path = "/api/v2/orgauthorization/trustors/{trustorOrgId}/users/{trusteeUserId}".sub('{format}','json').sub('{' + 'trustorOrgId' + '}', trustor_org_id.to_s).sub('{' + 'trusteeUserId' + '}', trustee_user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] 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: OrganizationAuthorizationApi#delete_orgauthorization_trustor_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get Pairing Info # # @param pairing_id Pairing Id # @param [Hash] opts the optional parameters # @return [TrustRequest] def get_orgauthorization_pairing(pairing_id, opts = {}) data, _status_code, _headers = get_orgauthorization_pairing_with_http_info(pairing_id, opts) return data end # Get Pairing Info # # @param pairing_id Pairing Id # @param [Hash] opts the optional parameters # @return [Array<(TrustRequest, Fixnum, Hash)>] TrustRequest data, response status code and response headers def get_orgauthorization_pairing_with_http_info(pairing_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OrganizationAuthorizationApi.get_orgauthorization_pairing ..." end # verify the required parameter 'pairing_id' is set fail ArgumentError, "Missing the required parameter 'pairing_id' when calling OrganizationAuthorizationApi.get_orgauthorization_pairing" if pairing_id.nil? # resource path local_var_path = "/api/v2/orgauthorization/pairings/{pairingId}".sub('{format}','json').sub('{' + 'pairingId' + '}', pairing_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] 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 => 'TrustRequest') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationAuthorizationApi#get_orgauthorization_pairing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get Org Trust # # @param trustee_org_id Trustee Organization Id # @param [Hash] opts the optional parameters # @return [Trustee] def get_orgauthorization_trustee(trustee_org_id, opts = {}) data, _status_code, _headers = get_orgauthorization_trustee_with_http_info(trustee_org_id, opts) return data end # Get Org Trust # # @param trustee_org_id Trustee Organization Id # @param [Hash] opts the optional parameters # @return [Array<(Trustee, Fixnum, Hash)>] Trustee data, response status code and response headers def get_orgauthorization_trustee_with_http_info(trustee_org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OrganizationAuthorizationApi.get_orgauthorization_trustee ..." end # verify the required parameter 'trustee_org_id' is set fail ArgumentError, "Missing the required parameter 'trustee_org_id' when calling OrganizationAuthorizationApi.get_orgauthorization_trustee" if trustee_org_id.nil? # resource path local_var_path = "/api/v2/orgauthorization/trustees/{trusteeOrgId}".sub('{format}','json').sub('{' + 'trusteeOrgId' + '}', trustee_org_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] 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 => 'Trustee') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationAuthorizationApi#get_orgauthorization_trustee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get Trustee User # # @param trustee_org_id Trustee Organization Id # @param trustee_user_id Trustee User Id # @param [Hash] opts the optional parameters # @return [TrustUser] def get_orgauthorization_trustee_user(trustee_org_id, trustee_user_id, opts = {}) data, _status_code, _headers = get_orgauthorization_trustee_user_with_http_info(trustee_org_id, trustee_user_id, opts) return data end # Get Trustee User # # @param trustee_org_id Trustee Organization Id # @param trustee_user_id Trustee User Id # @param [Hash] opts the optional parameters # @return [Array<(TrustUser, Fixnum, Hash)>] TrustUser data, response status code and response headers def get_orgauthorization_trustee_user_with_http_info(trustee_org_id, trustee_user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OrganizationAuthorizationApi.get_orgauthorization_trustee_user ..." end # verify the required parameter 'trustee_org_id' is set fail ArgumentError, "Missing the required parameter 'trustee_org_id' when calling OrganizationAuthorizationApi.get_orgauthorization_trustee_user" if trustee_org_id.nil? # verify the required parameter 'trustee_user_id' is set fail ArgumentError, "Missing the required parameter 'trustee_user_id' when calling OrganizationAuthorizationApi.get_orgauthorization_trustee_user" if trustee_user_id.nil? # resource path local_var_path = "/api/v2/orgauthorization/trustees/{trusteeOrgId}/users/{trusteeUserId}".sub('{format}','json').sub('{' + 'trusteeOrgId' + '}', trustee_org_id.to_s).sub('{' + 'trusteeUserId' + '}', trustee_user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] 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 => 'TrustUser') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationAuthorizationApi#get_orgauthorization_trustee_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get Trustee User Roles # # @param trustee_org_id Trustee Organization Id # @param trustee_user_id Trustee User Id # @param [Hash] opts the optional parameters # @return [UserAuthorization] def get_orgauthorization_trustee_user_roles(trustee_org_id, trustee_user_id, opts = {}) data, _status_code, _headers = get_orgauthorization_trustee_user_roles_with_http_info(trustee_org_id, trustee_user_id, opts) return data end # Get Trustee User Roles # # @param trustee_org_id Trustee Organization Id # @param trustee_user_id Trustee User Id # @param [Hash] opts the optional parameters # @return [Array<(UserAuthorization, Fixnum, Hash)>] UserAuthorization data, response status code and response headers def get_orgauthorization_trustee_user_roles_with_http_info(trustee_org_id, trustee_user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OrganizationAuthorizationApi.get_orgauthorization_trustee_user_roles ..." end # verify the required parameter 'trustee_org_id' is set fail ArgumentError, "Missing the required parameter 'trustee_org_id' when calling OrganizationAuthorizationApi.get_orgauthorization_trustee_user_roles" if trustee_org_id.nil? # verify the required parameter 'trustee_user_id' is set fail ArgumentError, "Missing the required parameter 'trustee_user_id' when calling OrganizationAuthorizationApi.get_orgauthorization_trustee_user_roles" if trustee_user_id.nil? # resource path local_var_path = "/api/v2/orgauthorization/trustees/{trusteeOrgId}/users/{trusteeUserId}/roles".sub('{format}','json').sub('{' + 'trusteeOrgId' + '}', trustee_org_id.to_s).sub('{' + 'trusteeUserId' + '}', trustee_user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] 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 => 'UserAuthorization') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationAuthorizationApi#get_orgauthorization_trustee_user_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # The list of trustee users for this organization (i.e. users granted access to this organization). # # @param trustee_org_id Trustee Organization Id # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size (default to 25) # @option opts [Integer] :page_number Page number (default to 1) # @return [TrustUserEntityListing] def get_orgauthorization_trustee_users(trustee_org_id, opts = {}) data, _status_code, _headers = get_orgauthorization_trustee_users_with_http_info(trustee_org_id, opts) return data end # The list of trustee users for this organization (i.e. users granted access to this organization). # # @param trustee_org_id Trustee Organization Id # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @return [Array<(TrustUserEntityListing, Fixnum, Hash)>] TrustUserEntityListing data, response status code and response headers def get_orgauthorization_trustee_users_with_http_info(trustee_org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OrganizationAuthorizationApi.get_orgauthorization_trustee_users ..." end # verify the required parameter 'trustee_org_id' is set fail ArgumentError, "Missing the required parameter 'trustee_org_id' when calling OrganizationAuthorizationApi.get_orgauthorization_trustee_users" if trustee_org_id.nil? # resource path local_var_path = "/api/v2/orgauthorization/trustees/{trusteeOrgId}/users".sub('{format}','json').sub('{' + 'trusteeOrgId' + '}', trustee_org_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'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] 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 => 'TrustUserEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationAuthorizationApi#get_orgauthorization_trustee_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # The list of trustees for this organization (i.e. organizations granted access to this organization). # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size (default to 25) # @option opts [Integer] :page_number Page number (default to 1) # @return [TrustEntityListing] def get_orgauthorization_trustees(opts = {}) data, _status_code, _headers = get_orgauthorization_trustees_with_http_info(opts) return data end # The list of trustees for this organization (i.e. organizations granted access to this organization). # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @return [Array<(TrustEntityListing, Fixnum, Hash)>] TrustEntityListing data, response status code and response headers def get_orgauthorization_trustees_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OrganizationAuthorizationApi.get_orgauthorization_trustees ..." end # resource path local_var_path = "/api/v2/orgauthorization/trustees".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'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] 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 => 'TrustEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationAuthorizationApi#get_orgauthorization_trustees\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get Org Trust # # @param trustor_org_id Trustor Organization Id # @param [Hash] opts the optional parameters # @return [Trustor] def get_orgauthorization_trustor(trustor_org_id, opts = {}) data, _status_code, _headers = get_orgauthorization_trustor_with_http_info(trustor_org_id, opts) return data end # Get Org Trust # # @param trustor_org_id Trustor Organization Id # @param [Hash] opts the optional parameters # @return [Array<(Trustor, Fixnum, Hash)>] Trustor data, response status code and response headers def get_orgauthorization_trustor_with_http_info(trustor_org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OrganizationAuthorizationApi.get_orgauthorization_trustor ..." end # verify the required parameter 'trustor_org_id' is set fail ArgumentError, "Missing the required parameter 'trustor_org_id' when calling OrganizationAuthorizationApi.get_orgauthorization_trustor" if trustor_org_id.nil? # resource path local_var_path = "/api/v2/orgauthorization/trustors/{trustorOrgId}".sub('{format}','json').sub('{' + 'trustorOrgId' + '}', trustor_org_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] 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 => 'Trustor') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationAuthorizationApi#get_orgauthorization_trustor\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get Trustee User # # @param trustor_org_id Trustor Organization Id # @param trustee_user_id Trustee User Id # @param [Hash] opts the optional parameters # @return [TrustUser] def get_orgauthorization_trustor_user(trustor_org_id, trustee_user_id, opts = {}) data, _status_code, _headers = get_orgauthorization_trustor_user_with_http_info(trustor_org_id, trustee_user_id, opts) return data end # Get Trustee User # # @param trustor_org_id Trustor Organization Id # @param trustee_user_id Trustee User Id # @param [Hash] opts the optional parameters # @return [Array<(TrustUser, Fixnum, Hash)>] TrustUser data, response status code and response headers def get_orgauthorization_trustor_user_with_http_info(trustor_org_id, trustee_user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OrganizationAuthorizationApi.get_orgauthorization_trustor_user ..." end # verify the required parameter 'trustor_org_id' is set fail ArgumentError, "Missing the required parameter 'trustor_org_id' when calling OrganizationAuthorizationApi.get_orgauthorization_trustor_user" if trustor_org_id.nil? # verify the required parameter 'trustee_user_id' is set fail ArgumentError, "Missing the required parameter 'trustee_user_id' when calling OrganizationAuthorizationApi.get_orgauthorization_trustor_user" if trustee_user_id.nil? # resource path local_var_path = "/api/v2/orgauthorization/trustors/{trustorOrgId}/users/{trusteeUserId}".sub('{format}','json').sub('{' + 'trustorOrgId' + '}', trustor_org_id.to_s).sub('{' + 'trusteeUserId' + '}', trustee_user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] 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 => 'TrustUser') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationAuthorizationApi#get_orgauthorization_trustor_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # The list of users in the trustor organization (i.e. users granted access). # # @param trustor_org_id Trustee Organization Id # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size (default to 25) # @option opts [Integer] :page_number Page number (default to 1) # @return [TrustUserEntityListing] def get_orgauthorization_trustor_users(trustor_org_id, opts = {}) data, _status_code, _headers = get_orgauthorization_trustor_users_with_http_info(trustor_org_id, opts) return data end # The list of users in the trustor organization (i.e. users granted access). # # @param trustor_org_id Trustee Organization Id # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @return [Array<(TrustUserEntityListing, Fixnum, Hash)>] TrustUserEntityListing data, response status code and response headers def get_orgauthorization_trustor_users_with_http_info(trustor_org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OrganizationAuthorizationApi.get_orgauthorization_trustor_users ..." end # verify the required parameter 'trustor_org_id' is set fail ArgumentError, "Missing the required parameter 'trustor_org_id' when calling OrganizationAuthorizationApi.get_orgauthorization_trustor_users" if trustor_org_id.nil? # resource path local_var_path = "/api/v2/orgauthorization/trustors/{trustorOrgId}/users".sub('{format}','json').sub('{' + 'trustorOrgId' + '}', trustor_org_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'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] 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 => 'TrustUserEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationAuthorizationApi#get_orgauthorization_trustor_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # The list of organizations that have authorized/trusted your organization. # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size (default to 25) # @option opts [Integer] :page_number Page number (default to 1) # @return [TrustorEntityListing] def get_orgauthorization_trustors(opts = {}) data, _status_code, _headers = get_orgauthorization_trustors_with_http_info(opts) return data end # The list of organizations that have authorized/trusted your organization. # # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @return [Array<(TrustorEntityListing, Fixnum, Hash)>] TrustorEntityListing data, response status code and response headers def get_orgauthorization_trustors_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OrganizationAuthorizationApi.get_orgauthorization_trustors ..." end # resource path local_var_path = "/api/v2/orgauthorization/trustors".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'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] 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 => 'TrustorEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationAuthorizationApi#get_orgauthorization_trustors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # A pairing id is created by the trustee and given to the trustor to create a trust. # # @param body Pairing Info # @param [Hash] opts the optional parameters # @return [TrustRequest] def post_orgauthorization_pairings(body, opts = {}) data, _status_code, _headers = post_orgauthorization_pairings_with_http_info(body, opts) return data end # A pairing id is created by the trustee and given to the trustor to create a trust. # # @param body Pairing Info # @param [Hash] opts the optional parameters # @return [Array<(TrustRequest, Fixnum, Hash)>] TrustRequest data, response status code and response headers def post_orgauthorization_pairings_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OrganizationAuthorizationApi.post_orgauthorization_pairings ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling OrganizationAuthorizationApi.post_orgauthorization_pairings" if body.nil? # resource path local_var_path = "/api/v2/orgauthorization/pairings".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TrustRequest') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationAuthorizationApi#post_orgauthorization_pairings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Add a user to the trust. # # @param trustee_org_id Trustee Organization Id # @param body Trust # @param [Hash] opts the optional parameters # @return [TrustUser] def post_orgauthorization_trustee_users(trustee_org_id, body, opts = {}) data, _status_code, _headers = post_orgauthorization_trustee_users_with_http_info(trustee_org_id, body, opts) return data end # Add a user to the trust. # # @param trustee_org_id Trustee Organization Id # @param body Trust # @param [Hash] opts the optional parameters # @return [Array<(TrustUser, Fixnum, Hash)>] TrustUser data, response status code and response headers def post_orgauthorization_trustee_users_with_http_info(trustee_org_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OrganizationAuthorizationApi.post_orgauthorization_trustee_users ..." end # verify the required parameter 'trustee_org_id' is set fail ArgumentError, "Missing the required parameter 'trustee_org_id' when calling OrganizationAuthorizationApi.post_orgauthorization_trustee_users" if trustee_org_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling OrganizationAuthorizationApi.post_orgauthorization_trustee_users" if body.nil? # resource path local_var_path = "/api/v2/orgauthorization/trustees/{trusteeOrgId}/users".sub('{format}','json').sub('{' + 'trusteeOrgId' + '}', trustee_org_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TrustUser') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationAuthorizationApi#post_orgauthorization_trustee_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create a new organization authorization trust. This is required to grant other organizations access to your organization. # # @param body Trust # @param [Hash] opts the optional parameters # @return [Trustee] def post_orgauthorization_trustees(body, opts = {}) data, _status_code, _headers = post_orgauthorization_trustees_with_http_info(body, opts) return data end # Create a new organization authorization trust. This is required to grant other organizations access to your organization. # # @param body Trust # @param [Hash] opts the optional parameters # @return [Array<(Trustee, Fixnum, Hash)>] Trustee data, response status code and response headers def post_orgauthorization_trustees_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OrganizationAuthorizationApi.post_orgauthorization_trustees ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling OrganizationAuthorizationApi.post_orgauthorization_trustees" if body.nil? # resource path local_var_path = "/api/v2/orgauthorization/trustees".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Trustee') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationAuthorizationApi#post_orgauthorization_trustees\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get Org Trustee Audits # # @param body Values to scope the request. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size (default to 25) # @option opts [Integer] :page_number Page number (default to 1) # @option opts [String] :sort_by Sort by (default to timestamp) # @option opts [String] :sort_order Sort order (default to descending) # @return [AuditQueryResponse] def post_orgauthorization_trustees_audits(body, opts = {}) data, _status_code, _headers = post_orgauthorization_trustees_audits_with_http_info(body, opts) return data end # Get Org Trustee Audits # # @param body Values to scope the request. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [String] :sort_by Sort by # @option opts [String] :sort_order Sort order # @return [Array<(AuditQueryResponse, Fixnum, Hash)>] AuditQueryResponse data, response status code and response headers def post_orgauthorization_trustees_audits_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OrganizationAuthorizationApi.post_orgauthorization_trustees_audits ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling OrganizationAuthorizationApi.post_orgauthorization_trustees_audits" if body.nil? # resource path local_var_path = "/api/v2/orgauthorization/trustees/audits".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[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AuditQueryResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationAuthorizationApi#post_orgauthorization_trustees_audits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get Org Trustor Audits # # @param body Values to scope the request. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size (default to 25) # @option opts [Integer] :page_number Page number (default to 1) # @option opts [String] :sort_by Sort by (default to timestamp) # @option opts [String] :sort_order Sort order (default to descending) # @return [AuditQueryResponse] def post_orgauthorization_trustor_audits(body, opts = {}) data, _status_code, _headers = post_orgauthorization_trustor_audits_with_http_info(body, opts) return data end # Get Org Trustor Audits # # @param body Values to scope the request. # @param [Hash] opts the optional parameters # @option opts [Integer] :page_size Page size # @option opts [Integer] :page_number Page number # @option opts [String] :sort_by Sort by # @option opts [String] :sort_order Sort order # @return [Array<(AuditQueryResponse, Fixnum, Hash)>] AuditQueryResponse data, response status code and response headers def post_orgauthorization_trustor_audits_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OrganizationAuthorizationApi.post_orgauthorization_trustor_audits ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling OrganizationAuthorizationApi.post_orgauthorization_trustor_audits" if body.nil? # resource path local_var_path = "/api/v2/orgauthorization/trustor/audits".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[:'sortBy'] = opts[:'sort_by'] if opts[:'sort_by'] query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AuditQueryResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationAuthorizationApi#post_orgauthorization_trustor_audits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update Org Trust # # @param trustee_org_id Trustee Organization Id # @param body Client # @param [Hash] opts the optional parameters # @return [Trustee] def put_orgauthorization_trustee(trustee_org_id, body, opts = {}) data, _status_code, _headers = put_orgauthorization_trustee_with_http_info(trustee_org_id, body, opts) return data end # Update Org Trust # # @param trustee_org_id Trustee Organization Id # @param body Client # @param [Hash] opts the optional parameters # @return [Array<(Trustee, Fixnum, Hash)>] Trustee data, response status code and response headers def put_orgauthorization_trustee_with_http_info(trustee_org_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OrganizationAuthorizationApi.put_orgauthorization_trustee ..." end # verify the required parameter 'trustee_org_id' is set fail ArgumentError, "Missing the required parameter 'trustee_org_id' when calling OrganizationAuthorizationApi.put_orgauthorization_trustee" if trustee_org_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling OrganizationAuthorizationApi.put_orgauthorization_trustee" if body.nil? # resource path local_var_path = "/api/v2/orgauthorization/trustees/{trusteeOrgId}".sub('{format}','json').sub('{' + 'trusteeOrgId' + '}', trustee_org_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] 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 => 'Trustee') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationAuthorizationApi#put_orgauthorization_trustee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update Trustee User Roles # # @param trustee_org_id Trustee Organization Id # @param trustee_user_id Trustee User Id # @param body List of roles # @param [Hash] opts the optional parameters # @return [UserAuthorization] def put_orgauthorization_trustee_user_roles(trustee_org_id, trustee_user_id, body, opts = {}) data, _status_code, _headers = put_orgauthorization_trustee_user_roles_with_http_info(trustee_org_id, trustee_user_id, body, opts) return data end # Update Trustee User Roles # # @param trustee_org_id Trustee Organization Id # @param trustee_user_id Trustee User Id # @param body List of roles # @param [Hash] opts the optional parameters # @return [Array<(UserAuthorization, Fixnum, Hash)>] UserAuthorization data, response status code and response headers def put_orgauthorization_trustee_user_roles_with_http_info(trustee_org_id, trustee_user_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OrganizationAuthorizationApi.put_orgauthorization_trustee_user_roles ..." end # verify the required parameter 'trustee_org_id' is set fail ArgumentError, "Missing the required parameter 'trustee_org_id' when calling OrganizationAuthorizationApi.put_orgauthorization_trustee_user_roles" if trustee_org_id.nil? # verify the required parameter 'trustee_user_id' is set fail ArgumentError, "Missing the required parameter 'trustee_user_id' when calling OrganizationAuthorizationApi.put_orgauthorization_trustee_user_roles" if trustee_user_id.nil? # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling OrganizationAuthorizationApi.put_orgauthorization_trustee_user_roles" if body.nil? # resource path local_var_path = "/api/v2/orgauthorization/trustees/{trusteeOrgId}/users/{trusteeUserId}/roles".sub('{format}','json').sub('{' + 'trusteeOrgId' + '}', trustee_org_id.to_s).sub('{' + 'trusteeUserId' + '}', trustee_user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] 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 => 'UserAuthorization') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationAuthorizationApi#put_orgauthorization_trustee_user_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Add a Trustee user to the trust. # # @param trustor_org_id Trustor Organization Id # @param trustee_user_id Trustee User Id # @param [Hash] opts the optional parameters # @return [TrustUser] def put_orgauthorization_trustor_user(trustor_org_id, trustee_user_id, opts = {}) data, _status_code, _headers = put_orgauthorization_trustor_user_with_http_info(trustor_org_id, trustee_user_id, opts) return data end # Add a Trustee user to the trust. # # @param trustor_org_id Trustor Organization Id # @param trustee_user_id Trustee User Id # @param [Hash] opts the optional parameters # @return [Array<(TrustUser, Fixnum, Hash)>] TrustUser data, response status code and response headers def put_orgauthorization_trustor_user_with_http_info(trustor_org_id, trustee_user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OrganizationAuthorizationApi.put_orgauthorization_trustor_user ..." end # verify the required parameter 'trustor_org_id' is set fail ArgumentError, "Missing the required parameter 'trustor_org_id' when calling OrganizationAuthorizationApi.put_orgauthorization_trustor_user" if trustor_org_id.nil? # verify the required parameter 'trustee_user_id' is set fail ArgumentError, "Missing the required parameter 'trustee_user_id' when calling OrganizationAuthorizationApi.put_orgauthorization_trustor_user" if trustee_user_id.nil? # resource path local_var_path = "/api/v2/orgauthorization/trustors/{trustorOrgId}/users/{trusteeUserId}".sub('{format}','json').sub('{' + 'trustorOrgId' + '}', trustor_org_id.to_s).sub('{' + 'trusteeUserId' + '}', trustee_user_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] 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 => 'TrustUser') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationAuthorizationApi#put_orgauthorization_trustor_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end