Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method name clash for Funding Source #26

Closed
madAle opened this issue Jun 16, 2017 · 1 comment
Closed

Method name clash for Funding Source #26

madAle opened this issue Jun 16, 2017 · 1 comment

Comments

@madAle
Copy link

madAle commented Jun 16, 2017

Hi,

when retrieving a customer's Funding Source the "status" attribute/method clashes with Response#status (HTTP status code) and the latter is returned instead of Funding Source status (e.g "verified").

From API doc:

funding_source_url = 'https://api-sandbox.dwolla.com/funding-sources/692486f8-29f6-4516-a6a5-c69fd2ce854c'

# Using DwollaV2 - https://github.com/Dwolla/dwolla-v2-ruby (Recommended)
funding_source = app_token.get funding_source_url
funding_source.name # => "Test checking account"

funding_source.status # => 200 instead of, for example "verified"

I dug a bit the code, but I didn't find an easy solution that does not interfere with the rest of the SDK...

Knowing the issue, a workaround to get Funding Source's status may be something like this:

require 'json'

fs_data = JSON.load funding_source.to_json
fs_status = fs_data["status"]  # =>  "verified"
@sausman
Copy link
Contributor

sausman commented Aug 16, 2017

Hey @madAle,

Thanks for letting us know. This conflict was resolved in #20 (version 2.0) by adding the #response_status and #response_headers methods to DwollaV2::Response.

@sausman sausman closed this as completed Aug 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants