enum types for account fields

This commit is contained in:
Aaron Manning 2025-02-13 14:27:00 +11:00
parent a205f80bc5
commit c8b91f66db

View File

@ -65,15 +65,29 @@ pub struct Attributes {
/// The name associated with the account in the Up application.
pub display_name : String,
/// The bank account type of this account. Possible values: SAVER, TRANSACTIONAL
pub account_type : String,
pub account_type : AccountType,
/// The ownership structure for this account. Possible values: INDIVIDUAL, JOINT
pub ownership_type : String,
pub ownership_type : OwnershipType,
/// The available balance of the account, taking into account any amounts that are currently on hold.
pub balance : standard::MoneyObject,
/// The date-time at which this account was first opened.
pub created_at : String,
}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
pub enum AccountType {
Saver,
Transactional,
}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "SCREAMING_SNAKE_CASE")]
pub enum OwnershipType {
Individual,
Joint,
}
// ----------------- Input Objects -----------------
#[derive(Default)]