use {
crate::models,
serde::{Deserialize, Serialize},
};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PlatformAccount {
#[serde(rename = "type")]
pub r#type: Type,
#[serde(rename = "accountId")]
pub account_id: String,
}
impl PlatformAccount {
pub fn new(r#type: Type, account_id: String) -> PlatformAccount {
PlatformAccount { r#type, account_id }
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "VAULT_ACCOUNT")]
VaultAccount,
#[serde(rename = "CONNECTED_ACCOUNT")]
ConnectedAccount,
#[serde(rename = "FIAT_ACCOUNT")]
FiatAccount,
}
impl Default for Type {
fn default() -> Type {
Self::VaultAccount
}
}