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
18 changes: 18 additions & 0 deletions bandwidth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5956,6 +5956,8 @@ components:
$ref: '#/components/schemas/helpMessageResponse'
ageGatedContent:
$ref: '#/components/schemas/ageGatedContent'
cvToken:
$ref: '#/components/schemas/cvToken'
verificationUpdateRequest:
type: object
required:
Expand Down Expand Up @@ -6005,6 +6007,8 @@ components:
$ref: '#/components/schemas/helpMessageResponse'
ageGatedContent:
$ref: '#/components/schemas/ageGatedContent'
cvToken:
$ref: '#/components/schemas/cvToken'
tfvBasicAuthentication:
type: object
properties:
Expand Down Expand Up @@ -6456,6 +6460,8 @@ components:
$ref: '#/components/schemas/blocked'
blockedReason:
$ref: '#/components/schemas/blockedReason'
cvToken:
$ref: '#/components/schemas/cvToken'
tfvSubmissionInfo:
type: object
properties:
Expand Down Expand Up @@ -6520,6 +6526,18 @@ components:
nullable: true
pattern: ^[ -~]{16,64}$
type: string
cvToken:
type: string
description: >-
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.
minLength: 0
maxLength: 500
nullable: true
example: >-
cv.user123|sess456|mno|tfree|read_write|X7yZ9aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789aBcDeFgHiJkLmNoPqRsTuVw
responses:
createMessageResponse:
description: Accepted
Expand Down
11 changes: 9 additions & 2 deletions bandwidth/models/tfv_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ class TfvStatus(BaseModel):
submission: Optional[TfvSubmissionInfo] = None
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.")
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.", alias="blockedReason")
cv_token: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=500)]] = Field(default=None, description="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.", alias="cvToken")
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["phoneNumber", "status", "internalTicketNumber", "declineReasonDescription", "resubmitAllowed", "createdDateTime", "modifiedDateTime", "submission", "blocked", "blockedReason"]
__properties: ClassVar[List[str]] = ["phoneNumber", "status", "internalTicketNumber", "declineReasonDescription", "resubmitAllowed", "createdDateTime", "modifiedDateTime", "submission", "blocked", "blockedReason", "cvToken"]

@field_validator('phone_number')
def phone_number_validate_regular_expression(cls, value):
Expand Down Expand Up @@ -104,6 +105,11 @@ def to_dict(self) -> Dict[str, Any]:
for _key, _value in self.additional_properties.items():
_dict[_key] = _value

# set to None if cv_token (nullable) is None
# and model_fields_set contains the field
if self.cv_token is None and "cv_token" in self.model_fields_set:
_dict['cvToken'] = None

return _dict

