Skip to content

Commit b7516e0

Browse files
band-swi-release-engineering[bot]DX-Bandwidthckoegel
authored
SWI-11476 Update SDK Based on Recent Spec Changes (#194)
* 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 be1a6f4 commit b7516e0

9 files changed

Lines changed: 62 additions & 28 deletions

File tree

Bandwidth.Standard.sln

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
22
# Visual Studio 14
33
VisualStudioVersion = 14.0.25420.1
44
MinimumVisualStudioVersion = 10.0.40219.1
5-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard", "src\Bandwidth.Standard\Bandwidth.Standard.csproj", "{7AA0ED8A-8E3C-40C0-9782-CD7900DB5B67}"
5+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard", "src\Bandwidth.Standard\Bandwidth.Standard.csproj", "{612BC740-F2E6-4466-87AE-403F47F2323F}"
66
EndProject
77
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard.Test", "src\Bandwidth.Standard.Test\Bandwidth.Standard.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
88
EndProject
@@ -12,10 +12,10 @@ Global
1212
Release|Any CPU = Release|Any CPU
1313
EndGlobalSection
1414
GlobalSection(ProjectConfigurationPlatforms) = postSolution
15-
{7AA0ED8A-8E3C-40C0-9782-CD7900DB5B67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16-
{7AA0ED8A-8E3C-40C0-9782-CD7900DB5B67}.Debug|Any CPU.Build.0 = Debug|Any CPU
17-
{7AA0ED8A-8E3C-40C0-9782-CD7900DB5B67}.Release|Any CPU.ActiveCfg = Release|Any CPU
18-
{7AA0ED8A-8E3C-40C0-9782-CD7900DB5B67}.Release|Any CPU.Build.0 = Release|Any CPU
15+
{612BC740-F2E6-4466-87AE-403F47F2323F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16+
{612BC740-F2E6-4466-87AE-403F47F2323F}.Debug|Any CPU.Build.0 = Debug|Any CPU
17+
{612BC740-F2E6-4466-87AE-403F47F2323F}.Release|Any CPU.ActiveCfg = Release|Any CPU
18+
{612BC740-F2E6-4466-87AE-403F47F2323F}.Release|Any CPU.Build.0 = Release|Any CPU
1919
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2020
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
2121
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU

api/openapi.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6343,8 +6343,8 @@ components:
63436343
<p>This Inbound Message Webhook is an envelope containing either a received (MO) message to your
63446344
message-enabled Bandwidth telephone number or a multichannel client's response to a suggestion response
63456345
or location request.
6346-
<p>The payload type will be one of <code>message-received</code>, <code>suggestion-response</code>, or <code>location-request-response</code>.
6347-
<p>Note that <code>suggestion-response</code> and <code>location-request-response</code> callback types are pertinent only for RBM messages sent from the <code>/messages/multiChannel</code> endpoint.
6346+
<p>The payload type will be one of <code>message-received</code>, <code>suggestion-response</code>, or <code>requested-location-response</code>.
6347+
<p>Note that <code>suggestion-response</code> and <code>requested-location-response</code> callback types are pertinent only for RBM messages sent from the <code>/messages/multiChannel</code> endpoint.
63486348
</p><p>Please visit <a href='/docs/messaging/webhooks/'>Webhooks</a></p>
63496349
required: true
63506350
responses:
@@ -7062,7 +7062,7 @@ components:
70627062
tag: "{\"myTag\": \"myTagValue\"}"
70637063
updateEndpointBxmlRequestExample:
70647064
summary: Update Endpoint BXML Request Example
7065-
value: <Bxml><StartRecording /></Bxml>
7065+
value: <Response><StartRecording /></Response>
70667066
endpointDisconnectedEventExample:
70677067
summary: Endpoint Disconnected Event
70687068
value:
@@ -10504,6 +10504,11 @@ components:
1050410504
maxLength: 2048
1050510505
title: Post Back Data
1050610506
type: string
10507+
pairedMessageId:
10508+
description: Corresponding parent message ID (MT).
10509+
example: 1752697342534u24xerqdukke523x
10510+
nullable: true
10511+
type: string
1050710512
type: object
1050810513
rbmLocationResponse:
1050910514
properties:
@@ -10531,7 +10536,7 @@ components:
1053110536
message-failed: '#/components/schemas/statusCallback'
1053210537
message-read: '#/components/schemas/statusCallback'
1053310538
message-received: '#/components/schemas/inboundCallback'
10534-
request-location-response: '#/components/schemas/inboundCallback'
10539+
requested-location-response: '#/components/schemas/inboundCallback'
1053510540
suggestion-response: '#/components/schemas/inboundCallback'
1053610541
propertyName: type
1053710542
oneOf:
@@ -10637,11 +10642,11 @@ components:
1063710642
description: |-
1063810643
The possible inbound callback types originating from MO messages or multichannel message client responses:
1063910644
- `message-received` indicates an MO message from a Bandwidth user's client to a Bandwidth number.
10640-
- `request-location-response` indicates a response to a location request sent by the Bandwidth user's client after receiving an RBM message.
10645+
- `requested-location-response` indicates a response to a location request sent by the Bandwidth user's client after receiving an RBM message.
1064110646
- `suggestion-response` indicates a response to a suggestion sent by the Bandwidth user's client after receiving an RBM message.
1064210647
enum:
1064310648
- message-received
10644-
- request-location-response
10649+
- requested-location-response
1064510650
- suggestion-response
1064610651
example: message-received
1064710652
type: string

bandwidth.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2889,6 +2889,11 @@ components:
28892889
example: Yes, I would like to proceed
28902890
postbackData:
28912891
$ref: '#/components/schemas/rbmActionPostbackData'
2892+
pairedMessageId:
2893+
type: string
2894+
nullable: true
2895+
description: Corresponding parent message ID (MT).
2896+
example: 1752697342534u24xerqdukke523x
28922897
rbmLocationResponse:
28932898
type: object
28942899
properties:
@@ -2925,7 +2930,7 @@ components:
29252930
message-failed: '#/components/schemas/statusCallback'
29262931
message-read: '#/components/schemas/statusCallback'
29272932
message-received: '#/components/schemas/inboundCallback'
2928-
request-location-response: '#/components/schemas/inboundCallback'
2933+
requested-location-response: '#/components/schemas/inboundCallback'
29292934
suggestion-response: '#/components/schemas/inboundCallback'
29302935
statusCallback:
29312936
type: object
@@ -3035,14 +3040,15 @@ components:
30353040
- `message-received` indicates an MO message from a Bandwidth user's
30363041
client to a Bandwidth number.
30373042
3038-
- `request-location-response` indicates a response to a location request
3039-
sent by the Bandwidth user's client after receiving an RBM message.
3043+
- `requested-location-response` indicates a response to a location
3044+
request sent by the Bandwidth user's client after receiving an RBM
3045+
message.
30403046
30413047
- `suggestion-response` indicates a response to a suggestion sent by the
30423048
Bandwidth user's client after receiving an RBM message.
30433049
enum:
30443050
- message-received
3045-
- request-location-response
3051+
- requested-location-response
30463052
- suggestion-response
30473053
example: message-received
30483054
statusCallbackMessage:
@@ -9154,7 +9160,7 @@ components:
91549160
tag: '{"myTag": "myTagValue"}'
91559161
updateEndpointBxmlRequestExample:
91569162
summary: Update Endpoint BXML Request Example
9157-
value: <Bxml><StartRecording /></Bxml>
9163+
value: <Response><StartRecording /></Response>
91589164
endpointDisconnectedEventExample:
91599165
summary: Endpoint Disconnected Event
91609166
value:
@@ -9678,10 +9684,10 @@ components:
96789684
96799685
<p>The payload type will be one of <code>message-received</code>,
96809686
<code>suggestion-response</code>, or
9681-
<code>location-request-response</code>.
9687+
<code>requested-location-response</code>.
96829688
96839689
<p>Note that <code>suggestion-response</code> and
9684-
<code>location-request-response</code> callback types are
9690+
<code>requested-location-response</code> callback types are
96859691
pertinent only for RBM messages sent from the
96869692
<code>/messages/multiChannel</code> endpoint.
96879693

docs/InboundCallbackTypeEnum.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Bandwidth.Standard.Model.InboundCallbackTypeEnum
2-
The possible inbound callback types originating from MO messages or multichannel message client responses: - `message-received` indicates an MO message from a Bandwidth user's client to a Bandwidth number. - `request-location-response` indicates a response to a location request sent by the Bandwidth user's client after receiving an RBM message. - `suggestion-response` indicates a response to a suggestion sent by the Bandwidth user's client after receiving an RBM message.
2+
The possible inbound callback types originating from MO messages or multichannel message client responses: - `message-received` indicates an MO message from a Bandwidth user's client to a Bandwidth number. - `requested-location-response` indicates a response to a location request sent by the Bandwidth user's client after receiving an RBM message. - `suggestion-response` indicates a response to a suggestion sent by the Bandwidth user's client after receiving an RBM message.
33

44
## Properties
55

docs/RbmSuggestionResponse.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**Text** | **string** | The text associated with the suggestion response. | [optional]
88
**PostbackData** | **byte[]** | Base64 payload the customer receives when the reply is clicked. | [optional]
9+
**PairedMessageId** | **string** | Corresponding parent message ID (MT). | [optional]
910

1011
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1112

src/Bandwidth.Standard.Test/Unit/Model/RbmSuggestionResponseTests.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ public RbmSuggestionResponseTests()
3737
{
3838
instance = new RbmSuggestionResponse(
3939
text: "Sample suggestion text",
40-
postbackData: new byte[] { 1, 2, 3 }
40+
postbackData: new byte[] { 1, 2, 3 },
41+
pairedMessageId: "12345"
4142
);
4243
}
4344

@@ -74,5 +75,15 @@ public void PostbackDataTest()
7475
Assert.IsType<byte[]>(instance.PostbackData);
7576
Assert.Equal(new byte[] { 1, 2, 3 }, instance.PostbackData);
7677
}
78+
79+
/// <summary>
80+
/// Test the property 'PairedMessageId'
81+
/// </summary>
82+
[Fact]
83+
public void PairedMessageIdTest()
84+
{
85+
Assert.IsType<string>(instance.PairedMessageId);
86+
Assert.Equal("12345", instance.PairedMessageId);
87+
}
7788
}
7889
}

