Skip to content

Commit

Permalink
2.69.1
Browse files Browse the repository at this point in the history
  • Loading branch information
braintreeps committed Dec 2, 2016
1 parent 220d14c commit 5e8ffe5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.rdoc
@@ -1,3 +1,6 @@
== 2.69.1
* Bugfix: Allow PaymentMethod.find(token) to return `UsBankAccount`

== 2.69.0
* Add `default?` support for `UsBankAccount`
* Add `ach_mandate` data to `UsBankAccount` and `UsBankAccountDetails`
Expand Down
2 changes: 2 additions & 0 deletions lib/braintree/payment_method_gateway.rb
Expand Up @@ -58,6 +58,8 @@ def find(token)
PayPalAccount._new(@gateway, response[:paypal_account])
elsif response[:coinbase_account]
SuccessfulResult.new(:payment_method => CoinbaseAccount._new(@gateway, response[:coinbase_account]))
elsif response.has_key?(:us_bank_account)
UsBankAccount._new(@gateway, response[:us_bank_account])
elsif response.has_key?(:europe_bank_account)
EuropeBankAccount._new(@gateway, response[:europe_bank_account])
elsif response.has_key?(:apple_pay_card)
Expand Down
2 changes: 1 addition & 1 deletion lib/braintree/version.rb
Expand Up @@ -2,7 +2,7 @@ module Braintree
module Version
Major = 2
Minor = 69
Tiny = 0
Tiny = 1

String = "#{Major}.#{Minor}.#{Tiny}"
end
Expand Down
2 changes: 2 additions & 0 deletions spec/integration/braintree/payment_method_spec.rb
Expand Up @@ -501,6 +501,8 @@
us_bank_account.default.should == true
us_bank_account.ach_mandate.text.should == "cl mandate text"
us_bank_account.ach_mandate.accepted_at.should be_a Time

Braintree::PaymentMethod.find(us_bank_account.token).should be_a(Braintree::UsBankAccount)
end

it "does not creates a payment method from an invalid us bank account nonce" do
Expand Down

0 comments on commit 5e8ffe5

Please sign in to comment.