AccountService
public class AccountService
Provides access to account operations
-
getAccount(budgetId:AsynchronousaccountId: ) Retrieves a single account.
Declaration
Swift
public func getAccount(budgetId: String, accountId: String) async throws -> AccountParameters
budgetIdId of the budget the account belongs to
accountIdId of the account to be retrieved
Return Value
A single account
-
getAccounts(budgetId:AsynchronouslastKnowledgeOfServer: ) Retrieves all accounts for a single budget.
Declaration
Swift
public func getAccounts( budgetId: String, lastKnowledgeOfServer: ServerKnowledge? = nil ) async throws -> [Account]Parameters
budgetIdId of the budget the accounts belongs to
lastKnowledgeOfServerIf provided, only entities that have changed since
lastKnowledgeOfServerwill be included.Return Value
A list of accounts
-
newBudgetAccount(budgetId:Asynchronousname: type: balance: ) Creates a new unlinked account in a budget.
Declaration
Swift
public func newBudgetAccount( budgetId: String, name: String, type: String, balance: Int ) async throws -> AccountParameters
budgetIdThe id of the budget (last_used can also be used to specify the last used budget)
nameThe name of the new account
typeThe type of the new account
Return Value
A single account
View on GitHub
AccountService Class Reference