use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CheckoutPayoutFiatPostRequest {
#[serde(rename = "CryptoCurrency")]
pub crypto_currency: String,
#[serde(rename = "FiatCurrency")]
pub fiat_currency: String,
#[serde(rename = "FiatAmount")]
pub fiat_amount: String,
#[serde(rename = "CryptoAuthorizedAmount")]
pub crypto_authorized_amount: String,
#[serde(rename = "ReturnURL")]
pub return_url: String,
#[serde(rename = "ExternalID", skip_serializing_if = "Option::is_none")]
pub external_id: Option<String>,
#[serde(rename = "CustomerID")]
pub customer_id: String,
#[serde(rename = "Customer", skip_serializing_if = "Option::is_none")]
pub customer: Option<Box<models::CustomerInput>>,
#[serde(rename = "LineItems")]
pub line_items: Vec<models::LineItem>,
#[serde(rename = "Nonce")]
pub nonce: String,
}
impl CheckoutPayoutFiatPostRequest {
pub fn new(
crypto_currency: String,
fiat_currency: String,
fiat_amount: String,
crypto_authorized_amount: String,
return_url: String,
customer_id: String,
line_items: Vec<models::LineItem>,
nonce: String,
) -> CheckoutPayoutFiatPostRequest {
CheckoutPayoutFiatPostRequest {
crypto_currency,
fiat_currency,
fiat_amount,
crypto_authorized_amount,
return_url,
external_id: None,
customer_id,
customer: None,
line_items,
nonce,
}
}
}