Skip to main content

lago_types/responses/
plan.rs

1use serde::{Deserialize, Serialize};
2
3use crate::models::{PaginationMeta, Plan};
4
5/// Response for retrieving a single plan.
6#[derive(Debug, Clone, Serialize, Deserialize)]
7pub struct GetPlanResponse {
8    pub plan: Plan,
9}
10
11/// Response for creating a plan.
12#[derive(Debug, Clone, Serialize, Deserialize)]
13pub struct CreatePlanResponse {
14    pub plan: Plan,
15}
16
17/// Response for updating a plan.
18#[derive(Debug, Clone, Serialize, Deserialize)]
19pub struct UpdatePlanResponse {
20    pub plan: Plan,
21}
22
23/// Response for deleting a plan.
24#[derive(Debug, Clone, Serialize, Deserialize)]
25pub struct DeletePlanResponse {
26    pub plan: Plan,
27}
28
29/// Response for listing plans.
30#[derive(Debug, Clone, Serialize, Deserialize)]
31pub struct ListPlansResponse {
32    pub plans: Vec<Plan>,
33    pub meta: PaginationMeta,
34}