chargify/chargify2 — pull request #11 by ryansch (2013-02-20 17:07:25+00:00)
Title: Remove state leakage from resource instances

This removes the following undesired behavior:

```ruby
client = Client.new(valid_client_credentials)
call_resource = CallResource.new(client)
CallResource.read('123')
# => .read is polluted by call_resource instantiation
```

We don't want the instantiation of CallResource instances to pollute the CallResource class. The way it's currently written, the last instantiated instance wins.

I've changed the code so that the class methods use the defaults and the instance methods use the options in the client at instantiation time.

If we want changes in the client to influence previously instantiated instances of any Resource then we'll need to stop caching them as ivars in the Resource instances.