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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
use serde::Deserialize;
#[derive(Deserialize, Debug)]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
pub enum AccountTypeEnum {
Saver,
Transactional,
}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct MoneyObject {
/// The ISO 4217 currency code.
pub currency_code: String,
/// The amount of money, formatted as a string in the relevant currency.
/// For example, for an Australian dollar value of $10.56, this field will
/// be `"10.56"`. The currency symbol is not included in the string
pub value: String,
/// The amount of money in the smallest denomination for the currency, as a
/// 64-bit integer. For example, for an Australian dollar value of $10.56,
/// this field will be `1056`.
pub value_in_base_units: i64,
}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
pub enum OwnershipTypeEnum {
Individual,
Joint,
}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
pub enum TransactionStatusEnum {
Held,
Settled,
}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct HoldInfoObject {
/// The amount of this transaction while in the `HELD` status, in
/// Australian dollars.
pub amount: MoneyObject,
/// The foreign currency amount of this transaction while in the `HELD`
/// status. This field will be `null` for domestic transactions. The amount
/// was converted to the AUD amount reflected in the `amount` field.
pub foreign_amount: Option<MoneyObject>,
}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct RoundUpObject {
/// The total amount of this Round Up, including any boosts, represented as
/// a negative value.
pub amount: MoneyObject,
/// The portion of the Round Up `amount` owing to boosted Round Ups,
/// represented as a negative value. If no boost was added to the Round Up
/// this field will be `null`.
pub boost_portion: Option<MoneyObject>,
}
#[derive(Deserialize, Debug)]
pub struct CashBackObject {
/// A brief description of why this cashback was paid.
pub description: String,
/// The total amount of cashback paid, represented as a positive value.
pub amount: MoneyObject,
}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
pub enum CardPurchaseMethodEnum {
BarCode,
OCR,
CardPin,
CardDetails,
CardOnFile,
#[serde(rename = "ECOMMERCE")]
ECommerce,
MagneticStripe,
Contactless,
}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct CardPurchaseMethodObject {
/// The type of card purchase.
pub method: CardPurchaseMethodEnum,
/// The last four digits of the card used for the purchase, if applicable.
pub card_number_suffix: Option<String>,
}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
pub enum WebhookEventTypeEnum {
TransactionCreated,
TransactionSettled,
TransactionDeleted,
Ping,
}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
pub enum WebhookDeliveryStatusEnum {
Delivered,
Undeliverable,
BadResponseCode,
}