class PureCloud::OrganizationAuthorizationApi
Attributes
Public Class Methods
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 23 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Delete Org Trust
@param trustee_org_id Trustee
Organization
Id @param [Hash] opts the optional parameters @return [nil]
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 32 def delete_orgauthorization_trustee(trustee_org_id, opts = {}) delete_orgauthorization_trustee_with_http_info(trustee_org_id, opts) return nil end
@param trustee_org_id Trustee
Organization
Id @param trustee_user_id Trustee
User
Id @param [Hash] opts the optional parameters @return [nil]
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 97 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
@param trustee_org_id Trustee
Organization
Id @param trustee_user_id Trustee
User
Id @param [Hash] opts the optional parameters @return [nil]
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 171 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
@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
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 182 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 OAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationAuthorizationApi#delete_orgauthorization_trustee_user_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@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
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 108 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 OAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationAuthorizationApi#delete_orgauthorization_trustee_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers 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
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 42 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 OAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationAuthorizationApi#delete_orgauthorization_trustee\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]
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 244 def delete_orgauthorization_trustor(trustor_org_id, opts = {}) delete_orgauthorization_trustor_with_http_info(trustor_org_id, opts) return nil end
@param trustor_org_id Trustor
Organization
Id @param trustee_user_id Trustee
User
Id @param [Hash] opts the optional parameters @return [nil]
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 309 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
@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
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 320 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 OAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationAuthorizationApi#delete_orgauthorization_trustor_user\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 [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 254 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 OAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationAuthorizationApi#delete_orgauthorization_trustor\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]
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 382 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
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 392 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 OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => '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]
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 447 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
@param trustee_org_id Trustee
Organization
Id @param trustee_user_id Trustee
User
Id @param [Hash] opts the optional parameters @return [TrustUser]
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 513 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
@param trustee_org_id Trustee
Organization
Id @param trustee_user_id Trustee
User
Id @param [Hash] opts the optional parameters @return [UserAuthorization]
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 588 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
@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
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 599 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 OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => '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
@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
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 524 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 OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => '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
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]
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 664 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
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 676 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 OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => '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
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
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 457 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 OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => '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
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]
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 746 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
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 757 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 OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => '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]
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 818 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
@param trustor_org_id Trustor
Organization
Id @param trustee_user_id Trustee
User
Id @param [Hash] opts the optional parameters @return [TrustUser]
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 884 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
@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
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 895 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 OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => '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]
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 960 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
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 972 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 OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => '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
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
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 828 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 OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => '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
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]
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 1042 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
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 1053 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 OAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => '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]
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 1114 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
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 1124 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 OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => '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]
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 1180 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
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 1191 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 OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => '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]
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 1254 def post_orgauthorization_trustees(body, opts = {}) data, _status_code, _headers = post_orgauthorization_trustees_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 (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]
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 1323 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
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 1337 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 OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => '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
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
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 1264 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 OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => '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 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]
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 1424 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
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 1438 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 OAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => '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]
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 1522 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
@param trustee_org_id Trustee
Organization
Id @param trustee_user_id Trustee
User
Id @param body Set of roles with corresponding divisions to apply @param [Hash] opts the optional parameters @return [UserAuthorization]
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 1598 def put_orgauthorization_trustee_user_roledivisions(trustee_org_id, trustee_user_id, body, opts = {}) data, _status_code, _headers = put_orgauthorization_trustee_user_roledivisions_with_http_info(trustee_org_id, trustee_user_id, body, opts) return data end
@param trustee_org_id Trustee
Organization
Id @param trustee_user_id Trustee
User
Id @param body Set of roles with corresponding divisions to apply @param [Hash] opts the optional parameters @return [Array<(UserAuthorization
, Fixnum, Hash)>] UserAuthorization
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 1610 def put_orgauthorization_trustee_user_roledivisions_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_roledivisions ..." 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_roledivisions" 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_roledivisions" 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_roledivisions" if body.nil? # resource path local_var_path = "/api/v2/orgauthorization/trustees/{trusteeOrgId}/users/{trusteeUserId}/roledivisions".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 OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserAuthorization') if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationAuthorizationApi#put_orgauthorization_trustee_user_roledivisions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@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]
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 1683 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
@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
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 1695 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 OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => '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
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
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 1533 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 OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => '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
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]
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 1767 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
# File lib/purecloudplatformclientv2/api/organization_authorization_api.rb, line 1778 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 OAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => '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