mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
feat(router): add retrieve dispute evidence API (#1114)
This commit is contained in:
committed by
GitHub
parent
9f47f20702
commit
354ee0137a
@ -3,6 +3,7 @@ use time::PrimitiveDateTime;
|
||||
use utoipa::ToSchema;
|
||||
|
||||
use super::enums::{DisputeStage, DisputeStatus};
|
||||
use crate::files;
|
||||
|
||||
#[derive(Clone, Debug, Serialize, ToSchema, Eq, PartialEq)]
|
||||
pub struct DisputeResponse {
|
||||
@ -74,6 +75,30 @@ pub struct DisputeResponsePaymentsRetrieve {
|
||||
pub created_at: PrimitiveDateTime,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, strum::Display, Clone)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
#[strum(serialize_all = "snake_case")]
|
||||
pub enum EvidenceType {
|
||||
CancellationPolicy,
|
||||
CustomerCommunication,
|
||||
CustomerSignature,
|
||||
Receipt,
|
||||
RefundPolicy,
|
||||
ServiceDocumentation,
|
||||
ShippingDocumentation,
|
||||
InvoiceShowingDistinctTransactions,
|
||||
RecurringTransactionAgreement,
|
||||
UncategorizedFile,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Serialize, ToSchema)]
|
||||
pub struct DisputeEvidenceBlock {
|
||||
/// Evidence type
|
||||
pub evidence_type: EvidenceType,
|
||||
/// File metadata
|
||||
pub file_metadata_response: files::FileMetadataResponse,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, ToSchema)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct DisputeListConstraints {
|
||||
|
||||
@ -5,3 +5,17 @@ pub struct CreateFileResponse {
|
||||
/// ID of the file created
|
||||
pub file_id: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, serde::Serialize, ToSchema, Clone)]
|
||||
pub struct FileMetadataResponse {
|
||||
/// ID of the file created
|
||||
pub file_id: String,
|
||||
/// Name of the file
|
||||
pub file_name: Option<String>,
|
||||
/// Size of the file
|
||||
pub file_size: i32,
|
||||
/// Type of the file
|
||||
pub file_type: String,
|
||||
/// File availability
|
||||
pub available: bool,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user