amazon-spapi 2.0.3

A Rust client library for Amazon Selling Partner API (SP-API)
Documentation
/*
 * The Selling Partner API for Amazon Seller Wallet Open Banking API
 *
 * The Selling Partner API for Seller Wallet (Seller Wallet API) provides financial information that is relevant to a seller's Seller Wallet account. You can obtain financial events, balances, and transfer schedules for Seller Wallet accounts. You can also schedule and initiate transactions.
 *
 * The version of the OpenAPI document: 2024-03-01
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// FxRateDetails : Foreign exchange rate details displayed when transfer preview is requested. 
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct FxRateDetails {
    /// Unique identifier assigned to the fees/foreign exchange Rate of a transaction. 
    #[serde(rename = "fxRateId")]
    pub fx_rate_id: String,
    /// A decimal number such as amount or FX rate.
    #[serde(rename = "baseRate")]
    pub base_rate: f64,
    /// A decimal number such as amount or FX rate.
    #[serde(rename = "effectiveFxRate")]
    pub effective_fx_rate: f64,
    #[serde(rename = "rateDirection")]
    pub rate_direction: models::seller_wallet_2024_03_01::RateDirection,
}

impl FxRateDetails {
    /// Foreign exchange rate details displayed when transfer preview is requested. 
    pub fn new(fx_rate_id: String, base_rate: f64, effective_fx_rate: f64, rate_direction: models::seller_wallet_2024_03_01::RateDirection) -> FxRateDetails {
        FxRateDetails {
            fx_rate_id,
            base_rate,
            effective_fx_rate,
            rate_direction,
        }
    }
}