Open blakeprudhomme opened 6 years ago
@blakeprudhomme I needed this too, and was able to achieve it by using built-in behavior in Rails ActiveResource. Just add the following code to your Chargify initializer.
# config/initializers/chargify.rb
module Chargify
class Subscription < Base
def override(fields)
put(:override, subscription: fields)
end
end
end
Then you can use this new override
method as you intended:
subscription = Chargify::Subscription.find('1234567')
subscription.override(activated_at: '2018-05-25')
Denis
@denisahearn Thanks for this work around!
API Reference https://reference.chargify.com/v1/subscriptions-override
Preferably with a method on the subscription object: