Skip to content

Commit f838a35

Browse files
feat(boxsdkgen): add signer language, cancel sign request reason (box/box-openapi#584) (#1720)
1 parent 2533e3c commit f838a35

9 files changed

Lines changed: 143 additions & 8 deletions

File tree

.codegen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "engineHash": "bfb97cc", "specHash": "ccdb456", "version": "5.3.0" }
1+
{ "engineHash": "bfb97cc", "specHash": "77eac4b", "version": "5.3.0" }

docs/sdkgen/signrequests.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ client.getSignRequests().cancelSignRequest(createdSignRequest.getId())
2525

2626
- signRequestId `String`
2727
- The ID of the signature request. Example: "33243242"
28+
- requestBody `SignRequestCancelRequest`
29+
- Request body of cancelSignRequest method
2830
- headers `CancelSignRequestHeaders`
2931
- Headers of cancelSignRequest method
3032

src/main/java/com/box/sdkgen/managers/folders/GetFolderByIdQueryParams.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ public class GetFolderByIdQueryParams {
4747
/**
4848
* The offset of the item at which to begin the response.
4949
*
50-
* <p>Queries with offset parameter value exceeding 10000 will be rejected with a 400 response.
50+
* <p>Offset-based pagination is not guaranteed to work reliably for high offset values and may
51+
* fail for large datasets. In those cases, reduce the number of items in the folder (for example,
52+
* by restructuring the folder into smaller subfolders) before retrying the request.
5153
*/
5254
public Long offset;
5355

src/main/java/com/box/sdkgen/managers/folders/GetFolderItemsQueryParams.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ public class GetFolderItemsQueryParams {
3939
/**
4040
* The offset of the item at which to begin the response.
4141
*
42-
* <p>Queries with offset parameter value exceeding 10000 will be rejected with a 400 response.
42+
* <p>Offset-based pagination is not guaranteed to work reliably for high offset values and may
43+
* fail for large datasets. In those cases, use marker-based pagination by setting `usemarker` to
44+
* `true`.
4345
*/
4446
public Long offset;
4547

src/main/java/com/box/sdkgen/managers/signrequests/SignRequestsManager.java

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import com.box.sdkgen.networking.fetchresponse.FetchResponse;
1313
import com.box.sdkgen.networking.network.NetworkSession;
1414
import com.box.sdkgen.schemas.signrequest.SignRequest;
15+
import com.box.sdkgen.schemas.signrequestcancelrequest.SignRequestCancelRequest;
1516
import com.box.sdkgen.schemas.signrequestcreaterequest.SignRequestCreateRequest;
1617
import com.box.sdkgen.schemas.signrequests.SignRequests;
1718
import com.box.sdkgen.serialization.json.JsonManager;
@@ -38,7 +39,17 @@ protected SignRequestsManager(Builder builder) {
3839
* @param signRequestId The ID of the signature request. Example: "33243242"
3940
*/
4041
public SignRequest cancelSignRequest(String signRequestId) {
41-
return cancelSignRequest(signRequestId, new CancelSignRequestHeaders());
42+
return cancelSignRequest(signRequestId, null, new CancelSignRequestHeaders());
43+
}
44+
45+
/**
46+
* Cancels a sign request.
47+
*
48+
* @param signRequestId The ID of the signature request. Example: "33243242"
49+
* @param requestBody Request body of cancelSignRequest method
50+
*/
51+
public SignRequest cancelSignRequest(String signRequestId, SignRequestCancelRequest requestBody) {
52+
return cancelSignRequest(signRequestId, requestBody, new CancelSignRequestHeaders());
4253
}
4354

4455
/**
@@ -48,6 +59,20 @@ public SignRequest cancelSignRequest(String signRequestId) {
4859
* @param headers Headers of cancelSignRequest method
4960
*/
5061
public SignRequest cancelSignRequest(String signRequestId, CancelSignRequestHeaders headers) {
62+
return cancelSignRequest(signRequestId, null, headers);
63+
}
64+
65+
/**
66+
* Cancels a sign request.
67+
*
68+
* @param signRequestId The ID of the signature request. Example: "33243242"
69+
* @param requestBody Request body of cancelSignRequest method
70+
* @param headers Headers of cancelSignRequest method
71+
*/
72+
public SignRequest cancelSignRequest(
73+
String signRequestId,
74+
SignRequestCancelRequest requestBody,
75+
CancelSignRequestHeaders headers) {
5176
Map<String, String> headersMap = prepareParams(mergeMaps(mapOf(), headers.getExtraHeaders()));
5277
FetchResponse response =
5378
this.networkSession
@@ -62,6 +87,8 @@ public SignRequest cancelSignRequest(String signRequestId, CancelSignRequestHead
6287
"/cancel"),
6388
"POST")
6489
.headers(headersMap)
90+
.data((!(requestBody == null) ? JsonManager.serialize(requestBody) : null))
91+
.contentType("application/json")
6592
.responseFormat(ResponseFormat.JSON)
6693
.auth(this.auth)
6794
.networkSession(this.networkSession)

src/main/java/com/box/sdkgen/schemas/aiextractstructuredresponse/AiExtractStructuredResponse.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ public class AiExtractStructuredResponse extends SerializableObject {
2929
protected String completionReason;
3030

3131
/**
32-
* The confidence score numeric values for each extracted field as a JSON dictionary. This can be
33-
* empty if no field could be extracted.
32+
* The confidence score levels and numeric values for each extracted field as a JSON dictionary.
33+
* This can be empty if no field could be extracted.
3434
*/
3535
@JsonProperty("confidence_score")
3636
protected Map<String, Object> confidenceScore;
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
package com.box.sdkgen.schemas.signrequestcancelrequest;
2+
3+
import com.box.sdkgen.internal.NullableFieldTracker;
4+
import com.box.sdkgen.internal.SerializableObject;
5+
import com.fasterxml.jackson.annotation.JsonFilter;
6+
import java.util.Objects;
7+
8+
/** Request body for cancelling a sign request. */
9+
@JsonFilter("nullablePropertyFilter")
10+
public class SignRequestCancelRequest extends SerializableObject {
11+
12+
/** An optional reason for cancelling the sign request. */
13+
protected String reason;
14+
15+
public SignRequestCancelRequest() {
16+
super();
17+
}
18+
19+
protected SignRequestCancelRequest(Builder builder) {
20+
super();
21+
this.reason = builder.reason;
22+
markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
23+
}
24+
25+
public String getReason() {
26+
return reason;
27+
}
28+
29+
@Override
30+
public boolean equals(Object o) {
31+
if (this == o) {
32+
return true;
33+
}
34+
if (o == null || getClass() != o.getClass()) {
35+
return false;
36+
}
37+
SignRequestCancelRequest casted = (SignRequestCancelRequest) o;
38+
return Objects.equals(reason, casted.reason);
39+
}
40+
41+
@Override
42+
public int hashCode() {
43+
return Objects.hash(reason);
44+
}
45+
46+
@Override
47+
public String toString() {
48+
return "SignRequestCancelRequest{" + "reason='" + reason + '\'' + "}";
49+
}
50+
51+
public static class Builder extends NullableFieldTracker {
52+
53+
protected String reason;
54+
55+
public Builder reason(String reason) {
56+
this.reason = reason;
57+
return this;
58+
}
59+
60+
public SignRequestCancelRequest build() {
61+
return new SignRequestCancelRequest(this);
62+
}
63+
}
64+
}

src/main/java/com/box/sdkgen/schemas/signrequestcreatesigner/SignRequestCreateSigner.java

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@ public class SignRequestCreateSigner extends SerializableObject {
108108
@Nullable
109109
protected Boolean suppressNotifications;
110110

111+
/**
112+
* The language of the user, formatted in modified version of the [ISO
113+
* 639-1](https://developer.box.com/guides/api-calls/language-codes) format.
114+
*/
115+
@Nullable protected String language;
116+
111117
public SignRequestCreateSigner() {
112118
super();
113119
}
@@ -126,6 +132,7 @@ protected SignRequestCreateSigner(Builder builder) {
126132
this.password = builder.password;
127133
this.signerGroupId = builder.signerGroupId;
128134
this.suppressNotifications = builder.suppressNotifications;
135+
this.language = builder.language;
129136
markNullableFieldsAsSet(builder.getExplicitlySetNullableFields());
130137
}
131138

@@ -177,6 +184,10 @@ public Boolean getSuppressNotifications() {
177184
return suppressNotifications;
178185
}
179186

187+
public String getLanguage() {
188+
return language;
189+
}
190+
180191
@Override
181192
public boolean equals(Object o) {
182193
if (this == o) {
@@ -197,7 +208,8 @@ public boolean equals(Object o) {
197208
&& Objects.equals(verificationPhoneNumber, casted.verificationPhoneNumber)
198209
&& Objects.equals(password, casted.password)
199210
&& Objects.equals(signerGroupId, casted.signerGroupId)
200-
&& Objects.equals(suppressNotifications, casted.suppressNotifications);
211+
&& Objects.equals(suppressNotifications, casted.suppressNotifications)
212+
&& Objects.equals(language, casted.language);
201213
}
202214

203215
@Override
@@ -214,7 +226,8 @@ public int hashCode() {
214226
verificationPhoneNumber,
215227
password,
216228
signerGroupId,
217-
suppressNotifications);
229+
suppressNotifications,
230+
language);
218231
}
219232

220233
@Override
@@ -267,6 +280,10 @@ public String toString() {
267280
+ "suppressNotifications='"
268281
+ suppressNotifications
269282
+ '\''
283+
+ ", "
284+
+ "language='"
285+
+ language
286+
+ '\''
270287
+ "}";
271288
}
272289

@@ -296,6 +313,8 @@ public static class Builder extends NullableFieldTracker {
296313

297314
protected Boolean suppressNotifications;
298315

316+
protected String language;
317+
299318
public Builder email(String email) {
300319
this.email = email;
301320
this.markNullableFieldAsSet("email");
@@ -370,6 +389,12 @@ public Builder suppressNotifications(Boolean suppressNotifications) {
370389
return this;
371390
}
372391

392+
public Builder language(String language) {
393+
this.language = language;
394+
this.markNullableFieldAsSet("language");
395+
return this;
396+
}
397+
373398
public SignRequestCreateSigner build() {
374399
return new SignRequestCreateSigner(this);
375400
}

src/main/java/com/box/sdkgen/schemas/signrequestsigner/SignRequestSigner.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ public boolean equals(Object o) {
103103
&& Objects.equals(password, casted.password)
104104
&& Objects.equals(signerGroupId, casted.signerGroupId)
105105
&& Objects.equals(suppressNotifications, casted.suppressNotifications)
106+
&& Objects.equals(language, casted.language)
106107
&& Objects.equals(hasViewedDocument, casted.hasViewedDocument)
107108
&& Objects.equals(signerDecision, casted.signerDecision)
108109
&& Objects.equals(inputs, casted.inputs)
@@ -126,6 +127,7 @@ public int hashCode() {
126127
password,
127128
signerGroupId,
128129
suppressNotifications,
130+
language,
129131
hasViewedDocument,
130132
signerDecision,
131133
inputs,
@@ -185,6 +187,10 @@ public String toString() {
185187
+ suppressNotifications
186188
+ '\''
187189
+ ", "
190+
+ "language='"
191+
+ language
192+
+ '\''
193+
+ ", "
188194
+ "hasViewedDocument='"
189195
+ hasViewedDocument
190196
+ '\''
@@ -346,6 +352,13 @@ public Builder suppressNotifications(Boolean suppressNotifications) {
346352
return this;
347353
}
348354

355+
@Override
356+
public Builder language(String language) {
357+
this.language = language;
358+
this.markNullableFieldAsSet("language");
359+
return this;
360+
}
361+
349362
public SignRequestSigner build() {
350363
return new SignRequestSigner(this);
351364
}

0 commit comments

Comments
 (0)