use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SimulationResponseWrapper<T> {
pub payment_methods: Vec<T>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SimulatePayload {
pub token_account: String,
pub price: String,
pub type_response: String,
}
impl SimulatePayload {
pub fn new(token_account: String, total_amount: f64) -> Self {
Self {
token_account,
price: total_amount.to_string(),
type_response: "J".to_string(),
}
}
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct PaymentTaxResponse {
pub splittings: Vec<SplitResponse>,
pub price_customer: String,
pub price_seller: String,
pub price_original: String,
pub split: i64,
pub payment_method_name: String,
pub payment_method_id: i64,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SplitResponse {
pub split: i64,
pub value_split: String,
pub value_transaction: String,
pub addition_retention: String,
pub split_rate: serde_json::Value,
pub price_seller: String,
}
#[cfg(test)]
mod tests {
}