import { ListOption } from "."; export interface SubAccountGroupMemberParams { /** ID of an active sub-account. Each sub-account can appear only once. */ sub_account_id: string; /** This member's share in the group (0 < percentage <= 100, up to 2 decimals). Defaults to the sub-account's own percentage. */ percentage?: number; } export interface SubAccountGroupParams { name: string; description?: string; /** 1 to 50 members. Percentages must add up to 100 or less. */ members: SubAccountGroupMemberParams[]; active?: boolean; } export interface SubAccountGroupUpdateParams { name?: string; description?: string | null; /** Replaces the whole member list. */ members?: SubAccountGroupMemberParams[]; active?: boolean; } export interface SubAccountGroupListOption extends ListOption { active?: boolean; } export interface SubAccountGroupMember { id: string; group_id: string; sub_account_id: string; /** Decimal string, e.g. "30.00". */ percentage: string; sub_account?: { id: string; business_name: string; settlement_code: string; account_number: string; active: boolean; }; createdAt: string; updatedAt: string; } export interface SubAccountGroup { id: string; name: string; description: string | null; business_id: string; account_id: string; test_mode: boolean; active: boolean; members: SubAccountGroupMember[]; createdAt: string; updatedAt: string; }