Skip to content

Commit e4b3a69

Browse files
band-swi-release-engineering[bot]DX-Bandwidthckoegel
authored
SWI-7768 Update SDK Based on Recent Spec Changes (#251)
* Generate SDK with OpenAPI Generator Version * update unit tests for models --------- Co-authored-by: DX-Bandwidth <[email protected]> Co-authored-by: ckoegel <[email protected]>
1 parent c7b0321 commit e4b3a69

16 files changed

+146
-18
lines changed

bandwidth.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5228,6 +5228,35 @@ components:
52285228
PUT.
52295229
example: true
52305230
type: boolean
5231+
blocked:
5232+
description: >-
5233+
Whether a Toll-Free Verification is blocked. This attribute will only be
5234+
defined when the number is blocked. (Not Available Until 5/28/2025)
5235+
example: true
5236+
type: boolean
5237+
blockedReason:
5238+
description: >-
5239+
The reason why the Toll-Free Verification is blocked. This attribute
5240+
will only be defined when the number is blocked. (Not Available Until
5241+
5/28/2025)
5242+
example: Toll-free number was used to send spam messages
5243+
type: string
5244+
privacyPolicyUrl:
5245+
description: >-
5246+
The Toll-Free Verification request privacy policy URL. (Not Available
5247+
Until 5/28/2025)
5248+
example: http://your-company.com/privacyPolicyUrl.pdf
5249+
type: string
5250+
termsAndConditionsUrl:
5251+
description: >-
5252+
The Toll-Free Verification request terms and conditions policy URL. (Not
5253+
Available Until 5/28/2025)
5254+
example: http://your-company.com/termsAndConditionsUrl.pdf
5255+
type: string
5256+
businessDBA:
5257+
description: The company 'Doing Business As'. (Not Available Until 5/28/2025)
5258+
example: SecondCompany Name
5259+
type: string
52315260
additionalDenialReason:
52325261
properties:
52335262
statusCode:
@@ -5308,6 +5337,12 @@ components:
53085337
example: Any additional information
53095338
isvReseller:
53105339
$ref: '#/components/schemas/isvReseller'
5340+
privacyPolicyUrl:
5341+
$ref: '#/components/schemas/privacyPolicyUrl'
5342+
termsAndConditionsUrl:
5343+
$ref: '#/components/schemas/termsAndConditionsUrl'
5344+
businessDBA:
5345+
$ref: '#/components/schemas/businessDBA'
53115346
verificationUpdateRequest:
53125347
type: object
53135348
required:
@@ -5341,6 +5376,12 @@ components:
53415376
$ref: '#/components/schemas/additionalInformation'
53425377
isvReseller:
53435378
$ref: '#/components/schemas/isvReseller'
5379+
privacyPolicyUrl:
5380+
$ref: '#/components/schemas/privacyPolicyUrl'
5381+
termsAndConditionsUrl:
5382+
$ref: '#/components/schemas/termsAndConditionsUrl'
5383+
businessDBA:
5384+
$ref: '#/components/schemas/businessDBA'
53445385
tfvBasicAuthentication:
53455386
type: object
53465387
properties:
@@ -5419,6 +5460,10 @@ components:
54195460
$ref: '#/components/schemas/resubmitAllowed'
54205461
status:
54215462
$ref: '#/components/schemas/tfvUnverifiedStatus'
5463+
blocked:
5464+
$ref: '#/components/schemas/blocked'
5465+
blockedReason:
5466+
$ref: '#/components/schemas/blockedReason'
54225467
verificationWebhook:
54235468
type: object
54245469
properties:
@@ -5501,6 +5546,7 @@ components:
55015546
minLength: 0
55025547
maxLength: 500
55035548
nullable: true
5549+
example: Any additional information
55045550
optInWorkflow:
55055551
type: object
55065552
nullable: false
@@ -5762,6 +5808,10 @@ components:
57625808
example: '2021-06-08T06:45:13.0Z'
57635809
submission:
57645810
$ref: '#/components/schemas/tfvSubmissionInfo'
5811+
blocked:
5812+
$ref: '#/components/schemas/blocked'
5813+
blockedReason:
5814+
$ref: '#/components/schemas/blockedReason'
57655815
tfvSubmissionInfo:
57665816
type: object
57675817
properties:
@@ -5787,6 +5837,12 @@ components:
57875837
$ref: '#/components/schemas/additionalInformation'
57885838
isvReseller:
57895839
$ref: '#/components/schemas/isvReseller'
5840+
privacyPolicyUrl:
5841+
$ref: '#/components/schemas/privacyPolicyUrl'
5842+
termsAndConditionsUrl:
5843+
$ref: '#/components/schemas/termsAndConditionsUrl'
5844+
businessDBA:
5845+
$ref: '#/components/schemas/businessDBA'
57905846
tfvStatusEnum:
57915847
type: string
57925848
enum:

bandwidth/models/tfv_status.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ class TfvStatus(BaseModel):
3939
created_date_time: Optional[datetime] = Field(default=None, description="Date and time the verification request was created.", alias="createdDateTime")
4040
modified_date_time: Optional[datetime] = Field(default=None, description="Date and time the verification request was last modified.", alias="modifiedDateTime")
4141
submission: Optional[TfvSubmissionInfo] = None
42+
blocked: Optional[StrictBool] = Field(default=None, 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)")
43+
blocked_reason: Optional[StrictStr] = Field(default=None, 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)", alias="blockedReason")
4244
additional_properties: Dict[str, Any] = {}
43-
__properties: ClassVar[List[str]] = ["phoneNumber", "status", "internalTicketNumber", "declineReasonDescription", "resubmitAllowed", "createdDateTime", "modifiedDateTime", "submission"]
45+
__properties: ClassVar[List[str]] = ["phoneNumber", "status", "internalTicketNumber", "declineReasonDescription", "resubmitAllowed", "createdDateTime", "modifiedDateTime", "submission", "blocked", "blockedReason"]
4446

4547
@field_validator('phone_number')
4648
def phone_number_validate_regular_expression(cls, value):
@@ -120,7 +122,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
120122
"resubmitAllowed": obj.get("resubmitAllowed"),
121123
"createdDateTime": obj.get("createdDateTime"),
122124
"modifiedDateTime": obj.get("modifiedDateTime"),
123-
"submission": TfvSubmissionInfo.from_dict(obj["submission"]) if obj.get("submission") is not None else None
125+
"submission": TfvSubmissionInfo.from_dict(obj["submission"]) if obj.get("submission") is not None else None,
126+
"blocked": obj.get("blocked"),
127+
"blockedReason": obj.get("blockedReason")
124128
})
125129
# store additional fields in additional_properties
126130
for _key in obj.keys():

