jaymedavis/stripe.net — pull request #175 by richardlawley (2014-05-31 11:36:41+00:00)
Title: Expandable properties

Ok, I think this addresses all points and pretty much finishes #161. In summary:

* ApplyAllParameters modified to take service, accept null options class, and take flag for IsListMethod
* Services given a base class to make calling ApplyAllParameters easier (extension method)
* All method calls updated to remove your ApplyExpandableProperties and use the updated ApplyAllParameters syntax
* Entities given a base class (StripeObject) in order that the Id property can be easily assigned on an expanded property
* Logic behind expanded property mapping moved to utility method so it can be compile-time checked (duplicated logic in previous version could've gained errors when someone added a property and incorrectly copied + pasted)
* Missing expanded properties added (some properties like BalanceTransaction on StripeCharge did not previously exist, and you'd added Charge on StripeApplicationFee in this fork which does not exist).
* Unit tests changed to expect Id to be populated when expanded object was supplied

There are only tests on expandable properties in the Charges and Customers services. Others could be added, but there are some (e.g. disputes) which aren't testable.

The one thing I've thought of is that Delete methods should never have expand set (they don't return objects), but there is nothing enforcing this other than NOT calling ApplyAllParameters in them.