-
Notifications
You must be signed in to change notification settings - Fork 164
/
rust.rs
62 lines (59 loc) · 1.82 KB
/
rust.rs
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
// Example code that deserializes and serializes the model.
// extern crate serde;
// #[macro_use]
// extern crate serde_derive;
// extern crate serde_json;
//
// use generated_module::[object Object];
//
// fn main() {
// let json = r#"{"answer": 42}"#;
// let model: [object Object] = serde_json::from_str(&json).unwrap();
// }
extern crate serde_json;
pub type Bank = Vec<BankElement>;
#[derive(Serialize, Deserialize)]
pub struct BankElement {
#[serde(rename = "COMPE")]
pub compe: String,
#[serde(rename = "ISPB")]
pub ispb: String,
#[serde(rename = "Document")]
pub document: String,
#[serde(rename = "LongName")]
pub long_name: String,
#[serde(rename = "ShortName")]
pub short_name: String,
#[serde(rename = "Network")]
pub network: Option<String>,
#[serde(rename = "Type")]
pub type: Option<String>,
#[serde(rename = "PixType")]
pub pix_type: Option<String>,
#[serde(rename = "Charge")]
pub charge: bool,
#[serde(rename = "CreditDocument")]
pub credit_document: bool,
#[serde(rename = "LegalCheque")]
pub legal_cheque: bool,
#[serde(rename = "DetectaFlow")]
pub detecta_flow: bool,
#[serde(rename = "Pcr")]
pub pcr: bool,
#[serde(rename = "Pcrp")]
pub pcrp: bool,
#[serde(rename = "SalaryPortability")]
pub salary_portability: String,
#[serde(rename = "Products")]
pub products: Vec<String>,
#[serde(rename = "Url")]
pub url: Option<String>,
#[serde(rename = "DateOperationStarted")]
pub date_operation_started: String,
#[serde(rename = "DatePixStarted")]
pub date_pix_started: String,
#[serde(rename = "DateRegistered")]
pub date_registered: String,
#[serde(rename = "DateUpdated")]
pub date_updated: String,
}