Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Update documentation for reconciling stripe customer subscriptions #841

Conversation

Willardgmoore
Copy link
Contributor

Update documentation for reconciling stripe customer subscriptions

If you prefer to update the documentation, choose this PR.
If you prefer to make the original method call available, choose this other one.

@@ -56,7 +56,7 @@ end
### Backfilling subscriptions and charges for reconciled customers
When `Pay::Customer`s are created using `Model.set_payment_processor` or `Model.add_payment_processor`, existing Stripe subscriptions and charges are not automatically backfilled.

To backfill active subscriptions and the charges associated with those subscriptions, the `Pay::Customer.sync_subscriptions` method can be used. To backfill all subscriptions including canceled subscriptions, the `status: "all"` parameter can be provided (e.g. `Pay::Customer.sync_subscriptions(status: "all")`).
To backfill active subscriptions and the charges associated with those subscriptions, the `Pay::Stripe::Billable.new(pay_customer).sync_subscriptions` method can be used. To backfill all subscriptions including canceled subscriptions, the `status: "all"` parameter can be provided (e.g. `Pay::Stripe::Billable.new(pay_customer).sync_subscriptions(status: "all")`).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be @user.payment_processor.sync_subscriptions

When I originally wrote it, I was trying to show that #sync_subscriptions is a method on the Pay::Customer object, but this is what the actual code would look like.

We don't want people reaching into Pay::Stripe::Billable because it isn't really an official interface and is subject to change.

@excid3 excid3 merged commit 393ac0e into pay-rails:master Aug 21, 2023
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants