Skip to content

Commit 3eb9779

Browse files
band-swi-release-engineering[bot]DX-Bandwidthckoegel
authored
SWI-11589 Update SDK Based on Recent Spec Changes (#302)
* Generate SDK with OpenAPI Generator Version * unit test --------- Co-authored-by: DX-Bandwidth <dx@bandwidth.com> Co-authored-by: ckoegel <ckoegel1006@gmail.com>
1 parent e7f7a52 commit 3eb9779

4 files changed

Lines changed: 40 additions & 8 deletions

File tree

bandwidth.yml

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2962,7 +2962,7 @@ components:
29622962
description:
29632963
type: string
29642964
description: A detailed description of the event described by the callback.
2965-
example: Message delivered to carrier.
2965+
example: Message delivered to handset.
29662966
message:
29672967
$ref: '#/components/schemas/statusCallbackMessage'
29682968
errorCode:
@@ -3018,7 +3018,11 @@ components:
30183018
- `message-sending` indicates that Bandwidth is sending the message to
30193019
the upstream provider.
30203020
3021-
- `message-delivered` indicates that the message was successfully sent.
3021+
- `message-sent` indicates that the message has left the Bandwidth
3022+
network and is in transit to the provider.
3023+
3024+
- `message-delivered` indicates that the message was successfully
3025+
delivered to handset.
30223026
30233027
- `message-failed` indicates that the message could not be sent to the
30243028
intended recipient.
@@ -3027,6 +3031,7 @@ components:
30273031
recipient.
30283032
enum:
30293033
- message-sending
3034+
- message-sent
30303035
- message-delivered
30313036
- message-failed
30323037
- message-read
@@ -8712,12 +8717,33 @@ components:
87128717
media:
87138718
- https://dev.bandwidth.com/images/bandwidth-logo.png
87148719
tag: your tag here
8720+
messageSentCallbackExample:
8721+
summary: An example of a message-sent callback body.
8722+
value:
8723+
time: '2024-06-25T18:42:36.979456Z'
8724+
type: message-sent
8725+
to: '+15554443333'
8726+
description: Message sent to carrier
8727+
message:
8728+
id: 1593110555875xo7watq5px6rbe5d
8729+
owner: '+15552221111'
8730+
applicationId: cfd4fb83-7531-4acc-b471-42d0bb76a65c
8731+
time: '2024-06-25T18:42:35.876906Z'
8732+
segmentCount: 1
8733+
direction: out
8734+
to:
8735+
- '+15554443333'
8736+
from: '+15552221111'
8737+
text: ''
8738+
media:
8739+
- https://dev.bandwidth.com/images/bandwidth-logo.png
8740+
tag: v2 lab
87158741
smsMessageDeliveredCallbackExample:
87168742
summary: An example of a sms message-delivered callback body.
87178743
value:
87188744
type: message-delivered
87198745
time: '2024-09-14T18:20:11.160744Z'
8720-
description: Message delivered to carrier.
8746+
description: Message delivered to handset.
87218747
to: '+12345678902'
87228748
message:
87238749
id: 14762070468292kw2fuqty55yp2b2
@@ -8735,7 +8761,7 @@ components:
87358761
value:
87368762
type: message-delivered
87378763
time: '2024-09-14T18:20:24.160544Z'
8738-
description: Message delivered to carrier.
8764+
description: Message delivered to handset.
87398765
to: '+12345678902'
87408766
message:
87418767
id: 14762070468292kw2fuqty55yp2b2
@@ -8755,7 +8781,7 @@ components:
87558781
value:
87568782
type: message-delivered
87578783
time: '2024-09-14T18:20:17.160544Z'
8758-
description: Message delivered to carrier.
8784+
description: Message delivered to handset.
87598785
to: '+12345678902'
87608786
message:
87618787
id: 14762070468292kw2fuqty55yp2b2
@@ -9787,7 +9813,7 @@ components:
97879813
information regarding a message sent (MT)
97889814
97899815
from your message-enabled Bandwidth telephone number.
9790-
<p>The payload type will be one of <code>message-sending</code>, <code>message-delivered</code>, <code>message-failed</code> or <code>message-read</code>.
9816+
<p>The payload type will be one of <code>message-sending</code>, <code>message-sent</code>, <code>message-delivered</code>, <code>message-failed</code> or <code>message-read</code>.
97919817
<p>Note that <code>message-read</code> callbacks are pertinent only for RBM messages sent from the <code>/messages/multiChannel</code> endpoint.
97929818
</p><p>Please visit <a
97939819
href='/docs/messaging/webhooks/'>Webhooks</a></p>
@@ -9798,6 +9824,8 @@ components:
97989824
examples:
97999825
messageSendingCallback:
98009826
$ref: '#/components/examples/messageSendingCallbackExample'
9827+
messageSentCallback:
9828+
$ref: '#/components/examples/messageSentCallbackExample'
98019829
smsMessageDeliveredCallback:
98029830
$ref: '#/components/examples/smsMessageDeliveredCallbackExample'
98039831
mmsMessageDeliveredCallback:

bandwidth/models/status_callback_type_enum.py

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

2222
class StatusCallbackTypeEnum(str, Enum):
2323
"""
24-
The possible status callbacks when sending an MT SMS or MMS or RBM message: - `message-sending` indicates that Bandwidth is sending the message to the upstream provider. - `message-delivered` indicates that the message was successfully sent. - `message-failed` indicates that the message could not be sent to the intended recipient. - `message-read` indicates that the RBM message was read by the recipient.
24+
The possible status callbacks when sending an MT SMS or MMS or RBM message: - `message-sending` indicates that Bandwidth is sending the message to the upstream provider. - `message-sent` indicates that the message has left the Bandwidth network and is in transit to the provider. - `message-delivered` indicates that the message was successfully delivered to handset. - `message-failed` indicates that the message could not be sent to the intended recipient. - `message-read` indicates that the RBM message was read by the recipient.
2525
"""
2626

2727
"""
2828
allowed enum values
2929
"""
3030
MESSAGE_MINUS_SENDING = 'message-sending'
31+
MESSAGE_MINUS_SENT = 'message-sent'
3132
MESSAGE_MINUS_DELIVERED = 'message-delivered'
3233
MESSAGE_MINUS_FAILED = 'message-failed'
3334
MESSAGE_MINUS_READ = 'message-read'

docs/StatusCallbackTypeEnum.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# StatusCallbackTypeEnum
22

3-
The possible status callbacks when sending an MT SMS or MMS or RBM message: - `message-sending` indicates that Bandwidth is sending the message to the upstream provider. - `message-delivered` indicates that the message was successfully sent. - `message-failed` indicates that the message could not be sent to the intended recipient. - `message-read` indicates that the RBM message was read by the recipient.
3+
The possible status callbacks when sending an MT SMS or MMS or RBM message: - `message-sending` indicates that Bandwidth is sending the message to the upstream provider. - `message-sent` indicates that the message has left the Bandwidth network and is in transit to the provider. - `message-delivered` indicates that the message was successfully delivered to handset. - `message-failed` indicates that the message could not be sent to the intended recipient. - `message-read` indicates that the RBM message was read by the recipient.
44

55
## Enum
66

77
* `MESSAGE_MINUS_SENDING` (value: `'message-sending'`)
88

9+
* `MESSAGE_MINUS_SENT` (value: `'message-sent'`)
10+
911
* `MESSAGE_MINUS_DELIVERED` (value: `'message-delivered'`)
1012

1113
* `MESSAGE_MINUS_FAILED` (value: `'message-failed'`)

test/unit/models/test_status_callback_type_enum.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def tearDown(self):
2929
def testStatusCallbackTypeEnum(self):
3030
"""Test StatusCallbackTypeEnum"""
3131
assert StatusCallbackTypeEnum('message-sending') == 'message-sending'
32+
assert StatusCallbackTypeEnum('message-sent') == 'message-sent'
3233
assert StatusCallbackTypeEnum('message-delivered') == 'message-delivered'
3334
assert StatusCallbackTypeEnum('message-failed') == 'message-failed'
3435
assert StatusCallbackTypeEnum('message-read') == 'message-read'

0 commit comments

Comments
 (0)