=begin #Web API Swagger specification #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 1.0 Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.3.0-SNAPSHOT =end require "uri" module GroupDocsPlatformCloud class HerokuApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Unsubscribe Heroku User (set payment plan to Free) # # @param id User Id # @param [Hash] opts the optional parameters # @return [File] def heroku_delete_resources(id, opts = {}) data, _status_code, _headers = heroku_delete_resources_with_http_info(id, opts) return data end # Unsubscribe Heroku User (set payment plan to Free) # # @param id User Id # @param [Hash] opts the optional parameters # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers def heroku_delete_resources_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: HerokuApi.heroku_delete_resources ..." end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling HerokuApi.heroku_delete_resources" end # resource path local_var_path = "/heroku/resources/{id}".sub('{' + 'id' + '}', 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 = nil auth_names = [] 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, :return_type => 'File') if @api_client.config.debugging @api_client.config.logger.debug "API called: HerokuApi#heroku_delete_resources\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Provision. Get Heroku User # # @param id # @param [Hash] opts the optional parameters # @return [File] def heroku_get_resources(id, opts = {}) data, _status_code, _headers = heroku_get_resources_with_http_info(id, opts) return data end # Provision. Get Heroku User # # @param id # @param [Hash] opts the optional parameters # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers def heroku_get_resources_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: HerokuApi.heroku_get_resources ..." end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling HerokuApi.heroku_get_resources" end # resource path local_var_path = "/heroku/resources/{id}".sub('{' + 'id' + '}', 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 = nil auth_names = [] 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 => 'File') if @api_client.config.debugging @api_client.config.logger.debug "API called: HerokuApi#heroku_get_resources\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Provision. Create Heroku User # # @param [Hash] opts the optional parameters # @option opts [HerokuRequest] :heroku_request User data from Heroku Add-On # @return [File] def heroku_post_resources(opts = {}) data, _status_code, _headers = heroku_post_resources_with_http_info(opts) return data end # Provision. Create Heroku User # # @param [Hash] opts the optional parameters # @option opts [HerokuRequest] :heroku_request User data from Heroku Add-On # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers def heroku_post_resources_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: HerokuApi.heroku_post_resources ..." end # resource path local_var_path = "/heroku/resources" # 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(['multipart/form-data']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'heroku_request']) auth_names = [] 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 => 'File') if @api_client.config.debugging @api_client.config.logger.debug "API called: HerokuApi#heroku_post_resources\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update Heroku User Payment Plan # # @param id User Id # @param [Hash] opts the optional parameters # @option opts [HerokuRequest] :heroku_request User data from Heroku Add-On # @return [File] def heroku_put_resources(id, opts = {}) data, _status_code, _headers = heroku_put_resources_with_http_info(id, opts) return data end # Update Heroku User Payment Plan # # @param id User Id # @param [Hash] opts the optional parameters # @option opts [HerokuRequest] :heroku_request User data from Heroku Add-On # @return [Array<(File, Fixnum, Hash)>] File data, response status code and response headers def heroku_put_resources_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: HerokuApi.heroku_put_resources ..." end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling HerokuApi.heroku_put_resources" end # resource path local_var_path = "/heroku/resources/{id}".sub('{' + 'id' + '}', 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(['multipart/form-data']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'heroku_request']) auth_names = [] 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 => 'File') if @api_client.config.debugging @api_client.config.logger.debug "API called: HerokuApi#heroku_put_resources\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end