feat(core): Add Support for Payments Dynamic Tax Calculation Based on Shipping Address (#5619)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Swangi Kumari
2024-09-06 19:08:15 +05:30
committed by GitHub
parent d3a1703bf5
commit a03ad53e43
75 changed files with 2932 additions and 1239 deletions

View File

@ -570,6 +570,7 @@ Never share your secret api keys. Keep them guarded and secure.
api_models::payments::CustomerDetailsResponse,
api_models::payments::OpenBankingData,
api_models::payments::OpenBankingSessionToken,
api_models::payments::PaymentsDynamicTaxCalculationRequest,
)),
modifiers(&SecurityAddon)
)]

View File

@ -545,3 +545,21 @@ pub fn payments_external_authentication() {}
security(("publishable_key" = []))
)]
pub fn payments_complete_authorize() {}
/// Dynamic Tax Calculation
///
///
#[utoipa::path(
post,
path = "/payments/{payment_id}/calculate_tax",
request_body=PaymentsDynamicTaxCalculationRequest,
responses(
(status = 200, description = "Tax Calculation is done", body = PaymentsDynamicTaxCalculationResponse),
(status = 400, description = "Missing mandatory fields")
),
tag = "Payments",
operation_id = "Create Tax Calculation for a Payment",
security(("publishable_key" = []))
)]
pub fn payments_dynamic_tax_calculation() {}