diff --git a/api/openapi.yaml b/api/openapi.yaml index ef1f912e..05309da9 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -12479,7 +12479,7 @@ components: was encountered. example: "400" type: string - errorDescription: + errorMessage: description: A description of the error that was encountered. example: cannot process request. type: string diff --git a/bandwidth.yml b/bandwidth.yml index 825be19f..03769645 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -5424,7 +5424,7 @@ components: be interpreted as an HTTP status code in regards to the error that was encountered. example: '400' - errorDescription: + errorMessage: type: string description: A description of the error that was encountered. example: cannot process request. diff --git a/docs/FailureWebhook.md b/docs/FailureWebhook.md index 03c71e3f..5d72374a 100644 --- a/docs/FailureWebhook.md +++ b/docs/FailureWebhook.md @@ -10,7 +10,7 @@ |**accountId** | **String** | User's account ID. | [optional] | |**phoneNumber** | **String** | Toll-free telephone number in E.164 format. | [optional] | |**errorCode** | **String** | An error code indicating what error was encountered. This code can be interpreted as an HTTP status code in regards to the error that was encountered. | [optional] | -|**errorDescription** | **String** | A description of the error that was encountered. | [optional] | +|**errorMessage** | **String** | A description of the error that was encountered. | [optional] | |**errors** | **List<String>** | Details of the errors that were encountered when processing the request. | [optional] | |**internalTicketNumber** | **UUID** | Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number. | [optional] | diff --git a/src/main/java/com/bandwidth/sdk/model/FailureWebhook.java b/src/main/java/com/bandwidth/sdk/model/FailureWebhook.java index bb5b1691..d80aa85c 100644 --- a/src/main/java/com/bandwidth/sdk/model/FailureWebhook.java +++ b/src/main/java/com/bandwidth/sdk/model/FailureWebhook.java @@ -68,10 +68,10 @@ public class FailureWebhook { @javax.annotation.Nullable private String errorCode; - public static final String SERIALIZED_NAME_ERROR_DESCRIPTION = "errorDescription"; - @SerializedName(SERIALIZED_NAME_ERROR_DESCRIPTION) + public static final String SERIALIZED_NAME_ERROR_MESSAGE = "errorMessage"; + @SerializedName(SERIALIZED_NAME_ERROR_MESSAGE) @javax.annotation.Nullable - private String errorDescription; + private String errorMessage; public static final String SERIALIZED_NAME_ERRORS = "errors"; @SerializedName(SERIALIZED_NAME_ERRORS) @@ -143,22 +143,22 @@ public void setErrorCode(@javax.annotation.Nullable String errorCode) { } - public FailureWebhook errorDescription(@javax.annotation.Nullable String errorDescription) { - this.errorDescription = errorDescription; + public FailureWebhook errorMessage(@javax.annotation.Nullable String errorMessage) { + this.errorMessage = errorMessage; return this; } /** * A description of the error that was encountered. - * @return errorDescription + * @return errorMessage */ @javax.annotation.Nullable - public String getErrorDescription() { - return errorDescription; + public String getErrorMessage() { + return errorMessage; } - public void setErrorDescription(@javax.annotation.Nullable String errorDescription) { - this.errorDescription = errorDescription; + public void setErrorMessage(@javax.annotation.Nullable String errorMessage) { + this.errorMessage = errorMessage; } @@ -265,7 +265,7 @@ public boolean equals(Object o) { return Objects.equals(this.accountId, failureWebhook.accountId) && Objects.equals(this.phoneNumber, failureWebhook.phoneNumber) && Objects.equals(this.errorCode, failureWebhook.errorCode) && - Objects.equals(this.errorDescription, failureWebhook.errorDescription) && + Objects.equals(this.errorMessage, failureWebhook.errorMessage) && Objects.equals(this.errors, failureWebhook.errors) && Objects.equals(this.internalTicketNumber, failureWebhook.internalTicketNumber)&& Objects.equals(this.additionalProperties, failureWebhook.additionalProperties); @@ -273,7 +273,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(accountId, phoneNumber, errorCode, errorDescription, errors, internalTicketNumber, additionalProperties); + return Objects.hash(accountId, phoneNumber, errorCode, errorMessage, errors, internalTicketNumber, additionalProperties); } @Override @@ -283,7 +283,7 @@ public String toString() { sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); sb.append(" errorCode: ").append(toIndentedString(errorCode)).append("\n"); - sb.append(" errorDescription: ").append(toIndentedString(errorDescription)).append("\n"); + sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).append("\n"); sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); sb.append(" internalTicketNumber: ").append(toIndentedString(internalTicketNumber)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); @@ -312,7 +312,7 @@ private String toIndentedString(Object o) { openapiFields.add("accountId"); openapiFields.add("phoneNumber"); openapiFields.add("errorCode"); - openapiFields.add("errorDescription"); + openapiFields.add("errorMessage"); openapiFields.add("errors"); openapiFields.add("internalTicketNumber"); @@ -342,8 +342,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("errorCode") != null && !jsonObj.get("errorCode").isJsonNull()) && !jsonObj.get("errorCode").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `errorCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorCode").toString())); } - if ((jsonObj.get("errorDescription") != null && !jsonObj.get("errorDescription").isJsonNull()) && !jsonObj.get("errorDescription").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `errorDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorDescription").toString())); + if ((jsonObj.get("errorMessage") != null && !jsonObj.get("errorMessage").isJsonNull()) && !jsonObj.get("errorMessage").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `errorMessage` to be a primitive type in the JSON string but got `%s`", jsonObj.get("errorMessage").toString())); } // ensure the optional json data is an array if present if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull() && !jsonObj.get("errors").isJsonArray()) { diff --git a/src/test/java/com/bandwidth/sdk/unit/models/FailureWebhookTest.java b/src/test/java/com/bandwidth/sdk/unit/models/FailureWebhookTest.java index a79a5bb5..a8a97ccf 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/FailureWebhookTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/FailureWebhookTest.java @@ -32,7 +32,7 @@ public class FailureWebhookTest { .accountId("accountId") .phoneNumber("phoneNumber") .errorCode("errorCode") - .errorDescription("errorDescription") + .errorMessage("errorMessage") .errors(new ArrayList(Arrays.asList("errors"))) .internalTicketNumber(UUID.randomUUID()); @@ -69,11 +69,11 @@ public void errorCodeTest() { } /** - * Test the property 'errorDescription' + * Test the property 'errorMessage' */ @Test - public void errorDescriptionTest() { - assertThat(model.getErrorDescription(), instanceOf(String.class)); + public void errorMessageTest() { + assertThat(model.getErrorMessage(), instanceOf(String.class)); } /**