use serde::Serialize;
#[derive(Debug, Clone, Serialize)]
pub struct SavingsPurchaseRedemptionRequest {
ccy: String,
amt: String,
side: String,
#[serde(skip_serializing_if = "Option::is_none")]
rate: Option<String>,
}
impl SavingsPurchaseRedemptionRequest {
pub fn new(ccy: impl Into<String>, amt: impl Into<String>, side: impl Into<String>) -> Self {
Self {
ccy: ccy.into(),
amt: amt.into(),
side: side.into(),
rate: None,
}
}
pub fn rate(mut self, rate: impl Into<String>) -> Self {
self.rate = Some(rate.into());
self
}
}