lago_types/responses/payment.rs
1use crate::models::{PaginationMeta, Payment};
2use serde::{Deserialize, Serialize};
3
4/// Response containing a list of payments with pagination metadata.
5///
6/// This struct represents the API response for payment listing requests,
7/// including both the payment data and pagination information.
8#[derive(Debug, Clone, Serialize, Deserialize)]
9pub struct ListPaymentsResponse {
10 pub payments: Vec<Payment>,
11 pub meta: PaginationMeta,
12}
13
14/// Response containing a single payment.
15///
16/// This struct represents the API response for retrieving a specific
17/// payment by its identifier.
18#[derive(Debug, Clone, Serialize, Deserialize)]
19pub struct GetPaymentResponse {
20 pub payment: Payment,
21}
22
23/// Response containing a created payment.
24///
25/// This struct represents the API response for creating a payment.
26#[derive(Debug, Clone, Serialize, Deserialize)]
27pub struct CreatePaymentResponse {
28 pub payment: Payment,
29}