diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index def298e0..fad6f8c5 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -7,6 +7,7 @@ docs/AccountStatistics.md docs/AdditionalDenialReason.md docs/Address.md docs/AnswerCallback.md +docs/BlockedWebhook.md docs/BridgeCompleteCallback.md docs/BridgeTargetCompleteCallback.md docs/CallDirectionEnum.md @@ -200,6 +201,7 @@ src/main/java/com/bandwidth/sdk/model/AccountStatistics.java src/main/java/com/bandwidth/sdk/model/AdditionalDenialReason.java src/main/java/com/bandwidth/sdk/model/Address.java src/main/java/com/bandwidth/sdk/model/AnswerCallback.java +src/main/java/com/bandwidth/sdk/model/BlockedWebhook.java src/main/java/com/bandwidth/sdk/model/BridgeCompleteCallback.java src/main/java/com/bandwidth/sdk/model/BridgeTargetCompleteCallback.java src/main/java/com/bandwidth/sdk/model/CallDirectionEnum.java diff --git a/README.md b/README.md index 3fe417a3..e5dc51ce 100644 --- a/README.md +++ b/README.md @@ -178,6 +178,7 @@ Class | Method | HTTP request | Description - [AdditionalDenialReason](docs/AdditionalDenialReason.md) - [Address](docs/Address.md) - [AnswerCallback](docs/AnswerCallback.md) + - [BlockedWebhook](docs/BlockedWebhook.md) - [BridgeCompleteCallback](docs/BridgeCompleteCallback.md) - [BridgeTargetCompleteCallback](docs/BridgeTargetCompleteCallback.md) - [CallDirectionEnum](docs/CallDirectionEnum.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 126f69b7..bcc6e24c 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -6791,6 +6791,7 @@ components: - $ref: '#/components/schemas/verificationWebhook' - $ref: '#/components/schemas/verificationDenialWebhook' - $ref: '#/components/schemas/failureWebhook' + - $ref: '#/components/schemas/blockedWebhook' description: Verification callback status of a toll-free phone number. required: true webhookSubscriptionRequest: @@ -12217,16 +12218,16 @@ components: privacyPolicyUrl: description: The Toll-Free Verification request privacy policy URL. (Not Available Until 5/28/2025) - example: http://your-company.com/privacyPolicyUrl.pdf + example: http://your-company.com/privacyPolicy type: string termsAndConditionsUrl: description: The Toll-Free Verification request terms and conditions policy URL. (Not Available Until 5/28/2025) - example: http://your-company.com/termsAndConditionsUrl.pdf + example: http://your-company.com/termsAndConditions type: string - businessDBA: + businessDba: description: The company 'Doing Business As'. (Not Available Until 5/28/2025) - example: SecondCompany Name + example: Another Company Name Inc. type: string additionalDenialReason: properties: @@ -12326,16 +12327,16 @@ components: privacyPolicyUrl: description: The Toll-Free Verification request privacy policy URL. (Not Available Until 5/28/2025) - example: http://your-company.com/privacyPolicyUrl.pdf + example: http://your-company.com/privacyPolicy type: string termsAndConditionsUrl: description: The Toll-Free Verification request terms and conditions policy URL. (Not Available Until 5/28/2025) - example: http://your-company.com/termsAndConditionsUrl.pdf + example: http://your-company.com/termsAndConditions type: string - businessDBA: + businessDba: description: The company 'Doing Business As'. (Not Available Until 5/28/2025) - example: SecondCompany Name + example: Another Company Name Inc. type: string required: - businessAddress @@ -12398,16 +12399,16 @@ components: privacyPolicyUrl: description: The Toll-Free Verification request privacy policy URL. (Not Available Until 5/28/2025) - example: http://your-company.com/privacyPolicyUrl.pdf + example: http://your-company.com/privacyPolicy type: string termsAndConditionsUrl: description: The Toll-Free Verification request terms and conditions policy URL. (Not Available Until 5/28/2025) - example: http://your-company.com/termsAndConditionsUrl.pdf + example: http://your-company.com/termsAndConditions type: string - businessDBA: + businessDba: description: The company 'Doing Business As'. (Not Available Until 5/28/2025) - example: SecondCompany Name + example: Another Company Name Inc. type: string required: - businessAddress @@ -12587,6 +12588,41 @@ components: format: uuid type: string type: object + blockedWebhook: + properties: + accountId: + description: User's account ID. + example: "1234567" + type: string + phoneNumber: + description: Toll-free telephone number in E.164 format. + example: "+18005555555" + maxLength: 12 + minLength: 12 + nullable: false + pattern: "^\\+1(800|833|844|855|866|877|888)[2-9]\\d{6}$" + type: string + status: + $ref: '#/components/schemas/tfvCallbackStatusEnum' + internalTicketNumber: + description: Unique identifier (UUID) generated by Bandwidth to assist in + tracking the verification status of a toll-free number. + example: acde070d-8c4c-4f0d-9d8a-162843c10333 + format: uuid + type: string + blocked: + description: Whether a Toll-Free Verification is blocked. This attribute + will only be defined when the number is blocked. (Not Available Until + 5/28/2025) + example: true + type: boolean + blockedReason: + description: The reason why the Toll-Free Verification is blocked. This + attribute will only be defined when the number is blocked. (Not Available + Until 5/28/2025) + example: Toll-free number was used to send spam messages + type: string + type: object tfvSubmissionWrapper: properties: submission: @@ -13002,8 +13038,8 @@ components: submission: additionalInformation: Any additional information useCase: 2FA - termsAndConditionsUrl: http://your-company.com/termsAndConditionsUrl.pdf - businessDBA: SecondCompany Name + termsAndConditionsUrl: http://your-company.com/termsAndConditions + businessDba: Another Company Name Inc. isvReseller: Test ISV businessContact: firstName: John @@ -13020,7 +13056,7 @@ components: name: Bandwidth Inc. state: NC url: https://www.example.com/path/to/resource - privacyPolicyUrl: http://your-company.com/privacyPolicyUrl.pdf + privacyPolicyUrl: http://your-company.com/privacyPolicy useCaseSummary: Text summarizing the use case for the toll-free number optInWorkflow: imageUrls: @@ -13088,8 +13124,8 @@ components: example: additionalInformation: Any additional information useCase: 2FA - termsAndConditionsUrl: http://your-company.com/termsAndConditionsUrl.pdf - businessDBA: SecondCompany Name + termsAndConditionsUrl: http://your-company.com/termsAndConditions + businessDba: Another Company Name Inc. isvReseller: Test ISV businessContact: firstName: John @@ -13106,7 +13142,7 @@ components: name: Bandwidth Inc. state: NC url: https://www.example.com/path/to/resource - privacyPolicyUrl: http://your-company.com/privacyPolicyUrl.pdf + privacyPolicyUrl: http://your-company.com/privacyPolicy useCaseSummary: Text summarizing the use case for the toll-free number optInWorkflow: imageUrls: @@ -13163,16 +13199,16 @@ components: privacyPolicyUrl: description: The Toll-Free Verification request privacy policy URL. (Not Available Until 5/28/2025) - example: http://your-company.com/privacyPolicyUrl.pdf + example: http://your-company.com/privacyPolicy type: string termsAndConditionsUrl: description: The Toll-Free Verification request terms and conditions policy URL. (Not Available Until 5/28/2025) - example: http://your-company.com/termsAndConditionsUrl.pdf + example: http://your-company.com/termsAndConditions type: string - businessDBA: + businessDba: description: The company 'Doing Business As'. (Not Available Until 5/28/2025) - example: SecondCompany Name + example: Another Company Name Inc. type: string type: object tfvStatusEnum: diff --git a/bandwidth.yml b/bandwidth.yml index e180a94b..89d94888 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -5253,17 +5253,17 @@ components: description: >- The Toll-Free Verification request privacy policy URL. (Not Available Until 5/28/2025) - example: http://your-company.com/privacyPolicyUrl.pdf + example: http://your-company.com/privacyPolicy type: string termsAndConditionsUrl: description: >- The Toll-Free Verification request terms and conditions policy URL. (Not Available Until 5/28/2025) - example: http://your-company.com/termsAndConditionsUrl.pdf + example: http://your-company.com/termsAndConditions type: string - businessDBA: + businessDba: description: The company 'Doing Business As'. (Not Available Until 5/28/2025) - example: SecondCompany Name + example: Another Company Name Inc. type: string additionalDenialReason: properties: @@ -5349,8 +5349,8 @@ components: $ref: '#/components/schemas/privacyPolicyUrl' termsAndConditionsUrl: $ref: '#/components/schemas/termsAndConditionsUrl' - businessDBA: - $ref: '#/components/schemas/businessDBA' + businessDba: + $ref: '#/components/schemas/businessDba' verificationUpdateRequest: type: object required: @@ -5388,8 +5388,8 @@ components: $ref: '#/components/schemas/privacyPolicyUrl' termsAndConditionsUrl: $ref: '#/components/schemas/termsAndConditionsUrl' - businessDBA: - $ref: '#/components/schemas/businessDBA' + businessDba: + $ref: '#/components/schemas/businessDba' tfvBasicAuthentication: type: object properties: @@ -5483,6 +5483,21 @@ components: $ref: '#/components/schemas/tfvCallbackStatusEnum' internalTicketNumber: $ref: '#/components/schemas/internalTicketNumberForWebhook' + blockedWebhook: + type: object + properties: + accountId: + $ref: '#/components/schemas/accountId1' + phoneNumber: + $ref: '#/components/schemas/tfPhoneNumber' + status: + $ref: '#/components/schemas/tfvCallbackStatusEnum' + internalTicketNumber: + $ref: '#/components/schemas/internalTicketNumberForWebhook' + blocked: + $ref: '#/components/schemas/blocked' + blockedReason: + $ref: '#/components/schemas/blockedReason' tfvSubmissionWrapper: type: object properties: @@ -5849,8 +5864,8 @@ components: $ref: '#/components/schemas/privacyPolicyUrl' termsAndConditionsUrl: $ref: '#/components/schemas/termsAndConditionsUrl' - businessDBA: - $ref: '#/components/schemas/businessDBA' + businessDba: + $ref: '#/components/schemas/businessDba' tfvStatusEnum: type: string enum: @@ -7468,6 +7483,7 @@ components: - $ref: '#/components/schemas/verificationWebhook' - $ref: '#/components/schemas/verificationDenialWebhook' - $ref: '#/components/schemas/failureWebhook' + - $ref: '#/components/schemas/blockedWebhook' webhookSubscriptionRequest: description: >- Information about a webhook that Bandwidth should send upon the diff --git a/docs/BlockedWebhook.md b/docs/BlockedWebhook.md new file mode 100644 index 00000000..7b0be06e --- /dev/null +++ b/docs/BlockedWebhook.md @@ -0,0 +1,18 @@ + + +# BlockedWebhook + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**accountId** | **String** | User's account ID. | [optional] | +|**phoneNumber** | **String** | Toll-free telephone number in E.164 format. | [optional] | +|**status** | **TfvCallbackStatusEnum** | | [optional] | +|**internalTicketNumber** | **UUID** | Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number. | [optional] | +|**blocked** | **Boolean** | Whether a Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. (Not Available Until 5/28/2025) | [optional] | +|**blockedReason** | **String** | The reason why the Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. (Not Available Until 5/28/2025) | [optional] | + + + diff --git a/docs/TfvSubmissionInfo.md b/docs/TfvSubmissionInfo.md index da62c452..2445c89b 100644 --- a/docs/TfvSubmissionInfo.md +++ b/docs/TfvSubmissionInfo.md @@ -18,7 +18,7 @@ |**isvReseller** | **String** | ISV name. | [optional] | |**privacyPolicyUrl** | **String** | The Toll-Free Verification request privacy policy URL. (Not Available Until 5/28/2025) | [optional] | |**termsAndConditionsUrl** | **String** | The Toll-Free Verification request terms and conditions policy URL. (Not Available Until 5/28/2025) | [optional] | -|**businessDBA** | **String** | The company 'Doing Business As'. (Not Available Until 5/28/2025) | [optional] | +|**businessDba** | **String** | The company 'Doing Business As'. (Not Available Until 5/28/2025) | [optional] | diff --git a/docs/VerificationRequest.md b/docs/VerificationRequest.md index 41e46ef1..61f6fb41 100644 --- a/docs/VerificationRequest.md +++ b/docs/VerificationRequest.md @@ -19,7 +19,7 @@ |**isvReseller** | **String** | ISV name. | [optional] | |**privacyPolicyUrl** | **String** | The Toll-Free Verification request privacy policy URL. (Not Available Until 5/28/2025) | [optional] | |**termsAndConditionsUrl** | **String** | The Toll-Free Verification request terms and conditions policy URL. (Not Available Until 5/28/2025) | [optional] | -|**businessDBA** | **String** | The company 'Doing Business As'. (Not Available Until 5/28/2025) | [optional] | +|**businessDba** | **String** | The company 'Doing Business As'. (Not Available Until 5/28/2025) | [optional] | diff --git a/docs/VerificationUpdateRequest.md b/docs/VerificationUpdateRequest.md index a9aba981..f097e779 100644 --- a/docs/VerificationUpdateRequest.md +++ b/docs/VerificationUpdateRequest.md @@ -18,7 +18,7 @@ |**isvReseller** | **String** | ISV name. | [optional] | |**privacyPolicyUrl** | **String** | The Toll-Free Verification request privacy policy URL. (Not Available Until 5/28/2025) | [optional] | |**termsAndConditionsUrl** | **String** | The Toll-Free Verification request terms and conditions policy URL. (Not Available Until 5/28/2025) | [optional] | -|**businessDBA** | **String** | The company 'Doing Business As'. (Not Available Until 5/28/2025) | [optional] | +|**businessDba** | **String** | The company 'Doing Business As'. (Not Available Until 5/28/2025) | [optional] | diff --git a/src/main/java/com/bandwidth/sdk/JSON.java b/src/main/java/com/bandwidth/sdk/JSON.java index 8991b626..f5f0ef06 100644 --- a/src/main/java/com/bandwidth/sdk/JSON.java +++ b/src/main/java/com/bandwidth/sdk/JSON.java @@ -117,6 +117,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.AdditionalDenialReason.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.Address.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.AnswerCallback.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.BlockedWebhook.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.BridgeCompleteCallback.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.BridgeTargetCompleteCallback.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new com.bandwidth.sdk.model.CallRecordingMetadata.CustomTypeAdapterFactory()); diff --git a/src/main/java/com/bandwidth/sdk/model/BlockedWebhook.java b/src/main/java/com/bandwidth/sdk/model/BlockedWebhook.java new file mode 100644 index 00000000..5e0904f6 --- /dev/null +++ b/src/main/java/com/bandwidth/sdk/model/BlockedWebhook.java @@ -0,0 +1,437 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * 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.bandwidth.sdk.model; + +import java.util.Objects; +import com.bandwidth.sdk.model.TfvCallbackStatusEnum; +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 java.io.IOException; +import java.util.Arrays; +import java.util.UUID; + +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 com.bandwidth.sdk.JSON; + +/** + * BlockedWebhook + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.10.0") +public class BlockedWebhook { + public static final String SERIALIZED_NAME_ACCOUNT_ID = "accountId"; + @SerializedName(SERIALIZED_NAME_ACCOUNT_ID) + @javax.annotation.Nullable + private String accountId; + + public static final String SERIALIZED_NAME_PHONE_NUMBER = "phoneNumber"; + @SerializedName(SERIALIZED_NAME_PHONE_NUMBER) + @javax.annotation.Nullable + private String phoneNumber; + + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable + private TfvCallbackStatusEnum status; + + public static final String SERIALIZED_NAME_INTERNAL_TICKET_NUMBER = "internalTicketNumber"; + @SerializedName(SERIALIZED_NAME_INTERNAL_TICKET_NUMBER) + @javax.annotation.Nullable + private UUID internalTicketNumber; + + public static final String SERIALIZED_NAME_BLOCKED = "blocked"; + @SerializedName(SERIALIZED_NAME_BLOCKED) + @javax.annotation.Nullable + private Boolean blocked; + + public static final String SERIALIZED_NAME_BLOCKED_REASON = "blockedReason"; + @SerializedName(SERIALIZED_NAME_BLOCKED_REASON) + @javax.annotation.Nullable + private String blockedReason; + + public BlockedWebhook() { + } + + public BlockedWebhook accountId(@javax.annotation.Nullable String accountId) { + this.accountId = accountId; + return this; + } + + /** + * User's account ID. + * @return accountId + */ + @javax.annotation.Nullable + public String getAccountId() { + return accountId; + } + + public void setAccountId(@javax.annotation.Nullable String accountId) { + this.accountId = accountId; + } + + + public BlockedWebhook phoneNumber(@javax.annotation.Nullable String phoneNumber) { + this.phoneNumber = phoneNumber; + return this; + } + + /** + * Toll-free telephone number in E.164 format. + * @return phoneNumber + */ + @javax.annotation.Nullable + public String getPhoneNumber() { + return phoneNumber; + } + + public void setPhoneNumber(@javax.annotation.Nullable String phoneNumber) { + this.phoneNumber = phoneNumber; + } + + + public BlockedWebhook status(@javax.annotation.Nullable TfvCallbackStatusEnum status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + */ + @javax.annotation.Nullable + public TfvCallbackStatusEnum getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nullable TfvCallbackStatusEnum status) { + this.status = status; + } + + + public BlockedWebhook internalTicketNumber(@javax.annotation.Nullable UUID internalTicketNumber) { + this.internalTicketNumber = internalTicketNumber; + return this; + } + + /** + * Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number. + * @return internalTicketNumber + */ + @javax.annotation.Nullable + public UUID getInternalTicketNumber() { + return internalTicketNumber; + } + + public void setInternalTicketNumber(@javax.annotation.Nullable UUID internalTicketNumber) { + this.internalTicketNumber = internalTicketNumber; + } + + + public BlockedWebhook blocked(@javax.annotation.Nullable Boolean blocked) { + this.blocked = blocked; + return this; + } + + /** + * Whether a Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. (Not Available Until 5/28/2025) + * @return blocked + */ + @javax.annotation.Nullable + public Boolean getBlocked() { + return blocked; + } + + public void setBlocked(@javax.annotation.Nullable Boolean blocked) { + this.blocked = blocked; + } + + + public BlockedWebhook blockedReason(@javax.annotation.Nullable String blockedReason) { + this.blockedReason = blockedReason; + return this; + } + + /** + * The reason why the Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. (Not Available Until 5/28/2025) + * @return blockedReason + */ + @javax.annotation.Nullable + public String getBlockedReason() { + return blockedReason; + } + + public void setBlockedReason(@javax.annotation.Nullable String blockedReason) { + this.blockedReason = blockedReason; + } + + /** + * 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 BlockedWebhook instance itself + */ + public BlockedWebhook 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; + } + BlockedWebhook blockedWebhook = (BlockedWebhook) o; + return Objects.equals(this.accountId, blockedWebhook.accountId) && + Objects.equals(this.phoneNumber, blockedWebhook.phoneNumber) && + Objects.equals(this.status, blockedWebhook.status) && + Objects.equals(this.internalTicketNumber, blockedWebhook.internalTicketNumber) && + Objects.equals(this.blocked, blockedWebhook.blocked) && + Objects.equals(this.blockedReason, blockedWebhook.blockedReason)&& + Objects.equals(this.additionalProperties, blockedWebhook.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(accountId, phoneNumber, status, internalTicketNumber, blocked, blockedReason, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BlockedWebhook {\n"); + sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); + sb.append(" phoneNumber: ").append(toIndentedString(phoneNumber)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" internalTicketNumber: ").append(toIndentedString(internalTicketNumber)).append("\n"); + sb.append(" blocked: ").append(toIndentedString(blocked)).append("\n"); + sb.append(" blockedReason: ").append(toIndentedString(blockedReason)).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(); + openapiFields.add("accountId"); + openapiFields.add("phoneNumber"); + openapiFields.add("status"); + openapiFields.add("internalTicketNumber"); + openapiFields.add("blocked"); + openapiFields.add("blockedReason"); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(); + } + + /** + * 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 BlockedWebhook + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BlockedWebhook.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format("The required field(s) %s in BlockedWebhook is not found in the empty JSON string", BlockedWebhook.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("accountId") != null && !jsonObj.get("accountId").isJsonNull()) && !jsonObj.get("accountId").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `accountId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountId").toString())); + } + if ((jsonObj.get("phoneNumber") != null && !jsonObj.get("phoneNumber").isJsonNull()) && !jsonObj.get("phoneNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `phoneNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("phoneNumber").toString())); + } + // validate the optional field `status` + if (jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) { + TfvCallbackStatusEnum.validateJsonElement(jsonObj.get("status")); + } + if ((jsonObj.get("internalTicketNumber") != null && !jsonObj.get("internalTicketNumber").isJsonNull()) && !jsonObj.get("internalTicketNumber").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `internalTicketNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("internalTicketNumber").toString())); + } + if ((jsonObj.get("blockedReason") != null && !jsonObj.get("blockedReason").isJsonNull()) && !jsonObj.get("blockedReason").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `blockedReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("blockedReason").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BlockedWebhook.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BlockedWebhook' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(BlockedWebhook.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, BlockedWebhook 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 { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public BlockedWebhook read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + BlockedWebhook 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("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 BlockedWebhook given an JSON string + * + * @param jsonString JSON string + * @return An instance of BlockedWebhook + * @throws IOException if the JSON string is invalid with respect to BlockedWebhook + */ + public static BlockedWebhook fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BlockedWebhook.class); + } + + /** + * Convert an instance of BlockedWebhook to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/com/bandwidth/sdk/model/TfvSubmissionInfo.java b/src/main/java/com/bandwidth/sdk/model/TfvSubmissionInfo.java index 0a4764c3..573b4aca 100644 --- a/src/main/java/com/bandwidth/sdk/model/TfvSubmissionInfo.java +++ b/src/main/java/com/bandwidth/sdk/model/TfvSubmissionInfo.java @@ -109,10 +109,10 @@ public class TfvSubmissionInfo { @javax.annotation.Nullable private String termsAndConditionsUrl; - public static final String SERIALIZED_NAME_BUSINESS_D_B_A = "businessDBA"; - @SerializedName(SERIALIZED_NAME_BUSINESS_D_B_A) + public static final String SERIALIZED_NAME_BUSINESS_DBA = "businessDba"; + @SerializedName(SERIALIZED_NAME_BUSINESS_DBA) @javax.annotation.Nullable - private String businessDBA; + private String businessDba; public TfvSubmissionInfo() { } @@ -328,22 +328,22 @@ public void setTermsAndConditionsUrl(@javax.annotation.Nullable String termsAndC } - public TfvSubmissionInfo businessDBA(@javax.annotation.Nullable String businessDBA) { - this.businessDBA = businessDBA; + public TfvSubmissionInfo businessDba(@javax.annotation.Nullable String businessDba) { + this.businessDba = businessDba; return this; } /** * The company 'Doing Business As'. (Not Available Until 5/28/2025) - * @return businessDBA + * @return businessDba */ @javax.annotation.Nullable - public String getBusinessDBA() { - return businessDBA; + public String getBusinessDba() { + return businessDba; } - public void setBusinessDBA(@javax.annotation.Nullable String businessDBA) { - this.businessDBA = businessDBA; + public void setBusinessDba(@javax.annotation.Nullable String businessDba) { + this.businessDba = businessDba; } /** @@ -412,7 +412,7 @@ public boolean equals(Object o) { Objects.equals(this.isvReseller, tfvSubmissionInfo.isvReseller) && Objects.equals(this.privacyPolicyUrl, tfvSubmissionInfo.privacyPolicyUrl) && Objects.equals(this.termsAndConditionsUrl, tfvSubmissionInfo.termsAndConditionsUrl) && - Objects.equals(this.businessDBA, tfvSubmissionInfo.businessDBA)&& + Objects.equals(this.businessDba, tfvSubmissionInfo.businessDba)&& Objects.equals(this.additionalProperties, tfvSubmissionInfo.additionalProperties); } @@ -422,7 +422,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(businessAddress, businessContact, messageVolume, useCase, useCaseSummary, productionMessageContent, optInWorkflow, additionalInformation, isvReseller, privacyPolicyUrl, termsAndConditionsUrl, businessDBA, additionalProperties); + return Objects.hash(businessAddress, businessContact, messageVolume, useCase, useCaseSummary, productionMessageContent, optInWorkflow, additionalInformation, isvReseller, privacyPolicyUrl, termsAndConditionsUrl, businessDba, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -447,7 +447,7 @@ public String toString() { sb.append(" isvReseller: ").append(toIndentedString(isvReseller)).append("\n"); sb.append(" privacyPolicyUrl: ").append(toIndentedString(privacyPolicyUrl)).append("\n"); sb.append(" termsAndConditionsUrl: ").append(toIndentedString(termsAndConditionsUrl)).append("\n"); - sb.append(" businessDBA: ").append(toIndentedString(businessDBA)).append("\n"); + sb.append(" businessDba: ").append(toIndentedString(businessDba)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -482,7 +482,7 @@ private String toIndentedString(Object o) { openapiFields.add("isvReseller"); openapiFields.add("privacyPolicyUrl"); openapiFields.add("termsAndConditionsUrl"); - openapiFields.add("businessDBA"); + openapiFields.add("businessDba"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -534,8 +534,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("termsAndConditionsUrl") != null && !jsonObj.get("termsAndConditionsUrl").isJsonNull()) && !jsonObj.get("termsAndConditionsUrl").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `termsAndConditionsUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("termsAndConditionsUrl").toString())); } - if ((jsonObj.get("businessDBA") != null && !jsonObj.get("businessDBA").isJsonNull()) && !jsonObj.get("businessDBA").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `businessDBA` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessDBA").toString())); + if ((jsonObj.get("businessDba") != null && !jsonObj.get("businessDba").isJsonNull()) && !jsonObj.get("businessDba").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `businessDba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessDba").toString())); } } diff --git a/src/main/java/com/bandwidth/sdk/model/VerificationRequest.java b/src/main/java/com/bandwidth/sdk/model/VerificationRequest.java index 46ca3fe7..4e0c7fe8 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerificationRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/VerificationRequest.java @@ -116,10 +116,10 @@ public class VerificationRequest { @javax.annotation.Nullable private String termsAndConditionsUrl; - public static final String SERIALIZED_NAME_BUSINESS_D_B_A = "businessDBA"; - @SerializedName(SERIALIZED_NAME_BUSINESS_D_B_A) + public static final String SERIALIZED_NAME_BUSINESS_DBA = "businessDba"; + @SerializedName(SERIALIZED_NAME_BUSINESS_DBA) @javax.annotation.Nullable - private String businessDBA; + private String businessDba; public VerificationRequest() { } @@ -362,22 +362,22 @@ public void setTermsAndConditionsUrl(@javax.annotation.Nullable String termsAndC } - public VerificationRequest businessDBA(@javax.annotation.Nullable String businessDBA) { - this.businessDBA = businessDBA; + public VerificationRequest businessDba(@javax.annotation.Nullable String businessDba) { + this.businessDba = businessDba; return this; } /** * The company 'Doing Business As'. (Not Available Until 5/28/2025) - * @return businessDBA + * @return businessDba */ @javax.annotation.Nullable - public String getBusinessDBA() { - return businessDBA; + public String getBusinessDba() { + return businessDba; } - public void setBusinessDBA(@javax.annotation.Nullable String businessDBA) { - this.businessDBA = businessDBA; + public void setBusinessDba(@javax.annotation.Nullable String businessDba) { + this.businessDba = businessDba; } /** @@ -447,7 +447,7 @@ public boolean equals(Object o) { Objects.equals(this.isvReseller, verificationRequest.isvReseller) && Objects.equals(this.privacyPolicyUrl, verificationRequest.privacyPolicyUrl) && Objects.equals(this.termsAndConditionsUrl, verificationRequest.termsAndConditionsUrl) && - Objects.equals(this.businessDBA, verificationRequest.businessDBA)&& + Objects.equals(this.businessDba, verificationRequest.businessDba)&& Objects.equals(this.additionalProperties, verificationRequest.additionalProperties); } @@ -457,7 +457,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(businessAddress, businessContact, messageVolume, phoneNumbers, useCase, useCaseSummary, productionMessageContent, optInWorkflow, additionalInformation, isvReseller, privacyPolicyUrl, termsAndConditionsUrl, businessDBA, additionalProperties); + return Objects.hash(businessAddress, businessContact, messageVolume, phoneNumbers, useCase, useCaseSummary, productionMessageContent, optInWorkflow, additionalInformation, isvReseller, privacyPolicyUrl, termsAndConditionsUrl, businessDba, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -483,7 +483,7 @@ public String toString() { sb.append(" isvReseller: ").append(toIndentedString(isvReseller)).append("\n"); sb.append(" privacyPolicyUrl: ").append(toIndentedString(privacyPolicyUrl)).append("\n"); sb.append(" termsAndConditionsUrl: ").append(toIndentedString(termsAndConditionsUrl)).append("\n"); - sb.append(" businessDBA: ").append(toIndentedString(businessDBA)).append("\n"); + sb.append(" businessDba: ").append(toIndentedString(businessDba)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -519,7 +519,7 @@ private String toIndentedString(Object o) { openapiFields.add("isvReseller"); openapiFields.add("privacyPolicyUrl"); openapiFields.add("termsAndConditionsUrl"); - openapiFields.add("businessDBA"); + openapiFields.add("businessDba"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -586,8 +586,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("termsAndConditionsUrl") != null && !jsonObj.get("termsAndConditionsUrl").isJsonNull()) && !jsonObj.get("termsAndConditionsUrl").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `termsAndConditionsUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("termsAndConditionsUrl").toString())); } - if ((jsonObj.get("businessDBA") != null && !jsonObj.get("businessDBA").isJsonNull()) && !jsonObj.get("businessDBA").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `businessDBA` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessDBA").toString())); + if ((jsonObj.get("businessDba") != null && !jsonObj.get("businessDba").isJsonNull()) && !jsonObj.get("businessDba").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `businessDba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessDba").toString())); } } diff --git a/src/main/java/com/bandwidth/sdk/model/VerificationUpdateRequest.java b/src/main/java/com/bandwidth/sdk/model/VerificationUpdateRequest.java index 9703e96a..c693990b 100644 --- a/src/main/java/com/bandwidth/sdk/model/VerificationUpdateRequest.java +++ b/src/main/java/com/bandwidth/sdk/model/VerificationUpdateRequest.java @@ -109,10 +109,10 @@ public class VerificationUpdateRequest { @javax.annotation.Nullable private String termsAndConditionsUrl; - public static final String SERIALIZED_NAME_BUSINESS_D_B_A = "businessDBA"; - @SerializedName(SERIALIZED_NAME_BUSINESS_D_B_A) + public static final String SERIALIZED_NAME_BUSINESS_DBA = "businessDba"; + @SerializedName(SERIALIZED_NAME_BUSINESS_DBA) @javax.annotation.Nullable - private String businessDBA; + private String businessDba; public VerificationUpdateRequest() { } @@ -328,22 +328,22 @@ public void setTermsAndConditionsUrl(@javax.annotation.Nullable String termsAndC } - public VerificationUpdateRequest businessDBA(@javax.annotation.Nullable String businessDBA) { - this.businessDBA = businessDBA; + public VerificationUpdateRequest businessDba(@javax.annotation.Nullable String businessDba) { + this.businessDba = businessDba; return this; } /** * The company 'Doing Business As'. (Not Available Until 5/28/2025) - * @return businessDBA + * @return businessDba */ @javax.annotation.Nullable - public String getBusinessDBA() { - return businessDBA; + public String getBusinessDba() { + return businessDba; } - public void setBusinessDBA(@javax.annotation.Nullable String businessDBA) { - this.businessDBA = businessDBA; + public void setBusinessDba(@javax.annotation.Nullable String businessDba) { + this.businessDba = businessDba; } /** @@ -412,7 +412,7 @@ public boolean equals(Object o) { Objects.equals(this.isvReseller, verificationUpdateRequest.isvReseller) && Objects.equals(this.privacyPolicyUrl, verificationUpdateRequest.privacyPolicyUrl) && Objects.equals(this.termsAndConditionsUrl, verificationUpdateRequest.termsAndConditionsUrl) && - Objects.equals(this.businessDBA, verificationUpdateRequest.businessDBA)&& + Objects.equals(this.businessDba, verificationUpdateRequest.businessDba)&& Objects.equals(this.additionalProperties, verificationUpdateRequest.additionalProperties); } @@ -422,7 +422,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(businessAddress, businessContact, messageVolume, useCase, useCaseSummary, productionMessageContent, optInWorkflow, additionalInformation, isvReseller, privacyPolicyUrl, termsAndConditionsUrl, businessDBA, additionalProperties); + return Objects.hash(businessAddress, businessContact, messageVolume, useCase, useCaseSummary, productionMessageContent, optInWorkflow, additionalInformation, isvReseller, privacyPolicyUrl, termsAndConditionsUrl, businessDba, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -447,7 +447,7 @@ public String toString() { sb.append(" isvReseller: ").append(toIndentedString(isvReseller)).append("\n"); sb.append(" privacyPolicyUrl: ").append(toIndentedString(privacyPolicyUrl)).append("\n"); sb.append(" termsAndConditionsUrl: ").append(toIndentedString(termsAndConditionsUrl)).append("\n"); - sb.append(" businessDBA: ").append(toIndentedString(businessDBA)).append("\n"); + sb.append(" businessDba: ").append(toIndentedString(businessDba)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -482,7 +482,7 @@ private String toIndentedString(Object o) { openapiFields.add("isvReseller"); openapiFields.add("privacyPolicyUrl"); openapiFields.add("termsAndConditionsUrl"); - openapiFields.add("businessDBA"); + openapiFields.add("businessDba"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); @@ -542,8 +542,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if ((jsonObj.get("termsAndConditionsUrl") != null && !jsonObj.get("termsAndConditionsUrl").isJsonNull()) && !jsonObj.get("termsAndConditionsUrl").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `termsAndConditionsUrl` to be a primitive type in the JSON string but got `%s`", jsonObj.get("termsAndConditionsUrl").toString())); } - if ((jsonObj.get("businessDBA") != null && !jsonObj.get("businessDBA").isJsonNull()) && !jsonObj.get("businessDBA").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `businessDBA` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessDBA").toString())); + if ((jsonObj.get("businessDba") != null && !jsonObj.get("businessDba").isJsonNull()) && !jsonObj.get("businessDba").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format("Expected the field `businessDba` to be a primitive type in the JSON string but got `%s`", jsonObj.get("businessDba").toString())); } } diff --git a/src/test/java/com/bandwidth/sdk/unit/api/TollFreeVerificationApiTest.java b/src/test/java/com/bandwidth/sdk/unit/api/TollFreeVerificationApiTest.java index bfaf0d77..717c69d9 100644 --- a/src/test/java/com/bandwidth/sdk/unit/api/TollFreeVerificationApiTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/api/TollFreeVerificationApiTest.java @@ -184,7 +184,7 @@ public void requestTollFreeVerificationTest() throws ApiException { .isvReseller("isvReseller") .privacyPolicyUrl("privacyPolicyUrl") .termsAndConditionsUrl("termsAndConditionsUrl") - .businessDBA("businessDBA"); + .businessDba("businessDba"); ApiResponse response = api.requestTollFreeVerificationWithHttpInfo(BW_ACCOUNT_ID, verificationRequest); diff --git a/src/test/java/com/bandwidth/sdk/unit/models/BlockedWebhookTest.java b/src/test/java/com/bandwidth/sdk/unit/models/BlockedWebhookTest.java new file mode 100644 index 00000000..316c9d34 --- /dev/null +++ b/src/test/java/com/bandwidth/sdk/unit/models/BlockedWebhookTest.java @@ -0,0 +1,93 @@ +/* + * Bandwidth + * Bandwidth's Communication APIs + * + * The version of the OpenAPI document: 1.0.0 + * Contact: letstalk@bandwidth.com + * + * 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.bandwidth.sdk.unit.models; + +import org.junit.jupiter.api.Test; + +import java.util.UUID; +import com.bandwidth.sdk.model.BlockedWebhook; +import com.bandwidth.sdk.model.TfvCallbackStatusEnum; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.CoreMatchers.instanceOf; + +/** + * Model tests for BlockedWebhook + */ +public class BlockedWebhookTest { + private final BlockedWebhook model = new BlockedWebhook() + .accountId("accountId") + .phoneNumber("phoneNumber") + .status(TfvCallbackStatusEnum.VERIFIED) + .internalTicketNumber(UUID.randomUUID()) + .blocked(true) + .blockedReason("blockedReason"); + + /** + * Model tests for BlockedWebhook + */ + @Test + public void testBlockedWebhook() { + assertThat(model, instanceOf(BlockedWebhook.class)); + } + + /** + * Test the property 'accountId' + */ + @Test + public void accountIdTest() { + assertThat(model.getAccountId(), instanceOf(String.class)); + } + + /** + * Test the property 'phoneNumber' + */ + @Test + public void phoneNumberTest() { + assertThat(model.getPhoneNumber(), instanceOf(String.class)); + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + assertThat(model.getStatus(), instanceOf(TfvCallbackStatusEnum.class)); + } + + /** + * Test the property 'internalTicketNumber' + */ + @Test + public void internalTicketNumberTest() { + assertThat(model.getInternalTicketNumber(), instanceOf(UUID.class)); + } + + /** + * Test the property 'blocked' + */ + @Test + public void blockedTest() { + assertThat(model.getBlocked(), instanceOf(Boolean.class)); + } + + /** + * Test the property 'blockedReason' + */ + @Test + public void blockedReasonTest() { + assertThat(model.getBlockedReason(), instanceOf(String.class)); + } + +} diff --git a/src/test/java/com/bandwidth/sdk/unit/models/TfvSubmissionInfoTest.java b/src/test/java/com/bandwidth/sdk/unit/models/TfvSubmissionInfoTest.java index b7f3c2f8..537b91e1 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/TfvSubmissionInfoTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/TfvSubmissionInfoTest.java @@ -38,7 +38,7 @@ public class TfvSubmissionInfoTest { .isvReseller("isvReseller") .privacyPolicyUrl("privacyPolicyUrl") .termsAndConditionsUrl("termsAndConditionsUrl") - .businessDBA("businessDBA"); + .businessDba("businessDba"); /** * Model tests for TfvSubmissionInfo @@ -137,11 +137,11 @@ public void termsAndConditionsUrlTest() { } /** - * Test the property 'businessDBA' + * Test the property 'businessDba' */ @Test - public void businessDBATest() { - assertThat(model.getBusinessDBA(), instanceOf(String.class)); + public void businessDbaTest() { + assertThat(model.getBusinessDba(), instanceOf(String.class)); } } diff --git a/src/test/java/com/bandwidth/sdk/unit/models/VerificationRequestTest.java b/src/test/java/com/bandwidth/sdk/unit/models/VerificationRequestTest.java index 4cfc0146..76dba539 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/VerificationRequestTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/VerificationRequestTest.java @@ -41,7 +41,7 @@ public class VerificationRequestTest { .isvReseller("isvReseller") .privacyPolicyUrl("privacyPolicyUrl") .termsAndConditionsUrl("termsAndConditionsUrl") - .businessDBA("businessDBA"); + .businessDba("businessDba"); /** * Model tests for VerificationRequest @@ -148,11 +148,11 @@ public void termsAndConditionsUrlTest() { } /** - * Test the property 'businessDBA' + * Test the property 'businessDba' */ @Test - public void businessDBATest() { - assertThat(model.getBusinessDBA(), instanceOf(String.class)); + public void businessDbaTest() { + assertThat(model.getBusinessDba(), instanceOf(String.class)); } } diff --git a/src/test/java/com/bandwidth/sdk/unit/models/VerificationUpdateRequestTest.java b/src/test/java/com/bandwidth/sdk/unit/models/VerificationUpdateRequestTest.java index c8fedf60..ea2add3c 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/VerificationUpdateRequestTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/VerificationUpdateRequestTest.java @@ -38,7 +38,7 @@ public class VerificationUpdateRequestTest { .isvReseller("isvReseller") .privacyPolicyUrl("privacyPolicyUrl") .termsAndConditionsUrl("termsAndConditionsUrl") - .businessDBA("businessDBA"); + .businessDba("businessDba"); /** * Model tests for VerificationUpdateRequest @@ -137,11 +137,11 @@ public void termsAndConditionsUrlTest() { } /** - * Test the property 'businessDBA' + * Test the property 'businessDba' */ @Test - public void businessDBATest() { - assertThat(model.getBusinessDBA(), instanceOf(String.class)); + public void businessDbaTest() { + assertThat(model.getBusinessDba(), instanceOf(String.class)); } }