chore: add billing cancellation request

This commit is contained in:
Zack Fu Zi Xiang 2024-07-14 00:49:57 +08:00
parent 4d9108643b
commit e626917d71
No known key found for this signature in database
1 changed files with 8 additions and 1 deletions

View File

@ -106,7 +106,7 @@ pub struct WorkspaceSubscriptionStatus {
pub current_period_end: i64, pub current_period_end: i64,
} }
#[derive(Serialize, Deserialize)] #[derive(Serialize, Deserialize, Debug)]
pub struct WorkspaceUsageAndLimit { pub struct WorkspaceUsageAndLimit {
pub member_count: i64, pub member_count: i64,
pub member_count_limit: i64, pub member_count_limit: i64,
@ -119,3 +119,10 @@ pub struct WorkspaceUsageAndLimit {
pub local_ai: bool, pub local_ai: bool,
pub ai_responses_unlimited: 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
}