=begin #Hydrogen Nucleus API #The Hydrogen Nucleus API OpenAPI spec version: 1.9.4 Contact: info@hydrogenplatform.com Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.4.19 =end require 'uri' module NucleusApi class FinancialStatementApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Create an financialStatement # Store stats pulled from financialStatement vendors. # @param financial_statement financialStatement # @param [Hash] opts the optional parameters # @return [FinancialStatement] def create_financial_statement_using_post(financial_statement, opts = {}) data, _status_code, _headers = create_financial_statement_using_post_with_http_info(financial_statement, opts) data end # Create an financialStatement # Store stats pulled from financialStatement vendors. # @param financial_statement financialStatement # @param [Hash] opts the optional parameters # @return [Array<(FinancialStatement, Fixnum, Hash)>] FinancialStatement data, response status code and response headers def create_financial_statement_using_post_with_http_info(financial_statement, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FinancialStatementApi.create_financial_statement_using_post ...' end # verify the required parameter 'financial_statement' is set if @api_client.config.client_side_validation && financial_statement.nil? fail ArgumentError, "Missing the required parameter 'financial_statement' when calling FinancialStatementApi.create_financial_statement_using_post" end # resource path local_var_path = '/nucleus/v1/financial_statement' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # 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(financial_statement) auth_names = ['oauth2'] 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 => 'FinancialStatement') if @api_client.config.debugging @api_client.config.logger.debug "API called: FinancialStatementApi#create_financial_statement_using_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete an financialStatement # Permanently delete an financialStatement. # @param financial_statement_id UUID financialStatement_id # @param [Hash] opts the optional parameters # @return [nil] def delete_financial_statement_using_delete(financial_statement_id, opts = {}) delete_financial_statement_using_delete_with_http_info(financial_statement_id, opts) nil end # Delete an financialStatement # Permanently delete an financialStatement. # @param financial_statement_id UUID financialStatement_id # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_financial_statement_using_delete_with_http_info(financial_statement_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FinancialStatementApi.delete_financial_statement_using_delete ...' end # verify the required parameter 'financial_statement_id' is set if @api_client.config.client_side_validation && financial_statement_id.nil? fail ArgumentError, "Missing the required parameter 'financial_statement_id' when calling FinancialStatementApi.delete_financial_statement_using_delete" end # resource path local_var_path = '/nucleus/v1/financial_statement/{financial_statement_id}'.sub('{' + 'financial_statement_id' + '}', financial_statement_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth2'] 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: FinancialStatementApi#delete_financial_statement_using_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # List all financialStatement # Get information for all financialStatement for all clients defined for your firm. # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :ascending ascending (default to false) # @option opts [String] :currency_conversion currency_conversion # @option opts [String] :filter filter # @option opts [String] :order_by order_by (default to update_date) # @option opts [Integer] :page page (default to 0) # @option opts [Integer] :size size (default to 25) # @return [PageFinancialStatement] def get_financial_statement_all_using_get(opts = {}) data, _status_code, _headers = get_financial_statement_all_using_get_with_http_info(opts) data end # List all financialStatement # Get information for all financialStatement for all clients defined for your firm. # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :ascending ascending # @option opts [String] :currency_conversion currency_conversion # @option opts [String] :filter filter # @option opts [String] :order_by order_by # @option opts [Integer] :page page # @option opts [Integer] :size size # @return [Array<(PageFinancialStatement, Fixnum, Hash)>] PageFinancialStatement data, response status code and response headers def get_financial_statement_all_using_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FinancialStatementApi.get_financial_statement_all_using_get ...' end # resource path local_var_path = '/nucleus/v1/financial_statement' # query parameters query_params = {} query_params[:'ascending'] = opts[:'ascending'] if !opts[:'ascending'].nil? query_params[:'currency_conversion'] = opts[:'currency_conversion'] if !opts[:'currency_conversion'].nil? query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth2'] 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 => 'PageFinancialStatement') if @api_client.config.debugging @api_client.config.logger.debug "API called: FinancialStatementApi#get_financial_statement_all_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Retrieve an financialStatement # Retrieve the information for a specific financialStatement associated with a client. # @param financial_statement_id UUID financial_statement_id # @param [Hash] opts the optional parameters # @option opts [String] :currency_conversion USD # @return [FinancialStatement] def get_financial_statement_using_get(financial_statement_id, opts = {}) data, _status_code, _headers = get_financial_statement_using_get_with_http_info(financial_statement_id, opts) data end # Retrieve an financialStatement # Retrieve the information for a specific financialStatement associated with a client. # @param financial_statement_id UUID financial_statement_id # @param [Hash] opts the optional parameters # @option opts [String] :currency_conversion USD # @return [Array<(FinancialStatement, Fixnum, Hash)>] FinancialStatement data, response status code and response headers def get_financial_statement_using_get_with_http_info(financial_statement_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FinancialStatementApi.get_financial_statement_using_get ...' end # verify the required parameter 'financial_statement_id' is set if @api_client.config.client_side_validation && financial_statement_id.nil? fail ArgumentError, "Missing the required parameter 'financial_statement_id' when calling FinancialStatementApi.get_financial_statement_using_get" end # resource path local_var_path = '/nucleus/v1/financial_statement/{financial_statement_id}'.sub('{' + 'financial_statement_id' + '}', financial_statement_id.to_s) # query parameters query_params = {} query_params[:'currency_conversion'] = opts[:'currency_conversion'] if !opts[:'currency_conversion'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth2'] 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 => 'FinancialStatement') if @api_client.config.debugging @api_client.config.logger.debug "API called: FinancialStatementApi#get_financial_statement_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update an financialStatement # Update the information for an financialStatement. # @param financial_statement financialStatement # @param financial_statement_id UUID financialStatement_id # @param [Hash] opts the optional parameters # @return [FinancialStatement] def update_financial_statement_using_put(financial_statement, financial_statement_id, opts = {}) data, _status_code, _headers = update_financial_statement_using_put_with_http_info(financial_statement, financial_statement_id, opts) data end # Update an financialStatement # Update the information for an financialStatement. # @param financial_statement financialStatement # @param financial_statement_id UUID financialStatement_id # @param [Hash] opts the optional parameters # @return [Array<(FinancialStatement, Fixnum, Hash)>] FinancialStatement data, response status code and response headers def update_financial_statement_using_put_with_http_info(financial_statement, financial_statement_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: FinancialStatementApi.update_financial_statement_using_put ...' end # verify the required parameter 'financial_statement' is set if @api_client.config.client_side_validation && financial_statement.nil? fail ArgumentError, "Missing the required parameter 'financial_statement' when calling FinancialStatementApi.update_financial_statement_using_put" end # verify the required parameter 'financial_statement_id' is set if @api_client.config.client_side_validation && financial_statement_id.nil? fail ArgumentError, "Missing the required parameter 'financial_statement_id' when calling FinancialStatementApi.update_financial_statement_using_put" end # resource path local_var_path = '/nucleus/v1/financial_statement/{financial_statement_id}'.sub('{' + 'financial_statement_id' + '}', financial_statement_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['*/*']) # 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(financial_statement) auth_names = ['oauth2'] 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 => 'FinancialStatement') if @api_client.config.debugging @api_client.config.logger.debug "API called: FinancialStatementApi#update_financial_statement_using_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end