Sha256: df418db01ad28a7e3168a75be5e023e25d8c8142059471aa91ee31aae0674d2c
Contents?: true
Size: 962 Bytes
Versions: 6
Compression:
Stored size: 962 Bytes
Contents
require "spec_helper" describe AdaptivePayments::ConvertCurrencyRequest do it_behaves_like "a RequestEnvelope" subject { AdaptivePayments::ConvertCurrencyRequest } its(:operation) { should == :ConvertCurrency } let(:request) do AdaptivePayments::ConvertCurrencyRequest.new( :currencies => [ { :amount => '14.99', :code => 'USD' }, { :amount => '129.99', :code => 'USD' } ], :convert_to_currencies => ['JPY'], :country_code => 'JP', :conversion_type => 'SENDER_SIDE' ) end let(:json) { JSON.parse(request.to_json) } it "maps #currency.first.amount to ['baseAmountList']['currency'][0]['amount']" do json["baseAmountList"]["currency"][0]["amount"].should == "14.99" end it "maps #currency.first.amount to ['baseAmountList']['currency'][1]['amount']" do json["baseAmountList"]["currency"][1]["amount"].should == "129.99" end end
Version data entries
6 entries across 6 versions & 1 rubygems