Last active
March 14, 2016 15:20
-
-
Save gpolyn/53b8662c79aea9c9e335 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'dwolla_swagger' | |
require 'faker' | |
DwollaSwagger::Swagger.configure do |config| | |
config.host = 'api-uat.dwolla.com' | |
config.access_token = ENV['DWOLLA_UAT_ACCESS_TOKEN'] | |
end | |
firstName = Faker::Name.first_name | |
lastName = Faker::Name.last_name | |
email = firstName + lastName + "@email.com" | |
address = Faker::Address.street_address | |
city = Faker::Address.city | |
state = Faker::Address.state_abbr | |
postalCode = Faker::Address.zip_code | |
body = {:body => { | |
:firstName => firstName, | |
:lastName => lastName, | |
:email => email, | |
:address => address, | |
:city => city, | |
:state => state, | |
:postalCode => postalCode, | |
:dateOfBirth => Faker::Date.birthday().strftime("%F"), | |
:ssn => Faker::Number.number(4) | |
} | |
} | |
@customer = DwollaSwagger::CustomersApi.create(body) | |
p @customer | |
@new_fs = DwollaSwagger::FundingsourcesApi.create_customer_funding_source(@customer, {:body =>{ | |
:routingNumber => "222222226", | |
:accountNumber => "" + Faker::Number.number(9), | |
:type => "checking", | |
:name => firstName + " " + lastName + " - Checking" | |
} | |
}) | |
p @new_fs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "https://rubygems.org" | |
ruby "2.1.2" | |
gem 'dwolla_v2', '~> 0.4' | |
gem 'dwolla_swagger', '~>1.0.0' | |
gem 'faker' | |
gem 'httparty' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment