Skip to content

Commit

Permalink
feat: Support iframeable_embed_url for sign request
Browse files Browse the repository at this point in the history
  • Loading branch information
congminh1254 committed Sep 21, 2023
1 parent 8fb1b64 commit 9612359
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Box.V2.Test/BoxSignRequestsManagerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ public async Task CreateSignRequest_OptionalParams_Success()
Assert.AreEqual("[email protected]", response.Signers[0].Email);
Assert.AreEqual("https://box.com/redirect_url_signer_1", response.Signers[0].RedirectUrl.ToString());
Assert.AreEqual("https://box.com/declined_redirect_url_signer_1", response.Signers[0].DeclinedRedirectUrl.ToString());
Assert.AreEqual("https://app.box.com/embed/sign/document/bf7aaac6/", response.Signers[0].IframeableEmbedUrl);
Assert.AreEqual(1, response.Signers[0].Inputs.Count);
Assert.IsTrue(response.Signers[0].Inputs[0].CheckboxValue.Value);
Assert.AreEqual(BoxSignRequestSingerInputContentType.checkbox, response.Signers[0].Inputs[0].ContentType);
Expand Down Expand Up @@ -213,6 +214,7 @@ public async Task GetSignRequest_Success()
Assert.AreEqual("[email protected]", response.Entries[0].Signers[0].Email);
Assert.AreEqual("https://box.com/redirect_url_signer_1", response.Entries[0].Signers[0].RedirectUrl.ToString());
Assert.AreEqual("https://box.com/declined_redirect_url_signer_1", response.Entries[0].Signers[0].DeclinedRedirectUrl.ToString());
Assert.AreEqual("https://app.box.com/embed/sign/document/bf7aaac6/", response.Entries[0].Signers[0].IframeableEmbedUrl);
Assert.AreEqual("12345", response.Entries[0].ParentFolder.Id);
Assert.IsTrue(response.Entries[0].IsDocumentPreparationNeeded);
Assert.IsTrue(response.Entries[0].AreRemindersEnabled);
Expand Down Expand Up @@ -259,6 +261,7 @@ public async Task GetSignRequestById_Success()
Assert.AreEqual("[email protected]", response.Signers[0].Email);
Assert.AreEqual("https://box.com/redirect_url_signer_1", response.Signers[0].RedirectUrl.ToString());
Assert.AreEqual("https://box.com/declined_redirect_url_signer_1", response.Signers[0].DeclinedRedirectUrl.ToString());
Assert.AreEqual("https://app.box.com/embed/sign/document/bf7aaac6/", response.Signers[0].IframeableEmbedUrl);
Assert.AreEqual(1, response.Signers[0].Inputs.Count);
Assert.IsTrue(response.Signers[0].Inputs[0].CheckboxValue.Value);
Assert.AreEqual(BoxSignRequestSingerInputContentType.checkbox, response.Signers[0].Inputs[0].ContentType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
],
"embed_url": "https://example.com",
"redirect_url": "https://box.com/redirect_url_signer_1",
"declined_redirect_url": "https://box.com/declined_redirect_url_signer_1"
"declined_redirect_url": "https://box.com/declined_redirect_url_signer_1",
"iframeable_embed_url": "https://app.box.com/embed/sign/document/bf7aaac6/"
}
],
"signing_log": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
],
"embed_url": "https://example.com",
"redirect_url": "https://box.com/redirect_url_signer_1",
"declined_redirect_url": "https://box.com/declined_redirect_url_signer_1"
"declined_redirect_url": "https://box.com/declined_redirect_url_signer_1",
"iframeable_embed_url": "https://app.box.com/embed/sign/document/bf7aaac6/"
}
],
"signing_log": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
],
"embed_url": "https://example.com",
"redirect_url": "https://box.com/redirect_url_signer_1",
"declined_redirect_url": "https://box.com/declined_redirect_url_signer_1"
"declined_redirect_url": "https://box.com/declined_redirect_url_signer_1",
"iframeable_embed_url": "https://app.box.com/embed/sign/document/bf7aaac6/"
}
],
"source_files": [
Expand Down
3 changes: 2 additions & 1 deletion Box.V2.Test/Fixtures/BoxSignRequest/GetSignRequest200.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
],
"embed_url": "https://example.com",
"redirect_url": "https://box.com/redirect_url_signer_1",
"declined_redirect_url": "https://box.com/declined_redirect_url_signer_1"
"declined_redirect_url": "https://box.com/declined_redirect_url_signer_1",
"iframeable_embed_url": "https://app.box.com/embed/sign/document/bf7aaac6/"
}
],
"signing_log": {
Expand Down
7 changes: 7 additions & 0 deletions Box.V2/Models/BoxSignRequestSigner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class BoxSignRequestSigner
public const string FieldSignerDecision = "signer_decision";
public const string FieldDeclinedRedirectUrl = "declined_redirect_url";
public const string FieldRedirectUrl = "redirect_url";
public const string FieldIframeableEmbedUrl = "iframeable_embed_url";

/// <summary>
/// Email address of the signer.
Expand Down Expand Up @@ -90,6 +91,12 @@ public class BoxSignRequestSigner
/// </summary>
[JsonProperty(PropertyName = FieldRedirectUrl)]
public virtual Uri RedirectUrl { get; private set; }

/// <summary>
/// This URL is specifically designed for signing documents within an HTML iframe tag.
/// </summary>
[JsonProperty(PropertyName = FieldIframeableEmbedUrl)]
public virtual string IframeableEmbedUrl { get; private set; }
}

/// <summary>
Expand Down

0 comments on commit 9612359

Please sign in to comment.