mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 11:24:45 +08:00
feat(router): added dispute retrieve and dispute list apis (#842)
Co-authored-by: Sangamesh <sangamesh.kulkarni@juspay.in> Co-authored-by: sai harsha <sai.harsha@sai.harsha-MacBookPro> Co-authored-by: Arun Raj M <jarnura47@gmail.com>
This commit is contained in:
committed by
GitHub
parent
d1d58e33b7
commit
acab7671b0
@ -1,4 +1,5 @@
|
||||
use masking::Serialize;
|
||||
use masking::{Deserialize, Serialize};
|
||||
use time::PrimitiveDateTime;
|
||||
use utoipa::ToSchema;
|
||||
|
||||
use super::enums::{DisputeStage, DisputeStatus};
|
||||
@ -19,6 +20,8 @@ pub struct DisputeResponse {
|
||||
pub dispute_stage: DisputeStage,
|
||||
/// Status of the dispute
|
||||
pub dispute_status: DisputeStatus,
|
||||
/// connector to which dispute is associated with
|
||||
pub connector: String,
|
||||
/// Status of the dispute sent by connector
|
||||
pub connector_status: String,
|
||||
/// Dispute id sent by connector
|
||||
@ -36,3 +39,37 @@ pub struct DisputeResponse {
|
||||
/// Time at which dispute is received
|
||||
pub received_at: String,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, ToSchema)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct DisputeListConstraints {
|
||||
/// limit on the number of objects to return
|
||||
pub limit: Option<i64>,
|
||||
/// status of the dispute
|
||||
pub dispute_status: Option<DisputeStatus>,
|
||||
/// stage of the dispute
|
||||
pub dispute_stage: Option<DisputeStage>,
|
||||
/// reason for the dispute
|
||||
pub reason: Option<String>,
|
||||
/// connector linked to dispute
|
||||
pub connector: Option<String>,
|
||||
/// The time at which dispute is received
|
||||
#[schema(example = "2022-09-10T10:11:12Z")]
|
||||
pub received_time: Option<PrimitiveDateTime>,
|
||||
/// Time less than the dispute received time
|
||||
#[schema(example = "2022-09-10T10:11:12Z")]
|
||||
#[serde(rename = "received_time.lt")]
|
||||
pub received_time_lt: Option<PrimitiveDateTime>,
|
||||
/// Time greater than the dispute received time
|
||||
#[schema(example = "2022-09-10T10:11:12Z")]
|
||||
#[serde(rename = "received_time.gt")]
|
||||
pub received_time_gt: Option<PrimitiveDateTime>,
|
||||
/// Time less than or equals to the dispute received time
|
||||
#[schema(example = "2022-09-10T10:11:12Z")]
|
||||
#[serde(rename = "received_time.lte")]
|
||||
pub received_time_lte: Option<PrimitiveDateTime>,
|
||||
/// Time greater than or equals to the dispute received time
|
||||
#[schema(example = "2022-09-10T10:11:12Z")]
|
||||
#[serde(rename = "received_time.gte")]
|
||||
pub received_time_gte: Option<PrimitiveDateTime>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user