monzo_webhook/
counterparty.rs

1use std::collections::HashMap;
2
3enum_with_extra! {
4    untagged CounterpartyOrNone,
5    Counterparty(Counterparty),
6    #[allow(clippy::zero_sized_map_values, reason = "this needs refactor when we establish type anyway")]
7    None(HashMap<(), ()>),
8}
9
10struct_with_extra! { Counterparty,
11    account_id: Option<String>,
12    account_number: String,
13    name: String,
14    sort_code: String,
15    user_id: String,
16    beneficiary_account_type: Option<BeneficiaryAccountType>,
17}
18
19enum_with_extra! {
20    "PascalCase" => BeneficiaryAccountType,
21    Personal,
22}