Skip to content

Commit 0ec6fb4

Browse files
band-swi-release-engineering[bot]DX-Bandwidthckoegel
authored
SWI-10307 Update SDK Based on Recent Spec Changes (#199)
* Generate SDK with OpenAPI Generator Version * update test --------- Co-authored-by: DX-Bandwidth <dx@bandwidth.com> Co-authored-by: ckoegel <ckoegel1006@gmail.com>
1 parent 658fee9 commit 0ec6fb4

8 files changed

Lines changed: 197 additions & 43 deletions

File tree

bandwidth.yml

Lines changed: 122 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5552,6 +5552,10 @@ components:
55525552
example: GET
55535553
lookupErrorSchema:
55545554
type: object
5555+
required:
5556+
- code
5557+
- type
5558+
- description
55555559
properties:
55565560
code:
55575561
type: string
@@ -5699,6 +5703,39 @@ components:
56995703
type: array
57005704
items:
57015705
$ref: '#/components/schemas/lookupErrorSchema'
5706+
rcsErrorEnum:
5707+
type: string
5708+
description: >-
5709+
[RCS-Only](#section/RCS-Only). Error encountered during RCS capability
5710+
lookup. Appears as the `code` field in the top-level `errors` array.
5711+
5712+
5713+
**RCS service pass-through codes:**
5714+
5715+
- `REQUEST_FAILED`: The RCS service returned this error code.
5716+
5717+
- `UNKNOWN_CODE`: The RCS service returned this error code.
5718+
5719+
- `INVALID_DESTINATION_ADDRESS`: The RCS service returned this error
5720+
code.
5721+
5722+
- `UNKNOWN_STATUS: <code>`: The RCS service returned an unrecognized
5723+
status code, where `<code>` is the raw value.
5724+
5725+
5726+
**Service-level errors:**
5727+
5728+
- `MISSING_FROM_RESPONSE`: The phone number was absent from the RCS
5729+
service response.
5730+
5731+
- `RCS_SERVICE_UNAVAILABLE`: An exception was thrown during the async
5732+
RCS service call.
5733+
5734+
- `RCS_SERVICE_DISABLED`: RCS lookup is disabled in configuration.
5735+
5736+
- `EMPTY_RESPONSE`: The RCS service returned a null or empty response
5737+
body.
5738+
example: RCS_SERVICE_UNAVAILABLE
57025739
lookupResult:
57035740
type: object
57045741
description: Carrier information results for the specified telephone number.
@@ -5757,13 +5794,21 @@ components:
57575794
format: date
57585795
description: >-
57595796
[DNI-Only](#section/DNI-Only). The date bandwidth last received
5760-
delivery status information for this phone number.
5797+
delivery status information for this phone number.
57615798
57625799
Use this field to understand how up-to-date the
57635800
`latestMessageDeliveryStatus` is.
57645801
57655802
Value resets every time the `latestMessageDeliveryStatus` changes.
57665803
example: '2025-06-21'
5804+
rcsEnabled:
5805+
type: boolean
5806+
description: >
5807+
[RCS-Only](#section/RCS-Only). Indicates whether the phone number is
5808+
capable of receiving RCS messages. Value will be null if account has
5809+
RCS, but no value was returned. Absent when account does not have
5810+
RCS.
5811+
example: true
57675812
accountId1:
57685813
type: string
57695814
description: User's account ID.
@@ -7149,6 +7194,10 @@ components:
71497194
$ref: '#/components/examples/lookupCompleteWithDniExample'
71507195
lookupCompleteExample:
71517196
$ref: '#/components/examples/lookupCompleteExample'
7197+
lookupCompleteWithRcsExample:
7198+
$ref: '#/components/examples/lookupCompleteWithRcsExample'
7199+
lookupCompleteWithRcsErrorExample:
7200+
$ref: '#/components/examples/lookupCompleteWithRcsErrorExample'
71527201
lookupPartialExample:
71537202
$ref: '#/components/examples/lookupPartialExample'
71547203
lookupFailedExample:
@@ -7160,8 +7209,8 @@ components:
71607209
schema:
71617210
$ref: '#/components/schemas/createAsyncBulkLookupResponse'
71627211
examples:
7163-
lookupInProgressExample:
7164-
$ref: '#/components/examples/lookupInProgressExample'
7212+
lookupAcceptedExample:
7213+
$ref: '#/components/examples/lookupAcceptedExample'
71657214
getAsyncBulkLookupResponse:
71667215
description: OK
71677216
content:
@@ -8049,25 +8098,32 @@ components:
80498098
phoneNumbers:
80508099
- '+19196104423'
80518100
- '+19196104424'
8052-
lookupInProgressExample:
8053-
summary: Numbers Lookup In Progress
8101+
lookupAcceptedExample:
8102+
summary: Numbers Lookup Accepted
80548103
value:
80558104
links:
8056-
- href: href
8057-
rel: rel
8105+
- href: >-
8106+
/accounts/9912345/phoneNumberLookup/bulk/004223a0-8b17-41b1-bf81-20732adf5590
8107+
rel: createdRequest
80588108
method: GET
80598109
data:
80608110
requestId: 004223a0-8b17-41b1-bf81-20732adf5590
80618111
status: IN_PROGRESS
80628112
results: []
80638113
errors: []
8114+
lookupInProgressExample:
8115+
summary: Numbers Lookup In Progress
8116+
value:
8117+
links: []
8118+
data:
8119+
requestId: 004223a0-8b17-41b1-bf81-20732adf5590
8120+
status: IN_PROGRESS
8121+
results: []
8122+
errors: []
80648123
lookupFailedExample:
80658124
summary: Numbers Lookup Failed
80668125
value:
8067-
links:
8068-
- href: href
8069-
rel: rel
8070-
method: GET
8126+
links: []
80718127
data:
80728128
requestId: 004223a0-8b17-41b1-bf81-20732adf5590
80738129
status: FAILED
@@ -8084,10 +8140,7 @@ components:
80848140
lookupPartialExample:
80858141
summary: Numbers Lookup Partial Complete
80868142
value:
8087-
links:
8088-
- href: href
8089-
rel: rel
8090-
method: GET
8143+
links: []
80918144
data:
80928145
requestId: 004223a0-8b17-41b1-bf81-20732adf5590
80938146
status: PARTIAL_COMPLETE
@@ -8114,10 +8167,7 @@ components:
81148167
lookupCompleteExample:
81158168
summary: Numbers Lookup Complete (without DNI)
81168169
value:
8117-
links:
8118-
- href: href
8119-
rel: rel
8120-
method: GET
8170+
links: []
81218171
data:
81228172
requestId: 004223a0-8b17-41b1-bf81-20732adf5590
81238173
status: COMPLETE
@@ -8136,10 +8186,7 @@ components:
81368186
lookupCompleteWithDniExample:
81378187
summary: Numbers Lookup Complete (with DNI)
81388188
value:
8139-
links:
8140-
- href: href
8141-
rel: rel
8142-
method: GET
8189+
links: []
81438190
data:
81448191
requestId: 20732adf-bf81-8b17-41b1-004223a05590
81458192
status: COMPLETE
@@ -8177,6 +8224,58 @@ components:
81778224
deactivationEvent: DEACTIVATED
81788225
latestMessageDeliveryStatus: NOT_ENABLED
81798226
errors: []
8227+
lookupCompleteWithRcsExample:
8228+
summary: Numbers Lookup Complete (with RCS)
8229+
value:
8230+
links: []
8231+
data:
8232+
requestId: 004223a0-8b17-41b1-bf81-20732adf5590
8233+
status: COMPLETE
8234+
results:
8235+
- phoneNumber: '+10072904497'
8236+
lineType: MOBILE
8237+
messagingProvider: Verizon Wireless
8238+
voiceProvider: Verizon Wireless
8239+
countryCodeA3: USA
8240+
rcsEnabled: true
8241+
- phoneNumber: '+10072904498'
8242+
lineType: MOBILE
8243+
messagingProvider: T-Mobile USA
8244+
voiceProvider: T-Mobile USA
8245+
countryCodeA3: USA
8246+
rcsEnabled: false
8247+
errors: []
8248+
lookupCompleteWithRcsErrorExample:
8249+
summary: Numbers Lookup Complete (with RCS error)
8250+
value:
8251+
links: []
8252+
data:
8253+
requestId: 004223a0-8b17-41b1-bf81-20732adf5590
8254+
status: COMPLETE
8255+
results:
8256+
- phoneNumber: '+10072904497'
8257+
lineType: MOBILE
8258+
messagingProvider: Verizon Wireless
8259+
voiceProvider: Verizon Wireless
8260+
countryCodeA3: USA
8261+
- phoneNumber: '+10072904498'
8262+
lineType: MOBILE
8263+
messagingProvider: T-Mobile USA
8264+
voiceProvider: T-Mobile USA
8265+
countryCodeA3: USA
8266+
errors:
8267+
- code: RCS_SERVICE_UNAVAILABLE
8268+
type: rcs-error
8269+
description: An exception was thrown during the async RCS service call.
8270+
meta:
8271+
phoneNumbers:
8272+
- '+10072904497'
8273+
- code: MISSING_FROM_RESPONSE
8274+
type: rcs-error
8275+
description: The phone number was absent from the RCS service response.
8276+
meta:
8277+
phoneNumbers:
8278+
- '+10072904498'
81808279
badRequestExample:
81818280
summary: Example Bad Request Error
81828281
value:

docs/LookupErrorSchema.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
| Name | Type | Description | Notes |
66
| ---- | ---- | ----------- | ----- |
7-
| **code** | **String** | Validation error code | [optional] |
8-
| **description** | **String** | Description of validation error | [optional] |
9-
| **type** | **String** | Type of validation error | [optional] |
7+
| **code** | **String** | Validation error code | |
8+
| **description** | **String** | Description of validation error | |
9+
| **type** | **String** | Type of validation error | |
1010
| **meta** | [**LookupErrorSchemaMeta**](LookupErrorSchemaMeta.md) | | [optional] |
1111

1212
## Example

docs/LookupResult.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
| **deactivation_event** | [**DeactivationEventEnum**](DeactivationEventEnum.md) | | [optional] |
1515
| **latest_message_delivery_status** | [**LatestMessageDeliveryStatusEnum**](LatestMessageDeliveryStatusEnum.md) | | [optional] |
1616
| **initial_message_delivery_status_date** | **Date** | [DNI-Only](#section/DNI-Only). The date the phone number entered the status described in &#x60;latestMessageDeliveryStatus&#x60;. Think of this as the \&quot;start time\&quot; for that status. Value resets every time the &#x60;latestMessageDeliveryStatus&#x60; changes. | [optional] |
17-
| **latest_message_delivery_status_date** | **Date** | [DNI-Only](#section/DNI-Only). The date bandwidth last received delivery status information for this phone number. Use this field to understand how up-to-date the &#x60;latestMessageDeliveryStatus&#x60; is. Value resets every time the &#x60;latestMessageDeliveryStatus&#x60; changes. | [optional] |
17+
| **latest_message_delivery_status_date** | **Date** | [DNI-Only](#section/DNI-Only). The date bandwidth last received delivery status information for this phone number. Use this field to understand how up-to-date the &#x60;latestMessageDeliveryStatus&#x60; is. Value resets every time the &#x60;latestMessageDeliveryStatus&#x60; changes. | [optional] |
18+
| **rcs_enabled** | **Boolean** | [RCS-Only](#section/RCS-Only). Indicates whether the phone number is capable of receiving RCS messages. Value will be null if account has RCS, but no value was returned. Absent when account does not have RCS. | [optional] |
1819

1920
## Example
2021

@@ -32,7 +33,8 @@ instance = Bandwidth::LookupResult.new(
3233
deactivation_event: null,
3334
latest_message_delivery_status: null,
3435
initial_message_delivery_status_date: Fri Jun 20 00:00:00 UTC 2025,
35-
latest_message_delivery_status_date: Sat Jun 21 00:00:00 UTC 2025
36+
latest_message_delivery_status_date: Sat Jun 21 00:00:00 UTC 2025,
37+
rcs_enabled: true
3638
)
3739
```
3840

docs/RbmActionBase.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ require 'bandwidth-sdk'
1616
instance = Bandwidth::RbmActionBase.new(
1717
type: null,
1818
text: Hello world,
19-
postback_data: [B@764a3867
19+
postback_data: [B@4693d24f
2020
)
2121
```
2222

docs/RbmSuggestionResponse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ require 'bandwidth-sdk'
1414

1515
instance = Bandwidth::RbmSuggestionResponse.new(
1616
text: Yes, I would like to proceed,
17-
postback_data: [B@764a3867
17+
postback_data: [B@4693d24f
1818
)
1919
```
2020

lib/bandwidth-sdk/models/lookup_error_schema.rb

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,20 @@ def initialize(attributes = {})
8080

8181
if attributes.key?(:'code')
8282
self.code = attributes[:'code']
83+
else
84+
self.code = nil
8385
end
8486

8587
if attributes.key?(:'description')
8688
self.description = attributes[:'description']
89+
else
90+
self.description = nil
8791
end
8892

8993
if attributes.key?(:'type')
9094
self.type = attributes[:'type']
95+
else
96+
self.type = nil
9197
end
9298

9399
if attributes.key?(:'meta')
@@ -100,16 +106,61 @@ def initialize(attributes = {})
100106
def list_invalid_properties
101107
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
102108
invalid_properties = Array.new
109+
if @code.nil?
110+
invalid_properties.push('invalid value for "code", code cannot be nil.')
111+
end
112+
113+
if @description.nil?
114+
invalid_properties.push('invalid value for "description", description cannot be nil.')
115+
end
116+
117+
if @type.nil?
118+
invalid_properties.push('invalid value for "type", type cannot be nil.')
119+
end
120+
103121
invalid_properties
104122
end
105123

106124
# Check to see if the all the properties in the model are valid
107125
# @return true if the model is valid
108126
def valid?
109127
warn '[DEPRECATED] the `valid?` method is obsolete'
128+
return false if @code.nil?
129+
return false if @description.nil?
130+
return false if @type.nil?
110131
true
111132
end
112133

134+
# Custom attribute writer method with validation
135+
# @param [Object] code Value to be assigned
136+
def code=(code)
137+
if code.nil?
138+
fail ArgumentError, 'code cannot be nil'
139+
end
140+
141+
@code = code
142+
end
143+
144+
# Custom attribute writer method with validation
145+
# @param [Object] description Value to be assigned
146+
def description=(description)
147+
if description.nil?
148+
fail ArgumentError, 'description cannot be nil'
149+
end
150+
151+
@description = description
152+
end
153+
154+
# Custom attribute writer method with validation
155+
# @param [Object] type Value to be assigned
156+
def type=(type)
157+
if type.nil?
158+
fail ArgumentError, 'type cannot be nil'
159+
end
160+
161+
@type = type
162+
end
163+
113164
# Checks equality by comparing each attribute.
114165
# @param [Object] Object to be compared
115166
def ==(o)

0 commit comments

Comments
 (0)