patchfx/fastspring-saasy — pull request #9 by railsmechanic (2013-12-16 13:16:28+00:00)
Title: Added update method for subscription

The ```update!``` method utilizes the Gyoku gem, which is independent from ActiveSupport or other gems depending on Rails. To build the attributes in camelCase, as shown in the [FastSpring API reference](https://github.com/FastSpring/fastspring-api/blob/master/sections/subscriptions.mdown#update-subscription) just use an underscore. So **firstName** becomes **first_name**.

### Example
```ruby
attributes = {
first_name: 'John',
last_name: 'Doe',
company: 'Doe Inc.',
email: 'john.doe@doe.com',
phone_number: '+1 123 456 789',
product_path: '/product',
quantity: 1,
tags: 'tag1, tag2, tag3',
coupon: 'code',
proration: true
}

sub = FastSpring::Subscription.find('reference')
sub.update!(attributes)
```