=begin #Tripletex API OpenAPI spec version: 2.69.5 Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.4.24 =end require 'uri' module TripletexRubyClient class DocumentArchiveApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # [BETA] Upload file to Account Document Archive. # # @param file The file # @param id Element ID # @param [Hash] opts the optional parameters # @return [ResponseWrapperDocumentArchive] def account_post(file, id, opts = {}) data, _status_code, _headers = account_post_with_http_info(file, id, opts) data end # [BETA] Upload file to Account Document Archive. # # @param file The file # @param id Element ID # @param [Hash] opts the optional parameters # @return [Array<(ResponseWrapperDocumentArchive, Fixnum, Hash)>] ResponseWrapperDocumentArchive data, response status code and response headers def account_post_with_http_info(file, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DocumentArchiveApi.account_post ...' end # verify the required parameter 'file' is set if @api_client.config.client_side_validation && file.nil? fail ArgumentError, "Missing the required parameter 'file' when calling DocumentArchiveApi.account_post" 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 DocumentArchiveApi.account_post" end # resource path local_var_path = '/documentArchive/account/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['file'] = file # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] 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 => 'ResponseWrapperDocumentArchive') if @api_client.config.debugging @api_client.config.logger.debug "API called: DocumentArchiveApi#account_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # [BETA] Upload file to Customer Document Archive. # # @param file The file # @param id Element ID # @param [Hash] opts the optional parameters # @return [ResponseWrapperDocumentArchive] def customer_post(file, id, opts = {}) data, _status_code, _headers = customer_post_with_http_info(file, id, opts) data end # [BETA] Upload file to Customer Document Archive. # # @param file The file # @param id Element ID # @param [Hash] opts the optional parameters # @return [Array<(ResponseWrapperDocumentArchive, Fixnum, Hash)>] ResponseWrapperDocumentArchive data, response status code and response headers def customer_post_with_http_info(file, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DocumentArchiveApi.customer_post ...' end # verify the required parameter 'file' is set if @api_client.config.client_side_validation && file.nil? fail ArgumentError, "Missing the required parameter 'file' when calling DocumentArchiveApi.customer_post" 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 DocumentArchiveApi.customer_post" end # resource path local_var_path = '/documentArchive/customer/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['file'] = file # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] 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 => 'ResponseWrapperDocumentArchive') if @api_client.config.debugging @api_client.config.logger.debug "API called: DocumentArchiveApi#customer_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # [BETA] Delete document archive. # # @param id Element ID # @param [Hash] opts the optional parameters # @return [nil] def delete(id, opts = {}) delete_with_http_info(id, opts) nil end # [BETA] Delete document archive. # # @param id Element ID # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DocumentArchiveApi.delete ...' 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 DocumentArchiveApi.delete" end # resource path local_var_path = '/documentArchive/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] 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: DocumentArchiveApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # [BETA] Upload file to Employee Document Archive. # # @param file The file # @param id Element ID # @param [Hash] opts the optional parameters # @return [ResponseWrapperDocumentArchive] def employee_post(file, id, opts = {}) data, _status_code, _headers = employee_post_with_http_info(file, id, opts) data end # [BETA] Upload file to Employee Document Archive. # # @param file The file # @param id Element ID # @param [Hash] opts the optional parameters # @return [Array<(ResponseWrapperDocumentArchive, Fixnum, Hash)>] ResponseWrapperDocumentArchive data, response status code and response headers def employee_post_with_http_info(file, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DocumentArchiveApi.employee_post ...' end # verify the required parameter 'file' is set if @api_client.config.client_side_validation && file.nil? fail ArgumentError, "Missing the required parameter 'file' when calling DocumentArchiveApi.employee_post" 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 DocumentArchiveApi.employee_post" end # resource path local_var_path = '/documentArchive/employee/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['file'] = file # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] 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 => 'ResponseWrapperDocumentArchive') if @api_client.config.debugging @api_client.config.logger.debug "API called: DocumentArchiveApi#employee_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # [BETA] Find documents archived associated with account object type. # # @param id Element ID # @param [Hash] opts the optional parameters # @option opts [String] :period_date_from From and including # @option opts [String] :period_date_to To and excluding # @option opts [Integer] :from From index (default to 0) # @option opts [Integer] :count Number of elements to return (default to 1000) # @option opts [String] :sorting Sorting pattern # @option opts [String] :fields Fields filter pattern # @return [ListResponseDocumentArchive] def get_account(id, opts = {}) data, _status_code, _headers = get_account_with_http_info(id, opts) data end # [BETA] Find documents archived associated with account object type. # # @param id Element ID # @param [Hash] opts the optional parameters # @option opts [String] :period_date_from From and including # @option opts [String] :period_date_to To and excluding # @option opts [Integer] :from From index # @option opts [Integer] :count Number of elements to return # @option opts [String] :sorting Sorting pattern # @option opts [String] :fields Fields filter pattern # @return [Array<(ListResponseDocumentArchive, Fixnum, Hash)>] ListResponseDocumentArchive data, response status code and response headers def get_account_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DocumentArchiveApi.get_account ...' 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 DocumentArchiveApi.get_account" end # resource path local_var_path = '/documentArchive/account/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'periodDateFrom'] = opts[:'period_date_from'] if !opts[:'period_date_from'].nil? query_params[:'periodDateTo'] = opts[:'period_date_to'] if !opts[:'period_date_to'].nil? query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'sorting'] = opts[:'sorting'] if !opts[:'sorting'].nil? query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil? # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] 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 => 'ListResponseDocumentArchive') if @api_client.config.debugging @api_client.config.logger.debug "API called: DocumentArchiveApi#get_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # [BETA] Find documents archived associated with customer object type. # # @param id Element ID # @param [Hash] opts the optional parameters # @option opts [String] :period_date_from From and including # @option opts [String] :period_date_to To and excluding # @option opts [Integer] :from From index (default to 0) # @option opts [Integer] :count Number of elements to return (default to 1000) # @option opts [String] :sorting Sorting pattern # @option opts [String] :fields Fields filter pattern # @return [ListResponseDocumentArchive] def get_customer(id, opts = {}) data, _status_code, _headers = get_customer_with_http_info(id, opts) data end # [BETA] Find documents archived associated with customer object type. # # @param id Element ID # @param [Hash] opts the optional parameters # @option opts [String] :period_date_from From and including # @option opts [String] :period_date_to To and excluding # @option opts [Integer] :from From index # @option opts [Integer] :count Number of elements to return # @option opts [String] :sorting Sorting pattern # @option opts [String] :fields Fields filter pattern # @return [Array<(ListResponseDocumentArchive, Fixnum, Hash)>] ListResponseDocumentArchive data, response status code and response headers def get_customer_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DocumentArchiveApi.get_customer ...' 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 DocumentArchiveApi.get_customer" end # resource path local_var_path = '/documentArchive/customer/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'periodDateFrom'] = opts[:'period_date_from'] if !opts[:'period_date_from'].nil? query_params[:'periodDateTo'] = opts[:'period_date_to'] if !opts[:'period_date_to'].nil? query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'sorting'] = opts[:'sorting'] if !opts[:'sorting'].nil? query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil? # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] 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 => 'ListResponseDocumentArchive') if @api_client.config.debugging @api_client.config.logger.debug "API called: DocumentArchiveApi#get_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # [BETA] Find documents archived associated with employee object type. # # @param id Element ID # @param [Hash] opts the optional parameters # @option opts [String] :period_date_from From and including # @option opts [String] :period_date_to To and excluding # @option opts [Integer] :from From index (default to 0) # @option opts [Integer] :count Number of elements to return (default to 1000) # @option opts [String] :sorting Sorting pattern # @option opts [String] :fields Fields filter pattern # @return [ListResponseDocumentArchive] def get_employee(id, opts = {}) data, _status_code, _headers = get_employee_with_http_info(id, opts) data end # [BETA] Find documents archived associated with employee object type. # # @param id Element ID # @param [Hash] opts the optional parameters # @option opts [String] :period_date_from From and including # @option opts [String] :period_date_to To and excluding # @option opts [Integer] :from From index # @option opts [Integer] :count Number of elements to return # @option opts [String] :sorting Sorting pattern # @option opts [String] :fields Fields filter pattern # @return [Array<(ListResponseDocumentArchive, Fixnum, Hash)>] ListResponseDocumentArchive data, response status code and response headers def get_employee_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DocumentArchiveApi.get_employee ...' 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 DocumentArchiveApi.get_employee" end # resource path local_var_path = '/documentArchive/employee/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'periodDateFrom'] = opts[:'period_date_from'] if !opts[:'period_date_from'].nil? query_params[:'periodDateTo'] = opts[:'period_date_to'] if !opts[:'period_date_to'].nil? query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'sorting'] = opts[:'sorting'] if !opts[:'sorting'].nil? query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil? # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] 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 => 'ListResponseDocumentArchive') if @api_client.config.debugging @api_client.config.logger.debug "API called: DocumentArchiveApi#get_employee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # [BETA] Find documents archived associated with product object type. # # @param id Element ID # @param [Hash] opts the optional parameters # @option opts [String] :period_date_from From and including # @option opts [String] :period_date_to To and excluding # @option opts [Integer] :from From index (default to 0) # @option opts [Integer] :count Number of elements to return (default to 1000) # @option opts [String] :sorting Sorting pattern # @option opts [String] :fields Fields filter pattern # @return [ListResponseDocumentArchive] def get_product(id, opts = {}) data, _status_code, _headers = get_product_with_http_info(id, opts) data end # [BETA] Find documents archived associated with product object type. # # @param id Element ID # @param [Hash] opts the optional parameters # @option opts [String] :period_date_from From and including # @option opts [String] :period_date_to To and excluding # @option opts [Integer] :from From index # @option opts [Integer] :count Number of elements to return # @option opts [String] :sorting Sorting pattern # @option opts [String] :fields Fields filter pattern # @return [Array<(ListResponseDocumentArchive, Fixnum, Hash)>] ListResponseDocumentArchive data, response status code and response headers def get_product_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DocumentArchiveApi.get_product ...' 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 DocumentArchiveApi.get_product" end # resource path local_var_path = '/documentArchive/product/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'periodDateFrom'] = opts[:'period_date_from'] if !opts[:'period_date_from'].nil? query_params[:'periodDateTo'] = opts[:'period_date_to'] if !opts[:'period_date_to'].nil? query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'sorting'] = opts[:'sorting'] if !opts[:'sorting'].nil? query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil? # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] 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 => 'ListResponseDocumentArchive') if @api_client.config.debugging @api_client.config.logger.debug "API called: DocumentArchiveApi#get_product\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # [BETA] Find documents archived associated with project object type. # # @param id Element ID # @param [Hash] opts the optional parameters # @option opts [String] :period_date_from From and including # @option opts [String] :period_date_to To and excluding # @option opts [Integer] :from From index (default to 0) # @option opts [Integer] :count Number of elements to return (default to 1000) # @option opts [String] :sorting Sorting pattern # @option opts [String] :fields Fields filter pattern # @return [ListResponseDocumentArchive] def get_project(id, opts = {}) data, _status_code, _headers = get_project_with_http_info(id, opts) data end # [BETA] Find documents archived associated with project object type. # # @param id Element ID # @param [Hash] opts the optional parameters # @option opts [String] :period_date_from From and including # @option opts [String] :period_date_to To and excluding # @option opts [Integer] :from From index # @option opts [Integer] :count Number of elements to return # @option opts [String] :sorting Sorting pattern # @option opts [String] :fields Fields filter pattern # @return [Array<(ListResponseDocumentArchive, Fixnum, Hash)>] ListResponseDocumentArchive data, response status code and response headers def get_project_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DocumentArchiveApi.get_project ...' 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 DocumentArchiveApi.get_project" end # resource path local_var_path = '/documentArchive/project/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'periodDateFrom'] = opts[:'period_date_from'] if !opts[:'period_date_from'].nil? query_params[:'periodDateTo'] = opts[:'period_date_to'] if !opts[:'period_date_to'].nil? query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'sorting'] = opts[:'sorting'] if !opts[:'sorting'].nil? query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil? # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] 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 => 'ListResponseDocumentArchive') if @api_client.config.debugging @api_client.config.logger.debug "API called: DocumentArchiveApi#get_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # [BETA] Find documents archived associated with prospect object type. # # @param id Element ID # @param [Hash] opts the optional parameters # @option opts [String] :period_date_from From and including # @option opts [String] :period_date_to To and excluding # @option opts [Integer] :from From index (default to 0) # @option opts [Integer] :count Number of elements to return (default to 1000) # @option opts [String] :sorting Sorting pattern # @option opts [String] :fields Fields filter pattern # @return [ListResponseDocumentArchive] def get_prospect(id, opts = {}) data, _status_code, _headers = get_prospect_with_http_info(id, opts) data end # [BETA] Find documents archived associated with prospect object type. # # @param id Element ID # @param [Hash] opts the optional parameters # @option opts [String] :period_date_from From and including # @option opts [String] :period_date_to To and excluding # @option opts [Integer] :from From index # @option opts [Integer] :count Number of elements to return # @option opts [String] :sorting Sorting pattern # @option opts [String] :fields Fields filter pattern # @return [Array<(ListResponseDocumentArchive, Fixnum, Hash)>] ListResponseDocumentArchive data, response status code and response headers def get_prospect_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DocumentArchiveApi.get_prospect ...' 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 DocumentArchiveApi.get_prospect" end # resource path local_var_path = '/documentArchive/prospect/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'periodDateFrom'] = opts[:'period_date_from'] if !opts[:'period_date_from'].nil? query_params[:'periodDateTo'] = opts[:'period_date_to'] if !opts[:'period_date_to'].nil? query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'sorting'] = opts[:'sorting'] if !opts[:'sorting'].nil? query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil? # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] 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 => 'ListResponseDocumentArchive') if @api_client.config.debugging @api_client.config.logger.debug "API called: DocumentArchiveApi#get_prospect\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # [BETA] Find documents archived associated with supplier object type. # # @param id Element ID # @param [Hash] opts the optional parameters # @option opts [String] :period_date_from From and including # @option opts [String] :period_date_to To and excluding # @option opts [Integer] :from From index (default to 0) # @option opts [Integer] :count Number of elements to return (default to 1000) # @option opts [String] :sorting Sorting pattern # @option opts [String] :fields Fields filter pattern # @return [ListResponseDocumentArchive] def get_supplier(id, opts = {}) data, _status_code, _headers = get_supplier_with_http_info(id, opts) data end # [BETA] Find documents archived associated with supplier object type. # # @param id Element ID # @param [Hash] opts the optional parameters # @option opts [String] :period_date_from From and including # @option opts [String] :period_date_to To and excluding # @option opts [Integer] :from From index # @option opts [Integer] :count Number of elements to return # @option opts [String] :sorting Sorting pattern # @option opts [String] :fields Fields filter pattern # @return [Array<(ListResponseDocumentArchive, Fixnum, Hash)>] ListResponseDocumentArchive data, response status code and response headers def get_supplier_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DocumentArchiveApi.get_supplier ...' 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 DocumentArchiveApi.get_supplier" end # resource path local_var_path = '/documentArchive/supplier/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'periodDateFrom'] = opts[:'period_date_from'] if !opts[:'period_date_from'].nil? query_params[:'periodDateTo'] = opts[:'period_date_to'] if !opts[:'period_date_to'].nil? query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'sorting'] = opts[:'sorting'] if !opts[:'sorting'].nil? query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil? # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] 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 => 'ListResponseDocumentArchive') if @api_client.config.debugging @api_client.config.logger.debug "API called: DocumentArchiveApi#get_supplier\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # [BETA] Upload file to Product Document Archive. # # @param file The file # @param id Element ID # @param [Hash] opts the optional parameters # @return [ResponseWrapperDocumentArchive] def product_post(file, id, opts = {}) data, _status_code, _headers = product_post_with_http_info(file, id, opts) data end # [BETA] Upload file to Product Document Archive. # # @param file The file # @param id Element ID # @param [Hash] opts the optional parameters # @return [Array<(ResponseWrapperDocumentArchive, Fixnum, Hash)>] ResponseWrapperDocumentArchive data, response status code and response headers def product_post_with_http_info(file, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DocumentArchiveApi.product_post ...' end # verify the required parameter 'file' is set if @api_client.config.client_side_validation && file.nil? fail ArgumentError, "Missing the required parameter 'file' when calling DocumentArchiveApi.product_post" 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 DocumentArchiveApi.product_post" end # resource path local_var_path = '/documentArchive/product/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['file'] = file # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] 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 => 'ResponseWrapperDocumentArchive') if @api_client.config.debugging @api_client.config.logger.debug "API called: DocumentArchiveApi#product_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # [BETA] Upload file to Project Document Archive. # # @param file The file # @param id Element ID # @param [Hash] opts the optional parameters # @return [ResponseWrapperDocumentArchive] def project_post(file, id, opts = {}) data, _status_code, _headers = project_post_with_http_info(file, id, opts) data end # [BETA] Upload file to Project Document Archive. # # @param file The file # @param id Element ID # @param [Hash] opts the optional parameters # @return [Array<(ResponseWrapperDocumentArchive, Fixnum, Hash)>] ResponseWrapperDocumentArchive data, response status code and response headers def project_post_with_http_info(file, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DocumentArchiveApi.project_post ...' end # verify the required parameter 'file' is set if @api_client.config.client_side_validation && file.nil? fail ArgumentError, "Missing the required parameter 'file' when calling DocumentArchiveApi.project_post" 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 DocumentArchiveApi.project_post" end # resource path local_var_path = '/documentArchive/project/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['file'] = file # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] 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 => 'ResponseWrapperDocumentArchive') if @api_client.config.debugging @api_client.config.logger.debug "API called: DocumentArchiveApi#project_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # [BETA] Upload file to Prospect Document Archive. # # @param file The file # @param id Element ID # @param [Hash] opts the optional parameters # @return [ResponseWrapperDocumentArchive] def prospect_post(file, id, opts = {}) data, _status_code, _headers = prospect_post_with_http_info(file, id, opts) data end # [BETA] Upload file to Prospect Document Archive. # # @param file The file # @param id Element ID # @param [Hash] opts the optional parameters # @return [Array<(ResponseWrapperDocumentArchive, Fixnum, Hash)>] ResponseWrapperDocumentArchive data, response status code and response headers def prospect_post_with_http_info(file, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DocumentArchiveApi.prospect_post ...' end # verify the required parameter 'file' is set if @api_client.config.client_side_validation && file.nil? fail ArgumentError, "Missing the required parameter 'file' when calling DocumentArchiveApi.prospect_post" 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 DocumentArchiveApi.prospect_post" end # resource path local_var_path = '/documentArchive/prospect/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['file'] = file # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] 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 => 'ResponseWrapperDocumentArchive') if @api_client.config.debugging @api_client.config.logger.debug "API called: DocumentArchiveApi#prospect_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # [BETA] Update document archive. # # @param id Element ID # @param [Hash] opts the optional parameters # @option opts [DocumentArchive] :body Partial object describing what should be updated # @return [ResponseWrapperDocumentArchive] def put(id, opts = {}) data, _status_code, _headers = put_with_http_info(id, opts) data end # [BETA] Update document archive. # # @param id Element ID # @param [Hash] opts the optional parameters # @option opts [DocumentArchive] :body Partial object describing what should be updated # @return [Array<(ResponseWrapperDocumentArchive, Fixnum, Hash)>] ResponseWrapperDocumentArchive data, response status code and response headers def put_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DocumentArchiveApi.put ...' 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 DocumentArchiveApi.put" end # resource path local_var_path = '/documentArchive/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['tokenAuthScheme'] 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 => 'ResponseWrapperDocumentArchive') if @api_client.config.debugging @api_client.config.logger.debug "API called: DocumentArchiveApi#put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # [BETA] Upload a file to the document archive reception. Send as multipart form. # # @param file The file # @param [Hash] opts the optional parameters # @return [ResponseWrapperDocumentArchive] def reception_post(file, opts = {}) data, _status_code, _headers = reception_post_with_http_info(file, opts) data end # [BETA] Upload a file to the document archive reception. Send as multipart form. # # @param file The file # @param [Hash] opts the optional parameters # @return [Array<(ResponseWrapperDocumentArchive, Fixnum, Hash)>] ResponseWrapperDocumentArchive data, response status code and response headers def reception_post_with_http_info(file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DocumentArchiveApi.reception_post ...' end # verify the required parameter 'file' is set if @api_client.config.client_side_validation && file.nil? fail ArgumentError, "Missing the required parameter 'file' when calling DocumentArchiveApi.reception_post" end # resource path local_var_path = '/documentArchive/reception' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['file'] = file # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] 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 => 'ResponseWrapperDocumentArchive') if @api_client.config.debugging @api_client.config.logger.debug "API called: DocumentArchiveApi#reception_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # [BETA] Upload file to Supplier Document Archive. # # @param file The file # @param id Element ID # @param [Hash] opts the optional parameters # @return [ResponseWrapperDocumentArchive] def supplier_post(file, id, opts = {}) data, _status_code, _headers = supplier_post_with_http_info(file, id, opts) data end # [BETA] Upload file to Supplier Document Archive. # # @param file The file # @param id Element ID # @param [Hash] opts the optional parameters # @return [Array<(ResponseWrapperDocumentArchive, Fixnum, Hash)>] ResponseWrapperDocumentArchive data, response status code and response headers def supplier_post_with_http_info(file, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DocumentArchiveApi.supplier_post ...' end # verify the required parameter 'file' is set if @api_client.config.client_side_validation && file.nil? fail ArgumentError, "Missing the required parameter 'file' when calling DocumentArchiveApi.supplier_post" 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 DocumentArchiveApi.supplier_post" end # resource path local_var_path = '/documentArchive/supplier/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['file'] = file # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] 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 => 'ResponseWrapperDocumentArchive') if @api_client.config.debugging @api_client.config.logger.debug "API called: DocumentArchiveApi#supplier_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end