Files
Prajjwal Kumar c0116db271 feat(currency_conversion): add currency conversion feature (#2948)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
2023-11-28 10:35:04 +00:00

22 lines
670 B
Rust

use common_utils::events::ApiEventMetric;
/// 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: i64,
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 {}