Last active
December 21, 2015 23:59
-
-
Save tmornini/6385849 to your computer and use it in GitHub Desktop.
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
# unauthenticated client | |
client = Subledger.new | |
identity_args = { :description => '', | |
:email => '' } | |
identity, key = client. | |
identities. | |
create identity_args | |
puts "Identity ID: #{identitify.id}" | |
puts " Key ID: #{key.id}" | |
puts " Secret: #{key.secret}" | |
# authenticated client | |
client = Subledger.new :key_id => key.id, | |
:secret => key.secret | |
org = client. | |
orgs. | |
create :description => '', | |
:reference => '' | |
# authenticated client for org | |
client = Subledger.new :key_id => key.id, | |
:secret => key.secret, | |
:org_id => org.id | |
book = client. | |
books. | |
create :description => '' | |
puts " Book ID: #{book.id}" | |
# authenticated client for org or and book | |
client = Subledger.new :key_id => key.id, | |
:secret => key.secret, | |
:org_id => org.id, | |
:book_id => book.id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment