use masking::{Deserialize, Serialize}; use time::PrimitiveDateTime; use utoipa::ToSchema; use super::enums::{DisputeStage, DisputeStatus}; #[derive(Default, Clone, Debug, Serialize, ToSchema)] pub struct DisputeResponse { /// The identifier for dispute pub dispute_id: String, /// The identifier for payment_intent pub payment_id: String, /// The identifier for payment_attempt pub attempt_id: String, /// The dispute amount pub amount: String, /// The three-letter ISO currency code pub currency: String, /// Stage of the dispute 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 pub connector_dispute_id: String, /// Reason of dispute sent by connector pub connector_reason: Option, /// Reason code of dispute sent by connector pub connector_reason_code: Option, /// Evidence deadline of dispute sent by connector pub challenge_required_by: Option, /// Dispute created time sent by connector pub created_at: Option, /// Dispute updated time sent by connector pub updated_at: Option, /// 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, /// status of the dispute pub dispute_status: Option, /// stage of the dispute pub dispute_stage: Option, /// reason for the dispute pub reason: Option, /// connector linked to dispute pub connector: Option, /// The time at which dispute is received #[schema(example = "2022-09-10T10:11:12Z")] pub received_time: Option, /// Time less than the dispute received time #[schema(example = "2022-09-10T10:11:12Z")] #[serde(rename = "received_time.lt")] pub received_time_lt: Option, /// Time greater than the dispute received time #[schema(example = "2022-09-10T10:11:12Z")] #[serde(rename = "received_time.gt")] pub received_time_gt: Option, /// 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, /// 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, }