src/Bandwidth.Standard/Model/InboundCallbackTypeEnum.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
namespace Bandwidth.Standard.Model
2828
{
2929
/// <summary>
30-
/// The possible inbound callback types originating from MO messages or multichannel message client responses: - &#x60;message-received&#x60; indicates an MO message from a Bandwidth user&#39;s client to a Bandwidth number. - &#x60;request-location-response&#x60; indicates a response to a location request sent by the Bandwidth user&#39;s client after receiving an RBM message. - &#x60;suggestion-response&#x60; indicates a response to a suggestion sent by the Bandwidth user&#39;s client after receiving an RBM message.
30+
/// The possible inbound callback types originating from MO messages or multichannel message client responses: - &#x60;message-received&#x60; indicates an MO message from a Bandwidth user&#39;s client to a Bandwidth number. - &#x60;requested-location-response&#x60; indicates a response to a location request sent by the Bandwidth user&#39;s client after receiving an RBM message. - &#x60;suggestion-response&#x60; indicates a response to a suggestion sent by the Bandwidth user&#39;s client after receiving an RBM message.
3131
/// </summary>
32-
/// <value>The possible inbound callback types originating from MO messages or multichannel message client responses: - &#x60;message-received&#x60; indicates an MO message from a Bandwidth user&#39;s client to a Bandwidth number. - &#x60;request-location-response&#x60; indicates a response to a location request sent by the Bandwidth user&#39;s client after receiving an RBM message. - &#x60;suggestion-response&#x60; indicates a response to a suggestion sent by the Bandwidth user&#39;s client after receiving an RBM message.</value>
32+
/// <value>The possible inbound callback types originating from MO messages or multichannel message client responses: - &#x60;message-received&#x60; indicates an MO message from a Bandwidth user&#39;s client to a Bandwidth number. - &#x60;requested-location-response&#x60; indicates a response to a location request sent by the Bandwidth user&#39;s client after receiving an RBM message. - &#x60;suggestion-response&#x60; indicates a response to a suggestion sent by the Bandwidth user&#39;s client after receiving an RBM message.</value>
3333
[JsonConverter(typeof(StringEnumConverter))]
3434
public enum InboundCallbackTypeEnum
3535
{
@@ -40,10 +40,10 @@ public enum InboundCallbackTypeEnum
4040
MessageReceived = 1,
4141

4242
/// <summary>
43-
/// Enum RequestLocationResponse for value: request-location-response
43+
/// Enum RequestedLocationResponse for value: requested-location-response
4444
/// </summary>
45-
[EnumMember(Value = "request-location-response")]
46-
RequestLocationResponse = 2,
45+
[EnumMember(Value = "requested-location-response")]
46+
RequestedLocationResponse = 2,
4747

4848
/// <summary>
4949
/// Enum SuggestionResponse for value: suggestion-response

src/Bandwidth.Standard/Model/RbmActionBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ protected RbmActionBase() { }
7878
/// Base64 payload the customer receives when the reply is clicked.
7979
/// </summary>
8080
/// <value>Base64 payload the customer receives when the reply is clicked.</value>
81-
/// <example>[B@3c205259</example>
81+
/// <example>[B@2b76ecd5</example>
8282
[DataMember(Name = "postbackData", IsRequired = true, EmitDefaultValue = true)]
8383
public byte[] PostbackData { get; set; }
8484

src/Bandwidth.Standard/Model/RbmSuggestionResponse.cs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,12 @@ public partial class RbmSuggestionResponse : IValidatableObject
3737
/// </summary>
3838
/// <param name="text">The text associated with the suggestion response..</param>
3939
/// <param name="postbackData">Base64 payload the customer receives when the reply is clicked..</param>
40-
public RbmSuggestionResponse(string text = default(string), byte[] postbackData = default(byte[]))
40+
/// <param name="pairedMessageId">Corresponding parent message ID (MT)..</param>
41+
public RbmSuggestionResponse(string text = default(string), byte[] postbackData = default(byte[]), string pairedMessageId = default(string))
4142
{
4243
this.Text = text;
4344
this.PostbackData = postbackData;
45+
this.PairedMessageId = pairedMessageId;
4446
}
4547

4648
/// <summary>
@@ -55,10 +57,18 @@ public partial class RbmSuggestionResponse : IValidatableObject
5557
/// Base64 payload the customer receives when the reply is clicked.
5658
/// </summary>
5759
/// <value>Base64 payload the customer receives when the reply is clicked.</value>
58-
/// <example>[B@3c205259</example>
60+
/// <example>[B@2b76ecd5</example>
5961
[DataMember(Name = "postbackData", EmitDefaultValue = false)]
6062
public byte[] PostbackData { get; set; }
6163

64+
/// <summary>
65+
/// Corresponding parent message ID (MT).
66+
/// </summary>
67+
/// <value>Corresponding parent message ID (MT).</value>
68+
/// <example>1752697342534u24xerqdukke523x</example>
69+
[DataMember(Name = "pairedMessageId", EmitDefaultValue = true)]
70+
public string PairedMessageId { get; set; }
71+
6272
/// <summary>
6373
/// Returns the string presentation of the object
6474
/// </summary>
@@ -69,6 +79,7 @@ public override string ToString()
6979
sb.Append("class RbmSuggestionResponse {\n");
7080
sb.Append(" Text: ").Append(Text).Append("\n");
7181
sb.Append(" PostbackData: ").Append(PostbackData).Append("\n");
82+
sb.Append(" PairedMessageId: ").Append(PairedMessageId).Append("\n");
7283
sb.Append("}\n");
7384
return sb.ToString();
7485
}

0 commit comments

Comments
 (0)