Skip to content

Commit 131ee69

Browse files
committed
adding codeDepot markers
1 parent fe4633d commit 131ee69

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

app/eSignature/examples/eg017_set_template_tab_values.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,35 +42,44 @@ def worker(cls, args):
4242
4. Obtain the recipient_view_url for the embedded signing
4343
"""
4444
envelope_args = args["envelope_args"]
45-
# 1. Create the envelope request object
45+
# Create the envelope request object
46+
#ds-snippet-start:eSign17Step4
4647
envelope_definition = cls.make_envelope(envelope_args)
48+
#ds-snippet-end:eSign17Step4
4749

48-
# 2. call Envelopes::create API method
50+
# Call Envelopes::create API method
4951
# Exceptions will be caught by the calling function
52+
53+
#ds-snippet-start:eSign17Step2
5054
api_client = create_api_client(base_path=args["base_path"], access_token=args["access_token"])
55+
#ds-snippet-end:eSign17Step2
5156

57+
#ds-snippet-start:eSign17Step5
5258
envelopes_api = EnvelopesApi(api_client)
5359
results = envelopes_api.create_envelope(account_id=args["account_id"], envelope_definition=envelope_definition)
5460

5561
envelope_id = results.envelope_id
62+
#ds-snippet-end:eSign17Step5
5663
app.logger.info(f"Envelope was created. EnvelopeId {envelope_id}")
5764

58-
# 3. Create the Recipient View request object
65+
# Create the Recipient View request object
66+
#ds-snippet-start:eSign17Step6
5967
recipient_view_request = RecipientViewRequest(
6068
authentication_method=authentication_method,
6169
client_user_id=envelope_args["signer_client_id"],
6270
recipient_id="1",
6371
return_url=envelope_args["ds_return_url"],
6472
user_name=envelope_args["signer_name"], email=envelope_args["signer_email"]
6573
)
66-
# 4. Obtain the recipient_view_url for the embedded signing
74+
# Obtain the recipient_view_url for the embedded signing
6775
# Exceptions will be caught by the calling function
6876
results = envelopes_api.create_recipient_view(
6977
account_id=args["account_id"],
7078
envelope_id=envelope_id,
7179
recipient_view_request=recipient_view_request
7280
)
7381
return {"envelope_id": envelope_id, "redirect_url": results.url}
82+
#ds-snippet-end:eSign17Step6
7483

7584
@classmethod
7685
def make_envelope(cls, args):
@@ -83,6 +92,7 @@ def make_envelope(cls, args):
8392

8493
# Set the values for the fields in the template
8594
# List item
95+
#ds-snippet-start:eSign17Step3
8696
list1 = List(
8797
value="green", document_id="1",
8898
page_number="1", tab_label="list")
@@ -161,3 +171,4 @@ def make_envelope(cls, args):
161171
)
162172

163173
return envelope_definition
174+
#ds-snippet-end:eSign17Step3

0 commit comments

Comments
 (0)