mercury_rust/resources/
mod.rs

1pub mod accounts;
2pub mod cards;
3pub mod transactions;
4pub mod statements;
5pub mod recipient;
6
7
8#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
9pub struct Address {
10    pub address1: String,
11    pub address2: Option<String>,
12    pub city: String,
13    pub state: Option<String>,
14    pub postal_code: String,
15    pub country: Option<String>,
16    pub region: Option<String>
17}
18
19#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
20pub struct List<T> {
21    pub total: Option<i64>,
22    #[serde(flatten)]
23    pub data: ListData<T>
24}
25
26#[derive(Deserialize, Serialize, Debug, Clone, PartialEq)]
27#[serde(rename_all="lowercase")]
28pub enum ListData<T> {
29    Accounts(Vec<T>),
30    Cards(Vec<T>),
31    Transactions(Vec<T>),
32    Recipients(Vec<T>),
33    Statements(Vec<T>)
34}