Skip to content

Commit 388473d

Browse files
band-swi-release-engineering[bot]DX-Bandwidthckoegel
authored
SWI-9240 Update SDK Based on Recent Spec Changes (#220)
* Generate SDK with OpenAPI Generator Version * add unit tests --------- Co-authored-by: DX-Bandwidth <dx@bandwidth.com> Co-authored-by: ckoegel <ckoegel1006@gmail.com> Co-authored-by: Cameron Koegel <53310569+ckoegel@users.noreply.github.com>
1 parent 6f5adf8 commit 388473d

12 files changed

Lines changed: 200 additions & 13 deletions

api/openapi.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13851,6 +13851,16 @@ components:
1385113851
description: Indicates whether the content is age-gated.
1385213852
example: false
1385313853
type: boolean
13854+
cvToken:
13855+
description: "The token provided by Campaign Verify to validate your political\
13856+
\ use case. Only required for 527 political organizations. If you are\
13857+
\ not a 527 political organization, this field should be omitted. If you\
13858+
\ pass an empty string, it will be passed along and potentially rejected."
13859+
example: cv.user123|sess456|mno|tfree|read_write|X7yZ9aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVw
13860+
maxLength: 500
13861+
minLength: 0
13862+
nullable: true
13863+
type: string
1385413864
required:
1385513865
- businessAddress
1385613866
- businessContact
@@ -13945,6 +13955,16 @@ components:
1394513955
description: Indicates whether the content is age-gated.
1394613956
example: false
1394713957
type: boolean
13958+
cvToken:
13959+
description: "The token provided by Campaign Verify to validate your political\
13960+
\ use case. Only required for 527 political organizations. If you are\
13961+
\ not a 527 political organization, this field should be omitted. If you\
13962+
\ pass an empty string, it will be passed along and potentially rejected."
13963+
example: cv.user123|sess456|mno|tfree|read_write|X7yZ9aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVw
13964+
maxLength: 500
13965+
minLength: 0
13966+
nullable: true
13967+
type: string
1394813968
required:
1394913969
- businessAddress
1395013970
- businessContact
@@ -14603,6 +14623,7 @@ components:
1460314623
useCaseSummary: Text summarizing the use case for the toll-free number
1460414624
declineReasonDescription: Invalid Information - Can't Validate URL - Website
1460514625
is not accessible / not available
14626+
cvToken: cv.user123|sess456|mno|tfree|read_write|X7yZ9aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVw
1460614627
status: VERIFIED
1460714628
properties:
1460814629
phoneNumber:
@@ -14654,6 +14675,16 @@ components:
1465414675
attribute will only be defined when the number is blocked.
1465514676
example: Toll-free number was used to send spam messages
1465614677
type: string
14678+
cvToken:
14679+
description: "The token provided by Campaign Verify to validate your political\
14680+
\ use case. Only required for 527 political organizations. If you are\
14681+
\ not a 527 political organization, this field should be omitted. If you\
14682+
\ pass an empty string, it will be passed along and potentially rejected."
14683+
example: cv.user123|sess456|mno|tfree|read_write|X7yZ9aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVw
14684+
maxLength: 500
14685+
minLength: 0
14686+
nullable: true
14687+
type: string
1465714688
type: object
1465814689
tfvSubmissionInfo:
1465914690
example:
@@ -14778,6 +14809,16 @@ components:
1477814809
nullable: true
1477914810
pattern: "^[ -~]{16,64}$"
1478014811
type: string
14812+
cvToken:
14813+
description: "The token provided by Campaign Verify to validate your political\
14814+
\ use case. Only required for 527 political organizations. If you are not\
14815+
\ a 527 political organization, this field should be omitted. If you pass\
14816+
\ an empty string, it will be passed along and potentially rejected."
14817+
example: cv.user123|sess456|mno|tfree|read_write|X7yZ9aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVw
14818+
maxLength: 500
14819+
minLength: 0
14820+
nullable: true
14821+
type: string
1478114822
rbmCardContent_media:
1478214823
allOf:
1478314824
- $ref: "#/components/schemas/rbmMessageContentFile"

bandwidth.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5954,6 +5954,8 @@ components:
59545954
$ref: '#/components/schemas/helpMessageResponse'
59555955
ageGatedContent:
59565956
$ref: '#/components/schemas/ageGatedContent'
5957+
cvToken:
5958+
$ref: '#/components/schemas/cvToken'
59575959
verificationUpdateRequest:
59585960
type: object
59595961
required:
@@ -6003,6 +6005,8 @@ components:
60036005
$ref: '#/components/schemas/helpMessageResponse'
60046006
ageGatedContent:
60056007
$ref: '#/components/schemas/ageGatedContent'
6008+
cvToken:
6009+
$ref: '#/components/schemas/cvToken'
60066010
tfvBasicAuthentication:
60076011
type: object
60086012
properties:
@@ -6454,6 +6458,8 @@ components:
64546458
$ref: '#/components/schemas/blocked'
64556459
blockedReason:
64566460
$ref: '#/components/schemas/blockedReason'
6461+
cvToken:
6462+
$ref: '#/components/schemas/cvToken'
64576463
tfvSubmissionInfo:
64586464
type: object
64596465
properties:
@@ -6518,6 +6524,18 @@ components:
65186524
nullable: true
65196525
pattern: ^[ -~]{16,64}$
65206526
type: string
6527+
cvToken:
6528+
type: string
6529+
description: >-
6530+
The token provided by Campaign Verify to validate your political use
6531+
case. Only required for 527 political organizations. If you are not a
6532+
527 political organization, this field should be omitted. If you pass an
6533+
empty string, it will be passed along and potentially rejected.
6534+
minLength: 0
6535+
maxLength: 500
6536+
nullable: true
6537+
example: >-
6538+
cv.user123|sess456|mno|tfree|read_write|X7yZ9aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVw
65216539
responses:
65226540
createMessageResponse:
65236541
description: Accepted

docs/TfvStatus.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
|**submission** | [**TfvSubmissionInfo**](TfvSubmissionInfo.md) | | [optional] |
1818
|**blocked** | **Boolean** | Whether a Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. | [optional] |
1919
|**blockedReason** | **String** | The reason why the Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. | [optional] |
20+
|**cvToken** | **String** | The token provided by Campaign Verify to validate your political use case. Only required for 527 political organizations. If you are not a 527 political organization, this field should be omitted. If you pass an empty string, it will be passed along and potentially rejected. | [optional] |
2021

2122

2223

docs/VerificationRequest.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
|**businessEntityType** | **BusinessEntityTypeEnum** | | [optional] |
2626
|**helpMessageResponse** | **String** | A message that gets sent to users requesting help. | [optional] |
2727
|**ageGatedContent** | **Boolean** | Indicates whether the content is age-gated. | [optional] |
28+
|**cvToken** | **String** | The token provided by Campaign Verify to validate your political use case. Only required for 527 political organizations. If you are not a 527 political organization, this field should be omitted. If you pass an empty string, it will be passed along and potentially rejected. | [optional] |
2829

2930

3031

docs/VerificationUpdateRequest.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
|**businessEntityType** | **BusinessEntityTypeEnum** | | [optional] |
2525
|**helpMessageResponse** | **String** | A message that gets sent to users requesting help. | [optional] |
2626
|**ageGatedContent** | **Boolean** | Indicates whether the content is age-gated. | [optional] |
27+
|**cvToken** | **String** | The token provided by Campaign Verify to validate your political use case. Only required for 527 political organizations. If you are not a 527 political organization, this field should be omitted. If you pass an empty string, it will be passed along and potentially rejected. | [optional] |
2728

2829

2930

src/main/java/com/bandwidth/sdk/model/TfvStatus.java

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import java.io.IOException;
2626
import java.time.OffsetDateTime;
2727
import java.util.Arrays;
28+
import org.openapitools.jackson.nullable.JsonNullable;
2829

2930
import com.google.gson.Gson;
3031
import com.google.gson.GsonBuilder;
@@ -105,6 +106,11 @@ public class TfvStatus {
105106
@javax.annotation.Nullable
106107
private String blockedReason;
107108

109+
public static final String SERIALIZED_NAME_CV_TOKEN = "cvToken";
110+
@SerializedName(SERIALIZED_NAME_CV_TOKEN)
111+
@javax.annotation.Nullable
112+
private String cvToken;
113+
108114
public TfvStatus() {
109115
}
110116

@@ -297,6 +303,25 @@ public void setBlockedReason(@javax.annotation.Nullable String blockedReason) {
297303
this.blockedReason = blockedReason;
298304
}
299305

306+
307+
public TfvStatus cvToken(@javax.annotation.Nullable String cvToken) {
308+
this.cvToken = cvToken;
309+
return this;
310+
}
311+
312+
/**
313+
* The token provided by Campaign Verify to validate your political use case. Only required for 527 political organizations. If you are not a 527 political organization, this field should be omitted. If you pass an empty string, it will be passed along and potentially rejected.
314+
* @return cvToken
315+
*/
316+
@javax.annotation.Nullable
317+
public String getCvToken() {
318+
return cvToken;
319+
}
320+
321+
public void setCvToken(@javax.annotation.Nullable String cvToken) {
322+
this.cvToken = cvToken;
323+
}
324+
300325
/**
301326
* A container for additional, undeclared properties.
302327
* This is a holder for any undeclared properties as specified with
@@ -361,13 +386,25 @@ public boolean equals(Object o) {
361386
Objects.equals(this.modifiedDateTime, tfvStatus.modifiedDateTime) &&
362387
Objects.equals(this.submission, tfvStatus.submission) &&
363388
Objects.equals(this.blocked, tfvStatus.blocked) &&
364-
Objects.equals(this.blockedReason, tfvStatus.blockedReason)&&
389+
Objects.equals(this.blockedReason, tfvStatus.blockedReason) &&
390+
Objects.equals(this.cvToken, tfvStatus.cvToken)&&
365391
Objects.equals(this.additionalProperties, tfvStatus.additionalProperties);
366392
}
367393

394+
private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
395+
return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
396+
}
397+
368398
@Override
369399
public int hashCode() {
370-
return Objects.hash(phoneNumber, status, internalTicketNumber, declineReasonDescription, resubmitAllowed, createdDateTime, modifiedDateTime, submission, blocked, blockedReason, additionalProperties);
400+
return Objects.hash(phoneNumber, status, internalTicketNumber, declineReasonDescription, resubmitAllowed, createdDateTime, modifiedDateTime, submission, blocked, blockedReason, cvToken, additionalProperties);
401+
}
402+
403+
private static <T> int hashCodeNullable(JsonNullable<T> a) {
404+
if (a == null) {
405+
return 1;
406+
}
407+
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
371408
}
372409

373410
@Override
@@ -384,6 +421,7 @@ public String toString() {
384421
sb.append(" submission: ").append(toIndentedString(submission)).append("\n");
385422
sb.append(" blocked: ").append(toIndentedString(blocked)).append("\n");
386423
sb.append(" blockedReason: ").append(toIndentedString(blockedReason)).append("\n");
424+
sb.append(" cvToken: ").append(toIndentedString(cvToken)).append("\n");
387425
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
388426
sb.append("}");
389427
return sb.toString();
@@ -406,7 +444,7 @@ private String toIndentedString(Object o) {
406444

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

411449
// a set of required properties/fields (JSON key names)
412450
openapiRequiredFields = new HashSet<String>(0);
@@ -445,6 +483,9 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
445483
if ((jsonObj.get("blockedReason") != null && !jsonObj.get("blockedReason").isJsonNull()) && !jsonObj.get("blockedReason").isJsonPrimitive()) {
446484
throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `blockedReason` to be a primitive type in the JSON string but got `%s`", jsonObj.get("blockedReason").toString()));
447485
}
486+
if ((jsonObj.get("cvToken") != null && !jsonObj.get("cvToken").isJsonNull()) && !jsonObj.get("cvToken").isJsonPrimitive()) {
487+
throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `cvToken` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cvToken").toString()));
488+
}
448489
}
449490

450491
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {

0 commit comments

Comments
 (0)