This allows for creation of a credit card with a customer using nested forms.
When using the Braintree gem, a user can create a customer and credit card in one call by using nested attributes. This extends that ability to this gem by adding the credit_card attribute to the Customer model.
This allows for creation of a credit card with a customer using nested forms.
When using the Braintree gem, a user can create a customer and credit card in one call by using nested attributes. This extends that ability to this gem by adding the credit_card attribute to the Customer model.
Thus:
BraintreeRails::Customer.new(email: "user@example.com", credit_card: { number: "5105105105105100", expiration_date: "11/2013" })
Creates a customer with an associated card.
Also works to update, either adding a card or updating existing card.
No tests written, yet, but can be if this is something you want to merge.
Thanks for the gem!