lib/braintree/customer.rb in braintree-2.22.0 vs lib/braintree/customer.rb in braintree-2.23.0

- old
+ new

@@ -119,9 +119,14 @@ # See http://www.braintreepayments.com/docs/ruby/transactions/create_from_vault def credit!(transaction_attributes) return_object_or_raise(:transaction) { credit(transaction_attributes) } end + # Returns the default credit card of the customer + def default_credit_card + @credit_cards.find {|credit_card| credit_card.default? } + end + # See http://www.braintreepayments.com/docs/ruby/customers/delete def delete @gateway.customer.delete(id) end