Simple VISA API client.
def deps do
[{:ex_visa, git: "git://github.com/aluuu/ex_visa.git", branch: "master"}]
endssl_config = [cacertfile: path_to_cacert, certfile: path_to_cert, keyfile: path_to_key]
client = ExVisa.Client.new(username, password, ssl: ssl_config)
request = %{destinationCurrencyCode: "978",
sourceCurrencyCode: "643",
sourceAmount: "1"}
response = ExVisa.ForeignExchangeRates.get(request, client)First, you should put proper certificates and key files into test/fixtures directory:
test/fixtures/cacert.pemtest/fixtures/cert.pemtest/fixtures/key.pem
Then you could run tests like:
TEST_VISA_USER=<username> TEST_VISA_PASSWORD=<password> mix test