-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Support
login_required
, password
, suppress_nofitications
,…
… `verification_phone_number` and `additional_info` fields in sign request (#1250)
- Loading branch information
1 parent
d26bd4f
commit 3ee55b3
Showing
6 changed files
with
179 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,8 +62,16 @@ public void createListAndCancelSignRequest() throws InterruptedException { | |
files.add(new BoxSignRequestFile(file2.getID())); | ||
|
||
String signerEmail = "[email protected]"; | ||
Boolean signerLoginRequired = false; | ||
String signerPassword = "password"; | ||
Boolean signerSuppressNotifications = false; | ||
String signerVerficationPhoneNumber = "+16314578901"; | ||
|
||
List<BoxSignRequestSigner> signers = new ArrayList<>(); | ||
BoxSignRequestSigner newSigner = new BoxSignRequestSigner(signerEmail).setInPerson(false); | ||
BoxSignRequestSigner newSigner = new BoxSignRequestSigner(signerEmail).setInPerson(false) | ||
.setLoginRequired(signerLoginRequired).setPassword(signerPassword) | ||
.setSuppressNotifications(signerSuppressNotifications) | ||
.setVerificationPhoneNumber(signerVerficationPhoneNumber); | ||
signers.add(newSigner); | ||
|
||
signedFileFolder = uniqueFolder.createFolder("Folder - signRequestIntegrationTest").getResource(); | ||
|
@@ -114,6 +122,9 @@ public void createListAndCancelSignRequest() throws InterruptedException { | |
assertEquals(file2.getID(), file2Info.getID()); | ||
assertEquals(signerEmail, signer.getEmail()); | ||
assertEquals(signRequestIdCreate, signRequestInfoGetByID.getID()); | ||
assertEquals(signerLoginRequired, signer.getLoginRequired()); | ||
assertEquals(signerSuppressNotifications, signer.getSuppressNotifications()); | ||
assertEquals(signerVerficationPhoneNumber, signer.getVerificationPhoneNumber()); | ||
|
||
// Resend sign request | ||
retry(signRequestGetByID::resend, 5, 500); | ||
|
@@ -152,7 +163,7 @@ public void createListAndCancelSignRequest() throws InterruptedException { | |
} | ||
|
||
@Test | ||
public void createignRequestForGroup() throws InterruptedException { | ||
public void createSignRequestForGroup() throws InterruptedException { | ||
// Test Setup | ||
BoxAPIConnection api = jwtApiForServiceAccount(); | ||
BoxFolder uniqueFolder = getUniqueFolder(api); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,6 +50,10 @@ public void createSignRequestSucceeds() { | |
|
||
final String signerRedirectUrl = "https://box.com/redirect_url_signer_1"; | ||
final String signerDeclinedRedirectUrl = "https://box.com/declined_redirect_url_signer_1"; | ||
final Boolean signerLoginRequired = true; | ||
final String signerPassword = "password"; | ||
final Boolean signerSuppressNotifications = true; | ||
final String signerVerficationPhoneNumber = "1234567890"; | ||
|
||
String result = TestUtils.getFixture("BoxSignRequest/CreateSignRequest200"); | ||
|
||
|
@@ -65,6 +69,10 @@ public void createSignRequestSucceeds() { | |
List<BoxSignRequestSigner> signers = new ArrayList<>(); | ||
BoxSignRequestSigner newSigner = new BoxSignRequestSigner("[email protected]"); | ||
newSigner.setEmbedUrlExternalUserId("1234"); | ||
newSigner.setLoginRequired(signerLoginRequired); | ||
newSigner.setPassword(signerPassword); | ||
newSigner.setSuppressNotifications(signerSuppressNotifications); | ||
newSigner.setVerificationPhoneNumber(signerVerficationPhoneNumber); | ||
signers.add(newSigner); | ||
|
||
String parentFolderId = "55555"; | ||
|
@@ -81,6 +89,9 @@ public void createSignRequestSucceeds() { | |
assertEquals(signerRedirectUrl, signer.getRedirectUrl()); | ||
assertEquals(iframeableEmedUrl, signer.getIframeableEmedUrl()); | ||
assertEquals(signerDeclinedRedirectUrl, signer.getDeclinedRedirectUrl()); | ||
assertEquals(signerLoginRequired, signer.getLoginRequired()); | ||
assertEquals(signerSuppressNotifications, signer.getSuppressNotifications()); | ||
assertEquals(signerVerficationPhoneNumber, signer.getVerificationPhoneNumber()); | ||
|
||
assertEquals(prepareUrl, signRequestInfo.getPrepareUrl()); | ||
assertEquals(redirectUrl, signRequestInfo.getRedirectUrl()); | ||
|
@@ -109,6 +120,10 @@ public void getSignRequestInfoSucceeds() { | |
|
||
final String signerRedirectUrl = "https://box.com/redirect_url_signer_1"; | ||
final String signerDeclinedRedirectUrl = "https://box.com/declined_redirect_url_signer_1"; | ||
final Boolean signerLoginRequired = true; | ||
final Boolean signerSuppressNotifications = true; | ||
final String signerVerficationPhoneNumber = "1234567890"; | ||
final String signerDecisionAdditionalInfo = "Requesting changes before signing."; | ||
|
||
final String templateId = "93153068-5420-467b-b8ef-aaaaaaaaaaa"; | ||
|
||
|
@@ -130,6 +145,10 @@ public void getSignRequestInfoSucceeds() { | |
assertEquals(signerRedirectUrl, signer.getRedirectUrl()); | ||
assertEquals(signerDeclinedRedirectUrl, signer.getDeclinedRedirectUrl()); | ||
assertEquals(iframeableEmedUrl, signer.getIframeableEmedUrl()); | ||
assertEquals(signerLoginRequired, signer.getLoginRequired()); | ||
assertEquals(signerSuppressNotifications, signer.getSuppressNotifications()); | ||
assertEquals(signerVerficationPhoneNumber, signer.getVerificationPhoneNumber()); | ||
assertEquals(signerDecisionAdditionalInfo, signer.getSignerDecision().getAdditionalInfo()); | ||
|
||
assertEquals(prepareUrl, signRequestInfo.getPrepareUrl()); | ||
assertEquals(redirectUrl, signRequestInfo.getRedirectUrl()); | ||
|