Comments (4)
Hey @Siraris,
Thanks for letting us know about this. I'm not quite sure what's going on either. Would you be able to provide a script I can run that reproduces the issue?
from dwolla-v2-ruby.
This should be all that you need to reproduce the issue. If you just place test strings for all the business_params (I was doing it without setting a controller, so setting "soleProprietorship", and then just using a the authenticated client. Client.post is just:
def post(endpoint, params = {}) authenticated_client.post endpoint, params end
if this is helpful, here's the test data I was using:
{:firstName=>"Kendrick", :lastName=>"Lamar", :email=>"[email protected]", :type=>"business", :address1=>"1917 N Elston", :city=>"Chicago", :state=>"IL", :postalCode=>"60642", :businessName=>"Test Company", :businessType=>"soleProprietorship", :businessClassification=>"9ed3cf5f-7d6f-11e3-8af8-5404a6144203", :ein=>"12-3456789"}
from dwolla-v2-ruby.
Thanks @Siraris,
Here's what I'm getting when I run this script:
Script
require 'dwolla_v2'
client = DwollaV2::Client.new(id: "MY_CLIENT_ID", secret: "MY_CLIENT_SECRET") {|c| c.environment :sandbox }
token = client.auths.client
token.post("customers", {
:firstName => "Kendrick",
:lastName => "Lamar",
:email => "[email protected]",
:type => "business",
:address1 => "1917 N Elston",
:city => "Chicago",
:state => "IL",
:postalCode => "60642",
:businessName => "Test Company",
:businessType => "soleProprietorship",
:businessClassification => "9ed3cf5f-7d6f-11e3-8af8-5404a6144203",
:ein => "12-3456789"
})
Result
/Users/sausman/git/dwolla-v2-ruby/lib/dwolla_v2/middleware/handle_errors.rb:9:in `block in call': {"code"=>"ValidationError", "message"=>"Validation error(s) present. See embedded errors list for more details.", "_embedded"=>{"errors"=>[{"code"=>"InvalidFormat", "message"=>"BusinessClassification invalid.", "path"=>"/businessClassification", "_links"=>{}}, {"code"=>"Required", "message"=>"DateOfBirth required.", "path"=>"/dateOfBirth", "_links"=>{}}, {"code"=>"Required", "message"=>"Ssn required.", "path"=>"/ssn", "_links"=>{}}]}} (DwollaV2::ValidationError)
from /Users/sausman/.rvm/gems/ruby-2.4.0/gems/faraday-0.13.1/lib/faraday/response.rb:61:in `on_complete'
from /Users/sausman/git/dwolla-v2-ruby/lib/dwolla_v2/middleware/handle_errors.rb:8:in `call'
from /Users/sausman/git/dwolla-v2-ruby/lib/dwolla_v2/middleware/set_user_agent.rb:13:in `call'
from /Users/sausman/.rvm/gems/ruby-2.4.0/gems/faraday_middleware-0.12.2/lib/faraday_middleware/request/encode_json.rb:24:in `call'
from /Users/sausman/.rvm/gems/ruby-2.4.0/gems/faraday-0.13.1/lib/faraday/request/multipart.rb:15:in `call'
from /Users/sausman/.rvm/gems/ruby-2.4.0/gems/faraday-0.13.1/lib/faraday/rack_builder.rb:141:in `build_response'
from /Users/sausman/.rvm/gems/ruby-2.4.0/gems/faraday-0.13.1/lib/faraday/connection.rb:387:in `run_request'
from /Users/sausman/.rvm/gems/ruby-2.4.0/gems/faraday-0.13.1/lib/faraday/connection.rb:174:in `post'
from /Users/sausman/git/dwolla-v2-ruby/lib/dwolla_v2/token.rb:42:in `public_send'
from /Users/sausman/git/dwolla-v2-ruby/lib/dwolla_v2/token.rb:42:in `block (2 levels) in <class:Token>'
from foo.rb:6:in `<main>'
Does that script give you the same thing?
from dwolla-v2-ruby.
Hey @sausman
That's my bad, it looks as if the error was being swallowed and is actually coming from us. Thanks again so much for being so quick to get to this.
from dwolla-v2-ruby.
Related Issues (20)
- Faraday Response Middleware - response details missing
- Make Dwolla Client Initialization Arguments Coherent HOT 2
- Add middleware to help with debugging requests
- DateOfBirth value not allowed HOT 2
- error handling in rails
- Method name clash for Funding Source HOT 1
- get customers by email HOT 2
- Converting camel/kebab case to snake case and vice versa
- Conflict with specifying custom middleware HOT 2
- Generating IAV token generates odd number of arguments error HOT 7
- DwollaV2::Response incompatible with awesome_print
- Parse iso8601 values when deserializing response
- Open to PR creating a links method set HOT 1
- Issue with $dwolla.get function and search customer with multiple statuses HOT 1
- Deprecation warning with Faraday v1
- Gem dependencies out of day HOT 4
- Ruby 3.2+ Keywords Error In Lib/Client.rb HOT 5
- testing with rspec
- github.com/Dwolla/dwolla-v2-ruby/tree/44bea580123ad914b184e54c65f80d05600d3d3d#usage doesn't give correct scopes in uat HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dwolla-v2-ruby.