use crate::models;
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GasCost {
#[serde(rename = "type")]
pub r#type: String,
#[serde(rename = "price")]
pub price: String,
#[serde(rename = "estimate")]
pub estimate: String,
#[serde(rename = "limit")]
pub limit: String,
#[serde(rename = "amount")]
pub amount: String,
#[serde(rename = "amountUSD")]
pub amount_usd: String,
#[serde(rename = "token")]
pub token: Box<models::TokenInfo>,
}
impl GasCost {
pub fn new(r#type: String, price: String, estimate: String, limit: String, amount: String, amount_usd: String, token: models::TokenInfo) -> GasCost {
GasCost {
r#type,
price,
estimate,
limit,
amount,
amount_usd,
token: Box::new(token),
}
}
}