feat: return customer details in payments response body (#4237)

This commit is contained in:
Hrithikesh
2024-04-01 18:49:55 +05:30
committed by GitHub
parent a843713126
commit 740749e18a
4 changed files with 34 additions and 1 deletions

View File

@ -169,7 +169,7 @@ mod client_secret_tests {
}
}
#[derive(Default, Debug, serde::Deserialize, serde::Serialize, Clone, ToSchema)]
#[derive(Default, Debug, serde::Deserialize, serde::Serialize, Clone, ToSchema, PartialEq)]
pub struct CustomerDetails {
/// The identifier for the customer.
pub id: String,
@ -2935,6 +2935,9 @@ pub struct PaymentsResponse {
#[schema(max_length = 255, example = "cus_y3oqhf46pyzuxjbcn2giaqnb44")]
pub customer_id: Option<String>,
/// Details of customer attached to this payment
pub customer: Option<CustomerDetails>,
/// A description of the payment
#[schema(example = "It's my first payment request")]
pub description: Option<String>,