openlimits_coinbase/model/account.rs
1use serde::Deserialize;
2use serde::Serialize;
3use rust_decimal::prelude::Decimal;
4use super::shared::string_to_decimal;
5
6/// This struct represents an account
7#[derive(Debug, Serialize, Deserialize, Clone)]
8pub struct Account {
9 pub id: String,
10 pub currency: String,
11 #[serde(with = "string_to_decimal")]
12 pub balance: Decimal,
13 #[serde(with = "string_to_decimal")]
14 pub available: Decimal,
15 #[serde(with = "string_to_decimal")]
16 pub hold: Decimal,
17 pub profile_id: String,
18}