use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SellRequest {
#[serde(rename = "CryptoCurrency")]
pub crypto_currency: String,
#[serde(rename = "FiatAmount")]
pub fiat_amount: String,
#[serde(rename = "CryptoAuthorizedAmount")]
pub crypto_authorized_amount: String,
#[serde(rename = "FormSessionID")]
pub form_session_id: uuid::Uuid,
#[serde(rename = "Nonce")]
pub nonce: String,
#[serde(rename = "ExternalID", skip_serializing_if = "Option::is_none")]
pub external_id: Option<String>,
}
impl SellRequest {
pub fn new(
crypto_currency: String,
fiat_amount: String,
crypto_authorized_amount: String,
form_session_id: uuid::Uuid,
nonce: String,
) -> SellRequest {
SellRequest {
crypto_currency,
fiat_amount,
crypto_authorized_amount,
form_session_id,
nonce,
external_id: None,
}
}
}