fireblocks_sdk/models/
payout_response.rs1use {
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 #[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}