Dwolla / dwolla-v2-ruby

Official Ruby Wrapper for Dwolla's API v2
https://developers.dwolla.com/
MIT License
22 stars 17 forks source link

Do not mutate the given URL on token #27

Closed sobrinho closed 7 years ago

sobrinho commented 7 years ago

Fix a problem caused by using the path after calling Dwolla methods.

Before:

(test) DwollaService:0> x = "https://api-sandbox.dwolla.com/funding-sources/secret"
=> "https://api-sandbox.dwolla.com/funding-sources/secret"
(test) DwollaService:0> token.post(x)
=> #<DwollaV2::Response:0x3ff04d241bac>
(test) DwollaService:0> x
=> "/funding-sources/secret"

After:

(test) DwollaService:0> x = "https://api-sandbox.dwolla.com/funding-sources/secret"
=> "https://api-sandbox.dwolla.com/funding-sources/secret"
(test) DwollaService:0> token.post(x)
=> #<DwollaV2::Response:0x3ff04d241bac>
(test) DwollaService:0> x
=> "https://api-sandbox.dwolla.com/funding-sources/secret"