Skip to content

Commit ca80151

Browse files
committed
Merge branch 'master' into feature/add-linter-to-CI-CD
2 parents 678e085 + 2dfa246 commit ca80151

29 files changed

+208
-94
lines changed

composer.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/demo_documents/order_form.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ <h4>Ordered by {signer_name}</h4>
2929
<tr>
3030
<td style="padding: 9px 8px 0;border-bottom: 1px solid #667;">Harmonica</td>
3131
<td style="padding: 9px 8px 0;border-bottom: 1px solid #667;">
32-
<span style="color:white;">/l1q/</span>
32+
<span style="color:black;">/l1q/</span>
3333
</td>
3434
<td style="padding: 9px 8px 0;border-bottom: 1px solid #667;">$5</td>
3535
<td style="padding: 9px 8px 0;border-bottom: 1px solid #667;">
@@ -39,7 +39,7 @@ <h4>Ordered by {signer_name}</h4>
3939
<tr>
4040
<td style="padding: 9px 8px 0;border-bottom: 1px solid #667;">Xylophone</td>
4141
<td style="padding: 9px 8px 0;border-bottom: 1px solid #667;">
42-
<span style="color:white;">/l2q/</span>
42+
<span style="color:black;">/l2q/</span>
4343
</td>
4444
<td style="padding: 9px 8px 0;border-bottom: 1px solid #667;">$150</td>
4545
<td style="padding: 9px 8px 0;border-bottom: 1px solid #667;">