bandwidth/models/tfv_submission_info.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import re # noqa: F401
1919
import json
2020

21-
from pydantic import BaseModel, ConfigDict, Field
21+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
2222
from typing import Any, ClassVar, Dict, List, Optional
2323
from typing_extensions import Annotated
2424
from bandwidth.models.address import Address
@@ -40,8 +40,11 @@ class TfvSubmissionInfo(BaseModel):
4040
opt_in_workflow: Optional[OptInWorkflow] = Field(default=None, alias="optInWorkflow")
4141
additional_information: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=500)]] = Field(default=None, description="Any additional information.", alias="additionalInformation")
4242
isv_reseller: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=500)]] = Field(default=None, description="ISV name.", alias="isvReseller")
43+
privacy_policy_url: Optional[StrictStr] = Field(default=None, description="The Toll-Free Verification request privacy policy URL. (Not Available Until 5/28/2025)", alias="privacyPolicyUrl")
44+
terms_and_conditions_url: Optional[StrictStr] = Field(default=None, description="The Toll-Free Verification request terms and conditions policy URL. (Not Available Until 5/28/2025)", alias="termsAndConditionsUrl")
45+
business_dba: Optional[StrictStr] = Field(default=None, description="The company 'Doing Business As'. (Not Available Until 5/28/2025)", alias="businessDBA")
4346
additional_properties: Dict[str, Any] = {}
44-
__properties: ClassVar[List[str]] = ["businessAddress", "businessContact", "messageVolume", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow", "additionalInformation", "isvReseller"]
47+
__properties: ClassVar[List[str]] = ["businessAddress", "businessContact", "messageVolume", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow", "additionalInformation", "isvReseller", "privacyPolicyUrl", "termsAndConditionsUrl", "businessDBA"]
4548

4649
model_config = ConfigDict(
4750
populate_by_name=True,
@@ -128,7 +131,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
128131
"productionMessageContent": obj.get("productionMessageContent"),
129132
"optInWorkflow": OptInWorkflow.from_dict(obj["optInWorkflow"]) if obj.get("optInWorkflow") is not None else None,
130133
"additionalInformation": obj.get("additionalInformation"),
131-
"isvReseller": obj.get("isvReseller")
134+
"isvReseller": obj.get("isvReseller"),
135+
"privacyPolicyUrl": obj.get("privacyPolicyUrl"),
136+
"termsAndConditionsUrl": obj.get("termsAndConditionsUrl"),
137+
"businessDBA": obj.get("businessDBA")
132138
})
133139
# store additional fields in additional_properties
134140
for _key in obj.keys():

bandwidth/models/verification_denial_webhook.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ class VerificationDenialWebhook(BaseModel):
3737
phone_number: Optional[Annotated[str, Field(min_length=12, strict=True, max_length=12)]] = Field(default=None, description="Toll-free telephone number in E.164 format.", alias="phoneNumber")
3838
resubmit_allowed: Optional[StrictBool] = Field(default=None, description="Whether a Toll-Free Verification request qualifies for resubmission via PUT.", alias="resubmitAllowed")
3939
status: Optional[StrictStr] = 'UNVERIFIED'
40+
blocked: Optional[StrictBool] = Field(default=None, 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)")
41+
blocked_reason: Optional[StrictStr] = Field(default=None, 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)", alias="blockedReason")
4042
additional_properties: Dict[str, Any] = {}
41-
__properties: ClassVar[List[str]] = ["accountId", "additionalDenialReasons", "declineReasonDescription", "denialStatusCode", "internalTicketNumber", "phoneNumber", "resubmitAllowed", "status"]
43+
__properties: ClassVar[List[str]] = ["accountId", "additionalDenialReasons", "declineReasonDescription", "denialStatusCode", "internalTicketNumber", "phoneNumber", "resubmitAllowed", "status", "blocked", "blockedReason"]
4244

4345
@field_validator('phone_number')
4446
def phone_number_validate_regular_expression(cls, value):
@@ -122,7 +124,9 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
122124
"internalTicketNumber": obj.get("internalTicketNumber"),
123125
"phoneNumber": obj.get("phoneNumber"),
124126
"resubmitAllowed": obj.get("resubmitAllowed"),
125-
"status": obj.get("status") if obj.get("status") is not None else 'UNVERIFIED'
127+
"status": obj.get("status") if obj.get("status") is not None else 'UNVERIFIED',
128+
"blocked": obj.get("blocked"),
129+
"blockedReason": obj.get("blockedReason")
126130
})
127131
# store additional fields in additional_properties
128132
for _key in obj.keys():

