docs: request and response in refund routes (#423)

This commit is contained in:
Sangamesh Kulkarni
2023-01-20 12:57:50 +05:30
committed by GitHub
parent 4b471c7ddf
commit cf88718e69
4 changed files with 112 additions and 1 deletions

View File

@ -82,22 +82,29 @@ pub struct RefundResponse {
pub updated_at: Option<PrimitiveDateTime>,
}
#[derive(Debug, Clone, Eq, PartialEq, Deserialize, Serialize)]
#[derive(Debug, Clone, Eq, PartialEq, Deserialize, Serialize, ToSchema)]
pub struct RefundListRequest {
/// The identifier for the payment
pub payment_id: Option<String>,
/// Limit on the number of objects to return
pub limit: Option<i64>,
/// The time at which refund is created
#[serde(default, with = "custom_serde::iso8601::option")]
pub created: Option<PrimitiveDateTime>,
/// Time less than the refund created time
#[serde(default, rename = "created.lt", with = "custom_serde::iso8601::option")]
pub created_lt: Option<PrimitiveDateTime>,
/// Time greater than the refund created time
#[serde(default, rename = "created.gt", with = "custom_serde::iso8601::option")]
pub created_gt: Option<PrimitiveDateTime>,
/// Time less than or equals to the refund created time
#[serde(
default,
rename = "created.lte",
with = "custom_serde::iso8601::option"
)]
pub created_lte: Option<PrimitiveDateTime>,
/// Time greater than or equals to the refund created time
#[serde(
default,
rename = "created.gte",