lib/smooch-api/api/app_api.rb in smooch-api-1.2.0 vs lib/smooch-api/api/app_api.rb in smooch-api-1.3.0

- old
+ new

@@ -1,11 +1,11 @@ =begin #Smooch #The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io). -OpenAPI spec version: 1.2 +OpenAPI spec version: 1.3 Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.2.3-SNAPSHOT =end @@ -531,9 +531,70 @@ :body => post_body, :auth_names => auth_names, :return_type => 'ListSecretKeysResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AppApi#list_secret_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + + # + # Update the specified app. + # @param app_id Identifies the app. + # @param app_update_body Body for an updateApp request. + # @param [Hash] opts the optional parameters + # @return [AppResponse] + def update_app(app_id, app_update_body, opts = {}) + data, _status_code, _headers = update_app_with_http_info(app_id, app_update_body, opts) + return data + end + + # + # Update the specified app. + # @param app_id Identifies the app. + # @param app_update_body Body for an updateApp request. + # @param [Hash] opts the optional parameters + # @return [Array<(AppResponse, Fixnum, Hash)>] AppResponse data, response status code and response headers + def update_app_with_http_info(app_id, app_update_body, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug "Calling API: AppApi.update_app ..." + end + # verify the required parameter 'app_id' is set + if @api_client.config.client_side_validation && app_id.nil? + fail ArgumentError, "Missing the required parameter 'app_id' when calling AppApi.update_app" + end + # verify the required parameter 'app_update_body' is set + if @api_client.config.client_side_validation && app_update_body.nil? + fail ArgumentError, "Missing the required parameter 'app_update_body' when calling AppApi.update_app" + end + # resource path + local_var_path = "/apps/{appId}".sub('{' + 'appId' + '}', app_id.to_s) + + # query parameters + query_params = {} + + # header parameters + header_params = {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + + # form parameters + form_params = {} + + # http body (model) + post_body = @api_client.object_to_http_body(app_update_body) + auth_names = ['jwt'] + 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 => 'AppResponse') + if @api_client.config.debugging + @api_client.config.logger.debug "API called: AppApi#update_app\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end