diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES
index af0f5e0..290a216 100644
--- a/.openapi-generator/FILES
+++ b/.openapi-generator/FILES
@@ -16,6 +16,7 @@ docs/CallTranscriptionMetadata.md
docs/CallTranscriptionResponse.md
docs/CallTranscriptionTrackEnum.md
docs/CallbackMethodEnum.md
+docs/CallbackTypeEnum.md
docs/CallsApi.md
docs/CodeRequest.md
docs/Conference.md
@@ -40,8 +41,6 @@ docs/DtmfCallback.md
docs/FieldError.md
docs/FileFormatEnum.md
docs/GatherCallback.md
-docs/InboundMessageCallback.md
-docs/InboundMessageCallbackMessage.md
docs/InitiateCallback.md
docs/ListMessageDirectionEnum.md
docs/ListMessageItem.md
@@ -57,14 +56,10 @@ docs/MachineDetectionResult.md
docs/Media.md
docs/MediaApi.md
docs/Message.md
-docs/MessageDeliveredCallback.md
-docs/MessageDeliveredCallbackMessage.md
+docs/MessageCallback.md
+docs/MessageCallbackMessage.md
docs/MessageDirectionEnum.md
-docs/MessageFailedCallback.md
-docs/MessageFailedCallbackMessage.md
docs/MessageRequest.md
-docs/MessageSendingCallback.md
-docs/MessageSendingCallbackMessage.md
docs/MessageStatusEnum.md
docs/MessageTypeEnum.md
docs/MessagesApi.md
@@ -145,6 +140,7 @@ src/Bandwidth.Standard/Model/CallTranscriptionMetadata.cs
src/Bandwidth.Standard/Model/CallTranscriptionResponse.cs
src/Bandwidth.Standard/Model/CallTranscriptionTrackEnum.cs
src/Bandwidth.Standard/Model/CallbackMethodEnum.cs
+src/Bandwidth.Standard/Model/CallbackTypeEnum.cs
src/Bandwidth.Standard/Model/CodeRequest.cs
src/Bandwidth.Standard/Model/Conference.cs
src/Bandwidth.Standard/Model/ConferenceCompletedCallback.cs
@@ -167,8 +163,6 @@ src/Bandwidth.Standard/Model/DtmfCallback.cs
src/Bandwidth.Standard/Model/FieldError.cs
src/Bandwidth.Standard/Model/FileFormatEnum.cs
src/Bandwidth.Standard/Model/GatherCallback.cs
-src/Bandwidth.Standard/Model/InboundMessageCallback.cs
-src/Bandwidth.Standard/Model/InboundMessageCallbackMessage.cs
src/Bandwidth.Standard/Model/InitiateCallback.cs
src/Bandwidth.Standard/Model/ListMessageDirectionEnum.cs
src/Bandwidth.Standard/Model/ListMessageItem.cs
@@ -182,14 +176,10 @@ src/Bandwidth.Standard/Model/MachineDetectionModeEnum.cs
src/Bandwidth.Standard/Model/MachineDetectionResult.cs
src/Bandwidth.Standard/Model/Media.cs
src/Bandwidth.Standard/Model/Message.cs
-src/Bandwidth.Standard/Model/MessageDeliveredCallback.cs
-src/Bandwidth.Standard/Model/MessageDeliveredCallbackMessage.cs
+src/Bandwidth.Standard/Model/MessageCallback.cs
+src/Bandwidth.Standard/Model/MessageCallbackMessage.cs
src/Bandwidth.Standard/Model/MessageDirectionEnum.cs
-src/Bandwidth.Standard/Model/MessageFailedCallback.cs
-src/Bandwidth.Standard/Model/MessageFailedCallbackMessage.cs
src/Bandwidth.Standard/Model/MessageRequest.cs
-src/Bandwidth.Standard/Model/MessageSendingCallback.cs
-src/Bandwidth.Standard/Model/MessageSendingCallbackMessage.cs
src/Bandwidth.Standard/Model/MessageStatusEnum.cs
src/Bandwidth.Standard/Model/MessageTypeEnum.cs
src/Bandwidth.Standard/Model/MessagesList.cs
diff --git a/Bandwidth.Standard.sln b/Bandwidth.Standard.sln
index bc3bd38..6be4470 100644
--- a/Bandwidth.Standard.sln
+++ b/Bandwidth.Standard.sln
@@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard", "src\Bandwidth.Standard\Bandwidth.Standard.csproj", "{863FB99D-31AD-4D25-99D4-D2084AFCE5E1}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard", "src\Bandwidth.Standard\Bandwidth.Standard.csproj", "{696BABC6-8949-4785-B6CC-B337EE7A1998}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard.Test", "src\Bandwidth.Standard.Test\Bandwidth.Standard.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
EndProject
@@ -12,10 +12,10 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {863FB99D-31AD-4D25-99D4-D2084AFCE5E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {863FB99D-31AD-4D25-99D4-D2084AFCE5E1}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {863FB99D-31AD-4D25-99D4-D2084AFCE5E1}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {863FB99D-31AD-4D25-99D4-D2084AFCE5E1}.Release|Any CPU.Build.0 = Release|Any CPU
+ {696BABC6-8949-4785-B6CC-B337EE7A1998}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {696BABC6-8949-4785-B6CC-B337EE7A1998}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {696BABC6-8949-4785-B6CC-B337EE7A1998}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {696BABC6-8949-4785-B6CC-B337EE7A1998}.Release|Any CPU.Build.0 = Release|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU
diff --git a/README.md b/README.md
index 50d833a..c45326d 100644
--- a/README.md
+++ b/README.md
@@ -19,9 +19,9 @@ This C# SDK is automatically generated by the [OpenAPI Generator](https://openap
## Dependencies
-- [RestSharp](https://www.nuget.org/packages/RestSharp) - 112.1.0 or later
+- [RestSharp](https://www.nuget.org/packages/RestSharp) - 106.13.0 or later
- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 13.0.2 or later
-- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 2.0.1 or later
+- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.8.0 or later
- [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 5.0.0 or later
The DLLs included in the package may not be the latest version. We recommend using [NuGet](https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages:
@@ -166,6 +166,7 @@ Class | Method | HTTP request | Description
- [Model.CallTranscriptionResponse](docs/CallTranscriptionResponse.md)
- [Model.CallTranscriptionTrackEnum](docs/CallTranscriptionTrackEnum.md)
- [Model.CallbackMethodEnum](docs/CallbackMethodEnum.md)
+ - [Model.CallbackTypeEnum](docs/CallbackTypeEnum.md)
- [Model.CodeRequest](docs/CodeRequest.md)
- [Model.Conference](docs/Conference.md)
- [Model.ConferenceCompletedCallback](docs/ConferenceCompletedCallback.md)
@@ -188,8 +189,6 @@ Class | Method | HTTP request | Description
- [Model.FieldError](docs/FieldError.md)
- [Model.FileFormatEnum](docs/FileFormatEnum.md)
- [Model.GatherCallback](docs/GatherCallback.md)
- - [Model.InboundMessageCallback](docs/InboundMessageCallback.md)
- - [Model.InboundMessageCallbackMessage](docs/InboundMessageCallbackMessage.md)
- [Model.InitiateCallback](docs/InitiateCallback.md)
- [Model.ListMessageDirectionEnum](docs/ListMessageDirectionEnum.md)
- [Model.ListMessageItem](docs/ListMessageItem.md)
@@ -203,14 +202,10 @@ Class | Method | HTTP request | Description
- [Model.MachineDetectionResult](docs/MachineDetectionResult.md)
- [Model.Media](docs/Media.md)
- [Model.Message](docs/Message.md)
- - [Model.MessageDeliveredCallback](docs/MessageDeliveredCallback.md)
- - [Model.MessageDeliveredCallbackMessage](docs/MessageDeliveredCallbackMessage.md)
+ - [Model.MessageCallback](docs/MessageCallback.md)
+ - [Model.MessageCallbackMessage](docs/MessageCallbackMessage.md)
- [Model.MessageDirectionEnum](docs/MessageDirectionEnum.md)
- - [Model.MessageFailedCallback](docs/MessageFailedCallback.md)
- - [Model.MessageFailedCallbackMessage](docs/MessageFailedCallbackMessage.md)
- [Model.MessageRequest](docs/MessageRequest.md)
- - [Model.MessageSendingCallback](docs/MessageSendingCallback.md)
- - [Model.MessageSendingCallbackMessage](docs/MessageSendingCallbackMessage.md)
- [Model.MessageStatusEnum](docs/MessageStatusEnum.md)
- [Model.MessageTypeEnum](docs/MessageTypeEnum.md)
- [Model.MessagesList](docs/MessagesList.md)
@@ -256,3 +251,4 @@ Authentication schemes defined for the API:
### Basic
- **Type**: HTTP basic authentication
+
diff --git a/api/openapi.yaml b/api/openapi.yaml
index edd193f..4738cd0 100644
--- a/api/openapi.yaml
+++ b/api/openapi.yaml
@@ -605,8 +605,6 @@ paths:
- Messages
post:
callbacks:
- inboundCallback:
- $ref: '#/components/callbacks/inboundCallback'
statusCallback:
$ref: '#/components/callbacks/statusCallback'
description: Endpoint for sending text messages and picture messages using V2
@@ -4549,9 +4547,16 @@ components:
requestBody:
content:
application/json:
+ examples:
+ smsMessageReceivedCallback:
+ $ref: '#/components/examples/smsMessageReceivedCallbackExample'
+ mmsMessageReceivedCallback:
+ $ref: '#/components/examples/mmsMessageReceivedCallbackExample'
schema:
- $ref: '#/components/schemas/inboundMessageCallback'
- description: Inbound Message Callback Payload
+ $ref: '#/components/schemas/messageCallback'
+ description: |
+
This Inbound Message Webhook is an envelope containing a received (MO) message to your message-enabled Bandwidth telephone number. The payload type will always indicate "message-received".
+
Please visit Webhooks
required: true
responses:
"200":
@@ -4562,18 +4567,166 @@ components:
requestBody:
content:
application/json:
+ examples:
+ messageSendingCallback:
+ $ref: '#/components/examples/messageSendingCallbackExample'
+ smsMessageDeliveredCallback:
+ $ref: '#/components/examples/smsMessageDeliveredCallbackExample'
+ mmsMessageDeliveredCallback:
+ $ref: '#/components/examples/mmsMessageDeliveredCallbackExample'
+ groupMmsMessageDeliveredCallback:
+ $ref: '#/components/examples/groupMmsMessageDeliveredCallbackExample'
+ messageFailedCallback:
+ $ref: '#/components/examples/messageFailedCallbackExample'
schema:
- oneOf:
- - $ref: '#/components/schemas/messageSendingCallback'
- - $ref: '#/components/schemas/messageDeliveredCallback'
- - $ref: '#/components/schemas/messageFailedCallback'
- type: object
- description: Status Callback Payload
+ $ref: '#/components/schemas/messageCallback'
+ description: |
+ This Outbound Message Webhook is an envelope containing status information regarding a message sent (MT) from your message-enabled Bandwidth telephone number. The payload type will be one of "message-sending", "message-delivered", or "message-failed".
+
Please visit Webhooks
required: true
responses:
"200":
description: OK
examples:
+ smsMessageReceivedCallbackExample:
+ summary: An example of a sms message-received callback body.
+ value:
+ time: 2025-01-06T15:43:35.502180Z
+ type: message-received
+ to: "+12345678902"
+ description: Incoming message received
+ message:
+ id: 14762070468292kw2fuqty55yp2b2
+ owner: "+12345678902"
+ applicationId: 93de2206-9669-4e07-948d-329f4b722ee2
+ time: 2025-01-06T15:43:34.000000Z
+ segmentCount: 1
+ direction: in
+ to:
+ - "+12345678902"
+ from: "+12345678901"
+ text: "Hey, check out this SMS!"
+ mmsMessageReceivedCallbackExample:
+ summary: An example of a mms message-received callback body.
+ value:
+ time: 2024-09-14T18:20:45.160744Z
+ type: message-received
+ to: "+12345678902"
+ description: Incoming message received
+ message:
+ id: 14762070468292kw2fuqty55yp2b2
+ owner: "+12345678902"
+ applicationId: 93de2206-9669-4e07-948d-329f4b722ee2
+ time: 2024-09-14T18:20:45.160744Z
+ segmentCount: 1
+ direction: in
+ to:
+ - "+12345678902"
+ - "+12345678903"
+ from: "+12345678901"
+ text: "Hey, check out the MMS!"
+ media:
+ - https://messaging.bandwidth.com/api/v2/users/9900902/media/14762070468292kw2fuqty55yp2b2/0/bw.png
+ messageSendingCallbackExample:
+ summary: An example of a message-sending callback body.
+ value:
+ time: 2024-06-25T18:42:36.979456Z
+ type: message-sending
+ to: "+15554443333"
+ description: Message is sending to carrier.
+ message:
+ id: 1593110555875xo7watq5px6rbe5d
+ owner: "+15552221111"
+ applicationId: cfd4fb83-7531-4acc-b471-42d0bb76a65c
+ time: 2024-06-25T18:42:35.876906Z
+ segmentCount: 1
+ direction: out
+ to:
+ - "+15554443333"
+ from: "+15552221111"
+ text: ""
+ media:
+ - https://dev.bandwidth.com/images/bandwidth-logo.png
+ tag: your tag here
+ smsMessageDeliveredCallbackExample:
+ summary: An example of a sms message-delivered callback body.
+ value:
+ type: message-delivered
+ time: 2024-09-14T18:20:11.160744Z
+ description: Message delivered to carrier.
+ to: "+12345678902"
+ message:
+ id: 14762070468292kw2fuqty55yp2b2
+ time: 2024-09-14T18:20:11.160744Z
+ to:
+ - "+12345678902"
+ from: "+12345678901"
+ text: ""
+ applicationId: 93de2206-9669-4e07-948d-329f4b722ee2
+ owner: "+12345678902"
+ direction: out
+ segmentCount: 1
+ mmsMessageDeliveredCallbackExample:
+ summary: An example of a mms message-delivered callback body.
+ value:
+ type: message-delivered
+ time: 2024-09-14T18:20:24.160544Z
+ description: Message delivered to carrier.
+ to: "+12345678902"
+ message:
+ id: 14762070468292kw2fuqty55yp2b2
+ time: 2024-09-14T18:20:24.160544Z
+ to:
+ - "+12345678902"
+ from: "+12345678901"
+ text: ""
+ applicationId: 93de2206-9669-4e07-948d-329f4b722ee2
+ owner: "+12345678902"
+ direction: out
+ segmentCount: 1
+ media:
+ - https://dev.bandwidth.com/images/bandwidth-logo.png
+ groupMmsMessageDeliveredCallbackExample:
+ summary: An example of a group mms message-delivered callback body.
+ value:
+ type: message-delivered
+ time: 2024-09-14T18:20:17.160544Z
+ description: Message delivered to carrier.
+ to: "+12345678902"
+ message:
+ id: 14762070468292kw2fuqty55yp2b2
+ time: 2024-09-14T18:20:17.160544Z
+ to:
+ - "+12345678902"
+ - "+12345678903"
+ from: "+12345678901"
+ text: ""
+ applicationId: 93de2206-9669-4e07-948d-329f4b722ee2
+ owner: "+12345678902"
+ direction: out
+ segmentCount: 1
+ messageFailedCallbackExample:
+ summary: An example of a message-failed callback body.
+ value:
+ type: message-failed
+ time: 2024-12-18T16:51:27.704450Z
+ description: forbidden to country
+ to: "+52345678903"
+ errorCode: 4432
+ message:
+ id: 14762070468292kw2fuqty55yp2b2
+ time: 2024-12-18T16:51:27.704450Z
+ to:
+ - "+12345678902"
+ - "+52345678903"
+ from: "+12345678901"
+ text: ""
+ applicationId: 93de2206-9669-4e07-948d-329f4b722ee2
+ media:
+ - https://dev.bandwidth.com/images/bandwidth-logo.png
+ owner: "+12345678901"
+ direction: out
+ segmentCount: 1
createCallResponseExample:
summary: Example of a createCall Response
value:
@@ -5263,6 +5416,14 @@ components:
schema:
format: binary
type: string
+ image/heic:
+ schema:
+ format: binary
+ type: string
+ image/heif:
+ schema:
+ format: binary
+ type: string
image/jpeg:
schema:
format: binary
@@ -5303,6 +5464,10 @@ components:
schema:
format: binary
type: string
+ text/html:
+ schema:
+ format: binary
+ type: string
text/plain:
schema:
format: binary
@@ -5351,6 +5516,10 @@ components:
schema:
format: binary
type: string
+ video/x-flv:
+ schema:
+ format: binary
+ type: string
required: true
createCallRequest:
content:
@@ -5903,6 +6072,18 @@ components:
$ref: '#/components/schemas/tnLookupRequestError'
description: Internal Server Error
schemas:
+ callbackTypeEnum:
+ description: |
+ Indicates the type of the callback:
+ - `message-received` for inbound callbacks.
+ - One of `message-sending`, `message-delivered`, `message-failed` for status callbacks.
+ enum:
+ - message-received
+ - message-sending
+ - message-delivered
+ - message-failed
+ example: message-delivered
+ type: string
priorityEnum:
description: |-
The priority specified by the user.
@@ -6215,7 +6396,7 @@ components:
from: "+15553332222"
expiration: 2021-02-01T11:29:18-05:00
id: 1589228074636lm4k2je7j7jklbn2
- time: 2022-09-14T18:20:16Z
+ time: 2024-12-02T20:15:57.278Z
to:
- "+15552223333"
text: Hello world
@@ -6237,7 +6418,7 @@ components:
type: string
time:
description: The datetime stamp of the message in ISO 8601
- example: 2022-09-14T18:20:16Z
+ example: 2024-12-02T20:15:57.278Z
format: date-time
type: string
segmentCount:
@@ -6351,288 +6532,38 @@ components:
- to
title: MessageRequest
type: object
- inboundMessageCallback:
- description: Inbound Message Callback
+ messageCallback:
+ description: Message Callback Schema
properties:
time:
- example: 2016-09-14T18:20:16Z
+ example: 2024-12-02T20:15:57.278Z
format: date-time
type: string
type:
- example: message-received
- type: string
- to:
- example: "+15552223333"
- type: string
- description:
- example: Incoming message received
- type: string
- message:
- $ref: '#/components/schemas/inboundMessageCallbackMessage'
- required:
- - description
- - message
- - time
- - to
- - type
- type: object
- inboundMessageCallbackMessage:
- description: Inbound Message Callback Message Schema
- properties:
- id:
- example: 1661365814859loidf7mcwd4qacn7
- type: string
- owner:
- example: "+15553332222"
- type: string
- applicationId:
- example: 93de2206-9669-4e07-948d-329f4b722ee2
- type: string
- time:
- example: 2016-09-14T18:20:16Z
- format: date-time
- type: string
- segmentCount:
- example: 1
- type: integer
- direction:
- $ref: '#/components/schemas/messageDirectionEnum'
- to:
- example:
- - "+15552223333"
- items:
- type: string
- type: array
- uniqueItems: true
- from:
- example: "+15553332222"
- type: string
- text:
- example: Hello world
- type: string
- tag:
- example: custom string
- type: string
- media:
- example:
- - https://dev.bandwidth.com/images/bandwidth-logo.png
- - https://dev.bandwidth.com/images/github_logo.png
- items:
- format: uri
- type: string
- type: array
- priority:
- $ref: '#/components/schemas/priorityEnum'
- required:
- - applicationId
- - direction
- - from
- - id
- - owner
- - segmentCount
- - text
- - time
- - to
- type: object
- messageSendingCallback:
- description: Message Sending Callback
- properties:
- time:
- example: 2016-09-14T18:20:16Z
- format: date-time
- type: string
- type:
- example: message-sending
- type: string
- to:
- example: "+15552223333"
- type: string
- description:
- example: Message is sending to carrier
- type: string
- message:
- $ref: '#/components/schemas/messageSendingCallbackMessage'
- required:
- - description
- - message
- - time
- - to
- - type
- type: object
- messageSendingCallbackMessage:
- description: Message Sending Callback Message Schema
- properties:
- id:
- example: 1661365814859loidf7mcwd4qacn7
- type: string
- owner:
- example: "+15553332222"
- type: string
- applicationId:
- example: 93de2206-9669-4e07-948d-329f4b722ee2
- type: string
- time:
- example: 2016-09-14T18:20:16Z
- format: date-time
- type: string
- segmentCount:
- example: 1
- type: integer
- direction:
- $ref: '#/components/schemas/messageDirectionEnum'
- to:
- example:
- - "+15552223333"
- items:
- type: string
- type: array
- uniqueItems: true
- from:
- example: "+15553332222"
- type: string
- text:
- example: Hello world
- type: string
- tag:
- example: custom string
- type: string
- media:
- example:
- - https://dev.bandwidth.com/images/bandwidth-logo.png
- - https://dev.bandwidth.com/images/github_logo.png
- items:
- format: uri
- type: string
- type: array
- priority:
- $ref: '#/components/schemas/priorityEnum'
- required:
- - applicationId
- - direction
- - from
- - id
- - media
- - owner
- - segmentCount
- - text
- - time
- - to
- type: object
- messageDeliveredCallback:
- description: Message Delivered Callback
- properties:
- time:
- example: 2016-09-14T18:20:16Z
- format: date-time
- type: string
- type:
- example: message-delivered
- type: string
- to:
- example: "+15552223333"
- type: string
- description:
- example: Message delivered to carrier.
- type: string
- message:
- $ref: '#/components/schemas/messageDeliveredCallbackMessage'
- required:
- - description
- - message
- - time
- - to
- - type
- type: object
- messageDeliveredCallbackMessage:
- description: Message Delivered Callback Message Schema
- properties:
- id:
- example: 1661365814859loidf7mcwd4qacn7
- type: string
- owner:
- example: "+15553332222"
- type: string
- applicationId:
- example: 93de2206-9669-4e07-948d-329f4b722ee2
- type: string
- time:
- example: 2016-09-14T18:20:16Z
- format: date-time
- type: string
- segmentCount:
- example: 1
- type: integer
- direction:
- $ref: '#/components/schemas/messageDirectionEnum'
- to:
- example:
- - "+15552223333"
- items:
- type: string
- type: array
- uniqueItems: true
- from:
- example: "+15553332222"
- type: string
- text:
- example: Hello world
- type: string
- tag:
- example: custom string
- type: string
- media:
- example:
- - https://dev.bandwidth.com/images/bandwidth-logo.png
- - https://dev.bandwidth.com/images/github_logo.png
- items:
- format: uri
- type: string
- type: array
- priority:
- $ref: '#/components/schemas/priorityEnum'
- required:
- - applicationId
- - direction
- - from
- - id
- - owner
- - segmentCount
- - tag
- - text
- - time
- - to
- type: object
- messageFailedCallback:
- description: Message Failed Callback
- properties:
- time:
- example: 2016-09-14T18:20:16Z
- format: date-time
- type: string
- type:
- example: message-failed
- type: string
+ $ref: '#/components/schemas/callbackTypeEnum'
to:
example: "+15552223333"
type: string
description:
+ description: A detailed description of the event described by the callback.
example: rejected-unallocated-from-number
type: string
message:
- $ref: '#/components/schemas/messageFailedCallbackMessage'
+ $ref: '#/components/schemas/messageCallbackMessage'
errorCode:
- example: 9902
+ description: "Optional error code, applicable only when type is `message-failed`."
+ example: 4405
+ nullable: true
type: integer
required:
- description
- - errorCode
- message
- time
- to
- type
type: object
- messageFailedCallbackMessage:
- description: Message Failed Callback Message Schema
+ messageCallbackMessage:
+ description: Message payload schema within a MessageCallback
properties:
id:
example: 1661365814859loidf7mcwd4qacn7
@@ -6644,7 +6575,7 @@ components:
example: 93de2206-9669-4e07-948d-329f4b722ee2
type: string
time:
- example: 2016-09-14T18:20:16Z
+ example: 2024-12-02T20:15:57.666Z
format: date-time
type: string
segmentCount:
@@ -6669,12 +6600,14 @@ components:
example: custom string
type: string
media:
+ description: "Optional media, applicable only for mms"
example:
- https://dev.bandwidth.com/images/bandwidth-logo.png
- https://dev.bandwidth.com/images/github_logo.png
items:
format: uri
type: string
+ nullable: true
type: array
priority:
$ref: '#/components/schemas/priorityEnum'
@@ -6685,7 +6618,6 @@ components:
- id
- owner
- segmentCount
- - tag
- text
- time
- to
diff --git a/bandwidth.yml b/bandwidth.yml
index 11c79d2..87921df 100644
--- a/bandwidth.yml
+++ b/bandwidth.yml
@@ -230,8 +230,6 @@ paths:
'500':
$ref: '#/components/responses/messagingInternalServerError'
callbacks:
- inboundCallback:
- $ref: '#/components/callbacks/inboundCallback'
statusCallback:
$ref: '#/components/callbacks/statusCallback'
servers: *ref_0
@@ -1332,6 +1330,21 @@ paths:
servers: *ref_3
components:
schemas:
+ callbackTypeEnum:
+ type: string
+ enum:
+ - message-received
+ - message-sending
+ - message-delivered
+ - message-failed
+ description: >
+ Indicates the type of the callback:
+
+ - `message-received` for inbound callbacks.
+
+ - One of `message-sending`, `message-delivered`, `message-failed` for
+ status callbacks.
+ example: message-delivered
priorityEnum:
type: string
description: |-
@@ -1574,7 +1587,7 @@ components:
type: string
format: date-time
description: The datetime stamp of the message in ISO 8601
- example: 2022-09-14T18:20:16.000Z
+ example: 2024-12-02T20:15:57.278Z
segmentCount:
type: integer
description: >-
@@ -1695,288 +1708,38 @@ components:
Not supported on MMS.
example: '2021-02-01T11:29:18-05:00'
- inboundMessageCallback:
- description: Inbound Message Callback
- type: object
- properties:
- time:
- type: string
- format: date-time
- example: 2016-09-14T18:20:16.000Z
- type:
- type: string
- example: message-received
- to:
- type: string
- example: '+15552223333'
- description:
- type: string
- example: Incoming message received
- message:
- $ref: '#/components/schemas/inboundMessageCallbackMessage'
- required:
- - time
- - type
- - to
- - description
- - message
- inboundMessageCallbackMessage:
- description: Inbound Message Callback Message Schema
- type: object
- properties:
- id:
- type: string
- example: 1661365814859loidf7mcwd4qacn7
- owner:
- type: string
- example: '+15553332222'
- applicationId:
- type: string
- example: 93de2206-9669-4e07-948d-329f4b722ee2
- time:
- type: string
- format: date-time
- example: 2016-09-14T18:20:16.000Z
- segmentCount:
- type: integer
- example: 1
- direction:
- $ref: '#/components/schemas/messageDirectionEnum'
- to:
- uniqueItems: true
- type: array
- items:
- type: string
- example:
- - '+15552223333'
- from:
- type: string
- example: '+15553332222'
- text:
- type: string
- example: Hello world
- tag:
- type: string
- example: custom string
- media:
- type: array
- items:
- type: string
- format: uri
- example:
- - https://dev.bandwidth.com/images/bandwidth-logo.png
- - https://dev.bandwidth.com/images/github_logo.png
- priority:
- $ref: '#/components/schemas/priorityEnum'
- required:
- - id
- - owner
- - applicationId
- - time
- - segmentCount
- - direction
- - to
- - from
- - text
- messageSendingCallback:
- type: object
- description: Message Sending Callback
- properties:
- time:
- type: string
- format: date-time
- example: 2016-09-14T18:20:16.000Z
- type:
- type: string
- example: message-sending
- to:
- type: string
- example: '+15552223333'
- description:
- type: string
- example: Message is sending to carrier
- message:
- $ref: '#/components/schemas/messageSendingCallbackMessage'
- required:
- - time
- - type
- - to
- - description
- - message
- messageSendingCallbackMessage:
- description: Message Sending Callback Message Schema
- type: object
- properties:
- id:
- type: string
- example: 1661365814859loidf7mcwd4qacn7
- owner:
- type: string
- example: '+15553332222'
- applicationId:
- type: string
- example: 93de2206-9669-4e07-948d-329f4b722ee2
- time:
- type: string
- format: date-time
- example: 2016-09-14T18:20:16.000Z
- segmentCount:
- type: integer
- example: 1
- direction:
- $ref: '#/components/schemas/messageDirectionEnum'
- to:
- uniqueItems: true
- type: array
- items:
- type: string
- example:
- - '+15552223333'
- from:
- type: string
- example: '+15553332222'
- text:
- type: string
- example: Hello world
- tag:
- type: string
- example: custom string
- media:
- type: array
- items:
- type: string
- format: uri
- example:
- - https://dev.bandwidth.com/images/bandwidth-logo.png
- - https://dev.bandwidth.com/images/github_logo.png
- priority:
- $ref: '#/components/schemas/priorityEnum'
- required:
- - id
- - owner
- - applicationId
- - time
- - segmentCount
- - direction
- - to
- - from
- - text
- - media
- messageDeliveredCallback:
- description: Message Delivered Callback
- type: object
- properties:
- time:
- type: string
- format: date-time
- example: 2016-09-14T18:20:16.000Z
- type:
- type: string
- example: message-delivered
- to:
- type: string
- example: '+15552223333'
- description:
- type: string
- example: Message delivered to carrier.
- message:
- $ref: '#/components/schemas/messageDeliveredCallbackMessage'
- required:
- - time
- - type
- - to
- - description
- - message
- messageDeliveredCallbackMessage:
- description: Message Delivered Callback Message Schema
- type: object
- properties:
- id:
- type: string
- example: 1661365814859loidf7mcwd4qacn7
- owner:
- type: string
- example: '+15553332222'
- applicationId:
- type: string
- example: 93de2206-9669-4e07-948d-329f4b722ee2
- time:
- type: string
- format: date-time
- example: 2016-09-14T18:20:16.000Z
- segmentCount:
- type: integer
- example: 1
- direction:
- $ref: '#/components/schemas/messageDirectionEnum'
- to:
- uniqueItems: true
- type: array
- items:
- type: string
- example:
- - '+15552223333'
- from:
- type: string
- example: '+15553332222'
- text:
- type: string
- example: Hello world
- tag:
- type: string
- example: custom string
- media:
- type: array
- items:
- type: string
- format: uri
- example:
- - https://dev.bandwidth.com/images/bandwidth-logo.png
- - https://dev.bandwidth.com/images/github_logo.png
- priority:
- $ref: '#/components/schemas/priorityEnum'
- required:
- - id
- - owner
- - applicationId
- - time
- - segmentCount
- - direction
- - to
- - from
- - text
- - tag
- messageFailedCallback:
- description: Message Failed Callback
+ messageCallback:
+ description: Message Callback Schema
type: object
properties:
time:
type: string
format: date-time
- example: 2016-09-14T18:20:16.000Z
+ example: 2024-12-02T20:15:57.278Z
type:
- type: string
- example: message-failed
+ $ref: '#/components/schemas/callbackTypeEnum'
to:
type: string
example: '+15552223333'
description:
type: string
+ description: A detailed description of the event described by the callback.
example: rejected-unallocated-from-number
message:
- $ref: '#/components/schemas/messageFailedCallbackMessage'
+ $ref: '#/components/schemas/messageCallbackMessage'
errorCode:
type: integer
- example: 9902
+ description: Optional error code, applicable only when type is `message-failed`.
+ nullable: true
+ example: 4405
required:
- time
- type
- to
- description
- message
- - errorCode
- messageFailedCallbackMessage:
- description: Message Failed Callback Message Schema
+ messageCallbackMessage:
+ description: Message payload schema within a MessageCallback
type: object
properties:
id:
@@ -1991,7 +1754,7 @@ components:
time:
type: string
format: date-time
- example: 2016-09-14T18:20:16.000Z
+ example: 2024-12-02T20:15:57.666Z
segmentCount:
type: integer
example: 1
@@ -2015,6 +1778,8 @@ components:
example: custom string
media:
type: array
+ description: Optional media, applicable only for mms
+ nullable: true
items:
type: string
format: uri
@@ -2033,7 +1798,6 @@ components:
- to
- from
- text
- - tag
callbackMethodEnum:
type: string
nullable: true
@@ -5463,34 +5227,345 @@ components:
type: string
description: The phone number lookup request ID from Bandwidth.
example: 004223a0-8b17-41b1-bf81-20732adf5590
- requestBodies:
- createMessageRequest:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/messageRequest'
- required: true
- uploadMediaRequest:
- content:
- application/json:
- schema:
- type: string
- format: binary
- application/ogg:
- schema:
- type: string
- format: binary
- application/pdf:
- schema:
- type: string
- format: binary
- application/rtf:
- schema:
- type: string
- format: binary
- application/zip:
- schema:
- type: string
+ examples:
+ smsMessageReceivedCallbackExample:
+ summary: An example of a sms message-received callback body.
+ value:
+ time: '2025-01-06T15:43:35.502180Z'
+ type: message-received
+ to: '+12345678902'
+ description: Incoming message received
+ message:
+ id: 14762070468292kw2fuqty55yp2b2
+ owner: '+12345678902'
+ applicationId: 93de2206-9669-4e07-948d-329f4b722ee2
+ time: '2025-01-06T15:43:34.000000Z'
+ segmentCount: 1
+ direction: in
+ to:
+ - '+12345678902'
+ from: '+12345678901'
+ text: Hey, check out this SMS!
+ mmsMessageReceivedCallbackExample:
+ summary: An example of a mms message-received callback body.
+ value:
+ time: '2024-09-14T18:20:45.160744Z'
+ type: message-received
+ to: '+12345678902'
+ description: Incoming message received
+ message:
+ id: 14762070468292kw2fuqty55yp2b2
+ owner: '+12345678902'
+ applicationId: 93de2206-9669-4e07-948d-329f4b722ee2
+ time: '2024-09-14T18:20:45.160744Z'
+ segmentCount: 1
+ direction: in
+ to:
+ - '+12345678902'
+ - '+12345678903'
+ from: '+12345678901'
+ text: Hey, check out the MMS!
+ media:
+ - >-
+ https://messaging.bandwidth.com/api/v2/users/9900902/media/14762070468292kw2fuqty55yp2b2/0/bw.png
+ messageSendingCallbackExample:
+ summary: An example of a message-sending callback body.
+ value:
+ time: '2024-06-25T18:42:36.979456Z'
+ type: message-sending
+ to: '+15554443333'
+ description: Message is sending to carrier.
+ message:
+ id: 1593110555875xo7watq5px6rbe5d
+ owner: '+15552221111'
+ applicationId: cfd4fb83-7531-4acc-b471-42d0bb76a65c
+ time: '2024-06-25T18:42:35.876906Z'
+ segmentCount: 1
+ direction: out
+ to:
+ - '+15554443333'
+ from: '+15552221111'
+ text: ''
+ media:
+ - https://dev.bandwidth.com/images/bandwidth-logo.png
+ tag: your tag here
+ smsMessageDeliveredCallbackExample:
+ summary: An example of a sms message-delivered callback body.
+ value:
+ type: message-delivered
+ time: '2024-09-14T18:20:11.160744Z'
+ description: Message delivered to carrier.
+ to: '+12345678902'
+ message:
+ id: 14762070468292kw2fuqty55yp2b2
+ time: '2024-09-14T18:20:11.160744Z'
+ to:
+ - '+12345678902'
+ from: '+12345678901'
+ text: ''
+ applicationId: 93de2206-9669-4e07-948d-329f4b722ee2
+ owner: '+12345678902'
+ direction: out
+ segmentCount: 1
+ mmsMessageDeliveredCallbackExample:
+ summary: An example of a mms message-delivered callback body.
+ value:
+ type: message-delivered
+ time: '2024-09-14T18:20:24.160544Z'
+ description: Message delivered to carrier.
+ to: '+12345678902'
+ message:
+ id: 14762070468292kw2fuqty55yp2b2
+ time: '2024-09-14T18:20:24.160544Z'
+ to:
+ - '+12345678902'
+ from: '+12345678901'
+ text: ''
+ applicationId: 93de2206-9669-4e07-948d-329f4b722ee2
+ owner: '+12345678902'
+ direction: out
+ segmentCount: 1
+ media:
+ - https://dev.bandwidth.com/images/bandwidth-logo.png
+ groupMmsMessageDeliveredCallbackExample:
+ summary: An example of a group mms message-delivered callback body.
+ value:
+ type: message-delivered
+ time: '2024-09-14T18:20:17.160544Z'
+ description: Message delivered to carrier.
+ to: '+12345678902'
+ message:
+ id: 14762070468292kw2fuqty55yp2b2
+ time: '2024-09-14T18:20:17.160544Z'
+ to:
+ - '+12345678902'
+ - '+12345678903'
+ from: '+12345678901'
+ text: ''
+ applicationId: 93de2206-9669-4e07-948d-329f4b722ee2
+ owner: '+12345678902'
+ direction: out
+ segmentCount: 1
+ messageFailedCallbackExample:
+ summary: An example of a message-failed callback body.
+ value:
+ type: message-failed
+ time: '2024-12-18T16:51:27.704450Z'
+ description: forbidden to country
+ to: '+52345678903'
+ errorCode: 4432
+ message:
+ id: 14762070468292kw2fuqty55yp2b2
+ time: '2024-12-18T16:51:27.704450Z'
+ to:
+ - '+12345678902'
+ - '+52345678903'
+ from: '+12345678901'
+ text: ''
+ applicationId: 93de2206-9669-4e07-948d-329f4b722ee2
+ media:
+ - https://dev.bandwidth.com/images/bandwidth-logo.png
+ owner: '+12345678901'
+ direction: out
+ segmentCount: 1
+ createCallResponseExample:
+ summary: Example of a createCall Response
+ value:
+ applicationId: 04e88489-df02-4e34-a0ee-27a91849555f
+ accountId: '9900000'
+ callId: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ to: '+19195551234'
+ from: '+19195554312'
+ enqueuedTime: '2022-06-16T13:15:07.160Z'
+ callUrl: >-
+ https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
+ callTimeout: 30
+ callbackTimeout: 15
+ tag: My custom tag value
+ answerMethod: POST
+ answerUrl: https://myServer.example/bandwidth/webhooks/answer
+ answerFallbackMethod: POST
+ answerFallbackUrl: https://myServer.example/bandwidth/webhooks/answerFallback
+ disconnectMethod: POST
+ disconnectUrl: https://myServer.example/bandwidth/webhooks/disconnect
+ username: mySecretUsername
+ password: '*****'
+ fallbackUsername: mySecretUsername
+ fallbackPassword: '*****'
+ priority: 5
+ listConferencesResponseExample:
+ summary: Example of a listConferences Response
+ value:
+ - id: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9
+ name: my-conference-name
+ createdTime: '2022-06-17T22:19:40.375Z'
+ completedTime: '2022-06-17T22:20:00.000Z'
+ conferenceEventUrl: https://myServer.example/bandwidth/webhooks/conferenceEvent
+ conferenceEventMethod: POST
+ tag: my custom tag
+ voiceBadRequestErrorExample:
+ summary: Example of a Bad Request (400) Error
+ value:
+ type: validation
+ description: 'Invalid answerUrl: only http and https are allowed.'
+ voiceUnauthorizedErrorExample:
+ summary: Example of an Unauthorized (401) Error
+ value:
+ type: validation
+ description: 'Invalid answerUrl: only http and https are allowed.'
+ voiceForbiddenErrorExample:
+ summary: Example of a Forbidden (403) Error
+ value:
+ type: validation
+ description: 'Invalid answerUrl: only http and https are allowed.'
+ voiceNotFoundErrorExample:
+ summary: Example of a Not Found (404) Error
+ value:
+ type: validation
+ description: 'Invalid answerUrl: only http and https are allowed.'
+ voiceNotAllowedErrorExample:
+ summary: Example of a Not Allowed (405) Error
+ value:
+ type: validation
+ description: 'Invalid answerUrl: only http and https are allowed.'
+ voiceConflictErrorExample:
+ summary: Example of a Conflict (409) Error
+ value:
+ type: validation
+ description: 'Invalid answerUrl: only http and https are allowed.'
+ voiceUnsupportedMediaTypeErrorExample:
+ summary: Example of an Unsupported Media Type (415) Error
+ value:
+ type: validation
+ description: 'Invalid answerUrl: only http and https are allowed.'
+ voiceTooManyRequestsErrorExample:
+ summary: Example of a Too Many Requests (429) Error
+ value:
+ type: validation
+ description: 'Invalid answerUrl: only http and https are allowed.'
+ voiceInternalServerErrorExample:
+ summary: Example of an Internal Server (500) Error
+ value:
+ type: validation
+ description: 'Invalid answerUrl: only http and https are allowed.'
+ singleNumberRequestExample:
+ summary: Example Number Lookup Request for One Number
+ value:
+ tns:
+ - '+19195551234'
+ multipleNumberRequestExample:
+ summary: Example Number Lookup Request for Multiple Numbers
+ value:
+ tns:
+ - '+19195551234'
+ - '+19195554321'
+ lookupInProgressExample:
+ summary: Example Lookup In Progress Response
+ value:
+ requestId: 004223a0-8b17-41b1-bf81-20732adf5590
+ status: IN_PROGRESS
+ lookupFailedExample:
+ summary: Example Lookup Failed Response
+ value:
+ requestId: 004223a0-8b17-41b1-bf81-20732adf5590
+ status: FAILED
+ failedTelephoneNumbers:
+ - '+191955512345'
+ lookupSingleNumberCompleteExample:
+ summary: Example Single Number Lookup Complete Response
+ value:
+ requestId: 004223a0-8b17-41b1-bf81-20732adf5590
+ status: COMPLETE
+ result:
+ - Response Code: 0
+ Message: NOERROR
+ E.164 Format: '+19195551234'
+ Formatted: (919) 555-1234
+ Country: US
+ Line Type: Mobile
+ Line Provider: Verizon Wireless
+ Mobile Country Code: '310'
+ Mobile Network Code: '010'
+ lookupMultipleNumbersCompleteExample:
+ summary: Example Multiple Numbers Lookup Complete Response
+ value:
+ requestId: 004223a0-8b17-41b1-bf81-20732adf5590
+ status: COMPLETE
+ result:
+ - Response Code: 0
+ Message: NOERROR
+ E.164 Format: '+19195551234'
+ Formatted: (919) 555-1234
+ Country: US
+ Line Type: Mobile
+ Line Provider: Verizon Wireless
+ Mobile Country Code: '310'
+ Mobile Network Code: '010'
+ - Response Code: 0
+ Message: NOERROR
+ E.164 Format: '+19195554321'
+ Formatted: (919) 555-4321
+ Country: US
+ Line Type: Mobile
+ Line Provider: T-Mobile USA
+ Mobile Country Code: '310'
+ Mobile Network Code: '160'
+ lookupMultipleNumbersPartialCompleteExample:
+ summary: Example Multiple Numbers Lookup Partial Complete Response
+ value:
+ requestId: 004223a0-8b17-41b1-bf81-20732adf5590
+ status: PARTIAL_COMPLETE
+ result:
+ - Response Code: 0
+ Message: NOERROR
+ E.164 Format: '+19195551234'
+ Formatted: (919) 555-1234
+ Country: US
+ Line Type: Mobile
+ Line Provider: Verizon Wireless
+ Mobile Country Code: '310'
+ Mobile Network Code: '010'
+ failedTelephoneNumbers:
+ - '+191955512345'
+ lookupSingleNumberCompleteNoInfoExample:
+ summary: Example Single Number Lookup Complete with No Information Response
+ value:
+ requestId: 004223a0-8b17-41b1-bf81-20732adf5590
+ status: COMPLETE
+ result:
+ - Response Code: 3
+ Message: NXDOMAIN
+ E.164 Format: '+19195550000'
+ Formatted: (919) 555-0000
+ Country: US
+ requestBodies:
+ createMessageRequest:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/messageRequest'
+ required: true
+ uploadMediaRequest:
+ content:
+ application/json:
+ schema:
+ type: string
+ format: binary
+ application/ogg:
+ schema:
+ type: string
+ format: binary
+ application/pdf:
+ schema:
+ type: string
+ format: binary
+ application/rtf:
+ schema:
+ type: string
+ format: binary
+ application/zip:
+ schema:
+ type: string
format: binary
application/x-tar:
schema:
@@ -5560,6 +5635,14 @@ components:
schema:
type: string
format: binary
+ image/heic:
+ schema:
+ type: string
+ format: binary
+ image/heif:
+ schema:
+ type: string
+ format: binary
image/jpeg:
schema:
type: string
@@ -5600,6 +5683,10 @@ components:
schema:
type: string
format: binary
+ text/html:
+ schema:
+ type: string
+ format: binary
text/plain:
schema:
type: string
@@ -5648,6 +5735,10 @@ components:
schema:
type: string
format: binary
+ video/x-flv:
+ schema:
+ type: string
+ format: binary
required: true
createCallRequest:
description: JSON object containing information to create an outbound call
@@ -5770,11 +5861,22 @@ components:
post:
requestBody:
required: true
- description: Inbound Message Callback Payload
+ description: >
+ This Inbound Message Webhook is an envelope containing a
+ received (MO) message to your message-enabled Bandwidth telephone
+ number. The payload type will always indicate "message-received".
+
+
Please visit Webhooks
content:
application/json:
schema:
- $ref: '#/components/schemas/inboundMessageCallback'
+ $ref: '#/components/schemas/messageCallback'
+ examples:
+ smsMessageReceivedCallback:
+ $ref: '#/components/examples/smsMessageReceivedCallbackExample'
+ mmsMessageReceivedCallback:
+ $ref: '#/components/examples/mmsMessageReceivedCallbackExample'
responses:
'200':
description: OK
@@ -5783,186 +5885,31 @@ components:
post:
requestBody:
required: true
- description: Status Callback Payload
+ description: >
+ This Outbound Message Webhook is an envelope containing status
+ information regarding a message sent (MT) from your
+ message-enabled Bandwidth telephone number. The payload type will
+ be one of "message-sending", "message-delivered", or
+ "message-failed".
+
+
Please visit Webhooks
content:
application/json:
schema:
- type: object
- oneOf:
- - $ref: '#/components/schemas/messageSendingCallback'
- - $ref: '#/components/schemas/messageDeliveredCallback'
- - $ref: '#/components/schemas/messageFailedCallback'
+ $ref: '#/components/schemas/messageCallback'
+ examples:
+ messageSendingCallback:
+ $ref: '#/components/examples/messageSendingCallbackExample'
+ smsMessageDeliveredCallback:
+ $ref: '#/components/examples/smsMessageDeliveredCallbackExample'
+ mmsMessageDeliveredCallback:
+ $ref: '#/components/examples/mmsMessageDeliveredCallbackExample'
+ groupMmsMessageDeliveredCallback:
+ $ref: >-
+ #/components/examples/groupMmsMessageDeliveredCallbackExample
+ messageFailedCallback:
+ $ref: '#/components/examples/messageFailedCallbackExample'
responses:
'200':
description: OK
- examples:
- createCallResponseExample:
- summary: Example of a createCall Response
- value:
- applicationId: 04e88489-df02-4e34-a0ee-27a91849555f
- accountId: '9900000'
- callId: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
- to: '+19195551234'
- from: '+19195554312'
- enqueuedTime: '2022-06-16T13:15:07.160Z'
- callUrl: >-
- https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85
- callTimeout: 30
- callbackTimeout: 15
- tag: My custom tag value
- answerMethod: POST
- answerUrl: https://myServer.example/bandwidth/webhooks/answer
- answerFallbackMethod: POST
- answerFallbackUrl: https://myServer.example/bandwidth/webhooks/answerFallback
- disconnectMethod: POST
- disconnectUrl: https://myServer.example/bandwidth/webhooks/disconnect
- username: mySecretUsername
- password: '*****'
- fallbackUsername: mySecretUsername
- fallbackPassword: '*****'
- priority: 5
- listConferencesResponseExample:
- summary: Example of a listConferences Response
- value:
- - id: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9
- name: my-conference-name
- createdTime: '2022-06-17T22:19:40.375Z'
- completedTime: '2022-06-17T22:20:00.000Z'
- conferenceEventUrl: https://myServer.example/bandwidth/webhooks/conferenceEvent
- conferenceEventMethod: POST
- tag: my custom tag
- voiceBadRequestErrorExample:
- summary: Example of a Bad Request (400) Error
- value:
- type: validation
- description: 'Invalid answerUrl: only http and https are allowed.'
- voiceUnauthorizedErrorExample:
- summary: Example of an Unauthorized (401) Error
- value:
- type: validation
- description: 'Invalid answerUrl: only http and https are allowed.'
- voiceForbiddenErrorExample:
- summary: Example of a Forbidden (403) Error
- value:
- type: validation
- description: 'Invalid answerUrl: only http and https are allowed.'
- voiceNotFoundErrorExample:
- summary: Example of a Not Found (404) Error
- value:
- type: validation
- description: 'Invalid answerUrl: only http and https are allowed.'
- voiceNotAllowedErrorExample:
- summary: Example of a Not Allowed (405) Error
- value:
- type: validation
- description: 'Invalid answerUrl: only http and https are allowed.'
- voiceConflictErrorExample:
- summary: Example of a Conflict (409) Error
- value:
- type: validation
- description: 'Invalid answerUrl: only http and https are allowed.'
- voiceUnsupportedMediaTypeErrorExample:
- summary: Example of an Unsupported Media Type (415) Error
- value:
- type: validation
- description: 'Invalid answerUrl: only http and https are allowed.'
- voiceTooManyRequestsErrorExample:
- summary: Example of a Too Many Requests (429) Error
- value:
- type: validation
- description: 'Invalid answerUrl: only http and https are allowed.'
- voiceInternalServerErrorExample:
- summary: Example of an Internal Server (500) Error
- value:
- type: validation
- description: 'Invalid answerUrl: only http and https are allowed.'
- singleNumberRequestExample:
- summary: Example Number Lookup Request for One Number
- value:
- tns:
- - '+19195551234'
- multipleNumberRequestExample:
- summary: Example Number Lookup Request for Multiple Numbers
- value:
- tns:
- - '+19195551234'
- - '+19195554321'
- lookupInProgressExample:
- summary: Example Lookup In Progress Response
- value:
- requestId: 004223a0-8b17-41b1-bf81-20732adf5590
- status: IN_PROGRESS
- lookupFailedExample:
- summary: Example Lookup Failed Response
- value:
- requestId: 004223a0-8b17-41b1-bf81-20732adf5590
- status: FAILED
- failedTelephoneNumbers:
- - '+191955512345'
- lookupSingleNumberCompleteExample:
- summary: Example Single Number Lookup Complete Response
- value:
- requestId: 004223a0-8b17-41b1-bf81-20732adf5590
- status: COMPLETE
- result:
- - Response Code: 0
- Message: NOERROR
- E.164 Format: '+19195551234'
- Formatted: (919) 555-1234
- Country: US
- Line Type: Mobile
- Line Provider: Verizon Wireless
- Mobile Country Code: '310'
- Mobile Network Code: '010'
- lookupMultipleNumbersCompleteExample:
- summary: Example Multiple Numbers Lookup Complete Response
- value:
- requestId: 004223a0-8b17-41b1-bf81-20732adf5590
- status: COMPLETE
- result:
- - Response Code: 0
- Message: NOERROR
- E.164 Format: '+19195551234'
- Formatted: (919) 555-1234
- Country: US
- Line Type: Mobile
- Line Provider: Verizon Wireless
- Mobile Country Code: '310'
- Mobile Network Code: '010'
- - Response Code: 0
- Message: NOERROR
- E.164 Format: '+19195554321'
- Formatted: (919) 555-4321
- Country: US
- Line Type: Mobile
- Line Provider: T-Mobile USA
- Mobile Country Code: '310'
- Mobile Network Code: '160'
- lookupMultipleNumbersPartialCompleteExample:
- summary: Example Multiple Numbers Lookup Partial Complete Response
- value:
- requestId: 004223a0-8b17-41b1-bf81-20732adf5590
- status: PARTIAL_COMPLETE
- result:
- - Response Code: 0
- Message: NOERROR
- E.164 Format: '+19195551234'
- Formatted: (919) 555-1234
- Country: US
- Line Type: Mobile
- Line Provider: Verizon Wireless
- Mobile Country Code: '310'
- Mobile Network Code: '010'
- failedTelephoneNumbers:
- - '+191955512345'
- lookupSingleNumberCompleteNoInfoExample:
- summary: Example Single Number Lookup Complete with No Information Response
- value:
- requestId: 004223a0-8b17-41b1-bf81-20732adf5590
- status: COMPLETE
- result:
- - Response Code: 3
- Message: NXDOMAIN
- E.164 Format: '+19195550000'
- Formatted: (919) 555-0000
- Country: US
diff --git a/docs/CallbackTypeEnum.md b/docs/CallbackTypeEnum.md
new file mode 100644
index 0000000..31e8607
--- /dev/null
+++ b/docs/CallbackTypeEnum.md
@@ -0,0 +1,10 @@
+# Bandwidth.Standard.Model.CallbackTypeEnum
+Indicates the type of the callback: - `message-received` for inbound callbacks. - One of `message-sending`, `message-delivered`, `message-failed` for status callbacks.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/docs/MediaApi.md b/docs/MediaApi.md
index b3809d6..da780d2 100644
--- a/docs/MediaApi.md
+++ b/docs/MediaApi.md
@@ -408,7 +408,7 @@ void (empty response body)
### HTTP request headers
- - **Content-Type**: application/json, application/ogg, application/pdf, application/rtf, application/zip, application/x-tar, application/xml, application/gzip, application/x-bzip2, application/x-gzip, application/smil, application/javascript, audio/mp4, audio/mpeg, audio/ogg, audio/flac, audio/webm, audio/wav, audio/amr, audio/3gpp, image/bmp, image/gif, image/jpeg, image/pjpeg, image/png, image/svg+xml, image/tiff, image/webp, image/x-icon, text/css, text/csv, text/calendar, text/plain, text/javascript, text/vcard, text/vnd.wap.wml, text/xml, video/avi, video/mp4, video/mpeg, video/ogg, video/quicktime, video/webm, video/x-ms-wmv
+ - **Content-Type**: application/json, application/ogg, application/pdf, application/rtf, application/zip, application/x-tar, application/xml, application/gzip, application/x-bzip2, application/x-gzip, application/smil, application/javascript, audio/mp4, audio/mpeg, audio/ogg, audio/flac, audio/webm, audio/wav, audio/amr, audio/3gpp, image/bmp, image/gif, image/heic, image/heif, image/jpeg, image/pjpeg, image/png, image/svg+xml, image/tiff, image/webp, image/x-icon, text/css, text/csv, text/calendar, text/html, text/plain, text/javascript, text/vcard, text/vnd.wap.wml, text/xml, video/avi, video/mp4, video/mpeg, video/ogg, video/quicktime, video/webm, video/x-ms-wmv, video/x-flv
- **Accept**: application/json
diff --git a/docs/MessageCallback.md b/docs/MessageCallback.md
new file mode 100644
index 0000000..a6d0313
--- /dev/null
+++ b/docs/MessageCallback.md
@@ -0,0 +1,16 @@
+# Bandwidth.Standard.Model.MessageCallback
+Message Callback Schema
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Time** | **DateTime** | |
+**Type** | **CallbackTypeEnum** | |
+**To** | **string** | |
+**Description** | **string** | A detailed description of the event described by the callback. |
+**Message** | [**MessageCallbackMessage**](MessageCallbackMessage.md) | |
+**ErrorCode** | **int?** | Optional error code, applicable only when type is `message-failed`. | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/docs/MessageCallbackMessage.md b/docs/MessageCallbackMessage.md
new file mode 100644
index 0000000..b7b294b
--- /dev/null
+++ b/docs/MessageCallbackMessage.md
@@ -0,0 +1,22 @@
+# Bandwidth.Standard.Model.MessageCallbackMessage
+Message payload schema within a MessageCallback
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Id** | **string** | |
+**Owner** | **string** | |
+**ApplicationId** | **string** | |
+**Time** | **DateTime** | |
+**SegmentCount** | **int** | |
+**Direction** | **MessageDirectionEnum** | |
+**To** | **List<string>** | |
+**From** | **string** | |
+**Text** | **string** | |
+**Tag** | **string** | | [optional]
+**Media** | **List<string>** | Optional media, applicable only for mms | [optional]
+**Priority** | **PriorityEnum** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/src/Bandwidth.Standard.Test/Unit/Model/CallbackTypeEnumTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/CallbackTypeEnumTests.cs
new file mode 100644
index 0000000..c97dedf
--- /dev/null
+++ b/src/Bandwidth.Standard.Test/Unit/Model/CallbackTypeEnumTests.cs
@@ -0,0 +1,55 @@
+/*
+ * Bandwidth
+ *
+ * Bandwidth's Communication APIs
+ *
+ * The version of the OpenAPI document: 1.0.0
+ * Contact: letstalk@bandwidth.com
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using Xunit;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Bandwidth.Standard.Model;
+using Bandwidth.Standard.Client;
+using System.Reflection;
+using Newtonsoft.Json;
+
+namespace Bandwidth.Standard.Test.Model
+{
+ ///
+ /// Class for testing CallbackTypeEnum
+ ///
+ ///
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+ /// Please update the test case below to test the model.
+ ///
+ public class CallbackTypeEnumTests : IDisposable
+ {
+ private CallbackTypeEnum instance;
+
+ public CallbackTypeEnumTests()
+ {
+ instance = new CallbackTypeEnum();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of CallbackTypeEnum
+ ///
+ [Fact]
+ public void CallbackTypeEnumInstanceTest()
+ {
+ Assert.IsType(instance);
+ }
+ }
+}
diff --git a/src/Bandwidth.Standard.Test/Unit/Model/InboundMessageCallbackMessageTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/InboundMessageCallbackMessageTests.cs
deleted file mode 100644
index f59f404..0000000
--- a/src/Bandwidth.Standard.Test/Unit/Model/InboundMessageCallbackMessageTests.cs
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Bandwidth
- *
- * Bandwidth's Communication APIs
- *
- * The version of the OpenAPI document: 1.0.0
- * Contact: letstalk@bandwidth.com
- * Generated by: https://github.com/openapitools/openapi-generator.git
- */
-
-
-using Xunit;
-
-using System;
-using System.Linq;
-using System.IO;
-using System.Collections.Generic;
-using Bandwidth.Standard.Model;
-using Bandwidth.Standard.Client;
-using System.Reflection;
-using Newtonsoft.Json;
-
-namespace Bandwidth.Standard.Test.Unit.Model
-{
- ///
- /// Class for testing InboundMessageCallbackMessage
- ///
- public class InboundMessageCallbackMessageTests : IDisposable
- {
- private InboundMessageCallbackMessage instance;
-
- public InboundMessageCallbackMessageTests()
- {
- instance = new InboundMessageCallbackMessage(id: "abc123", owner: "+15553332222", applicationId: "123-456-abcd", to: new List { "+15557654321" }, from: "+15553332222", text: "Hello world");
- }
-
- public void Dispose()
- {
- // Cleanup when everything is done.
- }
-
- ///
- /// Test an instance of InboundMessageCallbackMessage
- ///
- [Fact]
- public void InboundMessageCallbackMessageInstanceTest()
- {
- Assert.IsType(instance);
- }
-
-
- ///
- /// Test the property 'Id'
- ///
- [Fact]
- public void IdTest()
- {
- Assert.IsType(instance.Id);
- Assert.Equal("abc123", instance.Id);
- }
- ///
- /// Test the property 'Owner'
- ///
- [Fact]
- public void OwnerTest()
- {
- Assert.IsType(instance.Owner);
- Assert.Equal("+15553332222", instance.Owner);
- }
- ///
- /// Test the property 'ApplicationId'
- ///
- [Fact]
- public void ApplicationIdTest()
- {
- Assert.IsType(instance.ApplicationId);
- Assert.Equal("123-456-abcd", instance.ApplicationId);
- }
- ///
- /// Test the property 'Time'
- ///
- [Fact]
- public void TimeTest()
- {
- instance.Time = new DateTime(2020, 1, 1);
- Assert.IsType(instance.Time);
- Assert.Equal(new DateTime(2020, 1, 1), instance.Time);
- }
- ///
- /// Test the property 'SegmentCount'
- ///
- [Fact]
- public void SegmentCountTest()
- {
- instance.SegmentCount = 1;
- Assert.IsType(instance.SegmentCount);
- Assert.Equal(1, instance.SegmentCount);
- }
- ///
- /// Test the property 'Direction'
- ///
- [Fact]
- public void DirectionTest()
- {
- instance.Direction = MessageDirectionEnum.In;
- Assert.IsType(instance.Direction);
- Assert.Equal(MessageDirectionEnum.In, instance.Direction);
- }
- ///
- /// Test the property 'To'
- ///
- [Fact]
- public void ToTest()
- {
- Assert.IsType>(instance.To);
- Assert.Equal(new List { "+15557654321" }, instance.To);
- }
- ///
- /// Test the property 'From'
- ///
- [Fact]
- public void FromTest()
- {
- Assert.IsType(instance.From);
- Assert.Equal("+15553332222", instance.From);
- }
- ///
- /// Test the property 'Text'
- ///
- [Fact]
- public void TextTest()
- {
- Assert.IsType(instance.Text);
- Assert.Equal("Hello world", instance.Text);
- }
- ///
- /// Test the property 'Tag'
- ///
- [Fact]
- public void TagTest()
- {
- instance.Tag = "test";
- Assert.IsType(instance.Tag);
- Assert.Equal("test", instance.Tag);
- }
- ///
- /// Test the property 'Media'
- ///
- [Fact]
- public void MediaTest()
- {
- instance.Media = new List { "https://test.url/" };
- Assert.IsType>(instance.Media);
- Assert.Equal(new List { "https://test.url/" }, instance.Media);
- }
- ///
- /// Test the property 'Priority'
- ///
- [Fact]
- public void PriorityTest()
- {
- instance.Priority = PriorityEnum.Default;
- Assert.IsType(instance.Priority);
- Assert.Equal(PriorityEnum.Default, instance.Priority);
- }
-
- }
-
-}
diff --git a/src/Bandwidth.Standard.Test/Unit/Model/InboundMessageCallbackTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/InboundMessageCallbackTests.cs
deleted file mode 100644
index 4872dea..0000000
--- a/src/Bandwidth.Standard.Test/Unit/Model/InboundMessageCallbackTests.cs
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Bandwidth
- *
- * Bandwidth's Communication APIs
- *
- * The version of the OpenAPI document: 1.0.0
- * Contact: letstalk@bandwidth.com
- * Generated by: https://github.com/openapitools/openapi-generator.git
- */
-
-
-using Xunit;
-
-using System;
-using System.Linq;
-using System.IO;
-using System.Collections.Generic;
-using Bandwidth.Standard.Model;
-using Bandwidth.Standard.Client;
-using System.Reflection;
-using Newtonsoft.Json;
-
-namespace Bandwidth.Standard.Test.Unit.Model
-{
- ///
- /// Class for testing InboundMessageCallback
- ///
- public class InboundMessageCallbackTests : IDisposable
- {
- private InboundMessageCallback instance;
-
- public InboundMessageCallbackTests()
- {
- instance = new InboundMessageCallback(type: "message-received", to: "+15552223333", description: "Incoming message received", message: new InboundMessageCallbackMessage(id: "1661365814859loidf7mcwd4qacn7", owner: "+15553332222", applicationId: "93de2206-9669-4e07-948d-329f4b722ee", to: new List { "15552223333" }, from: "+15553332222", text: "Hello world"));
- }
-
- public void Dispose()
- {
- // Cleanup when everything is done.
- }
-
- ///
- /// Test an instance of InboundMessageCallback
- ///
- [Fact]
- public void InboundMessageCallbackInstanceTest()
- {
- Assert.IsType(instance);
- }
-
-
- ///
- /// Test the property 'Time'
- ///
- [Fact]
- public void TimeTest()
- {
- instance.Time = new DateTime(2020, 1, 1);
- Assert.IsType(instance.Time);
- Assert.Equal(new DateTime(2020, 1, 1), instance.Time);
- }
- ///
- /// Test the property 'Type'
- ///
- [Fact]
- public void TypeTest()
- {
- Assert.IsType(instance.Type);
- Assert.Equal("message-received", instance.Type);
- }
- ///
- /// Test the property 'To'
- ///
- [Fact]
- public void ToTest()
- {
- Assert.IsType(instance.To);
- Assert.Equal("+15552223333", instance.To);
- }
- ///
- /// Test the property 'Description'
- ///
- [Fact]
- public void DescriptionTest()
- {
- Assert.IsType(instance.Description);
- Assert.Equal("Incoming message received", instance.Description);
- }
- ///
- /// Test the property 'Message'
- ///
- [Fact]
- public void MessageTest()
- {
- Assert.IsType(instance.Message);
- }
-
- }
-
-}
diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MessageFailedCallbackMessageTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MessageCallbackMessageTests.cs
similarity index 77%
rename from src/Bandwidth.Standard.Test/Unit/Model/MessageFailedCallbackMessageTests.cs
rename to src/Bandwidth.Standard.Test/Unit/Model/MessageCallbackMessageTests.cs
index 3f9c86b..54810b2 100644
--- a/src/Bandwidth.Standard.Test/Unit/Model/MessageFailedCallbackMessageTests.cs
+++ b/src/Bandwidth.Standard.Test/Unit/Model/MessageCallbackMessageTests.cs
@@ -20,22 +20,22 @@
using System.Reflection;
using Newtonsoft.Json;
-namespace Bandwidth.Standard.Test.Unit.Model
+namespace Bandwidth.Standard.Test.Model
{
///
- /// Class for testing MessageFailedCallbackMessage
+ /// Class for testing MessageCallbackMessage
///
///
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
///
- public class MessageFailedCallbackMessageTests : IDisposable
+ public class MessageCallbackMessageTests : IDisposable
{
- private MessageFailedCallbackMessage instance;
+ private MessageCallbackMessage instance;
- public MessageFailedCallbackMessageTests()
+ public MessageCallbackMessageTests()
{
- instance = new MessageFailedCallbackMessage(id: "1661365814859loidf7mcwd4qacn7", owner: "+15553332222", applicationId: "93de2206-9669-4e07-948d-329f4b722ee2", to: new List { "+15557654321" }, from: "+15553332222", text: "Hello world", tag: "test");
+ instance = new MessageCallbackMessage();
}
public void Dispose()
@@ -44,42 +44,47 @@ public void Dispose()
}
///
- /// Test an instance of MessageFailedCallbackMessage
+ /// Test an instance of MessageCallbackMessage
///
[Fact]
- public void MessageFailedCallbackMessageInstanceTest()
+ public void MessageCallbackMessageInstanceTest()
{
- Assert.IsType(instance);
+ Assert.IsType(instance);
}
-
///
/// Test the property 'Id'
///
[Fact]
public void IdTest()
{
+ instance.Id = "test";
Assert.IsType(instance.Id);
- Assert.Equal("1661365814859loidf7mcwd4qacn7", instance.Id);
+ Assert.Equal("test", instance.Id);
}
+
///
/// Test the property 'Owner'
///
[Fact]
public void OwnerTest()
{
+ instance.Owner = "test";
Assert.IsType(instance.Owner);
- Assert.Equal("+15553332222", instance.Owner);
+ Assert.Equal("test", instance.Owner);
}
+
///
/// Test the property 'ApplicationId'
///
[Fact]
public void ApplicationIdTest()
{
+ instance.ApplicationId = "test";
Assert.IsType(instance.ApplicationId);
- Assert.Equal("93de2206-9669-4e07-948d-329f4b722ee2", instance.ApplicationId);
+ Assert.Equal("test", instance.ApplicationId);
}
+
///
/// Test the property 'Time'
///
@@ -90,6 +95,7 @@ public void TimeTest()
Assert.IsType(instance.Time);
Assert.Equal(new DateTime(2020, 1, 1), instance.Time);
}
+
///
/// Test the property 'SegmentCount'
///
@@ -100,6 +106,7 @@ public void SegmentCountTest()
Assert.IsType(instance.SegmentCount);
Assert.Equal(1, instance.SegmentCount);
}
+
///
/// Test the property 'Direction'
///
@@ -110,34 +117,40 @@ public void DirectionTest()
Assert.IsType(instance.Direction);
Assert.Equal(MessageDirectionEnum.In, instance.Direction);
}
+
///
/// Test the property 'To'
///
[Fact]
public void ToTest()
{
+ instance.To = new List { "+15551234567" };
Assert.IsType>(instance.To);
- Assert.Equal(new List { "+15557654321" }, instance.To);
+ Assert.Equal(new List { "+15551234567" }, instance.To);
}
+
///
/// Test the property 'From'
///
[Fact]
public void FromTest()
{
+ instance.From = "+15557654321";
Assert.IsType(instance.From);
- Assert.Equal("+15553332222", instance.From);
+ Assert.Equal("+15557654321", instance.From);
}
+
///
/// Test the property 'Text'
///
[Fact]
public void TextTest()
{
- instance.Text = "Hello world";
+ instance.Text = "Hello World";
Assert.IsType(instance.Text);
- Assert.Equal("Hello world", instance.Text);
+ Assert.Equal("Hello World", instance.Text);
}
+
///
/// Test the property 'Tag'
///
@@ -148,6 +161,7 @@ public void TagTest()
Assert.IsType(instance.Tag);
Assert.Equal("test", instance.Tag);
}
+
///
/// Test the property 'Media'
///
@@ -158,6 +172,7 @@ public void MediaTest()
Assert.IsType>(instance.Media);
Assert.Equal(new List { "https://test.url/" }, instance.Media);
}
+
///
/// Test the property 'Priority'
///
@@ -168,7 +183,5 @@ public void PriorityTest()
Assert.IsType(instance.Priority);
Assert.Equal(PriorityEnum.Default, instance.Priority);
}
-
}
-
}
diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MessageFailedCallbackTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MessageCallbackTests.cs
similarity index 61%
rename from src/Bandwidth.Standard.Test/Unit/Model/MessageFailedCallbackTests.cs
rename to src/Bandwidth.Standard.Test/Unit/Model/MessageCallbackTests.cs
index 1d66db7..8288d21 100644
--- a/src/Bandwidth.Standard.Test/Unit/Model/MessageFailedCallbackTests.cs
+++ b/src/Bandwidth.Standard.Test/Unit/Model/MessageCallbackTests.cs
@@ -20,18 +20,22 @@
using System.Reflection;
using Newtonsoft.Json;
-namespace Bandwidth.Standard.Test.Unit.Model
+namespace Bandwidth.Standard.Test.Model
{
///
- /// Class for testing MessageFailedCallback
+ /// Class for testing MessageCallback
///
- public class MessageFailedCallbackTests : IDisposable
+ ///
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+ /// Please update the test case below to test the model.
+ ///
+ public class MessageCallbackTests : IDisposable
{
- private MessageFailedCallback instance;
+ private MessageCallback instance;
- public MessageFailedCallbackTests()
+ public MessageCallbackTests()
{
- instance = new MessageFailedCallback(type: "message-failed", to: "+15552223333", description: "rejected-unallocated-from-number", message: new MessageFailedCallbackMessage(id: "1661365814859loidf7mcwd4qacn7", owner: "+15553332222", applicationId: "93de2206-9669-4e07-948d-329f4b722ee2", to: new List { "+15557654321" }, from: "+15553332222", text: "Hello world", tag: "test"));
+ instance = new MessageCallback();
}
public void Dispose()
@@ -40,15 +44,14 @@ public void Dispose()
}
///
- /// Test an instance of MessageFailedCallback
+ /// Test an instance of MessageCallback
///
[Fact]
- public void MessageFailedCallbackInstanceTest()
+ public void MessageCallbackInstanceTest()
{
- Assert.IsType(instance);
+ Assert.IsType(instance);
}
-
///
/// Test the property 'Time'
///
@@ -59,52 +62,59 @@ public void TimeTest()
Assert.IsType(instance.Time);
Assert.Equal(new DateTime(2020, 1, 1), instance.Time);
}
+
///
/// Test the property 'Type'
///
[Fact]
public void TypeTest()
{
- Assert.IsType(instance.Type);
- Assert.Equal("message-failed", instance.Type);
+ instance.Type = CallbackTypeEnum.Received;
+ Assert.IsType(instance.Type);
+ Assert.Equal(CallbackTypeEnum.Received, instance.Type);
}
+
///
/// Test the property 'To'
///
[Fact]
public void ToTest()
{
+ instance.To = "+19195551234";
Assert.IsType(instance.To);
- Assert.Equal("+15552223333", instance.To);
+ Assert.Equal("+19195551234", instance.To);
}
+
///
/// Test the property 'Description'
///
[Fact]
public void DescriptionTest()
{
+ instance.Description = "test";
Assert.IsType(instance.Description);
- Assert.Equal("rejected-unallocated-from-number", instance.Description);
+ Assert.Equal("test", instance.Description);
}
+
///
/// Test the property 'Message'
///
[Fact]
public void MessageTest()
{
- Assert.IsType(instance.Message);
+ instance.Message = new MessageCallbackMessage();
+ Assert.IsType(instance.Message);
}
+
///
/// Test the property 'ErrorCode'
///
[Fact]
public void ErrorCodeTest()
{
- instance.ErrorCode = 9902;
+ instance.ErrorCode = 123;
Assert.IsType(instance.ErrorCode);
- Assert.Equal(9902, instance.ErrorCode);
+ Assert.Equal(123, instance.ErrorCode);
}
-
}
-
}
diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MessageDeliveredCallbackMessageTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MessageDeliveredCallbackMessageTests.cs
deleted file mode 100644
index 49c541f..0000000
--- a/src/Bandwidth.Standard.Test/Unit/Model/MessageDeliveredCallbackMessageTests.cs
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Bandwidth
- *
- * Bandwidth's Communication APIs
- *
- * The version of the OpenAPI document: 1.0.0
- * Contact: letstalk@bandwidth.com
- * Generated by: https://github.com/openapitools/openapi-generator.git
- */
-
-
-using Xunit;
-
-using System;
-using System.Linq;
-using System.IO;
-using System.Collections.Generic;
-using Bandwidth.Standard.Model;
-using Bandwidth.Standard.Client;
-using System.Reflection;
-using Newtonsoft.Json;
-
-namespace Bandwidth.Standard.Test.Unit.Model
-{
- ///
- /// Class for testing MessageDeliveredCallbackMessage
- ///
- public class MessageDeliveredCallbackMessageTests : IDisposable
- {
- private MessageDeliveredCallbackMessage instance;
-
- public MessageDeliveredCallbackMessageTests()
- {
- instance = new MessageDeliveredCallbackMessage(id: "1661365814859loidf7mcwd4qacn7", owner: "+15553332222", applicationId: "93de2206-9669-4e07-948d-329f4b722ee2", to: new List { "+15557654321" }, from: "+15553332222", text: "Hello world", tag: "test");
- }
-
- public void Dispose()
- {
- // Cleanup when everything is done.
- }
-
- ///
- /// Test an instance of MessageDeliveredCallbackMessage
- ///
- [Fact]
- public void MessageDeliveredCallbackMessageInstanceTest()
- {
- Assert.IsType(instance);
- }
-
-
- ///
- /// Test the property 'Id'
- ///
- [Fact]
- public void IdTest()
- {
- Assert.IsType(instance.Id);
- Assert.Equal("1661365814859loidf7mcwd4qacn7", instance.Id);
- }
- ///
- /// Test the property 'Owner'
- ///
- [Fact]
- public void OwnerTest()
- {
- Assert.IsType(instance.Owner);
- Assert.Equal("+15553332222", instance.Owner);
- }
- ///
- /// Test the property 'ApplicationId'
- ///
- [Fact]
- public void ApplicationIdTest()
- {
- Assert.IsType(instance.ApplicationId);
- Assert.Equal("93de2206-9669-4e07-948d-329f4b722ee2", instance.ApplicationId);
- }
- ///
- /// Test the property 'Time'
- ///
- [Fact]
- public void TimeTest()
- {
- instance.Time = new DateTime(2020, 1, 1);
- Assert.IsType(instance.Time);
- Assert.Equal(new DateTime(2020, 1, 1), instance.Time);
- }
- ///
- /// Test the property 'SegmentCount'
- ///
- [Fact]
- public void SegmentCountTest()
- {
- instance.SegmentCount = 1;
- Assert.IsType(instance.SegmentCount);
- Assert.Equal(1, instance.SegmentCount);
- }
- ///
- /// Test the property 'Direction'
- ///
- [Fact]
- public void DirectionTest()
- {
- instance.Direction = MessageDirectionEnum.In;
- Assert.IsType(instance.Direction);
- Assert.Equal(MessageDirectionEnum.In, instance.Direction);
- }
- ///
- /// Test the property 'To'
- ///
- [Fact]
- public void ToTest()
- {
- Assert.IsType>(instance.To);
- Assert.Equal(new List { "+15557654321" }, instance.To);
- }
- ///
- /// Test the property 'From'
- ///
- [Fact]
- public void FromTest()
- {
- Assert.IsType(instance.From);
- Assert.Equal("+15553332222", instance.From);
- }
- ///
- /// Test the property 'Text'
- ///
- [Fact]
- public void TextTest()
- {
- Assert.IsType(instance.Text);
- Assert.Equal("Hello world", instance.Text);
- }
- ///
- /// Test the property 'Tag'
- ///
- [Fact]
- public void TagTest()
- {
- Assert.IsType(instance.Tag);
- Assert.Equal("test", instance.Tag);
- }
- ///
- /// Test the property 'Media'
- ///
- [Fact]
- public void MediaTest()
- {
- instance.Media = new List { "https://test.url" };
- Assert.IsType>(instance.Media);
- Assert.Equal(new List { "https://test.url" }, instance.Media);
- }
- ///
- /// Test the property 'Priority'
- ///
- [Fact]
- public void PriorityTest()
- {
- instance.Priority = PriorityEnum.Default;
- Assert.IsType(instance.Priority);
- Assert.Equal(PriorityEnum.Default, instance.Priority);
- }
-
- }
-
-}
diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MessageDeliveredCallbackTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MessageDeliveredCallbackTests.cs
deleted file mode 100644
index 3a07612..0000000
--- a/src/Bandwidth.Standard.Test/Unit/Model/MessageDeliveredCallbackTests.cs
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Bandwidth
- *
- * Bandwidth's Communication APIs
- *
- * The version of the OpenAPI document: 1.0.0
- * Contact: letstalk@bandwidth.com
- * Generated by: https://github.com/openapitools/openapi-generator.git
- */
-
-
-using Xunit;
-
-using System;
-using System.Linq;
-using System.IO;
-using System.Collections.Generic;
-using Bandwidth.Standard.Model;
-using Bandwidth.Standard.Client;
-using System.Reflection;
-using Newtonsoft.Json;
-
-namespace Bandwidth.Standard.Test.Unit.Model
-{
- ///
- /// Class for testing MessageDeliveredCallback
- ///
- ///
- /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
- /// Please update the test case below to test the model.
- ///
- public class MessageDeliveredCallbackTests : IDisposable
- {
- private MessageDeliveredCallback instance;
-
- public MessageDeliveredCallbackTests()
- {
- instance = new MessageDeliveredCallback(type: "message-delivered", to: "+15557654321", description: "Message delivered to carrier.", message: new MessageDeliveredCallbackMessage(id: "1661365814859loidf7mcwd4qacn7", owner: "+15553332222", applicationId: "93de2206-9669-4e07-948d-329f4b722ee", to: new List { "15557654321" }, from: "+15553332222", text: "Hello world", tag: "test"));
- }
-
- public void Dispose()
- {
- // Cleanup when everything is done.
- }
-
- ///
- /// Test an instance of MessageDeliveredCallback
- ///
- [Fact]
- public void MessageDeliveredCallbackInstanceTest()
- {
- Assert.IsType(instance);
- }
-
-
- ///
- /// Test the property 'Time'
- ///
- [Fact]
- public void TimeTest()
- {
- instance.Time = new DateTime(2020, 1, 1);
- Assert.IsType(instance.Time);
- Assert.Equal(new DateTime(2020, 1, 1), instance.Time);
- }
- ///
- /// Test the property 'Type'
- ///
- [Fact]
- public void TypeTest()
- {
- Assert.IsType(instance.Type);
- Assert.Equal("message-delivered", instance.Type);
- }
- ///
- /// Test the property 'To'
- ///
- [Fact]
- public void ToTest()
- {
- Assert.IsType(instance.To);
- Assert.Equal("+15557654321", instance.To);
- }
- ///
- /// Test the property 'Description'
- ///
- [Fact]
- public void DescriptionTest()
- {
- Assert.IsType(instance.Description);
- Assert.Equal("Message delivered to carrier.", instance.Description);
- }
- ///
- /// Test the property 'Message'
- ///
- [Fact]
- public void MessageTest()
- {
- Assert.IsType(instance.Message);
- }
-
- }
-
-}
diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MessageSendingCallbackMessageTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MessageSendingCallbackMessageTests.cs
deleted file mode 100644
index 1120242..0000000
--- a/src/Bandwidth.Standard.Test/Unit/Model/MessageSendingCallbackMessageTests.cs
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Bandwidth
- *
- * Bandwidth's Communication APIs
- *
- * The version of the OpenAPI document: 1.0.0
- * Contact: letstalk@bandwidth.com
- * Generated by: https://github.com/openapitools/openapi-generator.git
- */
-
-
-using Xunit;
-
-using System;
-using System.Linq;
-using System.IO;
-using System.Collections.Generic;
-using Bandwidth.Standard.Model;
-using Bandwidth.Standard.Client;
-using System.Reflection;
-using Newtonsoft.Json;
-
-namespace Bandwidth.Standard.Test.Unit.Model
-{
- ///
- /// Class for testing MessageSendingCallbackMessage
- ///
- public class MessageSendingCallbackMessageTests : IDisposable
- {
- private MessageSendingCallbackMessage instance;
-
- public MessageSendingCallbackMessageTests()
- {
- instance = new MessageSendingCallbackMessage(id: "1661365814859loidf7mcwd4qacn7", owner: "+15553332222", applicationId: "93de2206-9669-4e07-948d-329f4b722ee2", to: new List { "+15557654321" }, from: "+15553332222", text: "Hello world", media: new List { "https://test.url/" });
- }
-
- public void Dispose()
- {
- // Cleanup when everything is done.
- }
-
- ///
- /// Test an instance of MessageSendingCallbackMessage
- ///
- [Fact]
- public void MessageSendingCallbackMessageInstanceTest()
- {
- Assert.IsType(instance);
- }
-
-
- ///
- /// Test the property 'Id'
- ///
- [Fact]
- public void IdTest()
- {
- Assert.IsType(instance.Id);
- Assert.Equal("1661365814859loidf7mcwd4qacn7", instance.Id);
- }
- ///
- /// Test the property 'Owner'
- ///
- [Fact]
- public void OwnerTest()
- {
- Assert.IsType(instance.Owner);
- Assert.Equal("+15553332222", instance.Owner);
- }
- ///
- /// Test the property 'ApplicationId'
- ///
- [Fact]
- public void ApplicationIdTest()
- {
- Assert.IsType(instance.ApplicationId);
- Assert.Equal("93de2206-9669-4e07-948d-329f4b722ee2", instance.ApplicationId);
- }
- ///
- /// Test the property 'Time'
- ///
- [Fact]
- public void TimeTest()
- {
- instance.Time = new DateTime(2020, 1, 1);
- Assert.IsType(instance.Time);
- Assert.Equal(new DateTime(2020, 1, 1), instance.Time);
- }
- ///
- /// Test the property 'SegmentCount'
- ///
- [Fact]
- public void SegmentCountTest()
- {
- instance.SegmentCount = 1;
- Assert.IsType(instance.SegmentCount);
- Assert.Equal(1, instance.SegmentCount);
- }
- ///
- /// Test the property 'Direction'
- ///
- [Fact]
- public void DirectionTest()
- {
- instance.Direction = MessageDirectionEnum.In;
- Assert.IsType(instance.Direction);
- Assert.Equal(MessageDirectionEnum.In, instance.Direction);
- }
- ///
- /// Test the property 'To'
- ///
- [Fact]
- public void ToTest()
- {
- Assert.IsType>(instance.To);
- Assert.Equal(new List { "+15557654321" }, instance.To);
- }
- ///
- /// Test the property 'From'
- ///
- [Fact]
- public void FromTest()
- {
- Assert.IsType(instance.From);
- Assert.Equal("+15553332222", instance.From);
- }
- ///
- /// Test the property 'Text'
- ///
- [Fact]
- public void TextTest()
- {
- Assert.IsType(instance.Text);
- Assert.Equal("Hello world", instance.Text);
- }
- ///
- /// Test the property 'Tag'
- ///
- [Fact]
- public void TagTest()
- {
- instance.Tag = "test";
- Assert.IsType(instance.Tag);
- Assert.Equal("test", instance.Tag);
- }
- ///
- /// Test the property 'Media'
- ///
- [Fact]
- public void MediaTest()
- {
- Assert.IsType>(instance.Media);
- Assert.Equal(new List { "https://test.url/" }, instance.Media);
- }
- ///
- /// Test the property 'Priority'
- ///
- [Fact]
- public void PriorityTest()
- {
- instance.Priority = PriorityEnum.Default;
- Assert.IsType(instance.Priority);
- Assert.Equal(PriorityEnum.Default, instance.Priority);
- }
-
- }
-
-}
diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MessageSendingCallbackTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MessageSendingCallbackTests.cs
deleted file mode 100644
index 4b9687d..0000000
--- a/src/Bandwidth.Standard.Test/Unit/Model/MessageSendingCallbackTests.cs
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Bandwidth
- *
- * Bandwidth's Communication APIs
- *
- * The version of the OpenAPI document: 1.0.0
- * Contact: letstalk@bandwidth.com
- * Generated by: https://github.com/openapitools/openapi-generator.git
- */
-
-
-using Xunit;
-
-using System;
-using System.Linq;
-using System.IO;
-using System.Collections.Generic;
-using Bandwidth.Standard.Model;
-using Bandwidth.Standard.Client;
-using System.Reflection;
-using Newtonsoft.Json;
-
-namespace Bandwidth.Standard.Test.Unit.Model
-{
- ///
- /// Class for testing MessageSendingCallback
- ///
- public class MessageSendingCallbackTests : IDisposable
- {
- private MessageSendingCallback instance;
-
- public MessageSendingCallbackTests()
- {
- instance = new MessageSendingCallback(type: "message-sending", to: "+15552223333", description: "Message is sending to carrier", message: new MessageSendingCallbackMessage(id: "1661365814859loidf7mcwd4qacn7", owner: "+15553332222", applicationId: "93de2206-9669-4e07-948d-329f4b722ee", to: new List { "15557654321" }, from: "+15553332222", text: "Hello world", media: new List { "https://test.url/" }));
- }
-
- public void Dispose()
- {
- // Cleanup when everything is done.
- }
-
- ///
- /// Test an instance of MessageSendingCallback
- ///
- [Fact]
- public void MessageSendingCallbackInstanceTest()
- {
- Assert.IsType(instance);
- }
-
-
- ///
- /// Test the property 'Time'
- ///
- [Fact]
- public void TimeTest()
- {
- instance.Time = new DateTime(2020, 1, 1);
- Assert.IsType(instance.Time);
- Assert.Equal(new DateTime(2020, 1, 1), instance.Time);
- }
- ///
- /// Test the property 'Type'
- ///
- [Fact]
- public void TypeTest()
- {
- Assert.IsType(instance.Type);
- Assert.Equal("message-sending", instance.Type);
- }
- ///
- /// Test the property 'To'
- ///
- [Fact]
- public void ToTest()
- {
- Assert.IsType(instance.To);
- Assert.Equal("+15552223333", instance.To);
- }
- ///
- /// Test the property 'Description'
- ///
- [Fact]
- public void DescriptionTest()
- {
- Assert.IsType(instance.Description);
- Assert.Equal("Message is sending to carrier", instance.Description);
- }
- ///
- /// Test the property 'Message'
- ///
- [Fact]
- public void MessageTest()
- {
- Assert.IsType(instance.Message);
- }
-
- }
-
-}
diff --git a/src/Bandwidth.Standard/Api/MediaApi.cs b/src/Bandwidth.Standard/Api/MediaApi.cs
index eed7857..4be556e 100644
--- a/src/Bandwidth.Standard/Api/MediaApi.cs
+++ b/src/Bandwidth.Standard/Api/MediaApi.cs
@@ -964,6 +964,8 @@ public System.IO.Stream GetMedia(string accountId, string mediaId, int operation
"audio/3gpp",
"image/bmp",
"image/gif",
+ "image/heic",
+ "image/heif",
"image/jpeg",
"image/pjpeg",
"image/png",
@@ -974,6 +976,7 @@ public System.IO.Stream GetMedia(string accountId, string mediaId, int operation
"text/css",
"text/csv",
"text/calendar",
+ "text/html",
"text/plain",
"text/javascript",
"text/vcard",
@@ -985,7 +988,8 @@ public System.IO.Stream GetMedia(string accountId, string mediaId, int operation
"video/ogg",
"video/quicktime",
"video/webm",
- "video/x-ms-wmv"
+ "video/x-ms-wmv",
+ "video/x-flv"
};
// to determine the Accept header
@@ -1116,6 +1120,8 @@ public System.IO.Stream GetMedia(string accountId, string mediaId, int operation
"audio/3gpp",
"image/bmp",
"image/gif",
+ "image/heic",
+ "image/heif",
"image/jpeg",
"image/pjpeg",
"image/png",
@@ -1126,6 +1132,7 @@ public System.IO.Stream GetMedia(string accountId, string mediaId, int operation
"text/css",
"text/csv",
"text/calendar",
+ "text/html",
"text/plain",
"text/javascript",
"text/vcard",
@@ -1137,7 +1144,8 @@ public System.IO.Stream GetMedia(string accountId, string mediaId, int operation
"video/ogg",
"video/quicktime",
"video/webm",
- "video/x-ms-wmv"
+ "video/x-ms-wmv",
+ "video/x-flv"
};
// to determine the Accept header
diff --git a/src/Bandwidth.Standard/Model/CallbackTypeEnum.cs b/src/Bandwidth.Standard/Model/CallbackTypeEnum.cs
new file mode 100644
index 0000000..e7c1186
--- /dev/null
+++ b/src/Bandwidth.Standard/Model/CallbackTypeEnum.cs
@@ -0,0 +1,61 @@
+/*
+ * Bandwidth
+ *
+ * Bandwidth's Communication APIs
+ *
+ * The version of the OpenAPI document: 1.0.0
+ * Contact: letstalk@bandwidth.com
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.IO;
+using System.Runtime.Serialization;
+using System.Text;
+using System.Text.RegularExpressions;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using Newtonsoft.Json.Linq;
+using System.ComponentModel.DataAnnotations;
+using OpenAPIDateConverter = Bandwidth.Standard.Client.OpenAPIDateConverter;
+
+namespace Bandwidth.Standard.Model
+{
+ ///
+ /// Indicates the type of the callback: - `message-received` for inbound callbacks. - One of `message-sending`, `message-delivered`, `message-failed` for status callbacks.
+ ///
+ /// Indicates the type of the callback: - `message-received` for inbound callbacks. - One of `message-sending`, `message-delivered`, `message-failed` for status callbacks.
+ [JsonConverter(typeof(StringEnumConverter))]
+ public enum CallbackTypeEnum
+ {
+ ///
+ /// Enum Received for value: message-received
+ ///
+ [EnumMember(Value = "message-received")]
+ Received = 1,
+
+ ///
+ /// Enum Sending for value: message-sending
+ ///
+ [EnumMember(Value = "message-sending")]
+ Sending = 2,
+
+ ///
+ /// Enum Delivered for value: message-delivered
+ ///
+ [EnumMember(Value = "message-delivered")]
+ Delivered = 3,
+
+ ///
+ /// Enum Failed for value: message-failed
+ ///
+ [EnumMember(Value = "message-failed")]
+ Failed = 4
+ }
+
+}
diff --git a/src/Bandwidth.Standard/Model/InboundMessageCallback.cs b/src/Bandwidth.Standard/Model/InboundMessageCallback.cs
deleted file mode 100644
index 9a324d0..0000000
--- a/src/Bandwidth.Standard/Model/InboundMessageCallback.cs
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Bandwidth
- *
- * Bandwidth's Communication APIs
- *
- * The version of the OpenAPI document: 1.0.0
- * Contact: letstalk@bandwidth.com
- * Generated by: https://github.com/openapitools/openapi-generator.git
- */
-
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Linq;
-using System.IO;
-using System.Runtime.Serialization;
-using System.Text;
-using System.Text.RegularExpressions;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-using Newtonsoft.Json.Linq;
-using System.ComponentModel.DataAnnotations;
-using OpenAPIDateConverter = Bandwidth.Standard.Client.OpenAPIDateConverter;
-
-namespace Bandwidth.Standard.Model
-{
- ///
- /// Inbound Message Callback
- ///
- [DataContract(Name = "inboundMessageCallback")]
- public partial class InboundMessageCallback : IValidatableObject
- {
- ///
- /// Initializes a new instance of the class.
- ///
- [JsonConstructorAttribute]
- protected InboundMessageCallback() { }
- ///
- /// Initializes a new instance of the class.
- ///
- /// time (required).
- /// type (required).
- /// to (required).
- /// description (required).
- /// message (required).
- public InboundMessageCallback(DateTime time = default(DateTime), string type = default(string), string to = default(string), string description = default(string), InboundMessageCallbackMessage message = default(InboundMessageCallbackMessage))
- {
- this.Time = time;
- // to ensure "type" is required (not null)
- if (type == null)
- {
- throw new ArgumentNullException("type is a required property for InboundMessageCallback and cannot be null");
- }
- this.Type = type;
- // to ensure "to" is required (not null)
- if (to == null)
- {
- throw new ArgumentNullException("to is a required property for InboundMessageCallback and cannot be null");
- }
- this.To = to;
- // to ensure "description" is required (not null)
- if (description == null)
- {
- throw new ArgumentNullException("description is a required property for InboundMessageCallback and cannot be null");
- }
- this.Description = description;
- // to ensure "message" is required (not null)
- if (message == null)
- {
- throw new ArgumentNullException("message is a required property for InboundMessageCallback and cannot be null");
- }
- this.Message = message;
- }
-
- ///
- /// Gets or Sets Time
- ///
- /// 2016-09-14T18:20:16Z
- [DataMember(Name = "time", IsRequired = true, EmitDefaultValue = true)]
- public DateTime Time { get; set; }
-
- ///
- /// Gets or Sets Type
- ///
- /// message-received
- [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)]
- public string Type { get; set; }
-
- ///
- /// Gets or Sets To
- ///
- /// +15552223333
- [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = true)]
- public string To { get; set; }
-
- ///
- /// Gets or Sets Description
- ///
- /// Incoming message received
- [DataMember(Name = "description", IsRequired = true, EmitDefaultValue = true)]
- public string Description { get; set; }
-
- ///
- /// Gets or Sets Message
- ///
- [DataMember(Name = "message", IsRequired = true, EmitDefaultValue = true)]
- public InboundMessageCallbackMessage Message { get; set; }
-
- ///
- /// Returns the string presentation of the object
- ///
- /// String presentation of the object
- public override string ToString()
- {
- StringBuilder sb = new StringBuilder();
- sb.Append("class InboundMessageCallback {\n");
- sb.Append(" Time: ").Append(Time).Append("\n");
- sb.Append(" Type: ").Append(Type).Append("\n");
- sb.Append(" To: ").Append(To).Append("\n");
- sb.Append(" Description: ").Append(Description).Append("\n");
- sb.Append(" Message: ").Append(Message).Append("\n");
- sb.Append("}\n");
- return sb.ToString();
- }
-
- ///
- /// Returns the JSON string presentation of the object
- ///
- /// JSON string presentation of the object
- public virtual string ToJson()
- {
- return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
- }
-
- ///
- /// To validate all properties of the instance
- ///
- /// Validation context
- /// Validation Result
- IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
- {
- yield break;
- }
- }
-
-}
diff --git a/src/Bandwidth.Standard/Model/Message.cs b/src/Bandwidth.Standard/Model/Message.cs
index 7b32bde..41ad137 100644
--- a/src/Bandwidth.Standard/Model/Message.cs
+++ b/src/Bandwidth.Standard/Model/Message.cs
@@ -105,7 +105,7 @@ public partial class Message : IValidatableObject
/// The datetime stamp of the message in ISO 8601
///
/// The datetime stamp of the message in ISO 8601
- /// 2022-09-14T18:20:16Z
+ /// 2024-12-02T20:15:57.278Z
[DataMember(Name = "time", EmitDefaultValue = false)]
public DateTime Time { get; set; }
diff --git a/src/Bandwidth.Standard/Model/MessageFailedCallback.cs b/src/Bandwidth.Standard/Model/MessageCallback.cs
similarity index 73%
rename from src/Bandwidth.Standard/Model/MessageFailedCallback.cs
rename to src/Bandwidth.Standard/Model/MessageCallback.cs
index d0de0e1..d3475e4 100644
--- a/src/Bandwidth.Standard/Model/MessageFailedCallback.cs
+++ b/src/Bandwidth.Standard/Model/MessageCallback.cs
@@ -27,50 +27,51 @@
namespace Bandwidth.Standard.Model
{
///
- /// Message Failed Callback
+ /// Message Callback Schema
///
- [DataContract(Name = "messageFailedCallback")]
- public partial class MessageFailedCallback : IValidatableObject
+ [DataContract(Name = "messageCallback")]
+ public partial class MessageCallback : IValidatableObject
{
+
+ ///
+ /// Gets or Sets Type
+ ///
+ [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)]
+ public CallbackTypeEnum Type { get; set; }
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
[JsonConstructorAttribute]
- protected MessageFailedCallback() { }
+ protected MessageCallback() { }
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
/// time (required).
/// type (required).
/// to (required).
- /// description (required).
+ /// A detailed description of the event described by the callback. (required).
/// message (required).
- /// errorCode (required).
- public MessageFailedCallback(DateTime time = default(DateTime), string type = default(string), string to = default(string), string description = default(string), MessageFailedCallbackMessage message = default(MessageFailedCallbackMessage), int errorCode = default(int))
+ /// Optional error code, applicable only when type is `message-failed`..
+ 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?))
{
this.Time = time;
- // to ensure "type" is required (not null)
- if (type == null)
- {
- throw new ArgumentNullException("type is a required property for MessageFailedCallback and cannot be null");
- }
this.Type = type;
// to ensure "to" is required (not null)
if (to == null)
{
- throw new ArgumentNullException("to is a required property for MessageFailedCallback and cannot be null");
+ throw new ArgumentNullException("to is a required property for MessageCallback and cannot be null");
}
this.To = to;
// to ensure "description" is required (not null)
if (description == null)
{
- throw new ArgumentNullException("description is a required property for MessageFailedCallback and cannot be null");
+ throw new ArgumentNullException("description is a required property for MessageCallback and cannot be null");
}
this.Description = description;
// to ensure "message" is required (not null)
if (message == null)
{
- throw new ArgumentNullException("message is a required property for MessageFailedCallback and cannot be null");
+ throw new ArgumentNullException("message is a required property for MessageCallback and cannot be null");
}
this.Message = message;
this.ErrorCode = errorCode;
@@ -79,17 +80,10 @@ protected MessageFailedCallback() { }
///
/// Gets or Sets Time
///
- /// 2016-09-14T18:20:16Z
+ /// 2024-12-02T20:15:57.278Z
[DataMember(Name = "time", IsRequired = true, EmitDefaultValue = true)]
public DateTime Time { get; set; }
- ///
- /// Gets or Sets Type
- ///
- /// message-failed
- [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)]
- public string Type { get; set; }
-
///
/// Gets or Sets To
///
@@ -98,8 +92,9 @@ protected MessageFailedCallback() { }
public string To { get; set; }
///
- /// Gets or Sets Description
+ /// A detailed description of the event described by the callback.
///
+ /// A detailed description of the event described by the callback.
/// rejected-unallocated-from-number
[DataMember(Name = "description", IsRequired = true, EmitDefaultValue = true)]
public string Description { get; set; }
@@ -108,14 +103,15 @@ protected MessageFailedCallback() { }
/// Gets or Sets Message
///
[DataMember(Name = "message", IsRequired = true, EmitDefaultValue = true)]
- public MessageFailedCallbackMessage Message { get; set; }
+ public MessageCallbackMessage Message { get; set; }
///
- /// Gets or Sets ErrorCode
+ /// Optional error code, applicable only when type is `message-failed`.
///
- /// 9902
- [DataMember(Name = "errorCode", IsRequired = true, EmitDefaultValue = true)]
- public int ErrorCode { get; set; }
+ /// Optional error code, applicable only when type is `message-failed`.
+ /// 4405
+ [DataMember(Name = "errorCode", EmitDefaultValue = true)]
+ public int? ErrorCode { get; set; }
///
/// Returns the string presentation of the object
@@ -124,7 +120,7 @@ protected MessageFailedCallback() { }
public override string ToString()
{
StringBuilder sb = new StringBuilder();
- sb.Append("class MessageFailedCallback {\n");
+ sb.Append("class MessageCallback {\n");
sb.Append(" Time: ").Append(Time).Append("\n");
sb.Append(" Type: ").Append(Type).Append("\n");
sb.Append(" To: ").Append(To).Append("\n");
diff --git a/src/Bandwidth.Standard/Model/InboundMessageCallbackMessage.cs b/src/Bandwidth.Standard/Model/MessageCallbackMessage.cs
similarity index 82%
rename from src/Bandwidth.Standard/Model/InboundMessageCallbackMessage.cs
rename to src/Bandwidth.Standard/Model/MessageCallbackMessage.cs
index c2a051a..7c9b55a 100644
--- a/src/Bandwidth.Standard/Model/InboundMessageCallbackMessage.cs
+++ b/src/Bandwidth.Standard/Model/MessageCallbackMessage.cs
@@ -27,10 +27,10 @@
namespace Bandwidth.Standard.Model
{
///
- /// Inbound Message Callback Message Schema
+ /// Message payload schema within a MessageCallback
///
- [DataContract(Name = "inboundMessageCallbackMessage")]
- public partial class InboundMessageCallbackMessage : IValidatableObject
+ [DataContract(Name = "messageCallbackMessage")]
+ public partial class MessageCallbackMessage : IValidatableObject
{
///
@@ -45,12 +45,12 @@ public partial class InboundMessageCallbackMessage : IValidatableObject
[DataMember(Name = "priority", EmitDefaultValue = false)]
public PriorityEnum? Priority { get; set; }
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
[JsonConstructorAttribute]
- protected InboundMessageCallbackMessage() { }
+ protected MessageCallbackMessage() { }
///
- /// Initializes a new instance of the class.
+ /// Initializes a new instance of the class.
///
/// id (required).
/// owner (required).
@@ -62,26 +62,26 @@ protected InboundMessageCallbackMessage() { }
/// from (required).
/// text (required).
/// tag.
- /// media.
+ /// Optional media, applicable only for mms.
/// priority.
- public InboundMessageCallbackMessage(string id = default(string), string owner = default(string), string applicationId = default(string), DateTime time = default(DateTime), int segmentCount = default(int), MessageDirectionEnum direction = default(MessageDirectionEnum), List to = default(List), string from = default(string), string text = default(string), string tag = default(string), List media = default(List), PriorityEnum? priority = default(PriorityEnum?))
+ public MessageCallbackMessage(string id = default(string), string owner = default(string), string applicationId = default(string), DateTime time = default(DateTime), int segmentCount = default(int), MessageDirectionEnum direction = default(MessageDirectionEnum), List to = default(List), string from = default(string), string text = default(string), string tag = default(string), List media = default(List), PriorityEnum? priority = default(PriorityEnum?))
{
// to ensure "id" is required (not null)
if (id == null)
{
- throw new ArgumentNullException("id is a required property for InboundMessageCallbackMessage and cannot be null");
+ throw new ArgumentNullException("id is a required property for MessageCallbackMessage and cannot be null");
}
this.Id = id;
// to ensure "owner" is required (not null)
if (owner == null)
{
- throw new ArgumentNullException("owner is a required property for InboundMessageCallbackMessage and cannot be null");
+ throw new ArgumentNullException("owner is a required property for MessageCallbackMessage and cannot be null");
}
this.Owner = owner;
// to ensure "applicationId" is required (not null)
if (applicationId == null)
{
- throw new ArgumentNullException("applicationId is a required property for InboundMessageCallbackMessage and cannot be null");
+ throw new ArgumentNullException("applicationId is a required property for MessageCallbackMessage and cannot be null");
}
this.ApplicationId = applicationId;
this.Time = time;
@@ -90,19 +90,19 @@ protected InboundMessageCallbackMessage() { }
// to ensure "to" is required (not null)
if (to == null)
{
- throw new ArgumentNullException("to is a required property for InboundMessageCallbackMessage and cannot be null");
+ throw new ArgumentNullException("to is a required property for MessageCallbackMessage and cannot be null");
}
this.To = to;
// to ensure "from" is required (not null)
if (from == null)
{
- throw new ArgumentNullException("from is a required property for InboundMessageCallbackMessage and cannot be null");
+ throw new ArgumentNullException("from is a required property for MessageCallbackMessage and cannot be null");
}
this.From = from;
// to ensure "text" is required (not null)
if (text == null)
{
- throw new ArgumentNullException("text is a required property for InboundMessageCallbackMessage and cannot be null");
+ throw new ArgumentNullException("text is a required property for MessageCallbackMessage and cannot be null");
}
this.Text = text;
this.Tag = tag;
@@ -134,7 +134,7 @@ protected InboundMessageCallbackMessage() { }
///
/// Gets or Sets Time
///
- /// 2016-09-14T18:20:16Z
+ /// 2024-12-02T20:15:57.666Z
[DataMember(Name = "time", IsRequired = true, EmitDefaultValue = true)]
public DateTime Time { get; set; }
@@ -174,10 +174,11 @@ protected InboundMessageCallbackMessage() { }
public string Tag { get; set; }
///
- /// Gets or Sets Media
+ /// Optional media, applicable only for mms
///
+ /// Optional media, applicable only for mms
/// ["https://dev.bandwidth.com/images/bandwidth-logo.png","https://dev.bandwidth.com/images/github_logo.png"]
- [DataMember(Name = "media", EmitDefaultValue = false)]
+ [DataMember(Name = "media", EmitDefaultValue = true)]
public List Media { get; set; }
///
@@ -187,7 +188,7 @@ protected InboundMessageCallbackMessage() { }
public override string ToString()
{
StringBuilder sb = new StringBuilder();
- sb.Append("class InboundMessageCallbackMessage {\n");
+ sb.Append("class MessageCallbackMessage {\n");
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" Owner: ").Append(Owner).Append("\n");
sb.Append(" ApplicationId: ").Append(ApplicationId).Append("\n");
diff --git a/src/Bandwidth.Standard/Model/MessageDeliveredCallback.cs b/src/Bandwidth.Standard/Model/MessageDeliveredCallback.cs
deleted file mode 100644
index db8a47d..0000000
--- a/src/Bandwidth.Standard/Model/MessageDeliveredCallback.cs
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Bandwidth
- *
- * Bandwidth's Communication APIs
- *
- * The version of the OpenAPI document: 1.0.0
- * Contact: letstalk@bandwidth.com
- * Generated by: https://github.com/openapitools/openapi-generator.git
- */
-
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Linq;
-using System.IO;
-using System.Runtime.Serialization;
-using System.Text;
-using System.Text.RegularExpressions;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-using Newtonsoft.Json.Linq;
-using System.ComponentModel.DataAnnotations;
-using OpenAPIDateConverter = Bandwidth.Standard.Client.OpenAPIDateConverter;
-
-namespace Bandwidth.Standard.Model
-{
- ///
- /// Message Delivered Callback
- ///
- [DataContract(Name = "messageDeliveredCallback")]
- public partial class MessageDeliveredCallback : IValidatableObject
- {
- ///
- /// Initializes a new instance of the class.
- ///
- [JsonConstructorAttribute]
- protected MessageDeliveredCallback() { }
- ///
- /// Initializes a new instance of the class.
- ///
- /// time (required).
- /// type (required).
- /// to (required).
- /// description (required).
- /// message (required).
- public MessageDeliveredCallback(DateTime time = default(DateTime), string type = default(string), string to = default(string), string description = default(string), MessageDeliveredCallbackMessage message = default(MessageDeliveredCallbackMessage))
- {
- this.Time = time;
- // to ensure "type" is required (not null)
- if (type == null)
- {
- throw new ArgumentNullException("type is a required property for MessageDeliveredCallback and cannot be null");
- }
- this.Type = type;
- // to ensure "to" is required (not null)
- if (to == null)
- {
- throw new ArgumentNullException("to is a required property for MessageDeliveredCallback and cannot be null");
- }
- this.To = to;
- // to ensure "description" is required (not null)
- if (description == null)
- {
- throw new ArgumentNullException("description is a required property for MessageDeliveredCallback and cannot be null");
- }
- this.Description = description;
- // to ensure "message" is required (not null)
- if (message == null)
- {
- throw new ArgumentNullException("message is a required property for MessageDeliveredCallback and cannot be null");
- }
- this.Message = message;
- }
-
- ///
- /// Gets or Sets Time
- ///
- /// 2016-09-14T18:20:16Z
- [DataMember(Name = "time", IsRequired = true, EmitDefaultValue = true)]
- public DateTime Time { get; set; }
-
- ///
- /// Gets or Sets Type
- ///
- /// message-delivered
- [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)]
- public string Type { get; set; }
-
- ///
- /// Gets or Sets To
- ///
- /// +15552223333
- [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = true)]
- public string To { get; set; }
-
- ///
- /// Gets or Sets Description
- ///
- /// Message delivered to carrier.
- [DataMember(Name = "description", IsRequired = true, EmitDefaultValue = true)]
- public string Description { get; set; }
-
- ///
- /// Gets or Sets Message
- ///
- [DataMember(Name = "message", IsRequired = true, EmitDefaultValue = true)]
- public MessageDeliveredCallbackMessage Message { get; set; }
-
- ///
- /// Returns the string presentation of the object
- ///
- /// String presentation of the object
- public override string ToString()
- {
- StringBuilder sb = new StringBuilder();
- sb.Append("class MessageDeliveredCallback {\n");
- sb.Append(" Time: ").Append(Time).Append("\n");
- sb.Append(" Type: ").Append(Type).Append("\n");
- sb.Append(" To: ").Append(To).Append("\n");
- sb.Append(" Description: ").Append(Description).Append("\n");
- sb.Append(" Message: ").Append(Message).Append("\n");
- sb.Append("}\n");
- return sb.ToString();
- }
-
- ///
- /// Returns the JSON string presentation of the object
- ///
- /// JSON string presentation of the object
- public virtual string ToJson()
- {
- return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
- }
-
- ///
- /// To validate all properties of the instance
- ///
- /// Validation context
- /// Validation Result
- IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
- {
- yield break;
- }
- }
-
-}
diff --git a/src/Bandwidth.Standard/Model/MessageDeliveredCallbackMessage.cs b/src/Bandwidth.Standard/Model/MessageDeliveredCallbackMessage.cs
deleted file mode 100644
index a3587a1..0000000
--- a/src/Bandwidth.Standard/Model/MessageDeliveredCallbackMessage.cs
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- * Bandwidth
- *
- * Bandwidth's Communication APIs
- *
- * The version of the OpenAPI document: 1.0.0
- * Contact: letstalk@bandwidth.com
- * Generated by: https://github.com/openapitools/openapi-generator.git
- */
-
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Linq;
-using System.IO;
-using System.Runtime.Serialization;
-using System.Text;
-using System.Text.RegularExpressions;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-using Newtonsoft.Json.Linq;
-using System.ComponentModel.DataAnnotations;
-using OpenAPIDateConverter = Bandwidth.Standard.Client.OpenAPIDateConverter;
-
-namespace Bandwidth.Standard.Model
-{
- ///
- /// Message Delivered Callback Message Schema
- ///
- [DataContract(Name = "messageDeliveredCallbackMessage")]
- public partial class MessageDeliveredCallbackMessage : IValidatableObject
- {
-
- ///
- /// Gets or Sets Direction
- ///
- [DataMember(Name = "direction", IsRequired = true, EmitDefaultValue = true)]
- public MessageDirectionEnum Direction { get; set; }
-
- ///
- /// Gets or Sets Priority
- ///
- [DataMember(Name = "priority", EmitDefaultValue = false)]
- public PriorityEnum? Priority { get; set; }
- ///
- /// Initializes a new instance of the class.
- ///
- [JsonConstructorAttribute]
- protected MessageDeliveredCallbackMessage() { }
- ///
- /// Initializes a new instance of the class.
- ///
- /// id (required).
- /// owner (required).
- /// applicationId (required).
- /// time (required).
- /// segmentCount (required).
- /// direction (required).
- /// to (required).
- /// from (required).
- /// text (required).
- /// tag (required).
- /// media.
- /// priority.
- public MessageDeliveredCallbackMessage(string id = default(string), string owner = default(string), string applicationId = default(string), DateTime time = default(DateTime), int segmentCount = default(int), MessageDirectionEnum direction = default(MessageDirectionEnum), List to = default(List), string from = default(string), string text = default(string), string tag = default(string), List media = default(List), PriorityEnum? priority = default(PriorityEnum?))
- {
- // to ensure "id" is required (not null)
- if (id == null)
- {
- throw new ArgumentNullException("id is a required property for MessageDeliveredCallbackMessage and cannot be null");
- }
- this.Id = id;
- // to ensure "owner" is required (not null)
- if (owner == null)
- {
- throw new ArgumentNullException("owner is a required property for MessageDeliveredCallbackMessage and cannot be null");
- }
- this.Owner = owner;
- // to ensure "applicationId" is required (not null)
- if (applicationId == null)
- {
- throw new ArgumentNullException("applicationId is a required property for MessageDeliveredCallbackMessage and cannot be null");
- }
- this.ApplicationId = applicationId;
- this.Time = time;
- this.SegmentCount = segmentCount;
- this.Direction = direction;
- // to ensure "to" is required (not null)
- if (to == null)
- {
- throw new ArgumentNullException("to is a required property for MessageDeliveredCallbackMessage and cannot be null");
- }
- this.To = to;
- // to ensure "from" is required (not null)
- if (from == null)
- {
- throw new ArgumentNullException("from is a required property for MessageDeliveredCallbackMessage and cannot be null");
- }
- this.From = from;
- // to ensure "text" is required (not null)
- if (text == null)
- {
- throw new ArgumentNullException("text is a required property for MessageDeliveredCallbackMessage and cannot be null");
- }
- this.Text = text;
- // to ensure "tag" is required (not null)
- if (tag == null)
- {
- throw new ArgumentNullException("tag is a required property for MessageDeliveredCallbackMessage and cannot be null");
- }
- this.Tag = tag;
- this.Media = media;
- this.Priority = priority;
- }
-
- ///
- /// Gets or Sets Id
- ///
- /// 1661365814859loidf7mcwd4qacn7
- [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)]
- public string Id { get; set; }
-
- ///
- /// Gets or Sets Owner
- ///
- /// +15553332222
- [DataMember(Name = "owner", IsRequired = true, EmitDefaultValue = true)]
- public string Owner { get; set; }
-
- ///
- /// Gets or Sets ApplicationId
- ///
- /// 93de2206-9669-4e07-948d-329f4b722ee2
- [DataMember(Name = "applicationId", IsRequired = true, EmitDefaultValue = true)]
- public string ApplicationId { get; set; }
-
- ///
- /// Gets or Sets Time
- ///
- /// 2016-09-14T18:20:16Z
- [DataMember(Name = "time", IsRequired = true, EmitDefaultValue = true)]
- public DateTime Time { get; set; }
-
- ///
- /// Gets or Sets SegmentCount
- ///
- /// 1
- [DataMember(Name = "segmentCount", IsRequired = true, EmitDefaultValue = true)]
- public int SegmentCount { get; set; }
-
- ///
- /// Gets or Sets To
- ///
- /// ["+15552223333"]
- [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = true)]
- public List To { get; set; }
-
- ///
- /// Gets or Sets From
- ///
- /// +15553332222
- [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = true)]
- public string From { get; set; }
-
- ///
- /// Gets or Sets Text
- ///
- /// Hello world
- [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = true)]
- public string Text { get; set; }
-
- ///
- /// Gets or Sets Tag
- ///
- /// custom string
- [DataMember(Name = "tag", IsRequired = true, EmitDefaultValue = true)]
- public string Tag { get; set; }
-
- ///
- /// Gets or Sets Media
- ///
- /// ["https://dev.bandwidth.com/images/bandwidth-logo.png","https://dev.bandwidth.com/images/github_logo.png"]
- [DataMember(Name = "media", EmitDefaultValue = false)]
- public List Media { get; set; }
-
- ///
- /// Returns the string presentation of the object
- ///
- /// String presentation of the object
- public override string ToString()
- {
- StringBuilder sb = new StringBuilder();
- sb.Append("class MessageDeliveredCallbackMessage {\n");
- sb.Append(" Id: ").Append(Id).Append("\n");
- sb.Append(" Owner: ").Append(Owner).Append("\n");
- sb.Append(" ApplicationId: ").Append(ApplicationId).Append("\n");
- sb.Append(" Time: ").Append(Time).Append("\n");
- sb.Append(" SegmentCount: ").Append(SegmentCount).Append("\n");
- sb.Append(" Direction: ").Append(Direction).Append("\n");
- sb.Append(" To: ").Append(To).Append("\n");
- sb.Append(" From: ").Append(From).Append("\n");
- sb.Append(" Text: ").Append(Text).Append("\n");
- sb.Append(" Tag: ").Append(Tag).Append("\n");
- sb.Append(" Media: ").Append(Media).Append("\n");
- sb.Append(" Priority: ").Append(Priority).Append("\n");
- sb.Append("}\n");
- return sb.ToString();
- }
-
- ///
- /// Returns the JSON string presentation of the object
- ///
- /// JSON string presentation of the object
- public virtual string ToJson()
- {
- return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
- }
-
- ///
- /// To validate all properties of the instance
- ///
- /// Validation context
- /// Validation Result
- IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
- {
- yield break;
- }
- }
-
-}
diff --git a/src/Bandwidth.Standard/Model/MessageFailedCallbackMessage.cs b/src/Bandwidth.Standard/Model/MessageFailedCallbackMessage.cs
deleted file mode 100644
index d5f1691..0000000
--- a/src/Bandwidth.Standard/Model/MessageFailedCallbackMessage.cs
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- * Bandwidth
- *
- * Bandwidth's Communication APIs
- *
- * The version of the OpenAPI document: 1.0.0
- * Contact: letstalk@bandwidth.com
- * Generated by: https://github.com/openapitools/openapi-generator.git
- */
-
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Linq;
-using System.IO;
-using System.Runtime.Serialization;
-using System.Text;
-using System.Text.RegularExpressions;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-using Newtonsoft.Json.Linq;
-using System.ComponentModel.DataAnnotations;
-using OpenAPIDateConverter = Bandwidth.Standard.Client.OpenAPIDateConverter;
-
-namespace Bandwidth.Standard.Model
-{
- ///
- /// Message Failed Callback Message Schema
- ///
- [DataContract(Name = "messageFailedCallbackMessage")]
- public partial class MessageFailedCallbackMessage : IValidatableObject
- {
-
- ///
- /// Gets or Sets Direction
- ///
- [DataMember(Name = "direction", IsRequired = true, EmitDefaultValue = true)]
- public MessageDirectionEnum Direction { get; set; }
-
- ///
- /// Gets or Sets Priority
- ///
- [DataMember(Name = "priority", EmitDefaultValue = false)]
- public PriorityEnum? Priority { get; set; }
- ///
- /// Initializes a new instance of the class.
- ///
- [JsonConstructorAttribute]
- protected MessageFailedCallbackMessage() { }
- ///
- /// Initializes a new instance of the class.
- ///
- /// id (required).
- /// owner (required).
- /// applicationId (required).
- /// time (required).
- /// segmentCount (required).
- /// direction (required).
- /// to (required).
- /// from (required).
- /// text (required).
- /// tag (required).
- /// media.
- /// priority.
- public MessageFailedCallbackMessage(string id = default(string), string owner = default(string), string applicationId = default(string), DateTime time = default(DateTime), int segmentCount = default(int), MessageDirectionEnum direction = default(MessageDirectionEnum), List to = default(List), string from = default(string), string text = default(string), string tag = default(string), List media = default(List), PriorityEnum? priority = default(PriorityEnum?))
- {
- // to ensure "id" is required (not null)
- if (id == null)
- {
- throw new ArgumentNullException("id is a required property for MessageFailedCallbackMessage and cannot be null");
- }
- this.Id = id;
- // to ensure "owner" is required (not null)
- if (owner == null)
- {
- throw new ArgumentNullException("owner is a required property for MessageFailedCallbackMessage and cannot be null");
- }
- this.Owner = owner;
- // to ensure "applicationId" is required (not null)
- if (applicationId == null)
- {
- throw new ArgumentNullException("applicationId is a required property for MessageFailedCallbackMessage and cannot be null");
- }
- this.ApplicationId = applicationId;
- this.Time = time;
- this.SegmentCount = segmentCount;
- this.Direction = direction;
- // to ensure "to" is required (not null)
- if (to == null)
- {
- throw new ArgumentNullException("to is a required property for MessageFailedCallbackMessage and cannot be null");
- }
- this.To = to;
- // to ensure "from" is required (not null)
- if (from == null)
- {
- throw new ArgumentNullException("from is a required property for MessageFailedCallbackMessage and cannot be null");
- }
- this.From = from;
- // to ensure "text" is required (not null)
- if (text == null)
- {
- throw new ArgumentNullException("text is a required property for MessageFailedCallbackMessage and cannot be null");
- }
- this.Text = text;
- // to ensure "tag" is required (not null)
- if (tag == null)
- {
- throw new ArgumentNullException("tag is a required property for MessageFailedCallbackMessage and cannot be null");
- }
- this.Tag = tag;
- this.Media = media;
- this.Priority = priority;
- }
-
- ///
- /// Gets or Sets Id
- ///
- /// 1661365814859loidf7mcwd4qacn7
- [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)]
- public string Id { get; set; }
-
- ///
- /// Gets or Sets Owner
- ///
- /// +15553332222
- [DataMember(Name = "owner", IsRequired = true, EmitDefaultValue = true)]
- public string Owner { get; set; }
-
- ///
- /// Gets or Sets ApplicationId
- ///
- /// 93de2206-9669-4e07-948d-329f4b722ee2
- [DataMember(Name = "applicationId", IsRequired = true, EmitDefaultValue = true)]
- public string ApplicationId { get; set; }
-
- ///
- /// Gets or Sets Time
- ///
- /// 2016-09-14T18:20:16Z
- [DataMember(Name = "time", IsRequired = true, EmitDefaultValue = true)]
- public DateTime Time { get; set; }
-
- ///
- /// Gets or Sets SegmentCount
- ///
- /// 1
- [DataMember(Name = "segmentCount", IsRequired = true, EmitDefaultValue = true)]
- public int SegmentCount { get; set; }
-
- ///
- /// Gets or Sets To
- ///
- /// ["+15552223333"]
- [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = true)]
- public List To { get; set; }
-
- ///
- /// Gets or Sets From
- ///
- /// +15553332222
- [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = true)]
- public string From { get; set; }
-
- ///
- /// Gets or Sets Text
- ///
- /// Hello world
- [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = true)]
- public string Text { get; set; }
-
- ///
- /// Gets or Sets Tag
- ///
- /// custom string
- [DataMember(Name = "tag", IsRequired = true, EmitDefaultValue = true)]
- public string Tag { get; set; }
-
- ///
- /// Gets or Sets Media
- ///
- /// ["https://dev.bandwidth.com/images/bandwidth-logo.png","https://dev.bandwidth.com/images/github_logo.png"]
- [DataMember(Name = "media", EmitDefaultValue = false)]
- public List Media { get; set; }
-
- ///
- /// Returns the string presentation of the object
- ///
- /// String presentation of the object
- public override string ToString()
- {
- StringBuilder sb = new StringBuilder();
- sb.Append("class MessageFailedCallbackMessage {\n");
- sb.Append(" Id: ").Append(Id).Append("\n");
- sb.Append(" Owner: ").Append(Owner).Append("\n");
- sb.Append(" ApplicationId: ").Append(ApplicationId).Append("\n");
- sb.Append(" Time: ").Append(Time).Append("\n");
- sb.Append(" SegmentCount: ").Append(SegmentCount).Append("\n");
- sb.Append(" Direction: ").Append(Direction).Append("\n");
- sb.Append(" To: ").Append(To).Append("\n");
- sb.Append(" From: ").Append(From).Append("\n");
- sb.Append(" Text: ").Append(Text).Append("\n");
- sb.Append(" Tag: ").Append(Tag).Append("\n");
- sb.Append(" Media: ").Append(Media).Append("\n");
- sb.Append(" Priority: ").Append(Priority).Append("\n");
- sb.Append("}\n");
- return sb.ToString();
- }
-
- ///
- /// Returns the JSON string presentation of the object
- ///
- /// JSON string presentation of the object
- public virtual string ToJson()
- {
- return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
- }
-
- ///
- /// To validate all properties of the instance
- ///
- /// Validation context
- /// Validation Result
- IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
- {
- yield break;
- }
- }
-
-}
diff --git a/src/Bandwidth.Standard/Model/MessageSendingCallback.cs b/src/Bandwidth.Standard/Model/MessageSendingCallback.cs
deleted file mode 100644
index 8a313fd..0000000
--- a/src/Bandwidth.Standard/Model/MessageSendingCallback.cs
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Bandwidth
- *
- * Bandwidth's Communication APIs
- *
- * The version of the OpenAPI document: 1.0.0
- * Contact: letstalk@bandwidth.com
- * Generated by: https://github.com/openapitools/openapi-generator.git
- */
-
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Linq;
-using System.IO;
-using System.Runtime.Serialization;
-using System.Text;
-using System.Text.RegularExpressions;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-using Newtonsoft.Json.Linq;
-using System.ComponentModel.DataAnnotations;
-using OpenAPIDateConverter = Bandwidth.Standard.Client.OpenAPIDateConverter;
-
-namespace Bandwidth.Standard.Model
-{
- ///
- /// Message Sending Callback
- ///
- [DataContract(Name = "messageSendingCallback")]
- public partial class MessageSendingCallback : IValidatableObject
- {
- ///
- /// Initializes a new instance of the class.
- ///
- [JsonConstructorAttribute]
- protected MessageSendingCallback() { }
- ///
- /// Initializes a new instance of the class.
- ///
- /// time (required).
- /// type (required).
- /// to (required).
- /// description (required).
- /// message (required).
- public MessageSendingCallback(DateTime time = default(DateTime), string type = default(string), string to = default(string), string description = default(string), MessageSendingCallbackMessage message = default(MessageSendingCallbackMessage))
- {
- this.Time = time;
- // to ensure "type" is required (not null)
- if (type == null)
- {
- throw new ArgumentNullException("type is a required property for MessageSendingCallback and cannot be null");
- }
- this.Type = type;
- // to ensure "to" is required (not null)
- if (to == null)
- {
- throw new ArgumentNullException("to is a required property for MessageSendingCallback and cannot be null");
- }
- this.To = to;
- // to ensure "description" is required (not null)
- if (description == null)
- {
- throw new ArgumentNullException("description is a required property for MessageSendingCallback and cannot be null");
- }
- this.Description = description;
- // to ensure "message" is required (not null)
- if (message == null)
- {
- throw new ArgumentNullException("message is a required property for MessageSendingCallback and cannot be null");
- }
- this.Message = message;
- }
-
- ///
- /// Gets or Sets Time
- ///
- /// 2016-09-14T18:20:16Z
- [DataMember(Name = "time", IsRequired = true, EmitDefaultValue = true)]
- public DateTime Time { get; set; }
-
- ///
- /// Gets or Sets Type
- ///
- /// message-sending
- [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)]
- public string Type { get; set; }
-
- ///
- /// Gets or Sets To
- ///
- /// +15552223333
- [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = true)]
- public string To { get; set; }
-
- ///
- /// Gets or Sets Description
- ///
- /// Message is sending to carrier
- [DataMember(Name = "description", IsRequired = true, EmitDefaultValue = true)]
- public string Description { get; set; }
-
- ///
- /// Gets or Sets Message
- ///
- [DataMember(Name = "message", IsRequired = true, EmitDefaultValue = true)]
- public MessageSendingCallbackMessage Message { get; set; }
-
- ///
- /// Returns the string presentation of the object
- ///
- /// String presentation of the object
- public override string ToString()
- {
- StringBuilder sb = new StringBuilder();
- sb.Append("class MessageSendingCallback {\n");
- sb.Append(" Time: ").Append(Time).Append("\n");
- sb.Append(" Type: ").Append(Type).Append("\n");
- sb.Append(" To: ").Append(To).Append("\n");
- sb.Append(" Description: ").Append(Description).Append("\n");
- sb.Append(" Message: ").Append(Message).Append("\n");
- sb.Append("}\n");
- return sb.ToString();
- }
-
- ///
- /// Returns the JSON string presentation of the object
- ///
- /// JSON string presentation of the object
- public virtual string ToJson()
- {
- return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
- }
-
- ///
- /// To validate all properties of the instance
- ///
- /// Validation context
- /// Validation Result
- IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
- {
- yield break;
- }
- }
-
-}
diff --git a/src/Bandwidth.Standard/Model/MessageSendingCallbackMessage.cs b/src/Bandwidth.Standard/Model/MessageSendingCallbackMessage.cs
deleted file mode 100644
index bf0ea7f..0000000
--- a/src/Bandwidth.Standard/Model/MessageSendingCallbackMessage.cs
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- * Bandwidth
- *
- * Bandwidth's Communication APIs
- *
- * The version of the OpenAPI document: 1.0.0
- * Contact: letstalk@bandwidth.com
- * Generated by: https://github.com/openapitools/openapi-generator.git
- */
-
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Collections.ObjectModel;
-using System.Linq;
-using System.IO;
-using System.Runtime.Serialization;
-using System.Text;
-using System.Text.RegularExpressions;
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-using Newtonsoft.Json.Linq;
-using System.ComponentModel.DataAnnotations;
-using OpenAPIDateConverter = Bandwidth.Standard.Client.OpenAPIDateConverter;
-
-namespace Bandwidth.Standard.Model
-{
- ///
- /// Message Sending Callback Message Schema
- ///
- [DataContract(Name = "messageSendingCallbackMessage")]
- public partial class MessageSendingCallbackMessage : IValidatableObject
- {
-
- ///
- /// Gets or Sets Direction
- ///
- [DataMember(Name = "direction", IsRequired = true, EmitDefaultValue = true)]
- public MessageDirectionEnum Direction { get; set; }
-
- ///
- /// Gets or Sets Priority
- ///
- [DataMember(Name = "priority", EmitDefaultValue = false)]
- public PriorityEnum? Priority { get; set; }
- ///
- /// Initializes a new instance of the class.
- ///
- [JsonConstructorAttribute]
- protected MessageSendingCallbackMessage() { }
- ///
- /// Initializes a new instance of the class.
- ///
- /// id (required).
- /// owner (required).
- /// applicationId (required).
- /// time (required).
- /// segmentCount (required).
- /// direction (required).
- /// to (required).
- /// from (required).
- /// text (required).
- /// tag.
- /// media (required).
- /// priority.
- public MessageSendingCallbackMessage(string id = default(string), string owner = default(string), string applicationId = default(string), DateTime time = default(DateTime), int segmentCount = default(int), MessageDirectionEnum direction = default(MessageDirectionEnum), List to = default(List), string from = default(string), string text = default(string), string tag = default(string), List media = default(List), PriorityEnum? priority = default(PriorityEnum?))
- {
- // to ensure "id" is required (not null)
- if (id == null)
- {
- throw new ArgumentNullException("id is a required property for MessageSendingCallbackMessage and cannot be null");
- }
- this.Id = id;
- // to ensure "owner" is required (not null)
- if (owner == null)
- {
- throw new ArgumentNullException("owner is a required property for MessageSendingCallbackMessage and cannot be null");
- }
- this.Owner = owner;
- // to ensure "applicationId" is required (not null)
- if (applicationId == null)
- {
- throw new ArgumentNullException("applicationId is a required property for MessageSendingCallbackMessage and cannot be null");
- }
- this.ApplicationId = applicationId;
- this.Time = time;
- this.SegmentCount = segmentCount;
- this.Direction = direction;
- // to ensure "to" is required (not null)
- if (to == null)
- {
- throw new ArgumentNullException("to is a required property for MessageSendingCallbackMessage and cannot be null");
- }
- this.To = to;
- // to ensure "from" is required (not null)
- if (from == null)
- {
- throw new ArgumentNullException("from is a required property for MessageSendingCallbackMessage and cannot be null");
- }
- this.From = from;
- // to ensure "text" is required (not null)
- if (text == null)
- {
- throw new ArgumentNullException("text is a required property for MessageSendingCallbackMessage and cannot be null");
- }
- this.Text = text;
- // to ensure "media" is required (not null)
- if (media == null)
- {
- throw new ArgumentNullException("media is a required property for MessageSendingCallbackMessage and cannot be null");
- }
- this.Media = media;
- this.Tag = tag;
- this.Priority = priority;
- }
-
- ///
- /// Gets or Sets Id
- ///
- /// 1661365814859loidf7mcwd4qacn7
- [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)]
- public string Id { get; set; }
-
- ///
- /// Gets or Sets Owner
- ///
- /// +15553332222
- [DataMember(Name = "owner", IsRequired = true, EmitDefaultValue = true)]
- public string Owner { get; set; }
-
- ///
- /// Gets or Sets ApplicationId
- ///
- /// 93de2206-9669-4e07-948d-329f4b722ee2
- [DataMember(Name = "applicationId", IsRequired = true, EmitDefaultValue = true)]
- public string ApplicationId { get; set; }
-
- ///
- /// Gets or Sets Time
- ///
- /// 2016-09-14T18:20:16Z
- [DataMember(Name = "time", IsRequired = true, EmitDefaultValue = true)]
- public DateTime Time { get; set; }
-
- ///
- /// Gets or Sets SegmentCount
- ///
- /// 1
- [DataMember(Name = "segmentCount", IsRequired = true, EmitDefaultValue = true)]
- public int SegmentCount { get; set; }
-
- ///
- /// Gets or Sets To
- ///
- /// ["+15552223333"]
- [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = true)]
- public List To { get; set; }
-
- ///
- /// Gets or Sets From
- ///
- /// +15553332222
- [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = true)]
- public string From { get; set; }
-
- ///
- /// Gets or Sets Text
- ///
- /// Hello world
- [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = true)]
- public string Text { get; set; }
-
- ///
- /// Gets or Sets Tag
- ///
- /// custom string
- [DataMember(Name = "tag", EmitDefaultValue = false)]
- public string Tag { get; set; }
-
- ///
- /// Gets or Sets Media
- ///
- /// ["https://dev.bandwidth.com/images/bandwidth-logo.png","https://dev.bandwidth.com/images/github_logo.png"]
- [DataMember(Name = "media", IsRequired = true, EmitDefaultValue = true)]
- public List Media { get; set; }
-
- ///
- /// Returns the string presentation of the object
- ///
- /// String presentation of the object
- public override string ToString()
- {
- StringBuilder sb = new StringBuilder();
- sb.Append("class MessageSendingCallbackMessage {\n");
- sb.Append(" Id: ").Append(Id).Append("\n");
- sb.Append(" Owner: ").Append(Owner).Append("\n");
- sb.Append(" ApplicationId: ").Append(ApplicationId).Append("\n");
- sb.Append(" Time: ").Append(Time).Append("\n");
- sb.Append(" SegmentCount: ").Append(SegmentCount).Append("\n");
- sb.Append(" Direction: ").Append(Direction).Append("\n");
- sb.Append(" To: ").Append(To).Append("\n");
- sb.Append(" From: ").Append(From).Append("\n");
- sb.Append(" Text: ").Append(Text).Append("\n");
- sb.Append(" Tag: ").Append(Tag).Append("\n");
- sb.Append(" Media: ").Append(Media).Append("\n");
- sb.Append(" Priority: ").Append(Priority).Append("\n");
- sb.Append("}\n");
- return sb.ToString();
- }
-
- ///
- /// Returns the JSON string presentation of the object
- ///
- /// JSON string presentation of the object
- public virtual string ToJson()
- {
- return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
- }
-
- ///
- /// To validate all properties of the instance
- ///
- /// Validation context
- /// Validation Result
- IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
- {
- yield break;
- }
- }
-
-}