use serde::{Deserialize, Serialize};
use rust_decimal::Decimal;
use chrono::{DateTime, Utc};
use super::{PageDetails, ApiErrorDetail};
#[derive(Debug, Deserialize, Serialize)]
pub struct WithdrawalDetails {
#[serde(rename = "withdrawal_id")]
pub withdrawal_id: String, pub address: String, #[serde(rename = "recipient_purpose")]
pub recipient_purpose: Option<String>, #[serde(with = "rust_decimal::serde::str")] pub amount: Decimal, #[serde(rename = "network_fee")]
#[serde(with = "rust_decimal::serde::str")] pub network_fee: Decimal, pub comment: Option<String>, #[serde(rename = "created_at")]
pub created_at: DateTime<Utc>, pub state: i32, #[serde(rename = "transferred_at")]
pub transferred_at: Option<DateTime<Utc>>, pub txid: Option<String>, }
#[derive(Debug, Deserialize, Serialize)]
pub struct ShowWithdrawalResponse {
pub withdrawal: WithdrawalDetails, pub errors: Vec<ApiErrorDetail>, pub credits: i32,
}
#[derive(Debug, Deserialize, Serialize)]
pub struct ShowWithdrawalsResponse {
pub withdrawals: Vec<WithdrawalDetails>, pub page: PageDetails, pub errors: Vec<ApiErrorDetail>, pub credits: i32,
}
#[derive(Debug, Deserialize, Serialize)]
pub struct CreateWithdrawalResponse {
#[serde(rename = "withdrawal_id")]
pub withdrawal_id: i64, pub errors: Vec<ApiErrorDetail>, pub credits: i32,
}
pub type DeleteWithdrawalResponse = super::misc::BasicSuccessResponse;
#[derive(Debug, Deserialize, Serialize)]
pub struct ShowWithdrawalMinNetworkFeeResponse {
#[serde(rename = "min_network_fee")]
#[serde(with = "rust_decimal::serde::str")] pub min_network_fee: Decimal, pub errors: Vec<ApiErrorDetail>, pub credits: i32,
}