Sha256: 96bef8c11f05adcbcc17e3a7cc648a4b0f8a731b87ac9122a51ea26ddff75cb4

Contents?: true

Size: 1.29 KB

Versions: 6

Compression:

Stored size: 1.29 KB

Contents

## 1.0.0 / Nov 19 2013

### Backwards-incompatible changes
* `Chargify::Subscription.charge` now returns an ActiveResource `Charge` object. In the case of an error, the `Charge` object will have `errors`, and you will not have to rescue an HTTP `422`.

* Adds new `Chargify::Migration` and `Chargify::Migration::Preview` resources. These can be used as follows:

```ruby
subscription = Chargify::Subscription.find_by_customer_reference('marky-mark')

# Chargify::Migration
migration = subscription.migrate(:product_handle => "basic-plan")

migration = Chargify::Migration.create(:subscription_id => subscription.id, :product_handle => "basic-plan")

# Chargify::Migration::Preview
preview = Chargify::Migration::Preview.create(:subscription_id => subscription.id, :product_handle => "basic-plan")

preview = Chargify::Migration.preview(:subscription_id => subscription.id, :product_handle => "basic-plan")
```

Error handling looks like:

```ruby
migration = subscription.migrate(:product_handle => "non-existent-plan")
migration.errors.full_messages
# => ["Invalid Product"]

preview = Chargify::Migration.preview(:subscription_id => subscription.id, :product_handle => "non-existent-plan")
preview.errors.full_messages
# => ["Product must be specified"]
```

See `examples/migrations.rb` and specs for more details.

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
chargify_api_ares-1.0.5 HISTORY.md
chargify_api_ares-1.0.4 HISTORY.md
chargify_api_ares-1.0.3 HISTORY.md
chargify_api_ares-1.0.2 HISTORY.md
chargify_api_ares-1.0.1 HISTORY.md
chargify_api_ares-1.0.0 HISTORY.md