Country list

Method country_list is used to get list of countries that can be used in your application. List contains abbreviation and common name for countries.

Return value(s)

This method returns an array that contains return string and an array of CountryParamsOut hash tables.

Authentication

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

Arguments

  1. api_keys (required)

Example code

 1 require 'soap/wsdlDriver'
 2 
 3 serv = SOAP::WSDLDriverFactory.new("https://secure.maventa.com/api/wsdl").create_rpc_driver
 4 
 5 begin 
 6   api_keys = Hash.new
 7   api_keys[:vendor_api_key] = "" # If you are software vendor, you shall put here API-key for this application
 8   api_keys[:user_api_key] = "" # Put here your API key
 9 
10   # List countries
11   results = serv.country_list(api_keys)
12 
13   if results[0] == "OK" 
14     results[1].each do |result|
15       # Country code
16       puts result.code
17       # Country name
18       puts result.name
19     end
20   end
21 end

Also available in: HTML TXT