Skip to content
Open
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
86 changes: 59 additions & 27 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14829,11 +14829,38 @@ components:
description: Reason code for denial.
example: 511
type: integer
denialStatusCodeNullable:
description: Reason code for denial.
example: 511
nullable: true
type: integer
resubmitAllowed:
description: Whether a Toll-Free Verification request qualifies for resubmission
via PUT.
example: true
type: boolean
additionalDenialReason:
properties:
statusCode:
description: Reason code for denial.
example: 511
type: integer
reason:
description: Explanation for why a verification request was declined.
example: Invalid Information - Can't Validate URL - Website is not accessible
/ not available
nullable: false
type: string
resubmitAllowed:
description: Whether a Toll-Free Verification request qualifies for resubmission
via PUT.
example: true
type: boolean
required:
- reason
- resubmitAllowed
- statusCode
type: object
blocked:
description: Whether a Toll-Free Verification is blocked. This attribute will
only be defined when the number is blocked.
Expand Down Expand Up @@ -14952,28 +14979,6 @@ components:
description: Indicates whether the content is age-gated.
example: false
type: boolean
additionalDenialReason:
properties:
statusCode:
description: Reason code for denial.
example: 511
type: integer
reason:
description: Explanation for why a verification request was declined.
example: Invalid Information - Can't Validate URL - Website is not accessible
/ not available
nullable: false
type: string
resubmitAllowed:
description: Whether a Toll-Free Verification request qualifies for resubmission
via PUT.
example: true
type: boolean
required:
- reason
- resubmitAllowed
- statusCode
type: object
internalTicketNumber:
description: Unique identifier (UUID) generated by Bandwidth to assist in tracking
the verification status of a toll-free number - included in all webhook payloads.
Expand Down Expand Up @@ -15877,12 +15882,22 @@ components:
type: object
tfvStatus:
example:
internalTicketNumber: acde070d-8c4c-4f0d-9d8a-162843c10333
phoneNumber: "+18005555555"
blocked: true
blockedReason: Toll-free number was used to send spam messages
resubmitAllowed: true
createdDateTime: 2021-06-08T06:45:13Z
declineReasonDescription: Invalid Information - Can't Validate URL - Website
is not accessible / not available
internalTicketNumber: acde070d-8c4c-4f0d-9d8a-162843c10333
phoneNumber: "+18005555555"
blocked: true
denialStatusCode: 511
additionalDenialReasons:
- statusCode: 512
reason: Reason A
resubmitAllowed: true
- statusCode: 513
reason: Reason B
resubmitAllowed: true
modifiedDateTime: 2021-06-08T06:45:13Z
submission:
additionalInformation: Any additional information
Expand Down Expand Up @@ -15917,8 +15932,6 @@ components:
state: NC
url: https://www.example.com/path/to/resource
useCaseSummary: Text summarizing the use case for the toll-free number
declineReasonDescription: Invalid Information - Can't Validate URL - Website
is not accessible / not available
cvToken: cv.user123|sess456|mno|tfree|read_write|X7yZ9aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVw
status: VERIFIED
properties:
Expand All @@ -15944,6 +15957,25 @@ components:
/ not available
nullable: false
type: string
denialStatusCode:
description: Reason code for denial.
example: 511
nullable: true
type: integer
additionalDenialReasons:
description: An optional list of denial reasons in addition to declineReasonDescription
when multiple reasons apply.
example:
- statusCode: 512
reason: Reason A
resubmitAllowed: true
- statusCode: 513
reason: Reason B
resubmitAllowed: true
items:
$ref: "#/components/schemas/additionalDenialReason"
nullable: true
type: array
resubmitAllowed:
description: Whether a Toll-Free Verification request qualifies for resubmission
via PUT.
Expand Down
50 changes: 36 additions & 14 deletions bandwidth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6034,12 +6034,30 @@ components:
description: Reason code for denial.
type: integer
example: 511
denialStatusCodeNullable:
description: Reason code for denial.
nullable: true
type: integer
example: 511
resubmitAllowed:
description: >-
Whether a Toll-Free Verification request qualifies for resubmission via
PUT.
example: true
type: boolean
additionalDenialReason:
type: object
properties:
statusCode:
$ref: '#/components/schemas/denialStatusCode'
reason:
$ref: '#/components/schemas/declineReasonDescription'
resubmitAllowed:
$ref: '#/components/schemas/resubmitAllowed'
required:
- statusCode
- reason
- resubmitAllowed
blocked:
description: >-
Whether a Toll-Free Verification is blocked. This attribute will only be
Expand Down Expand Up @@ -6194,19 +6212,6 @@ components:
type: boolean
description: Indicates whether the content is age-gated.
example: false
additionalDenialReason:
properties:
statusCode:
$ref: '#/components/schemas/denialStatusCode'
reason:
$ref: '#/components/schemas/declineReasonDescription'
resubmitAllowed:
$ref: '#/components/schemas/resubmitAllowed'
required:
- statusCode
- reason
- resubmitAllowed
type: object
internalTicketNumber:
type: string
description: >-
Expand Down Expand Up @@ -6402,6 +6407,7 @@ components:
description: >-
An optional list of denial reasons in addition to
declineReasonDescription when multiple reasons apply.
type: array
items:
$ref: '#/components/schemas/additionalDenialReason'
example:
Expand All @@ -6411,7 +6417,6 @@ components:
- statusCode: 513
reason: Reason B
resubmitAllowed: true
type: array
declineReasonDescription:
$ref: '#/components/schemas/declineReasonDescription'
denialStatusCode:
Expand Down Expand Up @@ -6779,6 +6784,23 @@ components:
$ref: '#/components/schemas/internalTicketNumber'
declineReasonDescription:
$ref: '#/components/schemas/declineReasonDescription'
denialStatusCode:
$ref: '#/components/schemas/denialStatusCodeNullable'
additionalDenialReasons:
description: >-
An optional list of denial reasons in addition to
declineReasonDescription when multiple reasons apply.
nullable: true
type: array
items:
$ref: '#/components/schemas/additionalDenialReason'
example:
- statusCode: 512
reason: Reason A
resubmitAllowed: true
- statusCode: 513
reason: Reason B
resubmitAllowed: true
resubmitAllowed:
$ref: '#/components/schemas/resubmitAllowed'
createdDateTime:
Expand Down
2 changes: 2 additions & 0 deletions docs/TfvStatus.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
|**status** | **TfvStatusEnum** | | [optional] |
|**internalTicketNumber** | **String** | Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number - included in all webhook payloads. | [optional] |
|**declineReasonDescription** | **String** | Explanation for why a verification request was declined. | [optional] |
|**denialStatusCode** | **Integer** | Reason code for denial. | [optional] |
|**additionalDenialReasons** | [**List<AdditionalDenialReason>**](AdditionalDenialReason.md) | An optional list of denial reasons in addition to declineReasonDescription when multiple reasons apply. | [optional] |
|**resubmitAllowed** | **Boolean** | Whether a Toll-Free Verification request qualifies for resubmission via PUT. | [optional] |
|**createdDateTime** | **OffsetDateTime** | Date and time the verification request was created. | [optional] |
|**modifiedDateTime** | **OffsetDateTime** | Date and time the verification request was last modified. | [optional] |
Expand Down
81 changes: 79 additions & 2 deletions src/main/java/com/bandwidth/sdk/model/TfvStatus.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import java.util.Objects;
import java.util.Locale;
import com.bandwidth.sdk.model.AdditionalDenialReason;
import com.bandwidth.sdk.model.TfvStatusEnum;
import com.bandwidth.sdk.model.TfvSubmissionInfo;
import com.google.gson.TypeAdapter;
Expand All @@ -24,7 +25,9 @@
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.openapitools.jackson.nullable.JsonNullable;

