Skip to content
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# signNow API Java SDK
## v3.4
## v3.4.1

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
package com.signnow.api.document.response.data;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.signnow.core.data.ApiData;
import java.util.LinkedHashMap;
Expand All @@ -20,6 +21,7 @@
/**
* This class represents a field validator in the signNow API.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public final class FieldValidator extends ApiData {

/**
Expand Down Expand Up @@ -213,4 +215,4 @@ public static FieldValidator fromMap(@NotNull Map<String, Object> data) {
(DisplayJsonAttribute) data.get("display_json_attributes"),
(String) data.getOrDefault("formula_calculation", ""));
}
}
}
28 changes: 15 additions & 13 deletions src/main/java/com/signnow/api/document/response/data/Text.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
package com.signnow.api.document.response.data;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.signnow.core.data.ApiData;
import java.util.LinkedHashMap;
Expand All @@ -21,6 +22,7 @@
* Text class extends ApiData.
* Represents the text data in a document.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public final class Text extends ApiData {

/**
Expand Down Expand Up @@ -117,19 +119,19 @@ public final class Text extends ApiData {
* The width of the text.
*/
@JsonProperty("width")
private final String width;
private final Integer width;

/**
* The height of the text.
*/
@JsonProperty("height")
private final String height;
private final Integer height;

/**
* The line height of the text.
*/
@JsonProperty("line_height")
private final float lineHeight;
private final String lineHeight;

/**
* The color of the text.
Expand Down Expand Up @@ -219,9 +221,9 @@ public Text(
@JsonProperty("owner_as_recipient") boolean ownerAsRecipient,
@JsonProperty("user_id") String userId,
@JsonProperty("email") String email,
@JsonProperty("width") String width,
@JsonProperty("height") String height,
@JsonProperty("line_height") float lineHeight,
@JsonProperty("width") Integer width,
@JsonProperty("height") Integer height,
@JsonProperty("line_height") String lineHeight,
@JsonProperty("color") String color,
@JsonProperty("italic") boolean italic,
@JsonProperty("underline") boolean underline,
Expand Down Expand Up @@ -342,7 +344,7 @@ public String getY() {
*
* @return The width of the text.
*/
public String getWidth() {
public Integer getWidth() {
return this.width;
}

Expand All @@ -351,7 +353,7 @@ public String getWidth() {
*
* @return The height of the text.
*/
public String getHeight() {
public Integer getHeight() {
return this.height;
}

Expand All @@ -360,7 +362,7 @@ public String getHeight() {
*
* @return The line height of the text.
*/
public float getLineHeight() {
public String getLineHeight() {
return this.lineHeight;
}

Expand Down Expand Up @@ -543,9 +545,9 @@ public static Text fromMap(@NotNull Map<String, Object> data) {
(Boolean) data.get("owner_as_recipient"),
(String) data.getOrDefault("user_id", null),
(String) data.getOrDefault("email", ""),
(String) data.getOrDefault("width", ""),
(String) data.getOrDefault("height", ""),
(Float) data.getOrDefault("line_height", 0f),
(Integer) data.getOrDefault("width", null),
(Integer) data.getOrDefault("height", null),
(String) data.getOrDefault("line_height", "0"),
(String) data.getOrDefault("color", null),
(Boolean) data.getOrDefault("italic", false),
(Boolean) data.getOrDefault("underline", false),
Expand All @@ -554,4 +556,4 @@ public static Text fromMap(@NotNull Map<String, Object> data) {
(String) data.getOrDefault("prefill_content_type", null),
(String) data.getOrDefault("integration_object_id", null));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* This class represents a collection of text data.
* It extends the TypedCollection class with a type parameter of String.
*/
public class TextCollection extends TypedCollection<String> {
public class TextCollection extends TypedCollection<Text> {

/**
* Default constructor for TextCollection class.
Expand All @@ -24,4 +24,4 @@ public class TextCollection extends TypedCollection<String> {
public TextCollection() {
super();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
public class ConfigRepository {

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

private final Map<String, String> configMap;
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/com/signnow/api/proxy/ProxyJsonTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ public void testCustomProxyRequest() {
expectation.get("original_filename"),
response.getRawJson().get("original_filename").asText());
this.assertSame(
expectation.get("origin_user_id"), response.getRawJson().get("origin_user_id"));
expectation.get("origin_user_id"), response.getRawJson().get("origin_user_id").asText());
this.assertSame(
expectation.get("origin_document_id"),
response.getRawJson().get("origin_document_id"));
response.getRawJson().get("origin_document_id").asText());
this.assertSame(expectation.get("owner"), response.getRawJson().get("owner").asText());
this.assertSame(
expectation.get("owner_name"), response.getRawJson().get("owner_name").asText());
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/wiremock/mappings/get_document_get.json

Large diffs are not rendered by default.