Skip to content

Commit 7fa68d5

Browse files
band-swi-release-engineering[bot]DX-Bandwidthckoegel
authored
SWI-7819 Update SDK Based on Recent Spec Changes (#151)
* Generate SDK with OpenAPI Generator Version * model test * comma --------- Co-authored-by: DX-Bandwidth <dx@bandwidth.com> Co-authored-by: ckoegel <ckoegel1006@gmail.com>
1 parent 09786c3 commit 7fa68d5

File tree

8 files changed

+48
-26
lines changed

8 files changed

+48
-26
lines changed

Bandwidth.Standard.sln

Lines changed: 6 additions & 6 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", "{8E522D01-703C-44A8-986A-A56745917B15}"
5+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard", "src\Bandwidth.Standard\Bandwidth.Standard.csproj", "{EC42C0CC-D6A6-4803-AEDA-6D58A46507A9}"
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-
{8E522D01-703C-44A8-986A-A56745917B15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16-
{8E522D01-703C-44A8-986A-A56745917B15}.Debug|Any CPU.Build.0 = Debug|Any CPU
17-
{8E522D01-703C-44A8-986A-A56745917B15}.Release|Any CPU.ActiveCfg = Release|Any CPU
18-
{8E522D01-703C-44A8-986A-A56745917B15}.Release|Any CPU.Build.0 = Release|Any CPU
15+
{EC42C0CC-D6A6-4803-AEDA-6D58A46507A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16+
{EC42C0CC-D6A6-4803-AEDA-6D58A46507A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
17+
{EC42C0CC-D6A6-4803-AEDA-6D58A46507A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
18+
{EC42C0CC-D6A6-4803-AEDA-6D58A46507A9}.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
@@ -24,4 +24,4 @@ Global
2424
GlobalSection(SolutionProperties) = preSolution
2525
HideSolutionNode = FALSE
2626
EndGlobalSection
27-
EndGlobal
27+
EndGlobal

api/openapi.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8336,6 +8336,13 @@ components:
83368336
example: 4405
83378337
nullable: true
83388338
type: integer
8339+
carrierName:
8340+
description: "The name of the Authorized Message Provider (AMP) that handled\
8341+
\ this message. In the US, this is the carrier that the message was sent\
8342+
\ to."
8343+
example: AT&T
8344+
nullable: true
8345+
type: string
83398346
required:
83408347
- description
83418348
- message
@@ -13053,8 +13060,6 @@ components:
1305313060
- VERIFIED
1305413061
- UNVERIFIED
1305513062
- PENDING
13056-
- PARTIALLY_VERIFIED
13057-
- INVALID_STATUS
1305813063
example: VERIFIED
1305913064
type: string
1306013065
sharedSecretKey:

bandwidth.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2494,6 +2494,14 @@ components:
24942494
description: Optional error code, applicable only when type is `message-failed`.
24952495
nullable: true
24962496
example: 4405
2497+
carrierName:
2498+
type: string
2499+
description: >-
2500+
The name of the Authorized Message Provider (AMP) that handled this
2501+
message. In the US, this is the carrier that the message was sent
2502+
to.
2503+
nullable: true
2504+
example: AT&T
24972505
required:
24982506
- time
24992507
- type
@@ -5849,8 +5857,6 @@ components:
58495857
- VERIFIED
58505858
- UNVERIFIED
58515859
- PENDING
5852-
- PARTIALLY_VERIFIED
5853-
- INVALID_STATUS
58545860
example: VERIFIED
58555861
sharedSecretKey:
58565862
description: >-

docs/MessageCallback.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Name | Type | Description | Notes
1111
**Description** | **string** | A detailed description of the event described by the callback. |
1212
**Message** | [**MessageCallbackMessage**](MessageCallbackMessage.md) | |
1313
**ErrorCode** | **int?** | Optional error code, applicable only when type is &#x60;message-failed&#x60;. | [optional]
14+
**CarrierName** | **string** | The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. | [optional]
1415

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

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ public MessageCallbackTests()
5757
to: "+19195551234",
5858
description: "test",
5959
message: message,
60-
errorCode: 123
60+
errorCode: 123,
61+
carrierName: "test"
6162
);
6263
}
6364

@@ -134,5 +135,15 @@ public void ErrorCodeTest()
134135
Assert.IsType<int>(instance.ErrorCode);
135136
Assert.Equal(123, instance.ErrorCode);
136137
}
138+
139+
/// <summary>
140+
/// Test the property 'CarrierName'
141+
/// </summary>
142+
[Fact]
143+
public void CarrierNameTest()
144+
{
145+
Assert.IsType<string>(instance.CarrierName);
146+
Assert.Equal("test", instance.CarrierName);
147+
}
137148
}
138149
}

