collab: Update Stripe customer email before checkout (#32669)
Release Notes: - N/A
This commit is contained in:
parent
783412fa1d
commit
dfa7ed55be
6 changed files with 66 additions and 6 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue