Skip to content

Instantly share code, notes, and snippets.

Created August 5, 2018 04:20
What would you like to do?
Update an Account in Amatino Swift - A double-entry accounting library for iOS & MacOS
// 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
Copy link

hwjeremy commented Aug 5, 2018

The usd parameter passed to .update() may be found in the Retrieve a GlobalUnit gist. The account instance itself is an example of a Account retrieved or created using techniques visible in the Account.create() and Account.retrieve() gists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment