Get partner transactions
Method get_partner_transactions is used for downloading partner transaction reports for a certain application.
Return value(s)
This method returns an zip file containing the reports as SOAP attachment.
Authentication
This method requires that you have registered to Maventa and received the API key.
Arguments
- api key string (required)
- vendor api key string (required)
- Report start date string (required)
- Report end date string (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('get_partner_transactions', 'api_key', 'vendor_api_key', 'date_start', 'date_end')
6
7 api_key = "" # put here your personal API key.
8 vendor_api_key = "" # put here api key of the wanted application
9
10 incoming_file = driver.get_partner_transactions(api_key, vendor_api_key, "YYYYMMDD", "YYYYMMDD")
11
12 begin
13 File.open("transactions_#{Date.today}.zip", 'wb') do |f|
14 f << incoming_file.values
15 end
16
17 puts "OK: ZIP RECEIVED SUCCESSFULLY"
18 rescue
19 puts "ERROR: COULD NOT RECEIVE ZIP"
20 end