src/Controllers/Examples/Rooms/EG006CreateExternalFormFillSession.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@ public function __construct()
3838
protected function createController(): void
3939
{
4040
$this->checkDsToken();
41+
#ds-snippet-start:Rooms6Step3
4142
$room_id = $this->args['room_id'];
4243
$form_id = $this->args['form_id'];
4344
$this->args['x_frame_allowed_url'] = "http://localhost:8080";
45+
#ds-snippet-end:Rooms6Step3
4446

4547
if ($room_id && !$form_id) {
4648
$room = CreateExternalFormFillSessionService::getRoom(
@@ -88,6 +90,7 @@ function ($f) {
8890
$this->clientService
8991
);
9092

93+
#ds-snippet-start:Rooms6Step5
9194
if ($createExternalFormResponse) {
9295
$createExternalFormJSON = json_decode((string)$createExternalFormResponse, true);
9396

@@ -99,6 +102,7 @@ function ($f) {
99102
$createExternalFormJSON['url'],
100103
);
101104
}
105+
#ds-snippet-end:Rooms6Step5
102106
}
103107
}
104108

src/Controllers/Examples/Rooms/EG008GrantOfficeAccessToFormGroup.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,24 @@ public function __construct()
2222
{
2323
parent::__construct();
2424

25-
# Step 3 Start
25+
#ds-snippet-start:Rooms8Step3
2626
$offices = GrantOfficeAccessToFormGroupService::getOffices(
2727
$this->routerService,
2828
$this->clientService,
2929
$this->args,
3030
$this::EG
3131
);
32-
# Step 3 End
32+
#ds-snippet-end:Rooms8Step3
3333

34-
# Step 4 Start
34+
#ds-snippet-start:Rooms8Step4
3535
$formGroups = GrantOfficeAccessToFormGroupService::getFormGroups(
3636
$this->routerService,
3737
$this->clientService,
3838
$this->args,
3939
$this::EG
4040
);
4141
parent::controller(null, null, null, $offices, $formGroups);
42-
# Step 4 End
42+
#ds-snippet-end:Rooms8Step4
4343
}
4444

4545
/**

src/Controllers/Examples/eSignature/EG022KbAuthentication.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function __construct()
3434
*/
3535
public function createController(): void
3636
{
37-
# Step 1: Obtain your OAuth Token
37+
# Obtain your OAuth Token
3838
$this->checkDsToken();
3939

4040
$envelopeAuthentification = KbAuthenticationService::kbAuthentification(

src/Services/Examples/Admin/AuditUsersService.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,38 +25,38 @@ public static function auditUsers(
2525
array $arguments,
2626
string $organizationId
2727
): array {
28-
# Step 5a start
28+
#ds-snippet-start:Admin5Step5
2929
$usersInformation = [];
3030
$userDrilldownResponse = new UsersDrilldownResponse();
31-
# Step 5a end
31+
#ds-snippet-end:Admin5Step5
3232

3333
$admin_api = $clientService->getUsersApi();
3434

3535
# Here we set the from_date to filter envelopes for the last 10 days
3636
# Use ISO 8601 date format
3737

38-
# Step 3 start
38+
#ds-snippet-start:Admin5Step3
3939
$options = new GetUsersOptions();
4040
$options->setAccountId($arguments["account_id"]);
4141
$from_date = date("c", (time() - (10 * 24 * 60 * 60)));
4242
$options->setLastModifiedSince($from_date);
4343

4444
try {
4545
$modifiedUsers = $admin_api->getUsers($organizationId, $options);
46-
# Step 3 end
46+
#ds-snippet-end:Admin5Step3
4747

48-
# Step 4 start
48+
#ds-snippet-start:Admin5Step4
4949
foreach ($modifiedUsers["users"] as $user) {
5050
$profileOptions = new GetUserProfilesOptions();
5151
$profileOptions->setEmail($user["email"]);
52-
# Step 4 end
52+
#ds-snippet-end:Admin5Step4
5353

54-
# Step 5b start
54+
#ds-snippet-start:Admin5Step5
5555
$res = $admin_api->getUserProfiles($organizationId, $profileOptions);
5656
$userDrilldownResponse->setUsers($res->getUsers());
5757
$decoded = json_decode((string)$userDrilldownResponse, true);
5858
array_push($usersInformation, $decoded["users"]);
59-
# Step 5b end
59+
#ds-snippet-end:Admin5Step5
6060
}
6161
} catch (ApiException $e) {
6262
$GLOBALS['twig']->display(

src/Services/Examples/Admin/CreateNewUserService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ public static function addActiveUser(
3939
]);
4040
#ds-snippet-end:Admin1Step4
4141

42+
#ds-snippet-start:Admin1Step5
4243
$accountInfo = new NewUserRequestAccountProperties([
4344
'id' => $accountId,
4445
'permission_profile' => $permissionProfile,
4546
'groups' => [ $group ]
4647
]);
4748

48-
#ds-snippet-start:Admin1Step5
4949
$request = new GlobalNewUserRequest([
5050
'user_name' => $userData['Name'],
5151
'first_name' => $userData['FirstName'],

src/Services/Examples/Rooms/CreateExternalFormFillSessionService.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
class CreateExternalFormFillSessionService
1010
{
11+
#ds-snippet-start:Rooms6Step4
1112
public static function createExternalFormFillSession($args, $clientService)
1213
{
1314
$form_session_api = $clientService->getExternalFormFillSessionsApi();
@@ -21,6 +22,7 @@ public static function createExternalFormFillSession($args, $clientService)
2122
}
2223
return $response;
2324
}
25+
#ds-snippet-end:Rooms6Step4
2426

2527
/**
2628
* Get available Rooms

src/Services/Examples/Rooms/GrantOfficeAccessToFormGroupService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ class GrantOfficeAccessToFormGroupService
1616
public static function grantOfficeAccessToFormGroup(array $args, $clientService): void
1717
{
1818
try {
19-
# Step 5 Start
19+
#ds-snippet-start:Rooms8Step5
2020
$form_api = $clientService->getFromGroupsApi();
2121
$form_api->grantOfficeAccessToFormGroup($args['form_group_id'], $args['office_id'], $args["account_id"]);
22-
# Step 5 End
22+
#ds-snippet-end:Rooms8Step5
2323
} catch (ApiException $e) {
2424
error_log($e);
2525
$clientService->showErrorTemplate($e);

src/Services/Examples/eSignature/AccessCodeAuthenticationService.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,18 @@ class AccessCodeAuthenticationService
1919
public static function accessCodeAuthentication(array $args, $clientService, $demoDocsPath): array
2020
{
2121
# 1. Create the envelope request object
22-
$envelope_definition = AccessCodeAuthenticationService::makeEnvelope($args["envelope_args"], $demoDocsPath);
22+
#ds-snippet-start:eSign19Step3
23+
$envelope_definition = AccessCodeAuthenticationService::make_envelope($args["envelope_args"], $demoDocsPath);
24+
#ds-snippet-end:eSign19Step3
2325

2426
# 2. call Envelopes::create API method
2527
# Exceptions will be caught by the calling function
28+
#ds-snippet-start:eSign19Step4
2629
$envelope_api = $clientService->getEnvelopeApi();
2730
$createdEnvelope = $envelope_api->createEnvelope($args['account_id'], $envelope_definition);
2831

2932
return ['envelope_id' => $createdEnvelope->getEnvelopeId()];
33+
#ds-snippet-end:eSign19Step4
3034
}
3135

3236
/**
@@ -37,6 +41,7 @@ public static function accessCodeAuthentication(array $args, $clientService, $de
3741
* @param $args array
3842
* @return mixed -- returns an envelope definition
3943
*/
44+
#ds-snippet-start:eSign19Step3
4045
public static function makeEnvelope(array $args, $demoDocsPath): EnvelopeDefinition
4146
{
4247
$envelopeAndSigner = RecipientAuthenticationService::constructAnEnvelope($demoDocsPath);
@@ -62,4 +67,5 @@ public static function makeEnvelope(array $args, $demoDocsPath): EnvelopeDefinit
6267

6368
return $envelope_definition;
6469
}
70+
#ds-snippet-end:eSign19Step3
6571
}

0 commit comments

Comments
 (0)