Skip to content

Commit 5916a6b

Browse files
band-swi-release-engineering[bot]DX-Bandwidthckoegel
authored
SWI-8262 Update SDK Based on Recent Spec Changes (#256)
* Generate SDK with OpenAPI Generator Version * update test --------- Co-authored-by: DX-Bandwidth <[email protected]> Co-authored-by: ckoegel <[email protected]>
1 parent 2499021 commit 5916a6b

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

bandwidth.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5424,7 +5424,7 @@ components:
54245424
be interpreted as an HTTP status code in regards to the error that
54255425
was encountered.
54265426
example: '400'
5427-
errorDescription:
5427+
errorMessage:
54285428
type: string
54295429
description: A description of the error that was encountered.
54305430
example: cannot process request.

bandwidth/models/failure_webhook.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ class FailureWebhook(BaseModel):
3131
account_id: Optional[StrictStr] = Field(default=None, description="User's account ID.", alias="accountId")
3232
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")
3333
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")
34-
error_description: Optional[StrictStr] = Field(default=None, description="A description of the error that was encountered.", alias="errorDescription")
34+
error_message: Optional[StrictStr] = Field(default=None, description="A description of the error that was encountered.", alias="errorMessage")
3535
errors: Optional[List[StrictStr]] = Field(default=None, description="Details of the errors that were encountered when processing the request.")
3636
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")
3737
additional_properties: Dict[str, Any] = {}
38-
__properties: ClassVar[List[str]] = ["accountId", "phoneNumber", "errorCode", "errorDescription", "errors", "internalTicketNumber"]
38+
__properties: ClassVar[List[str]] = ["accountId", "phoneNumber", "errorCode", "errorMessage", "errors", "internalTicketNumber"]
3939

4040
@field_validator('phone_number')
4141
def phone_number_validate_regular_expression(cls, value):
@@ -108,7 +108,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
108108
"accountId": obj.get("accountId"),
109109
"phoneNumber": obj.get("phoneNumber"),
110110
"errorCode": obj.get("errorCode"),
111-
"errorDescription": obj.get("errorDescription"),
111+
"errorMessage": obj.get("errorMessage"),
112112
"errors": obj.get("errors"),
113113
"internalTicketNumber": obj.get("internalTicketNumber")
114114
})

docs/FailureWebhook.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
88
**account_id** | **str** | User&#39;s account ID. | [optional]
99
**phone_number** | **str** | Toll-free telephone number in E.164 format. | [optional]
1010
**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]
11-
**error_description** | **str** | A description of the error that was encountered. | [optional]
11+
**error_message** | **str** | A description of the error that was encountered. | [optional]
1212
**errors** | **List[str]** | Details of the errors that were encountered when processing the request. | [optional]
1313
**internal_ticket_number** | **str** | Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number. | [optional]
1414

test/unit/models/test_failure_webhook.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def make_instance(self, include_optional) -> FailureWebhook:
3636
account_id = '1234567',
3737
phone_number = '+18005555555',
3838
error_code = '400',
39-
error_description = 'cannot process request.',
39+
error_message = 'cannot process request.',
4040
errors = [
4141
'optInWorkflowImageURLs: Entries must be a valid array of objects.'
4242
],
@@ -54,7 +54,7 @@ def testFailureWebhook(self):
5454
assert instance.account_id == '1234567'
5555
assert instance.phone_number == '+18005555555'
5656
assert instance.error_code == '400'
57-
assert instance.error_description == 'cannot process request.'
57+
assert instance.error_message == 'cannot process request.'
5858
assert isinstance(instance.errors, list)
5959
assert len(instance.errors) == 1
6060
assert instance.errors[0] == 'optInWorkflowImageURLs: Entries must be a valid array of objects.'

0 commit comments

Comments
 (0)