1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// Fireblocks API
//
// 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)
//
// The version of the OpenAPI document: 1.8.0
// Contact: developers@fireblocks.com
// Generated by: https://openapi-generator.tech
use {
crate::models,
serde::{Deserialize, Serialize},
};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PayoutResponse {
#[serde(rename = "payoutId")]
pub payout_id: String,
#[serde(rename = "paymentAccount")]
pub payment_account: models::PaymentAccountResponse,
#[serde(rename = "createdAt")]
pub created_at: f64,
#[serde(rename = "state")]
pub state: models::PayoutState,
#[serde(rename = "status")]
pub status: models::PayoutStatus,
/// <ul> <li> INSUFFICIENT_BALANCE</li> <li> SOURCE_TRANSLATION</li> <li>
/// SOURCE_NOT_UNIQUE</li> <li> SOURCE_NOT_FOUND</li> <li>
/// SOURCE_TYPE_NOT_SUPPORTED</li> <li> EMPTY_SOURCE</li> <li>
/// DESTINATION_TRANSLATION</li> <li> DESTINATION_NOT_UNIQUE</li> <li>
/// DESTINATION_NOT_FOUND</li> <li> EMPTY_DESTINATION</li> <li> PARSING
/// </li> <li> UNKNOWN</li> <li> FIREBLOCKS_CLIENT</li> <li>
/// TRANSACTION_SUBMISSION</li> </ul>
#[serde(rename = "reasonOfFailure", skip_serializing_if = "Option::is_none")]
pub reason_of_failure: Option<String>,
#[serde(rename = "initMethod", skip_serializing_if = "Option::is_none")]
pub init_method: Option<models::PayoutInitMethod>,
#[serde(rename = "instructionSet")]
pub instruction_set: Vec<models::PayoutInstructionResponse>,
#[serde(rename = "reportUrl", skip_serializing_if = "Option::is_none")]
pub report_url: Option<String>,
}
impl PayoutResponse {
pub fn new(
payout_id: String,
payment_account: models::PaymentAccountResponse,
created_at: f64,
state: models::PayoutState,
status: models::PayoutStatus,
instruction_set: Vec<models::PayoutInstructionResponse>,
) -> PayoutResponse {
PayoutResponse {
payout_id,
payment_account,
created_at,
state,
status,
reason_of_failure: None,
init_method: None,
instruction_set,
report_url: None,
}
}
}