Skip to content

Commit 8fa2278

Browse files
band-swi-release-engineering[bot]DX-Bandwidthckoegel
authored
SWI-10073 Update SDK Based on Recent Spec Changes (#288)
* Generate SDK with OpenAPI Generator Version * add tests --------- Co-authored-by: DX-Bandwidth <dx@bandwidth.com> Co-authored-by: ckoegel <ckoegel1006@gmail.com>
1 parent 99a14da commit 8fa2278

18 files changed

Lines changed: 99 additions & 33 deletions

bandwidth.yml

Lines changed: 52 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1956,8 +1956,10 @@ components:
19561956
type: string
19571957
contentLength:
19581958
type: integer
1959+
example: 1024
19591960
mediaName:
19601961
type: string
1962+
example: image.png
19611963
segmentCount:
19621964
type: integer
19631965
description: >-
@@ -2744,6 +2746,7 @@ components:
27442746
discriminator:
27452747
propertyName: type
27462748
mapping:
2749+
message-sending: '#/components/schemas/statusCallback'
27472750
message-sent: '#/components/schemas/statusCallback'
27482751
message-delivered: '#/components/schemas/statusCallback'
27492752
message-failed: '#/components/schemas/statusCallback'
@@ -5510,10 +5513,14 @@ components:
55105513
55115514
- UNKNOWN: Bandwidth cannot find an delivery status entry for the
55125515
number.
5516+
5517+
- NOT_ENABLED: The phone number is not enabled for messaging, so there
5518+
is no delivery status information.
55135519
enum:
55145520
- ACTIVE
55155521
- DEACTIVATED
55165522
- UNKNOWN
5523+
- NOT_ENABLED
55175524
lineTypeEnum:
55185525
type: string
55195526
enum:
@@ -5816,25 +5823,36 @@ components:
58165823
type: string
58175824
privacyPolicyUrl:
58185825
description: The Toll-Free Verification request privacy policy URL.
5826+
maxLength: 500
58195827
example: http://your-company.com/privacyPolicy
58205828
type: string
58215829
termsAndConditionsUrl:
58225830
description: The Toll-Free Verification request terms and conditions policy URL.
5831+
maxLength: 500
58235832
example: http://your-company.com/termsAndConditions
58245833
type: string
58255834
businessDba:
58265835
description: The company 'Doing Business As'.
5836+
maxLength: 500
58275837
example: Another Company Name Inc.
58285838
type: string
58295839
businessRegistrationNumber:
58305840
type: string
5831-
description: Government-issued business identifying number.
5841+
description: >
5842+
Government-issued business identifying number.
5843+
5844+
5845+
**Note:** If this field is provided, it is strongly recommended to also
5846+
provide `businessRegistrationType` and
5847+
`businessRegistrationIssuingCountry`. Submissions missing these fields
5848+
have a high likelihood of rejection.
58325849
nullable: true
58335850
maxLength: 500
58345851
example: 12-3456789
58355852
businessRegistrationTypeEnum:
58365853
type: string
5837-
description: The type of business registration number.
5854+
description: |
5855+
The type of business registration number.
58385856
enum:
58395857
- EIN
58405858
- CBN
@@ -5854,12 +5872,22 @@ components:
58545872
- CNPJ
58555873
- UID
58565874
- OTHER
5875+
example: EIN
58575876
nullable: true
58585877
businessRegistrationIssuingCountryEnum:
58595878
type: string
58605879
description: >-
58615880
The country issuing the business registration in ISO-3166-1 alpha-3
5862-
format.
5881+
format. Alpha-2 country codes are acceptable, but the application will
5882+
convert them to alpha-3 when received, so alpha-3 is encouraged.
5883+
5884+
5885+
**Note:** If this field is omitted but `businessRegistrationType` is
5886+
provided, the application will attempt to infer the country based on the
5887+
registration type. However, if the application cannot confidently infer
5888+
the country, the submission may be rejected. To ensure the highest
5889+
likelihood of acceptance, it is recommended to provide both
5890+
`businessRegistrationType` and `businessRegistrationIssuingCountry`.
58635891
58645892
58655893
| Registration Type | Supported Countries |
@@ -5915,18 +5943,23 @@ components:
59155943
- DEU
59165944
- ESP
59175945
- CHE
5946+
- CYP
5947+
- IND
5948+
- CHN
5949+
- BGR
5950+
example: USA
59185951
nullable: false
59195952
businessEntityTypeEnum:
59205953
type: string
5921-
description: >-
5922-
The type of registered business. If no option is applicable, please
5923-
provide "SOLE_PROPRIETOR" as a value.
5954+
description: |
5955+
The type of registered business.
59245956
enum:
59255957
- SOLE_PROPRIETOR
59265958
- PRIVATE_PROFIT
59275959
- PUBLIC_PROFIT
59285960
- NON_PROFIT
59295961
- GOVERNMENT
5962+
example: PRIVATE_PROFIT
59305963
nullable: false
59315964
helpMessageResponse:
59325965
type: string
@@ -6576,10 +6609,14 @@ components:
65766609
$ref: '#/components/schemas/businessDba'
65776610
businessRegistrationNumber:
65786611
$ref: '#/components/schemas/businessRegistrationNumber'
6612+
description: Government-issued business identifying number.
65796613
businessRegistrationType:
65806614
$ref: '#/components/schemas/businessRegistrationTypeEnum'
65816615
businessRegistrationIssuingCountry:
65826616
$ref: '#/components/schemas/businessRegistrationIssuingCountryEnum'
6617+
description: >-
6618+
The country issuing the business registration in ISO-3166-1 alpha-3
6619+
format.
65836620
businessEntityType:
65846621
$ref: '#/components/schemas/businessEntityTypeEnum'
65856622
tfvStatusEnum:
@@ -8117,7 +8154,7 @@ components:
81178154
latestMessageDeliveryStatusDate: '2025-05-18'
81188155
- phoneNumber: '+10072904498'
81198156
countryCodeA3: USA
8120-
lineType: FIXED
8157+
lineType: MOBILE
81218158
voiceProvider: VERIZON
81228159
latestMessageDeliveryStatus: DEACTIVATED
81238160
initialMessageDeliveryStatusDate: '2025-09-05'
@@ -8131,6 +8168,14 @@ components:
81318168
deactivationDate: '2025-09-29 01:23:00'
81328169
deactivationEvent: DEACTIVATED
81338170
latestMessageDeliveryStatus: UNKNOWN
8171+
- phoneNumber: '+10072904500'
8172+
lineType: FIXED
8173+
countryCodeA3: USA
8174+
voiceProvider: VERIZON
8175+
deactivationReporter: Verizon Wireless
8176+
deactivationDate: '2025-09-29 01:23:00'
8177+
deactivationEvent: DEACTIVATED
8178+
latestMessageDeliveryStatus: NOT_ENABLED
81348179
errors: []
81358180
badRequestExample:
81368181
summary: Example Bad Request Error

bandwidth/models/business_entity_type_enum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
class BusinessEntityTypeEnum(str, Enum):
2323
"""
24-
The type of registered business. If no option is applicable, please provide \"SOLE_PROPRIETOR\" as a value.
24+
The type of registered business.
2525
"""
2626

2727
"""

bandwidth/models/business_registration_issuing_country_enum.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
class BusinessRegistrationIssuingCountryEnum(str, Enum):
2323
"""
24-
The country issuing the business registration in ISO-3166-1 alpha-3 format. | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code |
24+
The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 country codes are acceptable, but the application will convert them to alpha-3 when received, so alpha-3 is encouraged. **Note:** If this field is omitted but `businessRegistrationType` is provided, the application will attempt to infer the country based on the registration type. However, if the application cannot confidently infer the country, the submission may be rejected. To ensure the highest likelihood of acceptance, it is recommended to provide both `businessRegistrationType` and `businessRegistrationIssuingCountry`. | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code |
2525
"""
2626

2727
"""
@@ -40,6 +40,10 @@ class BusinessRegistrationIssuingCountryEnum(str, Enum):
4040
DEU = 'DEU'
4141
ESP = 'ESP'
4242
CHE = 'CHE'
43+
CYP = 'CYP'
44+
IND = 'IND'
45+
CHN = 'CHN'
46+
BGR = 'BGR'
4347

4448
@classmethod
4549
def from_json(cls, json_str: str) -> Self:

bandwidth/models/business_registration_type_enum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
class BusinessRegistrationTypeEnum(str, Enum):
2323
"""
24-
The type of business registration number.
24+
The type of business registration number.
2525
"""
2626

2727
"""

bandwidth/models/callback.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ class Callback(BaseModel):
5151
'message-failed': 'StatusCallback',
5252
'message-read': 'StatusCallback',
5353
'message-received': 'InboundCallback',
54+
'message-sending': 'StatusCallback',
5455
'message-sent': 'StatusCallback',
5556
'request-location-response': 'InboundCallback',
5657
'suggestion-response': 'InboundCallback'

bandwidth/models/latest_message_delivery_status_enum.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
class LatestMessageDeliveryStatusEnum(str, Enum):
2323
"""
24-
[DNI-Only](#section/DNI-Only). The current delivery status of the phone number. - ACTIVE: A message was successfully sent to the number (delivery code 0). - DEACTIVATED: A message was not delivered to a number (delivery code 720) - UNKNOWN: Bandwidth cannot find an delivery status entry for the number.
24+
[DNI-Only](#section/DNI-Only). The current delivery status of the phone number. - ACTIVE: A message was successfully sent to the number (delivery code 0). - DEACTIVATED: A message was not delivered to a number (delivery code 720) - UNKNOWN: Bandwidth cannot find an delivery status entry for the number. - NOT_ENABLED: The phone number is not enabled for messaging, so there is no delivery status information.
2525
"""
2626

2727
"""
@@ -30,6 +30,7 @@ class LatestMessageDeliveryStatusEnum(str, Enum):
3030
ACTIVE = 'ACTIVE'
3131
DEACTIVATED = 'DEACTIVATED'
3232
UNKNOWN = 'UNKNOWN'
33+
NOT_ENABLED = 'NOT_ENABLED'
3334

3435
@classmethod
3536
def from_json(cls, json_str: str) -> Self:

bandwidth/models/tfv_submission_info.py

Lines changed: 5 additions & 5 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, StrictStr
21+
from pydantic import BaseModel, ConfigDict, Field
2222
from typing import Any, ClassVar, Dict, List, Optional
2323
from typing_extensions import Annotated
2424
from bandwidth.models.address import Address
@@ -43,10 +43,10 @@ class TfvSubmissionInfo(BaseModel):
4343
opt_in_workflow: Optional[OptInWorkflow] = Field(default=None, alias="optInWorkflow")
4444
additional_information: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=500)]] = Field(default=None, description="Any additional information.", alias="additionalInformation")
4545
isv_reseller: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=500)]] = Field(default=None, description="ISV name.", alias="isvReseller")
46-
privacy_policy_url: Optional[StrictStr] = Field(default=None, description="The Toll-Free Verification request privacy policy URL.", alias="privacyPolicyUrl")
47-
terms_and_conditions_url: Optional[StrictStr] = Field(default=None, description="The Toll-Free Verification request terms and conditions policy URL.", alias="termsAndConditionsUrl")
48-
business_dba: Optional[StrictStr] = Field(default=None, description="The company 'Doing Business As'.", alias="businessDba")
49-
business_registration_number: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="Government-issued business identifying number.", alias="businessRegistrationNumber")
46+
privacy_policy_url: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="The Toll-Free Verification request privacy policy URL.", alias="privacyPolicyUrl")
47+
terms_and_conditions_url: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="The Toll-Free Verification request terms and conditions policy URL.", alias="termsAndConditionsUrl")
48+
business_dba: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="The company 'Doing Business As'.", alias="businessDba")
49+
business_registration_number: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="Government-issued business identifying number. **Note:** If this field is provided, it is strongly recommended to also provide `businessRegistrationType` and `businessRegistrationIssuingCountry`. Submissions missing these fields have a high likelihood of rejection. ", alias="businessRegistrationNumber")
5050
business_registration_type: Optional[BusinessRegistrationTypeEnum] = Field(default=None, alias="businessRegistrationType")
5151
business_registration_issuing_country: Optional[BusinessRegistrationIssuingCountryEnum] = Field(default=None, alias="businessRegistrationIssuingCountry")
5252
business_entity_type: Optional[BusinessEntityTypeEnum] = Field(default=None, alias="businessEntityType")

