diff --git a/lib/mangopay/instant_conversion.rb b/lib/mangopay/instant_conversion.rb index a437059..67bdda1 100644 --- a/lib/mangopay/instant_conversion.rb +++ b/lib/mangopay/instant_conversion.rb @@ -6,17 +6,17 @@ class InstantConversion < Resource class << self def get_rate(debited_currency, credited_currency, params) - url = "#{MangoPay.api_path}/conversion/rate/#{debited_currency}/#{credited_currency}" + url = "#{MangoPay.api_path}/conversions/rate/#{debited_currency}/#{credited_currency}" MangoPay.request(:get, url, params) end def create(params) - url = "#{MangoPay.api_path}/instant-conversion" + url = "#{MangoPay.api_path}/conversions/instant-conversion" MangoPay.request(:post, url, params) end def get(id, params) - url = "#{MangoPay.api_path}/instant-conversion/#{id}" + url = "#{MangoPay.api_path}/conversions/#{id}" MangoPay.request(:get, url, params) end end diff --git a/spec/mangopay/instant_conversion_spec.rb b/spec/mangopay/instant_conversion_spec.rb index 0daf2f2..7080f94 100644 --- a/spec/mangopay/instant_conversion_spec.rb +++ b/spec/mangopay/instant_conversion_spec.rb @@ -15,7 +15,7 @@ conversion = create_instant_conversion expect(conversion['DebitedFunds']['Amount']).not_to be_nil - expect(conversion['CreditedFunds']['Amount']).not_to be_nil + expect(conversion['CreditedFunds']).not_to be_nil expect(conversion['Status']).equal? 'SUCCEEDED' end end @@ -26,7 +26,7 @@ returned_conversion = get_instant_conversion(conversion['Id']) expect(returned_conversion['DebitedFunds']['Amount']).not_to be_nil - expect(returned_conversion['CreditedFunds']['Amount']).not_to be_nil + expect(returned_conversion['CreditedFunds']).not_to be_nil expect(returned_conversion['Status']).equal? 'SUCCEEDED' end end