fix: added created at and modified at keys in PaymentAttemptResponse (#5412)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Vrishab Srivatsa
2024-07-26 13:12:18 +05:30
committed by GitHub
parent 93976db30a
commit 9795397021
3 changed files with 26 additions and 4 deletions

View File

@ -761,9 +761,7 @@ impl HeaderPayload {
}
}
#[derive(
Default, Debug, serde::Serialize, Clone, PartialEq, ToSchema, router_derive::PolymorphicSchema,
)]
#[derive(Debug, serde::Serialize, Clone, PartialEq, ToSchema, router_derive::PolymorphicSchema)]
pub struct PaymentAttemptResponse {
/// Unique identifier for the attempt
pub attempt_id: String,
@ -791,6 +789,14 @@ pub struct PaymentAttemptResponse {
/// The transaction authentication can be set to undergo payer authentication. By default, the authentication will be marked as NO_THREE_DS
#[schema(value_type = Option<AuthenticationType>, example = "no_three_ds", default = "three_ds")]
pub authentication_type: Option<enums::AuthenticationType>,
/// Time at which the payment attempt was created
#[schema(value_type = PrimitiveDateTime, example = "2022-09-10T10:11:12Z")]
#[serde(with = "common_utils::custom_serde::iso8601")]
pub created_at: PrimitiveDateTime,
/// Time at which the payment attempt was last modified
#[schema(value_type = PrimitiveDateTime, example = "2022-09-10T10:11:12Z")]
#[serde(with = "common_utils::custom_serde::iso8601")]
pub modified_at: PrimitiveDateTime,
/// If the payment was cancelled the reason will be provided here
pub cancellation_reason: Option<String>,
/// A unique identifier to link the payment to a mandate, can be use instead of payment_method_data