From e00ea240bb17baa833b1550c40bc33eb797ab2b2 Mon Sep 17 00:00:00 2001 From: DX-Bandwidth Date: Tue, 29 Jul 2025 14:08:48 +0000 Subject: [PATCH 1/9] Generate SDK with OpenAPI Generator Version --- .openapi-generator/FILES | 48 +- Bandwidth.Standard.sln | 10 +- README.md | 25 +- api/openapi.yaml | 1171 ++++++++++++++--- bandwidth.yml | 690 +++++++--- docs/Callback.md | 18 + docs/CreateMultiChannelMessageResponse.md | 2 +- docs/ErrorObject.md | 5 +- docs/ErrorSource.md | 14 + docs/InboundCallback.md | 16 + docs/InboundCallbackMessage.md | 25 + docs/InboundCallbackTypeEnum.md | 10 + docs/ListMessageItem.md | 2 +- docs/Message.md | 6 +- docs/MessageRequest.md | 2 +- docs/MessagesApi.md | 1 + docs/MmsMessageContent.md | 2 +- docs/MmsMessageContentFile.md | 10 + docs/MultiChannelAction.md | 2 +- docs/MultiChannelActionCalendarEvent.md | 2 +- docs/MultiChannelApi.md | 1 + docs/MultiChannelChannelListObjectContent.md | 2 +- docs/MultiChannelError.md | 12 + docs/MultiChannelMessageContent.md | 12 + docs/MultiChannelMessageResponseData.md | 18 + ...nnelMessageResponseDataChannelListInner.md | 14 + docs/PriorityEnum.md | 2 +- docs/RbmActionBase.md | 2 +- docs/RbmActionDial.md | 2 +- docs/RbmActionOpenUrl.md | 2 +- docs/RbmActionViewLocation.md | 2 +- docs/RbmLocationResponse.md | 11 + docs/RbmSuggestionResponse.md | 11 + docs/StatusCallback.md | 18 + docs/StatusCallbackMessage.md | 23 + docs/StatusCallbackTypeEnum.md | 10 + docs/TollFreeVerificationApi.md | 102 ++ .../Api/TollFreeVerificationApi.cs | 224 ++++ .../Client/Configuration.cs | 12 + src/Bandwidth.Standard/Model/Callback.cs | 262 ++++ .../CreateMultiChannelMessageResponse.cs | 6 +- src/Bandwidth.Standard/Model/ErrorObject.cs | 57 +- src/Bandwidth.Standard/Model/ErrorSource.cs | 114 ++ .../Model/InboundCallback.cs | 155 +++ .../Model/InboundCallbackMessage.cs | 266 ++++ .../Model/InboundCallbackTypeEnum.cs | 55 + .../Model/ListMessageItem.cs | 6 +- src/Bandwidth.Standard/Model/Message.cs | 22 +- .../Model/MessageRequest.cs | 6 +- .../Model/MmsMessageContent.cs | 10 +- .../Model/MmsMessageContentFile.cs | 101 ++ .../Model/MultiChannelActionCalendarEvent.cs | 24 +- .../Model/MultiChannelError.cs | 102 ++ .../Model/MultiChannelMessageContent.cs | 92 ++ .../Model/MultiChannelMessageResponseData.cs | 177 +++ ...nnelMessageResponseDataChannelListInner.cs | 149 +++ src/Bandwidth.Standard/Model/PriorityEnum.cs | 4 +- src/Bandwidth.Standard/Model/RbmActionBase.cs | 26 +- src/Bandwidth.Standard/Model/RbmActionDial.cs | 24 +- .../Model/RbmActionOpenUrl.cs | 24 +- .../Model/RbmActionViewLocation.cs | 24 +- .../Model/RbmLocationResponse.cs | 96 ++ .../Model/RbmSuggestionResponse.cs | 102 ++ .../Model/StatusCallback.cs | 177 +++ .../Model/StatusCallbackMessage.cs | 239 ++++ .../Model/StatusCallbackTypeEnum.cs | 61 + 66 files changed, 4389 insertions(+), 533 deletions(-) create mode 100644 docs/Callback.md create mode 100644 docs/ErrorSource.md create mode 100644 docs/InboundCallback.md create mode 100644 docs/InboundCallbackMessage.md create mode 100644 docs/InboundCallbackTypeEnum.md create mode 100644 docs/MmsMessageContentFile.md create mode 100644 docs/MultiChannelError.md create mode 100644 docs/MultiChannelMessageContent.md create mode 100644 docs/MultiChannelMessageResponseData.md create mode 100644 docs/MultiChannelMessageResponseDataChannelListInner.md create mode 100644 docs/RbmLocationResponse.md create mode 100644 docs/RbmSuggestionResponse.md create mode 100644 docs/StatusCallback.md create mode 100644 docs/StatusCallbackMessage.md create mode 100644 docs/StatusCallbackTypeEnum.md create mode 100644 src/Bandwidth.Standard/Model/Callback.cs create mode 100644 src/Bandwidth.Standard/Model/ErrorSource.cs create mode 100644 src/Bandwidth.Standard/Model/InboundCallback.cs create mode 100644 src/Bandwidth.Standard/Model/InboundCallbackMessage.cs create mode 100644 src/Bandwidth.Standard/Model/InboundCallbackTypeEnum.cs create mode 100644 src/Bandwidth.Standard/Model/MmsMessageContentFile.cs create mode 100644 src/Bandwidth.Standard/Model/MultiChannelError.cs create mode 100644 src/Bandwidth.Standard/Model/MultiChannelMessageContent.cs create mode 100644 src/Bandwidth.Standard/Model/MultiChannelMessageResponseData.cs create mode 100644 src/Bandwidth.Standard/Model/MultiChannelMessageResponseDataChannelListInner.cs create mode 100644 src/Bandwidth.Standard/Model/RbmLocationResponse.cs create mode 100644 src/Bandwidth.Standard/Model/RbmSuggestionResponse.cs create mode 100644 src/Bandwidth.Standard/Model/StatusCallback.cs create mode 100644 src/Bandwidth.Standard/Model/StatusCallbackMessage.cs create mode 100644 src/Bandwidth.Standard/Model/StatusCallbackTypeEnum.cs diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index de7c7d8f..aac0f9f7 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -18,8 +18,8 @@ docs/CallTranscriptionDetectedLanguageEnum.md docs/CallTranscriptionMetadata.md docs/CallTranscriptionResponse.md docs/CallTranscriptionTrackEnum.md +docs/Callback.md docs/CallbackMethodEnum.md -docs/CallbackTypeEnum.md docs/CallsApi.md docs/CardWidthEnum.md docs/CodeRequest.md @@ -40,16 +40,19 @@ docs/CreateCallResponse.md docs/CreateLookupResponse.md docs/CreateMessageRequestError.md docs/CreateMultiChannelMessageResponse.md -docs/DeferredResult.md docs/DisconnectCallback.md docs/Diversion.md docs/DtmfCallback.md docs/Error.md docs/ErrorObject.md +docs/ErrorSource.md docs/FailureWebhook.md docs/FieldError.md docs/FileFormatEnum.md docs/GatherCallback.md +docs/InboundCallback.md +docs/InboundCallbackMessage.md +docs/InboundCallbackTypeEnum.md docs/InitiateCallback.md docs/Link.md docs/LinksObject.md @@ -67,8 +70,6 @@ docs/MachineDetectionResult.md docs/Media.md docs/MediaApi.md docs/Message.md -docs/MessageCallback.md -docs/MessageCallbackMessage.md docs/MessageDirectionEnum.md docs/MessageRequest.md docs/MessageStatusEnum.md @@ -81,18 +82,18 @@ docs/MfaForbiddenRequestError.md docs/MfaRequestError.md docs/MfaUnauthorizedRequestError.md docs/MmsMessageContent.md +docs/MmsMessageContentFile.md docs/MultiChannelAction.md docs/MultiChannelActionCalendarEvent.md docs/MultiChannelApi.md -docs/MultiChannelCallbackData.md docs/MultiChannelChannelListObject.md docs/MultiChannelChannelListObjectContent.md -docs/MultiChannelMessageCallbackData.md +docs/MultiChannelError.md docs/MultiChannelMessageChannelEnum.md -docs/MultiChannelMessageData.md -docs/MultiChannelMessageDirectionEnum.md +docs/MultiChannelMessageContent.md docs/MultiChannelMessageRequest.md -docs/MultiChannelStatusEnum.md +docs/MultiChannelMessageResponseData.md +docs/MultiChannelMessageResponseDataChannelListInner.md docs/OptInWorkflow.md docs/PageInfo.md docs/PhoneNumberLookupApi.md @@ -104,6 +105,7 @@ docs/RbmActionTypeEnum.md docs/RbmActionViewLocation.md docs/RbmCardContent.md docs/RbmCardContentMedia.md +docs/RbmLocationResponse.md docs/RbmMediaHeightEnum.md docs/RbmMessageCarouselCard.md docs/RbmMessageContentFile.md @@ -111,6 +113,7 @@ docs/RbmMessageContentRichCard.md docs/RbmMessageContentText.md docs/RbmMessageMedia.md docs/RbmStandaloneCard.md +docs/RbmSuggestionResponse.md docs/RecordingAvailableCallback.md docs/RecordingCompleteCallback.md docs/RecordingStateEnum.md @@ -122,6 +125,9 @@ docs/RedirectMethodEnum.md docs/SmsMessageContent.md docs/StandaloneCardOrientationEnum.md docs/StatisticsApi.md +docs/StatusCallback.md +docs/StatusCallbackMessage.md +docs/StatusCallbackTypeEnum.md docs/StirShaken.md docs/TelephoneNumber.md docs/TfvBasicAuthentication.md @@ -203,8 +209,8 @@ src/Bandwidth.Standard/Model/CallTranscriptionDetectedLanguageEnum.cs src/Bandwidth.Standard/Model/CallTranscriptionMetadata.cs src/Bandwidth.Standard/Model/CallTranscriptionResponse.cs src/Bandwidth.Standard/Model/CallTranscriptionTrackEnum.cs +src/Bandwidth.Standard/Model/Callback.cs src/Bandwidth.Standard/Model/CallbackMethodEnum.cs -src/Bandwidth.Standard/Model/CallbackTypeEnum.cs src/Bandwidth.Standard/Model/CardWidthEnum.cs src/Bandwidth.Standard/Model/CodeRequest.cs src/Bandwidth.Standard/Model/Conference.cs @@ -223,16 +229,19 @@ src/Bandwidth.Standard/Model/CreateCallResponse.cs src/Bandwidth.Standard/Model/CreateLookupResponse.cs src/Bandwidth.Standard/Model/CreateMessageRequestError.cs src/Bandwidth.Standard/Model/CreateMultiChannelMessageResponse.cs -src/Bandwidth.Standard/Model/DeferredResult.cs src/Bandwidth.Standard/Model/DisconnectCallback.cs src/Bandwidth.Standard/Model/Diversion.cs src/Bandwidth.Standard/Model/DtmfCallback.cs src/Bandwidth.Standard/Model/Error.cs src/Bandwidth.Standard/Model/ErrorObject.cs +src/Bandwidth.Standard/Model/ErrorSource.cs src/Bandwidth.Standard/Model/FailureWebhook.cs src/Bandwidth.Standard/Model/FieldError.cs src/Bandwidth.Standard/Model/FileFormatEnum.cs src/Bandwidth.Standard/Model/GatherCallback.cs +src/Bandwidth.Standard/Model/InboundCallback.cs +src/Bandwidth.Standard/Model/InboundCallbackMessage.cs +src/Bandwidth.Standard/Model/InboundCallbackTypeEnum.cs src/Bandwidth.Standard/Model/InitiateCallback.cs src/Bandwidth.Standard/Model/Link.cs src/Bandwidth.Standard/Model/LinksObject.cs @@ -248,8 +257,6 @@ 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/MessageCallback.cs -src/Bandwidth.Standard/Model/MessageCallbackMessage.cs src/Bandwidth.Standard/Model/MessageDirectionEnum.cs src/Bandwidth.Standard/Model/MessageRequest.cs src/Bandwidth.Standard/Model/MessageStatusEnum.cs @@ -261,17 +268,17 @@ src/Bandwidth.Standard/Model/MfaForbiddenRequestError.cs src/Bandwidth.Standard/Model/MfaRequestError.cs src/Bandwidth.Standard/Model/MfaUnauthorizedRequestError.cs src/Bandwidth.Standard/Model/MmsMessageContent.cs +src/Bandwidth.Standard/Model/MmsMessageContentFile.cs src/Bandwidth.Standard/Model/MultiChannelAction.cs src/Bandwidth.Standard/Model/MultiChannelActionCalendarEvent.cs -src/Bandwidth.Standard/Model/MultiChannelCallbackData.cs src/Bandwidth.Standard/Model/MultiChannelChannelListObject.cs src/Bandwidth.Standard/Model/MultiChannelChannelListObjectContent.cs -src/Bandwidth.Standard/Model/MultiChannelMessageCallbackData.cs +src/Bandwidth.Standard/Model/MultiChannelError.cs src/Bandwidth.Standard/Model/MultiChannelMessageChannelEnum.cs -src/Bandwidth.Standard/Model/MultiChannelMessageData.cs -src/Bandwidth.Standard/Model/MultiChannelMessageDirectionEnum.cs +src/Bandwidth.Standard/Model/MultiChannelMessageContent.cs src/Bandwidth.Standard/Model/MultiChannelMessageRequest.cs -src/Bandwidth.Standard/Model/MultiChannelStatusEnum.cs +src/Bandwidth.Standard/Model/MultiChannelMessageResponseData.cs +src/Bandwidth.Standard/Model/MultiChannelMessageResponseDataChannelListInner.cs src/Bandwidth.Standard/Model/OptInWorkflow.cs src/Bandwidth.Standard/Model/PageInfo.cs src/Bandwidth.Standard/Model/PriorityEnum.cs @@ -282,6 +289,7 @@ src/Bandwidth.Standard/Model/RbmActionTypeEnum.cs src/Bandwidth.Standard/Model/RbmActionViewLocation.cs src/Bandwidth.Standard/Model/RbmCardContent.cs src/Bandwidth.Standard/Model/RbmCardContentMedia.cs +src/Bandwidth.Standard/Model/RbmLocationResponse.cs src/Bandwidth.Standard/Model/RbmMediaHeightEnum.cs src/Bandwidth.Standard/Model/RbmMessageCarouselCard.cs src/Bandwidth.Standard/Model/RbmMessageContentFile.cs @@ -289,6 +297,7 @@ src/Bandwidth.Standard/Model/RbmMessageContentRichCard.cs src/Bandwidth.Standard/Model/RbmMessageContentText.cs src/Bandwidth.Standard/Model/RbmMessageMedia.cs src/Bandwidth.Standard/Model/RbmStandaloneCard.cs +src/Bandwidth.Standard/Model/RbmSuggestionResponse.cs src/Bandwidth.Standard/Model/RecordingAvailableCallback.cs src/Bandwidth.Standard/Model/RecordingCompleteCallback.cs src/Bandwidth.Standard/Model/RecordingStateEnum.cs @@ -298,6 +307,9 @@ src/Bandwidth.Standard/Model/RedirectCallback.cs src/Bandwidth.Standard/Model/RedirectMethodEnum.cs src/Bandwidth.Standard/Model/SmsMessageContent.cs src/Bandwidth.Standard/Model/StandaloneCardOrientationEnum.cs +src/Bandwidth.Standard/Model/StatusCallback.cs +src/Bandwidth.Standard/Model/StatusCallbackMessage.cs +src/Bandwidth.Standard/Model/StatusCallbackTypeEnum.cs src/Bandwidth.Standard/Model/StirShaken.cs src/Bandwidth.Standard/Model/TelephoneNumber.cs src/Bandwidth.Standard/Model/TfvBasicAuthentication.cs diff --git a/Bandwidth.Standard.sln b/Bandwidth.Standard.sln index 113bf052..eb06ddb9 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", "{930D0378-7645-4210-BCE2-A922C3634788}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard", "src\Bandwidth.Standard\Bandwidth.Standard.csproj", "{5369BDE8-E89E-4A47-BF1B-915C8C23CB7C}" 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 - {930D0378-7645-4210-BCE2-A922C3634788}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {930D0378-7645-4210-BCE2-A922C3634788}.Debug|Any CPU.Build.0 = Debug|Any CPU - {930D0378-7645-4210-BCE2-A922C3634788}.Release|Any CPU.ActiveCfg = Release|Any CPU - {930D0378-7645-4210-BCE2-A922C3634788}.Release|Any CPU.Build.0 = Release|Any CPU + {5369BDE8-E89E-4A47-BF1B-915C8C23CB7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5369BDE8-E89E-4A47-BF1B-915C8C23CB7C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5369BDE8-E89E-4A47-BF1B-915C8C23CB7C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5369BDE8-E89E-4A47-BF1B-915C8C23CB7C}.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 f8285643..f7b344f9 100644 --- a/README.md +++ b/README.md @@ -146,6 +146,7 @@ Class | Method | HTTP request | Description *RecordingsApi* | [**UpdateCallRecordingState**](docs/RecordingsApi.md#updatecallrecordingstate) | **PUT** /accounts/{accountId}/calls/{callId}/recording | Update Recording *StatisticsApi* | [**GetStatistics**](docs/StatisticsApi.md#getstatistics) | **GET** /accounts/{accountId}/statistics | Get Account Statistics *TollFreeVerificationApi* | [**CreateWebhookSubscription**](docs/TollFreeVerificationApi.md#createwebhooksubscription) | **POST** /accounts/{accountId}/tollFreeVerification/webhooks/subscriptions | Create Webhook Subscription +*TollFreeVerificationApi* | [**DeleteVerificationRequest**](docs/TollFreeVerificationApi.md#deleteverificationrequest) | **DELETE** /accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification | Delete a Toll-Free Verification Submission *TollFreeVerificationApi* | [**DeleteWebhookSubscription**](docs/TollFreeVerificationApi.md#deletewebhooksubscription) | **DELETE** /accounts/{accountId}/tollFreeVerification/webhooks/subscriptions/{id} | Delete Webhook Subscription *TollFreeVerificationApi* | [**GetTollFreeVerificationStatus**](docs/TollFreeVerificationApi.md#gettollfreeverificationstatus) | **GET** /accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification | Get Toll-Free Verification Status *TollFreeVerificationApi* | [**ListTollFreeUseCases**](docs/TollFreeVerificationApi.md#listtollfreeusecases) | **GET** /tollFreeVerification/useCases | List Toll-Free Use Cases @@ -177,8 +178,8 @@ Class | Method | HTTP request | Description - [Model.CallTranscriptionMetadata](docs/CallTranscriptionMetadata.md) - [Model.CallTranscriptionResponse](docs/CallTranscriptionResponse.md) - [Model.CallTranscriptionTrackEnum](docs/CallTranscriptionTrackEnum.md) + - [Model.Callback](docs/Callback.md) - [Model.CallbackMethodEnum](docs/CallbackMethodEnum.md) - - [Model.CallbackTypeEnum](docs/CallbackTypeEnum.md) - [Model.CardWidthEnum](docs/CardWidthEnum.md) - [Model.CodeRequest](docs/CodeRequest.md) - [Model.Conference](docs/Conference.md) @@ -197,16 +198,19 @@ Class | Method | HTTP request | Description - [Model.CreateLookupResponse](docs/CreateLookupResponse.md) - [Model.CreateMessageRequestError](docs/CreateMessageRequestError.md) - [Model.CreateMultiChannelMessageResponse](docs/CreateMultiChannelMessageResponse.md) - - [Model.DeferredResult](docs/DeferredResult.md) - [Model.DisconnectCallback](docs/DisconnectCallback.md) - [Model.Diversion](docs/Diversion.md) - [Model.DtmfCallback](docs/DtmfCallback.md) - [Model.Error](docs/Error.md) - [Model.ErrorObject](docs/ErrorObject.md) + - [Model.ErrorSource](docs/ErrorSource.md) - [Model.FailureWebhook](docs/FailureWebhook.md) - [Model.FieldError](docs/FieldError.md) - [Model.FileFormatEnum](docs/FileFormatEnum.md) - [Model.GatherCallback](docs/GatherCallback.md) + - [Model.InboundCallback](docs/InboundCallback.md) + - [Model.InboundCallbackMessage](docs/InboundCallbackMessage.md) + - [Model.InboundCallbackTypeEnum](docs/InboundCallbackTypeEnum.md) - [Model.InitiateCallback](docs/InitiateCallback.md) - [Model.Link](docs/Link.md) - [Model.LinksObject](docs/LinksObject.md) @@ -222,8 +226,6 @@ Class | Method | HTTP request | Description - [Model.MachineDetectionResult](docs/MachineDetectionResult.md) - [Model.Media](docs/Media.md) - [Model.Message](docs/Message.md) - - [Model.MessageCallback](docs/MessageCallback.md) - - [Model.MessageCallbackMessage](docs/MessageCallbackMessage.md) - [Model.MessageDirectionEnum](docs/MessageDirectionEnum.md) - [Model.MessageRequest](docs/MessageRequest.md) - [Model.MessageStatusEnum](docs/MessageStatusEnum.md) @@ -235,17 +237,17 @@ Class | Method | HTTP request | Description - [Model.MfaRequestError](docs/MfaRequestError.md) - [Model.MfaUnauthorizedRequestError](docs/MfaUnauthorizedRequestError.md) - [Model.MmsMessageContent](docs/MmsMessageContent.md) + - [Model.MmsMessageContentFile](docs/MmsMessageContentFile.md) - [Model.MultiChannelAction](docs/MultiChannelAction.md) - [Model.MultiChannelActionCalendarEvent](docs/MultiChannelActionCalendarEvent.md) - - [Model.MultiChannelCallbackData](docs/MultiChannelCallbackData.md) - [Model.MultiChannelChannelListObject](docs/MultiChannelChannelListObject.md) - [Model.MultiChannelChannelListObjectContent](docs/MultiChannelChannelListObjectContent.md) - - [Model.MultiChannelMessageCallbackData](docs/MultiChannelMessageCallbackData.md) + - [Model.MultiChannelError](docs/MultiChannelError.md) - [Model.MultiChannelMessageChannelEnum](docs/MultiChannelMessageChannelEnum.md) - - [Model.MultiChannelMessageData](docs/MultiChannelMessageData.md) - - [Model.MultiChannelMessageDirectionEnum](docs/MultiChannelMessageDirectionEnum.md) + - [Model.MultiChannelMessageContent](docs/MultiChannelMessageContent.md) - [Model.MultiChannelMessageRequest](docs/MultiChannelMessageRequest.md) - - [Model.MultiChannelStatusEnum](docs/MultiChannelStatusEnum.md) + - [Model.MultiChannelMessageResponseData](docs/MultiChannelMessageResponseData.md) + - [Model.MultiChannelMessageResponseDataChannelListInner](docs/MultiChannelMessageResponseDataChannelListInner.md) - [Model.OptInWorkflow](docs/OptInWorkflow.md) - [Model.PageInfo](docs/PageInfo.md) - [Model.PriorityEnum](docs/PriorityEnum.md) @@ -256,6 +258,7 @@ Class | Method | HTTP request | Description - [Model.RbmActionViewLocation](docs/RbmActionViewLocation.md) - [Model.RbmCardContent](docs/RbmCardContent.md) - [Model.RbmCardContentMedia](docs/RbmCardContentMedia.md) + - [Model.RbmLocationResponse](docs/RbmLocationResponse.md) - [Model.RbmMediaHeightEnum](docs/RbmMediaHeightEnum.md) - [Model.RbmMessageCarouselCard](docs/RbmMessageCarouselCard.md) - [Model.RbmMessageContentFile](docs/RbmMessageContentFile.md) @@ -263,6 +266,7 @@ Class | Method | HTTP request | Description - [Model.RbmMessageContentText](docs/RbmMessageContentText.md) - [Model.RbmMessageMedia](docs/RbmMessageMedia.md) - [Model.RbmStandaloneCard](docs/RbmStandaloneCard.md) + - [Model.RbmSuggestionResponse](docs/RbmSuggestionResponse.md) - [Model.RecordingAvailableCallback](docs/RecordingAvailableCallback.md) - [Model.RecordingCompleteCallback](docs/RecordingCompleteCallback.md) - [Model.RecordingStateEnum](docs/RecordingStateEnum.md) @@ -272,6 +276,9 @@ Class | Method | HTTP request | Description - [Model.RedirectMethodEnum](docs/RedirectMethodEnum.md) - [Model.SmsMessageContent](docs/SmsMessageContent.md) - [Model.StandaloneCardOrientationEnum](docs/StandaloneCardOrientationEnum.md) + - [Model.StatusCallback](docs/StatusCallback.md) + - [Model.StatusCallbackMessage](docs/StatusCallbackMessage.md) + - [Model.StatusCallbackTypeEnum](docs/StatusCallbackTypeEnum.md) - [Model.StirShaken](docs/StirShaken.md) - [Model.TelephoneNumber](docs/TelephoneNumber.md) - [Model.TfvBasicAuthentication](docs/TfvBasicAuthentication.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 84e9e39f..71bca432 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -655,6 +655,12 @@ paths: schema: $ref: '#/components/schemas/messagingRequestError' description: Not Found + "405": + content: + application/json: + schema: + $ref: '#/components/schemas/messagingRequestError' + description: Method Not Allowed "406": content: application/json: @@ -688,8 +694,8 @@ paths: /users/{accountId}/messages/multiChannel: post: callbacks: - multiChannelCallback: - $ref: '#/components/callbacks/multiChannelMessageCallback' + statusCallback: + $ref: '#/components/callbacks/statusCallback' description: Endpoint for sending Multi-Channel messages. operationId: createMultiChannelMessage parameters: @@ -714,50 +720,113 @@ paths: "400": content: application/json: + example: + links: [] + data: null + errors: + - type: request-validation + description: "The 'channelList[0].from' field must contain exactly\ + \ one telephone number" + source: + field: "channelList[0].from" schema: - $ref: '#/components/schemas/createMessageRequestError' + $ref: '#/components/schemas/multiChannelError' description: Bad Request "401": content: application/json: + example: + links: [] + data: null + errors: + - type: unauthorized + description: Authentication Failed + source: {} schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: '#/components/schemas/multiChannelError' description: Unauthorized "403": content: application/json: + example: + links: [] + data: null + errors: + - type: forbidden + description: Access Denied + source: {} schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: '#/components/schemas/multiChannelError' description: Forbidden "404": content: application/json: + example: + links: [] + data: null + errors: + - type: forbidden + description: Resource not found. + source: {} schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: '#/components/schemas/multiChannelError' description: Not Found - "406": + "405": content: application/json: + example: + links: [] + data: null + errors: + - type: method-not-allowed + description: Method 'PUT' not supported for this resource. + source: {} schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: '#/components/schemas/multiChannelError' + description: Method Not Allowed + "406": description: Not Acceptable "415": content: application/json: + example: + links: [] + data: null + errors: + - type: unsupported-content-type + description: Content-Type 'application/xml;charset=UTF-8' is not + supported. Please use 'application/json' + source: + header: Content-Type schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: '#/components/schemas/multiChannelError' description: Unsupported Media Type "429": content: application/json: + example: + links: [] + data: null + errors: + - type: rate-limit-exceeded + description: You have exceeded your rate limit for this endpoint. + Please retry later. + source: {} schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: '#/components/schemas/multiChannelError' description: Too Many Requests "500": content: application/json: + example: + links: [] + data: null + errors: + - type: internal-server-error + description: Internal server error. No further information available + source: {} schema: - $ref: '#/components/schemas/messagingRequestError' + $ref: '#/components/schemas/multiChannelError' description: Internal Server Error summary: Create Multi-Channel Message tags: @@ -4722,6 +4791,106 @@ paths: - description: Production url: https://api.bandwidth.com/api/v2 /accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification: + delete: + description: Delete a toll-free verification submission for a toll-free number. + operationId: deleteVerificationRequest + parameters: + - description: Your Bandwidth Account ID. + example: "9900000" + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + - description: Valid Toll-Free telephone number in E.164 format. + example: "+18885555555" + explode: false + in: path + name: phoneNumber + required: true + schema: + $ref: '#/components/schemas/tfPhoneNumber' + style: simple + responses: + "204": + description: No Content + "400": + content: + application/json: + example: + description: Cannot process request. + type: bad request + schema: + $ref: '#/components/schemas/tfvError' + description: Bad Request + "401": + content: + application/json: + example: + description: Client is providing incorrect or invalid credentials. + type: unauthorized + schema: + $ref: '#/components/schemas/tfvError' + description: Unauthorized + "403": + content: + application/json: + example: + description: Client is not authorized for the action. + type: forbidden + schema: + $ref: '#/components/schemas/tfvError' + description: Forbidden + "404": + content: + application/json: + example: + description: Cannot find the requested resource. + type: Not Found + schema: + $ref: '#/components/schemas/tfvError' + description: Cannot find the requested resource. + "405": + content: + application/json: + example: + description: Method is not allowed. + type: Method Not Allowed + schema: + $ref: '#/components/schemas/tfvError' + description: Method Not Allowed + "429": + content: + application/json: + example: + description: Throttling error. Too many requests. + type: Too Many Requests + schema: + $ref: '#/components/schemas/tfvError' + description: Too Many Requests + "500": + content: + application/json: + example: + description: Internal Server Error. + type: Internal Server Error + schema: + $ref: '#/components/schemas/tfvError' + description: Internal Server Error + "503": + content: + application/json: + example: + description: Service Unavailable Error. + type: Service Unavailable + schema: + $ref: '#/components/schemas/tfvError' + description: Service Unavailable + summary: Delete a Toll-Free Verification Submission + tags: + - Toll-Free Verification get: description: |- Gets the verification status for a phone number that is provisioned to your account. @@ -5443,14 +5612,22 @@ components: mmsMessageReceivedCallback: $ref: '#/components/examples/mmsMessageReceivedCallbackExample' schema: - $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

+ $ref: '#/components/schemas/inboundCallback' + description: "

This Inbound Message Webhook is an envelope containing\ + \ either a received (MO) message to your \nmessage-enabled Bandwidth\ + \ telephone number or a multichannel client's response to a suggestion\ + \ response \nor location request. \n

The payload type will be one\ + \ of message-received, suggestion-response,\ + \ or location-request-response.\n

Note that suggestion-response\ + \ and location-request-response callback types are pertinent\ + \ only for RBM messages sent from the /messages/multiChannel\ + \ endpoint.\n

Please visit Webhooks

" required: true responses: "200": description: OK + "202": + description: Accepted statusCallback: '{statusCallbackUrl}': post: @@ -5469,27 +5646,19 @@ components: messageFailedCallback: $ref: '#/components/examples/messageFailedCallbackExample' schema: - $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". + $ref: '#/components/schemas/statusCallback' + 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, message-failed or message-read. +

Note that message-read callbacks are pertinent only for RBM messages sent from the /messages/multiChannel endpoint.

Please visit Webhooks

