diff --git a/app/eg002_signing_via_email.py b/app/eg002_signing_via_email.py index 96d1bef4..2fefc974 100644 --- a/app/eg002_signing_via_email.py +++ b/app/eg002_signing_via_email.py @@ -197,10 +197,19 @@ def make_envelope(args): sign_here2 = SignHere( anchor_string = '/sn1/', anchor_units = 'pixels', anchor_y_offset = '10', anchor_x_offset = '20') + date1 = Date( + anchor_string = '**signature_1**', anchor_units = 'pixels', + anchor_y_offset = '10', anchor_x_offset = '100', + width = 75, tab_label = 'Date tab', name = 'Date tab' ) + dateSigned1 = DateSigned( + anchor_string = '**signature_1**', anchor_units = 'pixels', + anchor_y_offset = '10', anchor_x_offset = '220', + tab_label = 'Date signed tab' ) # Add the tabs model (including the sign_here tabs) to the signer # The Tabs object wants arrays of the different field/tab types - signer1.tabs = Tabs(sign_here_tabs=[sign_here1, sign_here2]) + signer1.tabs = Tabs(sign_here_tabs=[sign_here1, sign_here2], + date_tabs=[date1], date_signed_tabs=[dateSigned1]) # Add the recipients to the envelope object recipients = Recipients(signers=[signer1], carbon_copies=[cc1]) diff --git a/app/eg005_envelope_recipients.py b/app/eg005_envelope_recipients.py index 794c8742..4537f44b 100644 --- a/app/eg005_envelope_recipients.py +++ b/app/eg005_envelope_recipients.py @@ -1,4 +1,8 @@ -"""005: List an envelope's recipients and status""" +"""005: List an envelope's recipients and status + +Also, for issue 22, lists tabs for the signer recipient. +See https://github.com/docusign/docusign-python-client/issues/22 +""" from flask import render_template, url_for, redirect, session, flash, request from os import path @@ -54,7 +58,7 @@ def create_controller(): return render_template("example_done.html", title="Envelope recipients results", h1="List the envelope's recipients and their status", - message="Results from the EnvelopesRecipients::list method:", + message="Results from the EnvelopeRecipientTabs::list method. API method: envelope_api.list_tabs", json=json.dumps(json.dumps(results.to_dict())) ) elif not token_ok: @@ -90,7 +94,12 @@ def worker(args): envelope_api = EnvelopesApi(api_client) results = envelope_api.list_recipients(args['account_id'], args['envelope_id']) - return results + recipientId = results.signers[0].recipient_id + # Call the EnvelopeRecipientTabs: list method + envelope_api = EnvelopesApi(api_client) + results2 = envelope_api.list_tabs(args['account_id'], args['envelope_id'], recipientId) + + return results2 # ***DS.snippet.0.end diff --git a/app/templates/eg005_envelope_recipients.html b/app/templates/eg005_envelope_recipients.html index 5782e9e6..2ff59943 100644 --- a/app/templates/eg005_envelope_recipients.html +++ b/app/templates/eg005_envelope_recipients.html @@ -1,7 +1,6 @@ {% extends "base.html" %} {% block content %} -
List the envelope's recipients, including their current status.
+Documentation about this example.
diff --git a/app/templates/home.html b/app/templates/home.html index b28c3a4a..f69e751e 100644 --- a/app/templates/home.html +++ b/app/templates/home.html @@ -18,8 +18,7 @@This launcher both demonstrates use of the OAuth Authorization Code Grant flow and includes multiple - usage examples for the DocuSign eSignature REST API.
+Documentation on using OAuth Authorization Code Grant from a