mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 17:19:15 +08:00
refactor(router): add updated field to PaymentsResponse (#4292)
Co-authored-by: soumil.sudhir <soumil.sudhir@maximl.com>
This commit is contained in:
@ -3253,6 +3253,11 @@ pub struct PaymentsResponse {
|
||||
/// Payment Method Status
|
||||
#[schema(value_type = Option<PaymentMethodStatus>)]
|
||||
pub payment_method_status: Option<common_enums::PaymentMethodStatus>,
|
||||
|
||||
/// Date time at which payment was updated
|
||||
#[schema(example = "2022-09-10T10:11:12Z")]
|
||||
#[serde(default, with = "common_utils::custom_serde::iso8601::option")]
|
||||
pub updated: Option<PrimitiveDateTime>,
|
||||
}
|
||||
|
||||
#[derive(Setter, Clone, Default, Debug, PartialEq, serde::Serialize, ToSchema)]
|
||||
|
||||
@ -773,6 +773,7 @@ where
|
||||
.set_payment_method_status(payment_data.payment_method_info.map(|info| info.status))
|
||||
.set_customer(customer_details_response.clone())
|
||||
.set_browser_info(payment_attempt.browser_info)
|
||||
.set_updated(Some(payment_intent.modified_at))
|
||||
.to_owned(),
|
||||
headers,
|
||||
))
|
||||
|
||||
@ -14850,6 +14850,13 @@
|
||||
}
|
||||
],
|
||||
"nullable": true
|
||||
},
|
||||
"updated": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"description": "Date time at which payment was updated",
|
||||
"example": "2022-09-10T10:11:12Z",
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user