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
- API key string (required)
- Company ID string (required)
- Filename string (required)
- 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)