rosetta_types/account_coins_request.rs
1/*
2 * Rosetta
3 *
4 * Build Once. Integrate Your Blockchain Everywhere.
5 *
6 * The version of the OpenAPI document: 1.4.13
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// AccountCoinsRequest : AccountCoinsRequest is utilized to make a request on the /account/coins endpoint.
12
13#[derive(Clone, Debug, PartialEq, Eq, Default, Serialize, Deserialize)]
14pub struct AccountCoinsRequest {
15 #[serde(rename = "network_identifier")]
16 pub network_identifier: crate::NetworkIdentifier,
17 #[serde(rename = "account_identifier")]
18 pub account_identifier: crate::AccountIdentifier,
19 /// Include state from the mempool when looking up an account's unspent coins. Note, using this functionality breaks any guarantee of idempotency.
20 #[serde(rename = "include_mempool")]
21 pub include_mempool: bool,
22 /// In some cases, the caller may not want to retrieve coins for all currencies for an AccountIdentifier. If the currencies field is populated, only coins for the specified currencies will be returned. If not populated, all unspent coins will be returned.
23 #[serde(rename = "currencies", skip_serializing_if = "Option::is_none")]
24 pub currencies: Option<Vec<crate::Currency>>,
25}
26
27impl AccountCoinsRequest {
28 /// AccountCoinsRequest is utilized to make a request on the /account/coins endpoint.
29 pub fn new(
30 network_identifier: crate::NetworkIdentifier,
31 account_identifier: crate::AccountIdentifier,
32 include_mempool: bool,
33 ) -> AccountCoinsRequest {
34 AccountCoinsRequest {
35 network_identifier,
36 account_identifier,
37 include_mempool,
38 currencies: None,
39 }
40 }
41}