lib/fattureincloud_ruby_sdk/api/archive_api.rb
# Upload Archive Document Attachment
# Uploads an attachment destined to an archive document. The actual association between the document and the attachment must be implemented separately, using the returned token.
# @param company_id [Integer] The ID of the company.
# @param [Hash] opts the optional parameters
# @option opts [String] :filename Name of the file.
# @option opts [File] :attachment Valid format: .png, .jpg, .gif, .pdf, .zip, .xls, .xlsx, .doc, .docx
# @return [Array<(UploadArchiveAttachmentResponse, Integer, Hash)>] UploadArchiveAttachmentResponse data, response status code and response headers
Upload Archive Document Attachment
Uploads an attachment destined to an archive document. The actual association between the document and the attachment must be implemented separately, using the returned token.
Upload Archive Document Attachment Uploads an attachment destined to an archive document . The actual association between the document and the attachment must be implemented separately using the returned token .
def upload_archive_document_attachment_with_http_info(company_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: ArchiveApi.upload_archive_document_attachment ...'
      end
      if @api_client.config.client_side_validation && company_id.nil?
        fail ArgumentError, "Missing the required parameter 'company_id' when calling ArchiveApi.upload_archive_document_attachment"
      end
      local_var_path = '/c/{company_id}/archive/attachment'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))
      query_params = opts[:query_params] || {}
      header_params = opts[:header_params] || {}
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      content_type = @api_client.select_header_content_type(['multipart/form-data'])
      if !content_type.nil?
        header_params['Content-Type'] = content_type
      end
      form_params = opts[:form_params] || {}
      form_params['filename'] = opts[:'filename'] if !opts[:'filename'].nil?
      form_params['attachment'] = opts[:'attachment'] if !opts[:'attachment'].nil?
      post_body = opts[:debug_body]
      return_type = opts[:debug_return_type] || 'UploadArchiveAttachmentResponse'
      auth_names = opts[:debug_auth_names] || ['OAuth2AuthenticationCodeFlow']
      new_options = opts.merge(
        :operation => :"ArchiveApi.upload_archive_document_attachment",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )
      data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: ArchiveApi#upload_archive_document_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def upload_archive_document_attachment_with_http_info ( company_id , opts = { } ) if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: ArchiveApi.upload_archive_document_attachment ...' end if @api_client . config . client_side_validation && company_id . nil? fail ArgumentError , "Missing the required parameter 'company_id' when calling ArchiveApi.upload_archive_document_attachment" end local_var_path = '/c/{company_id}/archive/attachment' . sub ( '{' + 'company_id' + '}' , CGI . escape ( company_id . to_s ) ) query_params = opts [ :query_params ] || { } header_params = opts [ :header_params ] || { } header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] ) content_type = @api_client . select_header_content_type ( [ 'multipart/form-data' ] ) if ! content_type . nil? header_params [ 'Content-Type' ] = content_type end form_params = opts [ :form_params ] || { } form_params [ 'filename' ] = opts [ :' filename ' ] if ! opts [ :' filename ' ] . nil? form_params [ 'attachment' ] = opts [ :' attachment ' ] if ! opts [ :' attachment ' ] . nil? post_body = opts [ :debug_body ] return_type = opts [ :debug_return_type ] || 'UploadArchiveAttachmentResponse' auth_names = opts [ :debug_auth_names ] || [ 'OAuth2AuthenticationCodeFlow' ] new_options = opts . merge ( :operation => :" ArchiveApi.upload_archive_document_attachment " , :header_params => header_params , :query_params => query_params , :form_params => form_params , :body => post_body , :auth_names => auth_names , :return_type => return_type ) data , status_code , headers = @api_client . call_api ( :POST , local_var_path , new_options ) if @api_client . config . debugging @api_client . config . logger . debug "API called: ArchiveApi#upload_archive_document_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
Upload Archive Document Attachment
Uploads an attachment destined to an archive document.
Upload Archive Document Attachment Uploads an attachment destined to an archive document .
# verify the required parameter 'company_id' is set # resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # HTTP header 'Content-Type' # form parameters # http body (model) # return_type # auth_names
UploadArchiveAttachmentResponse data, response status code and response headers
UploadArchiveAttachmentResponse data response status code and response headers
Array<(UploadArchiveAttachmentResponse, Integer, Hash)>
company_id
The ID of the company.
The ID of the company .
opts
:attachment Valid format: .png, .jpg, .gif, .pdf, .zip, .xls, .xlsx, .doc, .docx
: attachment Valid format : . png . jpg . gif . pdf . zip . xls . xlsx . doc . docx
opts the optional parameters
opts the optional parameters