Files
Sahkal Poddar 443b7e6ea2 refactor(router): added a new type minor unit to amount (#4629)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Co-authored-by: Hrithikesh <61539176+hrithikesh026@users.noreply.github.com>
2024-05-21 10:10:05 +00:00

22 lines
696 B
Rust

use common_utils::{events::ApiEventMetric, types::MinorUnit};
/// QueryParams to be send to convert the amount -> from_currency -> to_currency
#[derive(Debug, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
pub struct CurrencyConversionParams {
pub amount: MinorUnit,
pub to_currency: String,
pub from_currency: String,
}
/// Response to be send for convert currency route
#[derive(Debug, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
pub struct CurrencyConversionResponse {
pub converted_amount: String,
pub currency: String,
}
impl ApiEventMetric for CurrencyConversionResponse {}
impl ApiEventMetric for CurrencyConversionParams {}