@classmethod
Expand All @@ -125,7 +131,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"modifiedDateTime": obj.get("modifiedDateTime"),
"submission": TfvSubmissionInfo.from_dict(obj["submission"]) if obj.get("submission") is not None else None,
"blocked": obj.get("blocked"),
"blockedReason": obj.get("blockedReason")
"blockedReason": obj.get("blockedReason"),
"cvToken": obj.get("cvToken")
})
# store additional fields in additional_properties
for _key in obj.keys():
Expand Down
11 changes: 9 additions & 2 deletions bandwidth/models/verification_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ class VerificationRequest(BaseModel):
business_entity_type: Optional[BusinessEntityTypeEnum] = Field(default=None, alias="businessEntityType")
help_message_response: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="A message that gets sent to users requesting help.", alias="helpMessageResponse")
age_gated_content: Optional[StrictBool] = Field(default=None, description="Indicates whether the content is age-gated.", alias="ageGatedContent")
cv_token: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=500)]] = Field(default=None, description="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.", alias="cvToken")
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["businessAddress", "businessContact", "messageVolume", "phoneNumbers", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow", "additionalInformation", "isvReseller", "privacyPolicyUrl", "termsAndConditionsUrl", "businessDba", "businessRegistrationNumber", "businessRegistrationType", "businessEntityType", "helpMessageResponse", "ageGatedContent"]
__properties: ClassVar[List[str]] = ["businessAddress", "businessContact", "messageVolume", "phoneNumbers", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow", "additionalInformation", "isvReseller", "privacyPolicyUrl", "termsAndConditionsUrl", "businessDba", "businessRegistrationNumber", "businessRegistrationType", "businessEntityType", "helpMessageResponse", "ageGatedContent", "cvToken"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -139,6 +140,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.help_message_response is None and "help_message_response" in self.model_fields_set:
_dict['helpMessageResponse'] = None

# set to None if cv_token (nullable) is None
# and model_fields_set contains the field
if self.cv_token is None and "cv_token" in self.model_fields_set:
_dict['cvToken'] = None

return _dict

@classmethod
Expand Down Expand Up @@ -168,7 +174,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"businessRegistrationType": obj.get("businessRegistrationType"),
"businessEntityType": obj.get("businessEntityType"),
"helpMessageResponse": obj.get("helpMessageResponse"),
"ageGatedContent": obj.get("ageGatedContent")
"ageGatedContent": obj.get("ageGatedContent"),
"cvToken": obj.get("cvToken")
})
# store additional fields in additional_properties
for _key in obj.keys():
Expand Down
11 changes: 9 additions & 2 deletions bandwidth/models/verification_update_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ class VerificationUpdateRequest(BaseModel):
business_entity_type: Optional[BusinessEntityTypeEnum] = Field(default=None, alias="businessEntityType")
help_message_response: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="A message that gets sent to users requesting help.", alias="helpMessageResponse")
age_gated_content: Optional[StrictBool] = Field(default=None, description="Indicates whether the content is age-gated.", alias="ageGatedContent")
cv_token: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=500)]] = Field(default=None, description="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.", alias="cvToken")
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["businessAddress", "businessContact", "messageVolume", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow", "additionalInformation", "isvReseller", "privacyPolicyUrl", "termsAndConditionsUrl", "businessDba", "businessRegistrationNumber", "businessRegistrationType", "businessEntityType", "helpMessageResponse", "ageGatedContent"]
__properties: ClassVar[List[str]] = ["businessAddress", "businessContact", "messageVolume", "useCase", "useCaseSummary", "productionMessageContent", "optInWorkflow", "additionalInformation", "isvReseller", "privacyPolicyUrl", "termsAndConditionsUrl", "businessDba", "businessRegistrationNumber", "businessRegistrationType", "businessEntityType", "helpMessageResponse", "ageGatedContent", "cvToken"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -138,6 +139,11 @@ def to_dict(self) -> Dict[str, Any]:
if self.help_message_response is None and "help_message_response" in self.model_fields_set:
_dict['helpMessageResponse'] = None

# set to None if cv_token (nullable) is None
# and model_fields_set contains the field
if self.cv_token is None and "cv_token" in self.model_fields_set:
_dict['cvToken'] = None

return _dict

@classmethod
Expand Down Expand Up @@ -166,7 +172,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"businessRegistrationType": obj.get("businessRegistrationType"),
"businessEntityType": obj.get("businessEntityType"),
"helpMessageResponse": obj.get("helpMessageResponse"),
"ageGatedContent": obj.get("ageGatedContent")
"ageGatedContent": obj.get("ageGatedContent"),
"cvToken": obj.get("cvToken")
})
# store additional fields in additional_properties
for _key in obj.keys():
Expand Down
1 change: 1 addition & 0 deletions docs/TfvStatus.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Name | Type | Description | Notes
**submission** | [**TfvSubmissionInfo**](TfvSubmissionInfo.md) | | [optional]
**blocked** | **bool** | Whether a Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. | [optional]
**blocked_reason** | **str** | The reason why the Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. | [optional]
**cv_token** | **str** | 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]

## Example

Expand Down
1 change: 1 addition & 0 deletions docs/VerificationRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Name | Type | Description | Notes
**business_entity_type** | [**BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | [optional]
**help_message_response** | **str** | A message that gets sent to users requesting help. | [optional]
**age_gated_content** | **bool** | Indicates whether the content is age-gated. | [optional]
**cv_token** | **str** | 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]

## Example

Expand Down
1 change: 1 addition & 0 deletions docs/VerificationUpdateRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Name | Type | Description | Notes
**business_entity_type** | [**BusinessEntityTypeEnum**](BusinessEntityTypeEnum.md) | | [optional]
**help_message_response** | **str** | A message that gets sent to users requesting help. | [optional]
**age_gated_content** | **bool** | Indicates whether the content is age-gated. | [optional]
**cv_token** | **str** | 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]

## Example

