diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 3975034..5892894 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -20,6 +20,7 @@ docs/CallTranscriptionTrackEnum.md docs/CallbackMethodEnum.md docs/CallbackTypeEnum.md docs/CallsApi.md +docs/CardWidthEnum.md docs/CodeRequest.md docs/Conference.md docs/ConferenceCompletedCallback.md @@ -37,16 +38,19 @@ docs/CreateCall.md 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/FailureWebhook.md docs/FieldError.md docs/FileFormatEnum.md docs/GatherCallback.md docs/InitiateCallback.md +docs/Link.md docs/LinksObject.md docs/ListMessageDirectionEnum.md docs/ListMessageItem.md @@ -75,10 +79,37 @@ docs/MessagingRequestError.md docs/MfaForbiddenRequestError.md docs/MfaRequestError.md docs/MfaUnauthorizedRequestError.md +docs/MmsMessageContent.md +docs/MultiChannelAction.md +docs/MultiChannelActionCalendarEvent.md +docs/MultiChannelApi.md +docs/MultiChannelCallbackData.md +docs/MultiChannelChannelListObject.md +docs/MultiChannelChannelListObjectContent.md +docs/MultiChannelMessageCallbackData.md +docs/MultiChannelMessageChannelEnum.md +docs/MultiChannelMessageData.md +docs/MultiChannelMessageDirectionEnum.md +docs/MultiChannelMessageRequest.md +docs/MultiChannelStatusEnum.md docs/OptInWorkflow.md docs/PageInfo.md docs/PhoneNumberLookupApi.md docs/PriorityEnum.md +docs/RbmActionBase.md +docs/RbmActionDial.md +docs/RbmActionOpenUrl.md +docs/RbmActionTypeEnum.md +docs/RbmActionViewLocation.md +docs/RbmCardContent.md +docs/RbmCardContentMedia.md +docs/RbmMediaHeightEnum.md +docs/RbmMessageCarouselCard.md +docs/RbmMessageContentFile.md +docs/RbmMessageContentRichCard.md +docs/RbmMessageContentText.md +docs/RbmMessageMedia.md +docs/RbmStandaloneCard.md docs/RecordingAvailableCallback.md docs/RecordingCompleteCallback.md docs/RecordingStateEnum.md @@ -87,9 +118,10 @@ docs/RecordingTranscriptions.md docs/RecordingsApi.md docs/RedirectCallback.md docs/RedirectMethodEnum.md +docs/SmsMessageContent.md +docs/StandaloneCardOrientationEnum.md docs/StatisticsApi.md docs/StirShaken.md -docs/Tag.md docs/TelephoneNumber.md docs/TfvBasicAuthentication.md docs/TfvCallbackStatusEnum.md @@ -98,6 +130,7 @@ docs/TfvStatus.md docs/TfvStatusEnum.md docs/TfvSubmissionInfo.md docs/TfvSubmissionWrapper.md +docs/ThumbnailAlignmentEnum.md docs/TnLookupRequestError.md docs/TollFreeVerificationApi.md docs/TranscribeRecording.md @@ -130,6 +163,7 @@ src/Bandwidth.Standard/Api/ConferencesApi.cs src/Bandwidth.Standard/Api/MFAApi.cs src/Bandwidth.Standard/Api/MediaApi.cs src/Bandwidth.Standard/Api/MessagesApi.cs +src/Bandwidth.Standard/Api/MultiChannelApi.cs src/Bandwidth.Standard/Api/PhoneNumberLookupApi.cs src/Bandwidth.Standard/Api/RecordingsApi.cs src/Bandwidth.Standard/Api/StatisticsApi.cs @@ -169,6 +203,7 @@ src/Bandwidth.Standard/Model/CallTranscriptionResponse.cs src/Bandwidth.Standard/Model/CallTranscriptionTrackEnum.cs src/Bandwidth.Standard/Model/CallbackMethodEnum.cs src/Bandwidth.Standard/Model/CallbackTypeEnum.cs +src/Bandwidth.Standard/Model/CardWidthEnum.cs src/Bandwidth.Standard/Model/CodeRequest.cs src/Bandwidth.Standard/Model/Conference.cs src/Bandwidth.Standard/Model/ConferenceCompletedCallback.cs @@ -185,16 +220,19 @@ src/Bandwidth.Standard/Model/CreateCall.cs 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/FailureWebhook.cs src/Bandwidth.Standard/Model/FieldError.cs src/Bandwidth.Standard/Model/FileFormatEnum.cs src/Bandwidth.Standard/Model/GatherCallback.cs src/Bandwidth.Standard/Model/InitiateCallback.cs +src/Bandwidth.Standard/Model/Link.cs src/Bandwidth.Standard/Model/LinksObject.cs src/Bandwidth.Standard/Model/ListMessageDirectionEnum.cs src/Bandwidth.Standard/Model/ListMessageItem.cs @@ -220,9 +258,35 @@ src/Bandwidth.Standard/Model/MessagingRequestError.cs 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/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/MultiChannelMessageChannelEnum.cs +src/Bandwidth.Standard/Model/MultiChannelMessageData.cs +src/Bandwidth.Standard/Model/MultiChannelMessageDirectionEnum.cs +src/Bandwidth.Standard/Model/MultiChannelMessageRequest.cs +src/Bandwidth.Standard/Model/MultiChannelStatusEnum.cs src/Bandwidth.Standard/Model/OptInWorkflow.cs src/Bandwidth.Standard/Model/PageInfo.cs src/Bandwidth.Standard/Model/PriorityEnum.cs +src/Bandwidth.Standard/Model/RbmActionBase.cs +src/Bandwidth.Standard/Model/RbmActionDial.cs +src/Bandwidth.Standard/Model/RbmActionOpenUrl.cs +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/RbmMediaHeightEnum.cs +src/Bandwidth.Standard/Model/RbmMessageCarouselCard.cs +src/Bandwidth.Standard/Model/RbmMessageContentFile.cs +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/RecordingAvailableCallback.cs src/Bandwidth.Standard/Model/RecordingCompleteCallback.cs src/Bandwidth.Standard/Model/RecordingStateEnum.cs @@ -230,8 +294,9 @@ src/Bandwidth.Standard/Model/RecordingTranscriptionMetadata.cs src/Bandwidth.Standard/Model/RecordingTranscriptions.cs 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/StirShaken.cs -src/Bandwidth.Standard/Model/Tag.cs src/Bandwidth.Standard/Model/TelephoneNumber.cs src/Bandwidth.Standard/Model/TfvBasicAuthentication.cs src/Bandwidth.Standard/Model/TfvCallbackStatusEnum.cs @@ -240,6 +305,7 @@ src/Bandwidth.Standard/Model/TfvStatus.cs src/Bandwidth.Standard/Model/TfvStatusEnum.cs src/Bandwidth.Standard/Model/TfvSubmissionInfo.cs src/Bandwidth.Standard/Model/TfvSubmissionWrapper.cs +src/Bandwidth.Standard/Model/ThumbnailAlignmentEnum.cs src/Bandwidth.Standard/Model/TnLookupRequestError.cs src/Bandwidth.Standard/Model/TranscribeRecording.cs src/Bandwidth.Standard/Model/Transcription.cs diff --git a/Bandwidth.Standard.sln b/Bandwidth.Standard.sln index 79ea058..526910f 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", "{2B47638C-7484-4B48-9AD8-871EFEE340BD}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard", "src\Bandwidth.Standard\Bandwidth.Standard.csproj", "{CC6CF6E6-9388-4DCB-98C0-48F3EF382764}" 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 - {2B47638C-7484-4B48-9AD8-871EFEE340BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2B47638C-7484-4B48-9AD8-871EFEE340BD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2B47638C-7484-4B48-9AD8-871EFEE340BD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2B47638C-7484-4B48-9AD8-871EFEE340BD}.Release|Any CPU.Build.0 = Release|Any CPU + {CC6CF6E6-9388-4DCB-98C0-48F3EF382764}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CC6CF6E6-9388-4DCB-98C0-48F3EF382764}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CC6CF6E6-9388-4DCB-98C0-48F3EF382764}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CC6CF6E6-9388-4DCB-98C0-48F3EF382764}.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 3fb1c7c..7209899 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,7 @@ Class | Method | HTTP request | Description *MediaApi* | [**UploadMedia**](docs/MediaApi.md#uploadmedia) | **PUT** /users/{accountId}/media/{mediaId} | Upload Media *MessagesApi* | [**CreateMessage**](docs/MessagesApi.md#createmessage) | **POST** /users/{accountId}/messages | Create Message *MessagesApi* | [**ListMessages**](docs/MessagesApi.md#listmessages) | **GET** /users/{accountId}/messages | List Messages +*MultiChannelApi* | [**CreateMultiChannelMessage**](docs/MultiChannelApi.md#createmultichannelmessage) | **POST** /users/{accountId}/messages/multiChannel | Create Multi-Channel Message *PhoneNumberLookupApi* | [**CreateLookup**](docs/PhoneNumberLookupApi.md#createlookup) | **POST** /accounts/{accountId}/tnlookup | Create Lookup *PhoneNumberLookupApi* | [**GetLookupStatus**](docs/PhoneNumberLookupApi.md#getlookupstatus) | **GET** /accounts/{accountId}/tnlookup/{requestId} | Get Lookup Request Status *RecordingsApi* | [**DeleteRecording**](docs/RecordingsApi.md#deleterecording) | **DELETE** /accounts/{accountId}/calls/{callId}/recordings/{recordingId} | Delete Recording @@ -177,6 +178,7 @@ Class | Method | HTTP request | Description - [Model.CallTranscriptionTrackEnum](docs/CallTranscriptionTrackEnum.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) - [Model.ConferenceCompletedCallback](docs/ConferenceCompletedCallback.md) @@ -193,16 +195,19 @@ Class | Method | HTTP request | Description - [Model.CreateCallResponse](docs/CreateCallResponse.md) - [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.FailureWebhook](docs/FailureWebhook.md) - [Model.FieldError](docs/FieldError.md) - [Model.FileFormatEnum](docs/FileFormatEnum.md) - [Model.GatherCallback](docs/GatherCallback.md) - [Model.InitiateCallback](docs/InitiateCallback.md) + - [Model.Link](docs/Link.md) - [Model.LinksObject](docs/LinksObject.md) - [Model.ListMessageDirectionEnum](docs/ListMessageDirectionEnum.md) - [Model.ListMessageItem](docs/ListMessageItem.md) @@ -228,9 +233,35 @@ Class | Method | HTTP request | Description - [Model.MfaForbiddenRequestError](docs/MfaForbiddenRequestError.md) - [Model.MfaRequestError](docs/MfaRequestError.md) - [Model.MfaUnauthorizedRequestError](docs/MfaUnauthorizedRequestError.md) + - [Model.MmsMessageContent](docs/MmsMessageContent.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.MultiChannelMessageChannelEnum](docs/MultiChannelMessageChannelEnum.md) + - [Model.MultiChannelMessageData](docs/MultiChannelMessageData.md) + - [Model.MultiChannelMessageDirectionEnum](docs/MultiChannelMessageDirectionEnum.md) + - [Model.MultiChannelMessageRequest](docs/MultiChannelMessageRequest.md) + - [Model.MultiChannelStatusEnum](docs/MultiChannelStatusEnum.md) - [Model.OptInWorkflow](docs/OptInWorkflow.md) - [Model.PageInfo](docs/PageInfo.md) - [Model.PriorityEnum](docs/PriorityEnum.md) + - [Model.RbmActionBase](docs/RbmActionBase.md) + - [Model.RbmActionDial](docs/RbmActionDial.md) + - [Model.RbmActionOpenUrl](docs/RbmActionOpenUrl.md) + - [Model.RbmActionTypeEnum](docs/RbmActionTypeEnum.md) + - [Model.RbmActionViewLocation](docs/RbmActionViewLocation.md) + - [Model.RbmCardContent](docs/RbmCardContent.md) + - [Model.RbmCardContentMedia](docs/RbmCardContentMedia.md) + - [Model.RbmMediaHeightEnum](docs/RbmMediaHeightEnum.md) + - [Model.RbmMessageCarouselCard](docs/RbmMessageCarouselCard.md) + - [Model.RbmMessageContentFile](docs/RbmMessageContentFile.md) + - [Model.RbmMessageContentRichCard](docs/RbmMessageContentRichCard.md) + - [Model.RbmMessageContentText](docs/RbmMessageContentText.md) + - [Model.RbmMessageMedia](docs/RbmMessageMedia.md) + - [Model.RbmStandaloneCard](docs/RbmStandaloneCard.md) - [Model.RecordingAvailableCallback](docs/RecordingAvailableCallback.md) - [Model.RecordingCompleteCallback](docs/RecordingCompleteCallback.md) - [Model.RecordingStateEnum](docs/RecordingStateEnum.md) @@ -238,8 +269,9 @@ Class | Method | HTTP request | Description - [Model.RecordingTranscriptions](docs/RecordingTranscriptions.md) - [Model.RedirectCallback](docs/RedirectCallback.md) - [Model.RedirectMethodEnum](docs/RedirectMethodEnum.md) + - [Model.SmsMessageContent](docs/SmsMessageContent.md) + - [Model.StandaloneCardOrientationEnum](docs/StandaloneCardOrientationEnum.md) - [Model.StirShaken](docs/StirShaken.md) - - [Model.Tag](docs/Tag.md) - [Model.TelephoneNumber](docs/TelephoneNumber.md) - [Model.TfvBasicAuthentication](docs/TfvBasicAuthentication.md) - [Model.TfvCallbackStatusEnum](docs/TfvCallbackStatusEnum.md) @@ -248,6 +280,7 @@ Class | Method | HTTP request | Description - [Model.TfvStatusEnum](docs/TfvStatusEnum.md) - [Model.TfvSubmissionInfo](docs/TfvSubmissionInfo.md) - [Model.TfvSubmissionWrapper](docs/TfvSubmissionWrapper.md) + - [Model.ThumbnailAlignmentEnum](docs/ThumbnailAlignmentEnum.md) - [Model.TnLookupRequestError](docs/TnLookupRequestError.md) - [Model.TranscribeRecording](docs/TranscribeRecording.md) - [Model.Transcription](docs/Transcription.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 7d2dbf3..dfe5cb8 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -14,6 +14,7 @@ security: tags: - name: Messages - name: Media +- name: Multi-Channel - name: Calls - name: Conferences - name: Recordings @@ -684,6 +685,89 @@ paths: servers: - description: Production url: https://messaging.bandwidth.com/api/v2 + /users/{accountId}/messages/multiChannel: + post: + callbacks: + multiChannelCallback: + $ref: '#/components/callbacks/multiChannelMessageCallback' + description: Endpoint for sending Multi-Channel messages. + operationId: createMultiChannelMessage + parameters: + - description: Your Bandwidth Account ID. + example: "9900000" + explode: false + in: path + name: accountId + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/createMultiChannelMessageRequest' + responses: + "202": + content: + application/json: + schema: + $ref: '#/components/schemas/createMultiChannelMessageResponse' + description: Accepted + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/createMessageRequestError' + description: Bad Request + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/messagingRequestError' + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: '#/components/schemas/messagingRequestError' + description: Forbidden + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/messagingRequestError' + description: Not Found + "406": + content: + application/json: + schema: + $ref: '#/components/schemas/messagingRequestError' + description: Not Acceptable + "415": + content: + application/json: + schema: + $ref: '#/components/schemas/messagingRequestError' + description: Unsupported Media Type + "429": + content: + application/json: + schema: + $ref: '#/components/schemas/messagingRequestError' + description: Too Many Requests + "500": + content: + application/json: + schema: + $ref: '#/components/schemas/messagingRequestError' + description: Internal Server Error + summary: Create Multi-Channel Message + tags: + - Multi-Channel + x-badges: + - name: Beta + color: '#076EA8' + servers: + - description: Production + url: https://messaging.bandwidth.com/api/v2 /accounts/{accountId}/calls: get: description: |- @@ -5393,6 +5477,19 @@ components: 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 tfVerificationStatus: your_url.com/webhookService: post: @@ -6249,6 +6346,12 @@ components: schema: $ref: '#/components/schemas/messageRequest' required: true + createMultiChannelMessageRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/multiChannelMessageRequest' + required: true uploadMediaRequest: content: application/json: @@ -6585,6 +6688,12 @@ components: schema: $ref: '#/components/schemas/message' description: Accepted + createMultiChannelMessageResponse: + content: + application/json: + schema: + $ref: '#/components/schemas/createMultiChannelMessageResponse' + description: Accepted listMessagesResponse: content: application/json: @@ -7141,6 +7250,11 @@ components: $ref: '#/components/schemas/tfvError' description: Service Unavailable schemas: + 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 callbackTypeEnum: description: | Indicates the type of the callback: @@ -7154,10 +7268,7 @@ components: example: message-delivered type: string priorityEnum: - description: |- - The priority specified by the user. - - Not supported on MMS. + description: The priority specified by the user. enum: - default - high @@ -7427,6 +7538,10 @@ components: - type title: CreateMessageRequestError type: object + messageId: + description: The ID of the message. + example: 1589228074636lm4k2je7j7jklbn2 + type: string media: example: contentLength: 0 @@ -7442,13 +7557,11 @@ components: title: Media type: object tag: - properties: - key: - type: string - value: - type: string + description: A custom string that will be included in callback events of the + message. Max 1024 characters. + example: custom string title: Tag - type: object + type: string deferredResult: properties: result: @@ -7457,6 +7570,13 @@ components: 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\ + \ 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 message: example: owner: "+15554443333" @@ -7533,7 +7653,9 @@ components: priority: $ref: '#/components/schemas/priorityEnum' expiration: - description: The expiration date-time set by the user. + 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 @@ -7587,13 +7709,14 @@ components: 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' 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. - Not supported on MMS. + 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 @@ -7603,6 +7726,593 @@ components: - to title: MessageRequest type: object + messageText: + description: The contents of the text message. Must be 2048 characters or less. + example: Hello world + maxLength: 2048 + type: string + messageMedia: + 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 + type: array + createMultiChannelMessageResponse: + example: + data: + channel: RBM + messageId: 1589228074636lm4k2je7j7jklbn2 + from: BandwidthRBM + time: 2025-01-01T18:20:16Z + to: "+15552223333" + tag: custom string + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + status: DELIVERED + direction: OUTBOUND + links: + - rel: rel + href: href + - rel: rel + href: href + errors: + - code: code + message: message + - code: code + message: message + properties: + links: + items: + $ref: '#/components/schemas/link' + type: array + data: + $ref: '#/components/schemas/multiChannelMessageData' + 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: + enum: + - INBOUND + - OUTBOUND + example: OUTBOUND + type: string + multiChannelSenderId: + description: The sender ID of the message. This could be an alphanumeric sender + ID. + example: BandwidthRBM + type: string + multiChannelDestination: + description: The phone number the message should be sent to in E164 format. + example: "+15552223333" + type: string + rbmMessageContentText: + properties: + text: + description: The text associated with the message. Must be 3270 characters + or less + example: Hello world + maxLength: 3270 + type: string + suggestions: + description: An array of suggested actions for the recipient. + items: + $ref: '#/components/schemas/multiChannelAction' + maxItems: 11 + type: array + required: + - text + title: RBM Text + type: object + rbmMediaHeightEnum: + description: The height of the media. + enum: + - SHORT + - MEDIUM + - TALL + example: SHORT + type: string + rbmMessageContentFile: + properties: + fileUrl: + description: The URL of the media file. 100MB is the maximum file size. + example: https://dev.bandwidth.com/images/bandwidth-logo.png + format: uri + maxLength: 1000 + type: string + thumbnailUrl: + description: The URL of the thumbnail image. Applies only to video file + media. + example: https://dev.bandwidth.com/images/bandwidth-logo.png + format: uri + maxLength: 1000 + type: string + required: + - fileUrl + title: RBM Rich Media File + type: object + rbmMessageMedia: + properties: + media: + $ref: '#/components/schemas/rbmMessageContentFile' + suggestions: + description: An array of suggested actions for the recipient. + items: + $ref: '#/components/schemas/multiChannelAction' + maxItems: 11 + type: array + required: + - media + title: RBM Media + type: object + rbmCardContent: + properties: + title: + description: The title of the card. Must be 200 characters or less. + example: Bandwidth + maxLength: 200 + type: string + description: + description: The description of the card. Must be 2000 characters or less. + example: Bandwidth is a communications platform as a service (CPaaS) company. + maxLength: 2000 + type: string + media: + $ref: '#/components/schemas/rbmCardContent_media' + suggestions: + description: An array of suggested actions for the recipient that will be + displayed on the rich card. + items: + $ref: '#/components/schemas/multiChannelAction' + maxItems: 4 + type: array + type: object + rbmStandaloneCard: + properties: + orientation: + $ref: '#/components/schemas/standaloneCardOrientationEnum' + thumbnailImageAlignment: + $ref: '#/components/schemas/thumbnailAlignmentEnum' + cardContent: + $ref: '#/components/schemas/rbmCardContent' + suggestions: + description: An array of suggested actions for the recipient. + items: + $ref: '#/components/schemas/multiChannelAction' + maxItems: 11 + type: array + required: + - cardContent + - orientation + - thumbnailImageAlignment + title: Standalone Card + type: object + standaloneCardOrientationEnum: + enum: + - HORIZONTAL + - VERTICAL + example: VERTICAL + type: string + thumbnailAlignmentEnum: + description: The alignment of the thumbnail image in the card. Only applicable + if the card using horizontal orientation. + enum: + - LEFT + - RIGHT + example: LEFT + type: string + rbmMessageCarouselCard: + properties: + cardWidth: + $ref: '#/components/schemas/cardWidthEnum' + cardContents: + items: + $ref: '#/components/schemas/rbmCardContent' + maxItems: 10 + type: array + suggestions: + description: An array of suggested actions for the recipient. + items: + $ref: '#/components/schemas/multiChannelAction' + maxItems: 11 + type: array + required: + - cardContents + - cardWidth + title: Carousel + type: object + cardWidthEnum: + enum: + - SMALL + - MEDIUM + example: SMALL + type: string + smsMessageContent: + properties: + text: + description: The contents of the text message. Must be 2048 characters or + less. + example: Hello world + maxLength: 2048 + type: string + required: + - text + title: SMS Text + type: object + mmsMessageContent: + properties: + text: + description: The contents of the text message. Must be 2048 characters or + less. + example: Hello world + 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 + type: array + title: MMS Message + type: object + rbmMessageContentRichCard: + oneOf: + - $ref: '#/components/schemas/rbmStandaloneCard' + - $ref: '#/components/schemas/rbmMessageCarouselCard' + title: RBM Rich Card + rbmActionTypeEnum: + enum: + - REPLY + - DIAL_PHONE + - SHOW_LOCATION + - CREATE_CALENDAR_EVENT + - OPEN_URL + - REQUEST_LOCATION + example: REPLY + type: string + rbmActionText: + description: Displayed text for user to click + example: Hello world + maxLength: 25 + title: Text + type: string + rbmActionPostBackData: + description: Base64 payload the customer receives when the reply is clicked. + example: !!binary |- + U0dWc2JHOGdkMjl5YkdRPQ== + format: byte + maxLength: 2048 + title: Post Back Data + type: string + rbmActionBase: + properties: + type: + $ref: '#/components/schemas/rbmActionTypeEnum' + text: + description: Displayed text for user to click + example: Hello world + maxLength: 25 + title: Text + type: string + 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 + required: + - postBackData + - text + - type + type: object + rbmActionDial: + allOf: + - $ref: '#/components/schemas/rbmActionBase' + - properties: + phoneNumber: + description: The phone number to dial. Must be E164 format. + example: "+15552223333" + type: string + required: + - phoneNumber + title: Dial Phone + type: object + rbmActionViewLocation: + allOf: + - $ref: '#/components/schemas/rbmActionBase' + - properties: + latitude: + description: The latitude of the location. + example: "37.7749" + format: double + type: string + longitude: + description: The longitude of the location. + example: "-122.4194" + format: double + type: string + label: + description: The label of the location. + example: San Francisco + maxLength: 100 + type: string + required: + - latitude + - longitude + title: Show Location + type: object + multiChannelActionCalendarEvent: + allOf: + - $ref: '#/components/schemas/rbmActionBase' + - properties: + title: + description: The title of the event. + example: Meeting with John + maxLength: 100 + type: string + startTime: + description: The start time of the event. + example: 2022-09-14T18:20:16Z + format: date-time + type: string + endTime: + description: The end time of the event. + example: 2022-09-14T18:20:16Z + format: date-time + type: string + description: + description: The description of the event. + example: Discuss the new project + maxLength: 500 + type: string + required: + - endTime + - startTime + - title + title: Calendar Event + type: object + rbmActionOpenUrl: + allOf: + - $ref: '#/components/schemas/rbmActionBase' + - properties: + url: + description: The URL to open in browser. + example: https://dev.bandwidth.com + format: uri + maxLength: 2048 + type: string + required: + - url + title: Open URL + type: object + multiChannelFullActions: + description: An array of suggested actions for the recipient. + items: + $ref: '#/components/schemas/multiChannelAction' + maxItems: 11 + type: array + multiChannelAction: + discriminator: + mapping: + REPLY: '#/components/schemas/rbmActionBase' + DIAL_PHONE: '#/components/schemas/rbmActionDial' + SHOW_LOCATION: '#/components/schemas/rbmActionViewLocation' + CREATE_CALENDAR_EVENT: '#/components/schemas/multiChannelActionCalendarEvent' + OPEN_URL: '#/components/schemas/rbmActionOpenUrl' + REQUEST_LOCATION: '#/components/schemas/rbmActionBase' + propertyName: type + oneOf: + - $ref: '#/components/schemas/rbmActionBase' + - $ref: '#/components/schemas/rbmActionDial' + - $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: + description: The sender ID of the message. This could be an alphanumeric + sender ID. + example: BandwidthRBM + 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' + content: + $ref: '#/components/schemas/multiChannelChannelListObject_content' + required: + - applicationId + - channel + - content + - from + type: object + multiChannelMessageRequest: + description: Multi-Channel Message Request + properties: + to: + description: The phone number the message should be sent to in E164 format. + example: "+15552223333" + type: string + 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/multiChannelChannelListObject' + 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 + 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 + required: + - 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: + example: + channel: RBM + messageId: 1589228074636lm4k2je7j7jklbn2 + from: BandwidthRBM + time: 2025-01-01T18:20:16Z + to: "+15552223333" + tag: custom string + applicationId: 93de2206-9669-4e07-948d-329f4b722ee2 + status: DELIVERED + direction: OUTBOUND + 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 + 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 + multiChannelCallbackData: + properties: + time: + description: The time of the callback event. + example: 2025-01-01T18:20:16Z + 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 + type: string + message: + $ref: '#/components/schemas/multiChannelMessageCallbackData' + type: object + link: + example: + rel: rel + href: href + properties: + rel: + type: string + href: + type: string + type: object + errorObject: + example: + code: code + message: message + properties: + code: + type: string + message: + type: string + type: object messageCallback: description: Message Callback Schema properties: @@ -10801,7 +11511,7 @@ components: description: The user account associated with the call. example: "9900000" type: string - applicationId: + applicationId1: description: The id of the application associated with the call. example: 04e88489-df02-4e34-a0ee-27a91849555f type: string @@ -12255,6 +12965,23 @@ components: nullable: true pattern: "^[ -~]{16,64}$" type: string + rbmCardContent_media: + allOf: + - $ref: '#/components/schemas/rbmMessageContentFile' + - properties: + height: + $ref: '#/components/schemas/rbmMediaHeightEnum' + type: object + required: + - height + multiChannelChannelListObject_content: + description: The content of the message. + oneOf: + - $ref: '#/components/schemas/rbmMessageContentText' + - $ref: '#/components/schemas/rbmMessageMedia' + - $ref: '#/components/schemas/rbmMessageContentRichCard' + - $ref: '#/components/schemas/smsMessageContent' + - $ref: '#/components/schemas/mmsMessageContent' 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 8f3d160..0a0121c 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -12,6 +12,7 @@ security: tags: - name: Messages - name: Media + - name: Multi-Channel - name: Calls - name: Conferences - name: Recordings @@ -234,6 +235,43 @@ paths: statusCallback: $ref: '#/components/callbacks/statusCallback' servers: *ref_0 + /users/{accountId}/messages/multiChannel: + post: + summary: Create Multi-Channel Message + description: Endpoint for sending Multi-Channel messages. + operationId: createMultiChannelMessage + parameters: + - $ref: '#/components/parameters/accountId' + tags: + - Multi-Channel + requestBody: + $ref: '#/components/requestBodies/createMultiChannelMessageRequest' + responses: + '202': + $ref: '#/components/responses/createMultiChannelMessageResponse' + '400': + $ref: '#/components/responses/createMessageBadRequestError' + '401': + $ref: '#/components/responses/messagingUnauthorizedError' + '403': + $ref: '#/components/responses/messagingForbiddenError' + '404': + $ref: '#/components/responses/messagingNotFoundError' + '406': + $ref: '#/components/responses/messagingNotAcceptableError' + '415': + $ref: '#/components/responses/messagingInvalidMediaTypeError' + '429': + $ref: '#/components/responses/messagingTooManyRequestsError' + '500': + $ref: '#/components/responses/messagingInternalServerError' + callbacks: + multiChannelCallback: + $ref: '#/components/callbacks/multiChannelMessageCallback' + x-badges: + - name: Beta + color: '#076EA8' + servers: *ref_0 /accounts/{accountId}/calls: post: tags: @@ -1595,6 +1633,12 @@ paths: servers: *ref_4 components: schemas: + applicationId: + type: string + 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 callbackTypeEnum: type: string enum: @@ -1612,10 +1656,7 @@ components: example: message-delivered priorityEnum: type: string - description: |- - The priority specified by the user. - - Not supported on MMS. + description: The priority specified by the user. enum: - default - high @@ -1808,6 +1849,10 @@ components: required: - type - description + messageId: + type: string + description: The ID of the message. + example: 1589228074636lm4k2je7j7jklbn2 media: title: Media type: object @@ -1820,12 +1865,11 @@ components: type: string tag: title: Tag - type: object - properties: - key: - type: string - value: - type: string + type: string + description: >- + A custom string that will be included in callback events of the message. + Max 1024 characters. + example: custom string deferredResult: title: DeferredResult type: object @@ -1834,6 +1878,15 @@ components: type: object setOrExpired: type: boolean + expiration: + type: string + format: date-time + 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' message: title: Message type: object @@ -1898,10 +1951,7 @@ components: priority: $ref: '#/components/schemas/priorityEnum' expiration: - type: string - format: date-time - description: The expiration date-time set by the user. - example: '2021-02-01T11:29:18-05:00' + $ref: '#/components/schemas/expiration' messageRequest: title: MessageRequest type: object @@ -1937,44 +1987,489 @@ components: plus +, underscore _ and ampersand &. Alphanumeric Sender IDs must contain at least one letter. example: '+15551113333' + text: + $ref: '#/components/schemas/messageText' + media: + $ref: '#/components/schemas/messageMedia' + tag: + $ref: '#/components/schemas/tag' + priority: + $ref: '#/components/schemas/priorityEnum' + expiration: + $ref: '#/components/schemas/expiration' + messageText: + type: string + description: The contents of the text message. Must be 2048 characters or less. + maxLength: 2048 + example: Hello world + messageMedia: + type: array + items: + type: string + format: uri + maxLength: 4096 + 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 + createMultiChannelMessageResponse: + type: object + properties: + links: + type: array + items: + $ref: '#/components/schemas/link' + data: + $ref: '#/components/schemas/multiChannelMessageData' + errors: + type: array + items: + $ref: '#/components/schemas/errorObject' + multiChannelMessageChannelEnum: + description: The channel of the multi-channel message. + type: string + enum: + - RBM + - 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. + example: BandwidthRBM + multiChannelDestination: + type: string + description: The phone number the message should be sent to in E164 format. + example: '+15552223333' + rbmMessageContentText: + title: RBM Text + type: object + properties: text: type: string - description: The contents of the text message. Must be 2048 characters or less. - maxLength: 2048 + description: >- + The text associated with the message. Must be 3270 characters or + less + maxLength: 3270 example: Hello world + suggestions: + $ref: '#/components/schemas/multiChannelFullActions' + required: + - text + rbmMediaHeightEnum: + type: string + description: The height of the media. + enum: + - SHORT + - MEDIUM + - TALL + example: SHORT + rbmMessageContentFile: + title: RBM Rich Media File + type: object + properties: + fileUrl: + type: string + format: uri + description: The URL of the media file. 100MB is the maximum file size. + example: https://dev.bandwidth.com/images/bandwidth-logo.png + maxLength: 1000 + thumbnailUrl: + type: string + format: uri + description: The URL of the thumbnail image. Applies only to video file media. + example: https://dev.bandwidth.com/images/bandwidth-logo.png + maxLength: 1000 + required: + - fileUrl + rbmMessageMedia: + title: RBM Media + type: object + properties: media: + $ref: '#/components/schemas/rbmMessageContentFile' + suggestions: + $ref: '#/components/schemas/multiChannelFullActions' + required: + - media + rbmCardContent: + type: object + properties: + title: + type: string + description: The title of the card. Must be 200 characters or less. + maxLength: 200 + example: Bandwidth + description: + type: string + description: The description of the card. Must be 2000 characters or less. + maxLength: 2000 + example: Bandwidth is a communications platform as a service (CPaaS) company. + media: + allOf: + - $ref: '#/components/schemas/rbmMessageContentFile' + - type: object + properties: + height: + $ref: '#/components/schemas/rbmMediaHeightEnum' + required: + - height + suggestions: + description: >- + An array of suggested actions for the recipient that will be + displayed on the rich card. type: array items: - type: string - format: uri - maxLength: 4096 + $ref: '#/components/schemas/multiChannelAction' + maxItems: 4 + rbmStandaloneCard: + title: Standalone Card + type: object + properties: + orientation: + $ref: '#/components/schemas/standaloneCardOrientationEnum' + thumbnailImageAlignment: + $ref: '#/components/schemas/thumbnailAlignmentEnum' + cardContent: + $ref: '#/components/schemas/rbmCardContent' + suggestions: + $ref: '#/components/schemas/multiChannelFullActions' + required: + - orientation + - thumbnailImageAlignment + - cardContent + standaloneCardOrientationEnum: + type: string + enum: + - HORIZONTAL + - VERTICAL + example: VERTICAL + thumbnailAlignmentEnum: + type: string + description: >- + The alignment of the thumbnail image in the card. Only applicable if the + card using horizontal orientation. + enum: + - LEFT + - RIGHT + example: LEFT + rbmMessageCarouselCard: + title: Carousel + type: object + properties: + cardWidth: + $ref: '#/components/schemas/cardWidthEnum' + cardContents: + type: array + items: + $ref: '#/components/schemas/rbmCardContent' + maxItems: 10 + suggestions: + $ref: '#/components/schemas/multiChannelFullActions' + required: + - cardContents + - cardWidth + cardWidthEnum: + type: string + enum: + - SMALL + - MEDIUM + example: SMALL + smsMessageContent: + title: SMS Text + type: object + properties: + text: + $ref: '#/components/schemas/messageText' + required: + - text + mmsMessageContent: + title: MMS Message + type: object + properties: + text: + $ref: '#/components/schemas/messageText' + media: + $ref: '#/components/schemas/messageMedia' + rbmMessageContentRichCard: + title: RBM Rich Card + oneOf: + - $ref: '#/components/schemas/rbmStandaloneCard' + - $ref: '#/components/schemas/rbmMessageCarouselCard' + rbmActionTypeEnum: + type: string + enum: + - REPLY + - DIAL_PHONE + - SHOW_LOCATION + - CREATE_CALENDAR_EVENT + - OPEN_URL + - REQUEST_LOCATION + example: REPLY + rbmActionText: + title: Text + type: string + description: Displayed text for user to click + maxLength: 25 + example: Hello world + rbmActionPostBackData: + title: Post Back Data + type: string + format: byte + description: Base64 payload the customer receives when the reply is clicked. + maxLength: 2048 + example: SGVsbG8gd29ybGQ= + rbmActionBase: + type: object + properties: + type: + $ref: '#/components/schemas/rbmActionTypeEnum' + text: + $ref: '#/components/schemas/rbmActionText' + postBackData: + $ref: '#/components/schemas/rbmActionPostBackData' + required: + - text + - postBackData + - type + rbmActionDial: + allOf: + - $ref: '#/components/schemas/rbmActionBase' + - title: Dial Phone + type: object + properties: + phoneNumber: + type: string + description: The phone number to dial. Must be E164 format. + example: '+15552223333' + required: + - phoneNumber + rbmActionViewLocation: + allOf: + - $ref: '#/components/schemas/rbmActionBase' + - title: Show Location + type: object + properties: + latitude: + type: string + format: double + description: The latitude of the location. + example: '37.7749' + longitude: + type: string + format: double + description: The longitude of the location. + example: '-122.4194' + label: + type: string + description: The label of the location. + example: San Francisco + maxLength: 100 + required: + - latitude + - longitude + multiChannelActionCalendarEvent: + allOf: + - $ref: '#/components/schemas/rbmActionBase' + - title: Calendar Event + type: object + properties: + title: + type: string + description: The title of the event. + example: Meeting with John + maxLength: 100 + startTime: + type: string + format: date-time + description: The start time of the event. + example: 2022-09-14T18:20:16.000Z + endTime: + type: string + format: date-time + description: The end time of the event. + example: 2022-09-14T18:20:16.000Z + description: + type: string + description: The description of the event. + example: Discuss the new project + maxLength: 500 + required: + - title + - startTime + - endTime + rbmActionOpenUrl: + allOf: + - $ref: '#/components/schemas/rbmActionBase' + - title: Open URL + type: object + properties: + url: + type: string + format: uri + description: The URL to open in browser. + example: https://dev.bandwidth.com + maxLength: 2048 + required: + - url + multiChannelFullActions: + type: array + description: An array of suggested actions for the recipient. + items: + $ref: '#/components/schemas/multiChannelAction' + maxItems: 11 + multiChannelAction: + oneOf: + - $ref: '#/components/schemas/rbmActionBase' + - $ref: '#/components/schemas/rbmActionDial' + - $ref: '#/components/schemas/rbmActionViewLocation' + - $ref: '#/components/schemas/multiChannelActionCalendarEvent' + - $ref: '#/components/schemas/rbmActionOpenUrl' + discriminator: + propertyName: type + mapping: + REPLY: '#/components/schemas/rbmActionBase' + DIAL_PHONE: '#/components/schemas/rbmActionDial' + SHOW_LOCATION: '#/components/schemas/rbmActionViewLocation' + 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: + from: + $ref: '#/components/schemas/multiChannelSenderId' + applicationId: + $ref: '#/components/schemas/applicationId' + channel: + $ref: '#/components/schemas/multiChannelMessageChannelEnum' + content: + description: The content of the message. + oneOf: + - $ref: '#/components/schemas/rbmMessageContentText' + - $ref: '#/components/schemas/rbmMessageMedia' + - $ref: '#/components/schemas/rbmMessageContentRichCard' + - $ref: '#/components/schemas/smsMessageContent' + - $ref: '#/components/schemas/mmsMessageContent' + required: + - from + - applicationId + - channel + - content + multiChannelMessageRequest: + description: Multi-Channel Message Request + type: object + properties: + to: + $ref: '#/components/schemas/multiChannelDestination' + channelList: + type: array 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 + 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/multiChannelChannelListObject' + maxItems: 4 tag: - type: string - description: >- - A custom string that will be included in callback events of the - message. Max 1024 characters. - example: custom string + $ref: '#/components/schemas/tag' priority: $ref: '#/components/schemas/priorityEnum' expiration: + $ref: '#/components/schemas/expiration' + 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: + 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 - 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. - - Not supported on MMS. - example: '2021-02-01T11:29:18-05:00' + example: 2025-01-01T18:20:16.000Z + 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' + multiChannelCallbackData: + 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: + type: string + example: Incoming message received + message: + $ref: '#/components/schemas/multiChannelMessageCallbackData' + link: + type: object + properties: + rel: + type: string + href: + type: string + errorObject: + type: object + properties: + code: + type: string + message: + type: string messageCallback: description: Message Callback Schema type: object @@ -2796,7 +3291,7 @@ components: type: object properties: applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' accountId: $ref: '#/components/schemas/accountId' callId: @@ -3404,7 +3899,7 @@ components: accountId: $ref: '#/components/schemas/accountId' applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' from: $ref: '#/components/schemas/from' to: @@ -3441,7 +3936,7 @@ components: accountId: $ref: '#/components/schemas/accountId' applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' from: $ref: '#/components/schemas/from' to: @@ -3481,7 +3976,7 @@ components: accountId: $ref: '#/components/schemas/accountId' applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' from: $ref: '#/components/schemas/from' to: @@ -3662,7 +4157,7 @@ components: accountId: $ref: '#/components/schemas/accountId' applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' from: $ref: '#/components/schemas/from' to: @@ -3702,7 +4197,7 @@ components: accountId: $ref: '#/components/schemas/accountId' applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' from: $ref: '#/components/schemas/from' to: @@ -3742,7 +4237,7 @@ components: accountId: $ref: '#/components/schemas/accountId' applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' from: $ref: '#/components/schemas/from' to: @@ -3786,7 +4281,7 @@ components: accountId: $ref: '#/components/schemas/accountId' applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' from: $ref: '#/components/schemas/from' to: @@ -3820,7 +4315,7 @@ components: accountId: $ref: '#/components/schemas/accountId' applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' from: $ref: '#/components/schemas/from' to: @@ -3856,7 +4351,7 @@ components: accountId: $ref: '#/components/schemas/accountId' applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' from: $ref: '#/components/schemas/from' to: @@ -3906,7 +4401,7 @@ components: accountId: $ref: '#/components/schemas/accountId' applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' from: $ref: '#/components/schemas/from' to: @@ -3956,7 +4451,7 @@ components: accountId: $ref: '#/components/schemas/accountId' applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' from: $ref: '#/components/schemas/from' to: @@ -3994,7 +4489,7 @@ components: accountId: $ref: '#/components/schemas/accountId' applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' from: $ref: '#/components/schemas/from' to: @@ -4047,7 +4542,7 @@ components: accountId: $ref: '#/components/schemas/accountId' applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' from: $ref: '#/components/schemas/from' to: @@ -4086,7 +4581,7 @@ components: accountId: $ref: '#/components/schemas/accountId' applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' from: $ref: '#/components/schemas/from' to: @@ -4132,7 +4627,7 @@ components: accountId: $ref: '#/components/schemas/accountId' applicationId: - $ref: '#/components/schemas/applicationId' + $ref: '#/components/schemas/applicationId1' from: $ref: '#/components/schemas/from' to: @@ -4188,7 +4683,7 @@ components: type: string description: The user account associated with the call. example: '9900000' - applicationId: + applicationId1: type: string description: The id of the application associated with the call. example: 04e88489-df02-4e34-a0ee-27a91849555f @@ -5318,6 +5813,12 @@ components: application/json: schema: $ref: '#/components/schemas/message' + createMultiChannelMessageResponse: + description: Accepted + content: + application/json: + schema: + $ref: '#/components/schemas/createMultiChannelMessageResponse' listMessagesResponse: description: OK content: @@ -6577,6 +7078,12 @@ components: schema: $ref: '#/components/schemas/messageRequest' required: true + createMultiChannelMessageRequest: + content: + application/json: + schema: + $ref: '#/components/schemas/multiChannelMessageRequest' + required: true uploadMediaRequest: content: application/json: @@ -6978,6 +7485,19 @@ 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 tfVerificationStatus: your_url.com/webhookService: post: diff --git a/docs/CardWidthEnum.md b/docs/CardWidthEnum.md new file mode 100644 index 0000000..cce8de6 --- /dev/null +++ b/docs/CardWidthEnum.md @@ -0,0 +1,9 @@ +# Bandwidth.Standard.Model.CardWidthEnum + +## 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/CreateMultiChannelMessageResponse.md b/docs/CreateMultiChannelMessageResponse.md new file mode 100644 index 0000000..b8973eb --- /dev/null +++ b/docs/CreateMultiChannelMessageResponse.md @@ -0,0 +1,12 @@ +# Bandwidth.Standard.Model.CreateMultiChannelMessageResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Links** | [**List<Link>**](Link.md) | | [optional] +**Data** | [**MultiChannelMessageData**](MultiChannelMessageData.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 new file mode 100644 index 0000000..b650792 --- /dev/null +++ b/docs/ErrorObject.md @@ -0,0 +1,11 @@ +# Bandwidth.Standard.Model.ErrorObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | **string** | | [optional] +**Message** | **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) + diff --git a/docs/Link.md b/docs/Link.md new file mode 100644 index 0000000..176462c --- /dev/null +++ b/docs/Link.md @@ -0,0 +1,11 @@ +# Bandwidth.Standard.Model.Link + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Rel** | **string** | | [optional] +**Href** | **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) + diff --git a/docs/Message.md b/docs/Message.md index 8dbfc5d..071d55c 100644 --- a/docs/Message.md +++ b/docs/Message.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes **Text** | **string** | The contents of the message. | [optional] **Tag** | **string** | The custom string set by the user. | [optional] **Priority** | **PriorityEnum** | | [optional] -**Expiration** | **DateTime** | The expiration date-time set by the user. | [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/MessageRequest.md b/docs/MessageRequest.md index 5a4a0f2..9e12d62 100644 --- a/docs/MessageRequest.md +++ b/docs/MessageRequest.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **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] **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. Not supported on MMS. | [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/MmsMessageContent.md b/docs/MmsMessageContent.md new file mode 100644 index 0000000..ce3881f --- /dev/null +++ b/docs/MmsMessageContent.md @@ -0,0 +1,11 @@ +# Bandwidth.Standard.Model.MmsMessageContent + +## Properties + +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] + +[[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 new file mode 100644 index 0000000..0905754 --- /dev/null +++ b/docs/MultiChannelAction.md @@ -0,0 +1,21 @@ +# Bandwidth.Standard.Model.MultiChannelAction + +## Properties + +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. | +**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. | +**Label** | **string** | The label of the location. | [optional] +**Title** | **string** | The title of the event. | +**StartTime** | **DateTime** | The start time of the event. | +**EndTime** | **DateTime** | The end time of the event. | +**Description** | **string** | The description of the event. | [optional] +**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/MultiChannelActionCalendarEvent.md b/docs/MultiChannelActionCalendarEvent.md new file mode 100644 index 0000000..04ffb1c --- /dev/null +++ b/docs/MultiChannelActionCalendarEvent.md @@ -0,0 +1,16 @@ +# Bandwidth.Standard.Model.MultiChannelActionCalendarEvent + +## Properties + +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. | +**Title** | **string** | The title of the event. | +**StartTime** | **DateTime** | The start time of the event. | +**EndTime** | **DateTime** | The end time of the event. | +**Description** | **string** | The description of the event. | [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/MultiChannelApi.md b/docs/MultiChannelApi.md new file mode 100644 index 0000000..582e874 --- /dev/null +++ b/docs/MultiChannelApi.md @@ -0,0 +1,113 @@ +# Bandwidth.Standard.Api.MultiChannelApi + +All URIs are relative to *http://localhost* + +| Method | HTTP request | Description | +|--------|--------------|-------------| +| [**CreateMultiChannelMessage**](MultiChannelApi.md#createmultichannelmessage) | **POST** /users/{accountId}/messages/multiChannel | Create Multi-Channel Message | + + +# **CreateMultiChannelMessage** +> CreateMultiChannelMessageResponse CreateMultiChannelMessage (string accountId, MultiChannelMessageRequest multiChannelMessageRequest) + +Create Multi-Channel Message + +Endpoint for sending Multi-Channel messages. + +### 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 CreateMultiChannelMessageExample + { + 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 MultiChannelApi(config); + var accountId = 9900000; // string | Your Bandwidth Account ID. + var multiChannelMessageRequest = new MultiChannelMessageRequest(); // MultiChannelMessageRequest | + + try + { + // Create Multi-Channel Message + CreateMultiChannelMessageResponse result = apiInstance.CreateMultiChannelMessage(accountId, multiChannelMessageRequest); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling MultiChannelApi.CreateMultiChannelMessage: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the CreateMultiChannelMessageWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Create Multi-Channel Message + ApiResponse response = apiInstance.CreateMultiChannelMessageWithHttpInfo(accountId, multiChannelMessageRequest); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling MultiChannelApi.CreateMultiChannelMessageWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **accountId** | **string** | Your Bandwidth Account ID. | | +| **multiChannelMessageRequest** | [**MultiChannelMessageRequest**](MultiChannelMessageRequest.md) | | | + +### Return type + +[**CreateMultiChannelMessageResponse**](CreateMultiChannelMessageResponse.md) + +### Authorization + +[Basic](../README.md#Basic) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **202** | Accepted | - | +| **400** | Bad Request | - | +| **401** | Unauthorized | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **406** | Not Acceptable | - | +| **415** | Unsupported Media Type | - | +| **429** | Too Many Requests | - | +| **500** | Internal Server Error | - | + +[[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) + diff --git a/docs/MultiChannelCallbackData.md b/docs/MultiChannelCallbackData.md new file mode 100644 index 0000000..e492cfe --- /dev/null +++ b/docs/MultiChannelCallbackData.md @@ -0,0 +1,14 @@ +# 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/MultiChannelChannelListObject.md b/docs/MultiChannelChannelListObject.md new file mode 100644 index 0000000..c8fb063 --- /dev/null +++ b/docs/MultiChannelChannelListObject.md @@ -0,0 +1,13 @@ +# Bandwidth.Standard.Model.MultiChannelChannelListObject + +## 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) | | + +[[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/MultiChannelChannelListObjectContent.md b/docs/MultiChannelChannelListObjectContent.md new file mode 100644 index 0000000..51c967c --- /dev/null +++ b/docs/MultiChannelChannelListObjectContent.md @@ -0,0 +1,18 @@ +# Bandwidth.Standard.Model.MultiChannelChannelListObjectContent +The content of the message. + +## Properties + +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. | +**Orientation** | **StandaloneCardOrientationEnum** | | +**ThumbnailImageAlignment** | **ThumbnailAlignmentEnum** | | +**CardContent** | [**RbmCardContent**](RbmCardContent.md) | | +**CardWidth** | **CardWidthEnum** | | +**CardContents** | [**List<RbmCardContent>**](RbmCardContent.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/MultiChannelMessageCallbackData.md b/docs/MultiChannelMessageCallbackData.md new file mode 100644 index 0000000..aa2fb4c --- /dev/null +++ b/docs/MultiChannelMessageCallbackData.md @@ -0,0 +1,17 @@ +# 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/MultiChannelMessageChannelEnum.md b/docs/MultiChannelMessageChannelEnum.md new file mode 100644 index 0000000..3c856c4 --- /dev/null +++ b/docs/MultiChannelMessageChannelEnum.md @@ -0,0 +1,10 @@ +# Bandwidth.Standard.Model.MultiChannelMessageChannelEnum +The channel of the multi-channel 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/MultiChannelMessageData.md b/docs/MultiChannelMessageData.md new file mode 100644 index 0000000..4bd01e8 --- /dev/null +++ b/docs/MultiChannelMessageData.md @@ -0,0 +1,18 @@ +# 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 new file mode 100644 index 0000000..31495a1 --- /dev/null +++ b/docs/MultiChannelMessageDirectionEnum.md @@ -0,0 +1,9 @@ +# 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/MultiChannelMessageRequest.md b/docs/MultiChannelMessageRequest.md new file mode 100644 index 0000000..e6de772 --- /dev/null +++ b/docs/MultiChannelMessageRequest.md @@ -0,0 +1,15 @@ +# Bandwidth.Standard.Model.MultiChannelMessageRequest +Multi-Channel Message Request + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**To** | **string** | The phone number the message should be sent to in E164 format. | +**ChannelList** | [**List<MultiChannelChannelListObject>**](MultiChannelChannelListObject.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/MultiChannelStatusEnum.md b/docs/MultiChannelStatusEnum.md new file mode 100644 index 0000000..71a7eac --- /dev/null +++ b/docs/MultiChannelStatusEnum.md @@ -0,0 +1,9 @@ +# 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/PriorityEnum.md b/docs/PriorityEnum.md index d1e3a11..5c17cb5 100644 --- a/docs/PriorityEnum.md +++ b/docs/PriorityEnum.md @@ -1,5 +1,5 @@ # Bandwidth.Standard.Model.PriorityEnum -The priority specified by the user. Not supported on MMS. +The priority specified by the user. ## Properties diff --git a/docs/RbmActionBase.md b/docs/RbmActionBase.md new file mode 100644 index 0000000..7ee5324 --- /dev/null +++ b/docs/RbmActionBase.md @@ -0,0 +1,12 @@ +# Bandwidth.Standard.Model.RbmActionBase + +## Properties + +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. | + +[[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 new file mode 100644 index 0000000..d5b18e4 --- /dev/null +++ b/docs/RbmActionDial.md @@ -0,0 +1,13 @@ +# Bandwidth.Standard.Model.RbmActionDial + +## Properties + +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. | +**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 new file mode 100644 index 0000000..a86c6ea --- /dev/null +++ b/docs/RbmActionOpenUrl.md @@ -0,0 +1,13 @@ +# Bandwidth.Standard.Model.RbmActionOpenUrl + +## Properties + +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. | +**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/RbmActionTypeEnum.md b/docs/RbmActionTypeEnum.md new file mode 100644 index 0000000..83e805b --- /dev/null +++ b/docs/RbmActionTypeEnum.md @@ -0,0 +1,9 @@ +# Bandwidth.Standard.Model.RbmActionTypeEnum + +## 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/RbmActionViewLocation.md b/docs/RbmActionViewLocation.md new file mode 100644 index 0000000..237b9ae --- /dev/null +++ b/docs/RbmActionViewLocation.md @@ -0,0 +1,15 @@ +# Bandwidth.Standard.Model.RbmActionViewLocation + +## Properties + +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. | +**Latitude** | **double** | The latitude of the location. | +**Longitude** | **double** | The longitude of the location. | +**Label** | **string** | The label of the 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/RbmCardContent.md b/docs/RbmCardContent.md new file mode 100644 index 0000000..aa4980d --- /dev/null +++ b/docs/RbmCardContent.md @@ -0,0 +1,13 @@ +# Bandwidth.Standard.Model.RbmCardContent + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | **string** | The title of the card. Must be 200 characters or less. | [optional] +**Description** | **string** | The description of the card. Must be 2000 characters or less. | [optional] +**Media** | [**RbmCardContentMedia**](RbmCardContentMedia.md) | | [optional] +**Suggestions** | [**List<MultiChannelAction>**](MultiChannelAction.md) | An array of suggested actions for the recipient that will be displayed on the rich card. | [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/RbmCardContentMedia.md b/docs/RbmCardContentMedia.md new file mode 100644 index 0000000..9b2f504 --- /dev/null +++ b/docs/RbmCardContentMedia.md @@ -0,0 +1,12 @@ +# Bandwidth.Standard.Model.RbmCardContentMedia + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FileUrl** | **string** | The URL of the media file. 100MB is the maximum file size. | +**ThumbnailUrl** | **string** | The URL of the thumbnail image. Applies only to video file media. | [optional] +**Height** | **RbmMediaHeightEnum** | | + +[[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/RbmMediaHeightEnum.md b/docs/RbmMediaHeightEnum.md new file mode 100644 index 0000000..b56d3e4 --- /dev/null +++ b/docs/RbmMediaHeightEnum.md @@ -0,0 +1,10 @@ +# Bandwidth.Standard.Model.RbmMediaHeightEnum +The height of the media. + +## 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/RbmMessageCarouselCard.md b/docs/RbmMessageCarouselCard.md new file mode 100644 index 0000000..7710e3e --- /dev/null +++ b/docs/RbmMessageCarouselCard.md @@ -0,0 +1,12 @@ +# Bandwidth.Standard.Model.RbmMessageCarouselCard + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CardWidth** | **CardWidthEnum** | | +**CardContents** | [**List<RbmCardContent>**](RbmCardContent.md) | | +**Suggestions** | [**List<MultiChannelAction>**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [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/RbmMessageContentFile.md b/docs/RbmMessageContentFile.md new file mode 100644 index 0000000..3a59539 --- /dev/null +++ b/docs/RbmMessageContentFile.md @@ -0,0 +1,11 @@ +# Bandwidth.Standard.Model.RbmMessageContentFile + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FileUrl** | **string** | The URL of the media file. 100MB is the maximum file size. | +**ThumbnailUrl** | **string** | The URL of the thumbnail image. Applies only to video file media. | [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/RbmMessageContentRichCard.md b/docs/RbmMessageContentRichCard.md new file mode 100644 index 0000000..d0d4e6e --- /dev/null +++ b/docs/RbmMessageContentRichCard.md @@ -0,0 +1,15 @@ +# Bandwidth.Standard.Model.RbmMessageContentRichCard + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Orientation** | **StandaloneCardOrientationEnum** | | +**ThumbnailImageAlignment** | **ThumbnailAlignmentEnum** | | +**CardContent** | [**RbmCardContent**](RbmCardContent.md) | | +**Suggestions** | [**List<MultiChannelAction>**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [optional] +**CardWidth** | **CardWidthEnum** | | +**CardContents** | [**List<RbmCardContent>**](RbmCardContent.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/RbmMessageContentText.md b/docs/RbmMessageContentText.md new file mode 100644 index 0000000..bfb0802 --- /dev/null +++ b/docs/RbmMessageContentText.md @@ -0,0 +1,11 @@ +# Bandwidth.Standard.Model.RbmMessageContentText + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Text** | **string** | The text associated with the message. Must be 3270 characters or less | +**Suggestions** | [**List<MultiChannelAction>**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [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/RbmMessageMedia.md b/docs/RbmMessageMedia.md new file mode 100644 index 0000000..7a0e5aa --- /dev/null +++ b/docs/RbmMessageMedia.md @@ -0,0 +1,11 @@ +# Bandwidth.Standard.Model.RbmMessageMedia + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Media** | [**RbmMessageContentFile**](RbmMessageContentFile.md) | | +**Suggestions** | [**List<MultiChannelAction>**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [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/RbmStandaloneCard.md b/docs/RbmStandaloneCard.md new file mode 100644 index 0000000..5a9128c --- /dev/null +++ b/docs/RbmStandaloneCard.md @@ -0,0 +1,13 @@ +# Bandwidth.Standard.Model.RbmStandaloneCard + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Orientation** | **StandaloneCardOrientationEnum** | | +**ThumbnailImageAlignment** | **ThumbnailAlignmentEnum** | | +**CardContent** | [**RbmCardContent**](RbmCardContent.md) | | +**Suggestions** | [**List<MultiChannelAction>**](MultiChannelAction.md) | An array of suggested actions for the recipient. | [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/SmsMessageContent.md b/docs/SmsMessageContent.md new file mode 100644 index 0000000..04c26d2 --- /dev/null +++ b/docs/SmsMessageContent.md @@ -0,0 +1,10 @@ +# Bandwidth.Standard.Model.SmsMessageContent + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Text** | **string** | The contents of the text message. Must be 2048 characters or less. | + +[[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/StandaloneCardOrientationEnum.md b/docs/StandaloneCardOrientationEnum.md new file mode 100644 index 0000000..b16e742 --- /dev/null +++ b/docs/StandaloneCardOrientationEnum.md @@ -0,0 +1,9 @@ +# Bandwidth.Standard.Model.StandaloneCardOrientationEnum + +## 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/ThumbnailAlignmentEnum.md b/docs/ThumbnailAlignmentEnum.md new file mode 100644 index 0000000..7271c90 --- /dev/null +++ b/docs/ThumbnailAlignmentEnum.md @@ -0,0 +1,10 @@ +# Bandwidth.Standard.Model.ThumbnailAlignmentEnum +The alignment of the thumbnail image in the card. Only applicable if the card using horizontal orientation. + +## 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/src/Bandwidth.Standard.Test/Smoke/ConferencesIntegrationTests.cs b/src/Bandwidth.Standard.Test/Smoke/ConferencesIntegrationTests.cs index abd3aae..2539972 100644 --- a/src/Bandwidth.Standard.Test/Smoke/ConferencesIntegrationTests.cs +++ b/src/Bandwidth.Standard.Test/Smoke/ConferencesIntegrationTests.cs @@ -228,7 +228,7 @@ public void testConferenceAndMembers() /// Test Conference Recordings /// Tests a successful flow of creating a call with a recording. /// - [Fact] + [Fact (Skip = "PV Issue")] public void testConferenceRecordings() { Tuple createCoferenceResponse = CreateConferenceTest(); @@ -429,7 +429,7 @@ public void UpdateConferenceForbiddenRequest() /// /// Test Update Conference Not Found /// - [Fact] + [Fact (Skip = "PV Issue")] public void UpdateConferenceNotFoundRequest() { ApiException exception = Assert.Throws(() => conferenceApiInstance.UpdateConferenceWithHttpInfo(accountId, testConferenceId, updateConferenceBody)); @@ -460,7 +460,7 @@ public void UpdateConferenceBxmlForbiddenRequest() /// /// Test Update Conference BXML Not Found /// - [Fact] + [Fact (Skip = "PV Issue")] public void UpdateConferenceBxmlNotFoundRequest() { ApiException exception = Assert.Throws(() => conferenceApiInstance.UpdateConferenceBxmlWithHttpInfo(accountId, testConferenceId, testUpdateBxml)); @@ -490,7 +490,7 @@ public void UpdateConferenceMemberForbiddenRequest() /// /// Test Update Conference Member Not Found /// - [Fact] + [Fact (Skip = "PV Issue")] public void UpdateConferenceMemberNotFoundRequest() { ApiException exception = Assert.Throws(() => conferenceApiInstance.UpdateConferenceMember(accountId, testConferenceId, testMemberId, updateConferenceMember)); diff --git a/src/Bandwidth.Standard.Test/Smoke/MessagesIntegrationTests.cs b/src/Bandwidth.Standard.Test/Smoke/MessagesIntegrationTests.cs index a5c414f..f28b960 100644 --- a/src/Bandwidth.Standard.Test/Smoke/MessagesIntegrationTests.cs +++ b/src/Bandwidth.Standard.Test/Smoke/MessagesIntegrationTests.cs @@ -1,11 +1,11 @@ using System; +using System.Net; using System.Collections.Generic; using Xunit; using Bandwidth.Standard.Client; using Bandwidth.Standard.Api; using Bandwidth.Standard.Model; -using System.Net; namespace Bandwidth.Standard.Test.Smoke { diff --git a/src/Bandwidth.Standard.Test/Smoke/MultiChannelApiTests.cs b/src/Bandwidth.Standard.Test/Smoke/MultiChannelApiTests.cs new file mode 100644 index 0000000..1eac4ea --- /dev/null +++ b/src/Bandwidth.Standard.Test/Smoke/MultiChannelApiTests.cs @@ -0,0 +1,76 @@ +using System; +using System.Net; +using System.Collections.Generic; +using Xunit; + +using Bandwidth.Standard.Client; +using Bandwidth.Standard.Api; +using Bandwidth.Standard.Model; + +namespace Bandwidth.Standard.Test.Smoke +{ + /// + /// Class for testing MultiChannelApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class MultiChannelApiTests : IDisposable + { + private MultiChannelApi instance; + private string accountId; + private Configuration configuration; + + public MultiChannelApiTests() + { + accountId = Environment.GetEnvironmentVariable("BW_ACCOUNT_ID"); + + // Authorized API Client + configuration = new Configuration(); + configuration.Username = Environment.GetEnvironmentVariable("BW_USERNAME"); + configuration.Password = Environment.GetEnvironmentVariable("BW_PASSWORD"); + instance = new MultiChannelApi(configuration); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of MultiChannelApi + /// + [Fact] + public void InstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test CreateMultiChannelMessage + /// + [Fact] + public void CreateMultiChannelMessageTest() + { + MultiChannelChannelListObject channelListObject = new MultiChannelChannelListObject( + from: Environment.GetEnvironmentVariable("BW_NUMBER"), + applicationId: Environment.GetEnvironmentVariable("BW_MESSAGING_APPLICATION_ID"), + channel: MultiChannelMessageChannelEnum.RBM, + content: new MultiChannelChannelListObjectContent(new RbmMessageContentText(text: "Hello World!")) + ); + + MultiChannelMessageRequest multiChannelMessageRequest = new MultiChannelMessageRequest( + to: Environment.GetEnvironmentVariable("USER_NUMBER"), + tag: "tag", + priority: PriorityEnum.High, + expiration: DateTime.UtcNow.AddMinutes(1), + channelList: new List { channelListObject } + ); + + var response = instance.CreateMultiChannelMessageWithHttpInfo(accountId, multiChannelMessageRequest); + Assert.IsType>(response); + Assert.Equal(HttpStatusCode.Accepted, response.StatusCode); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Smoke/RecordingsIntegrationTests.cs b/src/Bandwidth.Standard.Test/Smoke/RecordingsIntegrationTests.cs index bdfab57..3e21e26 100644 --- a/src/Bandwidth.Standard.Test/Smoke/RecordingsIntegrationTests.cs +++ b/src/Bandwidth.Standard.Test/Smoke/RecordingsIntegrationTests.cs @@ -594,7 +594,7 @@ public void UpdateCallRecordingStateForbiddenRequest() /// /// Test UpdateCallRecordingState with a nonexistent call id /// - [Fact] + [Fact (Skip = "PV Issue")] public void UpdateCallRecordingStateNotFound() { var updateCallRecording = new UpdateCallRecording(state: RecordingStateEnum.Paused); diff --git a/src/Bandwidth.Standard.Test/Smoke/TollFreeVerificationIntegrationTests.cs b/src/Bandwidth.Standard.Test/Smoke/TollFreeVerificationIntegrationTests.cs index 28f5c4b..76e2a54 100644 --- a/src/Bandwidth.Standard.Test/Smoke/TollFreeVerificationIntegrationTests.cs +++ b/src/Bandwidth.Standard.Test/Smoke/TollFreeVerificationIntegrationTests.cs @@ -1,13 +1,3 @@ -/* - * 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.IO; using System.Collections.Generic; @@ -36,7 +26,6 @@ public class TollFreeVerificationSmokeTests : IDisposable public TollFreeVerificationSmokeTests() { - instance = new TollFreeVerificationApi(); accountId = Environment.GetEnvironmentVariable("BW_ACCOUNT_ID"); // Authorized API Client diff --git a/src/Bandwidth.Standard.Test/Smoke/TranscriptionsIntegrationTests.cs b/src/Bandwidth.Standard.Test/Smoke/TranscriptionsIntegrationTests.cs index 570b92f..a9cfb7a 100644 --- a/src/Bandwidth.Standard.Test/Smoke/TranscriptionsIntegrationTests.cs +++ b/src/Bandwidth.Standard.Test/Smoke/TranscriptionsIntegrationTests.cs @@ -167,7 +167,7 @@ private void DeleteRealTimeTranscription() } // Need these to run in a specific order - [Fact] + [Fact (Skip = "PV Issue")] public void TestTranscriptionsSuccess() { CreateCallTranscription(); diff --git a/src/Bandwidth.Standard.Test/Unit/Api/MultiChannelApiTests.cs b/src/Bandwidth.Standard.Test/Unit/Api/MultiChannelApiTests.cs new file mode 100644 index 0000000..aa8fd86 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Api/MultiChannelApiTests.cs @@ -0,0 +1,71 @@ +/* + * 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.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using Xunit; + +using Bandwidth.Standard.Client; +using Bandwidth.Standard.Api; +// uncomment below to import models +//using Bandwidth.Standard.Model; + +namespace Bandwidth.Standard.Test.Unit.Api +{ + /// + /// Class for testing MultiChannelApi + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the API endpoint. + /// + public class MultiChannelApiTests : IDisposable + { + private MultiChannelApi instance; + + public MultiChannelApiTests() + { + instance = new MultiChannelApi(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of MultiChannelApi + /// + [Fact] + public void InstanceTest() + { + // TODO uncomment below to test 'IsType' MultiChannelApi + //Assert.IsType(instance); + } + + /// + /// Test CreateMultiChannelMessage + /// + [Fact] + public void CreateMultiChannelMessageTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string accountId = null; + //MultiChannelMessageRequest multiChannelMessageRequest = null; + //var response = instance.CreateMultiChannelMessage(accountId, multiChannelMessageRequest); + //Assert.IsType(response); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Api/TollFreeVerificationApiTests.cs b/src/Bandwidth.Standard.Test/Unit/Api/TollFreeVerificationApiTests.cs index 2831c1d..5b571f6 100644 --- a/src/Bandwidth.Standard.Test/Unit/Api/TollFreeVerificationApiTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Api/TollFreeVerificationApiTests.cs @@ -31,9 +31,8 @@ public class TollFreeVerificationApiTests : IDisposable private TollFreeVerificationApi instance; private Configuration configuration; - private string accountId = "9900000"; - private string subscriptionId = "test-id-1234"; - private string tfPhoneNumber = "18005551234"; + // private string accountId = "9900000"; + // private string tfPhoneNumber = "18005551234"; private WebhookSubscriptionRequestSchema webhookSubscriptionRequestSchema; private Dictionary verification; diff --git a/src/Bandwidth.Standard.Test/Unit/Model/AdditionalDenialReasonTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/AdditionalDenialReasonTests.cs index f84a119..2069dc4 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/AdditionalDenialReasonTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/AdditionalDenialReasonTests.cs @@ -79,7 +79,7 @@ public void ReasonTest() public void ResubmitAllowedTest() { Assert.IsType(instance.ResubmitAllowed); - Assert.Equal(true, instance.ResubmitAllowed); + Assert.True(instance.ResubmitAllowed); } } } diff --git a/src/Bandwidth.Standard.Test/Unit/Model/CardWidthEnumTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/CardWidthEnumTests.cs new file mode 100644 index 0000000..5ef1e7a --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/CardWidthEnumTests.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.Unit.Model +{ + /// + /// Class for testing CardWidthEnum + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class CardWidthEnumTests : IDisposable + { + private CardWidthEnum instance; + + public CardWidthEnumTests() + { + instance = new CardWidthEnum(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of CardWidthEnum + /// + [Fact] + public void CardWidthEnumInstanceTest() + { + Assert.IsType(instance); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/CreateMultiChannelMessageResponseTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/CreateMultiChannelMessageResponseTests.cs new file mode 100644 index 0000000..4286106 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/CreateMultiChannelMessageResponseTests.cs @@ -0,0 +1,82 @@ +/* + * 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 CreateMultiChannelMessageResponse + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class CreateMultiChannelMessageResponseTests : IDisposable + { + private CreateMultiChannelMessageResponse instance; + + public CreateMultiChannelMessageResponseTests() + { + instance = new CreateMultiChannelMessageResponse(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of CreateMultiChannelMessageResponse + /// + [Fact] + public void CreateMultiChannelMessageResponseInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'Links' + /// + [Fact] + public void LinksTest() + { + // TODO unit test for the property 'Links' + } + + /// + /// Test the property 'Data' + /// + [Fact] + public void DataTest() + { + // TODO unit test for the property 'Data' + } + + /// + /// Test the property 'Errors' + /// + [Fact] + public void ErrorsTest() + { + // TODO unit test for the property 'Errors' + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/ErrorObjectTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/ErrorObjectTests.cs new file mode 100644 index 0000000..ca221ce --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/ErrorObjectTests.cs @@ -0,0 +1,77 @@ +/* + * 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 ErrorObject + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ErrorObjectTests : IDisposable + { + private ErrorObject instance; + + public ErrorObjectTests() + { + instance = new ErrorObject(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ErrorObject + /// + [Fact] + public void ErrorObjectInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'Code' + /// + [Fact] + public void CodeTest() + { + instance.Code = "TestCode"; + Assert.IsType(instance.Code); + Assert.Equal("TestCode", instance.Code); + } + + /// + /// Test the property 'Message' + /// + [Fact] + public void MessageTest() + { + instance.Message = "TestMessage"; + Assert.IsType(instance.Message); + Assert.Equal("TestMessage", instance.Message); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/LinkTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/LinkTests.cs new file mode 100644 index 0000000..c09e86c --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/LinkTests.cs @@ -0,0 +1,77 @@ +/* + * 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 Link + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class LinkTests : IDisposable + { + private Link instance; + + public LinkTests() + { + instance = new Link(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of Link + /// + [Fact] + public void LinkInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'Rel' + /// + [Fact] + public void RelTest() + { + instance.Rel = "self"; + Assert.IsType(instance.Rel); + Assert.Equal("self", instance.Rel); + } + + /// + /// Test the property 'Href' + /// + [Fact] + public void HrefTest() + { + instance.Href = "https://api.example.com/resource"; + Assert.IsType(instance.Href); + Assert.Equal("https://api.example.com/resource", instance.Href); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MmsMessageContentTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MmsMessageContentTests.cs new file mode 100644 index 0000000..47c1f42 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/MmsMessageContentTests.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.Unit.Model +{ + /// + /// Class for testing MmsMessageContent + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class MmsMessageContentTests : IDisposable + { + private MmsMessageContent instance; + + public MmsMessageContentTests() + { + instance = new MmsMessageContent(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of MmsMessageContent + /// + [Fact] + public void MmsMessageContentInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'Text' + /// + [Fact] + public void TextTest() + { + instance.Text = "Test message"; + Assert.IsType(instance.Text); + Assert.Equal("Test message", instance.Text); + } + + /// + /// Test the property 'Media' + /// + [Fact] + public void MediaTest() + { + var mediaList = new List { "https://example.com/image1.jpg", "https://example.com/image2.jpg" }; + instance.Media = mediaList; + 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 new file mode 100644 index 0000000..a539aef --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelActionCalendarEventTests.cs @@ -0,0 +1,133 @@ +/* + * 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 MultiChannelActionCalendarEvent + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class MultiChannelActionCalendarEventTests : IDisposable + { + private MultiChannelActionCalendarEvent instance; + + public MultiChannelActionCalendarEventTests() + { + instance = new MultiChannelActionCalendarEvent( + type: RbmActionTypeEnum.CREATECALENDAREVENT, + text: "Test message", + postBackData: new byte[] { 1, 2, 3 }, + title: "Test Title", + startTime: new DateTime(2020, 1, 1), + endTime: new DateTime(2020, 1, 1), + description: "Test Description" + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of MultiChannelActionCalendarEvent + /// + [Fact] + public void MultiChannelActionCalendarEventInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'Type' + /// + [Fact] + public void TypeTest() + { + Assert.IsType(instance.Type); + Assert.Equal(RbmActionTypeEnum.CREATECALENDAREVENT, instance.Type); + } + + /// + /// Test the property 'Text' + /// + [Fact] + public void TextTest() + { + Assert.IsType(instance.Text); + Assert.Equal("Test message", instance.Text); + } + + /// + /// Test the property 'PostBackData' + /// + [Fact] + public void PostBackDataTest() + { + Assert.IsType(instance.PostBackData); + Assert.Equal(new byte[] { 1, 2, 3 }, instance.PostBackData); + } + + /// + /// Test the property 'Title' + /// + [Fact] + public void TitleTest() + { + Assert.IsType(instance.Title); + Assert.Equal("Test Title", instance.Title); + } + + /// + /// Test the property 'StartTime' + /// + [Fact] + public void StartTimeTest() + { + Assert.IsType(instance.StartTime); + Assert.Equal(new DateTime(2020, 1, 1), instance.StartTime); + } + + /// + /// Test the property 'EndTime' + /// + [Fact] + public void EndTimeTest() + { + Assert.IsType(instance.EndTime); + Assert.Equal(new DateTime(2020, 1, 1), instance.EndTime); + } + + /// + /// Test the property 'Description' + /// + [Fact] + public void DescriptionTest() + { + Assert.IsType(instance.Description); + Assert.Equal("Test Description", instance.Description); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelActionTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelActionTests.cs new file mode 100644 index 0000000..5cf7a98 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelActionTests.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 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 MultiChannelAction + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class MultiChannelActionTests : IDisposable + { + private MultiChannelAction instanceRbmActionBase; + private MultiChannelAction instanceRbmActionDial; + private MultiChannelAction instanceRbmActionViewLocation; + private MultiChannelAction instanceMultiChannelActionCalendarEvent; + private MultiChannelAction instanceRbmActionOpenUrl; + + public MultiChannelActionTests() + { + instanceRbmActionBase = new MultiChannelAction(new RbmActionBase( + type: RbmActionTypeEnum.REPLY, + text: "TestText", + postBackData: new byte[] { 1, 2, 3 } + )); + instanceRbmActionDial = new MultiChannelAction(new RbmActionDial( + type: RbmActionTypeEnum.REPLY, + text: "TestText", + postBackData: new byte[] { 1, 2, 3 }, + phoneNumber: "TestPhoneNumber" + )); + instanceRbmActionViewLocation = new MultiChannelAction(new RbmActionViewLocation( + type: RbmActionTypeEnum.REPLY, + text: "TestText", + postBackData: new byte[] { 1, 2, 3 }, + latitude: 37.7749, + longitude: -122.4194, + label: "TestLabel" + )); + instanceMultiChannelActionCalendarEvent = new MultiChannelAction(new MultiChannelActionCalendarEvent( + type: RbmActionTypeEnum.REPLY, + text: "TestText", + postBackData: new byte[] { 1, 2, 3 }, + title: "TestTitle", + startTime: new DateTime(2020, 1, 1), + endTime: new DateTime(2020, 1, 1), + description: "TestDescription" + )); + instanceRbmActionOpenUrl = new MultiChannelAction(new RbmActionOpenUrl( + type: RbmActionTypeEnum.REPLY, + text: "TestText", + postBackData: new byte[] { 1, 2, 3 }, + url: "https://test.url/" + )); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of MultiChannelAction + /// + [Fact] + public void MultiChannelActionInstanceTest() + { + Assert.IsType(instanceRbmActionBase); + Assert.IsType(instanceRbmActionBase.ActualInstance); + Assert.IsType(instanceRbmActionDial); + Assert.IsType(instanceRbmActionDial.ActualInstance); + Assert.IsType(instanceRbmActionViewLocation); + Assert.IsType(instanceRbmActionViewLocation.ActualInstance); + Assert.IsType(instanceMultiChannelActionCalendarEvent); + Assert.IsType(instanceMultiChannelActionCalendarEvent.ActualInstance); + Assert.IsType(instanceRbmActionOpenUrl); + Assert.IsType(instanceRbmActionOpenUrl.ActualInstance); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelCallbackDataTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelCallbackDataTests.cs new file mode 100644 index 0000000..cfd2d0e --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelCallbackDataTests.cs @@ -0,0 +1,109 @@ +/* + * 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/MultiChannelChannelListObjectContentTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelChannelListObjectContentTests.cs new file mode 100644 index 0000000..7c83967 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelChannelListObjectContentTests.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.Unit.Model +{ + /// + /// Class for testing MultiChannelChannelListObjectContent + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class MultiChannelChannelListObjectContentTests : IDisposable + { + private List suggestions; + private MultiChannelChannelListObjectContent instanceRbmMessageContentText; + private MultiChannelChannelListObjectContent instanceRbmMessageMedia; + private MultiChannelChannelListObjectContent instanceRbmMessageContentRichCard; + private MultiChannelChannelListObjectContent instanceSmsMessageContent; + private MultiChannelChannelListObjectContent instanceMmsMessageContent; + + public MultiChannelChannelListObjectContentTests() + { + suggestions = new List { + new MultiChannelAction(new RbmActionBase( + type: RbmActionTypeEnum.REPLY, + text: "Test", + postBackData: new byte[] { 1, 2, 3 } + )) + }; + + instanceRbmMessageContentText = new MultiChannelChannelListObjectContent(new RbmMessageContentText( + text: "Test message", + suggestions: suggestions + )); + instanceRbmMessageMedia = new MultiChannelChannelListObjectContent(new RbmMessageMedia( + media: new RbmMessageContentFile( + fileUrl: "https://test.url/", + thumbnailUrl: "https://test.url/" + ), + suggestions: suggestions + )); + instanceRbmMessageContentRichCard = new MultiChannelChannelListObjectContent(new RbmMessageContentRichCard( + new RbmStandaloneCard( + orientation: StandaloneCardOrientationEnum.VERTICAL, + thumbnailImageAlignment: ThumbnailAlignmentEnum.LEFT, + cardContent: new RbmCardContent( + title: "TestTitle", + description: "TestDescription", + media: new RbmCardContentMedia( + fileUrl: "https://test.url/", + thumbnailUrl: "https://test.url/", + height: RbmMediaHeightEnum.MEDIUM + ), + suggestions: suggestions + ), + suggestions: suggestions + ) + )); + instanceSmsMessageContent = new MultiChannelChannelListObjectContent(new SmsMessageContent( + text: "Test message" + )); + instanceMmsMessageContent = new MultiChannelChannelListObjectContent(new MmsMessageContent( + text: "Test message", + media: new List(){ + "https://test.url/" + } + )); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of MultiChannelChannelListObjectContent + /// + [Fact] + public void MultiChannelChannelListObjectContentInstanceTest() + { + Assert.IsType(instanceRbmMessageContentText); + Assert.IsType(instanceRbmMessageContentText.ActualInstance); + Assert.IsType(instanceRbmMessageMedia); + Assert.IsType(instanceRbmMessageMedia.ActualInstance); + Assert.IsType(instanceRbmMessageContentRichCard); + Assert.IsType(instanceRbmMessageContentRichCard.ActualInstance); + Assert.IsType(instanceSmsMessageContent); + Assert.IsType(instanceSmsMessageContent.ActualInstance); + Assert.IsType(instanceMmsMessageContent); + Assert.IsType(instanceMmsMessageContent.ActualInstance); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelChannelListObjectTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelChannelListObjectTests.cs new file mode 100644 index 0000000..084ab49 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelChannelListObjectTests.cs @@ -0,0 +1,111 @@ +/* + * 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 MultiChannelChannelListObject + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class MultiChannelChannelListObjectTests : IDisposable + { + private MultiChannelChannelListObject instance; + + public MultiChannelChannelListObjectTests() + { + instance = new MultiChannelChannelListObject( + from: "TestFrom", + applicationId: "TestApplicationId", + channel: MultiChannelMessageChannelEnum.SMS, + content: new MultiChannelChannelListObjectContent(new RbmMessageMedia( + media: new RbmMessageContentFile( + fileUrl: "https://test.url/", + thumbnailUrl: "https://test.url/" + ), + suggestions: new List(){ + new MultiChannelAction(new RbmActionBase( + type: RbmActionTypeEnum.REPLY, + text: "Test", + postBackData: new byte[] { 1, 2, 3 } + )) + } + )) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of MultiChannelChannelListObject + /// + [Fact] + public void MultiChannelChannelListObjectInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'From' + /// + [Fact] + public void FromTest() + { + Assert.IsType(instance.From); + Assert.Equal("TestFrom", instance.From); + } + + /// + /// Test the property 'ApplicationId' + /// + [Fact] + public void ApplicationIdTest() + { + Assert.IsType(instance.ApplicationId); + Assert.Equal("TestApplicationId", 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); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageCallbackDataTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageCallbackDataTests.cs new file mode 100644 index 0000000..5df8f52 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageCallbackDataTests.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.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/MultiChannelMessageChannelEnumTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageChannelEnumTests.cs new file mode 100644 index 0000000..92d7a15 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageChannelEnumTests.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.Unit.Model +{ + /// + /// Class for testing MultiChannelMessageChannelEnum + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class MultiChannelMessageChannelEnumTests : IDisposable + { + private MultiChannelMessageChannelEnum instance; + + public MultiChannelMessageChannelEnumTests() + { + instance = new MultiChannelMessageChannelEnum(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of MultiChannelMessageChannelEnum + /// + [Fact] + public void MultiChannelMessageChannelEnumInstanceTest() + { + Assert.IsType(instance); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageDataTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageDataTests.cs new file mode 100644 index 0000000..4606896 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageDataTests.cs @@ -0,0 +1,154 @@ +/* + * 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 new file mode 100644 index 0000000..a822278 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageDirectionEnumTests.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.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/MultiChannelMessageRequestTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageRequestTests.cs new file mode 100644 index 0000000..a36751b --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelMessageRequestTests.cs @@ -0,0 +1,110 @@ +/* + * 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 MultiChannelMessageRequest + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class MultiChannelMessageRequestTests : IDisposable + { + private MultiChannelMessageRequest instance; + + public MultiChannelMessageRequestTests() + { + instance = new MultiChannelMessageRequest( + to: "TestTo", + channelList: new List(), + tag: "TestTag", + priority: PriorityEnum.Default, + expiration: new DateTime(2020, 1, 1) + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of MultiChannelMessageRequest + /// + [Fact] + public void MultiChannelMessageRequestInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'To' + /// + [Fact] + public void ToTest() + { + Assert.IsType(instance.To); + Assert.Equal("TestTo", 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("TestTag", 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.Equal(new DateTime(2020, 1, 1), instance.Expiration); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelStatusEnumTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelStatusEnumTests.cs new file mode 100644 index 0000000..3a5eb37 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/MultiChannelStatusEnumTests.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.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/RbmActionBaseTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/RbmActionBaseTests.cs new file mode 100644 index 0000000..e0c7a8e --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/RbmActionBaseTests.cs @@ -0,0 +1,89 @@ +/* + * 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 RbmActionBase + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class RbmActionBaseTests : IDisposable + { + private RbmActionBase instance; + + public RbmActionBaseTests() + { + instance = new RbmActionBase( + type: RbmActionTypeEnum.REPLY, + text: "TestText", + postBackData: new byte[] { 1, 2, 3 } + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of RbmActionBase + /// + [Fact] + public void RbmActionBaseInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'Type' + /// + [Fact] + public void TypeTest() + { + Assert.IsType(instance.Type); + Assert.Equal(RbmActionTypeEnum.REPLY, instance.Type); + } + + /// + /// Test the property 'Text' + /// + [Fact] + public void TextTest() + { + Assert.IsType(instance.Text); + Assert.Equal("TestText", 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/RbmActionDialTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/RbmActionDialTests.cs new file mode 100644 index 0000000..ddd8fdc --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/RbmActionDialTests.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.Unit.Model +{ + /// + /// Class for testing RbmActionDial + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class RbmActionDialTests : IDisposable + { + private RbmActionDial instance; + + public RbmActionDialTests() + { + instance = new RbmActionDial( + type: RbmActionTypeEnum.DIALPHONE, + text: "TestText", + postBackData: new byte[] { 1, 2, 3 }, + phoneNumber: "TestPhoneNumber" + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of RbmActionDial + /// + [Fact] + public void RbmActionDialInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'Type' + /// + [Fact] + public void TypeTest() + { + Assert.IsType(instance.Type); + Assert.Equal(RbmActionTypeEnum.DIALPHONE, instance.Type); + } + + /// + /// Test the property 'Text' + /// + [Fact] + public void TextTest() + { + Assert.IsType(instance.Text); + Assert.Equal("TestText", instance.Text); + } + + /// + /// Test the property 'PostBackData' + /// + [Fact] + public void PostBackDataTest() + { + Assert.IsType(instance.PostBackData); + Assert.Equal(new byte[] { 1, 2, 3 }, instance.PostBackData); + } + + /// + /// Test the property 'PhoneNumber' + /// + [Fact] + public void PhoneNumberTest() + { + Assert.IsType(instance.PhoneNumber); + Assert.Equal("TestPhoneNumber", instance.PhoneNumber); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/RbmActionOpenUrlTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/RbmActionOpenUrlTests.cs new file mode 100644 index 0000000..9ec9c84 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/RbmActionOpenUrlTests.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.Unit.Model +{ + /// + /// Class for testing RbmActionOpenUrl + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class RbmActionOpenUrlTests : IDisposable + { + private RbmActionOpenUrl instance; + + public RbmActionOpenUrlTests() + { + instance = new RbmActionOpenUrl( + type: RbmActionTypeEnum.OPENURL, + text: "TestText", + postBackData: new byte[] { 1, 2, 3 }, + url: "https://test.url/" + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of RbmActionOpenUrl + /// + [Fact] + public void RbmActionOpenUrlInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'Type' + /// + [Fact] + public void TypeTest() + { + Assert.IsType(instance.Type); + Assert.Equal(RbmActionTypeEnum.OPENURL, instance.Type); + } + + /// + /// Test the property 'Text' + /// + [Fact] + public void TextTest() + { + Assert.IsType(instance.Text); + Assert.Equal("TestText", instance.Text); + } + + /// + /// Test the property 'PostBackData' + /// + [Fact] + public void PostBackDataTest() + { + Assert.IsType(instance.PostBackData); + Assert.Equal(new byte[] { 1, 2, 3 }, instance.PostBackData); + } + + /// + /// Test the property 'Url' + /// + [Fact] + public void UrlTest() + { + Assert.IsType(instance.Url); + Assert.Equal("https://test.url/", instance.Url); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/RbmActionTypeEnumTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/RbmActionTypeEnumTests.cs new file mode 100644 index 0000000..51eaa58 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/RbmActionTypeEnumTests.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.Unit.Model +{ + /// + /// Class for testing RbmActionTypeEnum + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class RbmActionTypeEnumTests : IDisposable + { + private RbmActionTypeEnum instance; + + public RbmActionTypeEnumTests() + { + instance = new RbmActionTypeEnum(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of RbmActionTypeEnum + /// + [Fact] + public void RbmActionTypeEnumInstanceTest() + { + Assert.IsType(instance); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/RbmActionViewLocationTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/RbmActionViewLocationTests.cs new file mode 100644 index 0000000..7885123 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/RbmActionViewLocationTests.cs @@ -0,0 +1,122 @@ +/* + * 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 RbmActionViewLocation + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class RbmActionViewLocationTests : IDisposable + { + private RbmActionViewLocation instance; + + public RbmActionViewLocationTests() + { + instance = new RbmActionViewLocation( + type: RbmActionTypeEnum.SHOWLOCATION, + text: "TestText", + postBackData: new byte[] { 1, 2, 3 }, + latitude: 37.7749, + longitude: -122.4194, + label: "TestLabel" + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of RbmActionViewLocation + /// + [Fact] + public void RbmActionViewLocationInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'Type' + /// + [Fact] + public void TypeTest() + { + Assert.IsType(instance.Type); + Assert.Equal(RbmActionTypeEnum.SHOWLOCATION, instance.Type); + } + + /// + /// Test the property 'Text' + /// + [Fact] + public void TextTest() + { + Assert.IsType(instance.Text); + Assert.Equal("TestText", instance.Text); + } + + /// + /// Test the property 'PostBackData' + /// + [Fact] + public void PostBackDataTest() + { + Assert.IsType(instance.PostBackData); + Assert.Equal(new byte[] { 1, 2, 3 }, instance.PostBackData); + } + + /// + /// 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); + } + + /// + /// Test the property 'Label' + /// + [Fact] + public void LabelTest() + { + Assert.IsType(instance.Label); + Assert.Equal("TestLabel", instance.Label); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/RbmCardContentMediaTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/RbmCardContentMediaTests.cs new file mode 100644 index 0000000..1ca70fd --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/RbmCardContentMediaTests.cs @@ -0,0 +1,89 @@ +/* + * 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 RbmCardContentMedia + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class RbmCardContentMediaTests : IDisposable + { + private RbmCardContentMedia instance; + + public RbmCardContentMediaTests() + { + instance = new RbmCardContentMedia( + fileUrl: "https://example.com/file.jpg", + thumbnailUrl: "https://example.com/thumbnail.jpg", + height: RbmMediaHeightEnum.MEDIUM + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of RbmCardContentMedia + /// + [Fact] + public void RbmCardContentMediaInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'FileUrl' + /// + [Fact] + public void FileUrlTest() + { + Assert.IsType(instance.FileUrl); + Assert.Equal("https://example.com/file.jpg", instance.FileUrl); + } + + /// + /// Test the property 'ThumbnailUrl' + /// + [Fact] + public void ThumbnailUrlTest() + { + Assert.IsType(instance.ThumbnailUrl); + Assert.Equal("https://example.com/thumbnail.jpg", instance.ThumbnailUrl); + } + + /// + /// Test the property 'Height' + /// + [Fact] + public void HeightTest() + { + Assert.IsType(instance.Height); + Assert.Equal(RbmMediaHeightEnum.MEDIUM, instance.Height); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/RbmCardContentTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/RbmCardContentTests.cs new file mode 100644 index 0000000..b417289 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/RbmCardContentTests.cs @@ -0,0 +1,112 @@ +/* + * 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 RbmCardContent + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class RbmCardContentTests : IDisposable + { + private RbmCardContent instance; + + public RbmCardContentTests() + { + instance = new RbmCardContent( + title: "TestTitle", + description: "TestDescription", + media: new RbmCardContentMedia( + fileUrl: "https://test.url/", + thumbnailUrl: "https://test.url/", + height: RbmMediaHeightEnum.MEDIUM + ), + suggestions: new List + { + new MultiChannelAction(new RbmActionBase( + type: RbmActionTypeEnum.REPLY, + text: "Test", + postBackData: new byte[] { 1, 2, 3 } + )) + } + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of RbmCardContent + /// + [Fact] + public void RbmCardContentInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'Title' + /// + [Fact] + public void TitleTest() + { + instance.Title = "TestTitle"; + Assert.IsType(instance.Title); + Assert.Equal("TestTitle", instance.Title); + } + + /// + /// Test the property 'Description' + /// + [Fact] + public void DescriptionTest() + { + instance.Description = "TestDescription"; + Assert.IsType(instance.Description); + Assert.Equal("TestDescription", instance.Description); + } + + /// + /// Test the property 'Media' + /// + [Fact] + public void MediaTest() + { + Assert.IsType(instance.Media); + } + + /// + /// Test the property 'Suggestions' + /// + [Fact] + public void SuggestionsTest() + { + instance.Suggestions = new List(); + Assert.IsType>(instance.Suggestions); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/RbmMediaHeightEnumTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/RbmMediaHeightEnumTests.cs new file mode 100644 index 0000000..ad999fc --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/RbmMediaHeightEnumTests.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.Unit.Model +{ + /// + /// Class for testing RbmMediaHeightEnum + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class RbmMediaHeightEnumTests : IDisposable + { + private RbmMediaHeightEnum instance; + + public RbmMediaHeightEnumTests() + { + instance = new RbmMediaHeightEnum(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of RbmMediaHeightEnum + /// + [Fact] + public void RbmMediaHeightEnumInstanceTest() + { + Assert.IsType(instance); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/RbmMessageCarouselCardTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/RbmMessageCarouselCardTests.cs new file mode 100644 index 0000000..99118f9 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/RbmMessageCarouselCardTests.cs @@ -0,0 +1,87 @@ +/* + * 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 RbmMessageCarouselCard + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class RbmMessageCarouselCardTests : IDisposable + { + private RbmMessageCarouselCard instance; + + public RbmMessageCarouselCardTests() + { + instance = new RbmMessageCarouselCard( + cardWidth: CardWidthEnum.MEDIUM, + cardContents: new List(), + suggestions: new List() + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of RbmMessageCarouselCard + /// + [Fact] + public void RbmMessageCarouselCardInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'CardWidth' + /// + [Fact] + public void CardWidthTest() + { + Assert.IsType(instance.CardWidth); + Assert.Equal(CardWidthEnum.MEDIUM, instance.CardWidth); + } + + /// + /// Test the property 'CardContents' + /// + [Fact] + public void CardContentsTest() + { + Assert.IsType>(instance.CardContents); + } + + /// + /// Test the property 'Suggestions' + /// + [Fact] + public void SuggestionsTest() + { + Assert.IsType>(instance.Suggestions); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/RbmMessageContentFileTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/RbmMessageContentFileTests.cs new file mode 100644 index 0000000..3360cea --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/RbmMessageContentFileTests.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.Unit.Model +{ + /// + /// Class for testing RbmMessageContentFile + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class RbmMessageContentFileTests : IDisposable + { + private RbmMessageContentFile instance; + + public RbmMessageContentFileTests() + { + instance = new RbmMessageContentFile( + fileUrl: "https://test.url/", + thumbnailUrl: "https://test.url/" + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of RbmMessageContentFile + /// + [Fact] + public void RbmMessageContentFileInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'FileUrl' + /// + [Fact] + public void FileUrlTest() + { + Assert.IsType(instance.FileUrl); + Assert.Equal("https://test.url/", instance.FileUrl); + } + + /// + /// Test the property 'ThumbnailUrl' + /// + [Fact] + public void ThumbnailUrlTest() + { + Assert.IsType(instance.ThumbnailUrl); + Assert.Equal("https://test.url/", instance.ThumbnailUrl); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/RbmMessageContentRichCardTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/RbmMessageContentRichCardTests.cs new file mode 100644 index 0000000..9344426 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/RbmMessageContentRichCardTests.cs @@ -0,0 +1,90 @@ +/* + * 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 RbmMessageContentRichCard + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class RbmMessageContentRichCardTests : IDisposable + { + private List suggestions; + private RbmCardContent cardContent; + private RbmMessageContentRichCard instanceRbmStandaloneCard; + private RbmMessageContentRichCard instanceRbmMessageCarouselCard; + + public RbmMessageContentRichCardTests() + { + suggestions = new List { + new MultiChannelAction(new RbmActionBase( + type: RbmActionTypeEnum.REPLY, + text: "Test", + postBackData: new byte[] { 1, 2, 3 } + )) + }; + + cardContent = new RbmCardContent( + title: "TestTitle", + description: "TestDescription", + media: new RbmCardContentMedia( + fileUrl: "https://test.url/", + thumbnailUrl: "https://test.url/", + height: RbmMediaHeightEnum.MEDIUM + ), + suggestions: suggestions + ); + + instanceRbmStandaloneCard = new RbmMessageContentRichCard(new RbmStandaloneCard( + orientation: StandaloneCardOrientationEnum.VERTICAL, + thumbnailImageAlignment: ThumbnailAlignmentEnum.LEFT, + cardContent: cardContent, + suggestions: suggestions + )); + instanceRbmMessageCarouselCard = new RbmMessageContentRichCard(new RbmMessageCarouselCard( + cardWidth: CardWidthEnum.SMALL, + cardContents: new List { cardContent }, + suggestions: suggestions + )); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of RbmMessageContentRichCard + /// + [Fact] + public void RbmMessageContentRichCardInstanceTest() + { + Assert.IsType(instanceRbmStandaloneCard); + Assert.IsType(instanceRbmStandaloneCard.ActualInstance); + Assert.IsType(instanceRbmMessageCarouselCard); + Assert.IsType(instanceRbmMessageCarouselCard.ActualInstance); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/RbmMessageContentTextTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/RbmMessageContentTextTests.cs new file mode 100644 index 0000000..f7d5994 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/RbmMessageContentTextTests.cs @@ -0,0 +1,77 @@ +/* + * 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 RbmMessageContentText + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class RbmMessageContentTextTests : IDisposable + { + private RbmMessageContentText instance; + + public RbmMessageContentTextTests() + { + instance = new RbmMessageContentText( + text: "Test message", + suggestions: new List() + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of RbmMessageContentText + /// + [Fact] + public void RbmMessageContentTextInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'Text' + /// + [Fact] + public void TextTest() + { + Assert.IsType(instance.Text); + Assert.Equal("Test message", instance.Text); + } + + /// + /// Test the property 'Suggestions' + /// + [Fact] + public void SuggestionsTest() + { + Assert.IsType>(instance.Suggestions); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/RbmMessageMediaTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/RbmMessageMediaTests.cs new file mode 100644 index 0000000..97696aa --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/RbmMessageMediaTests.cs @@ -0,0 +1,86 @@ +/* + * 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 RbmMessageMedia + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class RbmMessageMediaTests : IDisposable + { + private RbmMessageMedia instance; + + public RbmMessageMediaTests() + { + instance = new RbmMessageMedia( + media: new RbmMessageContentFile( + fileUrl: "https://test.url/", + thumbnailUrl: "https://test.url/" + ), + suggestions: new List + { + new MultiChannelAction(new RbmActionBase( + type: RbmActionTypeEnum.REPLY, + text: "Test", + postBackData: new byte[] { 1, 2, 3 } + )) + } + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of RbmMessageMedia + /// + [Fact] + public void RbmMessageMediaInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'Media' + /// + [Fact] + public void MediaTest() + { + Assert.IsType(instance.Media); + } + + /// + /// Test the property 'Suggestions' + /// + [Fact] + public void SuggestionsTest() + { + Assert.IsType>(instance.Suggestions); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/RbmStandaloneCardTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/RbmStandaloneCardTests.cs new file mode 100644 index 0000000..1dc29bf --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/RbmStandaloneCardTests.cs @@ -0,0 +1,98 @@ +/* + * 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 RbmStandaloneCard + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class RbmStandaloneCardTests : IDisposable + { + private RbmStandaloneCard instance; + + public RbmStandaloneCardTests() + { + instance = new RbmStandaloneCard( + orientation: StandaloneCardOrientationEnum.VERTICAL, + thumbnailImageAlignment: ThumbnailAlignmentEnum.LEFT, + cardContent: new RbmCardContent(), + suggestions: new List() + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of RbmStandaloneCard + /// + [Fact] + public void RbmStandaloneCardInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'Orientation' + /// + [Fact] + public void OrientationTest() + { + Assert.IsType(instance.Orientation); + Assert.Equal(StandaloneCardOrientationEnum.VERTICAL, instance.Orientation); + } + + /// + /// Test the property 'ThumbnailImageAlignment' + /// + [Fact] + public void ThumbnailImageAlignmentTest() + { + Assert.IsType(instance.ThumbnailImageAlignment); + Assert.Equal(ThumbnailAlignmentEnum.LEFT, instance.ThumbnailImageAlignment); + } + + /// + /// Test the property 'CardContent' + /// + [Fact] + public void CardContentTest() + { + Assert.IsType(instance.CardContent); + } + + /// + /// Test the property 'Suggestions' + /// + [Fact] + public void SuggestionsTest() + { + Assert.IsType>(instance.Suggestions); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/SmsMessageContentTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/SmsMessageContentTests.cs new file mode 100644 index 0000000..2767072 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/SmsMessageContentTests.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.Unit.Model +{ + /// + /// Class for testing SmsMessageContent + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class SmsMessageContentTests : IDisposable + { + private SmsMessageContent instance; + + public SmsMessageContentTests() + { + instance = new SmsMessageContent( + text: "Test message" + ); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of SmsMessageContent + /// + [Fact] + public void SmsMessageContentInstanceTest() + { + Assert.IsType(instance); + } + + /// + /// Test the property 'Text' + /// + [Fact] + public void TextTest() + { + Assert.IsType(instance.Text); + Assert.Equal("Test message", instance.Text); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/StandaloneCardOrientationEnumTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/StandaloneCardOrientationEnumTests.cs new file mode 100644 index 0000000..574118f --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/StandaloneCardOrientationEnumTests.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.Unit.Model +{ + /// + /// Class for testing StandaloneCardOrientationEnum + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class StandaloneCardOrientationEnumTests : IDisposable + { + private StandaloneCardOrientationEnum instance; + + public StandaloneCardOrientationEnumTests() + { + instance = new StandaloneCardOrientationEnum(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of StandaloneCardOrientationEnum + /// + [Fact] + public void StandaloneCardOrientationEnumInstanceTest() + { + Assert.IsType(instance); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/TfvStatusTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/TfvStatusTests.cs index 093f807..65ce8b2 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/TfvStatusTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/TfvStatusTests.cs @@ -106,7 +106,7 @@ public void DeclineReasonDescriptionTest() public void ResubmitAllowedTest() { Assert.IsType(instance.ResubmitAllowed); - Assert.Equal(true, instance.ResubmitAllowed); + Assert.True(instance.ResubmitAllowed); } /// diff --git a/src/Bandwidth.Standard.Test/Unit/Model/ThumbnailAlignmentEnumTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/ThumbnailAlignmentEnumTests.cs new file mode 100644 index 0000000..3bb7960 --- /dev/null +++ b/src/Bandwidth.Standard.Test/Unit/Model/ThumbnailAlignmentEnumTests.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.Unit.Model +{ + /// + /// Class for testing ThumbnailAlignmentEnum + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ThumbnailAlignmentEnumTests : IDisposable + { + private ThumbnailAlignmentEnum instance; + + public ThumbnailAlignmentEnumTests() + { + instance = new ThumbnailAlignmentEnum(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ThumbnailAlignmentEnum + /// + [Fact] + public void ThumbnailAlignmentEnumInstanceTest() + { + Assert.IsType(instance); + } + } +} diff --git a/src/Bandwidth.Standard.Test/Unit/Model/VerificationDenialWebhookTests.cs b/src/Bandwidth.Standard.Test/Unit/Model/VerificationDenialWebhookTests.cs index 2c32cb3..f3d4fb8 100644 --- a/src/Bandwidth.Standard.Test/Unit/Model/VerificationDenialWebhookTests.cs +++ b/src/Bandwidth.Standard.Test/Unit/Model/VerificationDenialWebhookTests.cs @@ -132,7 +132,7 @@ public void PhoneNumberTest() public void ResubmitAllowedTest() { Assert.IsType(instance.ResubmitAllowed); - Assert.Equal(true, instance.ResubmitAllowed); + Assert.True(instance.ResubmitAllowed); } /// diff --git a/src/Bandwidth.Standard/Api/MultiChannelApi.cs b/src/Bandwidth.Standard/Api/MultiChannelApi.cs new file mode 100644 index 0000000..a0e1daf --- /dev/null +++ b/src/Bandwidth.Standard/Api/MultiChannelApi.cs @@ -0,0 +1,388 @@ +/* + * 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.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Net; +using System.Net.Mime; +using Bandwidth.Standard.Client; +using Bandwidth.Standard.Model; + +namespace Bandwidth.Standard.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IMultiChannelApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Create Multi-Channel Message + /// + /// + /// Endpoint for sending Multi-Channel messages. + /// + /// Thrown when fails to make API call + /// Your Bandwidth Account ID. + /// + /// Index associated with the operation. + /// CreateMultiChannelMessageResponse + CreateMultiChannelMessageResponse CreateMultiChannelMessage(string accountId, MultiChannelMessageRequest multiChannelMessageRequest, int operationIndex = 0); + + /// + /// Create Multi-Channel Message + /// + /// + /// Endpoint for sending Multi-Channel messages. + /// + /// Thrown when fails to make API call + /// Your Bandwidth Account ID. + /// + /// Index associated with the operation. + /// ApiResponse of CreateMultiChannelMessageResponse + ApiResponse CreateMultiChannelMessageWithHttpInfo(string accountId, MultiChannelMessageRequest multiChannelMessageRequest, int operationIndex = 0); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IMultiChannelApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Create Multi-Channel Message + /// + /// + /// Endpoint for sending Multi-Channel messages. + /// + /// Thrown when fails to make API call + /// Your Bandwidth Account ID. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of CreateMultiChannelMessageResponse + System.Threading.Tasks.Task CreateMultiChannelMessageAsync(string accountId, MultiChannelMessageRequest multiChannelMessageRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Create Multi-Channel Message + /// + /// + /// Endpoint for sending Multi-Channel messages. + /// + /// Thrown when fails to make API call + /// Your Bandwidth Account ID. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreateMultiChannelMessageResponse) + System.Threading.Tasks.Task> CreateMultiChannelMessageWithHttpInfoAsync(string accountId, MultiChannelMessageRequest multiChannelMessageRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IMultiChannelApi : IMultiChannelApiSync, IMultiChannelApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class MultiChannelApi : IMultiChannelApi + { + private Bandwidth.Standard.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public MultiChannelApi() : this((string)null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// + public MultiChannelApi(string basePath) + { + this.Configuration = Bandwidth.Standard.Client.Configuration.MergeConfigurations( + Bandwidth.Standard.Client.GlobalConfiguration.Instance, + new Bandwidth.Standard.Client.Configuration { BasePath = basePath } + ); + this.Client = new Bandwidth.Standard.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Bandwidth.Standard.Client.ApiClient(this.Configuration.BasePath); + this.ExceptionFactory = Bandwidth.Standard.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public MultiChannelApi(Bandwidth.Standard.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Bandwidth.Standard.Client.Configuration.MergeConfigurations( + Bandwidth.Standard.Client.GlobalConfiguration.Instance, + configuration + ); + this.Client = new Bandwidth.Standard.Client.ApiClient(this.Configuration.BasePath); + this.AsynchronousClient = new Bandwidth.Standard.Client.ApiClient(this.Configuration.BasePath); + ExceptionFactory = Bandwidth.Standard.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + public MultiChannelApi(Bandwidth.Standard.Client.ISynchronousClient client, Bandwidth.Standard.Client.IAsynchronousClient asyncClient, Bandwidth.Standard.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Bandwidth.Standard.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// The client for accessing this underlying API asynchronously. + /// + public Bandwidth.Standard.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public Bandwidth.Standard.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Bandwidth.Standard.Client.IReadableConfiguration Configuration { get; set; } + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public Bandwidth.Standard.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Create Multi-Channel Message Endpoint for sending Multi-Channel messages. + /// + /// Thrown when fails to make API call + /// Your Bandwidth Account ID. + /// + /// Index associated with the operation. + /// CreateMultiChannelMessageResponse + public CreateMultiChannelMessageResponse CreateMultiChannelMessage(string accountId, MultiChannelMessageRequest multiChannelMessageRequest, int operationIndex = 0) + { + Bandwidth.Standard.Client.ApiResponse localVarResponse = CreateMultiChannelMessageWithHttpInfo(accountId, multiChannelMessageRequest); + return localVarResponse.Data; + } + + /// + /// Create Multi-Channel Message Endpoint for sending Multi-Channel messages. + /// + /// Thrown when fails to make API call + /// Your Bandwidth Account ID. + /// + /// Index associated with the operation. + /// ApiResponse of CreateMultiChannelMessageResponse + public Bandwidth.Standard.Client.ApiResponse CreateMultiChannelMessageWithHttpInfo(string accountId, MultiChannelMessageRequest multiChannelMessageRequest, 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 MultiChannelApi->CreateMultiChannelMessage"); + } + + // verify the required parameter 'multiChannelMessageRequest' is set + if (multiChannelMessageRequest == null) + { + throw new Bandwidth.Standard.Client.ApiException(400, "Missing required parameter 'multiChannelMessageRequest' when calling MultiChannelApi->CreateMultiChannelMessage"); + } + + Bandwidth.Standard.Client.RequestOptions localVarRequestOptions = new Bandwidth.Standard.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // 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.Data = multiChannelMessageRequest; + + localVarRequestOptions.Operation = "MultiChannelApi.CreateMultiChannelMessage"; + 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.Post("/users/{accountId}/messages/multiChannel", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateMultiChannelMessage", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Create Multi-Channel Message Endpoint for sending Multi-Channel messages. + /// + /// Thrown when fails to make API call + /// Your Bandwidth Account ID. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of CreateMultiChannelMessageResponse + public async System.Threading.Tasks.Task CreateMultiChannelMessageAsync(string accountId, MultiChannelMessageRequest multiChannelMessageRequest, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Bandwidth.Standard.Client.ApiResponse localVarResponse = await CreateMultiChannelMessageWithHttpInfoAsync(accountId, multiChannelMessageRequest, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Create Multi-Channel Message Endpoint for sending Multi-Channel messages. + /// + /// Thrown when fails to make API call + /// Your Bandwidth Account ID. + /// + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (CreateMultiChannelMessageResponse) + public async System.Threading.Tasks.Task> CreateMultiChannelMessageWithHttpInfoAsync(string accountId, MultiChannelMessageRequest multiChannelMessageRequest, 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 MultiChannelApi->CreateMultiChannelMessage"); + } + + // verify the required parameter 'multiChannelMessageRequest' is set + if (multiChannelMessageRequest == null) + { + throw new Bandwidth.Standard.Client.ApiException(400, "Missing required parameter 'multiChannelMessageRequest' when calling MultiChannelApi->CreateMultiChannelMessage"); + } + + + Bandwidth.Standard.Client.RequestOptions localVarRequestOptions = new Bandwidth.Standard.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "application/json" + }; + + // 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.Data = multiChannelMessageRequest; + + localVarRequestOptions.Operation = "MultiChannelApi.CreateMultiChannelMessage"; + 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.PostAsync("/users/{accountId}/messages/multiChannel", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("CreateMultiChannelMessage", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + } +} diff --git a/src/Bandwidth.Standard/Client/Configuration.cs b/src/Bandwidth.Standard/Client/Configuration.cs index 8d38d02..bdda77b 100644 --- a/src/Bandwidth.Standard/Client/Configuration.cs +++ b/src/Bandwidth.Standard/Client/Configuration.cs @@ -405,6 +405,18 @@ public Configuration() }, } }, + { + "MultiChannelApi.CreateMultiChannelMessage", new List> + { + { + new Dictionary + { + {"url", "https://messaging.bandwidth.com/api/v2"}, + {"description", "Production"} + } + }, + } + }, { "PhoneNumberLookupApi.CreateLookup", new List> { diff --git a/src/Bandwidth.Standard/Model/CardWidthEnum.cs b/src/Bandwidth.Standard/Model/CardWidthEnum.cs new file mode 100644 index 0000000..2de4e03 --- /dev/null +++ b/src/Bandwidth.Standard/Model/CardWidthEnum.cs @@ -0,0 +1,48 @@ +/* + * 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 cardWidthEnum + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum CardWidthEnum + { + /// + /// Enum SMALL for value: SMALL + /// + [EnumMember(Value = "SMALL")] + SMALL = 1, + + /// + /// Enum MEDIUM for value: MEDIUM + /// + [EnumMember(Value = "MEDIUM")] + MEDIUM = 2 + } + +} diff --git a/src/Bandwidth.Standard/Model/CreateMultiChannelMessageResponse.cs b/src/Bandwidth.Standard/Model/CreateMultiChannelMessageResponse.cs new file mode 100644 index 0000000..f1882ce --- /dev/null +++ b/src/Bandwidth.Standard/Model/CreateMultiChannelMessageResponse.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 +{ + /// + /// CreateMultiChannelMessageResponse + /// + [DataContract(Name = "createMultiChannelMessageResponse")] + public partial class CreateMultiChannelMessageResponse : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// links. + /// data. + /// errors. + public CreateMultiChannelMessageResponse(List links = default(List), MultiChannelMessageData data = default(MultiChannelMessageData), 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 = false)] + public MultiChannelMessageData 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 CreateMultiChannelMessageResponse {\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/ErrorObject.cs b/src/Bandwidth.Standard/Model/ErrorObject.cs new file mode 100644 index 0000000..37338e5 --- /dev/null +++ b/src/Bandwidth.Standard/Model/ErrorObject.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 +{ + /// + /// ErrorObject + /// + [DataContract(Name = "errorObject")] + public partial class ErrorObject : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// code. + /// message. + public ErrorObject(string code = default(string), string message = default(string)) + { + this.Code = code; + this.Message = message; + } + + /// + /// Gets or Sets Code + /// + [DataMember(Name = "code", EmitDefaultValue = false)] + public string Code { get; set; } + + /// + /// Gets or Sets Message + /// + [DataMember(Name = "message", EmitDefaultValue = false)] + public string 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 ErrorObject {\n"); + sb.Append(" Code: ").Append(Code).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/Link.cs b/src/Bandwidth.Standard/Model/Link.cs new file mode 100644 index 0000000..dcc8a0c --- /dev/null +++ b/src/Bandwidth.Standard/Model/Link.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 +{ + /// + /// Link + /// + [DataContract(Name = "link")] + public partial class Link : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// rel. + /// href. + public Link(string rel = default(string), string href = default(string)) + { + this.Rel = rel; + this.Href = href; + } + + /// + /// Gets or Sets Rel + /// + [DataMember(Name = "rel", EmitDefaultValue = false)] + public string Rel { get; set; } + + /// + /// Gets or Sets Href + /// + [DataMember(Name = "href", EmitDefaultValue = false)] + public string Href { 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 Link {\n"); + sb.Append(" Rel: ").Append(Rel).Append("\n"); + sb.Append(" Href: ").Append(Href).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/Bandwidth.Standard/Model/Message.cs b/src/Bandwidth.Standard/Model/Message.cs index 41ad137..f961887 100644 --- a/src/Bandwidth.Standard/Model/Message.cs +++ b/src/Bandwidth.Standard/Model/Message.cs @@ -59,7 +59,7 @@ public partial class Message : IValidatableObject /// The contents of the message.. /// The custom string set by the user.. /// priority. - /// The expiration date-time set by the user.. + /// 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)) { this.Id = id; @@ -158,9 +158,9 @@ public partial class Message : IValidatableObject public string Tag { get; set; } /// - /// The expiration date-time set by the user. + /// 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. /// - /// The expiration date-time set by the user. + /// 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; } diff --git a/src/Bandwidth.Standard/Model/MessageRequest.cs b/src/Bandwidth.Standard/Model/MessageRequest.cs index 5057942..45c1d4c 100644 --- a/src/Bandwidth.Standard/Model/MessageRequest.cs +++ b/src/Bandwidth.Standard/Model/MessageRequest.cs @@ -53,7 +53,7 @@ protected MessageRequest() { } /// A list of URLs to include as media attachments as part of the message. Each URL can be at most 4096 characters.. /// 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. Not supported on MMS.. + /// 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 MessageRequest(string applicationId = default(string), List to = default(List), string from = default(string), string text = default(string), List media = default(List), string tag = default(string), PriorityEnum? priority = default(PriorityEnum?), DateTime expiration = default(DateTime)) { // to ensure "applicationId" is required (not null) @@ -130,9 +130,9 @@ protected MessageRequest() { } 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. Not supported on MMS. + /// 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. Not supported on MMS. + /// 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; } diff --git a/src/Bandwidth.Standard/Model/MmsMessageContent.cs b/src/Bandwidth.Standard/Model/MmsMessageContent.cs new file mode 100644 index 0000000..70e81af --- /dev/null +++ b/src/Bandwidth.Standard/Model/MmsMessageContent.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 +{ + /// + /// MmsMessageContent + /// + [DataContract(Name = "mmsMessageContent")] + 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)) + { + this.Text = text; + this.Media = media; + } + + /// + /// The contents of the text message. Must be 2048 characters or less. + /// + /// The contents of the text message. Must be 2048 characters or less. + /// Hello world + [DataMember(Name = "text", EmitDefaultValue = false)] + 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. + /// + /// 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; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class MmsMessageContent {\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) + { + // Text (string) maxLength + if (this.Text != null && this.Text.Length > 2048) + { + yield return new ValidationResult("Invalid value for Text, length must be less than 2048.", new [] { "Text" }); + } + + yield break; + } + } + +} diff --git a/src/Bandwidth.Standard/Model/MultiChannelAction.cs b/src/Bandwidth.Standard/Model/MultiChannelAction.cs new file mode 100644 index 0000000..ac52180 --- /dev/null +++ b/src/Bandwidth.Standard/Model/MultiChannelAction.cs @@ -0,0 +1,400 @@ +/* + * 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 +{ + /// + /// MultiChannelAction + /// + [JsonConverter(typeof(MultiChannelActionJsonConverter))] + [DataContract(Name = "multiChannelAction")] + public partial class MultiChannelAction : AbstractOpenAPISchema, IValidatableObject + { + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of RbmActionBase. + public MultiChannelAction(RbmActionBase 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 RbmActionDial. + public MultiChannelAction(RbmActionDial 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 RbmActionViewLocation. + public MultiChannelAction(RbmActionViewLocation 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 MultiChannelActionCalendarEvent. + public MultiChannelAction(MultiChannelActionCalendarEvent 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 RbmActionOpenUrl. + public MultiChannelAction(RbmActionOpenUrl 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(MultiChannelActionCalendarEvent) || value is MultiChannelActionCalendarEvent) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(RbmActionBase) || value is RbmActionBase) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(RbmActionDial) || value is RbmActionDial) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(RbmActionOpenUrl) || value is RbmActionOpenUrl) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(RbmActionViewLocation) || value is RbmActionViewLocation) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: MultiChannelActionCalendarEvent, RbmActionBase, RbmActionDial, RbmActionOpenUrl, RbmActionViewLocation"); + } + } + } + + /// + /// Get the actual instance of `RbmActionBase`. If the actual instance is not `RbmActionBase`, + /// the InvalidClassException will be thrown + /// + /// An instance of RbmActionBase + public RbmActionBase GetRbmActionBase() + { + return (RbmActionBase)this.ActualInstance; + } + + /// + /// Get the actual instance of `RbmActionDial`. If the actual instance is not `RbmActionDial`, + /// the InvalidClassException will be thrown + /// + /// An instance of RbmActionDial + public RbmActionDial GetRbmActionDial() + { + return (RbmActionDial)this.ActualInstance; + } + + /// + /// Get the actual instance of `RbmActionViewLocation`. If the actual instance is not `RbmActionViewLocation`, + /// the InvalidClassException will be thrown + /// + /// An instance of RbmActionViewLocation + public RbmActionViewLocation GetRbmActionViewLocation() + { + return (RbmActionViewLocation)this.ActualInstance; + } + + /// + /// Get the actual instance of `MultiChannelActionCalendarEvent`. If the actual instance is not `MultiChannelActionCalendarEvent`, + /// the InvalidClassException will be thrown + /// + /// An instance of MultiChannelActionCalendarEvent + public MultiChannelActionCalendarEvent GetMultiChannelActionCalendarEvent() + { + return (MultiChannelActionCalendarEvent)this.ActualInstance; + } + + /// + /// Get the actual instance of `RbmActionOpenUrl`. If the actual instance is not `RbmActionOpenUrl`, + /// the InvalidClassException will be thrown + /// + /// An instance of RbmActionOpenUrl + public RbmActionOpenUrl GetRbmActionOpenUrl() + { + return (RbmActionOpenUrl)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 MultiChannelAction {\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, MultiChannelAction.SerializerSettings); + } + + /// + /// Converts the JSON string into an instance of MultiChannelAction + /// + /// JSON string + /// An instance of MultiChannelAction + public static MultiChannelAction FromJson(string jsonString) + { + MultiChannelAction newMultiChannelAction = null; + + if (string.IsNullOrEmpty(jsonString)) + { + return newMultiChannelAction; + } + int match = 0; + List matchedTypes = new List(); + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(MultiChannelActionCalendarEvent).GetProperty("AdditionalProperties") == null) + { + newMultiChannelAction = new MultiChannelAction(JsonConvert.DeserializeObject(jsonString, MultiChannelAction.SerializerSettings)); + } + else + { + newMultiChannelAction = new MultiChannelAction(JsonConvert.DeserializeObject(jsonString, MultiChannelAction.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("MultiChannelActionCalendarEvent"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into MultiChannelActionCalendarEvent: {1}", jsonString, exception.ToString())); + } + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(RbmActionBase).GetProperty("AdditionalProperties") == null) + { + newMultiChannelAction = new MultiChannelAction(JsonConvert.DeserializeObject(jsonString, MultiChannelAction.SerializerSettings)); + } + else + { + newMultiChannelAction = new MultiChannelAction(JsonConvert.DeserializeObject(jsonString, MultiChannelAction.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("RbmActionBase"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into RbmActionBase: {1}", jsonString, exception.ToString())); + } + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(RbmActionDial).GetProperty("AdditionalProperties") == null) + { + newMultiChannelAction = new MultiChannelAction(JsonConvert.DeserializeObject(jsonString, MultiChannelAction.SerializerSettings)); + } + else + { + newMultiChannelAction = new MultiChannelAction(JsonConvert.DeserializeObject(jsonString, MultiChannelAction.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("RbmActionDial"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into RbmActionDial: {1}", jsonString, exception.ToString())); + } + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(RbmActionOpenUrl).GetProperty("AdditionalProperties") == null) + { + newMultiChannelAction = new MultiChannelAction(JsonConvert.DeserializeObject(jsonString, MultiChannelAction.SerializerSettings)); + } + else + { + newMultiChannelAction = new MultiChannelAction(JsonConvert.DeserializeObject(jsonString, MultiChannelAction.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("RbmActionOpenUrl"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into RbmActionOpenUrl: {1}", jsonString, exception.ToString())); + } + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(RbmActionViewLocation).GetProperty("AdditionalProperties") == null) + { + newMultiChannelAction = new MultiChannelAction(JsonConvert.DeserializeObject(jsonString, MultiChannelAction.SerializerSettings)); + } + else + { + newMultiChannelAction = new MultiChannelAction(JsonConvert.DeserializeObject(jsonString, MultiChannelAction.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("RbmActionViewLocation"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into RbmActionViewLocation: {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 newMultiChannelAction; + } + + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// Custom JSON converter for MultiChannelAction + /// + public class MultiChannelActionJsonConverter : 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(MultiChannelAction).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 MultiChannelAction.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartArray: + return MultiChannelAction.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/MultiChannelActionCalendarEvent.cs b/src/Bandwidth.Standard/Model/MultiChannelActionCalendarEvent.cs new file mode 100644 index 0000000..8516fba --- /dev/null +++ b/src/Bandwidth.Standard/Model/MultiChannelActionCalendarEvent.cs @@ -0,0 +1,193 @@ +/* + * 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 +{ + /// + /// MultiChannelActionCalendarEvent + /// + [DataContract(Name = "multiChannelActionCalendarEvent")] + public partial class MultiChannelActionCalendarEvent : IValidatableObject + { + + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] + public RbmActionTypeEnum Type { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected MultiChannelActionCalendarEvent() { } + /// + /// Initializes a new instance of the class. + /// + /// type (required). + /// Displayed text for user to click (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)) + { + this.Type = type; + // to ensure "text" is required (not null) + if (text == null) + { + 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) + { + throw new ArgumentNullException("postBackData is a required property for MultiChannelActionCalendarEvent and cannot be null"); + } + this.PostBackData = postBackData; + // to ensure "title" is required (not null) + if (title == null) + { + throw new ArgumentNullException("title is a required property for MultiChannelActionCalendarEvent and cannot be null"); + } + this.Title = title; + this.StartTime = startTime; + this.EndTime = endTime; + this.Description = description; + } + + /// + /// Displayed text for user to click + /// + /// Displayed text for user to click + /// Hello world + [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = true)] + 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. + /// U0dWc2JHOGdkMjl5YkdRPQ== + [DataMember(Name = "postBackData", IsRequired = true, EmitDefaultValue = true)] + public byte[] PostBackData { get; set; } + + /// + /// The title of the event. + /// + /// The title of the event. + /// Meeting with John + [DataMember(Name = "title", IsRequired = true, EmitDefaultValue = true)] + public string Title { get; set; } + + /// + /// The start time of the event. + /// + /// The start time of the event. + /// 2022-09-14T18:20:16Z + [DataMember(Name = "startTime", IsRequired = true, EmitDefaultValue = true)] + public DateTime StartTime { get; set; } + + /// + /// The end time of the event. + /// + /// The end time of the event. + /// 2022-09-14T18:20:16Z + [DataMember(Name = "endTime", IsRequired = true, EmitDefaultValue = true)] + public DateTime EndTime { get; set; } + + /// + /// The description of the event. + /// + /// The description of the event. + /// Discuss the new project + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { 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 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(" Title: ").Append(Title).Append("\n"); + sb.Append(" StartTime: ").Append(StartTime).Append("\n"); + sb.Append(" EndTime: ").Append(EndTime).Append("\n"); + sb.Append(" Description: ").Append(Description).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) + { + // Text (string) maxLength + if (this.Text != null && this.Text.Length > 25) + { + 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) + { + yield return new ValidationResult("Invalid value for PostBackData, length must be less than 2048.", new [] { "PostBackData" }); + } + + // Title (string) maxLength + if (this.Title != null && this.Title.Length > 100) + { + yield return new ValidationResult("Invalid value for Title, length must be less than 100.", new [] { "Title" }); + } + + // Description (string) maxLength + if (this.Description != null && this.Description.Length > 500) + { + yield return new ValidationResult("Invalid value for Description, length must be less than 500.", new [] { "Description" }); + } + + yield break; + } + } + +} diff --git a/src/Bandwidth.Standard/Model/MultiChannelCallbackData.cs b/src/Bandwidth.Standard/Model/MultiChannelCallbackData.cs new file mode 100644 index 0000000..1c1f767 --- /dev/null +++ b/src/Bandwidth.Standard/Model/MultiChannelCallbackData.cs @@ -0,0 +1,124 @@ +/* + * 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/MultiChannelChannelListObject.cs b/src/Bandwidth.Standard/Model/MultiChannelChannelListObject.cs new file mode 100644 index 0000000..61c38fc --- /dev/null +++ b/src/Bandwidth.Standard/Model/MultiChannelChannelListObject.cs @@ -0,0 +1,134 @@ +/* + * 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 +{ + /// + /// MultiChannelChannelListObject + /// + [DataContract(Name = "multiChannelChannelListObject")] + public partial class MultiChannelChannelListObject : 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 MultiChannelChannelListObject() { } + /// + /// 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). + public MultiChannelChannelListObject(string from = default(string), string applicationId = default(string), MultiChannelMessageChannelEnum channel = default(MultiChannelMessageChannelEnum), MultiChannelChannelListObjectContent content = default(MultiChannelChannelListObjectContent)) + { + // to ensure "from" is required (not null) + if (from == null) + { + throw new ArgumentNullException("from is a required property for MultiChannelChannelListObject 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 MultiChannelChannelListObject 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 MultiChannelChannelListObject and cannot be null"); + } + this.Content = content; + } + + /// + /// 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; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class MultiChannelChannelListObject {\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("}\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/MultiChannelChannelListObjectContent.cs b/src/Bandwidth.Standard/Model/MultiChannelChannelListObjectContent.cs new file mode 100644 index 0000000..2ecab31 --- /dev/null +++ b/src/Bandwidth.Standard/Model/MultiChannelChannelListObjectContent.cs @@ -0,0 +1,399 @@ +/* + * 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; +using System.Reflection; + +namespace Bandwidth.Standard.Model +{ + /// + /// The content of the message. + /// + [JsonConverter(typeof(MultiChannelChannelListObjectContentJsonConverter))] + [DataContract(Name = "multiChannelChannelListObject_content")] + public partial class MultiChannelChannelListObjectContent : AbstractOpenAPISchema, IValidatableObject + { + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of RbmMessageContentText. + public MultiChannelChannelListObjectContent(RbmMessageContentText 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 RbmMessageMedia. + public MultiChannelChannelListObjectContent(RbmMessageMedia 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 RbmMessageContentRichCard. + public MultiChannelChannelListObjectContent(RbmMessageContentRichCard 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 SmsMessageContent. + public MultiChannelChannelListObjectContent(SmsMessageContent 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 MmsMessageContent. + public MultiChannelChannelListObjectContent(MmsMessageContent 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(MmsMessageContent) || value is MmsMessageContent) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(RbmMessageContentRichCard) || value is RbmMessageContentRichCard) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(RbmMessageContentText) || value is RbmMessageContentText) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(RbmMessageMedia) || value is RbmMessageMedia) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(SmsMessageContent) || value is SmsMessageContent) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: MmsMessageContent, RbmMessageContentRichCard, RbmMessageContentText, RbmMessageMedia, SmsMessageContent"); + } + } + } + + /// + /// Get the actual instance of `RbmMessageContentText`. If the actual instance is not `RbmMessageContentText`, + /// the InvalidClassException will be thrown + /// + /// An instance of RbmMessageContentText + public RbmMessageContentText GetRbmMessageContentText() + { + return (RbmMessageContentText)this.ActualInstance; + } + + /// + /// Get the actual instance of `RbmMessageMedia`. If the actual instance is not `RbmMessageMedia`, + /// the InvalidClassException will be thrown + /// + /// An instance of RbmMessageMedia + public RbmMessageMedia GetRbmMessageMedia() + { + return (RbmMessageMedia)this.ActualInstance; + } + + /// + /// Get the actual instance of `RbmMessageContentRichCard`. If the actual instance is not `RbmMessageContentRichCard`, + /// the InvalidClassException will be thrown + /// + /// An instance of RbmMessageContentRichCard + public RbmMessageContentRichCard GetRbmMessageContentRichCard() + { + return (RbmMessageContentRichCard)this.ActualInstance; + } + + /// + /// Get the actual instance of `SmsMessageContent`. If the actual instance is not `SmsMessageContent`, + /// the InvalidClassException will be thrown + /// + /// An instance of SmsMessageContent + public SmsMessageContent GetSmsMessageContent() + { + return (SmsMessageContent)this.ActualInstance; + } + + /// + /// Get the actual instance of `MmsMessageContent`. If the actual instance is not `MmsMessageContent`, + /// the InvalidClassException will be thrown + /// + /// An instance of MmsMessageContent + public MmsMessageContent GetMmsMessageContent() + { + return (MmsMessageContent)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 MultiChannelChannelListObjectContent {\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, MultiChannelChannelListObjectContent.SerializerSettings); + } + + /// + /// Converts the JSON string into an instance of MultiChannelChannelListObjectContent + /// + /// JSON string + /// An instance of MultiChannelChannelListObjectContent + public static MultiChannelChannelListObjectContent FromJson(string jsonString) + { + MultiChannelChannelListObjectContent newMultiChannelChannelListObjectContent = null; + + if (string.IsNullOrEmpty(jsonString)) + { + return newMultiChannelChannelListObjectContent; + } + int match = 0; + List matchedTypes = new List(); + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(MmsMessageContent).GetProperty("AdditionalProperties") == null) + { + newMultiChannelChannelListObjectContent = new MultiChannelChannelListObjectContent(JsonConvert.DeserializeObject(jsonString, MultiChannelChannelListObjectContent.SerializerSettings)); + } + else + { + newMultiChannelChannelListObjectContent = new MultiChannelChannelListObjectContent(JsonConvert.DeserializeObject(jsonString, MultiChannelChannelListObjectContent.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("MmsMessageContent"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into MmsMessageContent: {1}", jsonString, exception.ToString())); + } + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(RbmMessageContentRichCard).GetProperty("AdditionalProperties") == null) + { + newMultiChannelChannelListObjectContent = new MultiChannelChannelListObjectContent(JsonConvert.DeserializeObject(jsonString, MultiChannelChannelListObjectContent.SerializerSettings)); + } + else + { + newMultiChannelChannelListObjectContent = new MultiChannelChannelListObjectContent(JsonConvert.DeserializeObject(jsonString, MultiChannelChannelListObjectContent.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("RbmMessageContentRichCard"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into RbmMessageContentRichCard: {1}", jsonString, exception.ToString())); + } + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(RbmMessageContentText).GetProperty("AdditionalProperties") == null) + { + newMultiChannelChannelListObjectContent = new MultiChannelChannelListObjectContent(JsonConvert.DeserializeObject(jsonString, MultiChannelChannelListObjectContent.SerializerSettings)); + } + else + { + newMultiChannelChannelListObjectContent = new MultiChannelChannelListObjectContent(JsonConvert.DeserializeObject(jsonString, MultiChannelChannelListObjectContent.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("RbmMessageContentText"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into RbmMessageContentText: {1}", jsonString, exception.ToString())); + } + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(RbmMessageMedia).GetProperty("AdditionalProperties") == null) + { + newMultiChannelChannelListObjectContent = new MultiChannelChannelListObjectContent(JsonConvert.DeserializeObject(jsonString, MultiChannelChannelListObjectContent.SerializerSettings)); + } + else + { + newMultiChannelChannelListObjectContent = new MultiChannelChannelListObjectContent(JsonConvert.DeserializeObject(jsonString, MultiChannelChannelListObjectContent.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("RbmMessageMedia"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into RbmMessageMedia: {1}", jsonString, exception.ToString())); + } + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(SmsMessageContent).GetProperty("AdditionalProperties") == null) + { + newMultiChannelChannelListObjectContent = new MultiChannelChannelListObjectContent(JsonConvert.DeserializeObject(jsonString, MultiChannelChannelListObjectContent.SerializerSettings)); + } + else + { + newMultiChannelChannelListObjectContent = new MultiChannelChannelListObjectContent(JsonConvert.DeserializeObject(jsonString, MultiChannelChannelListObjectContent.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("SmsMessageContent"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into SmsMessageContent: {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 newMultiChannelChannelListObjectContent; + } + + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// Custom JSON converter for MultiChannelChannelListObjectContent + /// + public class MultiChannelChannelListObjectContentJsonConverter : 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(MultiChannelChannelListObjectContent).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 MultiChannelChannelListObjectContent.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartArray: + return MultiChannelChannelListObjectContent.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/MultiChannelMessageCallbackData.cs b/src/Bandwidth.Standard/Model/MultiChannelMessageCallbackData.cs new file mode 100644 index 0000000..b2e083b --- /dev/null +++ b/src/Bandwidth.Standard/Model/MultiChannelMessageCallbackData.cs @@ -0,0 +1,156 @@ +/* + * 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/MultiChannelMessageChannelEnum.cs b/src/Bandwidth.Standard/Model/MultiChannelMessageChannelEnum.cs new file mode 100644 index 0000000..c8a50f6 --- /dev/null +++ b/src/Bandwidth.Standard/Model/MultiChannelMessageChannelEnum.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 channel of the multi-channel message. + /// + /// The channel of the multi-channel message. + [JsonConverter(typeof(StringEnumConverter))] + public enum MultiChannelMessageChannelEnum + { + /// + /// Enum RBM for value: RBM + /// + [EnumMember(Value = "RBM")] + RBM = 1, + + /// + /// Enum SMS for value: SMS + /// + [EnumMember(Value = "SMS")] + SMS = 2, + + /// + /// Enum MMS for value: MMS + /// + [EnumMember(Value = "MMS")] + MMS = 3 + } + +} diff --git a/src/Bandwidth.Standard/Model/MultiChannelMessageData.cs b/src/Bandwidth.Standard/Model/MultiChannelMessageData.cs new file mode 100644 index 0000000..dd8c970 --- /dev/null +++ b/src/Bandwidth.Standard/Model/MultiChannelMessageData.cs @@ -0,0 +1,167 @@ +/* + * 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 new file mode 100644 index 0000000..bdeda19 --- /dev/null +++ b/src/Bandwidth.Standard/Model/MultiChannelMessageDirectionEnum.cs @@ -0,0 +1,48 @@ +/* + * 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/MultiChannelMessageRequest.cs b/src/Bandwidth.Standard/Model/MultiChannelMessageRequest.cs new file mode 100644 index 0000000..04ce2fb --- /dev/null +++ b/src/Bandwidth.Standard/Model/MultiChannelMessageRequest.cs @@ -0,0 +1,141 @@ +/* + * 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 +{ + /// + /// Multi-Channel Message Request + /// + [DataContract(Name = "multiChannelMessageRequest")] + public partial class MultiChannelMessageRequest : IValidatableObject + { + + /// + /// Gets or Sets Priority + /// + [DataMember(Name = "priority", EmitDefaultValue = false)] + public PriorityEnum? Priority { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected MultiChannelMessageRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// The phone number the message should be sent to 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 MultiChannelMessageRequest(string to = default(string), List channelList = default(List), string tag = default(string), PriorityEnum? priority = default(PriorityEnum?), DateTime expiration = default(DateTime)) + { + // to ensure "to" is required (not null) + if (to == null) + { + throw new ArgumentNullException("to is a required property for MultiChannelMessageRequest 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 MultiChannelMessageRequest and cannot be null"); + } + this.ChannelList = channelList; + this.Tag = tag; + this.Priority = priority; + this.Expiration = expiration; + } + + /// + /// 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", IsRequired = true, EmitDefaultValue = true)] + public string 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 MultiChannelMessageRequest {\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/MultiChannelStatusEnum.cs b/src/Bandwidth.Standard/Model/MultiChannelStatusEnum.cs new file mode 100644 index 0000000..93b2a12 --- /dev/null +++ b/src/Bandwidth.Standard/Model/MultiChannelStatusEnum.cs @@ -0,0 +1,60 @@ +/* + * 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/PriorityEnum.cs b/src/Bandwidth.Standard/Model/PriorityEnum.cs index c9af4a1..3579f50 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. Not supported on MMS. + /// The priority specified by the user. /// - /// The priority specified by the user. Not supported on MMS. + /// The priority specified by the user. [JsonConverter(typeof(StringEnumConverter))] public enum PriorityEnum { diff --git a/src/Bandwidth.Standard/Model/RbmActionBase.cs b/src/Bandwidth.Standard/Model/RbmActionBase.cs new file mode 100644 index 0000000..9c7b1f7 --- /dev/null +++ b/src/Bandwidth.Standard/Model/RbmActionBase.cs @@ -0,0 +1,132 @@ +/* + * 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 +{ + /// + /// RbmActionBase + /// + [DataContract(Name = "rbmActionBase")] + public partial class RbmActionBase : IValidatableObject + { + + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] + public RbmActionTypeEnum Type { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RbmActionBase() { } + /// + /// Initializes a new instance of the class. + /// + /// 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[])) + { + this.Type = type; + // to ensure "text" is required (not null) + if (text == null) + { + 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) + { + throw new ArgumentNullException("postBackData is a required property for RbmActionBase and cannot be null"); + } + this.PostBackData = postBackData; + } + + /// + /// Displayed text for user to click + /// + /// Displayed text for user to click + /// Hello world + [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = true)] + 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@c677d7e + [DataMember(Name = "postBackData", IsRequired = true, EmitDefaultValue = true)] + 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 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("}\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) + { + // Text (string) maxLength + if (this.Text != null && this.Text.Length > 25) + { + 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) + { + 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 new file mode 100644 index 0000000..b16e185 --- /dev/null +++ b/src/Bandwidth.Standard/Model/RbmActionDial.cs @@ -0,0 +1,148 @@ +/* + * 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 +{ + /// + /// RbmActionDial + /// + [DataContract(Name = "rbmActionDial")] + public partial class RbmActionDial : IValidatableObject + { + + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] + public RbmActionTypeEnum Type { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RbmActionDial() { } + /// + /// Initializes a new instance of the class. + /// + /// type (required). + /// Displayed text for user to click (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)) + { + this.Type = type; + // to ensure "text" is required (not null) + if (text == null) + { + 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) + { + throw new ArgumentNullException("postBackData is a required property for RbmActionDial and cannot be null"); + } + this.PostBackData = postBackData; + // to ensure "phoneNumber" is required (not null) + if (phoneNumber == null) + { + throw new ArgumentNullException("phoneNumber is a required property for RbmActionDial and cannot be null"); + } + this.PhoneNumber = phoneNumber; + } + + /// + /// Displayed text for user to click + /// + /// Displayed text for user to click + /// Hello world + [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = true)] + 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. + /// U0dWc2JHOGdkMjl5YkdRPQ== + [DataMember(Name = "postBackData", IsRequired = true, EmitDefaultValue = true)] + public byte[] PostBackData { get; set; } + + /// + /// The phone number to dial. Must be E164 format. + /// + /// The phone number to dial. Must be E164 format. + /// +15552223333 + [DataMember(Name = "phoneNumber", IsRequired = true, EmitDefaultValue = true)] + public string PhoneNumber { 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 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(" PhoneNumber: ").Append(PhoneNumber).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) + { + // Text (string) maxLength + if (this.Text != null && this.Text.Length > 25) + { + 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) + { + 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 new file mode 100644 index 0000000..c5e69ed --- /dev/null +++ b/src/Bandwidth.Standard/Model/RbmActionOpenUrl.cs @@ -0,0 +1,154 @@ +/* + * 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 +{ + /// + /// RbmActionOpenUrl + /// + [DataContract(Name = "rbmActionOpenUrl")] + public partial class RbmActionOpenUrl : IValidatableObject + { + + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] + public RbmActionTypeEnum Type { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RbmActionOpenUrl() { } + /// + /// Initializes a new instance of the class. + /// + /// type (required). + /// Displayed text for user to click (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)) + { + this.Type = type; + // to ensure "text" is required (not null) + if (text == null) + { + 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) + { + throw new ArgumentNullException("postBackData is a required property for RbmActionOpenUrl and cannot be null"); + } + this.PostBackData = postBackData; + // to ensure "url" is required (not null) + if (url == null) + { + throw new ArgumentNullException("url is a required property for RbmActionOpenUrl and cannot be null"); + } + this.Url = url; + } + + /// + /// Displayed text for user to click + /// + /// Displayed text for user to click + /// Hello world + [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = true)] + 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. + /// U0dWc2JHOGdkMjl5YkdRPQ== + [DataMember(Name = "postBackData", IsRequired = true, EmitDefaultValue = true)] + public byte[] PostBackData { get; set; } + + /// + /// The URL to open in browser. + /// + /// The URL to open in browser. + /// https://dev.bandwidth.com + [DataMember(Name = "url", IsRequired = true, EmitDefaultValue = true)] + public string Url { 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 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(" Url: ").Append(Url).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) + { + // Text (string) maxLength + if (this.Text != null && this.Text.Length > 25) + { + 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) + { + yield return new ValidationResult("Invalid value for PostBackData, length must be less than 2048.", new [] { "PostBackData" }); + } + + // Url (string) maxLength + if (this.Url != null && this.Url.Length > 2048) + { + yield return new ValidationResult("Invalid value for Url, length must be less than 2048.", new [] { "Url" }); + } + + yield break; + } + } + +} diff --git a/src/Bandwidth.Standard/Model/RbmActionTypeEnum.cs b/src/Bandwidth.Standard/Model/RbmActionTypeEnum.cs new file mode 100644 index 0000000..54b5bc2 --- /dev/null +++ b/src/Bandwidth.Standard/Model/RbmActionTypeEnum.cs @@ -0,0 +1,72 @@ +/* + * 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 rbmActionTypeEnum + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum RbmActionTypeEnum + { + /// + /// Enum REPLY for value: REPLY + /// + [EnumMember(Value = "REPLY")] + REPLY = 1, + + /// + /// Enum DIALPHONE for value: DIAL_PHONE + /// + [EnumMember(Value = "DIAL_PHONE")] + DIALPHONE = 2, + + /// + /// Enum SHOWLOCATION for value: SHOW_LOCATION + /// + [EnumMember(Value = "SHOW_LOCATION")] + SHOWLOCATION = 3, + + /// + /// Enum CREATECALENDAREVENT for value: CREATE_CALENDAR_EVENT + /// + [EnumMember(Value = "CREATE_CALENDAR_EVENT")] + CREATECALENDAREVENT = 4, + + /// + /// Enum OPENURL for value: OPEN_URL + /// + [EnumMember(Value = "OPEN_URL")] + OPENURL = 5, + + /// + /// Enum REQUESTLOCATION for value: REQUEST_LOCATION + /// + [EnumMember(Value = "REQUEST_LOCATION")] + REQUESTLOCATION = 6 + } + +} diff --git a/src/Bandwidth.Standard/Model/RbmActionViewLocation.cs b/src/Bandwidth.Standard/Model/RbmActionViewLocation.cs new file mode 100644 index 0000000..b84e1da --- /dev/null +++ b/src/Bandwidth.Standard/Model/RbmActionViewLocation.cs @@ -0,0 +1,171 @@ +/* + * 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 +{ + /// + /// RbmActionViewLocation + /// + [DataContract(Name = "rbmActionViewLocation")] + public partial class RbmActionViewLocation : IValidatableObject + { + + /// + /// Gets or Sets Type + /// + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] + public RbmActionTypeEnum Type { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RbmActionViewLocation() { } + /// + /// Initializes a new instance of the class. + /// + /// type (required). + /// Displayed text for user to click (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)) + { + this.Type = type; + // to ensure "text" is required (not null) + if (text == null) + { + 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) + { + throw new ArgumentNullException("postBackData is a required property for RbmActionViewLocation and cannot be null"); + } + this.PostBackData = postBackData; + this.Latitude = latitude; + this.Longitude = longitude; + this.Label = label; + } + + /// + /// Displayed text for user to click + /// + /// Displayed text for user to click + /// Hello world + [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = true)] + 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. + /// U0dWc2JHOGdkMjl5YkdRPQ== + [DataMember(Name = "postBackData", IsRequired = true, EmitDefaultValue = true)] + public byte[] PostBackData { get; set; } + + /// + /// The latitude of the location. + /// + /// The latitude of the location. + /// 37.7749 + [DataMember(Name = "latitude", IsRequired = true, EmitDefaultValue = true)] + public double Latitude { get; set; } + + /// + /// The longitude of the location. + /// + /// The longitude of the location. + /// -122.4194 + [DataMember(Name = "longitude", IsRequired = true, EmitDefaultValue = true)] + public double Longitude { get; set; } + + /// + /// The label of the location. + /// + /// The label of the location. + /// San Francisco + [DataMember(Name = "label", EmitDefaultValue = false)] + public string Label { 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 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(" Latitude: ").Append(Latitude).Append("\n"); + sb.Append(" Longitude: ").Append(Longitude).Append("\n"); + sb.Append(" Label: ").Append(Label).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) + { + // Text (string) maxLength + if (this.Text != null && this.Text.Length > 25) + { + 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) + { + yield return new ValidationResult("Invalid value for PostBackData, length must be less than 2048.", new [] { "PostBackData" }); + } + + // Label (string) maxLength + if (this.Label != null && this.Label.Length > 100) + { + yield return new ValidationResult("Invalid value for Label, length must be less than 100.", new [] { "Label" }); + } + + yield break; + } + } + +} diff --git a/src/Bandwidth.Standard/Model/RbmCardContent.cs b/src/Bandwidth.Standard/Model/RbmCardContent.cs new file mode 100644 index 0000000..0faaa5c --- /dev/null +++ b/src/Bandwidth.Standard/Model/RbmCardContent.cs @@ -0,0 +1,127 @@ +/* + * 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 +{ + /// + /// RbmCardContent + /// + [DataContract(Name = "rbmCardContent")] + public partial class RbmCardContent : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// The title of the card. Must be 200 characters or less.. + /// The description of the card. Must be 2000 characters or less.. + /// media. + /// An array of suggested actions for the recipient that will be displayed on the rich card.. + public RbmCardContent(string title = default(string), string description = default(string), RbmCardContentMedia media = default(RbmCardContentMedia), List suggestions = default(List)) + { + this.Title = title; + this.Description = description; + this.Media = media; + this.Suggestions = suggestions; + } + + /// + /// The title of the card. Must be 200 characters or less. + /// + /// The title of the card. Must be 200 characters or less. + /// Bandwidth + [DataMember(Name = "title", EmitDefaultValue = false)] + public string Title { get; set; } + + /// + /// The description of the card. Must be 2000 characters or less. + /// + /// The description of the card. Must be 2000 characters or less. + /// Bandwidth is a communications platform as a service (CPaaS) company. + [DataMember(Name = "description", EmitDefaultValue = false)] + public string Description { get; set; } + + /// + /// Gets or Sets Media + /// + [DataMember(Name = "media", EmitDefaultValue = false)] + public RbmCardContentMedia Media { get; set; } + + /// + /// An array of suggested actions for the recipient that will be displayed on the rich card. + /// + /// An array of suggested actions for the recipient that will be displayed on the rich card. + [DataMember(Name = "suggestions", EmitDefaultValue = false)] + public List Suggestions { 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 RbmCardContent {\n"); + sb.Append(" Title: ").Append(Title).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" Media: ").Append(Media).Append("\n"); + sb.Append(" Suggestions: ").Append(Suggestions).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) + { + // Title (string) maxLength + if (this.Title != null && this.Title.Length > 200) + { + yield return new ValidationResult("Invalid value for Title, length must be less than 200.", new [] { "Title" }); + } + + // Description (string) maxLength + if (this.Description != null && this.Description.Length > 2000) + { + yield return new ValidationResult("Invalid value for Description, length must be less than 2000.", new [] { "Description" }); + } + + yield break; + } + } + +} diff --git a/src/Bandwidth.Standard/Model/RbmCardContentMedia.cs b/src/Bandwidth.Standard/Model/RbmCardContentMedia.cs new file mode 100644 index 0000000..169260b --- /dev/null +++ b/src/Bandwidth.Standard/Model/RbmCardContentMedia.cs @@ -0,0 +1,127 @@ +/* + * 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 +{ + /// + /// RbmCardContentMedia + /// + [DataContract(Name = "rbmCardContent_media")] + public partial class RbmCardContentMedia : IValidatableObject + { + + /// + /// Gets or Sets Height + /// + [DataMember(Name = "height", IsRequired = true, EmitDefaultValue = true)] + public RbmMediaHeightEnum Height { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RbmCardContentMedia() { } + /// + /// Initializes a new instance of the class. + /// + /// The URL of the media file. 100MB is the maximum file size. (required). + /// The URL of the thumbnail image. Applies only to video file media.. + /// height (required). + public RbmCardContentMedia(string fileUrl = default(string), string thumbnailUrl = default(string), RbmMediaHeightEnum height = default(RbmMediaHeightEnum)) + { + // to ensure "fileUrl" is required (not null) + if (fileUrl == null) + { + throw new ArgumentNullException("fileUrl is a required property for RbmCardContentMedia and cannot be null"); + } + this.FileUrl = fileUrl; + this.Height = height; + this.ThumbnailUrl = thumbnailUrl; + } + + /// + /// The URL of the media file. 100MB is the maximum file size. + /// + /// The URL of the media file. 100MB is the maximum file size. + /// https://dev.bandwidth.com/images/bandwidth-logo.png + [DataMember(Name = "fileUrl", IsRequired = true, EmitDefaultValue = true)] + public string FileUrl { get; set; } + + /// + /// The URL of the thumbnail image. Applies only to video file media. + /// + /// The URL of the thumbnail image. Applies only to video file media. + /// https://dev.bandwidth.com/images/bandwidth-logo.png + [DataMember(Name = "thumbnailUrl", EmitDefaultValue = false)] + public string ThumbnailUrl { 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 RbmCardContentMedia {\n"); + sb.Append(" FileUrl: ").Append(FileUrl).Append("\n"); + sb.Append(" ThumbnailUrl: ").Append(ThumbnailUrl).Append("\n"); + sb.Append(" Height: ").Append(Height).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" }); + } + + // ThumbnailUrl (string) maxLength + if (this.ThumbnailUrl != null && this.ThumbnailUrl.Length > 1000) + { + yield return new ValidationResult("Invalid value for ThumbnailUrl, length must be less than 1000.", new [] { "ThumbnailUrl" }); + } + + yield break; + } + } + +} diff --git a/src/Bandwidth.Standard/Model/RbmMediaHeightEnum.cs b/src/Bandwidth.Standard/Model/RbmMediaHeightEnum.cs new file mode 100644 index 0000000..0dc5f2a --- /dev/null +++ b/src/Bandwidth.Standard/Model/RbmMediaHeightEnum.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 height of the media. + /// + /// The height of the media. + [JsonConverter(typeof(StringEnumConverter))] + public enum RbmMediaHeightEnum + { + /// + /// Enum SHORT for value: SHORT + /// + [EnumMember(Value = "SHORT")] + SHORT = 1, + + /// + /// Enum MEDIUM for value: MEDIUM + /// + [EnumMember(Value = "MEDIUM")] + MEDIUM = 2, + + /// + /// Enum TALL for value: TALL + /// + [EnumMember(Value = "TALL")] + TALL = 3 + } + +} diff --git a/src/Bandwidth.Standard/Model/RbmMessageCarouselCard.cs b/src/Bandwidth.Standard/Model/RbmMessageCarouselCard.cs new file mode 100644 index 0000000..a01456f --- /dev/null +++ b/src/Bandwidth.Standard/Model/RbmMessageCarouselCard.cs @@ -0,0 +1,112 @@ +/* + * 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 +{ + /// + /// RbmMessageCarouselCard + /// + [DataContract(Name = "rbmMessageCarouselCard")] + public partial class RbmMessageCarouselCard : IValidatableObject + { + + /// + /// Gets or Sets CardWidth + /// + [DataMember(Name = "cardWidth", IsRequired = true, EmitDefaultValue = true)] + public CardWidthEnum CardWidth { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RbmMessageCarouselCard() { } + /// + /// Initializes a new instance of the class. + /// + /// cardWidth (required). + /// cardContents (required). + /// An array of suggested actions for the recipient.. + public RbmMessageCarouselCard(CardWidthEnum cardWidth = default(CardWidthEnum), List cardContents = default(List), List suggestions = default(List)) + { + this.CardWidth = cardWidth; + // to ensure "cardContents" is required (not null) + if (cardContents == null) + { + throw new ArgumentNullException("cardContents is a required property for RbmMessageCarouselCard and cannot be null"); + } + this.CardContents = cardContents; + this.Suggestions = suggestions; + } + + /// + /// Gets or Sets CardContents + /// + [DataMember(Name = "cardContents", IsRequired = true, EmitDefaultValue = true)] + public List CardContents { get; set; } + + /// + /// An array of suggested actions for the recipient. + /// + /// An array of suggested actions for the recipient. + [DataMember(Name = "suggestions", EmitDefaultValue = false)] + public List Suggestions { 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 RbmMessageCarouselCard {\n"); + sb.Append(" CardWidth: ").Append(CardWidth).Append("\n"); + sb.Append(" CardContents: ").Append(CardContents).Append("\n"); + sb.Append(" Suggestions: ").Append(Suggestions).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/RbmMessageContentFile.cs b/src/Bandwidth.Standard/Model/RbmMessageContentFile.cs new file mode 100644 index 0000000..295b3c6 --- /dev/null +++ b/src/Bandwidth.Standard/Model/RbmMessageContentFile.cs @@ -0,0 +1,118 @@ +/* + * 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 +{ + /// + /// RbmMessageContentFile + /// + [DataContract(Name = "rbmMessageContentFile")] + public partial class RbmMessageContentFile : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RbmMessageContentFile() { } + /// + /// Initializes a new instance of the class. + /// + /// The URL of the media file. 100MB is the maximum file size. (required). + /// The URL of the thumbnail image. Applies only to video file media.. + public RbmMessageContentFile(string fileUrl = default(string), string thumbnailUrl = default(string)) + { + // to ensure "fileUrl" is required (not null) + if (fileUrl == null) + { + throw new ArgumentNullException("fileUrl is a required property for RbmMessageContentFile and cannot be null"); + } + this.FileUrl = fileUrl; + this.ThumbnailUrl = thumbnailUrl; + } + + /// + /// The URL of the media file. 100MB is the maximum file size. + /// + /// The URL of the media file. 100MB is the maximum file size. + /// https://dev.bandwidth.com/images/bandwidth-logo.png + [DataMember(Name = "fileUrl", IsRequired = true, EmitDefaultValue = true)] + public string FileUrl { get; set; } + + /// + /// The URL of the thumbnail image. Applies only to video file media. + /// + /// The URL of the thumbnail image. Applies only to video file media. + /// https://dev.bandwidth.com/images/bandwidth-logo.png + [DataMember(Name = "thumbnailUrl", EmitDefaultValue = false)] + public string ThumbnailUrl { 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 RbmMessageContentFile {\n"); + sb.Append(" FileUrl: ").Append(FileUrl).Append("\n"); + sb.Append(" ThumbnailUrl: ").Append(ThumbnailUrl).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" }); + } + + // ThumbnailUrl (string) maxLength + if (this.ThumbnailUrl != null && this.ThumbnailUrl.Length > 1000) + { + yield return new ValidationResult("Invalid value for ThumbnailUrl, length must be less than 1000.", new [] { "ThumbnailUrl" }); + } + + yield break; + } + } + +} diff --git a/src/Bandwidth.Standard/Model/RbmMessageContentRichCard.cs b/src/Bandwidth.Standard/Model/RbmMessageContentRichCard.cs new file mode 100644 index 0000000..b701333 --- /dev/null +++ b/src/Bandwidth.Standard/Model/RbmMessageContentRichCard.cs @@ -0,0 +1,261 @@ +/* + * 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; +using System.Reflection; + +namespace Bandwidth.Standard.Model +{ + /// + /// RbmMessageContentRichCard + /// + [JsonConverter(typeof(RbmMessageContentRichCardJsonConverter))] + [DataContract(Name = "rbmMessageContentRichCard")] + public partial class RbmMessageContentRichCard : AbstractOpenAPISchema, IValidatableObject + { + /// + /// Initializes a new instance of the class + /// with the class + /// + /// An instance of RbmStandaloneCard. + public RbmMessageContentRichCard(RbmStandaloneCard 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 RbmMessageCarouselCard. + public RbmMessageContentRichCard(RbmMessageCarouselCard 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(RbmMessageCarouselCard) || value is RbmMessageCarouselCard) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(RbmStandaloneCard) || value is RbmStandaloneCard) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: RbmMessageCarouselCard, RbmStandaloneCard"); + } + } + } + + /// + /// Get the actual instance of `RbmStandaloneCard`. If the actual instance is not `RbmStandaloneCard`, + /// the InvalidClassException will be thrown + /// + /// An instance of RbmStandaloneCard + public RbmStandaloneCard GetRbmStandaloneCard() + { + return (RbmStandaloneCard)this.ActualInstance; + } + + /// + /// Get the actual instance of `RbmMessageCarouselCard`. If the actual instance is not `RbmMessageCarouselCard`, + /// the InvalidClassException will be thrown + /// + /// An instance of RbmMessageCarouselCard + public RbmMessageCarouselCard GetRbmMessageCarouselCard() + { + return (RbmMessageCarouselCard)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 RbmMessageContentRichCard {\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, RbmMessageContentRichCard.SerializerSettings); + } + + /// + /// Converts the JSON string into an instance of RbmMessageContentRichCard + /// + /// JSON string + /// An instance of RbmMessageContentRichCard + public static RbmMessageContentRichCard FromJson(string jsonString) + { + RbmMessageContentRichCard newRbmMessageContentRichCard = null; + + if (string.IsNullOrEmpty(jsonString)) + { + return newRbmMessageContentRichCard; + } + int match = 0; + List matchedTypes = new List(); + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(RbmMessageCarouselCard).GetProperty("AdditionalProperties") == null) + { + newRbmMessageContentRichCard = new RbmMessageContentRichCard(JsonConvert.DeserializeObject(jsonString, RbmMessageContentRichCard.SerializerSettings)); + } + else + { + newRbmMessageContentRichCard = new RbmMessageContentRichCard(JsonConvert.DeserializeObject(jsonString, RbmMessageContentRichCard.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("RbmMessageCarouselCard"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into RbmMessageCarouselCard: {1}", jsonString, exception.ToString())); + } + + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(RbmStandaloneCard).GetProperty("AdditionalProperties") == null) + { + newRbmMessageContentRichCard = new RbmMessageContentRichCard(JsonConvert.DeserializeObject(jsonString, RbmMessageContentRichCard.SerializerSettings)); + } + else + { + newRbmMessageContentRichCard = new RbmMessageContentRichCard(JsonConvert.DeserializeObject(jsonString, RbmMessageContentRichCard.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("RbmStandaloneCard"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into RbmStandaloneCard: {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 newRbmMessageContentRichCard; + } + + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// Custom JSON converter for RbmMessageContentRichCard + /// + public class RbmMessageContentRichCardJsonConverter : 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(RbmMessageContentRichCard).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 RbmMessageContentRichCard.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartArray: + return RbmMessageContentRichCard.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/RbmMessageContentText.cs b/src/Bandwidth.Standard/Model/RbmMessageContentText.cs new file mode 100644 index 0000000..48da8b1 --- /dev/null +++ b/src/Bandwidth.Standard/Model/RbmMessageContentText.cs @@ -0,0 +1,111 @@ +/* + * 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 +{ + /// + /// RbmMessageContentText + /// + [DataContract(Name = "rbmMessageContentText")] + public partial class RbmMessageContentText : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RbmMessageContentText() { } + /// + /// Initializes a new instance of the class. + /// + /// The text associated with the message. Must be 3270 characters or less (required). + /// An array of suggested actions for the recipient.. + public RbmMessageContentText(string text = default(string), List suggestions = default(List)) + { + // to ensure "text" is required (not null) + if (text == null) + { + throw new ArgumentNullException("text is a required property for RbmMessageContentText and cannot be null"); + } + this.Text = text; + this.Suggestions = suggestions; + } + + /// + /// The text associated with the message. Must be 3270 characters or less + /// + /// The text associated with the message. Must be 3270 characters or less + /// Hello world + [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = true)] + public string Text { get; set; } + + /// + /// An array of suggested actions for the recipient. + /// + /// An array of suggested actions for the recipient. + [DataMember(Name = "suggestions", EmitDefaultValue = false)] + public List Suggestions { 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 RbmMessageContentText {\n"); + sb.Append(" Text: ").Append(Text).Append("\n"); + sb.Append(" Suggestions: ").Append(Suggestions).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) + { + // Text (string) maxLength + if (this.Text != null && this.Text.Length > 3270) + { + yield return new ValidationResult("Invalid value for Text, length must be less than 3270.", new [] { "Text" }); + } + + yield break; + } + } + +} diff --git a/src/Bandwidth.Standard/Model/RbmMessageMedia.cs b/src/Bandwidth.Standard/Model/RbmMessageMedia.cs new file mode 100644 index 0000000..96a8925 --- /dev/null +++ b/src/Bandwidth.Standard/Model/RbmMessageMedia.cs @@ -0,0 +1,103 @@ +/* + * 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 +{ + /// + /// RbmMessageMedia + /// + [DataContract(Name = "rbmMessageMedia")] + public partial class RbmMessageMedia : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RbmMessageMedia() { } + /// + /// Initializes a new instance of the class. + /// + /// media (required). + /// An array of suggested actions for the recipient.. + public RbmMessageMedia(RbmMessageContentFile media = default(RbmMessageContentFile), List suggestions = default(List)) + { + // to ensure "media" is required (not null) + if (media == null) + { + throw new ArgumentNullException("media is a required property for RbmMessageMedia and cannot be null"); + } + this.Media = media; + this.Suggestions = suggestions; + } + + /// + /// Gets or Sets Media + /// + [DataMember(Name = "media", IsRequired = true, EmitDefaultValue = true)] + public RbmMessageContentFile Media { get; set; } + + /// + /// An array of suggested actions for the recipient. + /// + /// An array of suggested actions for the recipient. + [DataMember(Name = "suggestions", EmitDefaultValue = false)] + public List Suggestions { 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 RbmMessageMedia {\n"); + sb.Append(" Media: ").Append(Media).Append("\n"); + sb.Append(" Suggestions: ").Append(Suggestions).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/RbmStandaloneCard.cs b/src/Bandwidth.Standard/Model/RbmStandaloneCard.cs new file mode 100644 index 0000000..0109627 --- /dev/null +++ b/src/Bandwidth.Standard/Model/RbmStandaloneCard.cs @@ -0,0 +1,121 @@ +/* + * 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 +{ + /// + /// RbmStandaloneCard + /// + [DataContract(Name = "rbmStandaloneCard")] + public partial class RbmStandaloneCard : IValidatableObject + { + + /// + /// Gets or Sets Orientation + /// + [DataMember(Name = "orientation", IsRequired = true, EmitDefaultValue = true)] + public StandaloneCardOrientationEnum Orientation { get; set; } + + /// + /// Gets or Sets ThumbnailImageAlignment + /// + [DataMember(Name = "thumbnailImageAlignment", IsRequired = true, EmitDefaultValue = true)] + public ThumbnailAlignmentEnum ThumbnailImageAlignment { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RbmStandaloneCard() { } + /// + /// Initializes a new instance of the class. + /// + /// orientation (required). + /// thumbnailImageAlignment (required). + /// cardContent (required). + /// An array of suggested actions for the recipient.. + public RbmStandaloneCard(StandaloneCardOrientationEnum orientation = default(StandaloneCardOrientationEnum), ThumbnailAlignmentEnum thumbnailImageAlignment = default(ThumbnailAlignmentEnum), RbmCardContent cardContent = default(RbmCardContent), List suggestions = default(List)) + { + this.Orientation = orientation; + this.ThumbnailImageAlignment = thumbnailImageAlignment; + // to ensure "cardContent" is required (not null) + if (cardContent == null) + { + throw new ArgumentNullException("cardContent is a required property for RbmStandaloneCard and cannot be null"); + } + this.CardContent = cardContent; + this.Suggestions = suggestions; + } + + /// + /// Gets or Sets CardContent + /// + [DataMember(Name = "cardContent", IsRequired = true, EmitDefaultValue = true)] + public RbmCardContent CardContent { get; set; } + + /// + /// An array of suggested actions for the recipient. + /// + /// An array of suggested actions for the recipient. + [DataMember(Name = "suggestions", EmitDefaultValue = false)] + public List Suggestions { 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 RbmStandaloneCard {\n"); + sb.Append(" Orientation: ").Append(Orientation).Append("\n"); + sb.Append(" ThumbnailImageAlignment: ").Append(ThumbnailImageAlignment).Append("\n"); + sb.Append(" CardContent: ").Append(CardContent).Append("\n"); + sb.Append(" Suggestions: ").Append(Suggestions).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/SmsMessageContent.cs b/src/Bandwidth.Standard/Model/SmsMessageContent.cs new file mode 100644 index 0000000..6159658 --- /dev/null +++ b/src/Bandwidth.Standard/Model/SmsMessageContent.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 +{ + /// + /// SmsMessageContent + /// + [DataContract(Name = "smsMessageContent")] + public partial class SmsMessageContent : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SmsMessageContent() { } + /// + /// Initializes a new instance of the class. + /// + /// The contents of the text message. Must be 2048 characters or less. (required). + public SmsMessageContent(string text = default(string)) + { + // to ensure "text" is required (not null) + if (text == null) + { + throw new ArgumentNullException("text is a required property for SmsMessageContent and cannot be null"); + } + this.Text = text; + } + + /// + /// The contents of the text message. Must be 2048 characters or less. + /// + /// The contents of the text message. Must be 2048 characters or less. + /// Hello world + [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = true)] + public string Text { 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 SmsMessageContent {\n"); + sb.Append(" Text: ").Append(Text).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) + { + // Text (string) maxLength + if (this.Text != null && this.Text.Length > 2048) + { + yield return new ValidationResult("Invalid value for Text, length must be less than 2048.", new [] { "Text" }); + } + + yield break; + } + } + +} diff --git a/src/Bandwidth.Standard/Model/StandaloneCardOrientationEnum.cs b/src/Bandwidth.Standard/Model/StandaloneCardOrientationEnum.cs new file mode 100644 index 0000000..5af9f4c --- /dev/null +++ b/src/Bandwidth.Standard/Model/StandaloneCardOrientationEnum.cs @@ -0,0 +1,48 @@ +/* + * 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 standaloneCardOrientationEnum + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum StandaloneCardOrientationEnum + { + /// + /// Enum HORIZONTAL for value: HORIZONTAL + /// + [EnumMember(Value = "HORIZONTAL")] + HORIZONTAL = 1, + + /// + /// Enum VERTICAL for value: VERTICAL + /// + [EnumMember(Value = "VERTICAL")] + VERTICAL = 2 + } + +} diff --git a/src/Bandwidth.Standard/Model/ThumbnailAlignmentEnum.cs b/src/Bandwidth.Standard/Model/ThumbnailAlignmentEnum.cs new file mode 100644 index 0000000..96dfc89 --- /dev/null +++ b/src/Bandwidth.Standard/Model/ThumbnailAlignmentEnum.cs @@ -0,0 +1,49 @@ +/* + * 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 alignment of the thumbnail image in the card. Only applicable if the card using horizontal orientation. + /// + /// The alignment of the thumbnail image in the card. Only applicable if the card using horizontal orientation. + [JsonConverter(typeof(StringEnumConverter))] + public enum ThumbnailAlignmentEnum + { + /// + /// Enum LEFT for value: LEFT + /// + [EnumMember(Value = "LEFT")] + LEFT = 1, + + /// + /// Enum RIGHT for value: RIGHT + /// + [EnumMember(Value = "RIGHT")] + RIGHT = 2 + } + +}