ghiculescu/pin-payments — pull request #3 by ab9 (2014-11-03 04:03:39+00:00)
Title: Card changes: add "primary" attribute, ignore unknown attributes

Hi! We at @pinpayments recently added a feature to our API: card response objects contain a new member, "primary". @timriley found that our change caused this gem to stop working and told us. (Thanks, Tim.)

Here's a patch that should fix the problem. There are two changes:

* First, this adds a "primary" attribute to Card objects. This should allow ```Card.new(response_data)``` to work again and to store the new information.
* Second, this makes Card#initialize ignore attributes it doesn't understand instead of raising an exception. This allows the code to keep working if we make a similar API change (that is, adding a new member to card response objects) in the future. The Charge, Customer, and Refund classes already do this.

Thanks for making this gem. Let us know if you have any questions.