feat(router): added dispute accept api, file module apis and dispute evidence submission api (#900)

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:
Sai Harsha Vardhan
2023-04-25 01:05:21 +05:30
committed by GitHub
parent bcbf4c882c
commit bdf1e5147e
54 changed files with 2822 additions and 34 deletions

View File

@ -73,3 +73,57 @@ pub struct DisputeListConstraints {
#[serde(rename = "received_time.gte")]
pub received_time_gte: Option<PrimitiveDateTime>,
}
#[derive(Default, Clone, Debug, Serialize, Deserialize, ToSchema)]
pub struct SubmitEvidenceRequest {
///Dispute Id
pub dispute_id: String,
/// Logs showing the usage of service by customer
pub access_activity_log: Option<String>,
/// Billing address of the customer
pub billing_address: Option<String>,
/// File Id of cancellation policy
pub cancellation_policy: Option<String>,
/// Details of showing cancellation policy to customer before purchase
pub cancellation_policy_disclosure: Option<String>,
/// Details telling why customer's subscription was not cancelled
pub cancellation_rebuttal: Option<String>,
/// File Id of customer communication
pub customer_communication: Option<String>,
/// Customer email address
pub customer_email_address: Option<String>,
/// Customer name
pub customer_name: Option<String>,
/// IP address of the customer
pub customer_purchase_ip: Option<String>,
/// Fild Id of customer signature
pub customer_signature: Option<String>,
/// Product Description
pub product_description: Option<String>,
/// File Id of receipt
pub receipt: Option<String>,
/// File Id of refund policy
pub refund_policy: Option<String>,
/// Details of showing refund policy to customer before purchase
pub refund_policy_disclosure: Option<String>,
/// Details why customer is not entitled to refund
pub refund_refusal_explanation: Option<String>,
/// Customer service date
pub service_date: Option<String>,
/// File Id service documentation
pub service_documentation: Option<String>,
/// Shipping address of the customer
pub shipping_address: Option<String>,
/// Delivery service that shipped the product
pub shipping_carrier: Option<String>,
/// Shipping date
pub shipping_date: Option<String>,
/// File Id shipping documentation
pub shipping_documentation: Option<String>,
/// Tracking number of shipped product
pub shipping_tracking_number: Option<String>,
/// Any additional supporting file
pub uncategorized_file: Option<String>,
/// Any additional evidence statements
pub uncategorized_text: Option<String>,
}

View File

@ -625,6 +625,9 @@ impl Connector {
| (Self::Trustpay, PaymentMethod::BankRedirect)
)
}
pub fn supports_file_storage_module(&self) -> bool {
matches!(self, Self::Stripe)
}
}
#[derive(

View File

@ -1 +1,7 @@
use utoipa::ToSchema;
#[derive(Debug, serde::Serialize, ToSchema)]
pub struct CreateFileResponse {
/// ID of the file created
pub file_id: String,
}