mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 01:27:31 +08:00
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:
@ -13477,7 +13477,9 @@
|
|||||||
"required": [
|
"required": [
|
||||||
"attempt_id",
|
"attempt_id",
|
||||||
"status",
|
"status",
|
||||||
"amount"
|
"amount",
|
||||||
|
"created_at",
|
||||||
|
"modified_at"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"attempt_id": {
|
"attempt_id": {
|
||||||
@ -13541,6 +13543,18 @@
|
|||||||
"default": "three_ds",
|
"default": "three_ds",
|
||||||
"nullable": true
|
"nullable": true
|
||||||
},
|
},
|
||||||
|
"created_at": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time",
|
||||||
|
"description": "Time at which the payment attempt was created",
|
||||||
|
"example": "2022-09-10T10:11:12Z"
|
||||||
|
},
|
||||||
|
"modified_at": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "date-time",
|
||||||
|
"description": "Time at which the payment attempt was last modified",
|
||||||
|
"example": "2022-09-10T10:11:12Z"
|
||||||
|
},
|
||||||
"cancellation_reason": {
|
"cancellation_reason": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "If the payment was cancelled the reason will be provided here",
|
"description": "If the payment was cancelled the reason will be provided here",
|
||||||
|
|||||||
@ -761,9 +761,7 @@ impl HeaderPayload {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(
|
#[derive(Debug, serde::Serialize, Clone, PartialEq, ToSchema, router_derive::PolymorphicSchema)]
|
||||||
Default, Debug, serde::Serialize, Clone, PartialEq, ToSchema, router_derive::PolymorphicSchema,
|
|
||||||
)]
|
|
||||||
pub struct PaymentAttemptResponse {
|
pub struct PaymentAttemptResponse {
|
||||||
/// Unique identifier for the attempt
|
/// Unique identifier for the attempt
|
||||||
pub attempt_id: String,
|
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
|
/// 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")]
|
#[schema(value_type = Option<AuthenticationType>, example = "no_three_ds", default = "three_ds")]
|
||||||
pub authentication_type: Option<enums::AuthenticationType>,
|
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
|
/// If the payment was cancelled the reason will be provided here
|
||||||
pub cancellation_reason: Option<String>,
|
pub cancellation_reason: Option<String>,
|
||||||
/// A unique identifier to link the payment to a mandate, can be use instead of payment_method_data
|
/// A unique identifier to link the payment to a mandate, can be use instead of payment_method_data
|
||||||
|
|||||||
@ -1053,6 +1053,8 @@ impl ForeignFrom<storage::PaymentAttempt> for payments::PaymentAttemptResponse {
|
|||||||
connector_transaction_id: payment_attempt.connector_transaction_id,
|
connector_transaction_id: payment_attempt.connector_transaction_id,
|
||||||
capture_method: payment_attempt.capture_method,
|
capture_method: payment_attempt.capture_method,
|
||||||
authentication_type: payment_attempt.authentication_type,
|
authentication_type: payment_attempt.authentication_type,
|
||||||
|
created_at: payment_attempt.created_at,
|
||||||
|
modified_at: payment_attempt.modified_at,
|
||||||
cancellation_reason: payment_attempt.cancellation_reason,
|
cancellation_reason: payment_attempt.cancellation_reason,
|
||||||
mandate_id: payment_attempt.mandate_id,
|
mandate_id: payment_attempt.mandate_id,
|
||||||
error_code: payment_attempt.error_code,
|
error_code: payment_attempt.error_code,
|
||||||
|
|||||||
Reference in New Issue
Block a user