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
//! The payout model.
use serde::Deserialize;
use serde_json::Value;
use crate::core::models::common::{Currency, PayoutStatus, PayoutType};
/// A payout as returned by the API.
#[derive(Debug, Clone, Deserialize)]
#[non_exhaustive]
pub struct PayoutResponse {
/// Unique payout ID.
pub payout_id: String,
/// Merchant account ID that owns this payout.
pub merchant_id: String,
/// Amount in minor units.
pub amount: i64,
/// Three-letter ISO 4217 currency code.
pub currency: Currency,
/// Current status.
pub status: PayoutStatus,
/// Shop (business profile) ID.
#[serde(default)]
pub profile_id: Option<String>,
/// Customer paid out to.
#[serde(default)]
pub customer_id: Option<String>,
/// Connector used.
#[serde(default)]
pub connector: Option<String>,
/// Payout method family.
#[serde(default)]
pub payout_type: Option<PayoutType>,
/// Gateway error code, if failed.
#[serde(default)]
pub error_code: Option<String>,
/// Human-readable error message, if failed.
#[serde(default)]
pub error_message: Option<String>,
/// Any additional response fields not modeled above.
#[serde(flatten)]
pub extra: serde_json::Map<String, Value>,
}