fireblocks_sdk/models/
connected_account_balances.rs

1// Fireblocks API
2//
3// Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain.  - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com)
4//
5// The version of the OpenAPI document: 1.8.0
6// Contact: developers@fireblocks.com
7// Generated by: https://openapi-generator.tech
8
9use {
10    crate::models,
11    serde::{Deserialize, Serialize},
12};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ConnectedAccountBalances {
16    /// Asset identifier (e.g., BTC, ETH, USDC).
17    #[serde(rename = "assetId")]
18    pub asset_id: String,
19    /// Amount available for use.
20    #[serde(rename = "availableAmount")]
21    pub available_amount: String,
22    /// Total amount including locked/held balances.
23    #[serde(rename = "totalAmount")]
24    pub total_amount: String,
25    /// Amount currently locked/held.
26    #[serde(rename = "lockedAmount", skip_serializing_if = "Option::is_none")]
27    pub locked_amount: Option<String>,
28    /// Credit line amount, if applicable (0 when not used).
29    #[serde(rename = "creditAmount", skip_serializing_if = "Option::is_none")]
30    pub credit_amount: Option<String>,
31    /// Wallet type/category (e.g., SPOT, MARGIN, FUNDING).
32    #[serde(rename = "balanceType")]
33    pub balance_type: String,
34    /// Display name for the balance type (at the provider)
35    #[serde(rename = "balanceName", skip_serializing_if = "Option::is_none")]
36    pub balance_name: Option<String>,
37}
38
39impl ConnectedAccountBalances {
40    pub fn new(
41        asset_id: String,
42        available_amount: String,
43        total_amount: String,
44        balance_type: String,
45    ) -> ConnectedAccountBalances {
46        ConnectedAccountBalances {
47            asset_id,
48            available_amount,
49            total_amount,
50            locked_amount: None,
51            credit_amount: None,
52            balance_type,
53            balance_name: None,
54        }
55    }
56}