use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WithdrawHistory {
#[serde(rename = "code")]
pub code: i32,
#[serde(rename = "message", skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
#[serde(rename = "withdraws")]
pub withdraws: Vec<models::WithdrawHistoryItem>,
#[serde(rename = "cursor")]
pub cursor: String,
}
impl WithdrawHistory {
pub fn new(
code: i32,
withdraws: Vec<models::WithdrawHistoryItem>,
cursor: String,
) -> WithdrawHistory {
WithdrawHistory {
code,
message: None,
withdraws,
cursor,
}
}
}