From e626917d71458628b7f261231429d6eccf5bb802 Mon Sep 17 00:00:00 2001 From: Zack Fu Zi Xiang Date: Sun, 14 Jul 2024 00:49:57 +0800 Subject: [PATCH] chore: add billing cancellation request --- libs/shared-entity/src/dto/billing_dto.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libs/shared-entity/src/dto/billing_dto.rs b/libs/shared-entity/src/dto/billing_dto.rs index 1ce62c49..8a51e16e 100644 --- a/libs/shared-entity/src/dto/billing_dto.rs +++ b/libs/shared-entity/src/dto/billing_dto.rs @@ -106,7 +106,7 @@ pub struct WorkspaceSubscriptionStatus { pub current_period_end: i64, } -#[derive(Serialize, Deserialize)] +#[derive(Serialize, Deserialize, Debug)] pub struct WorkspaceUsageAndLimit { pub member_count: i64, pub member_count_limit: i64, @@ -119,3 +119,10 @@ pub struct WorkspaceUsageAndLimit { pub local_ai: bool, pub ai_responses_unlimited: bool, } + +#[derive(Serialize, Deserialize, Debug)] +pub struct SubscriptionCancelRequest { + pub workspace_id: String, + pub plan: SubscriptionPlan, + pub sync: bool, // if true, this request will block until stripe has sent the cancelation webhook +}