lib/purecloud/api/o_auth_api.rb in purecloud-0.18.0 vs lib/purecloud/api/o_auth_api.rb in purecloud-0.25.0

- old
+ new

@@ -10,22 +10,22 @@ # The list of identity providers # # @param [Hash] opts the optional parameters # @return [OAuthProviderEntityListing] - def get(opts = {}) - data, status_code, headers = get_with_http_info(opts) + def get_identityproviders(opts = {}) + data, status_code, headers = get_identityproviders_with_http_info(opts) return data end # The list of identity providers # # @param [Hash] opts the optional parameters # @return [Array<(OAuthProviderEntityListing, Fixnum, Hash)>] OAuthProviderEntityListing data, response status code and response headers - def get_with_http_info(opts = {}) + def get_identityproviders_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: OAuthApi#get ..." + @api_client.config.logger.debug "Calling API: OAuthApi#get_identityproviders ..." end # resource path path = "/api/v1/identityproviders".sub('{format}','json') @@ -57,11 +57,11 @@ :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OAuthProviderEntityListing') if @api_client.config.debugging - @api_client.config.logger.debug "API called: OAuthApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: OAuthApi#get_identityproviders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get Okta Identity Provider @@ -123,23 +123,23 @@ # Update/Create Okta Identity Provider # # @param [Hash] opts the optional parameters # @option opts [Okta] :body Provider # @return [nil] - def update_okta(opts = {}) - update_okta_with_http_info(opts) + def put_okta(opts = {}) + put_okta_with_http_info(opts) return nil end # Update/Create Okta Identity Provider # # @param [Hash] opts the optional parameters # @option opts [Okta] :body Provider # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def update_okta_with_http_info(opts = {}) + def put_okta_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: OAuthApi#update_okta ..." + @api_client.config.logger.debug "Calling API: OAuthApi#put_okta ..." end # resource path path = "/api/v1/identityproviders/okta".sub('{format}','json') @@ -170,11 +170,11 @@ :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: OAuthApi#update_okta\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: OAuthApi#put_okta\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete Okta Identity Provider @@ -291,23 +291,23 @@ # Update/Create OneLogin Identity Provider # # @param [Hash] opts the optional parameters # @option opts [OneLogin] :body Provider # @return [nil] - def update_onelogin(opts = {}) - update_onelogin_with_http_info(opts) + def put_onelogin(opts = {}) + put_onelogin_with_http_info(opts) return nil end # Update/Create OneLogin Identity Provider # # @param [Hash] opts the optional parameters # @option opts [OneLogin] :body Provider # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def update_onelogin_with_http_info(opts = {}) + def put_onelogin_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: OAuthApi#update_onelogin ..." + @api_client.config.logger.debug "Calling API: OAuthApi#put_onelogin ..." end # resource path path = "/api/v1/identityproviders/onelogin".sub('{format}','json') @@ -338,11 +338,11 @@ :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: OAuthApi#update_onelogin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: OAuthApi#put_onelogin\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete OneLogin Identity Provider @@ -459,23 +459,23 @@ # Update/Create PureCloud Identity Provider # # @param [Hash] opts the optional parameters # @option opts [PureCloud] :body Provider # @return [nil] - def update_purecloud(opts = {}) - update_purecloud_with_http_info(opts) + def put_purecloud(opts = {}) + put_purecloud_with_http_info(opts) return nil end # Update/Create PureCloud Identity Provider # # @param [Hash] opts the optional parameters # @option opts [PureCloud] :body Provider # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def update_purecloud_with_http_info(opts = {}) + def put_purecloud_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: OAuthApi#update_purecloud ..." + @api_client.config.logger.debug "Calling API: OAuthApi#put_purecloud ..." end # resource path path = "/api/v1/identityproviders/purecloud".sub('{format}','json') @@ -506,11 +506,11 @@ :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: OAuthApi#update_purecloud\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: OAuthApi#put_purecloud\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete PureCloud Identity Provider @@ -627,23 +627,23 @@ # Update/Create Salesforce Identity Provider # # @param [Hash] opts the optional parameters # @option opts [Salesforce] :body Provider # @return [nil] - def update_salesforce(opts = {}) - update_salesforce_with_http_info(opts) + def put_salesforce(opts = {}) + put_salesforce_with_http_info(opts) return nil end # Update/Create Salesforce Identity Provider # # @param [Hash] opts the optional parameters # @option opts [Salesforce] :body Provider # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def update_salesforce_with_http_info(opts = {}) + def put_salesforce_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: OAuthApi#update_salesforce ..." + @api_client.config.logger.debug "Calling API: OAuthApi#put_salesforce ..." end # resource path path = "/api/v1/identityproviders/salesforce".sub('{format}','json') @@ -674,11 +674,11 @@ :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: OAuthApi#update_salesforce\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: OAuthApi#put_salesforce\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete Salesforce Identity Provider @@ -738,22 +738,22 @@ # Get an identity provider # # @param [Hash] opts the optional parameters # @return [OAuthProvider] - def get_prover_id(opts = {}) - data, status_code, headers = get_prover_id_with_http_info(opts) + def get_provider_id(opts = {}) + data, status_code, headers = get_provider_id_with_http_info(opts) return data end # Get an identity provider # # @param [Hash] opts the optional parameters # @return [Array<(OAuthProvider, Fixnum, Hash)>] OAuthProvider data, response status code and response headers - def get_prover_id_with_http_info(opts = {}) + def get_provider_id_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: OAuthApi#get_prover_id ..." + @api_client.config.logger.debug "Calling API: OAuthApi#get_provider_id ..." end # resource path path = "/api/v1/identityproviders/{providerId}".sub('{format}','json') @@ -785,33 +785,33 @@ :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OAuthProvider') if @api_client.config.debugging - @api_client.config.logger.debug "API called: OAuthApi#get_prover_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: OAuthApi#get_provider_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update an identity provider # # @param [Hash] opts the optional parameters # @option opts [OAuthProvider] :body Provider # @return [nil] - def update_prover_id(opts = {}) - update_prover_id_with_http_info(opts) + def put_provider_id(opts = {}) + put_provider_id_with_http_info(opts) return nil end # Update an identity provider # # @param [Hash] opts the optional parameters # @option opts [OAuthProvider] :body Provider # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def update_prover_id_with_http_info(opts = {}) + def put_provider_id_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: OAuthApi#update_prover_id ..." + @api_client.config.logger.debug "Calling API: OAuthApi#put_provider_id ..." end # resource path path = "/api/v1/identityproviders/{providerId}".sub('{format}','json') @@ -842,31 +842,31 @@ :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: OAuthApi#update_prover_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: OAuthApi#put_provider_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete an identity provider # # @param [Hash] opts the optional parameters # @return [nil] - def delete_prover_id(opts = {}) - delete_prover_id_with_http_info(opts) + def delete_provider_id(opts = {}) + delete_provider_id_with_http_info(opts) return nil end # Delete an identity provider # # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def delete_prover_id_with_http_info(opts = {}) + def delete_provider_id_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: OAuthApi#delete_prover_id ..." + @api_client.config.logger.debug "Calling API: OAuthApi#delete_provider_id ..." end # resource path path = "/api/v1/identityproviders/{providerId}".sub('{format}','json') @@ -897,11 +897,11 @@ :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: OAuthApi#delete_prover_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: OAuthApi#delete_provider_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # The list of OAuth clients @@ -963,23 +963,23 @@ # Create OAuth client # The OAuth Grant/Client is required in order to create an authentication token and gain access to PureCloud. \nThe preferred authorizedGrantTypes is &#39;CODE&#39; which requires applications to send a client ID and client secret. This is typically a web server. \nIf the client is unable to secure the client secret then the &#39;TOKEN&#39; grant type aka IMPLICIT should be used. This is would be for browser or mobile apps. \nIf a client is to be used outside of the context of a user then the &#39;CLIENT-CREDENTIALS&#39; grant may be used. In this case the client must be granted roles \nvia the &#39;roleIds&#39; field. # @param [Hash] opts the optional parameters # @option opts [OAuthClient] :body Client # @return [OAuthClient] - def create_clients(opts = {}) - data, status_code, headers = create_clients_with_http_info(opts) + def post_clients(opts = {}) + data, status_code, headers = post_clients_with_http_info(opts) return data end # Create OAuth client # The OAuth Grant/Client is required in order to create an authentication token and gain access to PureCloud. \nThe preferred authorizedGrantTypes is &#39;CODE&#39; which requires applications to send a client ID and client secret. This is typically a web server. \nIf the client is unable to secure the client secret then the &#39;TOKEN&#39; grant type aka IMPLICIT should be used. This is would be for browser or mobile apps. \nIf a client is to be used outside of the context of a user then the &#39;CLIENT-CREDENTIALS&#39; grant may be used. In this case the client must be granted roles \nvia the &#39;roleIds&#39; field. # @param [Hash] opts the optional parameters # @option opts [OAuthClient] :body Client # @return [Array<(OAuthClient, Fixnum, Hash)>] OAuthClient data, response status code and response headers - def create_clients_with_http_info(opts = {}) + def post_clients_with_http_info(opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: OAuthApi#create_clients ..." + @api_client.config.logger.debug "Calling API: OAuthApi#post_clients ..." end # resource path path = "/api/v1/oauth/clients".sub('{format}','json') @@ -1011,37 +1011,37 @@ :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OAuthClient') if @api_client.config.debugging - @api_client.config.logger.debug "API called: OAuthApi#create_clients\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: OAuthApi#post_clients\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get OAuth Client # # @param client_id Client ID # @param [Hash] opts the optional parameters # @return [OAuthClient] - def get_client(client_id, opts = {}) - data, status_code, headers = get_client_with_http_info(client_id, opts) + def get_clients_client_id(client_id, opts = {}) + data, status_code, headers = get_clients_client_id_with_http_info(client_id, opts) return data end # Get OAuth Client # # @param client_id Client ID # @param [Hash] opts the optional parameters # @return [Array<(OAuthClient, Fixnum, Hash)>] OAuthClient data, response status code and response headers - def get_client_with_http_info(client_id, opts = {}) + def get_clients_client_id_with_http_info(client_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: OAuthApi#get_client ..." + @api_client.config.logger.debug "Calling API: OAuthApi#get_clients_client_id ..." end # verify the required parameter 'client_id' is set - fail "Missing the required parameter 'client_id' when calling get_client" if client_id.nil? + fail "Missing the required parameter 'client_id' when calling get_clients_client_id" if client_id.nil? # resource path path = "/api/v1/oauth/clients/{clientId}".sub('{format}','json').sub('{' + 'clientId' + '}', client_id.to_s) # query parameters @@ -1072,39 +1072,39 @@ :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OAuthClient') if @api_client.config.debugging - @api_client.config.logger.debug "API called: OAuthApi#get_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: OAuthApi#get_clients_client_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update OAuth Client # # @param client_id Client ID # @param [Hash] opts the optional parameters # @option opts [OAuthClient] :body Client # @return [OAuthClient] - def update_client(client_id, opts = {}) - data, status_code, headers = update_client_with_http_info(client_id, opts) + def put_clients_client_id(client_id, opts = {}) + data, status_code, headers = put_clients_client_id_with_http_info(client_id, opts) return data end # Update OAuth Client # # @param client_id Client ID # @param [Hash] opts the optional parameters # @option opts [OAuthClient] :body Client # @return [Array<(OAuthClient, Fixnum, Hash)>] OAuthClient data, response status code and response headers - def update_client_with_http_info(client_id, opts = {}) + def put_clients_client_id_with_http_info(client_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: OAuthApi#update_client ..." + @api_client.config.logger.debug "Calling API: OAuthApi#put_clients_client_id ..." end # verify the required parameter 'client_id' is set - fail "Missing the required parameter 'client_id' when calling update_client" if client_id.nil? + fail "Missing the required parameter 'client_id' when calling put_clients_client_id" if client_id.nil? # resource path path = "/api/v1/oauth/clients/{clientId}".sub('{format}','json').sub('{' + 'clientId' + '}', client_id.to_s) # query parameters @@ -1135,37 +1135,37 @@ :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'OAuthClient') if @api_client.config.debugging - @api_client.config.logger.debug "API called: OAuthApi#update_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: OAuthApi#put_clients_client_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete OAuth Client # # @param client_id Client ID # @param [Hash] opts the optional parameters # @return [nil] - def delete_client(client_id, opts = {}) - delete_client_with_http_info(client_id, opts) + def delete_clients_client_id(client_id, opts = {}) + delete_clients_client_id_with_http_info(client_id, opts) return nil end # Delete OAuth Client # # @param client_id Client ID # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def delete_client_with_http_info(client_id, opts = {}) + def delete_clients_client_id_with_http_info(client_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: OAuthApi#delete_client ..." + @api_client.config.logger.debug "Calling API: OAuthApi#delete_clients_client_id ..." end # verify the required parameter 'client_id' is set - fail "Missing the required parameter 'client_id' when calling delete_client" if client_id.nil? + fail "Missing the required parameter 'client_id' when calling delete_clients_client_id" if client_id.nil? # resource path path = "/api/v1/oauth/clients/{clientId}".sub('{format}','json').sub('{' + 'clientId' + '}', client_id.to_s) # query parameters @@ -1195,37 +1195,37 @@ :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: OAuthApi#delete_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: OAuthApi#delete_clients_client_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Regenerate Client Secret # This operation will set the client secret to a randomly generated cryptographically random value. All clients must be updated with the new secret. This operation should be used with caution. # @param client_id Client ID # @param [Hash] opts the optional parameters # @return [nil] - def create_client_secret(client_id, opts = {}) - create_client_secret_with_http_info(client_id, opts) + def post_clients_client_id_secret(client_id, opts = {}) + post_clients_client_id_secret_with_http_info(client_id, opts) return nil end # Regenerate Client Secret # This operation will set the client secret to a randomly generated cryptographically random value. All clients must be updated with the new secret. This operation should be used with caution. # @param client_id Client ID # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def create_client_secret_with_http_info(client_id, opts = {}) + def post_clients_client_id_secret_with_http_info(client_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug "Calling API: OAuthApi#create_client_secret ..." + @api_client.config.logger.debug "Calling API: OAuthApi#post_clients_client_id_secret ..." end # verify the required parameter 'client_id' is set - fail "Missing the required parameter 'client_id' when calling create_client_secret" if client_id.nil? + fail "Missing the required parameter 'client_id' when calling post_clients_client_id_secret" if client_id.nil? # resource path path = "/api/v1/oauth/clients/{clientId}/secret".sub('{format}','json').sub('{' + 'clientId' + '}', client_id.to_s) # query parameters @@ -1255,10 +1255,10 @@ :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: OAuthApi#create_client_secret\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: OAuthApi#post_clients_client_id_secret\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end