bandwidth/models/verification_request.py

Lines changed: 5 additions & 5 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, StrictBool, StrictStr, field_validator
21+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, field_validator
2222
from typing import Any, ClassVar, Dict, List, Optional
2323
from typing_extensions import Annotated
2424
from bandwidth.models.address import Address
@@ -44,10 +44,10 @@ class VerificationRequest(BaseModel):
4444
opt_in_workflow: OptInWorkflow = Field(alias="optInWorkflow")
4545
additional_information: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=500)]] = Field(default=None, description="Any additional information.", alias="additionalInformation")
4646
isv_reseller: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=500)]] = Field(default=None, description="ISV name.", alias="isvReseller")
47-
privacy_policy_url: Optional[StrictStr] = Field(default=None, description="The Toll-Free Verification request privacy policy URL.", alias="privacyPolicyUrl")
48-
terms_and_conditions_url: Optional[StrictStr] = Field(default=None, description="The Toll-Free Verification request terms and conditions policy URL.", alias="termsAndConditionsUrl")
49-
business_dba: Optional[StrictStr] = Field(default=None, description="The company 'Doing Business As'.", alias="businessDba")
50-
business_registration_number: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="Government-issued business identifying number.", alias="businessRegistrationNumber")
47+
privacy_policy_url: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="The Toll-Free Verification request privacy policy URL.", alias="privacyPolicyUrl")
48+
terms_and_conditions_url: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="The Toll-Free Verification request terms and conditions policy URL.", alias="termsAndConditionsUrl")
49+
business_dba: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="The company 'Doing Business As'.", alias="businessDba")
50+
business_registration_number: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="Government-issued business identifying number. **Note:** If this field is provided, it is strongly recommended to also provide `businessRegistrationType` and `businessRegistrationIssuingCountry`. Submissions missing these fields have a high likelihood of rejection. ", alias="businessRegistrationNumber")
5151
business_registration_type: Optional[BusinessRegistrationTypeEnum] = Field(default=None, alias="businessRegistrationType")
5252
business_registration_issuing_country: Optional[BusinessRegistrationIssuingCountryEnum] = Field(default=None, alias="businessRegistrationIssuingCountry")
5353
business_entity_type: BusinessEntityTypeEnum = Field(alias="businessEntityType")

