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
/*
* 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 RefundListItem {
/// The refunded amount.
#[serde(rename = "amount", skip_serializing_if = "Option::is_none")]
pub amount: Option<i32>,
/// The unique identifier of the business issuing the refund.
#[serde(rename = "business_id")]
pub business_id: String,
/// The timestamp of when the refund was created in UTC.
#[serde(rename = "created_at")]
pub created_at: String,
/// The currency of the refund, represented as an ISO 4217 currency code.
#[serde(rename = "currency", skip_serializing_if = "Option::is_none")]
pub currency: Option<models::Currency>,
/// If true the refund is a partial refund
#[serde(rename = "is_partial")]
pub is_partial: bool,
/// The unique identifier of the payment associated with the refund.
#[serde(rename = "payment_id")]
pub payment_id: String,
/// The reason provided for the refund, if any. Optional.
#[serde(rename = "reason", skip_serializing_if = "Option::is_none")]
pub reason: Option<String>,
/// The unique identifier of the refund.
#[serde(rename = "refund_id")]
pub refund_id: String,
/// The current status of the refund.
#[serde(rename = "status")]
pub status: models::RefundStatus,
}
impl RefundListItem {
pub fn new(business_id: String, created_at: String, is_partial: bool, payment_id: String, refund_id: String, status: models::RefundStatus) -> RefundListItem {
RefundListItem {
amount: None,
business_id,
created_at,
currency: None,
is_partial,
payment_id,
reason: None,
refund_id,
status,
}
}
}