import com.google.gson.Gson;
Expand Down Expand Up @@ -76,6 +79,16 @@ public class TfvStatus {
@javax.annotation.Nullable
private String declineReasonDescription;

public static final String SERIALIZED_NAME_DENIAL_STATUS_CODE = "denialStatusCode";
@SerializedName(SERIALIZED_NAME_DENIAL_STATUS_CODE)
@javax.annotation.Nullable
private Integer denialStatusCode;

public static final String SERIALIZED_NAME_ADDITIONAL_DENIAL_REASONS = "additionalDenialReasons";
@SerializedName(SERIALIZED_NAME_ADDITIONAL_DENIAL_REASONS)
@javax.annotation.Nullable
private List<AdditionalDenialReason> additionalDenialReasons;

public static final String SERIALIZED_NAME_RESUBMIT_ALLOWED = "resubmitAllowed";
@SerializedName(SERIALIZED_NAME_RESUBMIT_ALLOWED)
@javax.annotation.Nullable
Expand Down Expand Up @@ -190,6 +203,52 @@ public void setDeclineReasonDescription(@javax.annotation.Nullable String declin
}


public TfvStatus denialStatusCode(@javax.annotation.Nullable Integer denialStatusCode) {
this.denialStatusCode = denialStatusCode;
return this;
}

/**
* Reason code for denial.
* @return denialStatusCode
*/
@javax.annotation.Nullable
public Integer getDenialStatusCode() {
return denialStatusCode;
}

public void setDenialStatusCode(@javax.annotation.Nullable Integer denialStatusCode) {
this.denialStatusCode = denialStatusCode;
}


public TfvStatus additionalDenialReasons(@javax.annotation.Nullable List<AdditionalDenialReason> additionalDenialReasons) {
this.additionalDenialReasons = additionalDenialReasons;
return this;
}

public TfvStatus addAdditionalDenialReasonsItem(AdditionalDenialReason additionalDenialReasonsItem) {
if (this.additionalDenialReasons == null) {
this.additionalDenialReasons = new ArrayList<>();
}
this.additionalDenialReasons.add(additionalDenialReasonsItem);
return this;
}

/**
* An optional list of denial reasons in addition to declineReasonDescription when multiple reasons apply.
* @return additionalDenialReasons
*/
@javax.annotation.Nullable
public List<AdditionalDenialReason> getAdditionalDenialReasons() {
return additionalDenialReasons;
}

public void setAdditionalDenialReasons(@javax.annotation.Nullable List<AdditionalDenialReason> additionalDenialReasons) {
this.additionalDenialReasons = additionalDenialReasons;
}


public TfvStatus resubmitAllowed(@javax.annotation.Nullable Boolean resubmitAllowed) {
this.resubmitAllowed = resubmitAllowed;
return this;
Expand Down Expand Up @@ -381,6 +440,8 @@ public boolean equals(Object o) {
Objects.equals(this.status, tfvStatus.status) &&
Objects.equals(this.internalTicketNumber, tfvStatus.internalTicketNumber) &&
Objects.equals(this.declineReasonDescription, tfvStatus.declineReasonDescription) &&
Objects.equals(this.denialStatusCode, tfvStatus.denialStatusCode) &&
Objects.equals(this.additionalDenialReasons, tfvStatus.additionalDenialReasons) &&
Objects.equals(this.resubmitAllowed, tfvStatus.resubmitAllowed) &&
Objects.equals(this.createdDateTime, tfvStatus.createdDateTime) &&
Objects.equals(this.modifiedDateTime, tfvStatus.modifiedDateTime) &&
Expand All @@ -397,7 +458,7 @@ private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b)

@Override
public int hashCode() {
return Objects.hash(phoneNumber, status, internalTicketNumber, declineReasonDescription, resubmitAllowed, createdDateTime, modifiedDateTime, submission, blocked, blockedReason, cvToken, additionalProperties);
return Objects.hash(phoneNumber, status, internalTicketNumber, declineReasonDescription, denialStatusCode, additionalDenialReasons, resubmitAllowed, createdDateTime, modifiedDateTime, submission, blocked, blockedReason, cvToken, additionalProperties);
}

private static <T> int hashCodeNullable(JsonNullable<T> a) {
Expand All @@ -415,6 +476,8 @@ public String toString() {
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" internalTicketNumber: ").append(toIndentedString(internalTicketNumber)).append("\n");
sb.append(" declineReasonDescription: ").append(toIndentedString(declineReasonDescription)).append("\n");
sb.append(" denialStatusCode: ").append(toIndentedString(denialStatusCode)).append("\n");
sb.append(" additionalDenialReasons: ").append(toIndentedString(additionalDenialReasons)).append("\n");
sb.append(" resubmitAllowed: ").append(toIndentedString(resubmitAllowed)).append("\n");
sb.append(" createdDateTime: ").append(toIndentedString(createdDateTime)).append("\n");
sb.append(" modifiedDateTime: ").append(toIndentedString(modifiedDateTime)).append("\n");
Expand Down Expand Up @@ -444,7 +507,7 @@ private String toIndentedString(Object o) {

static {
// a set of all properties/fields (JSON key names)
openapiFields = new HashSet<String>(Arrays.asList("phoneNumber", "status", "internalTicketNumber", "declineReasonDescription", "resubmitAllowed", "createdDateTime", "modifiedDateTime", "submission", "blocked", "blockedReason", "cvToken"));
openapiFields = new HashSet<String>(Arrays.asList("phoneNumber", "status", "internalTicketNumber", "declineReasonDescription", "denialStatusCode", "additionalDenialReasons", "resubmitAllowed", "createdDateTime", "modifiedDateTime", "submission", "blocked", "blockedReason", "cvToken"));

// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet<String>(0);
Expand Down Expand Up @@ -476,6 +539,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
if ((jsonObj.get("declineReasonDescription") != null && !jsonObj.get("declineReasonDescription").isJsonNull()) && !jsonObj.get("declineReasonDescription").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `declineReasonDescription` to be a primitive type in the JSON string but got `%s`", jsonObj.get("declineReasonDescription").toString()));
}
if (jsonObj.get("additionalDenialReasons") != null && !jsonObj.get("additionalDenialReasons").isJsonNull()) {
JsonArray jsonArrayadditionalDenialReasons = jsonObj.getAsJsonArray("additionalDenialReasons");
if (jsonArrayadditionalDenialReasons != null) {
// ensure the json data is an array
if (!jsonObj.get("additionalDenialReasons").isJsonArray()) {
throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `additionalDenialReasons` to be an array in the JSON string but got `%s`", jsonObj.get("additionalDenialReasons").toString()));
}

// validate the optional field `additionalDenialReasons` (array)
for (int i = 0; i < jsonArrayadditionalDenialReasons.size(); i++) {
AdditionalDenialReason.validateJsonElement(jsonArrayadditionalDenialReasons.get(i));
};
}
}
// validate the optional field `submission`
if (jsonObj.get("submission") != null && !jsonObj.get("submission").isJsonNull()) {
TfvSubmissionInfo.validateJsonElement(jsonObj.get("submission"));
Expand Down
Loading