Skip to content
Merged
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
2 changes: 1 addition & 1 deletion bandwidth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5424,7 +5424,7 @@ components:
be interpreted as an HTTP status code in regards to the error that
was encountered.
example: '400'
errorDescription:
errorMessage:
type: string
description: A description of the error that was encountered.
example: cannot process request.
Expand Down
6 changes: 3 additions & 3 deletions bandwidth/models/failure_webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ class FailureWebhook(BaseModel):
account_id: Optional[StrictStr] = Field(default=None, description="User's account ID.", alias="accountId")
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")
error_code: Optional[StrictStr] = Field(default=None, description="An error code indicating what error was encountered. This code can be interpreted as an HTTP status code in regards to the error that was encountered.", alias="errorCode")
error_description: Optional[StrictStr] = Field(default=None, description="A description of the error that was encountered.", alias="errorDescription")
error_message: Optional[StrictStr] = Field(default=None, description="A description of the error that was encountered.", alias="errorMessage")
errors: Optional[List[StrictStr]] = Field(default=None, description="Details of the errors that were encountered when processing the request.")
internal_ticket_number: Optional[StrictStr] = Field(default=None, description="Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number.", alias="internalTicketNumber")
additional_properties: Dict[str, Any] = {}
__properties: ClassVar[List[str]] = ["accountId", "phoneNumber", "errorCode", "errorDescription", "errors", "internalTicketNumber"]
__properties: ClassVar[List[str]] = ["accountId", "phoneNumber", "errorCode", "errorMessage", "errors", "internalTicketNumber"]

@field_validator('phone_number')
def phone_number_validate_regular_expression(cls, value):
Expand Down Expand Up @@ -108,7 +108,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"accountId": obj.get("accountId"),
"phoneNumber": obj.get("phoneNumber"),
"errorCode": obj.get("errorCode"),
"errorDescription": obj.get("errorDescription"),
"errorMessage": obj.get("errorMessage"),
"errors": obj.get("errors"),
"internalTicketNumber": obj.get("internalTicketNumber")
})
Expand Down
2 changes: 1 addition & 1 deletion docs/FailureWebhook.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Name | Type | Description | Notes
**account_id** | **str** | User's account ID. | [optional]
**phone_number** | **str** | Toll-free telephone number in E.164 format. | [optional]
**error_code** | **str** | An error code indicating what error was encountered. This code can be interpreted as an HTTP status code in regards to the error that was encountered. | [optional]
**error_description** | **str** | A description of the error that was encountered. | [optional]
**error_message** | **str** | A description of the error that was encountered. | [optional]
**errors** | **List[str]** | Details of the errors that were encountered when processing the request. | [optional]
**internal_ticket_number** | **str** | Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number. | [optional]

Expand Down
4 changes: 2 additions & 2 deletions test/unit/models/test_failure_webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def make_instance(self, include_optional) -> FailureWebhook:
account_id = '1234567',
phone_number = '+18005555555',
error_code = '400',
error_description = 'cannot process request.',
error_message = 'cannot process request.',
errors = [
'optInWorkflowImageURLs: Entries must be a valid array of objects.'
],
Expand All @@ -54,7 +54,7 @@ def testFailureWebhook(self):
assert instance.account_id == '1234567'
assert instance.phone_number == '+18005555555'
assert instance.error_code == '400'
assert instance.error_description == 'cannot process request.'
assert instance.error_message == 'cannot process request.'
assert isinstance(instance.errors, list)
assert len(instance.errors) == 1
assert instance.errors[0] == 'optInWorkflowImageURLs: Entries must be a valid array of objects.'
Expand Down