Skip to content

Commit

Permalink
improved download document example
Browse files Browse the repository at this point in the history
  • Loading branch information
alex.khalevine committed May 5, 2021
1 parent fb22ef0 commit c2d3d22
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions examples/download_document.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

client = Eversign::Client.new

for document in client.get_all_documents()
client.download_raw_document_to_path(document.document_hash, 'raw.pdf')
client.download_final_document_to_path(document.document_hash, 'final.pdf')
break
end
documents = client.get_all_documents()

# paradox discovered: documents.first is actually last added document
document = documents.first

client.download_raw_document_to_path(document.document_hash, 'raw.pdf')
client.download_final_document_to_path(document.document_hash, 'final.pdf')

0 comments on commit c2d3d22

Please sign in to comment.