mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
refactor(core): update response for PaymentsDynamicTaxCalculationResponse (#5909)
This commit is contained in:
@ -4627,6 +4627,21 @@ pub struct PaymentsDynamicTaxCalculationResponse {
|
||||
pub order_tax_amount: Option<MinorUnit>,
|
||||
/// shipping cost for the order
|
||||
pub shipping_cost: Option<MinorUnit>,
|
||||
/// amount in Base Unit display format
|
||||
pub display_amount: DisplayAmountOnSdk,
|
||||
}
|
||||
|
||||
#[derive(Debug, serde::Serialize, serde::Deserialize, Clone, ToSchema)]
|
||||
pub struct DisplayAmountOnSdk {
|
||||
/// net amount = amount + order_tax_amount + shipping_cost
|
||||
#[schema(value_type = String)]
|
||||
pub net_amount: StringMajorUnit,
|
||||
/// order tax amount calculated by tax connectors
|
||||
#[schema(value_type = String)]
|
||||
pub order_tax_amount: Option<StringMajorUnit>,
|
||||
/// shipping cost for the order
|
||||
#[schema(value_type = String)]
|
||||
pub shipping_cost: Option<StringMajorUnit>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Eq, PartialEq, serde::Serialize, serde::Deserialize, ToSchema)]
|
||||
|
||||
Reference in New Issue
Block a user