Put zip

Method put_zip is used for uploading multiple invoice XML files in zip file.

Return value(s)

This method returns return code as a string.

Authentication

This method requires that you have registered to Maventa and received the API key.

Arguments

  1. API key string (required)
  2. Company ID string (required)
  3. Filename string (required)
  4. File as SOAP attachment (required)

Example code

 1   require 'soap/rpc/driver'
 2   require 'soap/attachment'
 3 
 4   driver = SOAP::RPC::Driver.new('https://trx.maventa.com/', 'files')
 5   driver.add_method('put_zip', 'api_key', 'company_uuid', 'name', 'file', 'vendor_api_key')
 6 
 7   api_key = "" # put here your personal API key.
 8   company_uuid = "" # company UUID
 9   vendor_api_key = "" # vendor API key
10   attachment = SOAP::Attachment.new(File.open(name))
11 
12   puts driver.put_zip(api_key, company_uuid, name, attachment, vendor_api_key)

Also available in: HTML TXT