Skip to content

Commit 4d82d21

Browse files
committed
Release v3.4.1
1 parent 05eaf19 commit 4d82d21

7 files changed

Lines changed: 25 additions & 21 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# signNow API Java SDK
2-
## v3.4
2+
## v3.4.1
33

44
[![Java Version](https://img.shields.io/badge/codebase-java--11-yellowgreen)](https://www.java.com/)
55

src/main/java/com/signnow/api/document/response/data/FieldValidator.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
package com.signnow.api.document.response.data;
1111

1212
import com.fasterxml.jackson.annotation.JsonCreator;
13+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
1314
import com.fasterxml.jackson.annotation.JsonProperty;
1415
import com.signnow.core.data.ApiData;
1516
import java.util.LinkedHashMap;
@@ -20,6 +21,7 @@
2021
/**
2122
* This class represents a field validator in the signNow API.
2223
*/
24+
@JsonIgnoreProperties(ignoreUnknown = true)
2325
public final class FieldValidator extends ApiData {
2426

2527
/**
@@ -213,4 +215,4 @@ public static FieldValidator fromMap(@NotNull Map<String, Object> data) {
213215
(DisplayJsonAttribute) data.get("display_json_attributes"),
214216
(String) data.getOrDefault("formula_calculation", ""));
215217
}
216-
}
218+
}

src/main/java/com/signnow/api/document/response/data/Text.java

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
package com.signnow.api.document.response.data;
1111

1212
import com.fasterxml.jackson.annotation.JsonCreator;
13+
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
1314
import com.fasterxml.jackson.annotation.JsonProperty;
1415
import com.signnow.core.data.ApiData;
1516
import java.util.LinkedHashMap;
@@ -21,6 +22,7 @@
2122
* Text class extends ApiData.
2223
* Represents the text data in a document.
2324
*/
25+
@JsonIgnoreProperties(ignoreUnknown = true)
2426
public final class Text extends ApiData {
2527

2628
/**
@@ -117,19 +119,19 @@ public final class Text extends ApiData {
117119
* The width of the text.
118120
*/
119121
@JsonProperty("width")
120-
private final String width;
122+
private final Integer width;
121123

122124
/**
123125
* The height of the text.
124126
*/
125127
@JsonProperty("height")
126-
private final String height;
128+
private final Integer height;
127129

128130
/**
129131
* The line height of the text.
130132
*/
131133
@JsonProperty("line_height")
132-
private final float lineHeight;
134+
private final String lineHeight;
133135

134136
/**
135137
* The color of the text.
@@ -219,9 +221,9 @@ public Text(
219221
@JsonProperty("owner_as_recipient") boolean ownerAsRecipient,
220222
@JsonProperty("user_id") String userId,
221223
@JsonProperty("email") String email,
222-
@JsonProperty("width") String width,
223-
@JsonProperty("height") String height,
224-
@JsonProperty("line_height") float lineHeight,
224+
@JsonProperty("width") Integer width,
225+
@JsonProperty("height") Integer height,
226+
@JsonProperty("line_height") String lineHeight,
225227
@JsonProperty("color") String color,
226228
@JsonProperty("italic") boolean italic,
227229
@JsonProperty("underline") boolean underline,
@@ -342,7 +344,7 @@ public String getY() {
342344
*
343345
* @return The width of the text.
344346
*/
345-
public String getWidth() {
347+
public Integer getWidth() {
346348
return this.width;
347349
}
348350

@@ -351,7 +353,7 @@ public String getWidth() {
351353
*
352354
* @return The height of the text.
353355
*/
354-
public String getHeight() {
356+
public Integer getHeight() {
355357
return this.height;
356358
}
357359

@@ -360,7 +362,7 @@ public String getHeight() {
360362
*
361363
* @return The line height of the text.
362364
*/
363-
public float getLineHeight() {
365+
public String getLineHeight() {
364366
return this.lineHeight;
365367
}
366368

@@ -543,9 +545,9 @@ public static Text fromMap(@NotNull Map<String, Object> data) {
543545
(Boolean) data.get("owner_as_recipient"),
544546
(String) data.getOrDefault("user_id", null),
545547
(String) data.getOrDefault("email", ""),
546-
(String) data.getOrDefault("width", ""),
547-
(String) data.getOrDefault("height", ""),
548-
(Float) data.getOrDefault("line_height", 0f),
548+
(Integer) data.getOrDefault("width", null),
549+
(Integer) data.getOrDefault("height", null),
550+
(String) data.getOrDefault("line_height", "0"),
549551
(String) data.getOrDefault("color", null),
550552
(Boolean) data.getOrDefault("italic", false),
551553
(Boolean) data.getOrDefault("underline", false),
@@ -554,4 +556,4 @@ public static Text fromMap(@NotNull Map<String, Object> data) {
554556
(String) data.getOrDefault("prefill_content_type", null),
555557
(String) data.getOrDefault("integration_object_id", null));
556558
}
557-
}
559+
}

src/main/java/com/signnow/api/document/response/data/TextCollection.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* This class represents a collection of text data.
1616
* It extends the TypedCollection class with a type parameter of String.
1717
*/
18-
public class TextCollection extends TypedCollection<String> {
18+
public class TextCollection extends TypedCollection<Text> {
1919

2020
/**
2121
* Default constructor for TextCollection class.
@@ -24,4 +24,4 @@ public class TextCollection extends TypedCollection<String> {
2424
public TextCollection() {
2525
super();
2626
}
27-
}
27+
}

src/main/java/com/signnow/core/config/ConfigRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
public class ConfigRepository {
1717

1818
private static final int READ_TIMEOUT = 15;
19-
private static final String CLIENT_NAME = "SignNowApiClient/v3.4 (Java)";
19+
private static final String CLIENT_NAME = "SignNowApiClient/v3.4.1 (Java)";
2020
private static final String DEFAULT_DOWNLOADS_DIR = "./src/main/resources/downloads";
2121

2222
private final Map<String, String> configMap;

src/test/java/com/signnow/api/proxy/ProxyJsonTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ public void testCustomProxyRequest() {
9898
expectation.get("original_filename"),
9999
response.getRawJson().get("original_filename").asText());
100100
this.assertSame(
101-
expectation.get("origin_user_id"), response.getRawJson().get("origin_user_id"));
101+
expectation.get("origin_user_id"), response.getRawJson().get("origin_user_id").asText());
102102
this.assertSame(
103103
expectation.get("origin_document_id"),
104-
response.getRawJson().get("origin_document_id"));
104+
response.getRawJson().get("origin_document_id").asText());
105105
this.assertSame(expectation.get("owner"), response.getRawJson().get("owner").asText());
106106
this.assertSame(
107107
expectation.get("owner_name"), response.getRawJson().get("owner_name").asText());

src/test/resources/wiremock/mappings/get_document_get.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)