bandwidth/models/verification_update_request.py

Lines changed: 5 additions & 5 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, StrictBool, StrictStr
21+
from pydantic import BaseModel, ConfigDict, Field, StrictBool
2222
from typing import Any, ClassVar, Dict, List, Optional
2323
from typing_extensions import Annotated
2424
from bandwidth.models.address import Address
@@ -43,10 +43,10 @@ class VerificationUpdateRequest(BaseModel):
4343
opt_in_workflow: OptInWorkflow = Field(alias="optInWorkflow")
4444
additional_information: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=500)]] = Field(default=None, description="Any additional information.", alias="additionalInformation")
4545
isv_reseller: Optional[Annotated[str, Field(min_length=0, strict=True, max_length=500)]] = Field(default=None, description="ISV name.", alias="isvReseller")
46-
privacy_policy_url: Optional[StrictStr] = Field(default=None, description="The Toll-Free Verification request privacy policy URL.", alias="privacyPolicyUrl")
47-
terms_and_conditions_url: Optional[StrictStr] = Field(default=None, description="The Toll-Free Verification request terms and conditions policy URL.", alias="termsAndConditionsUrl")
48-
business_dba: Optional[StrictStr] = Field(default=None, description="The company 'Doing Business As'.", alias="businessDba")
49-
business_registration_number: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="Government-issued business identifying number.", alias="businessRegistrationNumber")
46+
privacy_policy_url: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="The Toll-Free Verification request privacy policy URL.", alias="privacyPolicyUrl")
47+
terms_and_conditions_url: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="The Toll-Free Verification request terms and conditions policy URL.", alias="termsAndConditionsUrl")
48+
business_dba: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="The company 'Doing Business As'.", alias="businessDba")
49+
business_registration_number: Optional[Annotated[str, Field(strict=True, max_length=500)]] = Field(default=None, description="Government-issued business identifying number. **Note:** If this field is provided, it is strongly recommended to also provide `businessRegistrationType` and `businessRegistrationIssuingCountry`. Submissions missing these fields have a high likelihood of rejection. ", alias="businessRegistrationNumber")
5050
business_registration_type: Optional[BusinessRegistrationTypeEnum] = Field(default=None, alias="businessRegistrationType")
5151
business_entity_type: Optional[BusinessEntityTypeEnum] = Field(default=None, alias="businessEntityType")
5252
business_registration_issuing_country: Optional[BusinessRegistrationIssuingCountryEnum] = Field(default=None, alias="businessRegistrationIssuingCountry")

docs/BusinessEntityTypeEnum.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# BusinessEntityTypeEnum
22

3-
The type of registered business. If no option is applicable, please provide \"SOLE_PROPRIETOR\" as a value.
3+
The type of registered business.
44

55
## Enum
66

0 commit comments

Comments
 (0)