Skip to content

Commit

Permalink
Fix typo in conversion endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihai Moiseanu committed Feb 29, 2024
1 parent 7adc800 commit 601486d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib/mangopay/instant_conversion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions spec/mangopay/instant_conversion_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 601486d

Please sign in to comment.