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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*
* public
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.87.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PayoutsResponse {
/// The total amount of the payout.
#[serde(rename = "amount")]
pub amount: i64,
/// The unique identifier of the business associated with the payout.
#[serde(rename = "business_id")]
pub business_id: String,
/// The total value of chargebacks associated with the payout.
#[serde(rename = "chargebacks")]
pub chargebacks: i64,
/// The timestamp when the payout was created, in UTC.
#[serde(rename = "created_at")]
pub created_at: String,
/// The currency of the payout, represented as an ISO 4217 currency code.
#[serde(rename = "currency")]
pub currency: models::Currency,
/// The fee charged for processing the payout.
#[serde(rename = "fee")]
pub fee: i64,
/// The name of the payout recipient or purpose.
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// The payment method used for the payout (e.g., bank transfer, card, etc.).
#[serde(rename = "payment_method")]
pub payment_method: String,
/// The URL of the document associated with the payout.
#[serde(rename = "payout_document_url", skip_serializing_if = "Option::is_none")]
pub payout_document_url: Option<String>,
/// The unique identifier of the payout.
#[serde(rename = "payout_id")]
pub payout_id: String,
/// The total value of refunds associated with the payout.
#[serde(rename = "refunds")]
pub refunds: i64,
/// Any additional remarks or notes associated with the payout.
#[serde(rename = "remarks", skip_serializing_if = "Option::is_none")]
pub remarks: Option<String>,
/// The current status of the payout.
#[serde(rename = "status")]
pub status: models::PayoutStatus,
/// The tax applied to the payout.
#[serde(rename = "tax")]
pub tax: i64,
/// The timestamp when the payout was last updated, in UTC.
#[serde(rename = "updated_at")]
pub updated_at: String,
}
impl PayoutsResponse {
pub fn new(amount: i64, business_id: String, chargebacks: i64, created_at: String, currency: models::Currency, fee: i64, payment_method: String, payout_id: String, refunds: i64, status: models::PayoutStatus, tax: i64, updated_at: String) -> PayoutsResponse {
PayoutsResponse {
amount,
business_id,
chargebacks,
created_at,
currency,
fee,
name: None,
payment_method,
payout_document_url: None,
payout_id,
refunds,
remarks: None,
status,
tax,
updated_at,
}
}
}