Skip to content

Instantly share code, notes, and snippets.

Created August 2, 2018 07:17
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save hwjeremy/6a6b8d7e6c717698c44c2d6fb1671268 to your computer and use it in GitHub Desktop.
Update a Transaction in Amatino Swift - A double-entry accounting library for iOS & MacOS
// Amatino Swift:
// Double entry accounting API
try transaction.update(
transactionTime: transaction.transactionTime,
description: "Some new description",
globalUnit: usd,
entries: transaction.entries,
callback { (error, transaction) in
// Woot! The returned Transaction instance
// is updated.
Copy link

hwjeremy commented Aug 2, 2018

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

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