Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Sign request support multiple documents #911

Merged
merged 2 commits into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class BoxSharedItemsManagerIntegrationTest : TestInFolder
public async Task SharedItemsAsync_ForSharedFolder_ShouldReturnSharedFolder()
{
var folder = await CreateFolder();
var password = "secret";
var password = "Secret123";
var sharedLinkReq = new BoxSharedLinkRequest()
{
Access = BoxSharedLinkAccessType.open,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,18 @@ public class BoxSignRequestManagerIntegrationTest : TestInFolder
public async Task CreateSignRequestAsync_ForCorrectSignRequestCreateRequest_ShouldCreateNewSignRequest()
{
var fileToSign = await CreateSmallFile(FolderId);
var fileToSign2 = await CreateSmallFile(FolderId);
var signRequestCreateRequest = new BoxSignRequestCreateRequest()
{
SourceFiles = new List<BoxSignRequestCreateSourceFile>()
{
new BoxSignRequestCreateSourceFile()
{
Id = fileToSign.Id
},
new BoxSignRequestCreateSourceFile()
{
Id = fileToSign2.Id
}
},
Signers = new List<BoxSignRequestSignerCreate>()
Expand All @@ -44,6 +49,7 @@ public async Task CreateSignRequestAsync_ForCorrectSignRequestCreateRequest_Shou
BoxSignRequest signRequest = await UserClient.SignRequestsManager.CreateSignRequestAsync(signRequestCreateRequest);
Assert.IsNotNull(signRequest.Id);
Assert.AreEqual(signRequestCreateRequest.SourceFiles[0].Id, signRequest.SourceFiles[0].Id);
Assert.AreEqual(signRequestCreateRequest.SourceFiles[1].Id, signRequest.SourceFiles[1].Id);
Assert.AreEqual(signRequestCreateRequest.RedirectUrl.ToString(), signRequest.RedirectUrl.ToString());
Assert.AreEqual(signRequestCreateRequest.DeclinedRedirectUrl.ToString(), signRequest.DeclinedRedirectUrl.ToString());
Assert.AreEqual(signRequestCreateRequest.ParentFolder.Id, signRequest.ParentFolder.Id);
Expand Down
2 changes: 1 addition & 1 deletion Box.V2/Models/BoxSignRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public class BoxSignRequest : BoxEntity
public virtual BoxFile SigningLog { get; private set; }

/// <summary>
/// List of files to create a signing document from. This is currently limited to one file. Only the ID and type fields are required for each file.
/// List of files to create a signing document from. This is currently limited to ten files. Only the ID and type fields are required for each file.
/// </summary>
[JsonProperty(PropertyName = FieldSourceFiles)]
public virtual List<BoxFile> SourceFiles { get; private set; }
Expand Down
4 changes: 2 additions & 2 deletions Box.V2/Models/Request/BoxSignRequestCreateRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public class BoxSignRequestCreateRequest
public List<BoxSignRequestSignerCreate> Signers { get; set; }

/// <summary>
/// List of files to create a signing document from.This is currently limited to one file.Only the ID and type fields are required for each file.
/// List of files to create a signing document from. This is currently limited to ten files. Only the ID and type fields are required for each file.
/// </summary>
[JsonProperty(PropertyName = "source_files")]
public List<BoxSignRequestCreateSourceFile> SourceFiles { get; set; }
Expand All @@ -94,7 +94,7 @@ public class BoxSignRequestCreateRequest
}

/// <summary>
/// List of files to create a signing document from.This is currently limited to one file.Only the ID and type fields are required for each file.
/// List of files to create a signing document from. This is currently limited to ten files. Only the ID and type fields are required for each file.
/// </summary>
public class BoxSignRequestCreateSourceFile
{
Expand Down
2 changes: 1 addition & 1 deletion docs/sign-requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Create Sign Request
------------------------

The `SignRequestsManager.CreateSignRequestAsync(BoxSignRequestCreateRequest signRequestCreateRequest)`
method will create a Sign Request. You need to provide at least one file (from which the signing document will be created) and at least one signer to receive the Sign Request.
method will create a Sign Request. You need to provide at least one file and up to ten files (from which the signing document will be created) with at least one signer to receive the Sign Request.

<!-- sample post_sign_requests -->
```c#
Expand Down
Loading