required: true responses: "200": description: OK - multiChannelMessageCallback: - '{multiChannelMessageCallbackUrl}': - post: - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/multiChannelCallbackData' - description: Status Callback Payload - required: true - responses: - "204": - description: No Content + "202": + description: Accepted tfVerificationStatus: your_url.com/webhookService: post: @@ -6760,6 +6929,12 @@ components: schema: $ref: '#/components/schemas/messagingRequestError' description: Not Found + messagingMethodNotAllowedError: + content: + application/json: + schema: + $ref: '#/components/schemas/messagingRequestError' + description: Method Not Allowed messagingInvalidMediaTypeError: content: application/json: @@ -6778,6 +6953,117 @@ components: schema: $ref: '#/components/schemas/messagingRequestError' description: Internal Server Error + multiChannelBadRequestError: + content: + application/json: + example: + links: [] + data: null + errors: + - type: request-validation + description: "The 'channelList[0].from' field must contain exactly one\ + \ telephone number" + source: + field: "channelList[0].from" + schema: + $ref: '#/components/schemas/multiChannelError' + description: Bad Request + multiChannelNotAcceptableError: + description: Not Acceptable + multiChannelUnauthorizedError: + content: + application/json: + example: + links: [] + data: null + errors: + - type: unauthorized + description: Authentication Failed + source: {} + schema: + $ref: '#/components/schemas/multiChannelError' + description: Unauthorized + multiChannelForbiddenError: + content: + application/json: + example: + links: [] + data: null + errors: + - type: forbidden + description: Access Denied + source: {} + schema: + $ref: '#/components/schemas/multiChannelError' + description: Forbidden + multiChannelNotFoundError: + content: + application/json: + example: + links: [] + data: null + errors: + - type: forbidden + description: Resource not found. + source: {} + schema: + $ref: '#/components/schemas/multiChannelError' + description: Not Found + multiChannelMethodNotAllowedError: + content: + application/json: + example: + links: [] + data: null + errors: + - type: method-not-allowed + description: Method 'PUT' not supported for this resource. + source: {} + schema: + $ref: '#/components/schemas/multiChannelError' + description: Method Not Allowed + multiChannelInvalidMediaTypeError: + content: + application/json: + example: + links: [] + data: null + errors: + - type: unsupported-content-type + description: Content-Type 'application/xml;charset=UTF-8' is not supported. + Please use 'application/json' + source: + header: Content-Type + schema: + $ref: '#/components/schemas/multiChannelError' + description: Unsupported Media Type + multiChannelTooManyRequestsError: + content: + application/json: + example: + links: [] + data: null + errors: + - type: rate-limit-exceeded + description: You have exceeded your rate limit for this endpoint. Please + retry later. + source: {} + schema: + $ref: '#/components/schemas/multiChannelError' + description: Too Many Requests + multiChannelInternalServerError: + content: + application/json: + example: + links: [] + data: null + errors: + - type: internal-server-error + description: Internal server error. No further information available + source: {} + schema: + $ref: '#/components/schemas/multiChannelError' + description: Internal Server Error createCallResponse: content: application/json: @@ -7175,6 +7461,8 @@ components: schema: $ref: '#/components/schemas/tfvError' description: Bad Request + noContentResponse: + description: No Content tfvPostBadRequestResponse: content: application/json: @@ -7256,20 +7544,10 @@ components: with in the Bandwidth Phone Number Dashboard. example: 93de2206-9669-4e07-948d-329f4b722ee2 type: string - 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. + description: "Specifies the message's sending priority with respect to other\ + \ messages in your account. For best results and optimal throughput, reserve\ + \ the 'high' priority setting for critical messages only." enum: - default - high @@ -7426,7 +7704,8 @@ components: messageType: $ref: '#/components/schemas/messageTypeEnum' segmentCount: - description: The number of segments the message was sent as. + description: The number of segments the user's message is broken into before + sending over carrier networks. example: 1 type: integer errorCode: @@ -7557,20 +7836,17 @@ components: type: string title: Media type: object + segmentCount: + description: The number of segments the user's message is broken into before + sending over carrier networks. + example: 1 + type: integer tag: description: A custom string that will be included in callback events of the message. Max 1024 characters. example: custom string title: Tag type: string - deferredResult: - properties: - result: - type: object - setOrExpired: - type: boolean - title: DeferredResult - type: object expiration: description: "A string with the date/time value that the message will automatically\ \ expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z\ @@ -7578,13 +7854,19 @@ components: example: 2021-02-01T11:29:18-05:00 format: date-time type: string + carrierName: + description: "The name of the Authorized Message Provider (AMP) that handled\ + \ this message. \nIn the US, this is the carrier that the message was sent\ + \ to.\nThis field is present only when this account feature has been enabled." + example: AT&T + type: string message: example: owner: "+15554443333" media: - https://dev.bandwidth.com/images/bandwidth-logo.png priority: default - segmentCount: 2 + segmentCount: 1 from: "+15553332222" expiration: 2021-02-01T11:29:18-05:00 id: 1589228074636lm4k2je7j7jklbn2 @@ -7592,7 +7874,7 @@ components: to: - "+15552223333" text: Hello world - tag: custom tag + tag: custom string applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 direction: in properties: @@ -7605,7 +7887,8 @@ components: example: "+15554443333" type: string applicationId: - description: The application ID associated with the message. + description: The ID of the Application your from number or senderId is associated + with in the Bandwidth Phone Number Dashboard. example: 93de2206-9669-4e07-948d-329f4b722ee2 type: string time: @@ -7614,9 +7897,9 @@ components: format: date-time type: string segmentCount: - description: The number of segments the original message from the user is - broken into before sending over to carrier networks. - example: 2 + description: The number of segments the user's message is broken into before + sending over carrier networks. + example: 1 type: integer direction: $ref: '#/components/schemas/messageDirectionEnum' @@ -7648,8 +7931,10 @@ components: example: Hello world type: string tag: - description: The custom string set by the user. - example: custom tag + description: A custom string that will be included in callback events of + the message. Max 1024 characters. + example: custom string + title: Tag type: string priority: $ref: '#/components/schemas/priorityEnum' @@ -7665,8 +7950,8 @@ components: messageRequest: properties: applicationId: - description: The ID of the Application your from number is associated with - in the Bandwidth Phone Number Dashboard. + description: The ID of the Application your from number or senderId is associated + with in the Bandwidth Phone Number Dashboard. example: 93de2206-9669-4e07-948d-329f4b722ee2 type: string to: @@ -7747,50 +8032,232 @@ components: createMultiChannelMessageResponse: example: data: - channel: RBM + channelList: + - owner: owner + channel: RBM + from: BandwidthRBM + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + content: + suggestions: + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + text: Hello world + - owner: owner + channel: RBM + from: BandwidthRBM + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + content: + suggestions: + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + text: Hello world + - owner: owner + channel: RBM + from: BandwidthRBM + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + content: + suggestions: + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + text: Hello world + - owner: owner + channel: RBM + from: BandwidthRBM + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + content: + suggestions: + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + text: Hello world messageId: 1589228074636lm4k2je7j7jklbn2 - from: BandwidthRBM + expiration: 2021-02-01T11:29:18-05:00 time: 2025-01-01T18:20:16Z - to: "+15552223333" + to: + - "+15554443333" tag: custom string - applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 - status: DELIVERED - direction: OUTBOUND + priority: default + direction: in + links: [] + errors: [] + properties: links: - - rel: rel - href: href - - rel: rel - href: href + example: [] + items: + $ref: '#/components/schemas/link' + type: array + data: + $ref: '#/components/schemas/multiChannelMessageResponseData' errors: - - code: code - message: message - - code: code - message: message + example: [] + items: + $ref: '#/components/schemas/errorObject' + type: array + type: object + multiChannelError: + example: + data: "{}" + links: [] + errors: + - description: description + source: + reference: reference + field: field + parameter: parameter + header: header + type: type + - description: description + source: + reference: reference + field: field + parameter: parameter + header: header + type: type properties: links: + example: [] items: $ref: '#/components/schemas/link' type: array data: - $ref: '#/components/schemas/multiChannelMessageData' + nullable: true + type: object + example: null errors: items: $ref: '#/components/schemas/errorObject' type: array type: object - multiChannelMessageChannelEnum: - description: The channel of the multi-channel message. - enum: - - RBM - - SMS - - MMS - example: RBM - type: string - multiChannelMessageDirectionEnum: + link: + properties: + rel: + type: string + href: + type: string + type: object + errorObject: + example: + description: description + source: + reference: reference + field: field + parameter: parameter + header: header + type: type + properties: + type: + description: A concise summary of the error used for categorization. + type: string + description: + description: A detailed explanation of the error. + type: string + source: + $ref: '#/components/schemas/errorSource' + required: + - description + - source + - type + type: object + errorSource: + description: "Specifies relevant sources of the error, if any." + example: + reference: reference + field: field + parameter: parameter + header: header + properties: + parameter: + description: The relevant URI query parameter causing the error + type: string + field: + description: The request body field that led to the error + type: string + header: + description: The header field that contributed to the error + type: string + reference: + description: A resource ID or path linked to the error + type: string + title: Error Source + type: object + multiChannelMessageChannelEnum: + description: The channel of the multi-channel message. enum: - - INBOUND - - OUTBOUND - example: OUTBOUND + - RBM + - SMS + - MMS + example: RBM type: string multiChannelSenderId: description: The sender ID of the message. This could be an alphanumeric sender @@ -7801,7 +8268,38 @@ components: description: The phone number the message should be sent to in E164 format. example: "+15552223333" type: string + multiChannelDestinations: + description: "The destination phone number(s) of the message, in E164 format." + example: + - "+15554443333" + items: + type: string + type: array + uniqueItems: true rbmMessageContentText: + example: + suggestions: + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + text: Hello world properties: text: description: The text associated with the message. Must be 3270 characters @@ -7846,6 +8344,21 @@ components: - fileUrl title: RBM Rich Media File type: object + mmsMessageContentFile: + properties: + fileUrl: + description: |- + The URL of a media attachment. + + For MMS, the API limits file size to 3.5MB. Specific carriers and channels may have a smaller limit that could cause a large file to fail, see [here](https://support.bandwidth.com/hc/en-us/articles/360014235473-What-are-the-MMS-file-size-limits) for more details. + example: https://dev.bandwidth.com/images/bandwidth-logo.png + format: uri + maxLength: 1000 + type: string + required: + - fileUrl + title: MMS Media File + type: object rbmMessageMedia: properties: media: @@ -7963,16 +8476,8 @@ components: maxLength: 2048 type: string media: - description: |- - A list of URLs to include as media attachments as part of the message. - Each URL can be at most 4096 characters. - example: - - https://dev.bandwidth.com/images/bandwidth-logo.png - - https://dev.bandwidth.com/images/github_logo.png items: - format: uri - maxLength: 4096 - type: string + $ref: '#/components/schemas/mmsMessageContentFile' type: array title: MMS Message type: object @@ -7997,7 +8502,7 @@ components: maxLength: 25 title: Text type: string - rbmActionPostBackData: + rbmActionPostbackData: description: Base64 payload the customer receives when the reply is clicked. example: !!binary |- U0dWc2JHOGdkMjl5YkdRPQ== @@ -8006,6 +8511,11 @@ components: title: Post Back Data type: string rbmActionBase: + example: + postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY properties: type: $ref: '#/components/schemas/rbmActionTypeEnum' @@ -8015,7 +8525,7 @@ components: maxLength: 25 title: Text type: string - postBackData: + postbackData: description: Base64 payload the customer receives when the reply is clicked. example: !!binary |- U0dWc2JHOGdkMjl5YkdRPQ== @@ -8024,7 +8534,7 @@ components: title: Post Back Data type: string required: - - postBackData + - postbackData - text - type type: object @@ -8130,14 +8640,6 @@ components: - $ref: '#/components/schemas/rbmActionViewLocation' - $ref: '#/components/schemas/multiChannelActionCalendarEvent' - $ref: '#/components/schemas/rbmActionOpenUrl' - multiChannelStatusEnum: - enum: - - QUEUED - - SENDING - - DELIVERED - - FAILED - example: DELIVERED - type: string multiChannelChannelListObject: properties: from: @@ -8194,155 +8696,304 @@ components: - channelList - to type: object - multiChannelMessageCallbackData: - properties: - messageId: - description: The ID of the message. - example: 1589228074636lm4k2je7j7jklbn2 - type: string - status: - $ref: '#/components/schemas/multiChannelStatusEnum' - direction: - $ref: '#/components/schemas/multiChannelMessageDirectionEnum' - from: - description: The sender ID of the message. This could be an alphanumeric - sender ID. - example: BandwidthRBM - type: string - to: - description: The phone number the message should be sent to in E164 format. - example: "+15552223333" - type: string - applicationId: - description: The ID of the Application your from number or senderId is associated - with in the Bandwidth Phone Number Dashboard. - example: 93de2206-9669-4e07-948d-329f4b722ee2 - type: string - channel: - $ref: '#/components/schemas/multiChannelMessageChannelEnum' - tag: - description: A custom string that will be included in callback events of - the message. Max 1024 characters. - example: custom string - title: Tag - type: string - type: object - multiChannelMessageData: + multiChannelMessageResponseData: + description: The data returned in a multichannel message response. example: - channel: RBM + channelList: + - owner: owner + channel: RBM + from: BandwidthRBM + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + content: + suggestions: + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + text: Hello world + - owner: owner + channel: RBM + from: BandwidthRBM + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + content: + suggestions: + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + text: Hello world + - owner: owner + channel: RBM + from: BandwidthRBM + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + content: + suggestions: + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + text: Hello world + - owner: owner + channel: RBM + from: BandwidthRBM + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + content: + suggestions: + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + text: Hello world messageId: 1589228074636lm4k2je7j7jklbn2 - from: BandwidthRBM + expiration: 2021-02-01T11:29:18-05:00 time: 2025-01-01T18:20:16Z - to: "+15552223333" + to: + - "+15554443333" tag: custom string - applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 - status: DELIVERED - direction: OUTBOUND + priority: default + direction: in properties: messageId: description: The ID of the message. example: 1589228074636lm4k2je7j7jklbn2 type: string - status: - $ref: '#/components/schemas/multiChannelStatusEnum' time: description: The time the message was received by the Bandwidth API. example: 2025-01-01T18:20:16Z format: date-time type: string direction: - $ref: '#/components/schemas/multiChannelMessageDirectionEnum' - from: - description: The sender ID of the message. This could be an alphanumeric - sender ID. - example: BandwidthRBM - type: string + $ref: '#/components/schemas/messageDirectionEnum' to: - description: The phone number the message should be sent to in E164 format. - example: "+15552223333" - type: string - applicationId: - description: The ID of the Application your from number or senderId is associated - with in the Bandwidth Phone Number Dashboard. - example: 93de2206-9669-4e07-948d-329f4b722ee2 - type: string - channel: - $ref: '#/components/schemas/multiChannelMessageChannelEnum' + description: "The destination phone number(s) of the message, in E164 format." + example: + - "+15554443333" + items: + type: string + type: array + uniqueItems: true + channelList: + description: "A list of message bodies. The messages will be attempted in\ + \ the order they are listed. Once a message sends successfully, the others\ + \ will be ignored." + items: + $ref: '#/components/schemas/multiChannelMessageResponseData_channelList_inner' + maxItems: 4 + type: array tag: description: A custom string that will be included in callback events of the message. Max 1024 characters. example: custom string title: Tag type: string - type: object - multiChannelCallbackData: - properties: - time: - description: The time of the callback event. - example: 2025-01-01T18:20:16Z + priority: + $ref: '#/components/schemas/priorityEnum' + expiration: + description: "A string with the date/time value that the message will automatically\ + \ expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z\ + \ or 2021-03-13T20:59:26-05:00. Must be a date-time in the future." + example: 2021-02-01T11:29:18-05:00 format: date-time type: string - type: - $ref: '#/components/schemas/multiChannelStatusEnum' - to: - description: The phone number the message should be sent to in E164 format. - example: "+15552223333" - type: string - description: - example: Incoming message received + required: + - channelList + - direction + - messageId + - time + - to + type: object + multiChannelMessageContent: + description: The structure of the content field of a multichannel message. + properties: + text: type: string - message: - $ref: '#/components/schemas/multiChannelMessageCallbackData' + media: + $ref: '#/components/schemas/rbmMessageContentFile' type: object - link: - example: - rel: rel - href: href + rbmSuggestionResponse: properties: - rel: + text: + description: The text associated with the suggestion response. + example: "Yes, I would like to proceed" type: string - href: + postbackData: + description: Base64 payload the customer receives when the reply is clicked. + example: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + format: byte + maxLength: 2048 + title: Post Back Data type: string type: object - errorObject: - example: - code: code - message: message + rbmLocationResponse: properties: - code: + latitude: + description: The latitude of the client's location. + example: "37.7749" + format: double type: string - message: + longitude: + description: The longitude of the client's location. + example: "-122.4194" + format: double type: string type: object - messageCallback: - description: Message Callback Schema + callback: + description: |- + Callbacks are divided into two types based on direction of the related message: + - `statusCallback` indicates status of an outbound MT SMS, MMS, or RBM message. + - `inboundCallback` indicates an inbound MO message or a multichannel message client's response to a suggestion or location request. + discriminator: + mapping: + message-sent: '#/components/schemas/statusCallback' + message-delivered: '#/components/schemas/statusCallback' + message-failed: '#/components/schemas/statusCallback' + message-read: '#/components/schemas/statusCallback' + message-received: '#/components/schemas/inboundCallback' + request-location-response: '#/components/schemas/inboundCallback' + suggestion-response: '#/components/schemas/inboundCallback' + propertyName: type + oneOf: + - $ref: '#/components/schemas/statusCallback' + - $ref: '#/components/schemas/inboundCallback' + type: object + statusCallback: + description: Represents a status callback for an outbound MT SMS or MMS or RBM + message. properties: time: example: 2024-12-02T20:15:57.278Z format: date-time type: string + eventTime: + description: "Represents the time at which the message was read, for `message-read`\ + \ callbacks." + example: 2024-12-02T20:15:58.278Z + format: date-time + type: string type: - $ref: '#/components/schemas/callbackTypeEnum' + $ref: '#/components/schemas/statusCallbackTypeEnum' to: + description: |- + The destination phone number the message was sent to. + For status callbacks, this the the Bandwidth user's client phone number. example: "+15552223333" type: string description: description: A detailed description of the event described by the callback. - example: rejected-unallocated-from-number + example: Message delivered to carrier. type: string message: - $ref: '#/components/schemas/messageCallbackMessage' + $ref: '#/components/schemas/statusCallbackMessage' errorCode: description: "Optional error code, applicable only when type is `message-failed`." example: 4405 - nullable: true type: integer carrierName: description: "The name of the Authorized Message Provider (AMP) that handled\ - \ this message. In the US, this is the carrier that the message was sent\ - \ to." + \ this message. \nIn the US, this is the carrier that the message was\ + \ sent to.\nThis field is present only when this account feature has been\ + \ enabled." + example: AT&T + type: string + required: + - description + - message + - time + - to + - type + type: object + inboundCallback: + description: Represents an inbound callback. + properties: + time: + example: 2024-12-02T20:15:57.278Z + format: date-time + type: string + type: + $ref: '#/components/schemas/inboundCallbackTypeEnum' + to: + description: "The destination phone number the message was sent to. \nFor\ + \ inbound callbacks, this is the Bandwidth number or alphanumeric identifier\ + \ that received the message.\n" + example: "+15552223333" + type: string + description: + description: A detailed description of the event described by the callback. + example: Incoming message received + type: string + message: + $ref: '#/components/schemas/inboundCallbackMessage' + carrierName: + description: "The name of the Authorized Message Provider (AMP) that handled\ + \ this message. \nIn the US, this is the carrier that the message was\ + \ sent to.\nThis field is present only when this account feature has been\ + \ enabled." example: AT&T - nullable: true type: string required: - description @@ -8351,16 +9002,49 @@ components: - to - type type: object - messageCallbackMessage: - description: Message payload schema within a MessageCallback + statusCallbackTypeEnum: + description: |- + The possible status callbacks when sending an MT SMS or MMS or RBM message: + - `message-sending` indicates that Bandwidth is sending the message to the upstream provider. + - `message-delivered` indicates that the message was successfully sent. + - `message-failed` indicates that the message could not be sent to the intended recipient. + - `message-read` indicates that the RBM message was read by the recipient. + enum: + - message-sending + - message-delivered + - message-failed + - message-read + example: message-delivered + type: string + inboundCallbackTypeEnum: + description: "The possible inbound callback types originating from MO messages\ + \ or multichannel message client responses:\n- `message-received` indicates\ + \ an MO message from a Bandwidth user's client to a Bandwidth number.\n- `request-location-response`\ + \ indicates a response to a location request sent by the Bandwidth user's\ + \ client after receiving an RBM message. \n- `suggestion-response` indicates\ + \ a response to a suggestion sent by the Bandwidth user's client after receiving\ + \ an RBM message." + enum: + - message-received + - request-location-response + - suggestion-response + example: message-received + type: string + statusCallbackMessage: + description: Message payload schema within a callback properties: id: + description: A unique identifier of the message. example: 1661365814859loidf7mcwd4qacn7 type: string owner: + description: The Bandwidth phone number or alphanumeric identifier associated + with the message. example: "+15553332222" type: string applicationId: + description: The ID of the Application your from number or senderId is associated + with in the Bandwidth Phone Number Dashboard. example: 93de2206-9669-4e07-948d-329f4b722ee2 type: string time: @@ -8368,11 +9052,14 @@ components: format: date-time type: string segmentCount: + description: The number of segments the user's message is broken into before + sending over carrier networks. example: 1 type: integer direction: $ref: '#/components/schemas/messageDirectionEnum' to: + description: The phone number recipients of the message. example: - "+15552223333" items: @@ -8380,26 +9067,32 @@ components: type: array uniqueItems: true from: + description: The Bandwidth phone number or alphanumeric identifier the message + was sent from. example: "+15553332222" type: string text: example: Hello world type: string tag: + description: A custom string that will be included in callback events of + the message. Max 1024 characters. example: custom string + title: Tag type: string media: - description: "Optional media, applicable only for mms" + description: "Optional media, not applicable for sms" 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' + channel: + $ref: '#/components/schemas/multiChannelMessageChannelEnum' required: - applicationId - direction @@ -8407,10 +9100,29 @@ components: - id - owner - segmentCount - - text - time - to type: object + inboundCallbackMessage: + allOf: + - $ref: '#/components/schemas/statusCallbackMessage' + - properties: + content: + $ref: '#/components/schemas/multiChannelMessageContent' + suggestionResponse: + $ref: '#/components/schemas/rbmSuggestionResponse' + locationResponse: + $ref: '#/components/schemas/rbmLocationResponse' + type: object + required: + - applicationId + - direction + - from + - id + - owner + - segmentCount + - time + - to callbackMethodEnum: default: POST description: The HTTP method to use to deliver the callback. GET or POST. Default @@ -13114,6 +13826,45 @@ components: - $ref: '#/components/schemas/rbmMessageContentRichCard' - $ref: '#/components/schemas/smsMessageContent' - $ref: '#/components/schemas/mmsMessageContent' + multiChannelMessageResponseData_channelList_inner: + allOf: + - $ref: '#/components/schemas/multiChannelChannelListObject' + - properties: + owner: + description: The Bandwidth senderId associated with the message. Identical + to 'from'. + type: string + required: + - owner + type: object + example: + owner: owner + channel: RBM + from: BandwidthRBM + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + content: + suggestions: + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + - postbackData: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + text: Hello world + type: REPLY + text: Hello world webhookSubscription_basicAuthentication: description: "Basic authentication credentials are not required, but if present,\ \ both username and password must be provided." diff --git a/bandwidth.yml b/bandwidth.yml index 03769645..4b3681cb 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -223,6 +223,8 @@ paths: $ref: '#/components/responses/messagingForbiddenError' '404': $ref: '#/components/responses/messagingNotFoundError' + '405': + $ref: '#/components/responses/messagingMethodNotAllowedError' '406': $ref: '#/components/responses/messagingNotAcceptableError' '415': @@ -250,24 +252,26 @@ paths: '202': $ref: '#/components/responses/createMultiChannelMessageResponse' '400': - $ref: '#/components/responses/createMessageBadRequestError' + $ref: '#/components/responses/multiChannelBadRequestError' '401': - $ref: '#/components/responses/messagingUnauthorizedError' + $ref: '#/components/responses/multiChannelUnauthorizedError' '403': - $ref: '#/components/responses/messagingForbiddenError' + $ref: '#/components/responses/multiChannelForbiddenError' '404': - $ref: '#/components/responses/messagingNotFoundError' + $ref: '#/components/responses/multiChannelNotFoundError' + '405': + $ref: '#/components/responses/multiChannelMethodNotAllowedError' '406': - $ref: '#/components/responses/messagingNotAcceptableError' + $ref: '#/components/responses/multiChannelNotAcceptableError' '415': - $ref: '#/components/responses/messagingInvalidMediaTypeError' + $ref: '#/components/responses/multiChannelInvalidMediaTypeError' '429': - $ref: '#/components/responses/messagingTooManyRequestsError' + $ref: '#/components/responses/multiChannelTooManyRequestsError' '500': - $ref: '#/components/responses/messagingInternalServerError' + $ref: '#/components/responses/multiChannelInternalServerError' callbacks: - multiChannelCallback: - $ref: '#/components/callbacks/multiChannelMessageCallback' + statusCallback: + $ref: '#/components/callbacks/statusCallback' x-badges: - name: Beta color: '#076EA8' @@ -1471,6 +1475,34 @@ paths: callbacks: tfVerificationStatus: $ref: '#/components/callbacks/tfVerificationStatus' + delete: + description: Delete a toll-free verification submission for a toll-free number. + operationId: deleteVerificationRequest + parameters: + - $ref: '#/components/parameters/accountId' + - $ref: '#/components/parameters/tfPhoneNumberPathParam' + responses: + '204': + $ref: '#/components/responses/noContentResponse' + '400': + $ref: '#/components/responses/tfvBadRequestResponse' + '401': + $ref: '#/components/responses/tfvUnauthorizedResponse' + '403': + $ref: '#/components/responses/tfvForbiddenResponse' + '404': + $ref: '#/components/responses/tfvNotFoundResponse' + '405': + $ref: '#/components/responses/tfvNotAllowedResponse' + '429': + $ref: '#/components/responses/tfvTooManyRequestsResponse' + '500': + $ref: '#/components/responses/tfvServerErrorResponse' + '503': + $ref: '#/components/responses/tfvServiceUnavailableResponse' + summary: Delete a Toll-Free Verification Submission + tags: + - Toll-Free Verification servers: *ref_4 /accounts/{accountId}/tollFreeVerification/webhooks/subscriptions: get: @@ -1554,7 +1586,7 @@ paths: - $ref: '#/components/parameters/webhookSubscriptionIdPathParam' responses: '204': - description: No Content + $ref: '#/components/responses/noContentResponse' '400': $ref: '#/components/responses/tfvBadRequestResponse' '401': @@ -1639,24 +1671,12 @@ components: The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. example: 93de2206-9669-4e07-948d-329f4b722ee2 - 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: The priority specified by the user. + description: >- + Specifies the message's sending priority with respect to other messages + in your account. For best results and optimal throughput, reserve the + 'high' priority setting for critical messages only. enum: - default - high @@ -1753,9 +1773,7 @@ components: messageType: $ref: '#/components/schemas/messageTypeEnum' segmentCount: - type: integer - description: The number of segments the message was sent as. - example: 1 + $ref: '#/components/schemas/segmentCount' errorCode: type: integer description: The numeric error code of the message. @@ -1863,6 +1881,12 @@ components: type: integer mediaName: type: string + segmentCount: + type: integer + description: >- + The number of segments the user's message is broken into before sending + over carrier networks. + example: 1 tag: title: Tag type: string @@ -1870,14 +1894,6 @@ components: A custom string that will be included in callback events of the message. Max 1024 characters. example: custom string - deferredResult: - title: DeferredResult - type: object - properties: - result: - type: object - setOrExpired: - type: boolean expiration: type: string format: date-time @@ -1887,6 +1903,16 @@ components: 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future. example: '2021-02-01T11:29:18-05:00' + carrierName: + type: string + description: >- + The name of the Authorized Message Provider (AMP) that handled this + message. + + In the US, this is the carrier that the message was sent to. + + This field is present only when this account feature has been enabled. + example: AT&T message: title: Message type: object @@ -1900,20 +1926,14 @@ components: description: The Bandwidth phone number associated with the message. example: '+15554443333' applicationId: - type: string - description: The application ID associated with the message. - example: 93de2206-9669-4e07-948d-329f4b722ee2 + $ref: '#/components/schemas/applicationId' time: type: string format: date-time description: The datetime stamp of the message in ISO 8601 example: 2024-12-02T20:15:57.278Z segmentCount: - type: integer - description: >- - The number of segments the original message from the user is broken - into before sending over to carrier networks. - example: 2 + $ref: '#/components/schemas/segmentCount' direction: $ref: '#/components/schemas/messageDirectionEnum' to: @@ -1945,9 +1965,7 @@ components: description: The contents of the message. example: Hello world tag: - type: string - description: The custom string set by the user. - example: custom tag + $ref: '#/components/schemas/tag' priority: $ref: '#/components/schemas/priorityEnum' expiration: @@ -1961,11 +1979,7 @@ components: - from properties: applicationId: - type: string - description: >- - The ID of the Application your from number is associated with in the - Bandwidth Phone Number Dashboard. - example: 93de2206-9669-4e07-948d-329f4b722ee2 + $ref: '#/components/schemas/applicationId' to: uniqueItems: true type: array @@ -2021,12 +2035,69 @@ components: type: array items: $ref: '#/components/schemas/link' + example: [] + data: + $ref: '#/components/schemas/multiChannelMessageResponseData' + errors: + type: array + items: + $ref: '#/components/schemas/errorObject' + example: [] + multiChannelError: + type: object + properties: + links: + type: array + items: + $ref: '#/components/schemas/link' + example: [] data: - $ref: '#/components/schemas/multiChannelMessageData' + type: object + nullable: true + example: null errors: type: array items: $ref: '#/components/schemas/errorObject' + link: + type: object + properties: + rel: + type: string + href: + type: string + errorObject: + type: object + properties: + type: + description: A concise summary of the error used for categorization. + type: string + description: + description: A detailed explanation of the error. + type: string + source: + $ref: '#/components/schemas/errorSource' + required: + - type + - description + - source + errorSource: + title: Error Source + type: object + description: Specifies relevant sources of the error, if any. + properties: + parameter: + type: string + description: The relevant URI query parameter causing the error + field: + type: string + description: The request body field that led to the error + header: + type: string + description: The header field that contributed to the error + reference: + type: string + description: A resource ID or path linked to the error multiChannelMessageChannelEnum: description: The channel of the multi-channel message. type: string @@ -2035,12 +2106,6 @@ components: - SMS - MMS example: RBM - multiChannelMessageDirectionEnum: - type: string - enum: - - INBOUND - - OUTBOUND - example: OUTBOUND multiChannelSenderId: type: string description: The sender ID of the message. This could be an alphanumeric sender ID. @@ -2049,6 +2114,14 @@ components: type: string description: The phone number the message should be sent to in E164 format. example: '+15552223333' + multiChannelDestinations: + uniqueItems: true + type: array + description: The destination phone number(s) of the message, in E164 format. + example: + - '+15554443333' + items: + type: string rbmMessageContentText: title: RBM Text type: object @@ -2090,6 +2163,26 @@ components: maxLength: 1000 required: - fileUrl + mmsMessageContentFile: + title: MMS Media File + type: object + properties: + fileUrl: + type: string + format: uri + description: >- + The URL of a media attachment. + + + For MMS, the API limits file size to 3.5MB. Specific carriers and + channels may have a smaller limit that could cause a large file to + fail, see + [here](https://support.bandwidth.com/hc/en-us/articles/360014235473-What-are-the-MMS-file-size-limits) + for more details. + example: https://dev.bandwidth.com/images/bandwidth-logo.png + maxLength: 1000 + required: + - fileUrl rbmMessageMedia: title: RBM Media type: object @@ -2198,7 +2291,9 @@ components: text: $ref: '#/components/schemas/messageText' media: - $ref: '#/components/schemas/messageMedia' + type: array + items: + $ref: '#/components/schemas/mmsMessageContentFile' rbmMessageContentRichCard: title: RBM Rich Card oneOf: @@ -2220,7 +2315,7 @@ components: description: Displayed text for user to click maxLength: 25 example: Hello world - rbmActionPostBackData: + rbmActionPostbackData: title: Post Back Data type: string format: byte @@ -2234,11 +2329,11 @@ components: $ref: '#/components/schemas/rbmActionTypeEnum' text: $ref: '#/components/schemas/rbmActionText' - postBackData: - $ref: '#/components/schemas/rbmActionPostBackData' + postbackData: + $ref: '#/components/schemas/rbmActionPostbackData' required: - text - - postBackData + - postbackData - type rbmActionDial: allOf: @@ -2342,14 +2437,6 @@ components: CREATE_CALENDAR_EVENT: '#/components/schemas/multiChannelActionCalendarEvent' OPEN_URL: '#/components/schemas/rbmActionOpenUrl' REQUEST_LOCATION: '#/components/schemas/rbmActionBase' - multiChannelStatusEnum: - type: string - enum: - - QUEUED - - SENDING - - DELIVERED - - FAILED - example: DELIVERED multiChannelChannelListObject: type: object properties: @@ -2396,141 +2483,250 @@ components: required: - to - channelList - multiChannelMessageCallbackData: - type: object - properties: - messageId: - $ref: '#/components/schemas/messageId' - status: - $ref: '#/components/schemas/multiChannelStatusEnum' - direction: - $ref: '#/components/schemas/multiChannelMessageDirectionEnum' - from: - $ref: '#/components/schemas/multiChannelSenderId' - to: - $ref: '#/components/schemas/multiChannelDestination' - applicationId: - $ref: '#/components/schemas/applicationId' - channel: - $ref: '#/components/schemas/multiChannelMessageChannelEnum' - tag: - $ref: '#/components/schemas/tag' - multiChannelMessageData: + multiChannelMessageResponseData: + description: The data returned in a multichannel message response. type: object properties: messageId: $ref: '#/components/schemas/messageId' - status: - $ref: '#/components/schemas/multiChannelStatusEnum' time: description: The time the message was received by the Bandwidth API. type: string format: date-time example: 2025-01-01T18:20:16.000Z direction: - $ref: '#/components/schemas/multiChannelMessageDirectionEnum' - from: - $ref: '#/components/schemas/multiChannelSenderId' + $ref: '#/components/schemas/messageDirectionEnum' to: - $ref: '#/components/schemas/multiChannelDestination' - applicationId: - $ref: '#/components/schemas/applicationId' - channel: - $ref: '#/components/schemas/multiChannelMessageChannelEnum' + $ref: '#/components/schemas/multiChannelDestinations' + channelList: + type: array + description: >- + A list of message bodies. The messages will be attempted in the + order they are listed. Once a message sends successfully, the others + will be ignored. + items: + allOf: + - $ref: '#/components/schemas/multiChannelChannelListObject' + - type: object + properties: + owner: + type: string + description: >- + The Bandwidth senderId associated with the message. + Identical to 'from'. + required: + - owner + maxItems: 4 tag: $ref: '#/components/schemas/tag' - multiChannelCallbackData: + priority: + $ref: '#/components/schemas/priorityEnum' + expiration: + $ref: '#/components/schemas/expiration' + required: + - messageId + - time + - direction + - to + - channelList + multiChannelMessageContent: + description: The structure of the content field of a multichannel message. type: object properties: - time: - description: The time of the callback event. - type: string - format: date-time - example: 2025-01-01T18:20:16.000Z - type: - $ref: '#/components/schemas/multiChannelStatusEnum' - to: - $ref: '#/components/schemas/multiChannelDestination' - description: + text: type: string - example: Incoming message received - message: - $ref: '#/components/schemas/multiChannelMessageCallbackData' - link: + media: + $ref: '#/components/schemas/rbmMessageContentFile' + rbmSuggestionResponse: type: object properties: - rel: - type: string - href: + text: type: string - errorObject: + description: The text associated with the suggestion response. + example: Yes, I would like to proceed + postbackData: + $ref: '#/components/schemas/rbmActionPostbackData' + rbmLocationResponse: type: object properties: - code: + latitude: type: string - message: + format: double + description: The latitude of the client's location. + example: '37.7749' + longitude: type: string - messageCallback: - description: Message Callback Schema + format: double + description: The longitude of the client's location. + example: '-122.4194' + callback: + description: >- + Callbacks are divided into two types based on direction of the related + message: + + - `statusCallback` indicates status of an outbound MT SMS, MMS, or RBM + message. + + - `inboundCallback` indicates an inbound MO message or a multichannel + message client's response to a suggestion or location request. + type: object + oneOf: + - $ref: '#/components/schemas/statusCallback' + - $ref: '#/components/schemas/inboundCallback' + discriminator: + propertyName: type + mapping: + message-sent: '#/components/schemas/statusCallback' + message-delivered: '#/components/schemas/statusCallback' + message-failed: '#/components/schemas/statusCallback' + message-read: '#/components/schemas/statusCallback' + message-received: '#/components/schemas/inboundCallback' + request-location-response: '#/components/schemas/inboundCallback' + suggestion-response: '#/components/schemas/inboundCallback' + statusCallback: type: object + description: >- + Represents a status callback for an outbound MT SMS or MMS or RBM + message. properties: time: type: string format: date-time example: 2024-12-02T20:15:57.278Z + eventTime: + type: string + description: >- + Represents the time at which the message was read, for + `message-read` callbacks. + format: date-time + example: 2024-12-02T20:15:58.278Z type: - $ref: '#/components/schemas/callbackTypeEnum' + $ref: '#/components/schemas/statusCallbackTypeEnum' to: type: string + description: >- + The destination phone number the message was sent to. + + For status callbacks, this the the Bandwidth user's client phone + number. example: '+15552223333' description: type: string description: A detailed description of the event described by the callback. - example: rejected-unallocated-from-number + example: Message delivered to carrier. message: - $ref: '#/components/schemas/messageCallbackMessage' + $ref: '#/components/schemas/statusCallbackMessage' errorCode: type: integer description: Optional error code, applicable only when type is `message-failed`. - nullable: true example: 4405 carrierName: + $ref: '#/components/schemas/carrierName' + required: + - time + - type + - to + - description + - message + inboundCallback: + type: object + description: Represents an inbound callback. + properties: + time: type: string - description: >- - The name of the Authorized Message Provider (AMP) that handled this - message. In the US, this is the carrier that the message was sent - to. - nullable: true - example: AT&T + format: date-time + example: 2024-12-02T20:15:57.278Z + type: + $ref: '#/components/schemas/inboundCallbackTypeEnum' + to: + type: string + description: > + The destination phone number the message was sent to. + + For inbound callbacks, this is the Bandwidth number or alphanumeric + identifier that received the message. + example: '+15552223333' + description: + type: string + description: A detailed description of the event described by the callback. + example: Incoming message received + message: + $ref: '#/components/schemas/inboundCallbackMessage' + carrierName: + $ref: '#/components/schemas/carrierName' required: - time - type - to - description - message - messageCallbackMessage: - description: Message payload schema within a MessageCallback + statusCallbackTypeEnum: + type: string + description: >- + The possible status callbacks when sending an MT SMS or MMS or RBM + message: + + - `message-sending` indicates that Bandwidth is sending the message to + the upstream provider. + + - `message-delivered` indicates that the message was successfully sent. + + - `message-failed` indicates that the message could not be sent to the + intended recipient. + + - `message-read` indicates that the RBM message was read by the + recipient. + enum: + - message-sending + - message-delivered + - message-failed + - message-read + example: message-delivered + inboundCallbackTypeEnum: + type: string + description: >- + The possible inbound callback types originating from MO messages or + multichannel message client responses: + + - `message-received` indicates an MO message from a Bandwidth user's + client to a Bandwidth number. + + - `request-location-response` indicates a response to a location request + sent by the Bandwidth user's client after receiving an RBM message. + + - `suggestion-response` indicates a response to a suggestion sent by the + Bandwidth user's client after receiving an RBM message. + enum: + - message-received + - request-location-response + - suggestion-response + example: message-received + statusCallbackMessage: + description: Message payload schema within a callback type: object properties: id: type: string + description: A unique identifier of the message. example: 1661365814859loidf7mcwd4qacn7 owner: type: string + description: >- + The Bandwidth phone number or alphanumeric identifier associated + with the message. example: '+15553332222' applicationId: - type: string - example: 93de2206-9669-4e07-948d-329f4b722ee2 + $ref: '#/components/schemas/applicationId' time: type: string format: date-time example: 2024-12-02T20:15:57.666Z segmentCount: - type: integer - example: 1 + $ref: '#/components/schemas/segmentCount' direction: $ref: '#/components/schemas/messageDirectionEnum' to: + description: The phone number recipients of the message. uniqueItems: true type: array items: @@ -2539,17 +2735,18 @@ components: - '+15552223333' from: type: string + description: >- + The Bandwidth phone number or alphanumeric identifier the message + was sent from. example: '+15553332222' text: type: string example: Hello world tag: - type: string - example: custom string + $ref: '#/components/schemas/tag' media: type: array - description: Optional media, applicable only for mms - nullable: true + description: Optional media, not applicable for sms items: type: string format: uri @@ -2558,6 +2755,28 @@ components: - https://dev.bandwidth.com/images/github_logo.png priority: $ref: '#/components/schemas/priorityEnum' + channel: + $ref: '#/components/schemas/multiChannelMessageChannelEnum' + required: + - id + - owner + - applicationId + - time + - segmentCount + - direction + - to + - from + inboundCallbackMessage: + allOf: + - $ref: '#/components/schemas/statusCallbackMessage' + - type: object + properties: + content: + $ref: '#/components/schemas/multiChannelMessageContent' + suggestionResponse: + $ref: '#/components/schemas/rbmSuggestionResponse' + locationResponse: + $ref: '#/components/schemas/rbmLocationResponse' required: - id - owner @@ -2567,7 +2786,6 @@ components: - direction - to - from - - text callbackMethodEnum: type: string nullable: true @@ -5954,6 +6172,12 @@ components: application/json: schema: $ref: '#/components/schemas/messagingRequestError' + messagingMethodNotAllowedError: + description: Method Not Allowed + content: + application/json: + schema: + $ref: '#/components/schemas/messagingRequestError' messagingInvalidMediaTypeError: description: Unsupported Media Type content: @@ -5972,6 +6196,120 @@ components: application/json: schema: $ref: '#/components/schemas/messagingRequestError' + multiChannelBadRequestError: + description: Bad Request + content: + application/json: + schema: + $ref: '#/components/schemas/multiChannelError' + example: + links: [] + data: null + errors: + - type: request-validation + description: >- + The 'channelList[0].from' field must contain exactly one + telephone number + source: + field: channelList[0].from + multiChannelNotAcceptableError: + description: Not Acceptable + multiChannelUnauthorizedError: + description: Unauthorized + content: + application/json: + schema: + $ref: '#/components/schemas/multiChannelError' + example: + links: [] + data: null + errors: + - type: unauthorized + description: Authentication Failed + source: {} + multiChannelForbiddenError: + description: Forbidden + content: + application/json: + schema: + $ref: '#/components/schemas/multiChannelError' + example: + links: [] + data: null + errors: + - type: forbidden + description: Access Denied + source: {} + multiChannelNotFoundError: + description: Not Found + content: + application/json: + schema: + $ref: '#/components/schemas/multiChannelError' + example: + links: [] + data: null + errors: + - type: forbidden + description: Resource not found. + source: {} + multiChannelMethodNotAllowedError: + description: Method Not Allowed + content: + application/json: + schema: + $ref: '#/components/schemas/multiChannelError' + example: + links: [] + data: null + errors: + - type: method-not-allowed + description: Method 'PUT' not supported for this resource. + source: {} + multiChannelInvalidMediaTypeError: + description: Unsupported Media Type + content: + application/json: + schema: + $ref: '#/components/schemas/multiChannelError' + example: + links: [] + data: null + errors: + - type: unsupported-content-type + description: >- + Content-Type 'application/xml;charset=UTF-8' is not supported. + Please use 'application/json' + source: + header: Content-Type + multiChannelTooManyRequestsError: + description: Too Many Requests + content: + application/json: + schema: + $ref: '#/components/schemas/multiChannelError' + example: + links: [] + data: null + errors: + - type: rate-limit-exceeded + description: >- + You have exceeded your rate limit for this endpoint. Please + retry later. + source: {} + multiChannelInternalServerError: + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/multiChannelError' + example: + links: [] + data: null + errors: + - type: internal-server-error + description: Internal server error. No further information available + source: {} createCallResponse: description: Created headers: @@ -6373,6 +6711,8 @@ components: example: description: Cannot process request. type: bad request + noContentResponse: + description: No Content tfvPostBadRequestResponse: description: Bad Request content: @@ -7506,17 +7846,30 @@ components: post: requestBody: required: true - 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". + description: >- +

