refactor(core): structure of split payments (#6706)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Swangi Kumari
2024-12-13 15:26:15 +05:30
committed by GitHub
parent b506bc18e4
commit 5a85213e21
46 changed files with 828 additions and 519 deletions

View File

@ -1,6 +1,6 @@
use std::collections::HashMap;
pub use common_utils::types::{ChargeRefunds, MinorUnit};
pub use common_utils::types::MinorUnit;
use common_utils::{pii, types::TimeRange};
use serde::{Deserialize, Serialize};
use time::PrimitiveDateTime;
@ -57,8 +57,8 @@ pub struct RefundRequest {
pub merchant_connector_details: Option<admin::MerchantConnectorDetailsWrap>,
/// Charge specific fields for controlling the revert of funds from either platform or connected account
#[schema(value_type = Option<ChargeRefunds>)]
pub charges: Option<ChargeRefunds>,
#[schema(value_type = Option<SplitRefund>)]
pub split_refunds: Option<common_types::refunds::SplitRefund>,
}
#[cfg(feature = "v2")]
@ -204,8 +204,8 @@ pub struct RefundResponse {
#[schema(value_type = Option<String>)]
pub merchant_connector_id: Option<common_utils::id_type::MerchantConnectorAccountId>,
/// Charge specific fields for controlling the revert of funds from either platform or connected account
#[schema(value_type = Option<ChargeRefunds>)]
pub charges: Option<ChargeRefunds>,
#[schema(value_type = Option<SplitRefund>,)]
pub split_refunds: Option<common_types::refunds::SplitRefund>,
}
#[cfg(feature = "v1")]