Skip to content

Commit 6790903

Browse files
committed
added back Meastro ApiType
1 parent 62ad6b7 commit 6790903

File tree

4 files changed

+16
-11
lines changed

4 files changed

+16
-11
lines changed

src/Services/ApiTypes.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ abstract class ApiTypes
1010
const ROOMS = 'Rooms';
1111
const ESIGNATURE = 'eSignature';
1212
const CONNECT = 'Connect';
13+
const MAESTRO = 'Maestro';
1314
const WEBFORMS = 'WebForms';
1415
const NOTARY = 'Notary';
1516
}

src/Services/Examples/Notary/SendWithThirdPartyNotaryService.php

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515

1616
class SendWithThirdPartyNotaryService
1717
{
18-
public static function sendWithNotary($signerEmail, $signerName, $envelopesApi, $accountId, $demoPath) {
18+
public static function sendWithNotary($signerEmail, $signerName, $envelopesApi, $accountId, $demoPath): mixed {
1919
$env = SendWithThirdPartyNotaryService::makeEnvelope($signerEmail, $signerName, $demoPath);
2020

2121
$results = $envelopesApi->createEnvelope($accountId, $env);
2222
return $results;
2323
}
2424

25-
static function makeEnvelope($signerEmail, $signerName, $demoPath) {
25+
static function makeEnvelope($signerEmail, $signerName, $demoPath): EnvelopeDefinition {
2626
$env = new EnvelopeDefinition();
2727
$env->setEmailSubject("Please sign this document set");
2828

@@ -38,17 +38,16 @@ static function makeEnvelope($signerEmail, $signerName, $demoPath) {
3838
return $env;
3939
}
4040

41-
static function getDocuments($signerEmail, $signerName,$demoPath) {
42-
43-
44-
$doc1 = new Document();
41+
static function getDocuments($signerEmail, $signerName,$demoPath): array {
42+
$doc = new Document();
4543
$b64 = base64_encode(SendWithThirdPartyNotaryService::getDocumentExample($signerEmail, $signerName, $demoPath));
46-
$doc1->setDocumentBase64($b64);
47-
$doc1->setName("Order acknowledgement");
48-
$doc1->setFileExtension("html");
49-
$doc1->setDocumentId("1");
5044

51-
return [$doc1];
45+
$doc->setDocumentBase64($b64);
46+
$doc->setName("Order acknowledgement");
47+
$doc->setFileExtension("html");
48+
$doc->setDocumentId("1");
49+
50+
return [$doc];
5251
}
5352

5453
static function getDocumentExample($signerEmail, $signerName, $demoPath): string {

src/Services/ManifestService.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ public static function getAPIByLink(string $link): string
8282
case "con":
8383
$currentAPI = ApiTypes::CONNECT;
8484
break;
85+
case "mae":
86+
$currentAPI = ApiTypes::MAESTRO;
87+
break;
8588
case "web":
8689
$currentAPI = ApiTypes::WEBFORMS;
8790
break;

tests/JWTLoginMethod.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ public static function jwtAuthenticationMethod(string $apiType, TestConfig $test
3535
$scopes = "signature user_write group_read organization_read permission_read user_read "
3636
. "account_read domain_read identity_provider_read user_data_redact"
3737
. "asset_group_account_read asset_group_account_clone_write asset_group_account_clone_read organization_sub_account_write organization_sub_account_read";
38+
} elseif ($apiType == ApiTypes::MAESTRO) {
39+
$scopes = "signature aow_manage";
3840
} elseif ($apiType == ApiTypes::WEBFORMS) {
3941
$scopes = "signature webforms_read webforms_instance_read webforms_instance_write";
4042
} elseif ($apiType == ApiTypes::NOTARY) {

0 commit comments

Comments
 (0)