Last active
August 5, 2018 04:42
-
-
Save hwjeremy/b50c0bcfff6b8c75ba042271b6e008fa to your computer and use it in GitHub Desktop.
Retrieve a Tree 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 Tree.retrieve( | |
session: session, | |
entity: starkIndustries, | |
globalUnit: usd, | |
callback: { (error: Error?, tree: Tree?) in { | |
// tree.accounts contains a hierachary of all | |
// Accounts in this entity, as either TreeNode | |
// or PlaceholderNode instances | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The parameters supplied to
Tree.retrieve()
come from the following examples:session
- Create SessionstarkIndustries
- Retrieve Entityusd
- Retrieve GlobalUnit