Skip to content

Commit 444a5a7

Browse files
committed
DEVDOCS-10556 adding codeDepot markers
1 parent 8a454f5 commit 444a5a7

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

src/Services/Examples/eSignature/BulkSendEnvelopesService.php

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,15 @@ class BulkSendEnvelopesService
2222
{
2323
/**
2424
* Do the work of the example
25-
* 1. Create the envelope request object
26-
* 2. Send the envelope
25+
* Create the envelope request object
26+
* Send the envelope
2727
*
2828
* @param $args array
2929
* @param SignatureClientService $clientService
3030
* @param string $demoDocsPath
3131
* @return string
3232
* @throws ApiException
3333
*/
34-
# ***DS.snippet.0.start
3534
public static function bulkSendEnvelopes(
3635
array $args,
3736
SignatureClientService $clientService,
@@ -41,19 +40,19 @@ public static function bulkSendEnvelopes(
4140
$bulk_envelopes_api = $clientService->getBulkEnvelopesApi();
4241
$envelope_api = $clientService->getEnvelopeApi();
4342

44-
# Step 3 start
43+
#ds-snippet-start:eSign31Step3
4544
$bulk_sending_list = BulkSendEnvelopesService::createBulkSendingList($args["signers"]);
4645
$bulk_list = $bulk_envelopes_api->createBulkSendList($args["account_id"], $bulk_sending_list);
4746
$bulk_list_id = $bulk_list["list_id"];
48-
# Step 3 end
47+
#ds-snippet-end:eSign31Step3
4948

50-
# Step 4.1 start
49+
#ds-snippet-start:eSign31Step4
5150
$envelope_definition = BulkSendEnvelopesService::make_envelope($demoDocsPath, $docPDF);
5251
$envelope = $envelope_api->createEnvelope($args["account_id"], $envelope_definition);
5352
$envelope_id = $envelope["envelope_id"];
54-
# Step 4.1 end
53+
#ds-snippet-end:eSign31Step4
5554

56-
# Step 5 start
55+
#ds-snippet-start:eSign31Step5
5756
$text_custom_fields = new TextCustomField(
5857
[
5958
"name" => "mailingListId",
@@ -71,20 +70,20 @@ public static function bulkSendEnvelopes(
7170
);
7271

7372
$envelope_api->createCustomFields($args["account_id"], $envelope_id, $custom_fields);
74-
# Step 5 end
73+
#ds-snippet-end:eSign31Step5
7574

76-
# Step 6 start
75+
#ds-snippet-start:eSign31Step6
7776
$bulk_send_request = new BulkSendRequest(['envelope_or_template_id' => $envelope_id]);
7877

7978
$batch = $bulk_envelopes_api->createBulkSendRequest(
8079
$args["account_id"],
8180
$bulk_list_id,
8281
$bulk_send_request
8382
);
84-
# step 6 end
83+
#ds-snippet-end:eSign31Step6
8584

86-
# Step 7 start
8785
# Exceptions will be caught by the calling function
86+
#ds-snippet-start:eSign31Step7
8887
try {
8988
$bulkSendBatchStatus = $bulk_envelopes_api->getBulkSendBatchStatus(
9089
$args['account_id'],
@@ -94,9 +93,9 @@ public static function bulkSendEnvelopes(
9493
$clientService->showErrorTemplate($e);
9594
exit;
9695
}
97-
# Step 7 end
9896

9997
return $bulkSendBatchStatus;
98+
#ds-snippet-end:eSign31Step7
10099
}
101100

102101
/**
@@ -149,7 +148,6 @@ public static function createBulkSendingList(array $signers): BulkSendingList
149148
return $bulk_sending_list;
150149
}
151150

152-
# Step 4.2 start
153151
/**
154152
* Creates envelope definition
155153
* Parameters for the envelope: signer_email, signer_name, signer_client_id
@@ -235,6 +233,4 @@ public static function make_envelope(string $demoDocsPath, string $docPDF): Enve
235233
return $envelope_definition;
236234
}
237235
# Step 4.2 end
238-
239-
# ***DS.snippet.0.end
240236
}

0 commit comments

Comments
 (0)