/** * Representation of a SubAccount. */ export type SubAccount = { /** * Unique identifier for the subaccount. */ id: string; /** * Name of the business associated with the subaccount. */ business_name: string; /** * Settlement code for the subaccount. Can be "wave" or "afrimoney". */ settlement_code: "wave" | "afrimoney"; /** * Account number associated with the subaccount. */ account_number: number; /** * Percentage allocation for the subaccount. */ percentage: number; /** * Identifier for the business this subaccount belongs to. */ business_id: string; /** * Identifier for the account this subaccount is linked to. */ account_id: string; /** * Indicates if the subaccount is in test mode. */ test_mode: boolean; /** * Indicates if the subaccount is active. */ active: boolean; /** * The current balance of the subaccount. */ balance: number; }; /** * Parameters required to create a SubAccount. * Only includes business_name, percentage, settlement_code, and account_number. */ export type SubAccountParams = Pick; /** * Parameters required to update a SubAccount. * All fields are optional: active, settlement_code, account_number, and percentage. */ export type SubAccountUpdateParams = Partial>;