From 39f9846806c44a83e3760ece82f2d845181adf36 Mon Sep 17 00:00:00 2001 From: dvacca-onfido <134616519+dvacca-onfido@users.noreply.github.com> Date: Wed, 18 Feb 2026 16:28:29 +0000 Subject: [PATCH 1/3] Upgrade after onfido-openapi-spec change 4204f00 --- .release.json | 6 +- src/main/java/com/onfido/JSON.java | 7 +- .../model/DeviceIntelligenceBreakdown.java | 42 +-- ...DeviceIntelligenceBreakdownProperties.java | 354 ------------------ .../model/DeviceIntelligenceProperties.java | 36 +- ...> DeviceIntelligencePropertiesDevice.java} | 106 +++--- ...iceIntelligencePropertiesGeolocation.java} | 62 +-- ...va => DeviceIntelligencePropertiesIp.java} | 54 +-- .../model/WebhookEventPayloadResource.java | 35 +- .../model/WebhookEventResourceStatus.java | 100 +++++ 10 files changed, 271 insertions(+), 531 deletions(-) delete mode 100644 src/main/java/com/onfido/model/DeviceIntelligenceBreakdownProperties.java rename src/main/java/com/onfido/model/{DeviceIntelligenceBreakdownPropertiesDevice.java => DeviceIntelligencePropertiesDevice.java} (86%) rename src/main/java/com/onfido/model/{DeviceIntelligenceBreakdownPropertiesGeolocation.java => DeviceIntelligencePropertiesGeolocation.java} (79%) rename src/main/java/com/onfido/model/{DeviceIntelligenceBreakdownPropertiesIp.java => DeviceIntelligencePropertiesIp.java} (80%) create mode 100644 src/main/java/com/onfido/model/WebhookEventResourceStatus.java diff --git a/.release.json b/.release.json index d86b84f..0d07295 100644 --- a/.release.json +++ b/.release.json @@ -1,9 +1,9 @@ { "source": { "repo_url": "https://github.com/onfido/onfido-openapi-spec", - "short_sha": "d66dc55", - "long_sha": "d66dc55aa73210fc789fcb93a3cba9d1d1f89a8a", - "version": "v6.0.0" + "short_sha": "4204f00", + "long_sha": "4204f00a2c7f0f5bd61da3b5442d8eb613418e9e", + "version": "" }, "release": "v7.0.0" } diff --git a/src/main/java/com/onfido/JSON.java b/src/main/java/com/onfido/JSON.java index 6a5e76d..156f2bd 100644 --- a/src/main/java/com/onfido/JSON.java +++ b/src/main/java/com/onfido/JSON.java @@ -152,11 +152,10 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DeviceIntelligenceBreakdown.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DeviceIntelligenceBreakdownDevice.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DeviceIntelligenceBreakdownDeviceBreakdown.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DeviceIntelligenceBreakdownProperties.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DeviceIntelligenceBreakdownPropertiesDevice.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DeviceIntelligenceBreakdownPropertiesGeolocation.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DeviceIntelligenceBreakdownPropertiesIp.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DeviceIntelligenceProperties.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DeviceIntelligencePropertiesDevice.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DeviceIntelligencePropertiesGeolocation.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DeviceIntelligencePropertiesIp.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DeviceIntelligenceReport.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.Document.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.onfido.model.DocumentBreakdown.CustomTypeAdapterFactory()); diff --git a/src/main/java/com/onfido/model/DeviceIntelligenceBreakdown.java b/src/main/java/com/onfido/model/DeviceIntelligenceBreakdown.java index 50a318c..336ff59 100644 --- a/src/main/java/com/onfido/model/DeviceIntelligenceBreakdown.java +++ b/src/main/java/com/onfido/model/DeviceIntelligenceBreakdown.java @@ -21,7 +21,6 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import com.onfido.model.DeviceIntelligenceBreakdownDevice; -import com.onfido.model.DeviceIntelligenceBreakdownProperties; import java.io.IOException; import java.util.Arrays; @@ -59,12 +58,6 @@ public class DeviceIntelligenceBreakdown { @javax.annotation.Nullable private DeviceIntelligenceBreakdownDevice device; - public static final String SERIALIZED_NAME_PROPERTIES = "properties"; - @Deprecated - @SerializedName(SERIALIZED_NAME_PROPERTIES) - @javax.annotation.Nullable - private DeviceIntelligenceBreakdownProperties properties; - public DeviceIntelligenceBreakdown() { } @@ -86,29 +79,6 @@ public void setDevice(@javax.annotation.Nullable DeviceIntelligenceBreakdownDevi this.device = device; } - - @Deprecated - public DeviceIntelligenceBreakdown properties(@javax.annotation.Nullable DeviceIntelligenceBreakdownProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get properties - * @return properties - * @deprecated - */ - @Deprecated - @javax.annotation.Nullable - public DeviceIntelligenceBreakdownProperties getProperties() { - return properties; - } - - @Deprecated - public void setProperties(@javax.annotation.Nullable DeviceIntelligenceBreakdownProperties properties) { - this.properties = properties; - } - /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -164,14 +134,13 @@ public boolean equals(Object o) { return false; } DeviceIntelligenceBreakdown deviceIntelligenceBreakdown = (DeviceIntelligenceBreakdown) o; - return Objects.equals(this.device, deviceIntelligenceBreakdown.device) && - Objects.equals(this.properties, deviceIntelligenceBreakdown.properties)&& + return Objects.equals(this.device, deviceIntelligenceBreakdown.device)&& Objects.equals(this.additionalProperties, deviceIntelligenceBreakdown.additionalProperties); } @Override public int hashCode() { - return Objects.hash(device, properties, additionalProperties); + return Objects.hash(device, additionalProperties); } @Override @@ -179,7 +148,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DeviceIntelligenceBreakdown {\n"); sb.append(" device: ").append(toIndentedString(device)).append("\n"); - sb.append(" properties: ").append(toIndentedString(properties)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -202,7 +170,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("device", "properties")); + openapiFields = new HashSet(Arrays.asList("device")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -225,10 +193,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("device") != null && !jsonObj.get("device").isJsonNull()) { DeviceIntelligenceBreakdownDevice.validateJsonElement(jsonObj.get("device")); } - // validate the optional field `properties` - if (jsonObj.get("properties") != null && !jsonObj.get("properties").isJsonNull()) { - DeviceIntelligenceBreakdownProperties.validateJsonElement(jsonObj.get("properties")); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/com/onfido/model/DeviceIntelligenceBreakdownProperties.java b/src/main/java/com/onfido/model/DeviceIntelligenceBreakdownProperties.java deleted file mode 100644 index 23dfad5..0000000 --- a/src/main/java/com/onfido/model/DeviceIntelligenceBreakdownProperties.java +++ /dev/null @@ -1,354 +0,0 @@ -/* - * Onfido Public API v3.6 - * The Onfido Public API (v3.6) - * - * The version of the OpenAPI document: v3.6 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package com.onfido.model; - -import java.util.Objects; -import java.util.Locale; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.onfido.model.DeviceIntelligenceBreakdownPropertiesDevice; -import com.onfido.model.DeviceIntelligenceBreakdownPropertiesGeolocation; -import com.onfido.model.DeviceIntelligenceBreakdownPropertiesIp; -import java.io.IOException; -import java.util.Arrays; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.Locale; - -import com.onfido.JSON; - -/** - * DeviceIntelligenceBreakdownProperties - * @deprecated - */ -@Deprecated -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class DeviceIntelligenceBreakdownProperties { - public static final String SERIALIZED_NAME_DEVICE = "device"; - @SerializedName(SERIALIZED_NAME_DEVICE) - @javax.annotation.Nullable - private DeviceIntelligenceBreakdownPropertiesDevice device; - - public static final String SERIALIZED_NAME_IP = "ip"; - @SerializedName(SERIALIZED_NAME_IP) - @javax.annotation.Nullable - private DeviceIntelligenceBreakdownPropertiesIp ip; - - public static final String SERIALIZED_NAME_GEOLOCATION = "geolocation"; - @SerializedName(SERIALIZED_NAME_GEOLOCATION) - @javax.annotation.Nullable - private DeviceIntelligenceBreakdownPropertiesGeolocation geolocation; - - public DeviceIntelligenceBreakdownProperties() { - } - - public DeviceIntelligenceBreakdownProperties device(@javax.annotation.Nullable DeviceIntelligenceBreakdownPropertiesDevice device) { - this.device = device; - return this; - } - - /** - * Get device - * @return device - */ - @javax.annotation.Nullable - public DeviceIntelligenceBreakdownPropertiesDevice getDevice() { - return device; - } - - public void setDevice(@javax.annotation.Nullable DeviceIntelligenceBreakdownPropertiesDevice device) { - this.device = device; - } - - - public DeviceIntelligenceBreakdownProperties ip(@javax.annotation.Nullable DeviceIntelligenceBreakdownPropertiesIp ip) { - this.ip = ip; - return this; - } - - /** - * Get ip - * @return ip - */ - @javax.annotation.Nullable - public DeviceIntelligenceBreakdownPropertiesIp getIp() { - return ip; - } - - public void setIp(@javax.annotation.Nullable DeviceIntelligenceBreakdownPropertiesIp ip) { - this.ip = ip; - } - - - public DeviceIntelligenceBreakdownProperties geolocation(@javax.annotation.Nullable DeviceIntelligenceBreakdownPropertiesGeolocation geolocation) { - this.geolocation = geolocation; - return this; - } - - /** - * Get geolocation - * @return geolocation - */ - @javax.annotation.Nullable - public DeviceIntelligenceBreakdownPropertiesGeolocation getGeolocation() { - return geolocation; - } - - public void setGeolocation(@javax.annotation.Nullable DeviceIntelligenceBreakdownPropertiesGeolocation geolocation) { - this.geolocation = geolocation; - } - - /** - * A container for additional, undeclared properties. - * This is a holder for any undeclared properties as specified with - * the 'additionalProperties' keyword in the OAS document. - */ - private Map additionalProperties; - - /** - * Set the additional (undeclared) property with the specified name and value. - * If the property does not already exist, create it otherwise replace it. - * - * @param key name of the property - * @param value value of the property - * @return the DeviceIntelligenceBreakdownProperties instance itself - */ - public DeviceIntelligenceBreakdownProperties putAdditionalProperty(String key, Object value) { - if (this.additionalProperties == null) { - this.additionalProperties = new HashMap(); - } - this.additionalProperties.put(key, value); - return this; - } - - /** - * Return the additional (undeclared) property. - * - * @return a map of objects - */ - public Map getAdditionalProperties() { - return additionalProperties; - } - - /** - * Return the additional (undeclared) property with the specified name. - * - * @param key name of the property - * @return an object - */ - public Object getAdditionalProperty(String key) { - if (this.additionalProperties == null) { - return null; - } - return this.additionalProperties.get(key); - } - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeviceIntelligenceBreakdownProperties deviceIntelligenceBreakdownProperties = (DeviceIntelligenceBreakdownProperties) o; - return Objects.equals(this.device, deviceIntelligenceBreakdownProperties.device) && - Objects.equals(this.ip, deviceIntelligenceBreakdownProperties.ip) && - Objects.equals(this.geolocation, deviceIntelligenceBreakdownProperties.geolocation)&& - Objects.equals(this.additionalProperties, deviceIntelligenceBreakdownProperties.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(device, ip, geolocation, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeviceIntelligenceBreakdownProperties {\n"); - sb.append(" device: ").append(toIndentedString(device)).append("\n"); - sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); - sb.append(" geolocation: ").append(toIndentedString(geolocation)).append("\n"); - sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("device", "ip", "geolocation")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(0); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DeviceIntelligenceBreakdownProperties - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DeviceIntelligenceBreakdownProperties.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in DeviceIntelligenceBreakdownProperties is not found in the empty JSON string", DeviceIntelligenceBreakdownProperties.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `device` - if (jsonObj.get("device") != null && !jsonObj.get("device").isJsonNull()) { - DeviceIntelligenceBreakdownPropertiesDevice.validateJsonElement(jsonObj.get("device")); - } - // validate the optional field `ip` - if (jsonObj.get("ip") != null && !jsonObj.get("ip").isJsonNull()) { - DeviceIntelligenceBreakdownPropertiesIp.validateJsonElement(jsonObj.get("ip")); - } - // validate the optional field `geolocation` - if (jsonObj.get("geolocation") != null && !jsonObj.get("geolocation").isJsonNull()) { - DeviceIntelligenceBreakdownPropertiesGeolocation.validateJsonElement(jsonObj.get("geolocation")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeviceIntelligenceBreakdownProperties.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeviceIntelligenceBreakdownProperties' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DeviceIntelligenceBreakdownProperties.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DeviceIntelligenceBreakdownProperties value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - obj.remove("additionalProperties"); - // serialize additional properties - if (value.getAdditionalProperties() != null) { - for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { - if (entry.getValue() instanceof String) - obj.addProperty(entry.getKey(), (String) entry.getValue()); - else if (entry.getValue() instanceof Number) - obj.addProperty(entry.getKey(), (Number) entry.getValue()); - else if (entry.getValue() instanceof Boolean) - obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); - else if (entry.getValue() instanceof Character) - obj.addProperty(entry.getKey(), (Character) entry.getValue()); - else { - JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { - obj.add(entry.getKey(), jsonElement.getAsJsonArray()); - } else if (jsonElement.isJsonObject()) { - obj.add(entry.getKey(), jsonElement.getAsJsonObject()); - } - } - } - } - elementAdapter.write(out, obj); - } - - @Override - public DeviceIntelligenceBreakdownProperties read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - DeviceIntelligenceBreakdownProperties instance = thisAdapter.fromJsonTree(jsonObj); - for (Map.Entry entry : jsonObj.entrySet()) { - if (!openapiFields.contains(entry.getKey())) { - if (entry.getValue().isJsonPrimitive()) { // primitive type - if (entry.getValue().getAsJsonPrimitive().isString()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); - else if (entry.getValue().getAsJsonPrimitive().isNumber()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); - else if (entry.getValue().getAsJsonPrimitive().isBoolean()) - instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); - else - throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); - } else if (entry.getValue().isJsonArray()) { - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); - } else { // JSON object - instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); - } - } - } - return instance; - } - - }.nullSafe(); - } - } - - /** - * Create an instance of DeviceIntelligenceBreakdownProperties given an JSON string - * - * @param jsonString JSON string - * @return An instance of DeviceIntelligenceBreakdownProperties - * @throws IOException if the JSON string is invalid with respect to DeviceIntelligenceBreakdownProperties - */ - public static DeviceIntelligenceBreakdownProperties fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeviceIntelligenceBreakdownProperties.class); - } - - /** - * Convert an instance of DeviceIntelligenceBreakdownProperties to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/com/onfido/model/DeviceIntelligenceProperties.java b/src/main/java/com/onfido/model/DeviceIntelligenceProperties.java index e08dd05..b2ec2b9 100644 --- a/src/main/java/com/onfido/model/DeviceIntelligenceProperties.java +++ b/src/main/java/com/onfido/model/DeviceIntelligenceProperties.java @@ -20,9 +20,9 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; -import com.onfido.model.DeviceIntelligenceBreakdownPropertiesDevice; -import com.onfido.model.DeviceIntelligenceBreakdownPropertiesGeolocation; -import com.onfido.model.DeviceIntelligenceBreakdownPropertiesIp; +import com.onfido.model.DeviceIntelligencePropertiesDevice; +import com.onfido.model.DeviceIntelligencePropertiesGeolocation; +import com.onfido.model.DeviceIntelligencePropertiesIp; import java.io.IOException; import java.util.Arrays; @@ -58,22 +58,22 @@ public class DeviceIntelligenceProperties { public static final String SERIALIZED_NAME_DEVICE = "device"; @SerializedName(SERIALIZED_NAME_DEVICE) @javax.annotation.Nullable - private DeviceIntelligenceBreakdownPropertiesDevice device; + private DeviceIntelligencePropertiesDevice device; public static final String SERIALIZED_NAME_IP = "ip"; @SerializedName(SERIALIZED_NAME_IP) @javax.annotation.Nullable - private DeviceIntelligenceBreakdownPropertiesIp ip; + private DeviceIntelligencePropertiesIp ip; public static final String SERIALIZED_NAME_GEOLOCATION = "geolocation"; @SerializedName(SERIALIZED_NAME_GEOLOCATION) @javax.annotation.Nullable - private DeviceIntelligenceBreakdownPropertiesGeolocation geolocation; + private DeviceIntelligencePropertiesGeolocation geolocation; public DeviceIntelligenceProperties() { } - public DeviceIntelligenceProperties device(@javax.annotation.Nullable DeviceIntelligenceBreakdownPropertiesDevice device) { + public DeviceIntelligenceProperties device(@javax.annotation.Nullable DeviceIntelligencePropertiesDevice device) { this.device = device; return this; } @@ -83,16 +83,16 @@ public DeviceIntelligenceProperties device(@javax.annotation.Nullable DeviceInte * @return device */ @javax.annotation.Nullable - public DeviceIntelligenceBreakdownPropertiesDevice getDevice() { + public DeviceIntelligencePropertiesDevice getDevice() { return device; } - public void setDevice(@javax.annotation.Nullable DeviceIntelligenceBreakdownPropertiesDevice device) { + public void setDevice(@javax.annotation.Nullable DeviceIntelligencePropertiesDevice device) { this.device = device; } - public DeviceIntelligenceProperties ip(@javax.annotation.Nullable DeviceIntelligenceBreakdownPropertiesIp ip) { + public DeviceIntelligenceProperties ip(@javax.annotation.Nullable DeviceIntelligencePropertiesIp ip) { this.ip = ip; return this; } @@ -102,16 +102,16 @@ public DeviceIntelligenceProperties ip(@javax.annotation.Nullable DeviceIntellig * @return ip */ @javax.annotation.Nullable - public DeviceIntelligenceBreakdownPropertiesIp getIp() { + public DeviceIntelligencePropertiesIp getIp() { return ip; } - public void setIp(@javax.annotation.Nullable DeviceIntelligenceBreakdownPropertiesIp ip) { + public void setIp(@javax.annotation.Nullable DeviceIntelligencePropertiesIp ip) { this.ip = ip; } - public DeviceIntelligenceProperties geolocation(@javax.annotation.Nullable DeviceIntelligenceBreakdownPropertiesGeolocation geolocation) { + public DeviceIntelligenceProperties geolocation(@javax.annotation.Nullable DeviceIntelligencePropertiesGeolocation geolocation) { this.geolocation = geolocation; return this; } @@ -121,11 +121,11 @@ public DeviceIntelligenceProperties geolocation(@javax.annotation.Nullable Devic * @return geolocation */ @javax.annotation.Nullable - public DeviceIntelligenceBreakdownPropertiesGeolocation getGeolocation() { + public DeviceIntelligencePropertiesGeolocation getGeolocation() { return geolocation; } - public void setGeolocation(@javax.annotation.Nullable DeviceIntelligenceBreakdownPropertiesGeolocation geolocation) { + public void setGeolocation(@javax.annotation.Nullable DeviceIntelligencePropertiesGeolocation geolocation) { this.geolocation = geolocation; } @@ -245,15 +245,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti JsonObject jsonObj = jsonElement.getAsJsonObject(); // validate the optional field `device` if (jsonObj.get("device") != null && !jsonObj.get("device").isJsonNull()) { - DeviceIntelligenceBreakdownPropertiesDevice.validateJsonElement(jsonObj.get("device")); + DeviceIntelligencePropertiesDevice.validateJsonElement(jsonObj.get("device")); } // validate the optional field `ip` if (jsonObj.get("ip") != null && !jsonObj.get("ip").isJsonNull()) { - DeviceIntelligenceBreakdownPropertiesIp.validateJsonElement(jsonObj.get("ip")); + DeviceIntelligencePropertiesIp.validateJsonElement(jsonObj.get("ip")); } // validate the optional field `geolocation` if (jsonObj.get("geolocation") != null && !jsonObj.get("geolocation").isJsonNull()) { - DeviceIntelligenceBreakdownPropertiesGeolocation.validateJsonElement(jsonObj.get("geolocation")); + DeviceIntelligencePropertiesGeolocation.validateJsonElement(jsonObj.get("geolocation")); } } diff --git a/src/main/java/com/onfido/model/DeviceIntelligenceBreakdownPropertiesDevice.java b/src/main/java/com/onfido/model/DeviceIntelligencePropertiesDevice.java similarity index 86% rename from src/main/java/com/onfido/model/DeviceIntelligenceBreakdownPropertiesDevice.java rename to src/main/java/com/onfido/model/DeviceIntelligencePropertiesDevice.java index bc6a20d..7b01c08 100644 --- a/src/main/java/com/onfido/model/DeviceIntelligenceBreakdownPropertiesDevice.java +++ b/src/main/java/com/onfido/model/DeviceIntelligencePropertiesDevice.java @@ -50,10 +50,10 @@ import com.onfido.JSON; /** - * DeviceIntelligenceBreakdownPropertiesDevice + * DeviceIntelligencePropertiesDevice */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class DeviceIntelligenceBreakdownPropertiesDevice { +public class DeviceIntelligencePropertiesDevice { public static final String SERIALIZED_NAME_SDK_VERSION = "sdk_version"; @SerializedName(SERIALIZED_NAME_SDK_VERSION) @javax.annotation.Nullable @@ -400,10 +400,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti @javax.annotation.Nullable private BiometricCaptureEnum biometricCapture; - public DeviceIntelligenceBreakdownPropertiesDevice() { + public DeviceIntelligencePropertiesDevice() { } - public DeviceIntelligenceBreakdownPropertiesDevice sdkVersion(@javax.annotation.Nullable String sdkVersion) { + public DeviceIntelligencePropertiesDevice sdkVersion(@javax.annotation.Nullable String sdkVersion) { this.sdkVersion = sdkVersion; return this; } @@ -422,7 +422,7 @@ public void setSdkVersion(@javax.annotation.Nullable String sdkVersion) { } - public DeviceIntelligenceBreakdownPropertiesDevice sdkSource(@javax.annotation.Nullable SdkSourceEnum sdkSource) { + public DeviceIntelligencePropertiesDevice sdkSource(@javax.annotation.Nullable SdkSourceEnum sdkSource) { this.sdkSource = sdkSource; return this; } @@ -441,7 +441,7 @@ public void setSdkSource(@javax.annotation.Nullable SdkSourceEnum sdkSource) { } - public DeviceIntelligenceBreakdownPropertiesDevice authenticationType(@javax.annotation.Nullable AuthenticationTypeEnum authenticationType) { + public DeviceIntelligencePropertiesDevice authenticationType(@javax.annotation.Nullable AuthenticationTypeEnum authenticationType) { this.authenticationType = authenticationType; return this; } @@ -460,7 +460,7 @@ public void setAuthenticationType(@javax.annotation.Nullable AuthenticationTypeE } - public DeviceIntelligenceBreakdownPropertiesDevice rawModel(@javax.annotation.Nullable String rawModel) { + public DeviceIntelligencePropertiesDevice rawModel(@javax.annotation.Nullable String rawModel) { this.rawModel = rawModel; return this; } @@ -479,7 +479,7 @@ public void setRawModel(@javax.annotation.Nullable String rawModel) { } - public DeviceIntelligenceBreakdownPropertiesDevice os(@javax.annotation.Nullable String os) { + public DeviceIntelligencePropertiesDevice os(@javax.annotation.Nullable String os) { this.os = os; return this; } @@ -498,7 +498,7 @@ public void setOs(@javax.annotation.Nullable String os) { } - public DeviceIntelligenceBreakdownPropertiesDevice browser(@javax.annotation.Nullable String browser) { + public DeviceIntelligencePropertiesDevice browser(@javax.annotation.Nullable String browser) { this.browser = browser; return this; } @@ -517,7 +517,7 @@ public void setBrowser(@javax.annotation.Nullable String browser) { } - public DeviceIntelligenceBreakdownPropertiesDevice emulator(@javax.annotation.Nullable Boolean emulator) { + public DeviceIntelligencePropertiesDevice emulator(@javax.annotation.Nullable Boolean emulator) { this.emulator = emulator; return this; } @@ -536,7 +536,7 @@ public void setEmulator(@javax.annotation.Nullable Boolean emulator) { } - public DeviceIntelligenceBreakdownPropertiesDevice randomizedDevice(@javax.annotation.Nullable Boolean randomizedDevice) { + public DeviceIntelligencePropertiesDevice randomizedDevice(@javax.annotation.Nullable Boolean randomizedDevice) { this.randomizedDevice = randomizedDevice; return this; } @@ -555,7 +555,7 @@ public void setRandomizedDevice(@javax.annotation.Nullable Boolean randomizedDev } - public DeviceIntelligenceBreakdownPropertiesDevice fakeNetworkRequest(@javax.annotation.Nullable Boolean fakeNetworkRequest) { + public DeviceIntelligencePropertiesDevice fakeNetworkRequest(@javax.annotation.Nullable Boolean fakeNetworkRequest) { this.fakeNetworkRequest = fakeNetworkRequest; return this; } @@ -574,7 +574,7 @@ public void setFakeNetworkRequest(@javax.annotation.Nullable Boolean fakeNetwork } - public DeviceIntelligenceBreakdownPropertiesDevice ipReputation(@javax.annotation.Nullable IpReputationEnum ipReputation) { + public DeviceIntelligencePropertiesDevice ipReputation(@javax.annotation.Nullable IpReputationEnum ipReputation) { this.ipReputation = ipReputation; return this; } @@ -593,7 +593,7 @@ public void setIpReputation(@javax.annotation.Nullable IpReputationEnum ipReputa } - public DeviceIntelligenceBreakdownPropertiesDevice deviceFingerprintReuse(@javax.annotation.Nullable BigDecimal deviceFingerprintReuse) { + public DeviceIntelligencePropertiesDevice deviceFingerprintReuse(@javax.annotation.Nullable BigDecimal deviceFingerprintReuse) { this.deviceFingerprintReuse = deviceFingerprintReuse; return this; } @@ -612,7 +612,7 @@ public void setDeviceFingerprintReuse(@javax.annotation.Nullable BigDecimal devi } - public DeviceIntelligenceBreakdownPropertiesDevice singleDeviceUsed(@javax.annotation.Nullable Boolean singleDeviceUsed) { + public DeviceIntelligencePropertiesDevice singleDeviceUsed(@javax.annotation.Nullable Boolean singleDeviceUsed) { this.singleDeviceUsed = singleDeviceUsed; return this; } @@ -631,7 +631,7 @@ public void setSingleDeviceUsed(@javax.annotation.Nullable Boolean singleDeviceU } - public DeviceIntelligenceBreakdownPropertiesDevice documentCapture(@javax.annotation.Nullable DocumentCaptureEnum documentCapture) { + public DeviceIntelligencePropertiesDevice documentCapture(@javax.annotation.Nullable DocumentCaptureEnum documentCapture) { this.documentCapture = documentCapture; return this; } @@ -650,7 +650,7 @@ public void setDocumentCapture(@javax.annotation.Nullable DocumentCaptureEnum do } - public DeviceIntelligenceBreakdownPropertiesDevice biometricCapture(@javax.annotation.Nullable BiometricCaptureEnum biometricCapture) { + public DeviceIntelligencePropertiesDevice biometricCapture(@javax.annotation.Nullable BiometricCaptureEnum biometricCapture) { this.biometricCapture = biometricCapture; return this; } @@ -681,9 +681,9 @@ public void setBiometricCapture(@javax.annotation.Nullable BiometricCaptureEnum * * @param key name of the property * @param value value of the property - * @return the DeviceIntelligenceBreakdownPropertiesDevice instance itself + * @return the DeviceIntelligencePropertiesDevice instance itself */ - public DeviceIntelligenceBreakdownPropertiesDevice putAdditionalProperty(String key, Object value) { + public DeviceIntelligencePropertiesDevice putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -722,22 +722,22 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DeviceIntelligenceBreakdownPropertiesDevice deviceIntelligenceBreakdownPropertiesDevice = (DeviceIntelligenceBreakdownPropertiesDevice) o; - return Objects.equals(this.sdkVersion, deviceIntelligenceBreakdownPropertiesDevice.sdkVersion) && - Objects.equals(this.sdkSource, deviceIntelligenceBreakdownPropertiesDevice.sdkSource) && - Objects.equals(this.authenticationType, deviceIntelligenceBreakdownPropertiesDevice.authenticationType) && - Objects.equals(this.rawModel, deviceIntelligenceBreakdownPropertiesDevice.rawModel) && - Objects.equals(this.os, deviceIntelligenceBreakdownPropertiesDevice.os) && - Objects.equals(this.browser, deviceIntelligenceBreakdownPropertiesDevice.browser) && - Objects.equals(this.emulator, deviceIntelligenceBreakdownPropertiesDevice.emulator) && - Objects.equals(this.randomizedDevice, deviceIntelligenceBreakdownPropertiesDevice.randomizedDevice) && - Objects.equals(this.fakeNetworkRequest, deviceIntelligenceBreakdownPropertiesDevice.fakeNetworkRequest) && - Objects.equals(this.ipReputation, deviceIntelligenceBreakdownPropertiesDevice.ipReputation) && - Objects.equals(this.deviceFingerprintReuse, deviceIntelligenceBreakdownPropertiesDevice.deviceFingerprintReuse) && - Objects.equals(this.singleDeviceUsed, deviceIntelligenceBreakdownPropertiesDevice.singleDeviceUsed) && - Objects.equals(this.documentCapture, deviceIntelligenceBreakdownPropertiesDevice.documentCapture) && - Objects.equals(this.biometricCapture, deviceIntelligenceBreakdownPropertiesDevice.biometricCapture)&& - Objects.equals(this.additionalProperties, deviceIntelligenceBreakdownPropertiesDevice.additionalProperties); + DeviceIntelligencePropertiesDevice deviceIntelligencePropertiesDevice = (DeviceIntelligencePropertiesDevice) o; + return Objects.equals(this.sdkVersion, deviceIntelligencePropertiesDevice.sdkVersion) && + Objects.equals(this.sdkSource, deviceIntelligencePropertiesDevice.sdkSource) && + Objects.equals(this.authenticationType, deviceIntelligencePropertiesDevice.authenticationType) && + Objects.equals(this.rawModel, deviceIntelligencePropertiesDevice.rawModel) && + Objects.equals(this.os, deviceIntelligencePropertiesDevice.os) && + Objects.equals(this.browser, deviceIntelligencePropertiesDevice.browser) && + Objects.equals(this.emulator, deviceIntelligencePropertiesDevice.emulator) && + Objects.equals(this.randomizedDevice, deviceIntelligencePropertiesDevice.randomizedDevice) && + Objects.equals(this.fakeNetworkRequest, deviceIntelligencePropertiesDevice.fakeNetworkRequest) && + Objects.equals(this.ipReputation, deviceIntelligencePropertiesDevice.ipReputation) && + Objects.equals(this.deviceFingerprintReuse, deviceIntelligencePropertiesDevice.deviceFingerprintReuse) && + Objects.equals(this.singleDeviceUsed, deviceIntelligencePropertiesDevice.singleDeviceUsed) && + Objects.equals(this.documentCapture, deviceIntelligencePropertiesDevice.documentCapture) && + Objects.equals(this.biometricCapture, deviceIntelligencePropertiesDevice.biometricCapture)&& + Objects.equals(this.additionalProperties, deviceIntelligencePropertiesDevice.additionalProperties); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -759,7 +759,7 @@ private static int hashCodeNullable(JsonNullable a) { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class DeviceIntelligenceBreakdownPropertiesDevice {\n"); + sb.append("class DeviceIntelligencePropertiesDevice {\n"); sb.append(" sdkVersion: ").append(toIndentedString(sdkVersion)).append("\n"); sb.append(" sdkSource: ").append(toIndentedString(sdkSource)).append("\n"); sb.append(" authenticationType: ").append(toIndentedString(authenticationType)).append("\n"); @@ -806,12 +806,12 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DeviceIntelligenceBreakdownPropertiesDevice + * @throws IOException if the JSON Element is invalid with respect to DeviceIntelligencePropertiesDevice */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!DeviceIntelligenceBreakdownPropertiesDevice.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in DeviceIntelligenceBreakdownPropertiesDevice is not found in the empty JSON string", DeviceIntelligenceBreakdownPropertiesDevice.openapiRequiredFields.toString())); + if (!DeviceIntelligencePropertiesDevice.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in DeviceIntelligencePropertiesDevice is not found in the empty JSON string", DeviceIntelligencePropertiesDevice.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -868,16 +868,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeviceIntelligenceBreakdownPropertiesDevice.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeviceIntelligenceBreakdownPropertiesDevice' and its subtypes + if (!DeviceIntelligencePropertiesDevice.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeviceIntelligencePropertiesDevice' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DeviceIntelligenceBreakdownPropertiesDevice.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DeviceIntelligencePropertiesDevice.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, DeviceIntelligenceBreakdownPropertiesDevice value) throws IOException { + public void write(JsonWriter out, DeviceIntelligencePropertiesDevice value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -905,12 +905,12 @@ else if (entry.getValue() instanceof Character) } @Override - public DeviceIntelligenceBreakdownPropertiesDevice read(JsonReader in) throws IOException { + public DeviceIntelligencePropertiesDevice read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - DeviceIntelligenceBreakdownPropertiesDevice instance = thisAdapter.fromJsonTree(jsonObj); + DeviceIntelligencePropertiesDevice instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -937,18 +937,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of DeviceIntelligenceBreakdownPropertiesDevice given an JSON string + * Create an instance of DeviceIntelligencePropertiesDevice given an JSON string * * @param jsonString JSON string - * @return An instance of DeviceIntelligenceBreakdownPropertiesDevice - * @throws IOException if the JSON string is invalid with respect to DeviceIntelligenceBreakdownPropertiesDevice + * @return An instance of DeviceIntelligencePropertiesDevice + * @throws IOException if the JSON string is invalid with respect to DeviceIntelligencePropertiesDevice */ - public static DeviceIntelligenceBreakdownPropertiesDevice fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeviceIntelligenceBreakdownPropertiesDevice.class); + public static DeviceIntelligencePropertiesDevice fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeviceIntelligencePropertiesDevice.class); } /** - * Convert an instance of DeviceIntelligenceBreakdownPropertiesDevice to an JSON string + * Convert an instance of DeviceIntelligencePropertiesDevice to an JSON string * * @return JSON string */ diff --git a/src/main/java/com/onfido/model/DeviceIntelligenceBreakdownPropertiesGeolocation.java b/src/main/java/com/onfido/model/DeviceIntelligencePropertiesGeolocation.java similarity index 79% rename from src/main/java/com/onfido/model/DeviceIntelligenceBreakdownPropertiesGeolocation.java rename to src/main/java/com/onfido/model/DeviceIntelligencePropertiesGeolocation.java index 3db54a9..b1ffb77 100644 --- a/src/main/java/com/onfido/model/DeviceIntelligenceBreakdownPropertiesGeolocation.java +++ b/src/main/java/com/onfido/model/DeviceIntelligencePropertiesGeolocation.java @@ -49,10 +49,10 @@ import com.onfido.JSON; /** - * DeviceIntelligenceBreakdownPropertiesGeolocation + * DeviceIntelligencePropertiesGeolocation */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class DeviceIntelligenceBreakdownPropertiesGeolocation { +public class DeviceIntelligencePropertiesGeolocation { public static final String SERIALIZED_NAME_CITY = "city"; @SerializedName(SERIALIZED_NAME_CITY) @javax.annotation.Nullable @@ -68,10 +68,10 @@ public class DeviceIntelligenceBreakdownPropertiesGeolocation { @javax.annotation.Nullable private CountryCodes country; - public DeviceIntelligenceBreakdownPropertiesGeolocation() { + public DeviceIntelligencePropertiesGeolocation() { } - public DeviceIntelligenceBreakdownPropertiesGeolocation city(@javax.annotation.Nullable String city) { + public DeviceIntelligencePropertiesGeolocation city(@javax.annotation.Nullable String city) { this.city = city; return this; } @@ -90,7 +90,7 @@ public void setCity(@javax.annotation.Nullable String city) { } - public DeviceIntelligenceBreakdownPropertiesGeolocation region(@javax.annotation.Nullable String region) { + public DeviceIntelligencePropertiesGeolocation region(@javax.annotation.Nullable String region) { this.region = region; return this; } @@ -109,7 +109,7 @@ public void setRegion(@javax.annotation.Nullable String region) { } - public DeviceIntelligenceBreakdownPropertiesGeolocation country(@javax.annotation.Nullable CountryCodes country) { + public DeviceIntelligencePropertiesGeolocation country(@javax.annotation.Nullable CountryCodes country) { this.country = country; return this; } @@ -140,9 +140,9 @@ public void setCountry(@javax.annotation.Nullable CountryCodes country) { * * @param key name of the property * @param value value of the property - * @return the DeviceIntelligenceBreakdownPropertiesGeolocation instance itself + * @return the DeviceIntelligencePropertiesGeolocation instance itself */ - public DeviceIntelligenceBreakdownPropertiesGeolocation putAdditionalProperty(String key, Object value) { + public DeviceIntelligencePropertiesGeolocation putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -181,11 +181,11 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DeviceIntelligenceBreakdownPropertiesGeolocation deviceIntelligenceBreakdownPropertiesGeolocation = (DeviceIntelligenceBreakdownPropertiesGeolocation) o; - return Objects.equals(this.city, deviceIntelligenceBreakdownPropertiesGeolocation.city) && - Objects.equals(this.region, deviceIntelligenceBreakdownPropertiesGeolocation.region) && - Objects.equals(this.country, deviceIntelligenceBreakdownPropertiesGeolocation.country)&& - Objects.equals(this.additionalProperties, deviceIntelligenceBreakdownPropertiesGeolocation.additionalProperties); + DeviceIntelligencePropertiesGeolocation deviceIntelligencePropertiesGeolocation = (DeviceIntelligencePropertiesGeolocation) o; + return Objects.equals(this.city, deviceIntelligencePropertiesGeolocation.city) && + Objects.equals(this.region, deviceIntelligencePropertiesGeolocation.region) && + Objects.equals(this.country, deviceIntelligencePropertiesGeolocation.country)&& + Objects.equals(this.additionalProperties, deviceIntelligencePropertiesGeolocation.additionalProperties); } @Override @@ -196,7 +196,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class DeviceIntelligenceBreakdownPropertiesGeolocation {\n"); + sb.append("class DeviceIntelligencePropertiesGeolocation {\n"); sb.append(" city: ").append(toIndentedString(city)).append("\n"); sb.append(" region: ").append(toIndentedString(region)).append("\n"); sb.append(" country: ").append(toIndentedString(country)).append("\n"); @@ -232,12 +232,12 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DeviceIntelligenceBreakdownPropertiesGeolocation + * @throws IOException if the JSON Element is invalid with respect to DeviceIntelligencePropertiesGeolocation */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!DeviceIntelligenceBreakdownPropertiesGeolocation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in DeviceIntelligenceBreakdownPropertiesGeolocation is not found in the empty JSON string", DeviceIntelligenceBreakdownPropertiesGeolocation.openapiRequiredFields.toString())); + if (!DeviceIntelligencePropertiesGeolocation.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in DeviceIntelligencePropertiesGeolocation is not found in the empty JSON string", DeviceIntelligencePropertiesGeolocation.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -257,16 +257,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeviceIntelligenceBreakdownPropertiesGeolocation.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeviceIntelligenceBreakdownPropertiesGeolocation' and its subtypes + if (!DeviceIntelligencePropertiesGeolocation.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeviceIntelligencePropertiesGeolocation' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DeviceIntelligenceBreakdownPropertiesGeolocation.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DeviceIntelligencePropertiesGeolocation.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, DeviceIntelligenceBreakdownPropertiesGeolocation value) throws IOException { + public void write(JsonWriter out, DeviceIntelligencePropertiesGeolocation value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -294,12 +294,12 @@ else if (entry.getValue() instanceof Character) } @Override - public DeviceIntelligenceBreakdownPropertiesGeolocation read(JsonReader in) throws IOException { + public DeviceIntelligencePropertiesGeolocation read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - DeviceIntelligenceBreakdownPropertiesGeolocation instance = thisAdapter.fromJsonTree(jsonObj); + DeviceIntelligencePropertiesGeolocation instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -326,18 +326,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of DeviceIntelligenceBreakdownPropertiesGeolocation given an JSON string + * Create an instance of DeviceIntelligencePropertiesGeolocation given an JSON string * * @param jsonString JSON string - * @return An instance of DeviceIntelligenceBreakdownPropertiesGeolocation - * @throws IOException if the JSON string is invalid with respect to DeviceIntelligenceBreakdownPropertiesGeolocation + * @return An instance of DeviceIntelligencePropertiesGeolocation + * @throws IOException if the JSON string is invalid with respect to DeviceIntelligencePropertiesGeolocation */ - public static DeviceIntelligenceBreakdownPropertiesGeolocation fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeviceIntelligenceBreakdownPropertiesGeolocation.class); + public static DeviceIntelligencePropertiesGeolocation fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeviceIntelligencePropertiesGeolocation.class); } /** - * Convert an instance of DeviceIntelligenceBreakdownPropertiesGeolocation to an JSON string + * Convert an instance of DeviceIntelligencePropertiesGeolocation to an JSON string * * @return JSON string */ diff --git a/src/main/java/com/onfido/model/DeviceIntelligenceBreakdownPropertiesIp.java b/src/main/java/com/onfido/model/DeviceIntelligencePropertiesIp.java similarity index 80% rename from src/main/java/com/onfido/model/DeviceIntelligenceBreakdownPropertiesIp.java rename to src/main/java/com/onfido/model/DeviceIntelligencePropertiesIp.java index 274ef8c..cdcb031 100644 --- a/src/main/java/com/onfido/model/DeviceIntelligenceBreakdownPropertiesIp.java +++ b/src/main/java/com/onfido/model/DeviceIntelligencePropertiesIp.java @@ -48,19 +48,19 @@ import com.onfido.JSON; /** - * DeviceIntelligenceBreakdownPropertiesIp + * DeviceIntelligencePropertiesIp */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.16.0") -public class DeviceIntelligenceBreakdownPropertiesIp { +public class DeviceIntelligencePropertiesIp { public static final String SERIALIZED_NAME_ADDRESS = "address"; @SerializedName(SERIALIZED_NAME_ADDRESS) @javax.annotation.Nullable private String address; - public DeviceIntelligenceBreakdownPropertiesIp() { + public DeviceIntelligencePropertiesIp() { } - public DeviceIntelligenceBreakdownPropertiesIp address(@javax.annotation.Nullable String address) { + public DeviceIntelligencePropertiesIp address(@javax.annotation.Nullable String address) { this.address = address; return this; } @@ -91,9 +91,9 @@ public void setAddress(@javax.annotation.Nullable String address) { * * @param key name of the property * @param value value of the property - * @return the DeviceIntelligenceBreakdownPropertiesIp instance itself + * @return the DeviceIntelligencePropertiesIp instance itself */ - public DeviceIntelligenceBreakdownPropertiesIp putAdditionalProperty(String key, Object value) { + public DeviceIntelligencePropertiesIp putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -132,9 +132,9 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - DeviceIntelligenceBreakdownPropertiesIp deviceIntelligenceBreakdownPropertiesIp = (DeviceIntelligenceBreakdownPropertiesIp) o; - return Objects.equals(this.address, deviceIntelligenceBreakdownPropertiesIp.address)&& - Objects.equals(this.additionalProperties, deviceIntelligenceBreakdownPropertiesIp.additionalProperties); + DeviceIntelligencePropertiesIp deviceIntelligencePropertiesIp = (DeviceIntelligencePropertiesIp) o; + return Objects.equals(this.address, deviceIntelligencePropertiesIp.address)&& + Objects.equals(this.additionalProperties, deviceIntelligencePropertiesIp.additionalProperties); } @Override @@ -145,7 +145,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class DeviceIntelligenceBreakdownPropertiesIp {\n"); + sb.append("class DeviceIntelligencePropertiesIp {\n"); sb.append(" address: ").append(toIndentedString(address)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); @@ -179,12 +179,12 @@ private String toIndentedString(Object o) { * Validates the JSON Element and throws an exception if issues found * * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to DeviceIntelligenceBreakdownPropertiesIp + * @throws IOException if the JSON Element is invalid with respect to DeviceIntelligencePropertiesIp */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!DeviceIntelligenceBreakdownPropertiesIp.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in DeviceIntelligenceBreakdownPropertiesIp is not found in the empty JSON string", DeviceIntelligenceBreakdownPropertiesIp.openapiRequiredFields.toString())); + if (!DeviceIntelligencePropertiesIp.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in DeviceIntelligencePropertiesIp is not found in the empty JSON string", DeviceIntelligencePropertiesIp.openapiRequiredFields.toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -197,16 +197,16 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!DeviceIntelligenceBreakdownPropertiesIp.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DeviceIntelligenceBreakdownPropertiesIp' and its subtypes + if (!DeviceIntelligencePropertiesIp.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DeviceIntelligencePropertiesIp' and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DeviceIntelligenceBreakdownPropertiesIp.class)); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(DeviceIntelligencePropertiesIp.class)); - return (TypeAdapter) new TypeAdapter() { + return (TypeAdapter) new TypeAdapter() { @Override - public void write(JsonWriter out, DeviceIntelligenceBreakdownPropertiesIp value) throws IOException { + public void write(JsonWriter out, DeviceIntelligencePropertiesIp value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); // serialize additional properties @@ -234,12 +234,12 @@ else if (entry.getValue() instanceof Character) } @Override - public DeviceIntelligenceBreakdownPropertiesIp read(JsonReader in) throws IOException { + public DeviceIntelligencePropertiesIp read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - DeviceIntelligenceBreakdownPropertiesIp instance = thisAdapter.fromJsonTree(jsonObj); + DeviceIntelligencePropertiesIp instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { if (entry.getValue().isJsonPrimitive()) { // primitive type @@ -266,18 +266,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of DeviceIntelligenceBreakdownPropertiesIp given an JSON string + * Create an instance of DeviceIntelligencePropertiesIp given an JSON string * * @param jsonString JSON string - * @return An instance of DeviceIntelligenceBreakdownPropertiesIp - * @throws IOException if the JSON string is invalid with respect to DeviceIntelligenceBreakdownPropertiesIp + * @return An instance of DeviceIntelligencePropertiesIp + * @throws IOException if the JSON string is invalid with respect to DeviceIntelligencePropertiesIp */ - public static DeviceIntelligenceBreakdownPropertiesIp fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DeviceIntelligenceBreakdownPropertiesIp.class); + public static DeviceIntelligencePropertiesIp fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DeviceIntelligencePropertiesIp.class); } /** - * Convert an instance of DeviceIntelligenceBreakdownPropertiesIp to an JSON string + * Convert an instance of DeviceIntelligencePropertiesIp to an JSON string * * @return JSON string */ diff --git a/src/main/java/com/onfido/model/WebhookEventPayloadResource.java b/src/main/java/com/onfido/model/WebhookEventPayloadResource.java index 10cc859..54c9c11 100644 --- a/src/main/java/com/onfido/model/WebhookEventPayloadResource.java +++ b/src/main/java/com/onfido/model/WebhookEventPayloadResource.java @@ -20,6 +20,7 @@ import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import com.onfido.model.WebhookEventResourceStatus; import com.onfido.model.WorkflowRunError; import com.onfido.model.WorkflowRunLink; import java.io.IOException; @@ -69,6 +70,11 @@ public class WebhookEventPayloadResource { @javax.annotation.Nullable private UUID applicantId; + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable + private WebhookEventResourceStatus status; + public static final String SERIALIZED_NAME_CREATED_AT = "created_at"; @SerializedName(SERIALIZED_NAME_CREATED_AT) @javax.annotation.Nullable @@ -190,6 +196,25 @@ public void setApplicantId(@javax.annotation.Nullable UUID applicantId) { } + public WebhookEventPayloadResource status(@javax.annotation.Nullable WebhookEventResourceStatus status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + public WebhookEventResourceStatus getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nullable WebhookEventResourceStatus status) { + this.status = status; + } + + public WebhookEventPayloadResource createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) { this.createdAt = createdAt; return this; @@ -566,6 +591,7 @@ public boolean equals(Object o) { WebhookEventPayloadResource webhookEventPayloadResource = (WebhookEventPayloadResource) o; return Objects.equals(this.id, webhookEventPayloadResource.id) && Objects.equals(this.applicantId, webhookEventPayloadResource.applicantId) && + Objects.equals(this.status, webhookEventPayloadResource.status) && Objects.equals(this.createdAt, webhookEventPayloadResource.createdAt) && Objects.equals(this.updatedAt, webhookEventPayloadResource.updatedAt) && Objects.equals(this.dashboardUrl, webhookEventPayloadResource.dashboardUrl) && @@ -591,7 +617,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, applicantId, createdAt, updatedAt, dashboardUrl, workflowId, workflowRunId, workflowVersionId, taskDefId, taskDefVersion, input, output, reasons, tags, link, error, customerUserId, timelineFileDownloadUrl, additionalProperties); + return Objects.hash(id, applicantId, status, createdAt, updatedAt, dashboardUrl, workflowId, workflowRunId, workflowVersionId, taskDefId, taskDefVersion, input, output, reasons, tags, link, error, customerUserId, timelineFileDownloadUrl, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -607,6 +633,7 @@ public String toString() { sb.append("class WebhookEventPayloadResource {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" applicantId: ").append(toIndentedString(applicantId)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" dashboardUrl: ").append(toIndentedString(dashboardUrl)).append("\n"); @@ -645,7 +672,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("id", "applicant_id", "created_at", "updated_at", "dashboard_url", "workflow_id", "workflow_run_id", "workflow_version_id", "task_def_id", "task_def_version", "input", "output", "reasons", "tags", "link", "error", "customer_user_id", "timeline_file_download_url")); + openapiFields = new HashSet(Arrays.asList("id", "applicant_id", "status", "created_at", "updated_at", "dashboard_url", "workflow_id", "workflow_run_id", "workflow_version_id", "task_def_id", "task_def_version", "input", "output", "reasons", "tags", "link", "error", "customer_user_id", "timeline_file_download_url")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -670,6 +697,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("applicant_id") != null && !jsonObj.get("applicant_id").isJsonNull()) && !jsonObj.get("applicant_id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `applicant_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applicant_id").toString())); } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + WebhookEventResourceStatus.validateJsonElement(jsonObj.get("status")); + } if ((jsonObj.get("dashboard_url") != null && !jsonObj.get("dashboard_url").isJsonNull()) && !jsonObj.get("dashboard_url").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `dashboard_url` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dashboard_url").toString())); } diff --git a/src/main/java/com/onfido/model/WebhookEventResourceStatus.java b/src/main/java/com/onfido/model/WebhookEventResourceStatus.java new file mode 100644 index 0000000..672c31b --- /dev/null +++ b/src/main/java/com/onfido/model/WebhookEventResourceStatus.java @@ -0,0 +1,100 @@ +/* + * Onfido Public API v3.6 + * The Onfido Public API (v3.6) + * + * The version of the OpenAPI document: v3.6 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.onfido.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * The current state of the reference, if available. + */ +@JsonAdapter(WebhookEventResourceStatus.Adapter.class) +public enum WebhookEventResourceStatus { + + PROCESSING("processing"), + + AWAITING_INPUT("awaiting_input"), + + AWAITING_CLIENT_INPUT("awaiting_client_input"), + + APPROVED("approved"), + + DECLINED("declined"), + + REVIEW("review"), + + ABANDONED("abandoned"), + + ERROR("error"), + + STARTED("started"), + + CANCELLED("cancelled"), + + COMPLETED("completed"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + WebhookEventResourceStatus(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static WebhookEventResourceStatus fromValue(String value) { + for (WebhookEventResourceStatus b : WebhookEventResourceStatus.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final WebhookEventResourceStatus enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public WebhookEventResourceStatus read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return WebhookEventResourceStatus.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + WebhookEventResourceStatus.fromValue(value); + } +} + From 9cb24e0c25f4a1db43c55aecd5550a9fe4db433c Mon Sep 17 00:00:00 2001 From: Davide Vacca Date: Tue, 17 Feb 2026 10:48:54 +0100 Subject: [PATCH 2/3] Update MIGRATION.md for v7.x and fix CI workflow --- .github/workflows/maven.yml | 4 +++- MIGRATION.md | 47 +++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 37649d4..a730c8a 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -47,7 +47,9 @@ jobs: run: mvn -B package --file pom.xml -Dmaven.test.skip - name: Run integration tests with Maven if: ${{ github.repository_owner == 'onfido' && - (github.event_name == 'pull_request' || github.event_name == 'release') }} + (github.event_name == 'pull_request' || + github.event_name == 'release' || + github.event_name == 'workflow_dispatch') }} run: mvn test env: ONFIDO_API_TOKEN: ${{ secrets.ONFIDO_API_TOKEN }} diff --git a/MIGRATION.md b/MIGRATION.md index e081f97..f190568 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -6,6 +6,53 @@ major versions of the client library. It covers changes in core resources, other endpoints, and the OpenAPI generator, ensuring a smooth transition between versions. +## Upgrading from 6.x to 7.x + +### Core Resources + +- **All API methods**: All API method calls now use request builder pattern with `.execute()` + - This change enables backward compatibility when new optional parameters are added + - Example migration: + ```java + // Before (v6.x) + List runs = api.listWorkflowRuns(applicantId, status, page, perPage); + + // After (v7.x) + List runs = api.listWorkflowRuns() + .applicantId(applicantId) + .status(status) + .page(page) + .perPage(perPage) + .execute(); + ``` +- Documents + - Driving licence information properties removed from general `DocumentProperties` + and moved to new `DocumentPropertiesWithDrivingLicenceInformation` class +- Workflow Runs + - `createdAtGt` and `createdAtLt` parameters in `listWorkflowRuns` changed from + date-time format to date format (YYYY-MM-DD) + +### Other Endpoints + +- Reports + - Device Intelligence: Removed deprecated `breakdown` property and related + breakdown classes: + - `DeviceIntelligenceBreakdownProperties` removed + - `DeviceIntelligenceBreakdownPropertiesDevice` → `DeviceIntelligencePropertiesDevice` + - `DeviceIntelligenceBreakdownPropertiesGeolocation` → `DeviceIntelligencePropertiesGeolocation` + - `DeviceIntelligenceBreakdownPropertiesIp` → `DeviceIntelligencePropertiesIp` + - Identity Enhanced: Changed `totalNumberOfSources` and `numberOfMatches` from + number to string type + +### Security + +- SSL certificate validation: Removed support for self-signed certificates unless + explicitly configured via `setSslCaCert()` + +### OpenAPI generator + +- Version upgraded from `7.11.0` to `7.16.0` + ## Upgrading from 5.x to 6.x ### Core Resources From 52c6b953f890b3944f81dcc3ff2a95ca8cd005cc Mon Sep 17 00:00:00 2001 From: Davide Vacca Date: Tue, 17 Feb 2026 14:22:55 +0100 Subject: [PATCH 3/3] Fix and make tests more resilient - Fix DeviceIntelligence test to use renamed interfaces (DeviceIntelligencePropertiesDevice instead of DeviceIntelligenceBreakdownPropertiesDevice) - Increase retry timeout for timeline file and evidence folder downloads to handle async file preparation --- src/test/java/com/onfido/integration/ReportSchemasTest.java | 2 +- src/test/java/com/onfido/integration/WorkflowRunTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/java/com/onfido/integration/ReportSchemasTest.java b/src/test/java/com/onfido/integration/ReportSchemasTest.java index 514585a..3b4229f 100644 --- a/src/test/java/com/onfido/integration/ReportSchemasTest.java +++ b/src/test/java/com/onfido/integration/ReportSchemasTest.java @@ -257,7 +257,7 @@ public void schemaOfDeviceIntelligenceReportIsValid() throws Exception { DeviceIntelligenceProperties properties = deviceIntelligenceReport.getProperties(); Assertions.assertEquals( - DeviceIntelligenceBreakdownPropertiesDevice.IpReputationEnum.NOT_ENOUGH_DATA, + DeviceIntelligencePropertiesDevice.IpReputationEnum.NOT_ENOUGH_DATA, properties.getDevice().getIpReputation()); Assertions.assertEquals("SM-G991B", properties.getDevice().getRawModel()); } diff --git a/src/test/java/com/onfido/integration/WorkflowRunTest.java b/src/test/java/com/onfido/integration/WorkflowRunTest.java index d22d147..948b5dd 100644 --- a/src/test/java/com/onfido/integration/WorkflowRunTest.java +++ b/src/test/java/com/onfido/integration/WorkflowRunTest.java @@ -118,7 +118,7 @@ public void findTimelineFileTest() throws Exception { "findTimelineFile", new UUID[] {workflowRunId, timelineFileId}, MAX_RETRIES, - SLEEP_TIME); + SLEEP_TIME * 2); byte[] byteArray = download.getByteArray(); @@ -140,7 +140,7 @@ public void downloadEvidenceFolderTest() throws Exception { FileTransfer evidenceFolderDownload = (FileTransfer) repeatRequestUntilHttpCodeChanges( - "downloadEvidenceFolder", new UUID[] {workflowRunId}, MAX_RETRIES, SLEEP_TIME); + "downloadEvidenceFolder", new UUID[] {workflowRunId}, MAX_RETRIES, SLEEP_TIME * 2); byte[] byteArray = evidenceFolderDownload.getByteArray();