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
use crate::ids::AlipayAccountId;
use crate::params::{Expandable, Metadata, Object, Timestamp};
use crate::resources::{Currency, Customer};
use serde_derive::{Deserialize, Serialize};
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct AlipayAccount {
pub id: AlipayAccountId,
#[serde(skip_serializing_if = "Option::is_none")]
pub created: Option<Timestamp>,
#[serde(skip_serializing_if = "Option::is_none")]
pub customer: Option<Expandable<Customer>>,
#[serde(default)]
pub deleted: bool,
#[serde(skip_serializing_if = "Option::is_none")]
pub fingerprint: Option<String>,
#[serde(default)]
pub livemode: bool,
#[serde(default)]
pub metadata: Metadata,
#[serde(skip_serializing_if = "Option::is_none")]
pub payment_amount: Option<i64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub payment_currency: Option<Currency>,
#[serde(default)]
pub reusable: bool,
#[serde(default)]
pub used: bool,
#[serde(skip_serializing_if = "Option::is_none")]
pub username: Option<String>,
}
impl Object for AlipayAccount {
type Id = AlipayAccountId;
fn id(&self) -> Self::Id {
self.id.clone()
}
fn object(&self) -> &'static str {
"alipay_account"
}
}