bandwidth/models/verification_request.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import re # noqa: F401
1919
import json
2020

21-
from pydantic import BaseModel, ConfigDict, Field, field_validator
21+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
2222
from typing import Any, ClassVar, Dict, List, Optional
2323
from typing_extensions import Annotated
2424
from bandwidth.models.address import Address
@@ -41,8 +41,11 @@ class VerificationRequest(BaseModel):
4141
opt_in_workflow: OptInWorkflow = Field(alias="optInWorkflow")
4242
additional_information: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=500)]] = Field(default=None, description="Any additional information.", alias="additionalInformation")
4343
isv_reseller: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=500)]] = Field(default=None, description="ISV name.", alias="isvReseller")
44+
privacy_policy_url: Optional[StrictStr] = Field(default=None, description="The Toll-Free Verification request privacy policy URL. (Not Available Until 5/28/2025)", alias="privacyPolicyUrl")
45+
terms_and_conditions_url: Optional[StrictStr] = Field(default=None, description="The Toll-Free Verification request terms and conditions policy URL. (Not Available Until 5/28/2025)", alias="termsAndConditionsUrl")
46+
business_dba: Optional[StrictStr] = Field(default=None, description="The company 'Doing Business As'. (Not Available Until 5/28/2025)", alias="businessDBA")
4447
additional_properties: Dict[str, Any] = {}
45-
__properties: ClassVar[List[str]] = ["businessAddress", "businessContact", "messageVolume", "phoneNumbers", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow", "additionalInformation", "isvReseller"]
48+
__properties: ClassVar[List[str]] = ["businessAddress", "businessContact", "messageVolume", "phoneNumbers", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow", "additionalInformation", "isvReseller", "privacyPolicyUrl", "termsAndConditionsUrl", "businessDBA"]
4649

4750
model_config = ConfigDict(
4851
populate_by_name=True,
@@ -130,7 +133,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
130133
"productionMessageContent": obj.get("productionMessageContent"),
131134
"optInWorkflow": OptInWorkflow.from_dict(obj["optInWorkflow"]) if obj.get("optInWorkflow") is not None else None,
132135
"additionalInformation": obj.get("additionalInformation"),
133-
"isvReseller": obj.get("isvReseller")
136+
"isvReseller": obj.get("isvReseller"),
137+
"privacyPolicyUrl": obj.get("privacyPolicyUrl"),
138+
"termsAndConditionsUrl": obj.get("termsAndConditionsUrl"),
139+
"businessDBA": obj.get("businessDBA")
134140
})
135141
# store additional fields in additional_properties
136142
for _key in obj.keys():

bandwidth/models/verification_update_request.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import re # noqa: F401
1919
import json
2020

21-
from pydantic import BaseModel, ConfigDict, Field
21+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
2222
from typing import Any, ClassVar, Dict, List, Optional
2323
from typing_extensions import Annotated
2424
from bandwidth.models.address import Address
@@ -40,8 +40,11 @@ class VerificationUpdateRequest(BaseModel):
4040
opt_in_workflow: OptInWorkflow = Field(alias="optInWorkflow")
4141
additional_information: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=500)]] = Field(default=None, description="Any additional information.", alias="additionalInformation")
4242
isv_reseller: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=500)]] = Field(default=None, description="ISV name.", alias="isvReseller")
43+
privacy_policy_url: Optional[StrictStr] = Field(default=None, description="The Toll-Free Verification request privacy policy URL. (Not Available Until 5/28/2025)", alias="privacyPolicyUrl")
44+
terms_and_conditions_url: Optional[StrictStr] = Field(default=None, description="The Toll-Free Verification request terms and conditions policy URL. (Not Available Until 5/28/2025)", alias="termsAndConditionsUrl")
45+
business_dba: Optional[StrictStr] = Field(default=None, description="The company 'Doing Business As'. (Not Available Until 5/28/2025)", alias="businessDBA")
4346
additional_properties: Dict[str, Any] = {}
44-
__properties: ClassVar[List[str]] = ["businessAddress", "businessContact", "messageVolume", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow", "additionalInformation", "isvReseller"]
47+
__properties: ClassVar[List[str]] = ["businessAddress", "businessContact", "messageVolume", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow", "additionalInformation", "isvReseller", "privacyPolicyUrl", "termsAndConditionsUrl", "businessDBA"]
4548

4649
model_config = ConfigDict(
4750
populate_by_name=True,
@@ -128,7 +131,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
128131
"productionMessageContent": obj.get("productionMessageContent"),
129132
"optInWorkflow": OptInWorkflow.from_dict(obj["optInWorkflow"]) if obj.get("optInWorkflow") is not None else None,
130133
"additionalInformation": obj.get("additionalInformation"),
131-
"isvReseller": obj.get("isvReseller")
134+
"isvReseller": obj.get("isvReseller"),
135+
"privacyPolicyUrl": obj.get("privacyPolicyUrl"),
136+
"termsAndConditionsUrl": obj.get("termsAndConditionsUrl"),
137+
"businessDBA": obj.get("businessDBA")
132138
})
133139
# store additional fields in additional_properties
134140
for _key in obj.keys():

docs/TfvStatus.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Name | Type | Description | Notes
1313
**created_date_time** | **datetime** | Date and time the verification request was created. | [optional]
1414
**modified_date_time** | **datetime** | Date and time the verification request was last modified. | [optional]
1515
**submission** | [**TfvSubmissionInfo**](TfvSubmissionInfo.md) | | [optional]
16+
**blocked** | **bool** | 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]
17+
**blocked_reason** | **str** | 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]
1618

