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 api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bandwidth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/FailureWebhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -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] |

Expand Down
32 changes: 16 additions & 16 deletions src/main/java/com/bandwidth/sdk/model/FailureWebhook.java
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
}


Expand Down Expand Up @@ -265,15 +265,15 @@ 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);
}

@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
Expand All @@ -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");
Expand Down Expand Up @@ -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");

Expand Down Expand Up @@ -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()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class FailureWebhookTest {
.accountId("accountId")
.phoneNumber("phoneNumber")
.errorCode("errorCode")
.errorDescription("errorDescription")
.errorMessage("errorMessage")
.errors(new ArrayList<String>(Arrays.asList("errors")))
.internalTicketNumber(UUID.randomUUID());

Expand Down Expand Up @@ -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));
}

/**
Expand Down