src/Bandwidth.Standard/Model/MessageCallback.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ protected MessageCallback() { }
5252
/// <param name="description">A detailed description of the event described by the callback. (required).</param>
5353
/// <param name="message">message (required).</param>
5454
/// <param name="errorCode">Optional error code, applicable only when type is &#x60;message-failed&#x60;..</param>
55-
public MessageCallback(DateTime time = default(DateTime), CallbackTypeEnum type = default(CallbackTypeEnum), string to = default(string), string description = default(string), MessageCallbackMessage message = default(MessageCallbackMessage), int? errorCode = default(int?))
55+
/// <param name="carrierName">The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to..</param>
56+
public MessageCallback(DateTime time = default(DateTime), CallbackTypeEnum type = default(CallbackTypeEnum), string to = default(string), string description = default(string), MessageCallbackMessage message = default(MessageCallbackMessage), int? errorCode = default(int?), string carrierName = default(string))
5657
{
5758
this.Time = time;
5859
this.Type = type;
@@ -75,6 +76,7 @@ protected MessageCallback() { }
7576
}
7677
this.Message = message;
7778
this.ErrorCode = errorCode;
79+
this.CarrierName = carrierName;
7880
}
7981

8082
/// <summary>
@@ -113,6 +115,14 @@ protected MessageCallback() { }
113115
[DataMember(Name = "errorCode", EmitDefaultValue = true)]
114116
public int? ErrorCode { get; set; }
115117

118+
/// <summary>
119+
/// The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to.
120+
/// </summary>
121+
/// <value>The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to.</value>
122+
/// <example>AT&amp;T</example>
123+
[DataMember(Name = "carrierName", EmitDefaultValue = true)]
124+
public string CarrierName { get; set; }
125+
116126
/// <summary>
117127
/// Returns the string presentation of the object
118128
/// </summary>
@@ -127,6 +137,7 @@ public override string ToString()
127137
sb.Append(" Description: ").Append(Description).Append("\n");
128138
sb.Append(" Message: ").Append(Message).Append("\n");
129139
sb.Append(" ErrorCode: ").Append(ErrorCode).Append("\n");
140+
sb.Append(" CarrierName: ").Append(CarrierName).Append("\n");
130141
sb.Append("}\n");
131142
return sb.ToString();
132143
}

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@4544ab46</example>
81+
/// <example>[B@6159fb3c</example>
8282
[DataMember(Name = "postBackData", IsRequired = true, EmitDefaultValue = true)]
8383
public byte[] PostBackData { get; set; }
8484

src/Bandwidth.Standard/Model/TfvStatusEnum.cs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,7 @@ public enum TfvStatusEnum
4848
/// Enum PENDING for value: PENDING
4949
/// </summary>
5050
[EnumMember(Value = "PENDING")]
51-
PENDING = 3,
52-
53-
/// <summary>
54-
/// Enum PARTIALLYVERIFIED for value: PARTIALLY_VERIFIED
55-
/// </summary>
56-
[EnumMember(Value = "PARTIALLY_VERIFIED")]
57-
PARTIALLYVERIFIED = 4,
58-
59-
/// <summary>
60-
/// Enum INVALIDSTATUS for value: INVALID_STATUS
61-
/// </summary>
62-
[EnumMember(Value = "INVALID_STATUS")]
63-
INVALIDSTATUS = 5
51+
PENDING = 3
6452
}
6553

6654
}

0 commit comments

Comments
 (0)