Support subdomain configuration

Configuring the client by subdomain is required from now.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Merge pull request #1 from recurly/route-api-by-subdomain

Support subdomain configuration
update broken link in README
use https for github repo link in README
Properly instantiate subscription add-ons

Subscription add-ons were being memoized improperly and were using Money
objects (instead of integers). By memoizing in the attributes hash and
ensuring that integers are used, the XML will properly generate.

This fixes #85.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Fix module scoping issue

By dynamically setting constants when scopes or associations were
created, it was causing more trouble than it was worth, especially when
libraries were available that defined the same constant name in a global
scope.

This fixes #76.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Don't set subscription add-ons to an array

This causes a problem in XML serialization.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Because `ruby -recurly`

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Remove superfluous setter

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
pending_subscription should return a Subscription

This fixes #83.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Expose transaction errors on transaction

This fixes #79.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Surface Transaction::Error#transaction_error_code

This fixes #73.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Only build master and v2-stable

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Fix Nokogiri interpretation of empty nodes

Nokogiri::Element returns the number of nodes when you call
children#each, leading to text returning 0 if there are none. Instead,
let's join the texts together and return that ("" instead in that last
case).

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Only reject procs on marshal dump

Pagers can be marshalled.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Update year

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
Add errors class

Rails 3.0 requires that errors.respond_to? :full_messages to render
properly in a form_for.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>
2.1.6: invoice coupon redemption support, bug fixes

Bug fixes relate to subscription add-ons and invoice PDFs.

Signed-off-by: Stephen Celis <stephen@stephencelis.com>