Allow users to stop a previously scheduled cancelation of their Zed Pro plan (#15562)
Release Notes: - N/A Co-authored-by: Marshall <marshall@zed.dev>
This commit is contained in:
parent
3f1c091b87
commit
1b2d4ee132
5 changed files with 62 additions and 6 deletions
|
@ -14,6 +14,7 @@ pub struct UpdateBillingSubscriptionParams {
|
|||
pub billing_customer_id: ActiveValue<BillingCustomerId>,
|
||||
pub stripe_subscription_id: ActiveValue<String>,
|
||||
pub stripe_subscription_status: ActiveValue<StripeSubscriptionStatus>,
|
||||
pub stripe_cancel_at: ActiveValue<Option<DateTime>>,
|
||||
}
|
||||
|
||||
impl Database {
|
||||
|
@ -49,6 +50,7 @@ impl Database {
|
|||
billing_customer_id: params.billing_customer_id.clone(),
|
||||
stripe_subscription_id: params.stripe_subscription_id.clone(),
|
||||
stripe_subscription_status: params.stripe_subscription_status.clone(),
|
||||
stripe_cancel_at: params.stripe_cancel_at.clone(),
|
||||
..Default::default()
|
||||
})
|
||||
.exec(&*tx)
|
||||
|
|
|
@ -11,6 +11,7 @@ pub struct Model {
|
|||
pub billing_customer_id: BillingCustomerId,
|
||||
pub stripe_subscription_id: String,
|
||||
pub stripe_subscription_status: StripeSubscriptionStatus,
|
||||
pub stripe_cancel_at: Option<DateTime>,
|
||||
pub created_at: DateTime,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue