Skip to content

add pause_collection to subscription document #640

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

Open
wants to merge 2 commits into
base: next
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# UPDATE 2023-10-08:
This project has now being officailly transferred to [Invertase](https://github.com/invertase), who will maintain this extension going forward. Please see [this issue](https://github.com/stripe/stripe-firebase-extensions/issues/524) for more details.
It is now reccomended to uninstall the `stripe/firestore-stripe-payments` extension and install `invertase/firestore-stripe-payments` from the Firebase Extension Hub.
This project has now being officially transferred to [Invertase](https://github.com/invertase), who will maintain this extension going forward. Please see [this issue](https://github.com/stripe/stripe-firebase-extensions/issues/524) for more details.
It is now recommended to uninstall the `stripe/firestore-stripe-payments` extension and install `invertase/firestore-stripe-payments` from the Firebase Extension Hub.

Alternativley, you can also use the following link to convert your current installation to the Invertase version
Alternatively, you can also use the following link to convert your current installation to the Invertase version

`https://console.firebase.google.com/project/_/extensions/install?instanceId=STRIPE_EXTENSION_INSTANCE_ID&ref=invertase%[email protected]`

Expand Down
6 changes: 6 additions & 0 deletions firestore-stripe-payments/functions/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,12 @@ const manageSubscriptionStatusChange = async (
trial_end: subscription.trial_end
? Timestamp.fromMillis(subscription.trial_end * 1000)
: null,
pause_collection: subscription.pause_collection
? {
behavior: subscription.pause_collection.behavior,
resumes_at: Timestamp.fromMillis(subscription.pause_collection.resumes_at * 1000),
}
: null,
};
await subsDbRef.set(subscriptionData);

Expand Down