lago_types/responses/
customer.rs

1use serde::{Deserialize, Serialize};
2
3use crate::models::{Customer, PaginationMeta};
4
5/// Response for listing customers.
6///
7/// This struct represents the response returned when requesting a list of
8/// customers, including pagination metadata.
9#[derive(Debug, Clone, Serialize, Deserialize)]
10pub struct ListCustomersResponse {
11    pub customers: Vec<Customer>,
12    pub meta: PaginationMeta,
13}
14
15/// Response for retrieving a single customer.
16///
17/// This struct represents the response returned when requesting a specific
18/// customer by their external ID.
19#[derive(Debug, Clone, Serialize, Deserialize)]
20pub struct GetCustomerResponse {
21    pub customer: Customer,
22}
23
24/// Response for creating a customer.
25///
26/// This struct represents the response returned when successfully creating
27/// a new customer.
28#[derive(Debug, Clone, Serialize, Deserialize)]
29pub struct CreateCustomerResponse {
30    pub customer: Customer,
31}