ib 3.0.0

A Rust client to the Interactive Brokers HTTP REST API
Documentation
/* 
 * Client Portal Web API
 *
 * Client Poral Web API
 *
 * OpenAPI spec version: 1.0.0
 * 
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 */


#[allow(unused_imports)]
use serde_json::Value;

#[derive(Debug, Serialize, Deserialize)]
pub struct InlineResponse20018Amount {
  /// for example 23,000 USD
  #[serde(rename = "amount")]
  amount: Option<String>,
  /// for example 1.1 ... 1.2 USD
  #[serde(rename = "commission")]
  commission: Option<String>,
  #[serde(rename = "total")]
  total: Option<String>
}

impl InlineResponse20018Amount {
  pub fn new() -> InlineResponse20018Amount {
    InlineResponse20018Amount {
      amount: None,
      commission: None,
      total: None
    }
  }

  pub fn set_amount(&mut self, amount: String) {
    self.amount = Some(amount);
  }

  pub fn with_amount(mut self, amount: String) -> InlineResponse20018Amount {
    self.amount = Some(amount);
    self
  }

  pub fn amount(&self) -> Option<&String> {
    self.amount.as_ref()
  }

  pub fn reset_amount(&mut self) {
    self.amount = None;
  }

  pub fn set_commission(&mut self, commission: String) {
    self.commission = Some(commission);
  }

  pub fn with_commission(mut self, commission: String) -> InlineResponse20018Amount {
    self.commission = Some(commission);
    self
  }

  pub fn commission(&self) -> Option<&String> {
    self.commission.as_ref()
  }

  pub fn reset_commission(&mut self) {
    self.commission = None;
  }

  pub fn set_total(&mut self, total: String) {
    self.total = Some(total);
  }

  pub fn with_total(mut self, total: String) -> InlineResponse20018Amount {
    self.total = Some(total);
    self
  }

  pub fn total(&self) -> Option<&String> {
    self.total.as_ref()
  }

  pub fn reset_total(&mut self) {
    self.total = None;
  }

}