collab: Update Stripe customer email before checkout (#32669)

Release Notes:

- N/A
This commit is contained in:
Michael Sloan 2025-06-16 19:55:27 -06:00 committed by GitHub
parent 783412fa1d
commit dfa7ed55be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 66 additions and 6 deletions

View file

@ -27,6 +27,11 @@ pub struct CreateCustomerParams<'a> {
pub email: Option<&'a str>,
}
#[derive(Debug)]
pub struct UpdateCustomerParams<'a> {
pub email: Option<&'a str>,
}
#[derive(Debug, PartialEq, Eq, Hash, Clone, derive_more::Display)]
pub struct StripeSubscriptionId(pub Arc<str>);
@ -193,6 +198,12 @@ pub trait StripeClient: Send + Sync {
async fn create_customer(&self, params: CreateCustomerParams<'_>) -> Result<StripeCustomer>;
async fn update_customer(
&self,
customer_id: &StripeCustomerId,
params: UpdateCustomerParams<'_>,
) -> Result<StripeCustomer>;
async fn list_subscriptions_for_customer(
&self,
customer_id: &StripeCustomerId,