Expand Down
18 changes: 17 additions & 1 deletion test/unit/api/test_toll_free_verification_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
from bandwidth.models.opt_in_workflow import OptInWorkflow
from bandwidth.models.verification_request import VerificationRequest
from bandwidth.models.tfv_submission_wrapper import TfvSubmissionWrapper
from bandwidth.models.tfv_submission_info import TfvSubmissionInfo
from bandwidth.models.business_registration_type_enum import BusinessRegistrationTypeEnum
from bandwidth.models.business_entity_type_enum import BusinessEntityTypeEnum


class TestTollFreeVerificationApi(unittest.TestCase):
Expand Down Expand Up @@ -90,7 +93,16 @@ def setUpClass(cls) -> None:
confirmation_response='confirmationResponse'
),
'additionalInformation': 'additionalInformation',
'isvReseller': 'isvReseller'
'isvReseller': 'isvReseller',
'privacyPolicyUrl': 'https://example.com',
'termsAndConditionsUrl': 'https://example.com',
'businessDba': 'businessDba',
'businessRegistrationNumber': 'businessRegistrationNumber',
'businessRegistrationType': BusinessRegistrationTypeEnum.EIN,
'businessEntityType': BusinessEntityTypeEnum.NON_PROFIT,
'helpMessageResponse': 'helpMessageResponse',
'ageGatedContent': True,
'cvToken': 'cvToken'
}

def test_create_webhook_subscription(self) -> None:
Expand Down Expand Up @@ -137,6 +149,10 @@ def test_get_toll_free_verification_status(self) -> None:
assert_that(response.data.resubmit_allowed, instance_of(bool))
assert_that(response.data.created_date_time, instance_of(datetime))
assert_that(response.data.modified_date_time, instance_of(datetime))
assert_that(response.data.submission, instance_of(TfvSubmissionInfo))
assert_that(response.data.blocked, instance_of(bool))
assert_that(response.data.blocked_reason, instance_of(str))
assert_that(response.data.cv_token, instance_of(str))

def test_delete_verification_request(self) -> None:
"""Test case for delete_verification_request
Expand Down
4 changes: 3 additions & 1 deletion test/unit/models/test_tfv_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ def make_instance(self, include_optional) -> TfvStatus:
business_entity_type = 'SOLE_PROPRIETOR'
),
blocked = False,
blocked_reason = 'Blocked Reason'
blocked_reason = 'Blocked Reason',
cv_token = 'cvToken'
)
else:
return TfvStatus(
Expand Down Expand Up @@ -133,6 +134,7 @@ def testTfvStatus(self):
assert instance.submission.additional_information == 'Any additional information'
assert instance.blocked == False
assert instance.blocked_reason == 'Blocked Reason'
assert instance.cv_token == 'cvToken'


if __name__ == '__main__':
Expand Down
4 changes: 3 additions & 1 deletion test/unit/models/test_verification_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ def make_instance(self, include_optional) -> VerificationRequest:
business_registration_type = 'EIN',
business_entity_type = 'SOLE_PROPRIETOR',
help_message_response = 'Please contact support for assistance.',
age_gated_content = False
age_gated_content = False,
cv_token = 'cvToken'
)
else:
return VerificationRequest(
Expand Down Expand Up @@ -144,6 +145,7 @@ def testVerificationRequest(self):
assert instance.business_entity_type == 'SOLE_PROPRIETOR'
assert instance.help_message_response == 'Please contact support for assistance.'
assert instance.age_gated_content == False
assert instance.cv_token == 'cvToken'

if __name__ == '__main__':
unittest.main()
4 changes: 3 additions & 1 deletion test/unit/models/test_verification_update_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ def make_instance(self, include_optional) -> VerificationUpdateRequest:
business_registration_type = 'EIN',
business_entity_type = 'SOLE_PROPRIETOR',
help_message_response = 'Please contact support for assistance.',
age_gated_content = False
age_gated_content = False,
cv_token = 'cvToken'
)
else:
return VerificationUpdateRequest(
Expand Down Expand Up @@ -135,6 +136,7 @@ def testVerificationUpdateRequest(self):
assert instance.business_entity_type == 'SOLE_PROPRIETOR'
assert instance.help_message_response == 'Please contact support for assistance.'
assert instance.age_gated_content == False
assert instance.cv_token == 'cvToken'

if __name__ == '__main__':
unittest.main()