fireblocks_sdk/models/
payout_response.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 PayoutResponse {
16    #[serde(rename = "payoutId")]
17    pub payout_id: String,
18    #[serde(rename = "paymentAccount")]
19    pub payment_account: models::PaymentAccountResponse,
20    #[serde(rename = "createdAt")]
21    pub created_at: f64,
22    #[serde(rename = "state")]
23    pub state: models::PayoutState,
24    #[serde(rename = "status")]
25    pub status: models::PayoutStatus,
26    /// <ul>  <li> INSUFFICIENT_BALANCE</li> <li> SOURCE_TRANSLATION</li> <li>
27    /// SOURCE_NOT_UNIQUE</li> <li> SOURCE_NOT_FOUND</li> <li>
28    /// SOURCE_TYPE_NOT_SUPPORTED</li> <li> EMPTY_SOURCE</li> <li>
29    /// DESTINATION_TRANSLATION</li> <li> DESTINATION_NOT_UNIQUE</li> <li>
30    /// DESTINATION_NOT_FOUND</li> <li> EMPTY_DESTINATION</li> <li> PARSING
31    /// </li> <li> UNKNOWN</li> <li> FIREBLOCKS_CLIENT</li> <li>
32    /// TRANSACTION_SUBMISSION</li> </ul>
33    #[serde(rename = "reasonOfFailure", skip_serializing_if = "Option::is_none")]
34    pub reason_of_failure: Option<String>,
35    #[serde(rename = "initMethod", skip_serializing_if = "Option::is_none")]
36    pub init_method: Option<models::PayoutInitMethod>,
37    #[serde(rename = "instructionSet")]
38    pub instruction_set: Vec<models::PayoutInstructionResponse>,
39    #[serde(rename = "reportUrl", skip_serializing_if = "Option::is_none")]
40    pub report_url: Option<String>,
41}
42
43impl PayoutResponse {
44    pub fn new(
45        payout_id: String,
46        payment_account: models::PaymentAccountResponse,
47        created_at: f64,
48        state: models::PayoutState,
49        status: models::PayoutStatus,
50        instruction_set: Vec<models::PayoutInstructionResponse>,
51    ) -> PayoutResponse {
52        PayoutResponse {
53            payout_id,
54            payment_account,
55            created_at,
56            state,
57            status,
58            reason_of_failure: None,
59            init_method: None,
60            instruction_set,
61            report_url: None,
62        }
63    }
64}