Skip to content

Commit 71c4d93

Browse files
band-swi-release-engineering[bot]DX-Bandwidthckoegel
authored
SWI-11590 Update SDK Based on Recent Spec Changes (#248)
* 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 38ab913 commit 71c4d93

5 files changed

Lines changed: 71 additions & 13 deletions

File tree

api/openapi.yaml

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6498,6 +6498,8 @@ components:
64986498
examples:
64996499
messageSendingCallback:
65006500
$ref: "#/components/examples/messageSendingCallbackExample"
6501+
messageSentCallback:
6502+
$ref: "#/components/examples/messageSentCallbackExample"
65016503
smsMessageDeliveredCallback:
65026504
$ref: "#/components/examples/smsMessageDeliveredCallbackExample"
65036505
mmsMessageDeliveredCallback:
@@ -6511,7 +6513,7 @@ components:
65116513
description: |-
65126514
<p>This Outbound Message Webhook is an envelope containing status information regarding a message sent (MT)
65136515
from your message-enabled Bandwidth telephone number.
6514-
<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>.
6516+
<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>.
65156517
<p>Note that <code>message-read</code> callbacks are pertinent only for RBM messages sent from the <code>/messages/multiChannel</code> endpoint.
65166518
</p><p>Please visit <a href='/docs/messaging/webhooks/'>Webhooks</a></p>
65176519
required: true
@@ -6691,12 +6693,33 @@ components:
66916693
media:
66926694
- https://dev.bandwidth.com/images/bandwidth-logo.png
66936695
tag: your tag here
6696+
messageSentCallbackExample:
6697+
summary: An example of a message-sent callback body.
6698+
value:
6699+
time: 2024-06-25T18:42:36.979456Z
6700+
type: message-sent
6701+
to: "+15554443333"
6702+
description: Message sent to carrier
6703+
message:
6704+
id: 1593110555875xo7watq5px6rbe5d
6705+
owner: "+15552221111"
6706+
applicationId: cfd4fb83-7531-4acc-b471-42d0bb76a65c
6707+
time: 2024-06-25T18:42:35.876906Z
6708+
segmentCount: 1
6709+
direction: out
6710+
to:
6711+
- "+15554443333"
6712+
from: "+15552221111"
6713+
text: ""
6714+
media:
6715+
- https://dev.bandwidth.com/images/bandwidth-logo.png
6716+
tag: v2 lab
66946717
smsMessageDeliveredCallbackExample:
66956718
summary: An example of a sms message-delivered callback body.
66966719
value:
66976720
type: message-delivered
66986721
time: 2024-09-14T18:20:11.160744Z
6699-
description: Message delivered to carrier.
6722+
description: Message delivered to handset.
67006723
to: "+12345678902"
67016724
message:
67026725
id: 14762070468292kw2fuqty55yp2b2
@@ -6714,7 +6737,7 @@ components:
67146737
value:
67156738
type: message-delivered
67166739
time: 2024-09-14T18:20:24.160544Z
6717-
description: Message delivered to carrier.
6740+
description: Message delivered to handset.
67186741
to: "+12345678902"
67196742
message:
67206743
id: 14762070468292kw2fuqty55yp2b2
@@ -6734,7 +6757,7 @@ components:
67346757
value:
67356758
type: message-delivered
67366759
time: 2024-09-14T18:20:17.160544Z
6737-
description: Message delivered to carrier.
6760+
description: Message delivered to handset.
67386761
to: "+12345678902"
67396762
message:
67406763
id: 14762070468292kw2fuqty55yp2b2
@@ -10704,7 +10727,7 @@ components:
1070410727
type: string
1070510728
description:
1070610729
description: A detailed description of the event described by the callback.
10707-
example: Message delivered to carrier.
10730+
example: Message delivered to handset.
1070810731
type: string
1070910732
message:
1071010733
$ref: "#/components/schemas/statusCallbackMessage"
@@ -10765,11 +10788,13 @@ components:
1076510788
description: |-
1076610789
The possible status callbacks when sending an MT SMS or MMS or RBM message:
1076710790
- `message-sending` indicates that Bandwidth is sending the message to the upstream provider.
10768-
- `message-delivered` indicates that the message was successfully sent.
10791+
- `message-sent` indicates that the message has left the Bandwidth network and is in transit to the provider.
10792+
- `message-delivered` indicates that the message was successfully delivered to handset.
1076910793
- `message-failed` indicates that the message could not be sent to the intended recipient.
1077010794
- `message-read` indicates that the RBM message was read by the recipient.
1077110795
enum:
1077210796
- message-sending
10797+
- message-sent
1077310798
- message-delivered
1077410799
- message-failed
1077510800
- message-read

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:

docs/StatusCallbackTypeEnum.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
* `MESSAGE_SENDING` (value: `"message-sending"`)
99

10+
* `MESSAGE_SENT` (value: `"message-sent"`)
11+
1012
* `MESSAGE_DELIVERED` (value: `"message-delivered"`)
1113

1214
* `MESSAGE_FAILED` (value: `"message-failed"`)

src/main/java/com/bandwidth/sdk/model/StatusCallbackTypeEnum.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,15 @@
2626
import com.google.gson.stream.JsonWriter;
2727

2828
/**
29-
* The possible status callbacks when sending an MT SMS or MMS or RBM message: - &#x60;message-sending&#x60; indicates that Bandwidth is sending the message to the upstream provider. - &#x60;message-delivered&#x60; indicates that the message was successfully sent. - &#x60;message-failed&#x60; indicates that the message could not be sent to the intended recipient. - &#x60;message-read&#x60; indicates that the RBM message was read by the recipient.
29+
* The possible status callbacks when sending an MT SMS or MMS or RBM message: - &#x60;message-sending&#x60; indicates that Bandwidth is sending the message to the upstream provider. - &#x60;message-sent&#x60; indicates that the message has left the Bandwidth network and is in transit to the provider. - &#x60;message-delivered&#x60; indicates that the message was successfully delivered to handset. - &#x60;message-failed&#x60; indicates that the message could not be sent to the intended recipient. - &#x60;message-read&#x60; indicates that the RBM message was read by the recipient.
3030
*/
3131
@JsonAdapter(StatusCallbackTypeEnum.Adapter.class)
3232
public enum StatusCallbackTypeEnum {
3333

3434
MESSAGE_SENDING("message-sending"),
3535

36+
MESSAGE_SENT("message-sent"),
37+
3638
MESSAGE_DELIVERED("message-delivered"),
3739

3840
MESSAGE_FAILED("message-failed"),

src/test/java/com/bandwidth/sdk/unit/models/StatusCallbackTypeEnumTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public class StatusCallbackTypeEnumTest {
3030
@Test
3131
public void testStatusCallbackTypeEnum() {
3232
assertThat(StatusCallbackTypeEnum.MESSAGE_SENDING.toString(), equalTo("message-sending"));
33+
assertThat(StatusCallbackTypeEnum.MESSAGE_SENT.toString(), equalTo("message-sent"));
3334
assertThat(StatusCallbackTypeEnum.MESSAGE_DELIVERED.toString(), equalTo("message-delivered"));
3435
assertThat(StatusCallbackTypeEnum.MESSAGE_FAILED.toString(), equalTo("message-failed"));
3536
assertThat(StatusCallbackTypeEnum.MESSAGE_READ.toString(), equalTo("message-read"));

0 commit comments

Comments
 (0)