1719
## Example
1820

docs/TfvSubmissionInfo.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ Name | Type | Description | Notes
1414
**opt_in_workflow** | [**OptInWorkflow**](OptInWorkflow.md) | | [optional]
1515
**additional_information** | **str** | Any additional information. | [optional]
1616
**isv_reseller** | **str** | ISV name. | [optional]
17+
**privacy_policy_url** | **str** | The Toll-Free Verification request privacy policy URL. (Not Available Until 5/28/2025) | [optional]
18+
**terms_and_conditions_url** | **str** | The Toll-Free Verification request terms and conditions policy URL. (Not Available Until 5/28/2025) | [optional]
19+
**business_dba** | **str** | The company &#39;Doing Business As&#39;. (Not Available Until 5/28/2025) | [optional]
1720

1821
## Example
1922

docs/VerificationDenialWebhook.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Name | Type | Description | Notes
1313
**phone_number** | **str** | Toll-free telephone number in E.164 format. | [optional]
1414
**resubmit_allowed** | **bool** | Whether a Toll-Free Verification request qualifies for resubmission via PUT. | [optional]
1515
**status** | **str** | | [optional] [default to 'UNVERIFIED']
16+
**blocked** | **bool** | 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]
17+
**blocked_reason** | **str** | 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]
1618

1719
## Example
1820

docs/VerificationRequest.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ Name | Type | Description | Notes
1515
**opt_in_workflow** | [**OptInWorkflow**](OptInWorkflow.md) | |
1616
**additional_information** | **str** | Any additional information. | [optional]
1717
**isv_reseller** | **str** | ISV name. | [optional]
18+
**privacy_policy_url** | **str** | The Toll-Free Verification request privacy policy URL. (Not Available Until 5/28/2025) | [optional]
19+
**terms_and_conditions_url** | **str** | The Toll-Free Verification request terms and conditions policy URL. (Not Available Until 5/28/2025) | [optional]
20+
**business_dba** | **str** | The company &#39;Doing Business As&#39;. (Not Available Until 5/28/2025) | [optional]
1821

1922
## Example
2023

0 commit comments

Comments
 (0)