recurly/recurly-client-python — pull request #90 by cbarton (2014-10-30 22:38:29+00:00)
Title: Create resources based on the element if no href links to the object

cc/ @bhelx

When previewing a subscription change, the invoice is passed back in the body of the response with an `href` of `""`. If this is the case, we can materialize the `Invoice` from those attributes instead of following a nonexistent link.

tests:

```python
sub = recurly.Subscription.get('')
sub.quantity =
sub.preview()
for li in sub.invoice.line_items:
print "line item: %s" % li
```