Skip to content

Commit be9dfe1

Browse files
committed
DEVDOCS-10443 eSign 39 cD mkrs
1 parent b41f57e commit be9dfe1

1 file changed

Lines changed: 13 additions & 15 deletions

File tree

app/eSignature/examples/eg039_in_person_signer.py

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def get_args():
1616
"""Get request and session arguments"""
1717
# More data validation would be a good idea here
1818
# Strip anything other than characters listed
19-
# 1. Parse request arguments
19+
# Parse request arguments
2020
signer_name = pattern.sub("", request.form.get("signer_name"))
2121
envelope_args = {
2222
"host_email": session["ds_user_email"],
@@ -41,45 +41,45 @@ def worker(cls, args):
4141
3. Create the Recipient View request object
4242
4. Obtain the recipient_view_url for the embedded signing
4343
"""
44+
#ds-snippet-start:eSign39Step3
4445
envelope_args = args["envelope_args"]
45-
# 1. Create the envelope request object
46+
# Create the envelope request object
4647
envelope_definition = cls.make_envelope(envelope_args)
4748

48-
# 2. call Envelopes::create API method
49+
# Call Envelopes::create API method
4950
# Exceptions will be caught by the calling function
5051
api_client = create_api_client(base_path=args["base_path"], access_token=args["access_token"])
5152

5253
envelope_api = EnvelopesApi(api_client)
5354
results = envelope_api.create_envelope(account_id=args["account_id"], envelope_definition=envelope_definition)
5455

5556
envelope_id = results.envelope_id
56-
# Step 3 end
57+
#ds-snippet-end:eSign39Step3
5758

58-
# 3. Create the Recipient View request object
59-
# Step 4 start
59+
# Create the Recipient View request object
60+
#ds-snippet-start:eSign39Step4
6061
recipient_view_request = RecipientViewRequest(
6162
authentication_method=authentication_method,
6263
recipient_id="1",
6364
return_url=envelope_args["ds_return_url"],
6465
user_name=envelope_args["host_name"],
6566
email=envelope_args["host_email"]
6667
)
67-
# Step 4 end
68+
#ds-snippet-end:eSign39Step4
6869

69-
# Step 5 start
70-
# 4. Obtain the recipient_view_url for the embedded signing session
70+
# Obtain the recipient_view_url for the embedded signing session
7171
# Exceptions will be caught by the calling function
72+
#ds-snippet-start:eSign39Step5
7273
results = envelope_api.create_recipient_view(
7374
account_id=args["account_id"],
7475
envelope_id=envelope_id,
7576
recipient_view_request=recipient_view_request
7677
)
77-
# Step 5 end
78-
7978
return {"envelope_id": envelope_id, "redirect_url": results.url}
79+
#ds-snippet-end:eSign39Step5
8080

8181
@classmethod
82-
# Step 2 start
82+
#ds-snippet-start:eSign39Step2
8383
def make_envelope(cls, args):
8484
"""
8585
Creates envelope
@@ -138,6 +138,4 @@ def make_envelope(cls, args):
138138
)
139139

140140
return envelope_definition
141-
# Step 2 end
142-
143-
# End
141+
#ds-snippet-end:eSign39Step2

0 commit comments

Comments
 (0)