feat(router): add disputes block in payments retrieve response (#1038)

This commit is contained in:
Sai Harsha Vardhan
2023-05-09 23:57:07 +05:30
committed by GitHub
parent 7c7185bc1a
commit 1304d912e5
22 changed files with 168 additions and 22 deletions

View File

@ -7,7 +7,7 @@ use router_derive::Setter;
use time::PrimitiveDateTime;
use utoipa::ToSchema;
use crate::{admin, enums as api_enums, refunds};
use crate::{admin, disputes, enums as api_enums, refunds};
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum PaymentOp {
@ -1035,6 +1035,10 @@ pub struct PaymentsResponse {
#[schema(value_type = Option<Vec<RefundResponse>>)]
pub refunds: Option<Vec<refunds::RefundResponse>>,
/// List of dispute that happened on this intent
#[schema(value_type = Option<Vec<DisputeResponsePaymentsRetrieve>>)]
pub disputes: Option<Vec<disputes::DisputeResponsePaymentsRetrieve>>,
/// A unique identifier to link the payment to a mandate, can be use instead of payment_method_data
#[schema(max_length = 255, example = "mandate_iwer89rnjef349dni3")]
pub mandate_id: Option<String>,