Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add retry method to subscription #155

Merged
merged 2 commits into from
May 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions examples/subscriptions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,6 @@

# Cancel a delayed product change
subscription.cancel_delayed_product_change

# Retry a past-due subscription
subscription.retry
6 changes: 6 additions & 0 deletions lib/chargify_api_ares/resources/subscription.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ def reactivate(params = {})
end
end

def retry
process_capturing_errors do
put :retry
end
end

def reset_balance
process_capturing_errors do
put :reset_balance
Expand Down