This Inbound Message Webhook is an envelope containing either a + received (MO) message to your + + message-enabled Bandwidth telephone number or a multichannel + client's response to a suggestion response + + or location request. + +

The payload type will be one of message-received, + suggestion-response, or + location-request-response. + +

Note that suggestion-response and + location-request-response callback types are + pertinent only for RBM messages sent from the + /messages/multiChannel endpoint.

Please visit Webhooks

content: application/json: schema: - $ref: '#/components/schemas/messageCallback' + $ref: '#/components/schemas/inboundCallback' examples: smsMessageReceivedCallback: $ref: '#/components/examples/smsMessageReceivedCallbackExample' @@ -7525,24 +7878,26 @@ components: responses: '200': description: OK + '202': + description: Accepted statusCallback: '{statusCallbackUrl}': post: requestBody: required: true - description: > + 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". + information regarding a message sent (MT) + from your message-enabled Bandwidth telephone number. +

The payload type will be one of message-sending, message-delivered, message-failed or message-read. +

Note that message-read callbacks are pertinent only for RBM messages sent from the /messages/multiChannel endpoint.

Please visit Webhooks

content: application/json: schema: - $ref: '#/components/schemas/messageCallback' + $ref: '#/components/schemas/statusCallback' examples: messageSendingCallback: $ref: '#/components/examples/messageSendingCallbackExample' @@ -7558,19 +7913,8 @@ components: responses: '200': description: OK - multiChannelMessageCallback: - '{multiChannelMessageCallbackUrl}': - post: - requestBody: - required: true - description: Status Callback Payload - content: - application/json: - schema: - $ref: '#/components/schemas/multiChannelCallbackData' - responses: - '204': - description: No Content + '202': + description: Accepted tfVerificationStatus: your_url.com/webhookService: post: @@ -7594,7 +7938,7 @@ components: $ref: '#/components/requestBodies/verificationWebhookRequest' responses: '204': - description: No Content + $ref: '#/components/responses/noContentResponse' '400': $ref: '#/components/responses/tfvBadRequestResponse' '401': diff --git a/docs/Callback.md b/docs/Callback.md new file mode 100644 index 00000000..78e9137f --- /dev/null +++ b/docs/Callback.md @@ -0,0 +1,18 @@ +# Bandwidth.Standard.Model.Callback +Callbacks are divided into two types based on direction of the related message: - `statusCallback` indicates status of an outbound MT SMS, MMS, or RBM message. - `inboundCallback` indicates an inbound MO message or a multichannel message client's response to a suggestion or location request. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Time** | **DateTime** | | +**EventTime** | **DateTime** | Represents the time at which the message was read, for `message-read` callbacks. | [optional] +**Type** | **InboundCallbackTypeEnum** | | +**To** | **string** | The destination phone number the message was sent to. For inbound callbacks, this is the Bandwidth number or alphanumeric identifier that received the message. | +**Description** | **string** | A detailed description of the event described by the callback. | +**Message** | [**InboundCallbackMessage**](InboundCallbackMessage.md) | | +**ErrorCode** | **int** | Optional error code, applicable only when type is `message-failed`. | [optional] +**CarrierName** | **string** | The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. | [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/CreateMultiChannelMessageResponse.md b/docs/CreateMultiChannelMessageResponse.md index b8973eb8..32ac359f 100644 --- a/docs/CreateMultiChannelMessageResponse.md +++ b/docs/CreateMultiChannelMessageResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Links** | [**List<Link>**](Link.md) | | [optional] -**Data** | [**MultiChannelMessageData**](MultiChannelMessageData.md) | | [optional] +**Data** | [**MultiChannelMessageResponseData**](MultiChannelMessageResponseData.md) | | [optional] **Errors** | [**List<ErrorObject>**](ErrorObject.md) | | [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/ErrorObject.md b/docs/ErrorObject.md index b6507929..185da5d0 100644 --- a/docs/ErrorObject.md +++ b/docs/ErrorObject.md @@ -4,8 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Code** | **string** | | [optional] -**Message** | **string** | | [optional] +**Type** | **string** | A concise summary of the error used for categorization. | +**Description** | **string** | A detailed explanation of the error. | +**Source** | [**ErrorSource**](ErrorSource.md) | | [[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/ErrorSource.md b/docs/ErrorSource.md new file mode 100644 index 00000000..ce45ad3a --- /dev/null +++ b/docs/ErrorSource.md @@ -0,0 +1,14 @@ +# Bandwidth.Standard.Model.ErrorSource +Specifies relevant sources of the error, if any. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Parameter** | **string** | The relevant URI query parameter causing the error | [optional] +**Field** | **string** | The request body field that led to the error | [optional] +**Header** | **string** | The header field that contributed to the error | [optional] +**Reference** | **string** | A resource ID or path linked to the error | [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/InboundCallback.md b/docs/InboundCallback.md new file mode 100644 index 00000000..e4f5734e --- /dev/null +++ b/docs/InboundCallback.md @@ -0,0 +1,16 @@ +# Bandwidth.Standard.Model.InboundCallback +Represents an inbound callback. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Time** | **DateTime** | | +**Type** | **InboundCallbackTypeEnum** | | +**To** | **string** | The destination phone number the message was sent to. For inbound callbacks, this is the Bandwidth number or alphanumeric identifier that received the message. | +**Description** | **string** | A detailed description of the event described by the callback. | +**Message** | [**InboundCallbackMessage**](InboundCallbackMessage.md) | | +**CarrierName** | **string** | The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. | [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/InboundCallbackMessage.md b/docs/InboundCallbackMessage.md new file mode 100644 index 00000000..3a5dcde0 --- /dev/null +++ b/docs/InboundCallbackMessage.md @@ -0,0 +1,25 @@ +# Bandwidth.Standard.Model.InboundCallbackMessage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | A unique identifier of the message. | +**Owner** | **string** | The Bandwidth phone number or alphanumeric identifier associated with the message. | +**ApplicationId** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. | +**Time** | **DateTime** | | +**SegmentCount** | **int** | The number of segments the user's message is broken into before sending over carrier networks. | +**Direction** | **MessageDirectionEnum** | | +**To** | **List<string>** | The phone number recipients of the message. | +**From** | **string** | The Bandwidth phone number or alphanumeric identifier the message was sent from. | +**Text** | **string** | | [optional] +**Tag** | **string** | A custom string that will be included in callback events of the message. Max 1024 characters. | [optional] +**Media** | **List<string>** | Optional media, not applicable for sms | [optional] +**Priority** | **PriorityEnum** | | [optional] +**Channel** | **MultiChannelMessageChannelEnum** | | [optional] +**Content** | [**MultiChannelMessageContent**](MultiChannelMessageContent.md) | | [optional] +**SuggestionResponse** | [**RbmSuggestionResponse**](RbmSuggestionResponse.md) | | [optional] +**LocationResponse** | [**RbmLocationResponse**](RbmLocationResponse.md) | | [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/InboundCallbackTypeEnum.md b/docs/InboundCallbackTypeEnum.md new file mode 100644 index 00000000..03461e35 --- /dev/null +++ b/docs/InboundCallbackTypeEnum.md @@ -0,0 +1,10 @@ +# Bandwidth.Standard.Model.InboundCallbackTypeEnum +The possible inbound callback types originating from MO messages or multichannel message client responses: - `message-received` indicates an MO message from a Bandwidth user's client to a Bandwidth number. - `request-location-response` indicates a response to a location request sent by the Bandwidth user's client after receiving an RBM message. - `suggestion-response` indicates a response to a suggestion sent by the Bandwidth user's client after receiving an RBM message. + +## 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/ListMessageItem.md b/docs/ListMessageItem.md index 416aff5a..072ce7c6 100644 --- a/docs/ListMessageItem.md +++ b/docs/ListMessageItem.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **MessageStatus** | **MessageStatusEnum** | | [optional] **MessageDirection** | **ListMessageDirectionEnum** | | [optional] **MessageType** | **MessageTypeEnum** | | [optional] -**SegmentCount** | **int** | The number of segments the message was sent as. | [optional] +**SegmentCount** | **int** | The number of segments the user's message is broken into before sending over carrier networks. | [optional] **ErrorCode** | **int** | The numeric error code of the message. | [optional] **ReceiveTime** | **DateTime** | The ISO 8601 datetime of the message. | [optional] **CarrierName** | **string** | The name of the carrier. Not currently supported for MMS coming soon. | [optional] diff --git a/docs/Message.md b/docs/Message.md index 071d55c0..ddf04c89 100644 --- a/docs/Message.md +++ b/docs/Message.md @@ -6,15 +6,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | **string** | The id of the message. | [optional] **Owner** | **string** | The Bandwidth phone number associated with the message. | [optional] -**ApplicationId** | **string** | The application ID associated with the message. | [optional] +**ApplicationId** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. | [optional] **Time** | **DateTime** | The datetime stamp of the message in ISO 8601 | [optional] -**SegmentCount** | **int** | The number of segments the original message from the user is broken into before sending over to carrier networks. | [optional] +**SegmentCount** | **int** | The number of segments the user's message is broken into before sending over carrier networks. | [optional] **Direction** | **MessageDirectionEnum** | | [optional] **To** | **List<string>** | The phone number recipients of the message. | [optional] **From** | **string** | The phone number the message was sent from. | [optional] **Media** | **List<string>** | The list of media URLs sent in the message. Including a `filename` field in the `Content-Disposition` header of the media linked with a URL will set the displayed file name. This is a best practice to ensure that your media has a readable file name. | [optional] **Text** | **string** | The contents of the message. | [optional] -**Tag** | **string** | The custom string set by the user. | [optional] +**Tag** | **string** | A custom string that will be included in callback events of the message. Max 1024 characters. | [optional] **Priority** | **PriorityEnum** | | [optional] **Expiration** | **DateTime** | A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future. | [optional] diff --git a/docs/MessageRequest.md b/docs/MessageRequest.md index 9e12d62a..7c051d2a 100644 --- a/docs/MessageRequest.md +++ b/docs/MessageRequest.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ApplicationId** | **string** | The ID of the Application your from number is associated with in the Bandwidth Phone Number Dashboard. | +**ApplicationId** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. | **To** | **List<string>** | The phone number(s) the message should be sent to in E164 format. | **From** | **string** | Either an alphanumeric sender ID or the sender's Bandwidth phone number in E.164 format, which must be hosted within Bandwidth and linked to the account that is generating the message. Alphanumeric Sender IDs can contain up to 11 characters, upper-case letters A-Z, lower-case letters a-z, numbers 0-9, space, hyphen -, plus +, underscore _ and ampersand &. Alphanumeric Sender IDs must contain at least one letter. | **Text** | **string** | The contents of the text message. Must be 2048 characters or less. | [optional] diff --git a/docs/MessagesApi.md b/docs/MessagesApi.md index 67853a3b..8ebc03c9 100644 --- a/docs/MessagesApi.md +++ b/docs/MessagesApi.md @@ -105,6 +105,7 @@ catch (ApiException e) | **401** | Unauthorized | - | | **403** | Forbidden | - | | **404** | Not Found | - | +| **405** | Method Not Allowed | - | | **406** | Not Acceptable | - | | **415** | Unsupported Media Type | - | | **429** | Too Many Requests | - | diff --git a/docs/MmsMessageContent.md b/docs/MmsMessageContent.md index ce3881fa..fabed58e 100644 --- a/docs/MmsMessageContent.md +++ b/docs/MmsMessageContent.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Text** | **string** | The contents of the text message. Must be 2048 characters or less. | [optional] -**Media** | **List<string>** | A list of URLs to include as media attachments as part of the message. Each URL can be at most 4096 characters. | [optional] +**Media** | [**List<MmsMessageContentFile>**](MmsMessageContentFile.md) | | [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/MmsMessageContentFile.md b/docs/MmsMessageContentFile.md new file mode 100644 index 00000000..35beae55 --- /dev/null +++ b/docs/MmsMessageContentFile.md @@ -0,0 +1,10 @@ +# Bandwidth.Standard.Model.MmsMessageContentFile + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FileUrl** | **string** | The URL of a media attachment. For MMS, the API limits file size to 3.5MB. Specific carriers and channels may have a smaller limit that could cause a large file to fail, see [here](https://support.bandwidth.com/hc/en-us/articles/360014235473-What-are-the-MMS-file-size-limits) for more details. | + +[[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/MultiChannelAction.md b/docs/MultiChannelAction.md index 09057543..76c29ffa 100644 --- a/docs/MultiChannelAction.md +++ b/docs/MultiChannelAction.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type** | **RbmActionTypeEnum** | | **Text** | **string** | Displayed text for user to click | -**PostBackData** | **byte[]** | Base64 payload the customer receives when the reply is clicked. | +**PostbackData** | **byte[]** | Base64 payload the customer receives when the reply is clicked. | **PhoneNumber** | **string** | The phone number to dial. Must be E164 format. | **Latitude** | **double** | The latitude of the location. | **Longitude** | **double** | The longitude of the location. | diff --git a/docs/MultiChannelActionCalendarEvent.md b/docs/MultiChannelActionCalendarEvent.md index 04ffb1cd..31b28d1c 100644 --- a/docs/MultiChannelActionCalendarEvent.md +++ b/docs/MultiChannelActionCalendarEvent.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type** | **RbmActionTypeEnum** | | **Text** | **string** | Displayed text for user to click | -**PostBackData** | **byte[]** | Base64 payload the customer receives when the reply is clicked. | +**PostbackData** | **byte[]** | Base64 payload the customer receives when the reply is clicked. | **Title** | **string** | The title of the event. | **StartTime** | **DateTime** | The start time of the event. | **EndTime** | **DateTime** | The end time of the event. | diff --git a/docs/MultiChannelApi.md b/docs/MultiChannelApi.md index 582e8742..9bef9031 100644 --- a/docs/MultiChannelApi.md +++ b/docs/MultiChannelApi.md @@ -104,6 +104,7 @@ catch (ApiException e) | **401** | Unauthorized | - | | **403** | Forbidden | - | | **404** | Not Found | - | +| **405** | Method Not Allowed | - | | **406** | Not Acceptable | - | | **415** | Unsupported Media Type | - | | **429** | Too Many Requests | - | diff --git a/docs/MultiChannelChannelListObjectContent.md b/docs/MultiChannelChannelListObjectContent.md index 51c967c7..facb69aa 100644 --- a/docs/MultiChannelChannelListObjectContent.md +++ b/docs/MultiChannelChannelListObjectContent.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Text** | **string** | The contents of the text message. Must be 2048 characters or less. | **Suggestions** | [**List<MultiChannelAction>**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] -**Media** | **List<string>** | A list of URLs to include as media attachments as part of the message. Each URL can be at most 4096 characters. | +**Media** | [**List<MmsMessageContentFile>**](MmsMessageContentFile.md) | | **Orientation** | **StandaloneCardOrientationEnum** | | **ThumbnailImageAlignment** | **ThumbnailAlignmentEnum** | | **CardContent** | [**RbmCardContent**](RbmCardContent.md) | | diff --git a/docs/MultiChannelError.md b/docs/MultiChannelError.md new file mode 100644 index 00000000..a0a50083 --- /dev/null +++ b/docs/MultiChannelError.md @@ -0,0 +1,12 @@ +# Bandwidth.Standard.Model.MultiChannelError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Links** | [**List<Link>**](Link.md) | | [optional] +**Data** | **Object** | | [optional] +**Errors** | [**List<ErrorObject>**](ErrorObject.md) | | [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/MultiChannelMessageContent.md b/docs/MultiChannelMessageContent.md new file mode 100644 index 00000000..d24e8955 --- /dev/null +++ b/docs/MultiChannelMessageContent.md @@ -0,0 +1,12 @@ +# Bandwidth.Standard.Model.MultiChannelMessageContent +The structure of the content field of a multichannel message. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Text** | **string** | | [optional] +**Media** | [**RbmMessageContentFile**](RbmMessageContentFile.md) | | [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/MultiChannelMessageResponseData.md b/docs/MultiChannelMessageResponseData.md new file mode 100644 index 00000000..f5228ddd --- /dev/null +++ b/docs/MultiChannelMessageResponseData.md @@ -0,0 +1,18 @@ +# Bandwidth.Standard.Model.MultiChannelMessageResponseData +The data returned in a multichannel message response. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MessageId** | **string** | The ID of the message. | +**Time** | **DateTime** | The time the message was received by the Bandwidth API. | +**Direction** | **MessageDirectionEnum** | | +**To** | **List<string>** | The destination phone number(s) of the message, in E164 format. | +**ChannelList** | [**List<MultiChannelMessageResponseDataChannelListInner>**](MultiChannelMessageResponseDataChannelListInner.md) | A list of message bodies. The messages will be attempted in the order they are listed. Once a message sends successfully, the others will be ignored. | +**Tag** | **string** | A custom string that will be included in callback events of the message. Max 1024 characters. | [optional] +**Priority** | **PriorityEnum** | | [optional] +**Expiration** | **DateTime** | A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future. | [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/MultiChannelMessageResponseDataChannelListInner.md b/docs/MultiChannelMessageResponseDataChannelListInner.md new file mode 100644 index 00000000..21061cb5 --- /dev/null +++ b/docs/MultiChannelMessageResponseDataChannelListInner.md @@ -0,0 +1,14 @@ +# Bandwidth.Standard.Model.MultiChannelMessageResponseDataChannelListInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**From** | **string** | The sender ID of the message. This could be an alphanumeric sender ID. | +**ApplicationId** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. | +**Channel** | **MultiChannelMessageChannelEnum** | | +**Content** | [**MultiChannelChannelListObjectContent**](MultiChannelChannelListObjectContent.md) | | +**Owner** | **string** | The Bandwidth senderId associated with the message. Identical to 'from'. | + +[[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/PriorityEnum.md b/docs/PriorityEnum.md index 5c17cb50..8797c450 100644 --- a/docs/PriorityEnum.md +++ b/docs/PriorityEnum.md @@ -1,5 +1,5 @@ # Bandwidth.Standard.Model.PriorityEnum -The priority specified by the user. +Specifies the message's sending priority with respect to other messages in your account. For best results and optimal throughput, reserve the 'high' priority setting for critical messages only. ## Properties diff --git a/docs/RbmActionBase.md b/docs/RbmActionBase.md index 7ee5324c..704de253 100644 --- a/docs/RbmActionBase.md +++ b/docs/RbmActionBase.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type** | **RbmActionTypeEnum** | | **Text** | **string** | Displayed text for user to click | -**PostBackData** | **byte[]** | Base64 payload the customer receives when the reply is clicked. | +**PostbackData** | **byte[]** | Base64 payload the customer receives when the reply is clicked. | [[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/RbmActionDial.md b/docs/RbmActionDial.md index d5b18e43..33ceb529 100644 --- a/docs/RbmActionDial.md +++ b/docs/RbmActionDial.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type** | **RbmActionTypeEnum** | | **Text** | **string** | Displayed text for user to click | -**PostBackData** | **byte[]** | Base64 payload the customer receives when the reply is clicked. | +**PostbackData** | **byte[]** | Base64 payload the customer receives when the reply is clicked. | **PhoneNumber** | **string** | The phone number to dial. Must be E164 format. | [[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/RbmActionOpenUrl.md b/docs/RbmActionOpenUrl.md index a86c6ea8..f1dec721 100644 --- a/docs/RbmActionOpenUrl.md +++ b/docs/RbmActionOpenUrl.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type** | **RbmActionTypeEnum** | | **Text** | **string** | Displayed text for user to click | -**PostBackData** | **byte[]** | Base64 payload the customer receives when the reply is clicked. | +**PostbackData** | **byte[]** | Base64 payload the customer receives when the reply is clicked. | **Url** | **string** | The URL to open in browser. | [[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/RbmActionViewLocation.md b/docs/RbmActionViewLocation.md index 237b9aed..f61ad965 100644 --- a/docs/RbmActionViewLocation.md +++ b/docs/RbmActionViewLocation.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type** | **RbmActionTypeEnum** | | **Text** | **string** | Displayed text for user to click | -**PostBackData** | **byte[]** | Base64 payload the customer receives when the reply is clicked. | +**PostbackData** | **byte[]** | Base64 payload the customer receives when the reply is clicked. | **Latitude** | **double** | The latitude of the location. | **Longitude** | **double** | The longitude of the location. | **Label** | **string** | The label of the location. | [optional] diff --git a/docs/RbmLocationResponse.md b/docs/RbmLocationResponse.md new file mode 100644 index 00000000..cd154df9 --- /dev/null +++ b/docs/RbmLocationResponse.md @@ -0,0 +1,11 @@ +# Bandwidth.Standard.Model.RbmLocationResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Latitude** | **double** | The latitude of the client's location. | [optional] +**Longitude** | **double** | The longitude of the client's location. | [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/RbmSuggestionResponse.md b/docs/RbmSuggestionResponse.md new file mode 100644 index 00000000..eb00fe01 --- /dev/null +++ b/docs/RbmSuggestionResponse.md @@ -0,0 +1,11 @@ +# Bandwidth.Standard.Model.RbmSuggestionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Text** | **string** | The text associated with the suggestion response. | [optional] +**PostbackData** | **byte[]** | Base64 payload the customer receives when the reply is clicked. | [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/StatusCallback.md b/docs/StatusCallback.md new file mode 100644 index 00000000..e584abe1 --- /dev/null +++ b/docs/StatusCallback.md @@ -0,0 +1,18 @@ +# Bandwidth.Standard.Model.StatusCallback +Represents a status callback for an outbound MT SMS or MMS or RBM message. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Time** | **DateTime** | | +**EventTime** | **DateTime** | Represents the time at which the message was read, for `message-read` callbacks. | [optional] +**Type** | **StatusCallbackTypeEnum** | | +**To** | **string** | The destination phone number the message was sent to. For status callbacks, this the the Bandwidth user's client phone number. | +**Description** | **string** | A detailed description of the event described by the callback. | +**Message** | [**StatusCallbackMessage**](StatusCallbackMessage.md) | | +**ErrorCode** | **int** | Optional error code, applicable only when type is `message-failed`. | [optional] +**CarrierName** | **string** | The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. | [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/StatusCallbackMessage.md b/docs/StatusCallbackMessage.md new file mode 100644 index 00000000..c78a5269 --- /dev/null +++ b/docs/StatusCallbackMessage.md @@ -0,0 +1,23 @@ +# Bandwidth.Standard.Model.StatusCallbackMessage +Message payload schema within a callback + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | A unique identifier of the message. | +**Owner** | **string** | The Bandwidth phone number or alphanumeric identifier associated with the message. | +**ApplicationId** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. | +**Time** | **DateTime** | | +**SegmentCount** | **int** | The number of segments the user's message is broken into before sending over carrier networks. | +**Direction** | **MessageDirectionEnum** | | +**To** | **List<string>** | The phone number recipients of the message. | +**From** | **string** | The Bandwidth phone number or alphanumeric identifier the message was sent from. | +**Text** | **string** | | [optional] +**Tag** | **string** | A custom string that will be included in callback events of the message. Max 1024 characters. | [optional] +**Media** | **List<string>** | Optional media, not applicable for sms | [optional] +**Priority** | **PriorityEnum** | | [optional] +**Channel** | **MultiChannelMessageChannelEnum** | | [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/StatusCallbackTypeEnum.md b/docs/StatusCallbackTypeEnum.md new file mode 100644 index 00000000..bbd2c889 --- /dev/null +++ b/docs/StatusCallbackTypeEnum.md @@ -0,0 +1,10 @@ +# Bandwidth.Standard.Model.StatusCallbackTypeEnum +The possible status callbacks when sending an MT SMS or MMS or RBM message: - `message-sending` indicates that Bandwidth is sending the message to the upstream provider. - `message-delivered` indicates that the message was successfully sent. - `message-failed` indicates that the message could not be sent to the intended recipient. - `message-read` indicates that the RBM message was read by the recipient. + +## 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/TollFreeVerificationApi.md b/docs/TollFreeVerificationApi.md index fbbda62d..69151969 100644 --- a/docs/TollFreeVerificationApi.md +++ b/docs/TollFreeVerificationApi.md @@ -5,6 +5,7 @@ All URIs are relative to *http://localhost* | Method | HTTP request | Description | |--------|--------------|-------------| | [**CreateWebhookSubscription**](TollFreeVerificationApi.md#createwebhooksubscription) | **POST** /accounts/{accountId}/tollFreeVerification/webhooks/subscriptions | Create Webhook Subscription | +| [**DeleteVerificationRequest**](TollFreeVerificationApi.md#deleteverificationrequest) | **DELETE** /accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification | Delete a Toll-Free Verification Submission | | [**DeleteWebhookSubscription**](TollFreeVerificationApi.md#deletewebhooksubscription) | **DELETE** /accounts/{accountId}/tollFreeVerification/webhooks/subscriptions/{id} | Delete Webhook Subscription | | [**GetTollFreeVerificationStatus**](TollFreeVerificationApi.md#gettollfreeverificationstatus) | **GET** /accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification | Get Toll-Free Verification Status | | [**ListTollFreeUseCases**](TollFreeVerificationApi.md#listtollfreeusecases) | **GET** /tollFreeVerification/useCases | List Toll-Free Use Cases | @@ -118,6 +119,107 @@ catch (ApiException e) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **DeleteVerificationRequest** +> void DeleteVerificationRequest (string accountId, string phoneNumber) + +Delete a Toll-Free Verification Submission + +Delete a toll-free verification submission for a toll-free number. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Bandwidth.Standard.Api; +using Bandwidth.Standard.Client; +using Bandwidth.Standard.Model; + +namespace Example +{ + public class DeleteVerificationRequestExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost"; + // Configure HTTP basic authorization: Basic + config.Username = "YOUR_USERNAME"; + config.Password = "YOUR_PASSWORD"; + + var apiInstance = new TollFreeVerificationApi(config); + var accountId = 9900000; // string | Your Bandwidth Account ID. + var phoneNumber = +18885555555; // string | Valid Toll-Free telephone number in E.164 format. + + try + { + // Delete a Toll-Free Verification Submission + apiInstance.DeleteVerificationRequest(accountId, phoneNumber); + } + catch (ApiException e) + { + Debug.Print("Exception when calling TollFreeVerificationApi.DeleteVerificationRequest: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the DeleteVerificationRequestWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Delete a Toll-Free Verification Submission + apiInstance.DeleteVerificationRequestWithHttpInfo(accountId, phoneNumber); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling TollFreeVerificationApi.DeleteVerificationRequestWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **accountId** | **string** | Your Bandwidth Account ID. | | +| **phoneNumber** | **string** | Valid Toll-Free telephone number in E.164 format. | | + +### Return type + +void (empty response body) + +### Authorization + +[Basic](../README.md#Basic) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Cannot find the requested resource. | - | +| **405** | Method Not Allowed | - | +| **429** | Too Many Requests | - | +| **500** | Internal Server Error | - | +| **503** | Service Unavailable | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **DeleteWebhookSubscription** > void DeleteWebhookSubscription (string accountId, string id) diff --git a/src/Bandwidth.Standard/Api/TollFreeVerificationApi.cs b/src/Bandwidth.Standard/Api/TollFreeVerificationApi.cs index 23443785..587a0f5b 100644 --- a/src/Bandwidth.Standard/Api/TollFreeVerificationApi.cs +++ b/src/Bandwidth.Standard/Api/TollFreeVerificationApi.cs @@ -53,6 +53,31 @@ public interface ITollFreeVerificationApiSync : IApiAccessor /// ApiResponse of WebhookSubscription ApiResponse CreateWebhookSubscriptionWithHttpInfo(string accountId, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, int operationIndex = 0); /// + /// Delete a Toll-Free Verification Submission + /// + /// + /// Delete a toll-free verification submission for a toll-free number. + /// + /// Thrown when fails to make API call + /// Your Bandwidth Account ID. + /// Valid Toll-Free telephone number in E.164 format. + /// Index associated with the operation. + /// + void DeleteVerificationRequest(string accountId, string phoneNumber, int operationIndex = 0); + + /// + /// Delete a Toll-Free Verification Submission + /// + /// + /// Delete a toll-free verification submission for a toll-free number. + /// + /// Thrown when fails to make API call + /// Your Bandwidth Account ID. + /// Valid Toll-Free telephone number in E.164 format. + /// Index associated with the operation. + /// ApiResponse of Object(void) + ApiResponse DeleteVerificationRequestWithHttpInfo(string accountId, string phoneNumber, int operationIndex = 0); + /// /// Delete Webhook Subscription /// /// @@ -262,6 +287,33 @@ public interface ITollFreeVerificationApiAsync : IApiAccessor /// Task of ApiResponse (WebhookSubscription) System.Threading.Tasks.Task> CreateWebhookSubscriptionWithHttpInfoAsync(string accountId, WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// + /// Delete a Toll-Free Verification Submission + /// + /// + /// Delete a toll-free verification submission for a toll-free number. + /// + /// Thrown when fails to make API call + /// Your Bandwidth Account ID. + /// Valid Toll-Free telephone number in E.164 format. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task DeleteVerificationRequestAsync(string accountId, string phoneNumber, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Delete a Toll-Free Verification Submission + /// + /// + /// Delete a toll-free verification submission for a toll-free number. + /// + /// Thrown when fails to make API call + /// Your Bandwidth Account ID. + /// Valid Toll-Free telephone number in E.164 format. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> DeleteVerificationRequestWithHttpInfoAsync(string accountId, string phoneNumber, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Delete Webhook Subscription /// /// @@ -744,6 +796,178 @@ public Bandwidth.Standard.Client.ApiResponse CreateWebhookS return localVarResponse; } + /// + /// Delete a Toll-Free Verification Submission Delete a toll-free verification submission for a toll-free number. + /// + /// Thrown when fails to make API call + /// Your Bandwidth Account ID. + /// Valid Toll-Free telephone number in E.164 format. + /// Index associated with the operation. + /// + public void DeleteVerificationRequest(string accountId, string phoneNumber, int operationIndex = 0) + { + DeleteVerificationRequestWithHttpInfo(accountId, phoneNumber); + } + + /// + /// Delete a Toll-Free Verification Submission Delete a toll-free verification submission for a toll-free number. + /// + /// Thrown when fails to make API call + /// Your Bandwidth Account ID. + /// Valid Toll-Free telephone number in E.164 format. + /// Index associated with the operation. + /// ApiResponse of Object(void) + public Bandwidth.Standard.Client.ApiResponse DeleteVerificationRequestWithHttpInfo(string accountId, string phoneNumber, int operationIndex = 0) + { + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new Bandwidth.Standard.Client.ApiException(400, "Missing required parameter 'accountId' when calling TollFreeVerificationApi->DeleteVerificationRequest"); + } + + // verify the required parameter 'phoneNumber' is set + if (phoneNumber == null) + { + throw new Bandwidth.Standard.Client.ApiException(400, "Missing required parameter 'phoneNumber' when calling TollFreeVerificationApi->DeleteVerificationRequest"); + } + + Bandwidth.Standard.Client.RequestOptions localVarRequestOptions = new Bandwidth.Standard.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Bandwidth.Standard.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Bandwidth.Standard.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("accountId", Bandwidth.Standard.Client.ClientUtils.ParameterToString(accountId)); // path parameter + localVarRequestOptions.PathParameters.Add("phoneNumber", Bandwidth.Standard.Client.ClientUtils.ParameterToString(phoneNumber)); // path parameter + + localVarRequestOptions.Operation = "TollFreeVerificationApi.DeleteVerificationRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (Basic) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = this.Client.Delete("/accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteVerificationRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Delete a Toll-Free Verification Submission Delete a toll-free verification submission for a toll-free number. + /// + /// Thrown when fails to make API call + /// Your Bandwidth Account ID. + /// Valid Toll-Free telephone number in E.164 format. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of void + public async System.Threading.Tasks.Task DeleteVerificationRequestAsync(string accountId, string phoneNumber, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + await DeleteVerificationRequestWithHttpInfoAsync(accountId, phoneNumber, operationIndex, cancellationToken).ConfigureAwait(false); + } + + /// + /// Delete a Toll-Free Verification Submission Delete a toll-free verification submission for a toll-free number. + /// + /// Thrown when fails to make API call + /// Your Bandwidth Account ID. + /// Valid Toll-Free telephone number in E.164 format. + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + public async System.Threading.Tasks.Task> DeleteVerificationRequestWithHttpInfoAsync(string accountId, string phoneNumber, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // verify the required parameter 'accountId' is set + if (accountId == null) + { + throw new Bandwidth.Standard.Client.ApiException(400, "Missing required parameter 'accountId' when calling TollFreeVerificationApi->DeleteVerificationRequest"); + } + + // verify the required parameter 'phoneNumber' is set + if (phoneNumber == null) + { + throw new Bandwidth.Standard.Client.ApiException(400, "Missing required parameter 'phoneNumber' when calling TollFreeVerificationApi->DeleteVerificationRequest"); + } + + + Bandwidth.Standard.Client.RequestOptions localVarRequestOptions = new Bandwidth.Standard.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Bandwidth.Standard.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Bandwidth.Standard.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + localVarRequestOptions.PathParameters.Add("accountId", Bandwidth.Standard.Client.ClientUtils.ParameterToString(accountId)); // path parameter + localVarRequestOptions.PathParameters.Add("phoneNumber", Bandwidth.Standard.Client.ClientUtils.ParameterToString(phoneNumber)); // path parameter + + localVarRequestOptions.Operation = "TollFreeVerificationApi.DeleteVerificationRequest"; + localVarRequestOptions.OperationIndex = operationIndex; + + // authentication (Basic) required + // http basic authentication required + if (!string.IsNullOrEmpty(this.Configuration.Username) || !string.IsNullOrEmpty(this.Configuration.Password) && !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization")) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", "Basic " + Bandwidth.Standard.Client.ClientUtils.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password)); + } + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("DeleteVerificationRequest", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + /// /// Delete Webhook Subscription Delete a webhook subscription by ID. /// diff --git a/src/Bandwidth.Standard/Client/Configuration.cs b/src/Bandwidth.Standard/Client/Configuration.cs index bdda77bb..dbf4fda5 100644 --- a/src/Bandwidth.Standard/Client/Configuration.cs +++ b/src/Bandwidth.Standard/Client/Configuration.cs @@ -585,6 +585,18 @@ public Configuration() }, } }, + { + "TollFreeVerificationApi.DeleteVerificationRequest", new List> + { + { + new Dictionary + { + {"url", "https://api.bandwidth.com/api/v2"}, + {"description", "Production"} + } + }, + } + }, { "TollFreeVerificationApi.DeleteWebhookSubscription", new List> { diff --git a/src/Bandwidth.Standard/Model/Callback.cs b/src/Bandwidth.Standard/Model/Callback.cs new file mode 100644 index 00000000..7a8b2807 --- /dev/null +++ b/src/Bandwidth.Standard/Model/Callback.cs @@ -0,0 +1,262 @@ +/* + * 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 JsonSubTypes; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = Bandwidth.Standard.Client.OpenAPIDateConverter; +using System.Reflection; + +namespace Bandwidth.Standard.Model +{ + /// + /// Callbacks are divided into two types based on direction of the related message: - `statusCallback` indicates status of an outbound MT SMS, MMS, or RBM message. - `inboundCallback` indicates an inbound MO message or a multichannel message client's response to a suggestion or location request. + /// + [JsonConverter(typeof(CallbackJsonConverter))] + [DataContract(Name = "callback")] + public partial class Callback : AbstractOpenAPISchema, IValidatableObject + { + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of StatusCallback. + public Callback(StatusCallback actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of InboundCallback. + public Callback(InboundCallback actualInstance) + { + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); + } + + + private Object _actualInstance; + + /// + /// Gets or Sets ActualInstance + /// + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(InboundCallback) || value is InboundCallback) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(StatusCallback) || value is StatusCallback) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: InboundCallback, StatusCallback"); + } + } + } + + /// + /// Get the actual instance of `StatusCallback`. If the actual instance is not `StatusCallback`, + /// the InvalidClassException will be thrown + /// + /// An instance of StatusCallback + public StatusCallback GetStatusCallback() + { + return (StatusCallback)this.ActualInstance; + } + + /// + /// Get the actual instance of `InboundCallback`. If the actual instance is not `InboundCallback`, + /// the InvalidClassException will be thrown + /// + /// An instance of InboundCallback + public InboundCallback GetInboundCallback() + { + return (InboundCallback)this.ActualInstance; + } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Callback {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public override string ToJson() + { + return JsonConvert.SerializeObject(this.ActualInstance, Callback.SerializerSettings); + } + + /// + /// Converts the JSON string into an instance of Callback + /// + /// JSON string + /// An instance of Callback + public static Callback FromJson(string jsonString) + { + Callback newCallback = null; + + if (string.IsNullOrEmpty(jsonString)) + { + return newCallback; + } + int match = 0; + List matchedTypes = new List(); + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(InboundCallback).GetProperty("AdditionalProperties") == null) + { + newCallback = new Callback(JsonConvert.DeserializeObject(jsonString, Callback.SerializerSettings)); + } + else + { + newCallback = new Callback(JsonConvert.DeserializeObject(jsonString, Callback.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("InboundCallback"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into InboundCallback: {1}", jsonString, exception.ToString())); + } + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(StatusCallback).GetProperty("AdditionalProperties") == null) + { + newCallback = new Callback(JsonConvert.DeserializeObject(jsonString, Callback.SerializerSettings)); + } + else + { + newCallback = new Callback(JsonConvert.DeserializeObject(jsonString, Callback.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("StatusCallback"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into StatusCallback: {1}", jsonString, exception.ToString())); + } + + if (match == 0) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); + } + else if (match > 1) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + String.Join(",", matchedTypes)); + } + + // deserialization is considered successful at this point if no exception has been thrown. + return newCallback; + } + + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// Custom JSON converter for Callback + /// + public class CallbackJsonConverter : JsonConverter + { + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// JSON Serializer + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteRawValue((string)(typeof(Callback).GetMethod("ToJson").Invoke(value, null))); + } + + /// + /// To convert a JSON string into an object + /// + /// JSON reader + /// Object type + /// Existing value + /// JSON Serializer + /// The object converted from the JSON string + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + { + switch(reader.TokenType) + { + case JsonToken.StartObject: + return Callback.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartArray: + return Callback.FromJson(JArray.Load(reader).ToString(Formatting.None)); + default: + return null; + } + } + + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return false; + } + } + +} diff --git a/src/Bandwidth.Standard/Model/CreateMultiChannelMessageResponse.cs b/src/Bandwidth.Standard/Model/CreateMultiChannelMessageResponse.cs index f1882ce9..3c58c083 100644 --- a/src/Bandwidth.Standard/Model/CreateMultiChannelMessageResponse.cs +++ b/src/Bandwidth.Standard/Model/CreateMultiChannelMessageResponse.cs @@ -38,7 +38,7 @@ public partial class CreateMultiChannelMessageResponse : IValidatableObject /// links. /// data. /// errors. - public CreateMultiChannelMessageResponse(List links = default(List), MultiChannelMessageData data = default(MultiChannelMessageData), List errors = default(List)) + public CreateMultiChannelMessageResponse(List links = default(List), MultiChannelMessageResponseData data = default(MultiChannelMessageResponseData), List errors = default(List)) { this.Links = links; this.Data = data; @@ -48,6 +48,7 @@ public partial class CreateMultiChannelMessageResponse : IValidatableObject /// /// Gets or Sets Links /// + /// [] [DataMember(Name = "links", EmitDefaultValue = false)] public List Links { get; set; } @@ -55,11 +56,12 @@ public partial class CreateMultiChannelMessageResponse : IValidatableObject /// Gets or Sets Data /// [DataMember(Name = "data", EmitDefaultValue = false)] - public MultiChannelMessageData Data { get; set; } + public MultiChannelMessageResponseData Data { get; set; } /// /// Gets or Sets Errors /// + /// [] [DataMember(Name = "errors", EmitDefaultValue = false)] public List Errors { get; set; } diff --git a/src/Bandwidth.Standard/Model/ErrorObject.cs b/src/Bandwidth.Standard/Model/ErrorObject.cs index 37338e5a..b9b7ce7b 100644 --- a/src/Bandwidth.Standard/Model/ErrorObject.cs +++ b/src/Bandwidth.Standard/Model/ErrorObject.cs @@ -35,25 +35,55 @@ public partial class ErrorObject : IValidatableObject /// /// Initializes a new instance of the class. /// - /// code. - /// message. - public ErrorObject(string code = default(string), string message = default(string)) + [JsonConstructorAttribute] + protected ErrorObject() { } + /// + /// Initializes a new instance of the class. + /// + /// A concise summary of the error used for categorization. (required). + /// A detailed explanation of the error. (required). + /// source (required). + public ErrorObject(string type = default(string), string description = default(string), ErrorSource source = default(ErrorSource)) { - this.Code = code; - this.Message = message; + // to ensure "type" is required (not null) + if (type == null) + { + throw new ArgumentNullException("type is a required property for ErrorObject and cannot be null"); + } + this.Type = type; + // to ensure "description" is required (not null) + if (description == null) + { + throw new ArgumentNullException("description is a required property for ErrorObject and cannot be null"); + } + this.Description = description; + // to ensure "source" is required (not null) + if (source == null) + { + throw new ArgumentNullException("source is a required property for ErrorObject and cannot be null"); + } + this.Source = source; } /// - /// Gets or Sets Code + /// A concise summary of the error used for categorization. + /// + /// A concise summary of the error used for categorization. + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] + public string Type { get; set; } + + /// + /// A detailed explanation of the error. /// - [DataMember(Name = "code", EmitDefaultValue = false)] - public string Code { get; set; } + /// A detailed explanation of the error. + [DataMember(Name = "description", IsRequired = true, EmitDefaultValue = true)] + public string Description { get; set; } /// - /// Gets or Sets Message + /// Gets or Sets Source /// - [DataMember(Name = "message", EmitDefaultValue = false)] - public string Message { get; set; } + [DataMember(Name = "source", IsRequired = true, EmitDefaultValue = true)] + public ErrorSource Source { get; set; } /// /// Returns the string presentation of the object @@ -63,8 +93,9 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ErrorObject {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Source: ").Append(Source).Append("\n"); sb.Append("}\n"); return sb.ToString(); } diff --git a/src/Bandwidth.Standard/Model/ErrorSource.cs b/src/Bandwidth.Standard/Model/ErrorSource.cs new file mode 100644 index 00000000..1c9903a2 --- /dev/null +++ b/src/Bandwidth.Standard/Model/ErrorSource.cs @@ -0,0 +1,114 @@ +/* + * 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 +{ + /// + /// Specifies relevant sources of the error, if any. + /// + [DataContract(Name = "errorSource")] + public partial class ErrorSource : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The relevant URI query parameter causing the error. + /// The request body field that led to the error. + /// The header field that contributed to the error. + /// A resource ID or path linked to the error. + public ErrorSource(string varParameter = default(string), string field = default(string), string header = default(string), string reference = default(string)) + { + this.Parameter = varParameter; + this.Field = field; + this.Header = header; + this.Reference = reference; + } + + /// + /// The relevant URI query parameter causing the error + /// + /// The relevant URI query parameter causing the error + [DataMember(Name = "parameter", EmitDefaultValue = false)] + public string Parameter { get; set; } + + /// + /// The request body field that led to the error + /// + /// The request body field that led to the error + [DataMember(Name = "field", EmitDefaultValue = false)] + public string Field { get; set; } + + /// + /// The header field that contributed to the error + /// + /// The header field that contributed to the error + [DataMember(Name = "header", EmitDefaultValue = false)] + public string Header { get; set; } + + /// + /// A resource ID or path linked to the error + /// + /// A resource ID or path linked to the error + [DataMember(Name = "reference", EmitDefaultValue = false)] + public string Reference { 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 ErrorSource {\n"); + sb.Append(" Parameter: ").Append(Parameter).Append("\n"); + sb.Append(" Field: ").Append(Field).Append("\n"); + sb.Append(" Header: ").Append(Header).Append("\n"); + sb.Append(" Reference: ").Append(Reference).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/InboundCallback.cs b/src/Bandwidth.Standard/Model/InboundCallback.cs new file mode 100644 index 00000000..52d59a0d --- /dev/null +++ b/src/Bandwidth.Standard/Model/InboundCallback.cs @@ -0,0 +1,155 @@ +/* + * 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 +{ + /// + /// Represents an inbound callback. + /// + [DataContract(Name = "inboundCallback")] + public partial class InboundCallback : IValidatableObject + { + + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] + public InboundCallbackTypeEnum Type { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected InboundCallback() { } + /// + /// Initializes a new instance of the class. + /// + /// time (required). + /// type (required). + /// The destination phone number the message was sent to. For inbound callbacks, this is the Bandwidth number or alphanumeric identifier that received the message. (required). + /// A detailed description of the event described by the callback. (required). + /// message (required). + /// The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled.. + public InboundCallback(DateTime time = default(DateTime), InboundCallbackTypeEnum type = default(InboundCallbackTypeEnum), string to = default(string), string description = default(string), InboundCallbackMessage message = default(InboundCallbackMessage), string carrierName = default(string)) + { + this.Time = time; + this.Type = type; + // to ensure "to" is required (not null) + if (to == null) + { + throw new ArgumentNullException("to is a required property for InboundCallback 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 InboundCallback 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 InboundCallback and cannot be null"); + } + this.Message = message; + this.CarrierName = carrierName; + } + + /// + /// Gets or Sets Time + /// + /// 2024-12-02T20:15:57.278Z + [DataMember(Name = "time", IsRequired = true, EmitDefaultValue = true)] + public DateTime Time { get; set; } + + /// + /// The destination phone number the message was sent to. For inbound callbacks, this is the Bandwidth number or alphanumeric identifier that received the message. + /// + /// The destination phone number the message was sent to. For inbound callbacks, this is the Bandwidth number or alphanumeric identifier that received the message. + /// +15552223333 + [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = true)] + public string To { get; set; } + + /// + /// A detailed description of the event described by the callback. + /// + /// A detailed description of the event described by the callback. + /// 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 InboundCallbackMessage Message { get; set; } + + /// + /// The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. + /// + /// The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. + /// AT&T + [DataMember(Name = "carrierName", EmitDefaultValue = false)] + public string CarrierName { 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 InboundCallback {\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(" CarrierName: ").Append(CarrierName).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/InboundCallbackMessage.cs b/src/Bandwidth.Standard/Model/InboundCallbackMessage.cs new file mode 100644 index 00000000..66df61c9 --- /dev/null +++ b/src/Bandwidth.Standard/Model/InboundCallbackMessage.cs @@ -0,0 +1,266 @@ +/* + * 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 +{ + /// + /// InboundCallbackMessage + /// + [DataContract(Name = "inboundCallbackMessage")] + public partial class InboundCallbackMessage : 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; } + + /// + /// Gets or Sets Channel + /// + [DataMember(Name = "channel", EmitDefaultValue = false)] + public MultiChannelMessageChannelEnum? Channel { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected InboundCallbackMessage() { } + /// + /// Initializes a new instance of the class. + /// + /// A unique identifier of the message. (required). + /// The Bandwidth phone number or alphanumeric identifier associated with the message. (required). + /// The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. (required). + /// time (required). + /// The number of segments the user's message is broken into before sending over carrier networks. (required). + /// direction (required). + /// The phone number recipients of the message. (required). + /// The Bandwidth phone number or alphanumeric identifier the message was sent from. (required). + /// text. + /// A custom string that will be included in callback events of the message. Max 1024 characters.. + /// Optional media, not applicable for sms. + /// priority. + /// channel. + /// content. + /// suggestionResponse. + /// locationResponse. + public InboundCallbackMessage(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?), MultiChannelMessageChannelEnum? channel = default(MultiChannelMessageChannelEnum?), MultiChannelMessageContent content = default(MultiChannelMessageContent), RbmSuggestionResponse suggestionResponse = default(RbmSuggestionResponse), RbmLocationResponse locationResponse = default(RbmLocationResponse)) + { + // to ensure "id" is required (not null) + if (id == null) + { + throw new ArgumentNullException("id is a required property for InboundCallbackMessage 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 InboundCallbackMessage 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 InboundCallbackMessage 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 InboundCallbackMessage 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 InboundCallbackMessage and cannot be null"); + } + this.From = from; + this.Text = text; + this.Tag = tag; + this.Media = media; + this.Priority = priority; + this.Channel = channel; + this.Content = content; + this.SuggestionResponse = suggestionResponse; + this.LocationResponse = locationResponse; + } + + /// + /// A unique identifier of the message. + /// + /// A unique identifier of the message. + /// 1661365814859loidf7mcwd4qacn7 + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public string Id { get; set; } + + /// + /// The Bandwidth phone number or alphanumeric identifier associated with the message. + /// + /// The Bandwidth phone number or alphanumeric identifier associated with the message. + /// +15553332222 + [DataMember(Name = "owner", IsRequired = true, EmitDefaultValue = true)] + public string Owner { get; set; } + + /// + /// The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. + /// + /// The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. + /// 93de2206-9669-4e07-948d-329f4b722ee2 + [DataMember(Name = "applicationId", IsRequired = true, EmitDefaultValue = true)] + public string ApplicationId { get; set; } + + /// + /// Gets or Sets Time + /// + /// 2024-12-02T20:15:57.666Z + [DataMember(Name = "time", IsRequired = true, EmitDefaultValue = true)] + public DateTime Time { get; set; } + + /// + /// The number of segments the user's message is broken into before sending over carrier networks. + /// + /// The number of segments the user's message is broken into before sending over carrier networks. + /// 1 + [DataMember(Name = "segmentCount", IsRequired = true, EmitDefaultValue = true)] + public int SegmentCount { get; set; } + + /// + /// The phone number recipients of the message. + /// + /// The phone number recipients of the message. + /// [+15552223333] + [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = true)] + public List To { get; set; } + + /// + /// The Bandwidth phone number or alphanumeric identifier the message was sent from. + /// + /// The Bandwidth phone number or alphanumeric identifier the message was sent from. + /// +15553332222 + [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = true)] + public string From { get; set; } + + /// + /// Gets or Sets Text + /// + /// Hello world + [DataMember(Name = "text", EmitDefaultValue = false)] + public string Text { get; set; } + + /// + /// A custom string that will be included in callback events of the message. Max 1024 characters. + /// + /// A custom string that will be included in callback events of the message. Max 1024 characters. + /// custom string + [DataMember(Name = "tag", EmitDefaultValue = false)] + public string Tag { get; set; } + + /// + /// Optional media, not applicable for sms + /// + /// Optional media, not applicable for sms + /// [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; } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", EmitDefaultValue = false)] + public MultiChannelMessageContent Content { get; set; } + + /// + /// Gets or Sets SuggestionResponse + /// + [DataMember(Name = "suggestionResponse", EmitDefaultValue = false)] + public RbmSuggestionResponse SuggestionResponse { get; set; } + + /// + /// Gets or Sets LocationResponse + /// + [DataMember(Name = "locationResponse", EmitDefaultValue = false)] + public RbmLocationResponse LocationResponse { 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 InboundCallbackMessage {\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(" Channel: ").Append(Channel).Append("\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" SuggestionResponse: ").Append(SuggestionResponse).Append("\n"); + sb.Append(" LocationResponse: ").Append(LocationResponse).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/InboundCallbackTypeEnum.cs b/src/Bandwidth.Standard/Model/InboundCallbackTypeEnum.cs new file mode 100644 index 00000000..2afba5be --- /dev/null +++ b/src/Bandwidth.Standard/Model/InboundCallbackTypeEnum.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 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 +{ + /// + /// The possible inbound callback types originating from MO messages or multichannel message client responses: - `message-received` indicates an MO message from a Bandwidth user's client to a Bandwidth number. - `request-location-response` indicates a response to a location request sent by the Bandwidth user's client after receiving an RBM message. - `suggestion-response` indicates a response to a suggestion sent by the Bandwidth user's client after receiving an RBM message. + /// + /// The possible inbound callback types originating from MO messages or multichannel message client responses: - `message-received` indicates an MO message from a Bandwidth user's client to a Bandwidth number. - `request-location-response` indicates a response to a location request sent by the Bandwidth user's client after receiving an RBM message. - `suggestion-response` indicates a response to a suggestion sent by the Bandwidth user's client after receiving an RBM message. + [JsonConverter(typeof(StringEnumConverter))] + public enum InboundCallbackTypeEnum + { + /// + /// Enum MessageReceived for value: message-received + /// + [EnumMember(Value = "message-received")] + MessageReceived = 1, + + /// + /// Enum RequestLocationResponse for value: request-location-response + /// + [EnumMember(Value = "request-location-response")] + RequestLocationResponse = 2, + + /// + /// Enum SuggestionResponse for value: suggestion-response + /// + [EnumMember(Value = "suggestion-response")] + SuggestionResponse = 3 + } + +} diff --git a/src/Bandwidth.Standard/Model/ListMessageItem.cs b/src/Bandwidth.Standard/Model/ListMessageItem.cs index 09f4de35..df72a06a 100644 --- a/src/Bandwidth.Standard/Model/ListMessageItem.cs +++ b/src/Bandwidth.Standard/Model/ListMessageItem.cs @@ -60,7 +60,7 @@ public partial class ListMessageItem : IValidatableObject /// messageStatus. /// messageDirection. /// messageType. - /// The number of segments the message was sent as.. + /// The number of segments the user's message is broken into before sending over carrier networks.. /// The numeric error code of the message.. /// The ISO 8601 datetime of the message.. /// The name of the carrier. Not currently supported for MMS coming soon.. @@ -124,9 +124,9 @@ public partial class ListMessageItem : IValidatableObject public string DestinationTn { get; set; } /// - /// The number of segments the message was sent as. + /// The number of segments the user's message is broken into before sending over carrier networks. /// - /// The number of segments the message was sent as. + /// The number of segments the user's message is broken into before sending over carrier networks. /// 1 [DataMember(Name = "segmentCount", EmitDefaultValue = false)] public int SegmentCount { get; set; } diff --git a/src/Bandwidth.Standard/Model/Message.cs b/src/Bandwidth.Standard/Model/Message.cs index f9618875..a6afd885 100644 --- a/src/Bandwidth.Standard/Model/Message.cs +++ b/src/Bandwidth.Standard/Model/Message.cs @@ -49,15 +49,15 @@ public partial class Message : IValidatableObject /// /// The id of the message.. /// The Bandwidth phone number associated with the message.. - /// The application ID associated with the message.. + /// The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard.. /// The datetime stamp of the message in ISO 8601. - /// The number of segments the original message from the user is broken into before sending over to carrier networks.. + /// The number of segments the user's message is broken into before sending over carrier networks.. /// direction. /// The phone number recipients of the message.. /// The phone number the message was sent from.. /// The list of media URLs sent in the message. Including a `filename` field in the `Content-Disposition` header of the media linked with a URL will set the displayed file name. This is a best practice to ensure that your media has a readable file name.. /// The contents of the message.. - /// The custom string set by the user.. + /// A custom string that will be included in callback events of the message. Max 1024 characters.. /// priority. /// A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future.. public Message(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), List media = default(List), string text = default(string), string tag = default(string), PriorityEnum? priority = default(PriorityEnum?), DateTime expiration = default(DateTime)) @@ -94,9 +94,9 @@ public partial class Message : IValidatableObject public string Owner { get; set; } /// - /// The application ID associated with the message. + /// The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. /// - /// The application ID associated with the message. + /// The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. /// 93de2206-9669-4e07-948d-329f4b722ee2 [DataMember(Name = "applicationId", EmitDefaultValue = false)] public string ApplicationId { get; set; } @@ -110,10 +110,10 @@ public partial class Message : IValidatableObject public DateTime Time { get; set; } /// - /// The number of segments the original message from the user is broken into before sending over to carrier networks. + /// The number of segments the user's message is broken into before sending over carrier networks. /// - /// The number of segments the original message from the user is broken into before sending over to carrier networks. - /// 2 + /// The number of segments the user's message is broken into before sending over carrier networks. + /// 1 [DataMember(Name = "segmentCount", EmitDefaultValue = false)] public int SegmentCount { get; set; } @@ -150,10 +150,10 @@ public partial class Message : IValidatableObject public string Text { get; set; } /// - /// The custom string set by the user. + /// A custom string that will be included in callback events of the message. Max 1024 characters. /// - /// The custom string set by the user. - /// custom tag + /// A custom string that will be included in callback events of the message. Max 1024 characters. + /// custom string [DataMember(Name = "tag", EmitDefaultValue = false)] public string Tag { get; set; } diff --git a/src/Bandwidth.Standard/Model/MessageRequest.cs b/src/Bandwidth.Standard/Model/MessageRequest.cs index 45c1d4ca..fd699bc5 100644 --- a/src/Bandwidth.Standard/Model/MessageRequest.cs +++ b/src/Bandwidth.Standard/Model/MessageRequest.cs @@ -46,7 +46,7 @@ protected MessageRequest() { } /// /// Initializes a new instance of the class. /// - /// The ID of the Application your from number is associated with in the Bandwidth Phone Number Dashboard. (required). + /// The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. (required). /// The phone number(s) the message should be sent to in E164 format. (required). /// Either an alphanumeric sender ID or the sender's Bandwidth phone number in E.164 format, which must be hosted within Bandwidth and linked to the account that is generating the message. Alphanumeric Sender IDs can contain up to 11 characters, upper-case letters A-Z, lower-case letters a-z, numbers 0-9, space, hyphen -, plus +, underscore _ and ampersand &. Alphanumeric Sender IDs must contain at least one letter. (required). /// The contents of the text message. Must be 2048 characters or less.. @@ -82,9 +82,9 @@ protected MessageRequest() { } } /// - /// The ID of the Application your from number is associated with in the Bandwidth Phone Number Dashboard. + /// The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. /// - /// The ID of the Application your from number is associated with in the Bandwidth Phone Number Dashboard. + /// The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. /// 93de2206-9669-4e07-948d-329f4b722ee2 [DataMember(Name = "applicationId", IsRequired = true, EmitDefaultValue = true)] public string ApplicationId { get; set; } diff --git a/src/Bandwidth.Standard/Model/MmsMessageContent.cs b/src/Bandwidth.Standard/Model/MmsMessageContent.cs index 70e81afd..5a96631e 100644 --- a/src/Bandwidth.Standard/Model/MmsMessageContent.cs +++ b/src/Bandwidth.Standard/Model/MmsMessageContent.cs @@ -36,8 +36,8 @@ public partial class MmsMessageContent : IValidatableObject /// Initializes a new instance of the class. /// /// The contents of the text message. Must be 2048 characters or less.. - /// A list of URLs to include as media attachments as part of the message. Each URL can be at most 4096 characters.. - public MmsMessageContent(string text = default(string), List media = default(List)) + /// media. + public MmsMessageContent(string text = default(string), List media = default(List)) { this.Text = text; this.Media = media; @@ -52,12 +52,10 @@ public partial class MmsMessageContent : IValidatableObject public string Text { get; set; } /// - /// A list of URLs to include as media attachments as part of the message. Each URL can be at most 4096 characters. + /// Gets or Sets Media /// - /// A list of URLs to include as media attachments as part of the message. Each URL can be at most 4096 characters. - /// ["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; } + public List Media { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Bandwidth.Standard/Model/MmsMessageContentFile.cs b/src/Bandwidth.Standard/Model/MmsMessageContentFile.cs new file mode 100644 index 00000000..2f2febe0 --- /dev/null +++ b/src/Bandwidth.Standard/Model/MmsMessageContentFile.cs @@ -0,0 +1,101 @@ +/* + * 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 +{ + /// + /// MmsMessageContentFile + /// + [DataContract(Name = "mmsMessageContentFile")] + public partial class MmsMessageContentFile : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected MmsMessageContentFile() { } + /// + /// Initializes a new instance of the class. + /// + /// The URL of a media attachment. For MMS, the API limits file size to 3.5MB. Specific carriers and channels may have a smaller limit that could cause a large file to fail, see [here](https://support.bandwidth.com/hc/en-us/articles/360014235473-What-are-the-MMS-file-size-limits) for more details. (required). + public MmsMessageContentFile(string fileUrl = default(string)) + { + // to ensure "fileUrl" is required (not null) + if (fileUrl == null) + { + throw new ArgumentNullException("fileUrl is a required property for MmsMessageContentFile and cannot be null"); + } + this.FileUrl = fileUrl; + } + + /// + /// The URL of a media attachment. For MMS, the API limits file size to 3.5MB. Specific carriers and channels may have a smaller limit that could cause a large file to fail, see [here](https://support.bandwidth.com/hc/en-us/articles/360014235473-What-are-the-MMS-file-size-limits) for more details. + /// + /// The URL of a media attachment. For MMS, the API limits file size to 3.5MB. Specific carriers and channels may have a smaller limit that could cause a large file to fail, see [here](https://support.bandwidth.com/hc/en-us/articles/360014235473-What-are-the-MMS-file-size-limits) for more details. + /// https://dev.bandwidth.com/images/bandwidth-logo.png + [DataMember(Name = "fileUrl", IsRequired = true, EmitDefaultValue = true)] + public string FileUrl { 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 MmsMessageContentFile {\n"); + sb.Append(" FileUrl: ").Append(FileUrl).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) + { + // FileUrl (string) maxLength + if (this.FileUrl != null && this.FileUrl.Length > 1000) + { + yield return new ValidationResult("Invalid value for FileUrl, length must be less than 1000.", new [] { "FileUrl" }); + } + + yield break; + } + } + +} diff --git a/src/Bandwidth.Standard/Model/MultiChannelActionCalendarEvent.cs b/src/Bandwidth.Standard/Model/MultiChannelActionCalendarEvent.cs index 8516fba2..1fc16642 100644 --- a/src/Bandwidth.Standard/Model/MultiChannelActionCalendarEvent.cs +++ b/src/Bandwidth.Standard/Model/MultiChannelActionCalendarEvent.cs @@ -48,12 +48,12 @@ protected MultiChannelActionCalendarEvent() { } /// /// type (required). /// Displayed text for user to click (required). - /// Base64 payload the customer receives when the reply is clicked. (required). + /// Base64 payload the customer receives when the reply is clicked. (required). /// The title of the event. (required). /// The start time of the event. (required). /// The end time of the event. (required). /// The description of the event.. - public MultiChannelActionCalendarEvent(RbmActionTypeEnum type = default(RbmActionTypeEnum), string text = default(string), byte[] postBackData = default(byte[]), string title = default(string), DateTime startTime = default(DateTime), DateTime endTime = default(DateTime), string description = default(string)) + public MultiChannelActionCalendarEvent(RbmActionTypeEnum type = default(RbmActionTypeEnum), string text = default(string), byte[] postbackData = default(byte[]), string title = default(string), DateTime startTime = default(DateTime), DateTime endTime = default(DateTime), string description = default(string)) { this.Type = type; // to ensure "text" is required (not null) @@ -62,12 +62,12 @@ protected MultiChannelActionCalendarEvent() { } throw new ArgumentNullException("text is a required property for MultiChannelActionCalendarEvent and cannot be null"); } this.Text = text; - // to ensure "postBackData" is required (not null) - if (postBackData == null) + // to ensure "postbackData" is required (not null) + if (postbackData == null) { - throw new ArgumentNullException("postBackData is a required property for MultiChannelActionCalendarEvent and cannot be null"); + throw new ArgumentNullException("postbackData is a required property for MultiChannelActionCalendarEvent and cannot be null"); } - this.PostBackData = postBackData; + this.PostbackData = postbackData; // to ensure "title" is required (not null) if (title == null) { @@ -92,8 +92,8 @@ protected MultiChannelActionCalendarEvent() { } /// /// Base64 payload the customer receives when the reply is clicked. /// U0dWc2JHOGdkMjl5YkdRPQ== - [DataMember(Name = "postBackData", IsRequired = true, EmitDefaultValue = true)] - public byte[] PostBackData { get; set; } + [DataMember(Name = "postbackData", IsRequired = true, EmitDefaultValue = true)] + public byte[] PostbackData { get; set; } /// /// The title of the event. @@ -137,7 +137,7 @@ public override string ToString() sb.Append("class MultiChannelActionCalendarEvent {\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" Text: ").Append(Text).Append("\n"); - sb.Append(" PostBackData: ").Append(PostBackData).Append("\n"); + sb.Append(" PostbackData: ").Append(PostbackData).Append("\n"); sb.Append(" Title: ").Append(Title).Append("\n"); sb.Append(" StartTime: ").Append(StartTime).Append("\n"); sb.Append(" EndTime: ").Append(EndTime).Append("\n"); @@ -168,10 +168,10 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali yield return new ValidationResult("Invalid value for Text, length must be less than 25.", new [] { "Text" }); } - // PostBackData (byte[]) maxLength - if (this.PostBackData != null && this.PostBackData.Length > 2048) + // PostbackData (byte[]) maxLength + if (this.PostbackData != null && this.PostbackData.Length > 2048) { - yield return new ValidationResult("Invalid value for PostBackData, length must be less than 2048.", new [] { "PostBackData" }); + yield return new ValidationResult("Invalid value for PostbackData, length must be less than 2048.", new [] { "PostbackData" }); } // Title (string) maxLength diff --git a/src/Bandwidth.Standard/Model/MultiChannelError.cs b/src/Bandwidth.Standard/Model/MultiChannelError.cs new file mode 100644 index 00000000..565252f6 --- /dev/null +++ b/src/Bandwidth.Standard/Model/MultiChannelError.cs @@ -0,0 +1,102 @@ +/* + * 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 +{ + /// + /// MultiChannelError + /// + [DataContract(Name = "multiChannelError")] + public partial class MultiChannelError : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// links. + /// data. + /// errors. + public MultiChannelError(List links = default(List), Object data = default(Object), List errors = default(List)) + { + this.Links = links; + this.Data = data; + this.Errors = errors; + } + + /// + /// Gets or Sets Links + /// + /// [] + [DataMember(Name = "links", EmitDefaultValue = false)] + public List Links { get; set; } + + /// + /// Gets or Sets Data + /// + [DataMember(Name = "data", EmitDefaultValue = true)] + public Object Data { get; set; } + + /// + /// Gets or Sets Errors + /// + [DataMember(Name = "errors", EmitDefaultValue = false)] + public List Errors { 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 MultiChannelError {\n"); + sb.Append(" Links: ").Append(Links).Append("\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Errors: ").Append(Errors).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/MultiChannelMessageContent.cs b/src/Bandwidth.Standard/Model/MultiChannelMessageContent.cs new file mode 100644 index 00000000..960226c8 --- /dev/null +++ b/src/Bandwidth.Standard/Model/MultiChannelMessageContent.cs @@ -0,0 +1,92 @@ +/* + * 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 +{ + /// + /// The structure of the content field of a multichannel message. + /// + [DataContract(Name = "multiChannelMessageContent")] + public partial class MultiChannelMessageContent : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// text. + /// media. + public MultiChannelMessageContent(string text = default(string), RbmMessageContentFile media = default(RbmMessageContentFile)) + { + this.Text = text; + this.Media = media; + } + + /// + /// Gets or Sets Text + /// + [DataMember(Name = "text", EmitDefaultValue = false)] + public string Text { get; set; } + + /// + /// Gets or Sets Media + /// + [DataMember(Name = "media", EmitDefaultValue = false)] + public RbmMessageContentFile 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 MultiChannelMessageContent {\n"); + sb.Append(" Text: ").Append(Text).Append("\n"); + sb.Append(" Media: ").Append(Media).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/MultiChannelMessageResponseData.cs b/src/Bandwidth.Standard/Model/MultiChannelMessageResponseData.cs new file mode 100644 index 00000000..6757150c --- /dev/null +++ b/src/Bandwidth.Standard/Model/MultiChannelMessageResponseData.cs @@ -0,0 +1,177 @@ +/* + * 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 +{ + /// + /// The data returned in a multichannel message response. + /// + [DataContract(Name = "multiChannelMessageResponseData")] + public partial class MultiChannelMessageResponseData : 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 MultiChannelMessageResponseData() { } + /// + /// Initializes a new instance of the class. + /// + /// The ID of the message. (required). + /// The time the message was received by the Bandwidth API. (required). + /// direction (required). + /// The destination phone number(s) of the message, in E164 format. (required). + /// A list of message bodies. The messages will be attempted in the order they are listed. Once a message sends successfully, the others will be ignored. (required). + /// A custom string that will be included in callback events of the message. Max 1024 characters.. + /// priority. + /// A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future.. + public MultiChannelMessageResponseData(string messageId = default(string), DateTime time = default(DateTime), MessageDirectionEnum direction = default(MessageDirectionEnum), List to = default(List), List channelList = default(List), string tag = default(string), PriorityEnum? priority = default(PriorityEnum?), DateTime expiration = default(DateTime)) + { + // to ensure "messageId" is required (not null) + if (messageId == null) + { + throw new ArgumentNullException("messageId is a required property for MultiChannelMessageResponseData and cannot be null"); + } + this.MessageId = messageId; + this.Time = time; + this.Direction = direction; + // to ensure "to" is required (not null) + if (to == null) + { + throw new ArgumentNullException("to is a required property for MultiChannelMessageResponseData and cannot be null"); + } + this.To = to; + // to ensure "channelList" is required (not null) + if (channelList == null) + { + throw new ArgumentNullException("channelList is a required property for MultiChannelMessageResponseData and cannot be null"); + } + this.ChannelList = channelList; + this.Tag = tag; + this.Priority = priority; + this.Expiration = expiration; + } + + /// + /// The ID of the message. + /// + /// The ID of the message. + /// 1589228074636lm4k2je7j7jklbn2 + [DataMember(Name = "messageId", IsRequired = true, EmitDefaultValue = true)] + public string MessageId { get; set; } + + /// + /// The time the message was received by the Bandwidth API. + /// + /// The time the message was received by the Bandwidth API. + /// 2025-01-01T18:20:16Z + [DataMember(Name = "time", IsRequired = true, EmitDefaultValue = true)] + public DateTime Time { get; set; } + + /// + /// The destination phone number(s) of the message, in E164 format. + /// + /// The destination phone number(s) of the message, in E164 format. + /// ["+15554443333"] + [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = true)] + public List To { get; set; } + + /// + /// A list of message bodies. The messages will be attempted in the order they are listed. Once a message sends successfully, the others will be ignored. + /// + /// A list of message bodies. The messages will be attempted in the order they are listed. Once a message sends successfully, the others will be ignored. + [DataMember(Name = "channelList", IsRequired = true, EmitDefaultValue = true)] + public List ChannelList { get; set; } + + /// + /// A custom string that will be included in callback events of the message. Max 1024 characters. + /// + /// A custom string that will be included in callback events of the message. Max 1024 characters. + /// custom string + [DataMember(Name = "tag", EmitDefaultValue = false)] + public string Tag { get; set; } + + /// + /// A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future. + /// + /// A string with the date/time value that the message will automatically expire by. This must be a valid RFC-3339 value, e.g., 2021-03-14T01:59:26Z or 2021-03-13T20:59:26-05:00. Must be a date-time in the future. + /// 2021-02-01T11:29:18-05:00 + [DataMember(Name = "expiration", EmitDefaultValue = false)] + public DateTime Expiration { 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 MultiChannelMessageResponseData {\n"); + sb.Append(" MessageId: ").Append(MessageId).Append("\n"); + sb.Append(" Time: ").Append(Time).Append("\n"); + sb.Append(" Direction: ").Append(Direction).Append("\n"); + sb.Append(" To: ").Append(To).Append("\n"); + sb.Append(" ChannelList: ").Append(ChannelList).Append("\n"); + sb.Append(" Tag: ").Append(Tag).Append("\n"); + sb.Append(" Priority: ").Append(Priority).Append("\n"); + sb.Append(" Expiration: ").Append(Expiration).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/MultiChannelMessageResponseDataChannelListInner.cs b/src/Bandwidth.Standard/Model/MultiChannelMessageResponseDataChannelListInner.cs new file mode 100644 index 00000000..339599dc --- /dev/null +++ b/src/Bandwidth.Standard/Model/MultiChannelMessageResponseDataChannelListInner.cs @@ -0,0 +1,149 @@ +/* + * 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 +{ + /// + /// MultiChannelMessageResponseDataChannelListInner + /// + [DataContract(Name = "multiChannelMessageResponseData_channelList_inner")] + public partial class MultiChannelMessageResponseDataChannelListInner : IValidatableObject + { + + /// + /// Gets or Sets Channel + /// + [DataMember(Name = "channel", IsRequired = true, EmitDefaultValue = true)] + public MultiChannelMessageChannelEnum Channel { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected MultiChannelMessageResponseDataChannelListInner() { } + /// + /// Initializes a new instance of the class. + /// + /// The sender ID of the message. This could be an alphanumeric sender ID. (required). + /// The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. (required). + /// channel (required). + /// content (required). + /// The Bandwidth senderId associated with the message. Identical to 'from'. (required). + public MultiChannelMessageResponseDataChannelListInner(string from = default(string), string applicationId = default(string), MultiChannelMessageChannelEnum channel = default(MultiChannelMessageChannelEnum), MultiChannelChannelListObjectContent content = default(MultiChannelChannelListObjectContent), string owner = default(string)) + { + // to ensure "from" is required (not null) + if (from == null) + { + throw new ArgumentNullException("from is a required property for MultiChannelMessageResponseDataChannelListInner and cannot be null"); + } + this.From = from; + // to ensure "applicationId" is required (not null) + if (applicationId == null) + { + throw new ArgumentNullException("applicationId is a required property for MultiChannelMessageResponseDataChannelListInner and cannot be null"); + } + this.ApplicationId = applicationId; + this.Channel = channel; + // to ensure "content" is required (not null) + if (content == null) + { + throw new ArgumentNullException("content is a required property for MultiChannelMessageResponseDataChannelListInner and cannot be null"); + } + this.Content = content; + // to ensure "owner" is required (not null) + if (owner == null) + { + throw new ArgumentNullException("owner is a required property for MultiChannelMessageResponseDataChannelListInner and cannot be null"); + } + this.Owner = owner; + } + + /// + /// The sender ID of the message. This could be an alphanumeric sender ID. + /// + /// The sender ID of the message. This could be an alphanumeric sender ID. + /// BandwidthRBM + [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = true)] + public string From { get; set; } + + /// + /// The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. + /// + /// The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. + /// 93de2206-9669-4e07-948d-329f4b722ee2 + [DataMember(Name = "applicationId", IsRequired = true, EmitDefaultValue = true)] + public string ApplicationId { get; set; } + + /// + /// Gets or Sets Content + /// + [DataMember(Name = "content", IsRequired = true, EmitDefaultValue = true)] + public MultiChannelChannelListObjectContent Content { get; set; } + + /// + /// The Bandwidth senderId associated with the message. Identical to 'from'. + /// + /// The Bandwidth senderId associated with the message. Identical to 'from'. + [DataMember(Name = "owner", IsRequired = true, EmitDefaultValue = true)] + public string Owner { 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 MultiChannelMessageResponseDataChannelListInner {\n"); + sb.Append(" From: ").Append(From).Append("\n"); + sb.Append(" ApplicationId: ").Append(ApplicationId).Append("\n"); + sb.Append(" Channel: ").Append(Channel).Append("\n"); + sb.Append(" Content: ").Append(Content).Append("\n"); + sb.Append(" Owner: ").Append(Owner).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/PriorityEnum.cs b/src/Bandwidth.Standard/Model/PriorityEnum.cs index 3579f50d..1252e93c 100644 --- a/src/Bandwidth.Standard/Model/PriorityEnum.cs +++ b/src/Bandwidth.Standard/Model/PriorityEnum.cs @@ -27,9 +27,9 @@ namespace Bandwidth.Standard.Model { /// - /// The priority specified by the user. + /// Specifies the message's sending priority with respect to other messages in your account. For best results and optimal throughput, reserve the 'high' priority setting for critical messages only. /// - /// The priority specified by the user. + /// Specifies the message's sending priority with respect to other messages in your account. For best results and optimal throughput, reserve the 'high' priority setting for critical messages only. [JsonConverter(typeof(StringEnumConverter))] public enum PriorityEnum { diff --git a/src/Bandwidth.Standard/Model/RbmActionBase.cs b/src/Bandwidth.Standard/Model/RbmActionBase.cs index 2ac9138f..acf96179 100644 --- a/src/Bandwidth.Standard/Model/RbmActionBase.cs +++ b/src/Bandwidth.Standard/Model/RbmActionBase.cs @@ -48,8 +48,8 @@ protected RbmActionBase() { } /// /// type (required). /// Displayed text for user to click (required). - /// Base64 payload the customer receives when the reply is clicked. (required). - public RbmActionBase(RbmActionTypeEnum type = default(RbmActionTypeEnum), string text = default(string), byte[] postBackData = default(byte[])) + /// Base64 payload the customer receives when the reply is clicked. (required). + public RbmActionBase(RbmActionTypeEnum type = default(RbmActionTypeEnum), string text = default(string), byte[] postbackData = default(byte[])) { this.Type = type; // to ensure "text" is required (not null) @@ -58,12 +58,12 @@ protected RbmActionBase() { } throw new ArgumentNullException("text is a required property for RbmActionBase and cannot be null"); } this.Text = text; - // to ensure "postBackData" is required (not null) - if (postBackData == null) + // to ensure "postbackData" is required (not null) + if (postbackData == null) { - throw new ArgumentNullException("postBackData is a required property for RbmActionBase and cannot be null"); + throw new ArgumentNullException("postbackData is a required property for RbmActionBase and cannot be null"); } - this.PostBackData = postBackData; + this.PostbackData = postbackData; } /// @@ -78,9 +78,9 @@ protected RbmActionBase() { } /// Base64 payload the customer receives when the reply is clicked. /// /// Base64 payload the customer receives when the reply is clicked. - /// [B@3f6906f4 - [DataMember(Name = "postBackData", IsRequired = true, EmitDefaultValue = true)] - public byte[] PostBackData { get; set; } + /// [B@2a504ea7 + [DataMember(Name = "postbackData", IsRequired = true, EmitDefaultValue = true)] + public byte[] PostbackData { get; set; } /// /// Returns the string presentation of the object @@ -92,7 +92,7 @@ public override string ToString() sb.Append("class RbmActionBase {\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" Text: ").Append(Text).Append("\n"); - sb.Append(" PostBackData: ").Append(PostBackData).Append("\n"); + sb.Append(" PostbackData: ").Append(PostbackData).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -119,10 +119,10 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali yield return new ValidationResult("Invalid value for Text, length must be less than 25.", new [] { "Text" }); } - // PostBackData (byte[]) maxLength - if (this.PostBackData != null && this.PostBackData.Length > 2048) + // PostbackData (byte[]) maxLength + if (this.PostbackData != null && this.PostbackData.Length > 2048) { - yield return new ValidationResult("Invalid value for PostBackData, length must be less than 2048.", new [] { "PostBackData" }); + yield return new ValidationResult("Invalid value for PostbackData, length must be less than 2048.", new [] { "PostbackData" }); } yield break; diff --git a/src/Bandwidth.Standard/Model/RbmActionDial.cs b/src/Bandwidth.Standard/Model/RbmActionDial.cs index b16e1852..54785d1a 100644 --- a/src/Bandwidth.Standard/Model/RbmActionDial.cs +++ b/src/Bandwidth.Standard/Model/RbmActionDial.cs @@ -48,9 +48,9 @@ protected RbmActionDial() { } /// /// type (required). /// Displayed text for user to click (required). - /// Base64 payload the customer receives when the reply is clicked. (required). + /// Base64 payload the customer receives when the reply is clicked. (required). /// The phone number to dial. Must be E164 format. (required). - public RbmActionDial(RbmActionTypeEnum type = default(RbmActionTypeEnum), string text = default(string), byte[] postBackData = default(byte[]), string phoneNumber = default(string)) + public RbmActionDial(RbmActionTypeEnum type = default(RbmActionTypeEnum), string text = default(string), byte[] postbackData = default(byte[]), string phoneNumber = default(string)) { this.Type = type; // to ensure "text" is required (not null) @@ -59,12 +59,12 @@ protected RbmActionDial() { } throw new ArgumentNullException("text is a required property for RbmActionDial and cannot be null"); } this.Text = text; - // to ensure "postBackData" is required (not null) - if (postBackData == null) + // to ensure "postbackData" is required (not null) + if (postbackData == null) { - throw new ArgumentNullException("postBackData is a required property for RbmActionDial and cannot be null"); + throw new ArgumentNullException("postbackData is a required property for RbmActionDial and cannot be null"); } - this.PostBackData = postBackData; + this.PostbackData = postbackData; // to ensure "phoneNumber" is required (not null) if (phoneNumber == null) { @@ -86,8 +86,8 @@ protected RbmActionDial() { } /// /// Base64 payload the customer receives when the reply is clicked. /// U0dWc2JHOGdkMjl5YkdRPQ== - [DataMember(Name = "postBackData", IsRequired = true, EmitDefaultValue = true)] - public byte[] PostBackData { get; set; } + [DataMember(Name = "postbackData", IsRequired = true, EmitDefaultValue = true)] + public byte[] PostbackData { get; set; } /// /// The phone number to dial. Must be E164 format. @@ -107,7 +107,7 @@ public override string ToString() sb.Append("class RbmActionDial {\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" Text: ").Append(Text).Append("\n"); - sb.Append(" PostBackData: ").Append(PostBackData).Append("\n"); + sb.Append(" PostbackData: ").Append(PostbackData).Append("\n"); sb.Append(" PhoneNumber: ").Append(PhoneNumber).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -135,10 +135,10 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali yield return new ValidationResult("Invalid value for Text, length must be less than 25.", new [] { "Text" }); } - // PostBackData (byte[]) maxLength - if (this.PostBackData != null && this.PostBackData.Length > 2048) + // PostbackData (byte[]) maxLength + if (this.PostbackData != null && this.PostbackData.Length > 2048) { - yield return new ValidationResult("Invalid value for PostBackData, length must be less than 2048.", new [] { "PostBackData" }); + yield return new ValidationResult("Invalid value for PostbackData, length must be less than 2048.", new [] { "PostbackData" }); } yield break; diff --git a/src/Bandwidth.Standard/Model/RbmActionOpenUrl.cs b/src/Bandwidth.Standard/Model/RbmActionOpenUrl.cs index c5e69ed3..767066fd 100644 --- a/src/Bandwidth.Standard/Model/RbmActionOpenUrl.cs +++ b/src/Bandwidth.Standard/Model/RbmActionOpenUrl.cs @@ -48,9 +48,9 @@ protected RbmActionOpenUrl() { } /// /// type (required). /// Displayed text for user to click (required). - /// Base64 payload the customer receives when the reply is clicked. (required). + /// Base64 payload the customer receives when the reply is clicked. (required). /// The URL to open in browser. (required). - public RbmActionOpenUrl(RbmActionTypeEnum type = default(RbmActionTypeEnum), string text = default(string), byte[] postBackData = default(byte[]), string url = default(string)) + public RbmActionOpenUrl(RbmActionTypeEnum type = default(RbmActionTypeEnum), string text = default(string), byte[] postbackData = default(byte[]), string url = default(string)) { this.Type = type; // to ensure "text" is required (not null) @@ -59,12 +59,12 @@ protected RbmActionOpenUrl() { } throw new ArgumentNullException("text is a required property for RbmActionOpenUrl and cannot be null"); } this.Text = text; - // to ensure "postBackData" is required (not null) - if (postBackData == null) + // to ensure "postbackData" is required (not null) + if (postbackData == null) { - throw new ArgumentNullException("postBackData is a required property for RbmActionOpenUrl and cannot be null"); + throw new ArgumentNullException("postbackData is a required property for RbmActionOpenUrl and cannot be null"); } - this.PostBackData = postBackData; + this.PostbackData = postbackData; // to ensure "url" is required (not null) if (url == null) { @@ -86,8 +86,8 @@ protected RbmActionOpenUrl() { } /// /// Base64 payload the customer receives when the reply is clicked. /// U0dWc2JHOGdkMjl5YkdRPQ== - [DataMember(Name = "postBackData", IsRequired = true, EmitDefaultValue = true)] - public byte[] PostBackData { get; set; } + [DataMember(Name = "postbackData", IsRequired = true, EmitDefaultValue = true)] + public byte[] PostbackData { get; set; } /// /// The URL to open in browser. @@ -107,7 +107,7 @@ public override string ToString() sb.Append("class RbmActionOpenUrl {\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" Text: ").Append(Text).Append("\n"); - sb.Append(" PostBackData: ").Append(PostBackData).Append("\n"); + sb.Append(" PostbackData: ").Append(PostbackData).Append("\n"); sb.Append(" Url: ").Append(Url).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -135,10 +135,10 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali yield return new ValidationResult("Invalid value for Text, length must be less than 25.", new [] { "Text" }); } - // PostBackData (byte[]) maxLength - if (this.PostBackData != null && this.PostBackData.Length > 2048) + // PostbackData (byte[]) maxLength + if (this.PostbackData != null && this.PostbackData.Length > 2048) { - yield return new ValidationResult("Invalid value for PostBackData, length must be less than 2048.", new [] { "PostBackData" }); + yield return new ValidationResult("Invalid value for PostbackData, length must be less than 2048.", new [] { "PostbackData" }); } // Url (string) maxLength diff --git a/src/Bandwidth.Standard/Model/RbmActionViewLocation.cs b/src/Bandwidth.Standard/Model/RbmActionViewLocation.cs index b84e1da3..5b59ae78 100644 --- a/src/Bandwidth.Standard/Model/RbmActionViewLocation.cs +++ b/src/Bandwidth.Standard/Model/RbmActionViewLocation.cs @@ -48,11 +48,11 @@ protected RbmActionViewLocation() { } /// /// type (required). /// Displayed text for user to click (required). - /// Base64 payload the customer receives when the reply is clicked. (required). + /// Base64 payload the customer receives when the reply is clicked. (required). /// The latitude of the location. (required). /// The longitude of the location. (required). /// The label of the location.. - public RbmActionViewLocation(RbmActionTypeEnum type = default(RbmActionTypeEnum), string text = default(string), byte[] postBackData = default(byte[]), double latitude = default(double), double longitude = default(double), string label = default(string)) + public RbmActionViewLocation(RbmActionTypeEnum type = default(RbmActionTypeEnum), string text = default(string), byte[] postbackData = default(byte[]), double latitude = default(double), double longitude = default(double), string label = default(string)) { this.Type = type; // to ensure "text" is required (not null) @@ -61,12 +61,12 @@ protected RbmActionViewLocation() { } throw new ArgumentNullException("text is a required property for RbmActionViewLocation and cannot be null"); } this.Text = text; - // to ensure "postBackData" is required (not null) - if (postBackData == null) + // to ensure "postbackData" is required (not null) + if (postbackData == null) { - throw new ArgumentNullException("postBackData is a required property for RbmActionViewLocation and cannot be null"); + throw new ArgumentNullException("postbackData is a required property for RbmActionViewLocation and cannot be null"); } - this.PostBackData = postBackData; + this.PostbackData = postbackData; this.Latitude = latitude; this.Longitude = longitude; this.Label = label; @@ -85,8 +85,8 @@ protected RbmActionViewLocation() { } /// /// Base64 payload the customer receives when the reply is clicked. /// U0dWc2JHOGdkMjl5YkdRPQ== - [DataMember(Name = "postBackData", IsRequired = true, EmitDefaultValue = true)] - public byte[] PostBackData { get; set; } + [DataMember(Name = "postbackData", IsRequired = true, EmitDefaultValue = true)] + public byte[] PostbackData { get; set; } /// /// The latitude of the location. @@ -122,7 +122,7 @@ public override string ToString() sb.Append("class RbmActionViewLocation {\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" Text: ").Append(Text).Append("\n"); - sb.Append(" PostBackData: ").Append(PostBackData).Append("\n"); + sb.Append(" PostbackData: ").Append(PostbackData).Append("\n"); sb.Append(" Latitude: ").Append(Latitude).Append("\n"); sb.Append(" Longitude: ").Append(Longitude).Append("\n"); sb.Append(" Label: ").Append(Label).Append("\n"); @@ -152,10 +152,10 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali yield return new ValidationResult("Invalid value for Text, length must be less than 25.", new [] { "Text" }); } - // PostBackData (byte[]) maxLength - if (this.PostBackData != null && this.PostBackData.Length > 2048) + // PostbackData (byte[]) maxLength + if (this.PostbackData != null && this.PostbackData.Length > 2048) { - yield return new ValidationResult("Invalid value for PostBackData, length must be less than 2048.", new [] { "PostBackData" }); + yield return new ValidationResult("Invalid value for PostbackData, length must be less than 2048.", new [] { "PostbackData" }); } // Label (string) maxLength diff --git a/src/Bandwidth.Standard/Model/RbmLocationResponse.cs b/src/Bandwidth.Standard/Model/RbmLocationResponse.cs new file mode 100644 index 00000000..6077219f --- /dev/null +++ b/src/Bandwidth.Standard/Model/RbmLocationResponse.cs @@ -0,0 +1,96 @@ +/* + * 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 +{ + /// + /// RbmLocationResponse + /// + [DataContract(Name = "rbmLocationResponse")] + public partial class RbmLocationResponse : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The latitude of the client's location.. + /// The longitude of the client's location.. + public RbmLocationResponse(double latitude = default(double), double longitude = default(double)) + { + this.Latitude = latitude; + this.Longitude = longitude; + } + + /// + /// The latitude of the client's location. + /// + /// The latitude of the client's location. + /// 37.7749 + [DataMember(Name = "latitude", EmitDefaultValue = false)] + public double Latitude { get; set; } + + /// + /// The longitude of the client's location. + /// + /// The longitude of the client's location. + /// -122.4194 + [DataMember(Name = "longitude", EmitDefaultValue = false)] + public double Longitude { 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 RbmLocationResponse {\n"); + sb.Append(" Latitude: ").Append(Latitude).Append("\n"); + sb.Append(" Longitude: ").Append(Longitude).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/RbmSuggestionResponse.cs b/src/Bandwidth.Standard/Model/RbmSuggestionResponse.cs new file mode 100644 index 00000000..ad04e1ed --- /dev/null +++ b/src/Bandwidth.Standard/Model/RbmSuggestionResponse.cs @@ -0,0 +1,102 @@ +/* + * 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 +{ + /// + /// RbmSuggestionResponse + /// + [DataContract(Name = "rbmSuggestionResponse")] + public partial class RbmSuggestionResponse : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The text associated with the suggestion response.. + /// Base64 payload the customer receives when the reply is clicked.. + public RbmSuggestionResponse(string text = default(string), byte[] postbackData = default(byte[])) + { + this.Text = text; + this.PostbackData = postbackData; + } + + /// + /// The text associated with the suggestion response. + /// + /// The text associated with the suggestion response. + /// Yes, I would like to proceed + [DataMember(Name = "text", EmitDefaultValue = false)] + public string Text { get; set; } + + /// + /// Base64 payload the customer receives when the reply is clicked. + /// + /// Base64 payload the customer receives when the reply is clicked. + /// [B@2a504ea7 + [DataMember(Name = "postbackData", EmitDefaultValue = false)] + public byte[] PostbackData { 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 RbmSuggestionResponse {\n"); + sb.Append(" Text: ").Append(Text).Append("\n"); + sb.Append(" PostbackData: ").Append(PostbackData).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) + { + // PostbackData (byte[]) maxLength + if (this.PostbackData != null && this.PostbackData.Length > 2048) + { + yield return new ValidationResult("Invalid value for PostbackData, length must be less than 2048.", new [] { "PostbackData" }); + } + + yield break; + } + } + +} diff --git a/src/Bandwidth.Standard/Model/StatusCallback.cs b/src/Bandwidth.Standard/Model/StatusCallback.cs new file mode 100644 index 00000000..71c7922e --- /dev/null +++ b/src/Bandwidth.Standard/Model/StatusCallback.cs @@ -0,0 +1,177 @@ +/* + * 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 +{ + /// + /// Represents a status callback for an outbound MT SMS or MMS or RBM message. + /// + [DataContract(Name = "statusCallback")] + public partial class StatusCallback : IValidatableObject + { + + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] + public StatusCallbackTypeEnum Type { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected StatusCallback() { } + /// + /// Initializes a new instance of the class. + /// + /// time (required). + /// Represents the time at which the message was read, for `message-read` callbacks.. + /// type (required). + /// The destination phone number the message was sent to. For status callbacks, this the the Bandwidth user's client phone number. (required). + /// A detailed description of the event described by the callback. (required). + /// message (required). + /// Optional error code, applicable only when type is `message-failed`.. + /// The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled.. + public StatusCallback(DateTime time = default(DateTime), DateTime eventTime = default(DateTime), StatusCallbackTypeEnum type = default(StatusCallbackTypeEnum), string to = default(string), string description = default(string), StatusCallbackMessage message = default(StatusCallbackMessage), int errorCode = default(int), string carrierName = default(string)) + { + this.Time = time; + this.Type = type; + // to ensure "to" is required (not null) + if (to == null) + { + throw new ArgumentNullException("to is a required property for StatusCallback 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 StatusCallback 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 StatusCallback and cannot be null"); + } + this.Message = message; + this.EventTime = eventTime; + this.ErrorCode = errorCode; + this.CarrierName = carrierName; + } + + /// + /// Gets or Sets Time + /// + /// 2024-12-02T20:15:57.278Z + [DataMember(Name = "time", IsRequired = true, EmitDefaultValue = true)] + public DateTime Time { get; set; } + + /// + /// Represents the time at which the message was read, for `message-read` callbacks. + /// + /// Represents the time at which the message was read, for `message-read` callbacks. + /// 2024-12-02T20:15:58.278Z + [DataMember(Name = "eventTime", EmitDefaultValue = false)] + public DateTime EventTime { get; set; } + + /// + /// The destination phone number the message was sent to. For status callbacks, this the the Bandwidth user's client phone number. + /// + /// The destination phone number the message was sent to. For status callbacks, this the the Bandwidth user's client phone number. + /// +15552223333 + [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = true)] + public string To { get; set; } + + /// + /// A detailed description of the event described by the callback. + /// + /// A detailed description of the event described by the callback. + /// 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 StatusCallbackMessage Message { get; set; } + + /// + /// Optional error code, applicable only when type is `message-failed`. + /// + /// Optional error code, applicable only when type is `message-failed`. + /// 4405 + [DataMember(Name = "errorCode", EmitDefaultValue = false)] + public int ErrorCode { get; set; } + + /// + /// The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. + /// + /// The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. This field is present only when this account feature has been enabled. + /// AT&T + [DataMember(Name = "carrierName", EmitDefaultValue = false)] + public string CarrierName { 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 StatusCallback {\n"); + sb.Append(" Time: ").Append(Time).Append("\n"); + sb.Append(" EventTime: ").Append(EventTime).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(" ErrorCode: ").Append(ErrorCode).Append("\n"); + sb.Append(" CarrierName: ").Append(CarrierName).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/StatusCallbackMessage.cs b/src/Bandwidth.Standard/Model/StatusCallbackMessage.cs new file mode 100644 index 00000000..b2da7234 --- /dev/null +++ b/src/Bandwidth.Standard/Model/StatusCallbackMessage.cs @@ -0,0 +1,239 @@ +/* + * 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 payload schema within a callback + /// + [DataContract(Name = "statusCallbackMessage")] + public partial class StatusCallbackMessage : 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; } + + /// + /// Gets or Sets Channel + /// + [DataMember(Name = "channel", EmitDefaultValue = false)] + public MultiChannelMessageChannelEnum? Channel { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected StatusCallbackMessage() { } + /// + /// Initializes a new instance of the class. + /// + /// A unique identifier of the message. (required). + /// The Bandwidth phone number or alphanumeric identifier associated with the message. (required). + /// The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. (required). + /// time (required). + /// The number of segments the user's message is broken into before sending over carrier networks. (required). + /// direction (required). + /// The phone number recipients of the message. (required). + /// The Bandwidth phone number or alphanumeric identifier the message was sent from. (required). + /// text. + /// A custom string that will be included in callback events of the message. Max 1024 characters.. + /// Optional media, not applicable for sms. + /// priority. + /// channel. + public StatusCallbackMessage(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?), MultiChannelMessageChannelEnum? channel = default(MultiChannelMessageChannelEnum?)) + { + // to ensure "id" is required (not null) + if (id == null) + { + throw new ArgumentNullException("id is a required property for StatusCallbackMessage 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 StatusCallbackMessage 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 StatusCallbackMessage 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 StatusCallbackMessage 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 StatusCallbackMessage and cannot be null"); + } + this.From = from; + this.Text = text; + this.Tag = tag; + this.Media = media; + this.Priority = priority; + this.Channel = channel; + } + + /// + /// A unique identifier of the message. + /// + /// A unique identifier of the message. + /// 1661365814859loidf7mcwd4qacn7 + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public string Id { get; set; } + + /// + /// The Bandwidth phone number or alphanumeric identifier associated with the message. + /// + /// The Bandwidth phone number or alphanumeric identifier associated with the message. + /// +15553332222 + [DataMember(Name = "owner", IsRequired = true, EmitDefaultValue = true)] + public string Owner { get; set; } + + /// + /// The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. + /// + /// The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. + /// 93de2206-9669-4e07-948d-329f4b722ee2 + [DataMember(Name = "applicationId", IsRequired = true, EmitDefaultValue = true)] + public string ApplicationId { get; set; } + + /// + /// Gets or Sets Time + /// + /// 2024-12-02T20:15:57.666Z + [DataMember(Name = "time", IsRequired = true, EmitDefaultValue = true)] + public DateTime Time { get; set; } + + /// + /// The number of segments the user's message is broken into before sending over carrier networks. + /// + /// The number of segments the user's message is broken into before sending over carrier networks. + /// 1 + [DataMember(Name = "segmentCount", IsRequired = true, EmitDefaultValue = true)] + public int SegmentCount { get; set; } + + /// + /// The phone number recipients of the message. + /// + /// The phone number recipients of the message. + /// ["+15552223333"] + [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = true)] + public List To { get; set; } + + /// + /// The Bandwidth phone number or alphanumeric identifier the message was sent from. + /// + /// The Bandwidth phone number or alphanumeric identifier the message was sent from. + /// +15553332222 + [DataMember(Name = "from", IsRequired = true, EmitDefaultValue = true)] + public string From { get; set; } + + /// + /// Gets or Sets Text + /// + /// Hello world + [DataMember(Name = "text", EmitDefaultValue = false)] + public string Text { get; set; } + + /// + /// A custom string that will be included in callback events of the message. Max 1024 characters. + /// + /// A custom string that will be included in callback events of the message. Max 1024 characters. + /// custom string + [DataMember(Name = "tag", EmitDefaultValue = false)] + public string Tag { get; set; } + + /// + /// Optional media, not applicable for sms + /// + /// Optional media, not applicable for sms + /// ["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 StatusCallbackMessage {\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(" Channel: ").Append(Channel).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/StatusCallbackTypeEnum.cs b/src/Bandwidth.Standard/Model/StatusCallbackTypeEnum.cs new file mode 100644 index 00000000..325e4a37 --- /dev/null +++ b/src/Bandwidth.Standard/Model/StatusCallbackTypeEnum.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 +{ + /// + /// The possible status callbacks when sending an MT SMS or MMS or RBM message: - `message-sending` indicates that Bandwidth is sending the message to the upstream provider. - `message-delivered` indicates that the message was successfully sent. - `message-failed` indicates that the message could not be sent to the intended recipient. - `message-read` indicates that the RBM message was read by the recipient. + /// + /// The possible status callbacks when sending an MT SMS or MMS or RBM message: - `message-sending` indicates that Bandwidth is sending the message to the upstream provider. - `message-delivered` indicates that the message was successfully sent. - `message-failed` indicates that the message could not be sent to the intended recipient. - `message-read` indicates that the RBM message was read by the recipient. + [JsonConverter(typeof(StringEnumConverter))] + public enum StatusCallbackTypeEnum + { + /// + /// Enum Sending for value: message-sending + /// + [EnumMember(Value = "message-sending")] + Sending = 1, + + /// + /// Enum Delivered for value: message-delivered + /// + [EnumMember(Value = "message-delivered")] + Delivered = 2, + + /// + /// Enum Failed for value: message-failed + /// + [EnumMember(Value = "message-failed")] + Failed = 3, + + /// + /// Enum Read for value: message-read + /// + [EnumMember(Value = "message-read")] + Read = 4 + } + +} From 5401c0447c8cad34c497358614ada82327a05675 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Mon, 4 Aug 2025 13:39:51 -0400 Subject: [PATCH 2/9] remove old docs --- docs/CallbackTypeEnum.md | 10 ---------- docs/DeferredResult.md | 11 ----------- docs/MessageCallback.md | 17 ----------------- docs/MessageCallbackMessage.md | 22 ---------------------- docs/MultiChannelCallbackData.md | 14 -------------- docs/MultiChannelMessageCallbackData.md | 17 ----------------- docs/MultiChannelMessageData.md | 18 ------------------ docs/MultiChannelMessageDirectionEnum.md | 9 --------- docs/MultiChannelStatusEnum.md | 9 --------- docs/Tag.md | 11 ----------- 10 files changed, 138 deletions(-) delete mode 100644 docs/CallbackTypeEnum.md delete mode 100644 docs/DeferredResult.md delete mode 100644 docs/MessageCallback.md delete mode 100644 docs/MessageCallbackMessage.md delete mode 100644 docs/MultiChannelCallbackData.md delete mode 100644 docs/MultiChannelMessageCallbackData.md delete mode 100644 docs/MultiChannelMessageData.md delete mode 100644 docs/MultiChannelMessageDirectionEnum.md delete mode 100644 docs/MultiChannelStatusEnum.md delete mode 100644 docs/Tag.md diff --git a/docs/CallbackTypeEnum.md b/docs/CallbackTypeEnum.md deleted file mode 100644 index 31e8607d..00000000 --- a/docs/CallbackTypeEnum.md +++ /dev/null @@ -1,10 +0,0 @@ -# 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/DeferredResult.md b/docs/DeferredResult.md deleted file mode 100644 index 9d7b82e9..00000000 --- a/docs/DeferredResult.md +++ /dev/null @@ -1,11 +0,0 @@ -# Bandwidth.Standard.Model.DeferredResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | **Object** | | [optional] -**SetOrExpired** | **bool** | | [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/MessageCallback.md b/docs/MessageCallback.md deleted file mode 100644 index d197e74e..00000000 --- a/docs/MessageCallback.md +++ /dev/null @@ -1,17 +0,0 @@ -# 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] -**CarrierName** | **string** | The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. | [optional] - -[[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 deleted file mode 100644 index b7b294b5..00000000 --- a/docs/MessageCallbackMessage.md +++ /dev/null @@ -1,22 +0,0 @@ -# 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/docs/MultiChannelCallbackData.md b/docs/MultiChannelCallbackData.md deleted file mode 100644 index e492cfed..00000000 --- a/docs/MultiChannelCallbackData.md +++ /dev/null @@ -1,14 +0,0 @@ -# Bandwidth.Standard.Model.MultiChannelCallbackData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Time** | **DateTime** | The time of the callback event. | [optional] -**Type** | **MultiChannelStatusEnum** | | [optional] -**To** | **string** | The phone number the message should be sent to in E164 format. | [optional] -**Description** | **string** | | [optional] -**Message** | [**MultiChannelMessageCallbackData**](MultiChannelMessageCallbackData.md) | | [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/MultiChannelMessageCallbackData.md b/docs/MultiChannelMessageCallbackData.md deleted file mode 100644 index aa2fb4c9..00000000 --- a/docs/MultiChannelMessageCallbackData.md +++ /dev/null @@ -1,17 +0,0 @@ -# Bandwidth.Standard.Model.MultiChannelMessageCallbackData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MessageId** | **string** | The ID of the message. | [optional] -**Status** | **MultiChannelStatusEnum** | | [optional] -**Direction** | **MultiChannelMessageDirectionEnum** | | [optional] -**From** | **string** | The sender ID of the message. This could be an alphanumeric sender ID. | [optional] -**To** | **string** | The phone number the message should be sent to in E164 format. | [optional] -**ApplicationId** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. | [optional] -**Channel** | **MultiChannelMessageChannelEnum** | | [optional] -**Tag** | **string** | A custom string that will be included in callback events of the message. Max 1024 characters. | [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/MultiChannelMessageData.md b/docs/MultiChannelMessageData.md deleted file mode 100644 index 4bd01e80..00000000 --- a/docs/MultiChannelMessageData.md +++ /dev/null @@ -1,18 +0,0 @@ -# Bandwidth.Standard.Model.MultiChannelMessageData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MessageId** | **string** | The ID of the message. | [optional] -**Status** | **MultiChannelStatusEnum** | | [optional] -**Time** | **DateTime** | The time the message was received by the Bandwidth API. | [optional] -**Direction** | **MultiChannelMessageDirectionEnum** | | [optional] -**From** | **string** | The sender ID of the message. This could be an alphanumeric sender ID. | [optional] -**To** | **string** | The phone number the message should be sent to in E164 format. | [optional] -**ApplicationId** | **string** | The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. | [optional] -**Channel** | **MultiChannelMessageChannelEnum** | | [optional] -**Tag** | **string** | A custom string that will be included in callback events of the message. Max 1024 characters. | [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/MultiChannelMessageDirectionEnum.md b/docs/MultiChannelMessageDirectionEnum.md deleted file mode 100644 index 31495a12..00000000 --- a/docs/MultiChannelMessageDirectionEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# Bandwidth.Standard.Model.MultiChannelMessageDirectionEnum - -## 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/MultiChannelStatusEnum.md b/docs/MultiChannelStatusEnum.md deleted file mode 100644 index 71a7eacb..00000000 --- a/docs/MultiChannelStatusEnum.md +++ /dev/null @@ -1,9 +0,0 @@ -# Bandwidth.Standard.Model.MultiChannelStatusEnum - -## 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/Tag.md b/docs/Tag.md deleted file mode 100644 index c53d7d10..00000000 --- a/docs/Tag.md +++ /dev/null @@ -1,11 +0,0 @@ -# Bandwidth.Standard.Model.Tag - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Key** | **string** | | [optional] -**Value** | **string** | | [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) - From 35f1806e3b2369cc5cbf74b0345687c9dae9fdb2 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Mon, 4 Aug 2025 13:40:09 -0400 Subject: [PATCH 3/9] remove old models --- .../Model/CallbackTypeEnum.cs | 61 ----- .../Model/DeferredResult.cs | 92 ------- .../Model/MessageCallback.cs | 165 ------------- .../Model/MessageCallbackMessage.cs | 228 ------------------ .../Model/MultiChannelCallbackData.cs | 124 ---------- .../Model/MultiChannelMessageCallbackData.cs | 156 ------------ .../Model/MultiChannelMessageData.cs | 167 ------------- .../Model/MultiChannelMessageDirectionEnum.cs | 48 ---- .../Model/MultiChannelStatusEnum.cs | 60 ----- src/Bandwidth.Standard/Model/Tag.cs | 92 ------- 10 files changed, 1193 deletions(-) delete mode 100644 src/Bandwidth.Standard/Model/CallbackTypeEnum.cs delete mode 100644 src/Bandwidth.Standard/Model/DeferredResult.cs delete mode 100644 src/Bandwidth.Standard/Model/MessageCallback.cs delete mode 100644 src/Bandwidth.Standard/Model/MessageCallbackMessage.cs delete mode 100644 src/Bandwidth.Standard/Model/MultiChannelCallbackData.cs delete mode 100644 src/Bandwidth.Standard/Model/MultiChannelMessageCallbackData.cs delete mode 100644 src/Bandwidth.Standard/Model/MultiChannelMessageData.cs delete mode 100644 src/Bandwidth.Standard/Model/MultiChannelMessageDirectionEnum.cs delete mode 100644 src/Bandwidth.Standard/Model/MultiChannelStatusEnum.cs delete mode 100644 src/Bandwidth.Standard/Model/Tag.cs diff --git a/src/Bandwidth.Standard/Model/CallbackTypeEnum.cs b/src/Bandwidth.Standard/Model/CallbackTypeEnum.cs deleted file mode 100644 index e7c1186f..00000000 --- a/src/Bandwidth.Standard/Model/CallbackTypeEnum.cs +++ /dev/null @@ -1,61 +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 -{ - /// - /// 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/DeferredResult.cs b/src/Bandwidth.Standard/Model/DeferredResult.cs deleted file mode 100644 index abfb21af..00000000 --- a/src/Bandwidth.Standard/Model/DeferredResult.cs +++ /dev/null @@ -1,92 +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 -{ - /// - /// DeferredResult - /// - [DataContract(Name = "deferredResult")] - public partial class DeferredResult : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// result. - /// setOrExpired. - public DeferredResult(Object result = default(Object), bool setOrExpired = default(bool)) - { - this.Result = result; - this.SetOrExpired = setOrExpired; - } - - /// - /// Gets or Sets Result - /// - [DataMember(Name = "result", EmitDefaultValue = false)] - public Object Result { get; set; } - - /// - /// Gets or Sets SetOrExpired - /// - [DataMember(Name = "setOrExpired", EmitDefaultValue = true)] - public bool SetOrExpired { 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 DeferredResult {\n"); - sb.Append(" Result: ").Append(Result).Append("\n"); - sb.Append(" SetOrExpired: ").Append(SetOrExpired).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/MessageCallback.cs b/src/Bandwidth.Standard/Model/MessageCallback.cs deleted file mode 100644 index 542ac3c1..00000000 --- a/src/Bandwidth.Standard/Model/MessageCallback.cs +++ /dev/null @@ -1,165 +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 Callback Schema - /// - [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. - /// - [JsonConstructorAttribute] - protected MessageCallback() { } - /// - /// Initializes a new instance of the class. - /// - /// time (required). - /// type (required). - /// to (required). - /// A detailed description of the event described by the callback. (required). - /// message (required). - /// Optional error code, applicable only when type is `message-failed`.. - /// The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to.. - public MessageCallback(DateTime time = default(DateTime), CallbackTypeEnum type = default(CallbackTypeEnum), string to = default(string), string description = default(string), MessageCallbackMessage message = default(MessageCallbackMessage), int? errorCode = default(int?), string carrierName = default(string)) - { - this.Time = time; - this.Type = type; - // to ensure "to" is required (not null) - if (to == 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 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 MessageCallback and cannot be null"); - } - this.Message = message; - this.ErrorCode = errorCode; - this.CarrierName = carrierName; - } - - /// - /// Gets or Sets Time - /// - /// 2024-12-02T20:15:57.278Z - [DataMember(Name = "time", IsRequired = true, EmitDefaultValue = true)] - public DateTime Time { get; set; } - - /// - /// Gets or Sets To - /// - /// +15552223333 - [DataMember(Name = "to", IsRequired = true, EmitDefaultValue = true)] - public string To { get; set; } - - /// - /// 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; } - - /// - /// Gets or Sets Message - /// - [DataMember(Name = "message", IsRequired = true, EmitDefaultValue = true)] - public MessageCallbackMessage Message { get; set; } - - /// - /// Optional error code, applicable only when type is `message-failed`. - /// - /// Optional error code, applicable only when type is `message-failed`. - /// 4405 - [DataMember(Name = "errorCode", EmitDefaultValue = true)] - public int? ErrorCode { get; set; } - - /// - /// The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. - /// - /// The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. - /// AT&T - [DataMember(Name = "carrierName", EmitDefaultValue = true)] - public string CarrierName { 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 MessageCallback {\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(" ErrorCode: ").Append(ErrorCode).Append("\n"); - sb.Append(" CarrierName: ").Append(CarrierName).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/MessageCallbackMessage.cs b/src/Bandwidth.Standard/Model/MessageCallbackMessage.cs deleted file mode 100644 index 7c9b55ac..00000000 --- a/src/Bandwidth.Standard/Model/MessageCallbackMessage.cs +++ /dev/null @@ -1,228 +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 payload schema within a MessageCallback - /// - [DataContract(Name = "messageCallbackMessage")] - public partial class MessageCallbackMessage : 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 MessageCallbackMessage() { } - /// - /// 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. - /// Optional media, applicable only for mms. - /// priority. - 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 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 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 MessageCallbackMessage 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 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 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 MessageCallbackMessage and cannot be null"); - } - this.Text = text; - 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 - /// - /// 2024-12-02T20:15:57.666Z - [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; } - - /// - /// 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 = 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 MessageCallbackMessage {\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/MultiChannelCallbackData.cs b/src/Bandwidth.Standard/Model/MultiChannelCallbackData.cs deleted file mode 100644 index 1c1f767e..00000000 --- a/src/Bandwidth.Standard/Model/MultiChannelCallbackData.cs +++ /dev/null @@ -1,124 +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 -{ - /// - /// MultiChannelCallbackData - /// - [DataContract(Name = "multiChannelCallbackData")] - public partial class MultiChannelCallbackData : IValidatableObject - { - - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = false)] - public MultiChannelStatusEnum? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The time of the callback event.. - /// type. - /// The phone number the message should be sent to in E164 format.. - /// description. - /// message. - public MultiChannelCallbackData(DateTime time = default(DateTime), MultiChannelStatusEnum? type = default(MultiChannelStatusEnum?), string to = default(string), string description = default(string), MultiChannelMessageCallbackData message = default(MultiChannelMessageCallbackData)) - { - this.Time = time; - this.Type = type; - this.To = to; - this.Description = description; - this.Message = message; - } - - /// - /// The time of the callback event. - /// - /// The time of the callback event. - /// 2025-01-01T18:20:16Z - [DataMember(Name = "time", EmitDefaultValue = false)] - public DateTime Time { get; set; } - - /// - /// The phone number the message should be sent to in E164 format. - /// - /// The phone number the message should be sent to in E164 format. - /// +15552223333 - [DataMember(Name = "to", EmitDefaultValue = false)] - public string To { get; set; } - - /// - /// Gets or Sets Description - /// - /// Incoming message received - [DataMember(Name = "description", EmitDefaultValue = false)] - public string Description { get; set; } - - /// - /// Gets or Sets Message - /// - [DataMember(Name = "message", EmitDefaultValue = false)] - public MultiChannelMessageCallbackData 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 MultiChannelCallbackData {\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/MultiChannelMessageCallbackData.cs b/src/Bandwidth.Standard/Model/MultiChannelMessageCallbackData.cs deleted file mode 100644 index b2e083b6..00000000 --- a/src/Bandwidth.Standard/Model/MultiChannelMessageCallbackData.cs +++ /dev/null @@ -1,156 +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 -{ - /// - /// MultiChannelMessageCallbackData - /// - [DataContract(Name = "multiChannelMessageCallbackData")] - public partial class MultiChannelMessageCallbackData : IValidatableObject - { - - /// - /// Gets or Sets Status - /// - [DataMember(Name = "status", EmitDefaultValue = false)] - public MultiChannelStatusEnum? Status { get; set; } - - /// - /// Gets or Sets Direction - /// - [DataMember(Name = "direction", EmitDefaultValue = false)] - public MultiChannelMessageDirectionEnum? Direction { get; set; } - - /// - /// Gets or Sets Channel - /// - [DataMember(Name = "channel", EmitDefaultValue = false)] - public MultiChannelMessageChannelEnum? Channel { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The ID of the message.. - /// status. - /// direction. - /// The sender ID of the message. This could be an alphanumeric sender ID.. - /// The phone number the message should be sent to in E164 format.. - /// The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard.. - /// channel. - /// A custom string that will be included in callback events of the message. Max 1024 characters.. - public MultiChannelMessageCallbackData(string messageId = default(string), MultiChannelStatusEnum? status = default(MultiChannelStatusEnum?), MultiChannelMessageDirectionEnum? direction = default(MultiChannelMessageDirectionEnum?), string from = default(string), string to = default(string), string applicationId = default(string), MultiChannelMessageChannelEnum? channel = default(MultiChannelMessageChannelEnum?), string tag = default(string)) - { - this.MessageId = messageId; - this.Status = status; - this.Direction = direction; - this.From = from; - this.To = to; - this.ApplicationId = applicationId; - this.Channel = channel; - this.Tag = tag; - } - - /// - /// The ID of the message. - /// - /// The ID of the message. - /// 1589228074636lm4k2je7j7jklbn2 - [DataMember(Name = "messageId", EmitDefaultValue = false)] - public string MessageId { get; set; } - - /// - /// The sender ID of the message. This could be an alphanumeric sender ID. - /// - /// The sender ID of the message. This could be an alphanumeric sender ID. - /// BandwidthRBM - [DataMember(Name = "from", EmitDefaultValue = false)] - public string From { get; set; } - - /// - /// The phone number the message should be sent to in E164 format. - /// - /// The phone number the message should be sent to in E164 format. - /// +15552223333 - [DataMember(Name = "to", EmitDefaultValue = false)] - public string To { get; set; } - - /// - /// The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. - /// - /// The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. - /// 93de2206-9669-4e07-948d-329f4b722ee2 - [DataMember(Name = "applicationId", EmitDefaultValue = false)] - public string ApplicationId { get; set; } - - /// - /// A custom string that will be included in callback events of the message. Max 1024 characters. - /// - /// A custom string that will be included in callback events of the message. Max 1024 characters. - /// custom string - [DataMember(Name = "tag", EmitDefaultValue = false)] - public string Tag { 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 MultiChannelMessageCallbackData {\n"); - sb.Append(" MessageId: ").Append(MessageId).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Direction: ").Append(Direction).Append("\n"); - sb.Append(" From: ").Append(From).Append("\n"); - sb.Append(" To: ").Append(To).Append("\n"); - sb.Append(" ApplicationId: ").Append(ApplicationId).Append("\n"); - sb.Append(" Channel: ").Append(Channel).Append("\n"); - sb.Append(" Tag: ").Append(Tag).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/MultiChannelMessageData.cs b/src/Bandwidth.Standard/Model/MultiChannelMessageData.cs deleted file mode 100644 index dd8c970a..00000000 --- a/src/Bandwidth.Standard/Model/MultiChannelMessageData.cs +++ /dev/null @@ -1,167 +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 -{ - /// - /// MultiChannelMessageData - /// - [DataContract(Name = "multiChannelMessageData")] - public partial class MultiChannelMessageData : IValidatableObject - { - - /// - /// Gets or Sets Status - /// - [DataMember(Name = "status", EmitDefaultValue = false)] - public MultiChannelStatusEnum? Status { get; set; } - - /// - /// Gets or Sets Direction - /// - [DataMember(Name = "direction", EmitDefaultValue = false)] - public MultiChannelMessageDirectionEnum? Direction { get; set; } - - /// - /// Gets or Sets Channel - /// - [DataMember(Name = "channel", EmitDefaultValue = false)] - public MultiChannelMessageChannelEnum? Channel { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// The ID of the message.. - /// status. - /// The time the message was received by the Bandwidth API.. - /// direction. - /// The sender ID of the message. This could be an alphanumeric sender ID.. - /// The phone number the message should be sent to in E164 format.. - /// The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard.. - /// channel. - /// A custom string that will be included in callback events of the message. Max 1024 characters.. - public MultiChannelMessageData(string messageId = default(string), MultiChannelStatusEnum? status = default(MultiChannelStatusEnum?), DateTime time = default(DateTime), MultiChannelMessageDirectionEnum? direction = default(MultiChannelMessageDirectionEnum?), string from = default(string), string to = default(string), string applicationId = default(string), MultiChannelMessageChannelEnum? channel = default(MultiChannelMessageChannelEnum?), string tag = default(string)) - { - this.MessageId = messageId; - this.Status = status; - this.Time = time; - this.Direction = direction; - this.From = from; - this.To = to; - this.ApplicationId = applicationId; - this.Channel = channel; - this.Tag = tag; - } - - /// - /// The ID of the message. - /// - /// The ID of the message. - /// 1589228074636lm4k2je7j7jklbn2 - [DataMember(Name = "messageId", EmitDefaultValue = false)] - public string MessageId { get; set; } - - /// - /// The time the message was received by the Bandwidth API. - /// - /// The time the message was received by the Bandwidth API. - /// 2025-01-01T18:20:16Z - [DataMember(Name = "time", EmitDefaultValue = false)] - public DateTime Time { get; set; } - - /// - /// The sender ID of the message. This could be an alphanumeric sender ID. - /// - /// The sender ID of the message. This could be an alphanumeric sender ID. - /// BandwidthRBM - [DataMember(Name = "from", EmitDefaultValue = false)] - public string From { get; set; } - - /// - /// The phone number the message should be sent to in E164 format. - /// - /// The phone number the message should be sent to in E164 format. - /// +15552223333 - [DataMember(Name = "to", EmitDefaultValue = false)] - public string To { get; set; } - - /// - /// The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. - /// - /// The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. - /// 93de2206-9669-4e07-948d-329f4b722ee2 - [DataMember(Name = "applicationId", EmitDefaultValue = false)] - public string ApplicationId { get; set; } - - /// - /// A custom string that will be included in callback events of the message. Max 1024 characters. - /// - /// A custom string that will be included in callback events of the message. Max 1024 characters. - /// custom string - [DataMember(Name = "tag", EmitDefaultValue = false)] - public string Tag { 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 MultiChannelMessageData {\n"); - sb.Append(" MessageId: ").Append(MessageId).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Time: ").Append(Time).Append("\n"); - sb.Append(" Direction: ").Append(Direction).Append("\n"); - sb.Append(" From: ").Append(From).Append("\n"); - sb.Append(" To: ").Append(To).Append("\n"); - sb.Append(" ApplicationId: ").Append(ApplicationId).Append("\n"); - sb.Append(" Channel: ").Append(Channel).Append("\n"); - sb.Append(" Tag: ").Append(Tag).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/MultiChannelMessageDirectionEnum.cs b/src/Bandwidth.Standard/Model/MultiChannelMessageDirectionEnum.cs deleted file mode 100644 index bdeda191..00000000 --- a/src/Bandwidth.Standard/Model/MultiChannelMessageDirectionEnum.cs +++ /dev/null @@ -1,48 +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 -{ - /// - /// Defines multiChannelMessageDirectionEnum - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum MultiChannelMessageDirectionEnum - { - /// - /// Enum INBOUND for value: INBOUND - /// - [EnumMember(Value = "INBOUND")] - INBOUND = 1, - - /// - /// Enum OUTBOUND for value: OUTBOUND - /// - [EnumMember(Value = "OUTBOUND")] - OUTBOUND = 2 - } - -} diff --git a/src/Bandwidth.Standard/Model/MultiChannelStatusEnum.cs b/src/Bandwidth.Standard/Model/MultiChannelStatusEnum.cs deleted file mode 100644 index 93b2a12c..00000000 --- a/src/Bandwidth.Standard/Model/MultiChannelStatusEnum.cs +++ /dev/null @@ -1,60 +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 -{ - /// - /// Defines multiChannelStatusEnum - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum MultiChannelStatusEnum - { - /// - /// Enum QUEUED for value: QUEUED - /// - [EnumMember(Value = "QUEUED")] - QUEUED = 1, - - /// - /// Enum SENDING for value: SENDING - /// - [EnumMember(Value = "SENDING")] - SENDING = 2, - - /// - /// Enum DELIVERED for value: DELIVERED - /// - [EnumMember(Value = "DELIVERED")] - DELIVERED = 3, - - /// - /// Enum FAILED for value: FAILED - /// - [EnumMember(Value = "FAILED")] - FAILED = 4 - } - -} diff --git a/src/Bandwidth.Standard/Model/Tag.cs b/src/Bandwidth.Standard/Model/Tag.cs deleted file mode 100644 index e3ce70ff..00000000 --- a/src/Bandwidth.Standard/Model/Tag.cs +++ /dev/null @@ -1,92 +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 -{ - /// - /// Tag - /// - [DataContract(Name = "tag")] - public partial class Tag : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// key. - /// value. - public Tag(string key = default(string), string value = default(string)) - { - this.Key = key; - this.Value = value; - } - - /// - /// Gets or Sets Key - /// - [DataMember(Name = "key", EmitDefaultValue = false)] - public string Key { get; set; } - - /// - /// Gets or Sets Value - /// - [DataMember(Name = "value", EmitDefaultValue = false)] - public string Value { 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 Tag {\n"); - sb.Append(" Key: ").Append(Key).Append("\n"); - sb.Append(" Value: ").Append(Value).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; - } - } - -} From 3c1bd53d2be3c9893f1b11f7cdc339ba7216ed00 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Mon, 4 Aug 2025 13:42:44 -0400 Subject: [PATCH 4/9] remove old tests --- .../Unit/Model/CallbackTypeEnumTests.cs | 55 ----- .../Unit/Model/DeferredResultTests.cs | 75 ------- .../Unit/Model/MessageCallbackMessageTests.cs | 200 ------------------ .../Unit/Model/MessageCallbackTests.cs | 149 ------------- .../Model/MultiChannelCallbackDataTests.cs | 109 ---------- .../MultiChannelMessageCallbackDataTests.cs | 143 ------------- .../Model/MultiChannelMessageDataTests.cs | 154 -------------- .../MultiChannelMessageDirectionEnumTests.cs | 55 ----- .../Unit/Model/MultiChannelStatusEnumTests.cs | 55 ----- .../Unit/Model/TagTests.cs | 75 ------- 10 files changed, 1070 deletions(-) delete mode 100644 src/Bandwidth.Standard.Test/Unit/Model/CallbackTypeEnumTests.cs delete mode 100644 src/Bandwidth.Standard.Test/Unit/Model/DeferredResultTests.cs delete mode 100644 src/Bandwidth.Standard.Test/Unit/Model/MessageCallbackMessageTests.cs delete mode 100644 src/Bandwidth.Standard.Test/Unit/Model/MessageCallbackTests.cs delete mode 100644 src/Bandwidth.Standard.Test/Unit/Model/MultiChannelCallbackDataTests.cs delete mode 100644 src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageCallbackDataTests.cs delete mode 100644 src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageDataTests.cs delete mode 100644 src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageDirectionEnumTests.cs delete mode 100644 src/Bandwidth.Standard.Test/Unit/Model/MultiChannelStatusEnumTests.cs delete mode 100644 src/Bandwidth.Standard.Test/Unit/Model/TagTests.cs diff --git a/src/Bandwidth.Standard.Test/Unit/Model/CallbackTypeEnumTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/CallbackTypeEnumTests.cs deleted file mode 100644 index b39aead2..00000000 --- a/src/Bandwidth.Standard.Test/Unit/Model/CallbackTypeEnumTests.cs +++ /dev/null @@ -1,55 +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 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/DeferredResultTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/DeferredResultTests.cs deleted file mode 100644 index 9fe3e69f..00000000 --- a/src/Bandwidth.Standard.Test/Unit/Model/DeferredResultTests.cs +++ /dev/null @@ -1,75 +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 DeferredResult - /// - public class DeferredResultTests : IDisposable - { - private DeferredResult instance; - - public DeferredResultTests() - { - instance = new DeferredResult(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of DeferredResult - /// - [Fact] - public void DeferredResultInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'Result' - /// - [Fact] - public void ResultTest() - { - instance.Result = "test"; - Assert.IsAssignableFrom(instance.Result); - Assert.Equal("test", instance.Result); - } - /// - /// Test the property 'SetOrExpired' - /// - [Fact] - public void SetOrExpiredTest() - { - instance.SetOrExpired = true; - Assert.IsType(instance.SetOrExpired); - Assert.True(instance.SetOrExpired); - } - - } - -} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MessageCallbackMessageTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MessageCallbackMessageTests.cs deleted file mode 100644 index f2ac5250..00000000 --- a/src/Bandwidth.Standard.Test/Unit/Model/MessageCallbackMessageTests.cs +++ /dev/null @@ -1,200 +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 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 MessageCallbackMessageTests : IDisposable - { - private MessageCallbackMessage instance; - - public MessageCallbackMessageTests() - { - instance = new MessageCallbackMessage( - id: "test", - owner: "test", - applicationId: "test", - time: new DateTime(2020, 1, 1), - segmentCount: 1, - direction: MessageDirectionEnum.In, - to: new List { "+15551234567" }, - from: "+15557654321", - text: "Hello World", - tag: "test", - media: new List { "https://test.url/" }, - priority: PriorityEnum.Default - ); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MessageCallbackMessage - /// - [Fact] - public void MessageCallbackMessageInstanceTest() - { - Assert.IsType(instance); - } - - /// - /// Test the property 'Id' - /// - [Fact] - public void IdTest() - { - instance.Id = "test"; - Assert.IsType(instance.Id); - Assert.Equal("test", instance.Id); - } - - /// - /// Test the property 'Owner' - /// - [Fact] - public void OwnerTest() - { - instance.Owner = "test"; - Assert.IsType(instance.Owner); - Assert.Equal("test", instance.Owner); - } - - /// - /// Test the property 'ApplicationId' - /// - [Fact] - public void ApplicationIdTest() - { - instance.ApplicationId = "test"; - Assert.IsType(instance.ApplicationId); - Assert.Equal("test", 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() - { - instance.To = new List { "+15551234567" }; - Assert.IsType>(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("+15557654321", instance.From); - } - - /// - /// Test the property 'Text' - /// - [Fact] - public void TextTest() - { - instance.Text = "Hello World"; - 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/MessageCallbackTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MessageCallbackTests.cs deleted file mode 100644 index 4c8bc281..00000000 --- a/src/Bandwidth.Standard.Test/Unit/Model/MessageCallbackTests.cs +++ /dev/null @@ -1,149 +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 MessageCallback - /// - /// - /// 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 MessageCallback instance; - private MessageCallbackMessage message; - - public MessageCallbackTests() - { - message = new MessageCallbackMessage( - id: "test", - owner: "test", - applicationId: "test", - time: new DateTime(2020, 1, 1), - segmentCount: 1, - direction: MessageDirectionEnum.In, - to: new List { "+15551234567" }, - from: "+15557654321", - text: "Hello World", - tag: "test", - media: new List { "https://test.url/" }, - priority: PriorityEnum.Default - ); - - instance = new MessageCallback( - time: new DateTime(2020, 1, 1), - type: CallbackTypeEnum.Received, - to: "+19195551234", - description: "test", - message: message, - errorCode: 123, - carrierName: "test" - ); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MessageCallback - /// - [Fact] - public void MessageCallbackInstanceTest() - { - Assert.IsType(instance); - } - - /// - /// Test the property 'Time' - /// - [Fact] - 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(CallbackTypeEnum.Received, instance.Type); - } - - /// - /// Test the property 'To' - /// - [Fact] - public void ToTest() - { - Assert.IsType(instance.To); - Assert.Equal("+19195551234", instance.To); - } - - /// - /// Test the property 'Description' - /// - [Fact] - public void DescriptionTest() - { - Assert.IsType(instance.Description); - Assert.Equal("test", instance.Description); - } - - /// - /// Test the property 'Message' - /// - [Fact] - public void MessageTest() - { - Assert.IsType(instance.Message); - Assert.Equal(message, instance.Message); - } - - /// - /// Test the property 'ErrorCode' - /// - [Fact] - public void ErrorCodeTest() - { - Assert.IsType(instance.ErrorCode); - Assert.Equal(123, instance.ErrorCode); - } - - /// - /// Test the property 'CarrierName' - /// - [Fact] - public void CarrierNameTest() - { - Assert.IsType(instance.CarrierName); - Assert.Equal("test", instance.CarrierName); - } - } -} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelCallbackDataTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelCallbackDataTests.cs deleted file mode 100644 index cfd2d0e2..00000000 --- a/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelCallbackDataTests.cs +++ /dev/null @@ -1,109 +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 MultiChannelCallbackData - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MultiChannelCallbackDataTests : IDisposable - { - private MultiChannelCallbackData instance; - - public MultiChannelCallbackDataTests() - { - instance = new MultiChannelCallbackData(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MultiChannelCallbackData - /// - [Fact] - public void MultiChannelCallbackDataInstanceTest() - { - 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() - { - instance.Type = MultiChannelStatusEnum.DELIVERED; - Assert.IsType(instance.Type); - Assert.Equal(MultiChannelStatusEnum.DELIVERED, instance.Type); - } - - /// - /// Test the property 'To' - /// - [Fact] - public void ToTest() - { - instance.To = "TestTo"; - Assert.IsType(instance.To); - Assert.Equal("TestTo", instance.To); - } - - /// - /// Test the property 'Description' - /// - [Fact] - public void DescriptionTest() - { - instance.Description = "TestDescription"; - Assert.IsType(instance.Description); - Assert.Equal("TestDescription", instance.Description); - } - - /// - /// Test the property 'Message' - /// - [Fact] - public void MessageTest() - { - instance.Message = new MultiChannelMessageCallbackData(); - Assert.IsType(instance.Message); - } - } -} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageCallbackDataTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageCallbackDataTests.cs deleted file mode 100644 index 5df8f528..00000000 --- a/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageCallbackDataTests.cs +++ /dev/null @@ -1,143 +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 MultiChannelMessageCallbackData - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MultiChannelMessageCallbackDataTests : IDisposable - { - private MultiChannelMessageCallbackData instance; - - public MultiChannelMessageCallbackDataTests() - { - instance = new MultiChannelMessageCallbackData(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MultiChannelMessageCallbackData - /// - [Fact] - public void MultiChannelMessageCallbackDataInstanceTest() - { - Assert.IsType(instance); - } - - /// - /// Test the property 'MessageId' - /// - [Fact] - public void MessageIdTest() - { - instance.MessageId = "12345"; - Assert.IsType(instance.MessageId); - Assert.Equal("12345", instance.MessageId); - } - - /// - /// Test the property 'Status' - /// - [Fact] - public void StatusTest() - { - instance.Status = MultiChannelStatusEnum.DELIVERED; - Assert.IsType(instance.Status); - Assert.Equal(MultiChannelStatusEnum.DELIVERED, instance.Status); - } - - /// - /// Test the property 'Direction' - /// - [Fact] - public void DirectionTest() - { - instance.Direction = MultiChannelMessageDirectionEnum.INBOUND; - Assert.IsType(instance.Direction); - Assert.Equal(MultiChannelMessageDirectionEnum.INBOUND, instance.Direction); - } - - /// - /// Test the property 'From' - /// - [Fact] - public void FromTest() - { - instance.From = "TestFrom"; - Assert.IsType(instance.From); - Assert.Equal("TestFrom", instance.From); - } - - /// - /// Test the property 'To' - /// - [Fact] - public void ToTest() - { - instance.To = "TestTo"; - Assert.IsType(instance.To); - Assert.Equal("TestTo", instance.To); - } - - /// - /// Test the property 'ApplicationId' - /// - [Fact] - public void ApplicationIdTest() - { - instance.ApplicationId = "TestApplicationId"; - Assert.IsType(instance.ApplicationId); - Assert.Equal("TestApplicationId", instance.ApplicationId); - } - - /// - /// Test the property 'Channel' - /// - [Fact] - public void ChannelTest() - { - instance.Channel = MultiChannelMessageChannelEnum.SMS; - Assert.IsType(instance.Channel); - Assert.Equal(MultiChannelMessageChannelEnum.SMS, instance.Channel); - } - - /// - /// Test the property 'Tag' - /// - [Fact] - public void TagTest() - { - instance.Tag = "TestTag"; - Assert.IsType(instance.Tag); - Assert.Equal("TestTag", instance.Tag); - } - } -} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageDataTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageDataTests.cs deleted file mode 100644 index 4606896f..00000000 --- a/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageDataTests.cs +++ /dev/null @@ -1,154 +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 MultiChannelMessageData - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MultiChannelMessageDataTests : IDisposable - { - private MultiChannelMessageData instance; - - public MultiChannelMessageDataTests() - { - instance = new MultiChannelMessageData(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MultiChannelMessageData - /// - [Fact] - public void MultiChannelMessageDataInstanceTest() - { - Assert.IsType(instance); - } - - /// - /// Test the property 'MessageId' - /// - [Fact] - public void MessageIdTest() - { - instance.MessageId = "12345"; - Assert.IsType(instance.MessageId); - Assert.Equal("12345", instance.MessageId); - } - - /// - /// Test the property 'Status' - /// - [Fact] - public void StatusTest() - { - instance.Status = MultiChannelStatusEnum.DELIVERED; - Assert.IsType(instance.Status); - Assert.Equal(MultiChannelStatusEnum.DELIVERED, instance.Status); - } - - /// - /// 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 'Direction' - /// - [Fact] - public void DirectionTest() - { - instance.Direction = MultiChannelMessageDirectionEnum.INBOUND; - Assert.IsType(instance.Direction); - Assert.Equal(MultiChannelMessageDirectionEnum.INBOUND, instance.Direction); - } - - /// - /// Test the property 'From' - /// - [Fact] - public void FromTest() - { - instance.From = "TestFrom"; - Assert.IsType(instance.From); - Assert.Equal("TestFrom", instance.From); - } - - /// - /// Test the property 'To' - /// - [Fact] - public void ToTest() - { - instance.To = "TestTo"; - Assert.IsType(instance.To); - Assert.Equal("TestTo", instance.To); - } - - /// - /// Test the property 'ApplicationId' - /// - [Fact] - public void ApplicationIdTest() - { - instance.ApplicationId = "TestApplicationId"; - Assert.IsType(instance.ApplicationId); - Assert.Equal("TestApplicationId", instance.ApplicationId); - } - - /// - /// Test the property 'Channel' - /// - [Fact] - public void ChannelTest() - { - instance.Channel = MultiChannelMessageChannelEnum.SMS; - Assert.IsType(instance.Channel); - Assert.Equal(MultiChannelMessageChannelEnum.SMS, instance.Channel); - } - - /// - /// Test the property 'Tag' - /// - [Fact] - public void TagTest() - { - instance.Tag = "TestTag"; - Assert.IsType(instance.Tag); - Assert.Equal("TestTag", instance.Tag); - } - } -} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageDirectionEnumTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageDirectionEnumTests.cs deleted file mode 100644 index a822278c..00000000 --- a/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageDirectionEnumTests.cs +++ /dev/null @@ -1,55 +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 MultiChannelMessageDirectionEnum - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MultiChannelMessageDirectionEnumTests : IDisposable - { - private MultiChannelMessageDirectionEnum instance; - - public MultiChannelMessageDirectionEnumTests() - { - instance = new MultiChannelMessageDirectionEnum(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MultiChannelMessageDirectionEnum - /// - [Fact] - public void MultiChannelMessageDirectionEnumInstanceTest() - { - Assert.IsType(instance); - } - } -} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelStatusEnumTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelStatusEnumTests.cs deleted file mode 100644 index 3a5eb37b..00000000 --- a/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelStatusEnumTests.cs +++ /dev/null @@ -1,55 +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 MultiChannelStatusEnum - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MultiChannelStatusEnumTests : IDisposable - { - private MultiChannelStatusEnum instance; - - public MultiChannelStatusEnumTests() - { - instance = new MultiChannelStatusEnum(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of MultiChannelStatusEnum - /// - [Fact] - public void MultiChannelStatusEnumInstanceTest() - { - Assert.IsType(instance); - } - } -} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/TagTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/TagTests.cs deleted file mode 100644 index 13bdd9e3..00000000 --- a/src/Bandwidth.Standard.Test/Unit/Model/TagTests.cs +++ /dev/null @@ -1,75 +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 Tag - /// - public class TagTests : IDisposable - { - private Tag instance; - - public TagTests() - { - instance = new Tag(); - } - - public void Dispose() - { - // Cleanup when everything is done. - } - - /// - /// Test an instance of Tag - /// - [Fact] - public void TagInstanceTest() - { - Assert.IsType(instance); - } - - - /// - /// Test the property 'Key' - /// - [Fact] - public void KeyTest() - { - instance.Key = "test"; - Assert.IsType(instance.Key); - Assert.Equal("test", instance.Key); - } - /// - /// Test the property 'Value' - /// - [Fact] - public void ValueTest() - { - instance.Value = "test"; - Assert.IsType(instance.Value); - Assert.Equal("test", instance.Value); - } - - } - -} From af0f43b6380ad5b651df3bbe79ea101a8102fcbc Mon Sep 17 00:00:00 2001 From: ckoegel Date: Mon, 4 Aug 2025 14:35:50 -0400 Subject: [PATCH 5/9] fix unit tests --- .../Unit/Model/ErrorObjectTests.cs | 38 +++++++++++++------ .../Unit/Model/MmsMessageContentTests.cs | 7 +++- .../MultiChannelActionCalendarEventTests.cs | 10 ++--- .../Unit/Model/MultiChannelActionTests.cs | 10 ++--- ...ltiChannelChannelListObjectContentTests.cs | 6 +-- .../MultiChannelChannelListObjectTests.cs | 2 +- .../Unit/Model/RbmActionBaseTests.cs | 10 ++--- .../Unit/Model/RbmActionDialTests.cs | 10 ++--- .../Unit/Model/RbmActionOpenUrlTests.cs | 10 ++--- .../Unit/Model/RbmActionViewLocationTests.cs | 10 ++--- .../Unit/Model/RbmCardContentTests.cs | 2 +- .../Model/RbmMessageContentRichCardTests.cs | 2 +- .../Unit/Model/RbmMessageMediaTests.cs | 2 +- 13 files changed, 69 insertions(+), 50 deletions(-) diff --git a/src/Bandwidth.Standard.Test/Unit/Model/ErrorObjectTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/ErrorObjectTests.cs index ca221ced..3806ab43 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/ErrorObjectTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/ErrorObjectTests.cs @@ -35,7 +35,16 @@ public class ErrorObjectTests : IDisposable public ErrorObjectTests() { - instance = new ErrorObject(); + instance = new ErrorObject( + type: "TestType", + description: "TestDescription", + source: new ErrorSource( + varParameter: "TestParameter", + field: "TestField", + header: "TestHeader", + reference: "TestReference" + ) + ); } public void Dispose() @@ -53,25 +62,32 @@ public void ErrorObjectInstanceTest() } /// - /// Test the property 'Code' + /// Test the property 'Type' /// [Fact] - public void CodeTest() + public void TypeTest() { - instance.Code = "TestCode"; - Assert.IsType(instance.Code); - Assert.Equal("TestCode", instance.Code); + Assert.IsType(instance.Type); + Assert.Equal("TestType", instance.Type); } /// - /// Test the property 'Message' + /// Test the property 'Description' /// [Fact] - public void MessageTest() + public void DescriptionTest() { - instance.Message = "TestMessage"; - Assert.IsType(instance.Message); - Assert.Equal("TestMessage", instance.Message); + Assert.IsType(instance.Description); + Assert.Equal("TestDescription", instance.Description); + } + + /// + /// Test the property 'Source' + /// + [Fact] + public void SourceTest() + { + Assert.IsType(instance.Source); } } } diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MmsMessageContentTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MmsMessageContentTests.cs index 47c1f421..e28ea65d 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/MmsMessageContentTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/MmsMessageContentTests.cs @@ -69,9 +69,12 @@ public void TextTest() [Fact] public void MediaTest() { - var mediaList = new List { "https://example.com/image1.jpg", "https://example.com/image2.jpg" }; + var mediaList = new List { + new MmsMessageContentFile(fileUrl: "https://test.url/1"), + new MmsMessageContentFile(fileUrl: "https://test.url/2") + }; instance.Media = mediaList; - Assert.IsType>(instance.Media); + Assert.IsType>(instance.Media); Assert.Equal(mediaList, instance.Media); } } diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelActionCalendarEventTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelActionCalendarEventTests.cs index a539aefd..db46a33d 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelActionCalendarEventTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelActionCalendarEventTests.cs @@ -38,7 +38,7 @@ public MultiChannelActionCalendarEventTests() instance = new MultiChannelActionCalendarEvent( type: RbmActionTypeEnum.CREATECALENDAREVENT, text: "Test message", - postBackData: new byte[] { 1, 2, 3 }, + postbackData: new byte[] { 1, 2, 3 }, title: "Test Title", startTime: new DateTime(2020, 1, 1), endTime: new DateTime(2020, 1, 1), @@ -81,13 +81,13 @@ public void TextTest() } /// - /// Test the property 'PostBackData' + /// Test the property 'PostbackData' /// [Fact] - public void PostBackDataTest() + public void PostbackDataTest() { - Assert.IsType(instance.PostBackData); - Assert.Equal(new byte[] { 1, 2, 3 }, instance.PostBackData); + Assert.IsType(instance.PostbackData); + Assert.Equal(new byte[] { 1, 2, 3 }, instance.PostbackData); } /// diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelActionTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelActionTests.cs index 5cf7a982..fc5880c5 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelActionTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelActionTests.cs @@ -42,18 +42,18 @@ public MultiChannelActionTests() instanceRbmActionBase = new MultiChannelAction(new RbmActionBase( type: RbmActionTypeEnum.REPLY, text: "TestText", - postBackData: new byte[] { 1, 2, 3 } + postbackData: new byte[] { 1, 2, 3 } )); instanceRbmActionDial = new MultiChannelAction(new RbmActionDial( type: RbmActionTypeEnum.REPLY, text: "TestText", - postBackData: new byte[] { 1, 2, 3 }, + postbackData: new byte[] { 1, 2, 3 }, phoneNumber: "TestPhoneNumber" )); instanceRbmActionViewLocation = new MultiChannelAction(new RbmActionViewLocation( type: RbmActionTypeEnum.REPLY, text: "TestText", - postBackData: new byte[] { 1, 2, 3 }, + postbackData: new byte[] { 1, 2, 3 }, latitude: 37.7749, longitude: -122.4194, label: "TestLabel" @@ -61,7 +61,7 @@ public MultiChannelActionTests() instanceMultiChannelActionCalendarEvent = new MultiChannelAction(new MultiChannelActionCalendarEvent( type: RbmActionTypeEnum.REPLY, text: "TestText", - postBackData: new byte[] { 1, 2, 3 }, + postbackData: new byte[] { 1, 2, 3 }, title: "TestTitle", startTime: new DateTime(2020, 1, 1), endTime: new DateTime(2020, 1, 1), @@ -70,7 +70,7 @@ public MultiChannelActionTests() instanceRbmActionOpenUrl = new MultiChannelAction(new RbmActionOpenUrl( type: RbmActionTypeEnum.REPLY, text: "TestText", - postBackData: new byte[] { 1, 2, 3 }, + postbackData: new byte[] { 1, 2, 3 }, url: "https://test.url/" )); } diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelChannelListObjectContentTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelChannelListObjectContentTests.cs index 7c83967a..5d5ec2d1 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelChannelListObjectContentTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelChannelListObjectContentTests.cs @@ -44,7 +44,7 @@ public MultiChannelChannelListObjectContentTests() new MultiChannelAction(new RbmActionBase( type: RbmActionTypeEnum.REPLY, text: "Test", - postBackData: new byte[] { 1, 2, 3 } + postbackData: new byte[] { 1, 2, 3 } )) }; @@ -81,8 +81,8 @@ public MultiChannelChannelListObjectContentTests() )); instanceMmsMessageContent = new MultiChannelChannelListObjectContent(new MmsMessageContent( text: "Test message", - media: new List(){ - "https://test.url/" + media: new List(){ + new MmsMessageContentFile(fileUrl: "https://test.url/") } )); } diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelChannelListObjectTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelChannelListObjectTests.cs index 084ab496..6505188b 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelChannelListObjectTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelChannelListObjectTests.cs @@ -48,7 +48,7 @@ public MultiChannelChannelListObjectTests() new MultiChannelAction(new RbmActionBase( type: RbmActionTypeEnum.REPLY, text: "Test", - postBackData: new byte[] { 1, 2, 3 } + postbackData: new byte[] { 1, 2, 3 } )) } )) diff --git a/src/Bandwidth.Standard.Test/Unit/Model/RbmActionBaseTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/RbmActionBaseTests.cs index e0c7a8e4..1a7b16ac 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/RbmActionBaseTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/RbmActionBaseTests.cs @@ -38,7 +38,7 @@ public RbmActionBaseTests() instance = new RbmActionBase( type: RbmActionTypeEnum.REPLY, text: "TestText", - postBackData: new byte[] { 1, 2, 3 } + postbackData: new byte[] { 1, 2, 3 } ); } @@ -77,13 +77,13 @@ public void TextTest() } /// - /// Test the property 'PostBackData' + /// Test the property 'PostbackData' /// [Fact] - public void PostBackDataTest() + public void PostbackDataTest() { - Assert.IsType(instance.PostBackData); - Assert.Equal(new byte[] { 1, 2, 3 }, instance.PostBackData); + Assert.IsType(instance.PostbackData); + Assert.Equal(new byte[] { 1, 2, 3 }, instance.PostbackData); } } } diff --git a/src/Bandwidth.Standard.Test/Unit/Model/RbmActionDialTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/RbmActionDialTests.cs index ddd8fdcb..253c5294 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/RbmActionDialTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/RbmActionDialTests.cs @@ -38,7 +38,7 @@ public RbmActionDialTests() instance = new RbmActionDial( type: RbmActionTypeEnum.DIALPHONE, text: "TestText", - postBackData: new byte[] { 1, 2, 3 }, + postbackData: new byte[] { 1, 2, 3 }, phoneNumber: "TestPhoneNumber" ); } @@ -78,13 +78,13 @@ public void TextTest() } /// - /// Test the property 'PostBackData' + /// Test the property 'PostbackData' /// [Fact] - public void PostBackDataTest() + public void PostbackDataTest() { - Assert.IsType(instance.PostBackData); - Assert.Equal(new byte[] { 1, 2, 3 }, instance.PostBackData); + Assert.IsType(instance.PostbackData); + Assert.Equal(new byte[] { 1, 2, 3 }, instance.PostbackData); } /// diff --git a/src/Bandwidth.Standard.Test/Unit/Model/RbmActionOpenUrlTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/RbmActionOpenUrlTests.cs index 9ec9c84c..a70918c6 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/RbmActionOpenUrlTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/RbmActionOpenUrlTests.cs @@ -38,7 +38,7 @@ public RbmActionOpenUrlTests() instance = new RbmActionOpenUrl( type: RbmActionTypeEnum.OPENURL, text: "TestText", - postBackData: new byte[] { 1, 2, 3 }, + postbackData: new byte[] { 1, 2, 3 }, url: "https://test.url/" ); } @@ -78,13 +78,13 @@ public void TextTest() } /// - /// Test the property 'PostBackData' + /// Test the property 'PostbackData' /// [Fact] - public void PostBackDataTest() + public void PostbackDataTest() { - Assert.IsType(instance.PostBackData); - Assert.Equal(new byte[] { 1, 2, 3 }, instance.PostBackData); + Assert.IsType(instance.PostbackData); + Assert.Equal(new byte[] { 1, 2, 3 }, instance.PostbackData); } /// diff --git a/src/Bandwidth.Standard.Test/Unit/Model/RbmActionViewLocationTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/RbmActionViewLocationTests.cs index 78851231..16202056 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/RbmActionViewLocationTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/RbmActionViewLocationTests.cs @@ -38,7 +38,7 @@ public RbmActionViewLocationTests() instance = new RbmActionViewLocation( type: RbmActionTypeEnum.SHOWLOCATION, text: "TestText", - postBackData: new byte[] { 1, 2, 3 }, + postbackData: new byte[] { 1, 2, 3 }, latitude: 37.7749, longitude: -122.4194, label: "TestLabel" @@ -80,13 +80,13 @@ public void TextTest() } /// - /// Test the property 'PostBackData' + /// Test the property 'PostbackData' /// [Fact] - public void PostBackDataTest() + public void PostbackDataTest() { - Assert.IsType(instance.PostBackData); - Assert.Equal(new byte[] { 1, 2, 3 }, instance.PostBackData); + Assert.IsType(instance.PostbackData); + Assert.Equal(new byte[] { 1, 2, 3 }, instance.PostbackData); } /// diff --git a/src/Bandwidth.Standard.Test/Unit/Model/RbmCardContentTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/RbmCardContentTests.cs index b4172892..149806d3 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/RbmCardContentTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/RbmCardContentTests.cs @@ -48,7 +48,7 @@ public RbmCardContentTests() new MultiChannelAction(new RbmActionBase( type: RbmActionTypeEnum.REPLY, text: "Test", - postBackData: new byte[] { 1, 2, 3 } + postbackData: new byte[] { 1, 2, 3 } )) } ); diff --git a/src/Bandwidth.Standard.Test/Unit/Model/RbmMessageContentRichCardTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/RbmMessageContentRichCardTests.cs index 93444265..9b220ae0 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/RbmMessageContentRichCardTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/RbmMessageContentRichCardTests.cs @@ -42,7 +42,7 @@ public RbmMessageContentRichCardTests() new MultiChannelAction(new RbmActionBase( type: RbmActionTypeEnum.REPLY, text: "Test", - postBackData: new byte[] { 1, 2, 3 } + postbackData: new byte[] { 1, 2, 3 } )) }; diff --git a/src/Bandwidth.Standard.Test/Unit/Model/RbmMessageMediaTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/RbmMessageMediaTests.cs index 97696aac..b38bc9b2 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/RbmMessageMediaTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/RbmMessageMediaTests.cs @@ -45,7 +45,7 @@ public RbmMessageMediaTests() new MultiChannelAction(new RbmActionBase( type: RbmActionTypeEnum.REPLY, text: "Test", - postBackData: new byte[] { 1, 2, 3 } + postbackData: new byte[] { 1, 2, 3 } )) } ); From 60783fb95fc43b8c3f28b7cd39f52877a2069cf8 Mon Sep 17 00:00:00 2001 From: ckoegel Date: Mon, 4 Aug 2025 14:37:52 -0400 Subject: [PATCH 6/9] new tfv unit test --- .../Unit/Api/TollFreeVerificationApiTests.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Bandwidth.Standard.Test/Unit/Api/TollFreeVerificationApiTests.cs b/src/Bandwidth.Standard.Test/Unit/Api/TollFreeVerificationApiTests.cs index 5b571f69..495e0a9c 100644 --- a/src/Bandwidth.Standard.Test/Unit/Api/TollFreeVerificationApiTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Api/TollFreeVerificationApiTests.cs @@ -108,6 +108,18 @@ public void CreateWebhookSubscriptionTest() // Assert.IsType(response); } + /// + /// Test DeleteVerificationRequest + /// + [Fact] + public void DeleteVerificationRequestTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string accountId = null; + //string phoneNumber = null; + //instance.DeleteVerificationRequest(accountId, phoneNumber); + } + /// /// Test DeleteWebhookSubscription /// From 50ebe1b56e290860bd2a958592550813eb78d65f Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 5 Aug 2025 11:13:16 -0400 Subject: [PATCH 7/9] new unit tests --- .../Unit/Model/CallbackTests.cs | 99 ++++++++ .../Unit/Model/ErrorSourceTests.cs | 100 ++++++++ .../Unit/Model/InboundCallbackMessageTests.cs | 229 ++++++++++++++++++ .../Unit/Model/InboundCallbackTests.cs | 129 ++++++++++ .../Model/InboundCallbackTypeEnumTests.cs | 55 +++++ .../Unit/Model/MmsMessageContentFileTests.cs | 67 +++++ .../Unit/Model/MultiChannelErrorTests.cs | 88 +++++++ .../Model/MultiChannelMessageContentTests.cs | 80 ++++++ ...essageResponseDataChannelListInnerTests.cs | 113 +++++++++ .../MultiChannelMessageResponseDataTests.cs | 143 +++++++++++ .../Unit/Model/RbmLocationResponseTests.cs | 78 ++++++ .../Unit/Model/RbmSuggestionResponseTests.cs | 78 ++++++ .../Unit/Model/StatusCallbackMessageTests.cs | 199 +++++++++++++++ .../Unit/Model/StatusCallbackTests.cs | 158 ++++++++++++ .../Unit/Model/StatusCallbackTypeEnumTests.cs | 55 +++++ 15 files changed, 1671 insertions(+) create mode 100644 src/Bandwidth.Standard.Test/Unit/Model/CallbackTests.cs create mode 100644 src/Bandwidth.Standard.Test/Unit/Model/ErrorSourceTests.cs create mode 100644 src/Bandwidth.Standard.Test/Unit/Model/InboundCallbackMessageTests.cs create mode 100644 src/Bandwidth.Standard.Test/Unit/Model/InboundCallbackTests.cs create mode 100644 src/Bandwidth.Standard.Test/Unit/Model/InboundCallbackTypeEnumTests.cs create mode 100644 src/Bandwidth.Standard.Test/Unit/Model/MmsMessageContentFileTests.cs create mode 100644 src/Bandwidth.Standard.Test/Unit/Model/MultiChannelErrorTests.cs create mode 100644 src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageContentTests.cs create mode 100644 src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageResponseDataChannelListInnerTests.cs create mode 100644 src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageResponseDataTests.cs create mode 100644 src/Bandwidth.Standard.Test/Unit/Model/RbmLocationResponseTests.cs create mode 100644 src/Bandwidth.Standard.Test/Unit/Model/RbmSuggestionResponseTests.cs create mode 100644 src/Bandwidth.Standard.Test/Unit/Model/StatusCallbackMessageTests.cs create mode 100644 src/Bandwidth.Standard.Test/Unit/Model/StatusCallbackTests.cs create mode 100644 src/Bandwidth.Standard.Test/Unit/Model/StatusCallbackTypeEnumTests.cs diff --git a/src/Bandwidth.Standard.Test/Unit/Model/CallbackTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/CallbackTests.cs new file mode 100644 index 00000000..9808e0b4 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/CallbackTests.cs @@ -0,0 +1,99 @@ +/* + * 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 Callback + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class CallbackTests : IDisposable + { + private Callback instanceInboundCallback; + private Callback instanceStatusCallback; + + public CallbackTests() + { + instanceInboundCallback = new Callback(new InboundCallback( + time: DateTime.Now, + type: InboundCallbackTypeEnum.MessageReceived, + to: "1234567890", + description: "Test Callback", + message: new InboundCallbackMessage( + id: "1661365814859loidf7mcwd4qacn7", + owner: "+15553332222", + applicationId: "93de2206-9669-4e07-948d-329f4b722ee2", + time: DateTime.Now, + segmentCount: 1, + direction: MessageDirectionEnum.In, + to: ["+15552223333"], + from: "+15553332222" + ), + carrierName: "Test Carrier" + )); + + instanceStatusCallback = new Callback(new StatusCallback( + time: DateTime.Now, + eventTime: DateTime.Now, + type: StatusCallbackTypeEnum.Sending, + to: "1234567890", + description: "Test Status Callback", + message: new StatusCallbackMessage( + id: "1661365814859loidf7mcwd4qacn7", + owner: "+15553332222", + applicationId: "93de2206-9669-4e07-948d-329f4b722ee2", + time: DateTime.Now, + segmentCount: 1, + direction: MessageDirectionEnum.In, + to: ["+15552223333"], + from: "+15553332222", + text: "Hello world", + tag: "custom string", + media: ["https://dev.bandwidth.com/images/bandwidth-logo.png"], + priority: PriorityEnum.Default, + channel: MultiChannelMessageChannelEnum.SMS + ), + carrierName: "Test Carrier" + )); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Callback + /// + [Fact] + public void CallbackInstanceTest() + { + Assert.IsType(instanceInboundCallback); + Assert.IsType(instanceInboundCallback.ActualInstance); + Assert.IsType(instanceStatusCallback); + Assert.IsType(instanceStatusCallback.ActualInstance); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/ErrorSourceTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/ErrorSourceTests.cs new file mode 100644 index 00000000..92b04dac --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/ErrorSourceTests.cs @@ -0,0 +1,100 @@ +/* + * 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 ErrorSource + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ErrorSourceTests : IDisposable + { + private ErrorSource instance; + + public ErrorSourceTests() + { + instance = new ErrorSource( + varParameter: "TestParameter", + field: "TestField", + header: "TestHeader", + reference: "TestReference" + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ErrorSource + /// + [Fact] + public void ErrorSourceInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'Parameter' + /// + [Fact] + public void ParameterTest() + { + Assert.IsType(instance.Parameter); + Assert.Equal("TestParameter", instance.Parameter); + } + + /// + /// Test the property 'Field' + /// + [Fact] + public void FieldTest() + { + Assert.IsType(instance.Field); + Assert.Equal("TestField", instance.Field); + } + + /// + /// Test the property 'Header' + /// + [Fact] + public void HeaderTest() + { + Assert.IsType(instance.Header); + Assert.Equal("TestHeader", instance.Header); + } + + /// + /// Test the property 'Reference' + /// + [Fact] + public void ReferenceTest() + { + Assert.IsType(instance.Reference); + Assert.Equal("TestReference", instance.Reference); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/InboundCallbackMessageTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/InboundCallbackMessageTests.cs new file mode 100644 index 00000000..47e5af98 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/InboundCallbackMessageTests.cs @@ -0,0 +1,229 @@ +/* + * 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 InboundCallbackMessage + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class InboundCallbackMessageTests : IDisposable + { + private InboundCallbackMessage instance; + + public InboundCallbackMessageTests() + { + instance = new InboundCallbackMessage( + id: "1661365814859loidf7mcwd4qacn7", + owner: "+15553332222", + applicationId: "93de2206-9669-4e07-948d-329f4b722ee2", + time: DateTime.Now, + segmentCount: 1, + direction: MessageDirectionEnum.In, + to: ["+15552223333"], + from: "+15553332222", + text: "Test message text", + tag: "TestTag", + media: new List { "https://example.com/media1", "https://example.com/media2" }, + priority: PriorityEnum.Default, + channel: MultiChannelMessageChannelEnum.SMS, + content: new MultiChannelMessageContent(), + suggestionResponse: new RbmSuggestionResponse(), + locationResponse: new RbmLocationResponse() + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of InboundCallbackMessage + /// + [Fact] + public void InboundCallbackMessageInstanceTest() + { + 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() + { + Assert.IsType(instance.Time); + } + + /// + /// Test the property 'SegmentCount' + /// + [Fact] + public void SegmentCountTest() + { + Assert.IsType(instance.SegmentCount); + Assert.Equal(1, instance.SegmentCount); + } + + /// + /// Test the property 'Direction' + /// + [Fact] + public void DirectionTest() + { + 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 { "+15552223333" }, 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("Test message text", instance.Text); + } + + /// + /// Test the property 'Tag' + /// + [Fact] + public void TagTest() + { + Assert.IsType(instance.Tag); + Assert.Equal("TestTag", instance.Tag); + } + + /// + /// Test the property 'Media' + /// + [Fact] + public void MediaTest() + { + //unit test + Assert.IsType>(instance.Media); + Assert.Equal(new List { "https://example.com/media1", "https://example.com/media2" }, instance.Media); + } + + /// + /// Test the property 'Priority' + /// + [Fact] + public void PriorityTest() + { + Assert.IsType(instance.Priority); + Assert.Equal(PriorityEnum.Default, instance.Priority); + } + + /// + /// Test the property 'Channel' + /// + [Fact] + public void ChannelTest() + { + Assert.IsType(instance.Channel); + Assert.Equal(MultiChannelMessageChannelEnum.SMS, instance.Channel); + } + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + Assert.IsType(instance.Content); + } + + /// + /// Test the property 'SuggestionResponse' + /// + [Fact] + public void SuggestionResponseTest() + { + Assert.IsType(instance.SuggestionResponse); + } + + /// + /// Test the property 'LocationResponse' + /// + [Fact] + public void LocationResponseTest() + { + Assert.IsType(instance.LocationResponse); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/InboundCallbackTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/InboundCallbackTests.cs new file mode 100644 index 00000000..b9e7e3d2 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/InboundCallbackTests.cs @@ -0,0 +1,129 @@ +/* + * 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 InboundCallback + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class InboundCallbackTests : IDisposable + { + private InboundCallback instance; + + public InboundCallbackTests() + { + instance = new InboundCallback( + time: DateTime.Now, + type: InboundCallbackTypeEnum.MessageReceived, + to: "1234567890", + description: "Test Callback", + message: new InboundCallbackMessage( + id: "1661365814859loidf7mcwd4qacn7", + owner: "+15553332222", + applicationId: "93de2206-9669-4e07-948d-329f4b722ee2", + time: DateTime.Now, + segmentCount: 1, + direction: MessageDirectionEnum.In, + to: ["+15552223333"], + from: "+15553332222" + ), + carrierName: "Test Carrier" + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of InboundCallback + /// + [Fact] + public void InboundCallbackInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'Time' + /// + [Fact] + public void TimeTest() + { + Assert.IsType(instance.Time); + } + + /// + /// Test the property 'Type' + /// + [Fact] + public void TypeTest() + { + Assert.IsType(instance.Type); + Assert.Equal(InboundCallbackTypeEnum.MessageReceived, instance.Type); + } + + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + Assert.IsType(instance.To); + Assert.Equal("1234567890", instance.To); + } + + /// + /// Test the property 'Description' + /// + [Fact] + public void DescriptionTest() + { + Assert.IsType(instance.Description); + Assert.Equal("Test Callback", instance.Description); + } + + /// + /// Test the property 'Message' + /// + [Fact] + public void MessageTest() + { + Assert.IsType(instance.Message); + } + + /// + /// Test the property 'CarrierName' + /// + [Fact] + public void CarrierNameTest() + { + Assert.IsType(instance.CarrierName); + Assert.Equal("Test Carrier", instance.CarrierName); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/InboundCallbackTypeEnumTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/InboundCallbackTypeEnumTests.cs new file mode 100644 index 00000000..a3b300d3 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/InboundCallbackTypeEnumTests.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 InboundCallbackTypeEnum + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class InboundCallbackTypeEnumTests : IDisposable + { + private InboundCallbackTypeEnum instance; + + public InboundCallbackTypeEnumTests() + { + instance = new InboundCallbackTypeEnum(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of InboundCallbackTypeEnum + /// + [Fact] + public void InboundCallbackTypeEnumInstanceTest() + { + Assert.IsType(instance); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MmsMessageContentFileTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MmsMessageContentFileTests.cs new file mode 100644 index 00000000..5d9c89f2 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/MmsMessageContentFileTests.cs @@ -0,0 +1,67 @@ +/* + * 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 MmsMessageContentFile + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class MmsMessageContentFileTests : IDisposable + { + private MmsMessageContentFile instance; + + public MmsMessageContentFileTests() + { + instance = new MmsMessageContentFile( + fileUrl: "https://example.com/file.jpg" + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of MmsMessageContentFile + /// + [Fact] + public void MmsMessageContentFileInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'FileUrl' + /// + [Fact] + public void FileUrlTest() + { + Assert.IsType(instance.FileUrl); + Assert.Equal("https://example.com/file.jpg", instance.FileUrl); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelErrorTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelErrorTests.cs new file mode 100644 index 00000000..e3771d0c --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelErrorTests.cs @@ -0,0 +1,88 @@ +/* + * 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 MultiChannelError + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class MultiChannelErrorTests : IDisposable + { + private MultiChannelError instance; + + public MultiChannelErrorTests() + { + instance = new MultiChannelError( + links: new List(), + data: new Dictionary(), + errors: new List() + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of MultiChannelError + /// + [Fact] + public void MultiChannelErrorInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'Links' + /// + [Fact] + public void LinksTest() + { + Assert.IsType>(instance.Links); + Assert.NotEmpty(instance.Links); + } + + /// + /// Test the property 'Data' + /// + [Fact] + public void DataTest() + { + Assert.IsType>(instance.Data); + } + + /// + /// Test the property 'Errors' + /// + [Fact] + public void ErrorsTest() + { + Assert.IsType>(instance.Errors); + Assert.NotEmpty(instance.Errors); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageContentTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageContentTests.cs new file mode 100644 index 00000000..e47031a9 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageContentTests.cs @@ -0,0 +1,80 @@ +/* + * 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 MultiChannelMessageContent + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class MultiChannelMessageContentTests : IDisposable + { + private MultiChannelMessageContent instance; + + public MultiChannelMessageContentTests() + { + instance = new MultiChannelMessageContent( + text: "Sample text", + media: new RbmMessageContentFile( + fileUrl: "https://example.com/file.jpg" + ) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of MultiChannelMessageContent + /// + [Fact] + public void MultiChannelMessageContentInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'Text' + /// + [Fact] + public void TextTest() + { + Assert.IsType(instance.Text); + Assert.Equal("Sample text", instance.Text); + } + + /// + /// Test the property 'Media' + /// + [Fact] + public void MediaTest() + { + Assert.IsType(instance.Media); + Assert.Equal("https://example.com/file.jpg", instance.Media.FileUrl); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageResponseDataChannelListInnerTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageResponseDataChannelListInnerTests.cs new file mode 100644 index 00000000..728241bb --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageResponseDataChannelListInnerTests.cs @@ -0,0 +1,113 @@ +/* + * 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 MultiChannelMessageResponseDataChannelListInner + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class MultiChannelMessageResponseDataChannelListInnerTests : IDisposable + { + private MultiChannelMessageResponseDataChannelListInner instance; + + public MultiChannelMessageResponseDataChannelListInnerTests() + { + instance = new MultiChannelMessageResponseDataChannelListInner( + from: "1234567890", + applicationId: "app-1234567890", + channel: MultiChannelMessageChannelEnum.SMS, + content: new MultiChannelChannelListObjectContent( + new SmsMessageContent(text: "Test message") + ), + owner: "owner-1234567890" + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of MultiChannelMessageResponseDataChannelListInner + /// + [Fact] + public void MultiChannelMessageResponseDataChannelListInnerInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + Assert.IsType(instance.From); + Assert.Equal("1234567890", instance.From); + } + + /// + /// Test the property 'ApplicationId' + /// + [Fact] + public void ApplicationIdTest() + { + Assert.IsType(instance.ApplicationId); + Assert.Equal("app-1234567890", instance.ApplicationId); + } + + /// + /// Test the property 'Channel' + /// + [Fact] + public void ChannelTest() + { + Assert.IsType(instance.Channel); + Assert.Equal(MultiChannelMessageChannelEnum.SMS, instance.Channel); + } + + /// + /// Test the property 'Content' + /// + [Fact] + public void ContentTest() + { + Assert.IsType(instance.Content); + Assert.IsType(instance.Content.ActualInstance); + } + + /// + /// Test the property 'Owner' + /// + [Fact] + public void OwnerTest() + { + Assert.IsType(instance.Owner); + Assert.Equal("owner-1234567890", instance.Owner); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageResponseDataTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageResponseDataTests.cs new file mode 100644 index 00000000..1561c338 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageResponseDataTests.cs @@ -0,0 +1,143 @@ +/* + * 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 MultiChannelMessageResponseData + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class MultiChannelMessageResponseDataTests : IDisposable + { + private MultiChannelMessageResponseData instance; + + public MultiChannelMessageResponseDataTests() + { + instance = new MultiChannelMessageResponseData( + messageId: "msg-1234567890", + time: DateTime.Now, + direction: MessageDirectionEnum.In, + to: new List { "+15551234567" }, + channelList: new List{}, + tag: "test-tag", + priority: PriorityEnum.Default, + expiration: DateTime.UtcNow.AddHours(1) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of MultiChannelMessageResponseData + /// + [Fact] + public void MultiChannelMessageResponseDataInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'MessageId' + /// + [Fact] + public void MessageIdTest() + { + Assert.IsType(instance.MessageId); + Assert.Equal("msg-1234567890", instance.MessageId); + } + + /// + /// Test the property 'Time' + /// + [Fact] + public void TimeTest() + { + Assert.IsType(instance.Time); + Assert.NotEqual(DateTime.MinValue, instance.Time); + } + + /// + /// Test the property 'Direction' + /// + [Fact] + public void DirectionTest() + { + 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 { "+15551234567" }, instance.To); + } + + /// + /// Test the property 'ChannelList' + /// + [Fact] + public void ChannelListTest() + { + Assert.IsType>(instance.ChannelList); + } + + /// + /// Test the property 'Tag' + /// + [Fact] + public void TagTest() + { + Assert.IsType(instance.Tag); + Assert.Equal("test-tag", instance.Tag); + } + + /// + /// Test the property 'Priority' + /// + [Fact] + public void PriorityTest() + { + Assert.IsType(instance.Priority); + Assert.Equal(PriorityEnum.Default, instance.Priority); + } + + /// + /// Test the property 'Expiration' + /// + [Fact] + public void ExpirationTest() + { + Assert.IsType(instance.Expiration); + Assert.True(instance.Expiration > DateTime.UtcNow); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/RbmLocationResponseTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/RbmLocationResponseTests.cs new file mode 100644 index 00000000..8e8defa7 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/RbmLocationResponseTests.cs @@ -0,0 +1,78 @@ +/* + * 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 RbmLocationResponse + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class RbmLocationResponseTests : IDisposable + { + private RbmLocationResponse instance; + + public RbmLocationResponseTests() + { + instance = new RbmLocationResponse( + latitude: 37.7749, + longitude: -122.4194 + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of RbmLocationResponse + /// + [Fact] + public void RbmLocationResponseInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'Latitude' + /// + [Fact] + public void LatitudeTest() + { + Assert.IsType(instance.Latitude); + Assert.Equal(37.7749, instance.Latitude); + } + + /// + /// Test the property 'Longitude' + /// + [Fact] + public void LongitudeTest() + { + Assert.IsType(instance.Longitude); + Assert.Equal(-122.4194, instance.Longitude); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/RbmSuggestionResponseTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/RbmSuggestionResponseTests.cs new file mode 100644 index 00000000..017de23b --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/RbmSuggestionResponseTests.cs @@ -0,0 +1,78 @@ +/* + * 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 RbmSuggestionResponse + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class RbmSuggestionResponseTests : IDisposable + { + private RbmSuggestionResponse instance; + + public RbmSuggestionResponseTests() + { + instance = new RbmSuggestionResponse( + text: "Sample suggestion text", + postbackData: new byte[] { 1, 2, 3 } + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of RbmSuggestionResponse + /// + [Fact] + public void RbmSuggestionResponseInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'Text' + /// + [Fact] + public void TextTest() + { + Assert.IsType(instance.Text); + Assert.Equal("Sample suggestion text", instance.Text); + } + + /// + /// Test the property 'PostbackData' + /// + [Fact] + public void PostbackDataTest() + { + Assert.IsType(instance.PostbackData); + Assert.Equal(new byte[] { 1, 2, 3 }, instance.PostbackData); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/StatusCallbackMessageTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/StatusCallbackMessageTests.cs new file mode 100644 index 00000000..7ffb3c4f --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/StatusCallbackMessageTests.cs @@ -0,0 +1,199 @@ +/* + * 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 StatusCallbackMessage + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class StatusCallbackMessageTests : IDisposable + { + private StatusCallbackMessage instance; + + public StatusCallbackMessageTests() + { + instance = new StatusCallbackMessage( + id: "1661365814859loidf7mcwd4qacn7", + owner: "+15553332222", + applicationId: "93de2206-9669-4e07-948d-329f4b722ee2", + time: DateTime.Now, + segmentCount: 1, + direction: MessageDirectionEnum.In, + to: ["+15552223333"], + from: "+15553332222", + text: "Hello world", + tag: "custom string", + media: ["https://dev.bandwidth.com/images/bandwidth-logo.png"], + priority: PriorityEnum.Default, + channel: MultiChannelMessageChannelEnum.SMS + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of StatusCallbackMessage + /// + [Fact] + public void StatusCallbackMessageInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'Id' + /// + [Fact] + public void IdTest() + { + Assert.IsType(instance.Id); + Assert.NotEmpty(instance.Id); + } + + /// + /// Test the property 'Owner' + /// + [Fact] + public void OwnerTest() + { + Assert.IsType(instance.Owner); + Assert.NotEmpty(instance.Owner); + } + + /// + /// Test the property 'ApplicationId' + /// + [Fact] + public void ApplicationIdTest() + { + Assert.IsType(instance.ApplicationId); + Assert.NotEmpty(instance.ApplicationId); + } + + /// + /// Test the property 'Time' + /// + [Fact] + public void TimeTest() + { + Assert.IsType(instance.Time); + Assert.NotEqual(DateTime.MinValue, instance.Time); + } + + /// + /// Test the property 'SegmentCount' + /// + [Fact] + public void SegmentCountTest() + { + Assert.IsType(instance.SegmentCount); + Assert.Equal(1, instance.SegmentCount); + } + + /// + /// Test the property 'Direction' + /// + [Fact] + public void DirectionTest() + { + 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 { "+15552223333" }, 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("custom string", instance.Tag); + } + + /// + /// Test the property 'Media' + /// + [Fact] + public void MediaTest() + { + Assert.IsType>(instance.Media); + Assert.Equal(new List { "https://dev.bandwidth.com/images/bandwidth-logo.png" }, instance.Media); + } + + /// + /// Test the property 'Priority' + /// + [Fact] + public void PriorityTest() + { + Assert.IsType(instance.Priority); + Assert.Equal(PriorityEnum.Default, instance.Priority); + } + + /// + /// Test the property 'Channel' + /// + [Fact] + public void ChannelTest() + { + Assert.IsType(instance.Channel); + Assert.Equal(MultiChannelMessageChannelEnum.SMS, instance.Channel); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/StatusCallbackTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/StatusCallbackTests.cs new file mode 100644 index 00000000..93212262 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/StatusCallbackTests.cs @@ -0,0 +1,158 @@ +/* + * 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 StatusCallback + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class StatusCallbackTests : IDisposable + { + private StatusCallback instance; + + public StatusCallbackTests() + { + instance = new StatusCallback( + time: DateTime.Now, + eventTime: DateTime.Now, + type: StatusCallbackTypeEnum.Sending, + to: "1234567890", + description: "Test Status Callback", + message: new StatusCallbackMessage( + id: "1661365814859loidf7mcwd4qacn7", + owner: "+15553332222", + applicationId: "93de2206-9669-4e07-948d-329f4b722ee2", + time: DateTime.Now, + segmentCount: 1, + direction: MessageDirectionEnum.In, + to: ["+15552223333"], + from: "+15553332222", + text: "Hello world", + tag: "custom string", + media: ["https://dev.bandwidth.com/images/bandwidth-logo.png"], + priority: PriorityEnum.Default, + channel: MultiChannelMessageChannelEnum.SMS + ), + errorCode: 1234, + carrierName: "Test Carrier"); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of StatusCallback + /// + [Fact] + public void StatusCallbackInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'Time' + /// + [Fact] + public void TimeTest() + { + Assert.IsType(instance.Time); + } + + /// + /// Test the property 'EventTime' + /// + [Fact] + public void EventTimeTest() + { + Assert.IsType(instance.EventTime); + } + + /// + /// Test the property 'Type' + /// + [Fact] + public void TypeTest() + { + Assert.IsType(instance.Type); + Assert.Equal(StatusCallbackTypeEnum.Sending, instance.Type); + } + + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + Assert.IsType(instance.To); + Assert.Equal("1234567890", instance.To); + } + + /// + /// Test the property 'Description' + /// + [Fact] + public void DescriptionTest() + { + Assert.IsType(instance.Description); + Assert.Equal("Test Status Callback", instance.Description); + } + + /// + /// Test the property 'Message' + /// + [Fact] + public void MessageTest() + { + Assert.IsType(instance.Message); + Assert.NotNull(instance.Message); + Assert.Equal("1661365814859loidf7mcwd4qacn7", instance.Message.Id); + Assert.Equal("+15553332222", instance.Message.Owner); + Assert.Equal("93de2206-9669-4e07-948d-329f4b722ee2", instance.Message.ApplicationId); + } + + /// + /// Test the property 'ErrorCode' + /// + [Fact] + public void ErrorCodeTest() + { + Assert.IsType(instance.ErrorCode); + Assert.Equal(1234, instance.ErrorCode); + } + + /// + /// Test the property 'CarrierName' + /// + [Fact] + public void CarrierNameTest() + { + Assert.IsType(instance.CarrierName); + Assert.Equal("Test Carrier", instance.CarrierName); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/StatusCallbackTypeEnumTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/StatusCallbackTypeEnumTests.cs new file mode 100644 index 00000000..23e303bb --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/StatusCallbackTypeEnumTests.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 StatusCallbackTypeEnum + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class StatusCallbackTypeEnumTests : IDisposable + { + private StatusCallbackTypeEnum instance; + + public StatusCallbackTypeEnumTests() + { + instance = new StatusCallbackTypeEnum(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of StatusCallbackTypeEnum + /// + [Fact] + public void StatusCallbackTypeEnumInstanceTest() + { + Assert.IsType(instance); + } + } +} From 6b81e31625ebb9238778692e5c450bc87f21598a Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 5 Aug 2025 11:16:22 -0400 Subject: [PATCH 8/9] dont use collection expressions --- src/Bandwidth.Standard.Test/Unit/Model/CallbackTests.cs | 4 ++-- .../Unit/Model/InboundCallbackMessageTests.cs | 2 +- .../Unit/Model/InboundCallbackTests.cs | 2 +- .../Unit/Model/StatusCallbackMessageTests.cs | 2 +- src/Bandwidth.Standard.Test/Unit/Model/StatusCallbackTests.cs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Bandwidth.Standard.Test/Unit/Model/CallbackTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/CallbackTests.cs index 9808e0b4..910cd731 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/CallbackTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/CallbackTests.cs @@ -48,7 +48,7 @@ public CallbackTests() time: DateTime.Now, segmentCount: 1, direction: MessageDirectionEnum.In, - to: ["+15552223333"], + to: new List { "+15552223333" }, from: "+15553332222" ), carrierName: "Test Carrier" @@ -67,7 +67,7 @@ public CallbackTests() time: DateTime.Now, segmentCount: 1, direction: MessageDirectionEnum.In, - to: ["+15552223333"], + to: new List { "+15552223333" }, from: "+15553332222", text: "Hello world", tag: "custom string", diff --git a/src/Bandwidth.Standard.Test/Unit/Model/InboundCallbackMessageTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/InboundCallbackMessageTests.cs index 47e5af98..a1d9d19c 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/InboundCallbackMessageTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/InboundCallbackMessageTests.cs @@ -42,7 +42,7 @@ public InboundCallbackMessageTests() time: DateTime.Now, segmentCount: 1, direction: MessageDirectionEnum.In, - to: ["+15552223333"], + to: new List { "+15552223333" }, from: "+15553332222", text: "Test message text", tag: "TestTag", diff --git a/src/Bandwidth.Standard.Test/Unit/Model/InboundCallbackTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/InboundCallbackTests.cs index b9e7e3d2..cc2ba26e 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/InboundCallbackTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/InboundCallbackTests.cs @@ -47,7 +47,7 @@ public InboundCallbackTests() time: DateTime.Now, segmentCount: 1, direction: MessageDirectionEnum.In, - to: ["+15552223333"], + to: new List { "+15552223333" }, from: "+15553332222" ), carrierName: "Test Carrier" diff --git a/src/Bandwidth.Standard.Test/Unit/Model/StatusCallbackMessageTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/StatusCallbackMessageTests.cs index 7ffb3c4f..0153c325 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/StatusCallbackMessageTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/StatusCallbackMessageTests.cs @@ -42,7 +42,7 @@ public StatusCallbackMessageTests() time: DateTime.Now, segmentCount: 1, direction: MessageDirectionEnum.In, - to: ["+15552223333"], + to: new List { "+15552223333" }, from: "+15553332222", text: "Hello world", tag: "custom string", diff --git a/src/Bandwidth.Standard.Test/Unit/Model/StatusCallbackTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/StatusCallbackTests.cs index 93212262..131dacf3 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/StatusCallbackTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/StatusCallbackTests.cs @@ -48,7 +48,7 @@ public StatusCallbackTests() time: DateTime.Now, segmentCount: 1, direction: MessageDirectionEnum.In, - to: ["+15552223333"], + to: new List { "+15552223333" }, from: "+15553332222", text: "Hello world", tag: "custom string", From d3210abd73b6d3c829e93e9d87d595f6a4b6c9ab Mon Sep 17 00:00:00 2001 From: ckoegel Date: Tue, 5 Aug 2025 11:21:09 -0400 Subject: [PATCH 9/9] remove other collections expressions and empty whitespace --- .../Unit/Model/BridgeCompleteCallbackTests.cs | 2 +- .../Unit/Model/CallbackMethodEnumTests.cs | 2 +- .../Unit/Model/CallbackTests.cs | 16 ++++++++-------- .../Unit/Model/CreateCallTests.cs | 2 +- .../Unit/Model/CreateMessageRequestErrorTests.cs | 2 +- .../Unit/Model/MmsMessageContentTests.cs | 2 +- .../MultiChannelChannelListObjectContentTests.cs | 2 +- .../Unit/Model/StatusCallbackMessageTests.cs | 16 ++++++++-------- .../Unit/Model/StatusCallbackTests.cs | 16 ++++++++-------- .../Unit/Model/VerificationUpdateRequestTests.cs | 2 +- 10 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/Bandwidth.Standard.Test/Unit/Model/BridgeCompleteCallbackTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/BridgeCompleteCallbackTests.cs index 96ce86c6..b787e482 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/BridgeCompleteCallbackTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/BridgeCompleteCallbackTests.cs @@ -127,7 +127,7 @@ public void CallIdTest() { instance.CallId = "c-1234"; Assert.IsType(instance.CallId); - Assert.Equal("c-1234", instance.CallId); + Assert.Equal("c-1234", instance.CallId); } /// /// Test the property 'CallUrl' diff --git a/src/Bandwidth.Standard.Test/Unit/Model/CallbackMethodEnumTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/CallbackMethodEnumTests.cs index 09a1ae49..e189c5d3 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/CallbackMethodEnumTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/CallbackMethodEnumTests.cs @@ -47,7 +47,7 @@ public void CallbackMethodEnumInstanceTest() { Assert.IsType(instance); } - + } } diff --git a/src/Bandwidth.Standard.Test/Unit/Model/CallbackTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/CallbackTests.cs index 910cd731..9dedcc1e 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/CallbackTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/CallbackTests.cs @@ -61,17 +61,17 @@ public CallbackTests() to: "1234567890", description: "Test Status Callback", message: new StatusCallbackMessage( - id: "1661365814859loidf7mcwd4qacn7", - owner: "+15553332222", - applicationId: "93de2206-9669-4e07-948d-329f4b722ee2", + id: "1661365814859loidf7mcwd4qacn7", + owner: "+15553332222", + applicationId: "93de2206-9669-4e07-948d-329f4b722ee2", time: DateTime.Now, - segmentCount: 1, + segmentCount: 1, direction: MessageDirectionEnum.In, to: new List { "+15552223333" }, - from: "+15553332222", - text: "Hello world", - tag: "custom string", - media: ["https://dev.bandwidth.com/images/bandwidth-logo.png"], + from: "+15553332222", + text: "Hello world", + tag: "custom string", + media: new List { "https://dev.bandwidth.com/images/bandwidth-logo.png" }, priority: PriorityEnum.Default, channel: MultiChannelMessageChannelEnum.SMS ), diff --git a/src/Bandwidth.Standard.Test/Unit/Model/CreateCallTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/CreateCallTests.cs index 02d5be29..3c3f8182 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/CreateCallTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/CreateCallTests.cs @@ -109,7 +109,7 @@ public void DisplayNameTest() { Assert.IsType(instance.DisplayName); Assert.Equal("John Doe", instance.DisplayName); - } + } /// /// Test the property 'Uui' /// diff --git a/src/Bandwidth.Standard.Test/Unit/Model/CreateMessageRequestErrorTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/CreateMessageRequestErrorTests.cs index 95f17b46..893774d5 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/CreateMessageRequestErrorTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/CreateMessageRequestErrorTests.cs @@ -34,7 +34,7 @@ public CreateMessageRequestErrorTests() { fieldErrors = new List() { new FieldError( - fieldName: "from", + fieldName: "from", description: "`invalid` must be replaced with a valid E164 formatted telephone number" ) }; diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MmsMessageContentTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MmsMessageContentTests.cs index e28ea65d..3931982b 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/MmsMessageContentTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/MmsMessageContentTests.cs @@ -69,7 +69,7 @@ public void TextTest() [Fact] public void MediaTest() { - var mediaList = new List { + var mediaList = new List { new MmsMessageContentFile(fileUrl: "https://test.url/1"), new MmsMessageContentFile(fileUrl: "https://test.url/2") }; diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelChannelListObjectContentTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelChannelListObjectContentTests.cs index 5d5ec2d1..19f79db6 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelChannelListObjectContentTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelChannelListObjectContentTests.cs @@ -47,7 +47,7 @@ public MultiChannelChannelListObjectContentTests() postbackData: new byte[] { 1, 2, 3 } )) }; - + instanceRbmMessageContentText = new MultiChannelChannelListObjectContent(new RbmMessageContentText( text: "Test message", suggestions: suggestions diff --git a/src/Bandwidth.Standard.Test/Unit/Model/StatusCallbackMessageTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/StatusCallbackMessageTests.cs index 0153c325..032b7537 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/StatusCallbackMessageTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/StatusCallbackMessageTests.cs @@ -36,17 +36,17 @@ public class StatusCallbackMessageTests : IDisposable public StatusCallbackMessageTests() { instance = new StatusCallbackMessage( - id: "1661365814859loidf7mcwd4qacn7", - owner: "+15553332222", - applicationId: "93de2206-9669-4e07-948d-329f4b722ee2", + id: "1661365814859loidf7mcwd4qacn7", + owner: "+15553332222", + applicationId: "93de2206-9669-4e07-948d-329f4b722ee2", time: DateTime.Now, - segmentCount: 1, + segmentCount: 1, direction: MessageDirectionEnum.In, to: new List { "+15552223333" }, - from: "+15553332222", - text: "Hello world", - tag: "custom string", - media: ["https://dev.bandwidth.com/images/bandwidth-logo.png"], + from: "+15553332222", + text: "Hello world", + tag: "custom string", + media: new List { "https://dev.bandwidth.com/images/bandwidth-logo.png" }, priority: PriorityEnum.Default, channel: MultiChannelMessageChannelEnum.SMS ); diff --git a/src/Bandwidth.Standard.Test/Unit/Model/StatusCallbackTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/StatusCallbackTests.cs index 131dacf3..9a187b1a 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/StatusCallbackTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/StatusCallbackTests.cs @@ -42,17 +42,17 @@ public StatusCallbackTests() to: "1234567890", description: "Test Status Callback", message: new StatusCallbackMessage( - id: "1661365814859loidf7mcwd4qacn7", - owner: "+15553332222", - applicationId: "93de2206-9669-4e07-948d-329f4b722ee2", + id: "1661365814859loidf7mcwd4qacn7", + owner: "+15553332222", + applicationId: "93de2206-9669-4e07-948d-329f4b722ee2", time: DateTime.Now, - segmentCount: 1, + segmentCount: 1, direction: MessageDirectionEnum.In, to: new List { "+15552223333" }, - from: "+15553332222", - text: "Hello world", - tag: "custom string", - media: ["https://dev.bandwidth.com/images/bandwidth-logo.png"], + from: "+15553332222", + text: "Hello world", + tag: "custom string", + media: new List { "https://dev.bandwidth.com/images/bandwidth-logo.png" }, priority: PriorityEnum.Default, channel: MultiChannelMessageChannelEnum.SMS ), diff --git a/src/Bandwidth.Standard.Test/Unit/Model/VerificationUpdateRequestTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/VerificationUpdateRequestTests.cs index cb94b97e..a6ac9d5b 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/VerificationUpdateRequestTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/VerificationUpdateRequestTests.cs @@ -163,7 +163,7 @@ public void IsvResellerTest() Assert.IsType(instance.IsvReseller); Assert.Equal("test", instance.IsvReseller); } - + /// /// Test the property 'PrivacyPolicyUrl' ///