Skip to content

Commit cb405dd

Browse files
committed
2 parents ca42270 + 72769ed commit cb405dd

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

app/eSignature/examples/eg034_use_conditional_recipients.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,20 @@ def worker(cls, args):
5656
envelope_args = args["envelope_args"]
5757
# 1. Create the envelope request object
5858
envelope_definition = cls.make_envelope(envelope_args)
59+
#ds-snippet-start:eSign34Step2
5960
api_client = create_api_client(
6061
base_path=args["base_path"], access_token=args["access_token"]
6162
)
63+
#ds-snippet-end:eSign34Step2
6264
# 2. Call Envelopes::create API method
6365
# Exceptions will be caught by the calling function
66+
#ds-snippet-start:eSign34Step4
6467
envelopes_api = EnvelopesApi(api_client)
6568
results = envelopes_api.create_envelope(
6669
account_id=args["account_id"],
6770
envelope_definition=envelope_definition
6871
)
72+
#ds-snippet-end:eSign34Step4
6973

7074
return {"envelope_id": results.envelope_id}
7175

@@ -84,6 +88,7 @@ def make_envelope(cls, args):
8488
# If signer1 doesn't check the checkbox the envelope will be sent to the signer_2a
8589
# If signer1 check the checkbox the envelope will be sent to the signer_2b
8690

91+
#ds-snippet-start:eSign34Step3
8792
# Create the envelope definition
8893
env = EnvelopeDefinition(email_subject="ApproveIfChecked")
8994

@@ -247,3 +252,4 @@ def make_envelope(cls, args):
247252
# To request that the envelope be created as a draft, set to "created"
248253
env.status = args["status"]
249254
return env
255+
#ds-snippet-end:eSign34Step3

app/rooms/examples/eg001_create_room_with_data.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,19 @@ def worker(args):
2323
4. Post the room using SDK
2424
"""
2525
# Step 1. Create an API client with headers
26+
#ds-snippet-start:Rooms1Step2
2627
api_client = create_rooms_api_client(
2728
access_token=args["access_token"]
2829
)
30+
#ds-snippet-end:Rooms1Step2
2931

3032
# Step 2. Get Default Admin role id
3133
roles_api = RolesApi(api_client)
3234
roles = roles_api.get_roles(account_id=args["account_id"])
3335
role_id = [role.role_id for role in roles.roles if role.is_default_for_admin][0]
3436

3537
# Step 3. Create RoomForCreate object
38+
#ds-snippet-start:Rooms1Step3
3639
room = RoomForCreate(
3740
name=args["room_name"],
3841
role_id=role_id,
@@ -49,11 +52,14 @@ def worker(args):
4952
}
5053
)
5154
)
55+
#ds-snippet-end:Rooms1Step3
5256

5357
# Step 4. Post the room using SDK
58+
#ds-snippet-start:Rooms1Step4
5459
rooms_api = RoomsApi(api_client)
5560
response = rooms_api.create_room(
5661
body=room,
5762
account_id=args["account_id"]
5863
)
64+
#ds-snippet-end:Rooms2Step4
5965
return response

app/rooms/examples/eg007_create_form_group.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,28 +22,25 @@ def worker(args):
2222
3. POST the form using SDK
2323
"""
2424

25-
# Step 2 start
2625

2726
# Create an API with headers
27+
#ds-snippet-start:Rooms7Step2
2828
api_client = create_rooms_api_client(access_token=args["access_token"])
29+
#ds-snippet-end:Rooms7Step2
2930

30-
# Step 2 end
31-
32-
# Step 3 start
3331

3432
# Create FormGroupForCreate object
33+
#ds-snippet-start:Rooms7Step3
3534
form = FormGroupForCreate(name=args["form_group_name"])
35+
#ds-snippet-end:Rooms7Step3
3636

37-
# Step 3 end
38-
39-
# Step 4 start
4037

4138
# Post the form object using SDK
39+
#ds-snippet-start:Rooms7Step4
4240
form_groups_api = FormGroupsApi(api_client)
4341
response = form_groups_api.create_form_group(
4442
body=form, account_id=args["account_id"]
4543
)
46-
47-
# Step 4 end
44+
#ds-snippet-end:Rooms7Step4
4845

4946
return response

0 commit comments

Comments
 (0)