Update an Account in Amatino Swift - A double-entry accounting library for iOS & MacOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Amatino Swift: https://github.com/amatino-code/amatino-swift | |
// Double entry accounting API | |
try account.update( | |
name: "Newly updated account name", | |
parent: nil, | |
type: account.type, // using the existing value | |
counterParty: nil, | |
colour: nil, | |
globalUnit: USD, | |
callback: { (error, account) in | |
// The returned Account instance is updated | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
usd
parameter passed to.update()
may be found in the Retrieve a GlobalUnit gist. Theaccount
instance itself is an example of aAccount
retrieved or created using techniques visible in the Account.create() and Account.retrieve() gists.