Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Create an Entity in Amatino Swift - A double-entry accounting library for iOS & MacOS
// Amatino Swift:
// Double entry accounting API
try Entity.create(
session: session,
name: "Stark Industries",
callback: { (error, newEntity) in
guard error == nil else {
// Handle errors
// Do cool stuff with our new Entity
let starkIndustriesId = newEntity!.id
print("Created new Entity with ID: \(starkIndustriesId)")

This comment has been minimized.

Copy link
Owner Author

@hwjeremy hwjeremy commented Jul 17, 2018

The session instance used in this example may be seen in the Create Session gist

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