recurly/recurly-client-php — pull request #39 by kainosnoema (2012-06-25 20:50:12+00:00)
Title: Fix updating currency lists on loaded resources, such as plans

Fixes an issue where updating a specific currency on a previously loaded resource wouldn't take affect. Because the currency list is neither an array nor updates the unsavedAttrs array on the parent, it wasn't being persisted. This checks if the attr in question is either an array or implements ArrayAccess, in which case it's persisted automatically.

Also, setter access of currencies is now supported:

``` php
$plan = Recurly_Plan::get('small');
$plan->unit_amount_in_cents->USD = 1000; // USD 10.00 monthly fee
$plan->setup_fee_in_cents->USD = 5000; // USD 50.00 setup fee
$plan->update();
```