lib/purecloud/api/o_auth_api.rb in purecloud-0.44.1 vs lib/purecloud/api/o_auth_api.rb in purecloud-0.45.1

- old
+ new

@@ -198,28 +198,31 @@ return data, status_code, headers 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 'CODE' 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 'TOKEN' 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 'CLIENT-CREDENTIALS' grant may be used. In this case the client must be granted roles \nvia the 'roleIds' field. + # @param body Client # @param [Hash] opts the optional parameters - # @option opts [OAuthClient] :body Client # @return [OAuthClient] - def post_clients(opts = {}) - data, status_code, headers = post_clients_with_http_info(opts) + def post_clients(body, opts = {}) + data, status_code, headers = post_clients_with_http_info(body, 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 body Client # @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 post_clients_with_http_info(opts = {}) + def post_clients_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: OAuthApi#post_clients ..." end + # verify the required parameter 'body' is set + fail "Missing the required parameter 'body' when calling post_clients" if body.nil? + # resource path local_var_path = "/api/v2/oauth/clients".sub('{format}','json') # query parameters query_params = {} @@ -237,11 +240,11 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + 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, @@ -315,32 +318,35 @@ end # Update OAuth Client # # @param client_id Client ID + # @param body Client # @param [Hash] opts the optional parameters - # @option opts [OAuthClient] :body Client # @return [OAuthClient] - def put_clients_client_id(client_id, opts = {}) - data, status_code, headers = put_clients_client_id_with_http_info(client_id, opts) + def put_clients_client_id(client_id, body, opts = {}) + data, status_code, headers = put_clients_client_id_with_http_info(client_id, body, opts) return data end # Update OAuth Client # # @param client_id Client ID + # @param body Client # @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 put_clients_client_id_with_http_info(client_id, opts = {}) + def put_clients_client_id_with_http_info(client_id, body, opts = {}) if @api_client.config.debugging @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 put_clients_client_id" if client_id.nil? + # verify the required parameter 'body' is set + fail "Missing the required parameter 'body' when calling put_clients_client_id" if body.nil? + # resource path local_var_path = "/api/v2/oauth/clients/{clientId}".sub('{format}','json').sub('{' + 'clientId' + '}', client_id.to_s) # query parameters query_params = {} @@ -358,10 +364,10 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(opts[:'body']) + 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,