- Changes Subscription#remove_coupon to use coupon_code instead of code PR 165.
With this change, the currently applied coupon code must be passed for removal to occur.
- Allows canceling a subscription with all supported attributes PR 161
- Note: No changes from 1.4.12, previous release was not officially published
- Adds ability to get ReasonCodes PR 154
- Adds ability to get ReasonCodes PR 154
- Adding Invoice Payment creation [PR 138] (#138) by @carsonreinke
- Allow filtering Invoices by status [PR 139] (#139) by @speric
- Adds ability to find pdfs from invoices, show subscription invoices [PR 135] (#135)
- Adds support for External Payments PR 128
- Force json format for bulk allocations endpoints PR 126 by @ryansch
- Adds
Chargify::Allocations.bulk_create
to work with https://docs.chargify.com/api-allocations#create-multiple-allocations. PR 125 by @ryansch
- Adds
paypal_account
nested attribute to subscription PR 119 by @richmisen
- Reverts custom
load_remote_errors
for Migration API (#118) - Adds a
Chargify::Statement.find_pdf
method (#116)
- Adds support for customer metadata
- Adds duplicate prevention support
- When reconfiguring, the site should recalculate based on new settings
product_change
andcancel_delayed_product_change
added to Subscription resource
- Update metadata / metafield endpoints to work with activeresource 4+
- Added cancellation message option for subscription canceling
- restore 1.8.7 style hash syntax
- Add metafields and metadata
- Remove 'bank_account' attribute from subscription upon save
- Update Gemfile source to https://rubygems.org due to Bundler deprecation
- Update payment_profile on subscriptions to return credit_card or bank_account
Chargify::Subscription
methods no longer raise exception when there is a validation error. Now you must inspect the subscription object for errors. eg:
subscription.reactivate
if subscription.errors.any?
# handle errors
end
-
Chargify::Subscription.charge
now returns an ActiveResourceCharge
object. In the case of an error, theCharge
object will haveerrors
, and you will not have to rescue an HTTP422
. -
Adds new
Chargify::Migration
andChargify::Migration::Preview
resources. These can be used as follows:
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:
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.