Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,22 @@ docs/MmsMessageContentFile.md
docs/MultiChannelAction.md
docs/MultiChannelActionCalendarEvent.md
docs/MultiChannelApi.md
docs/MultiChannelChannelListObject.md
docs/MultiChannelChannelListObjectContent.md
docs/MultiChannelChannelListMMSObject.md
docs/MultiChannelChannelListMMSResponseObject.md
docs/MultiChannelChannelListObjectBase.md
docs/MultiChannelChannelListOwnerObject.md
docs/MultiChannelChannelListRBMObject.md
docs/MultiChannelChannelListRBMObjectAllOfContent.md
docs/MultiChannelChannelListRBMResponseObject.md
docs/MultiChannelChannelListRequestObject.md
docs/MultiChannelChannelListResponseObject.md
docs/MultiChannelChannelListSMSObject.md
docs/MultiChannelChannelListSMSResponseObject.md
docs/MultiChannelError.md
docs/MultiChannelMessageChannelEnum.md
docs/MultiChannelMessageContent.md
docs/MultiChannelMessageRequest.md
docs/MultiChannelMessageResponseData.md
docs/MultiChannelMessageResponseDataChannelListInner.md
docs/OptInWorkflow.md
docs/PageInfo.md
docs/PhoneNumberLookupApi.md
Expand Down Expand Up @@ -289,14 +297,22 @@ lib/bandwidth-sdk/models/mms_message_content.rb
lib/bandwidth-sdk/models/mms_message_content_file.rb
lib/bandwidth-sdk/models/multi_channel_action.rb
lib/bandwidth-sdk/models/multi_channel_action_calendar_event.rb
lib/bandwidth-sdk/models/multi_channel_channel_list_object.rb
lib/bandwidth-sdk/models/multi_channel_channel_list_object_content.rb
lib/bandwidth-sdk/models/multi_channel_channel_list_mms_object.rb
lib/bandwidth-sdk/models/multi_channel_channel_list_mms_response_object.rb
lib/bandwidth-sdk/models/multi_channel_channel_list_object_base.rb
lib/bandwidth-sdk/models/multi_channel_channel_list_owner_object.rb
lib/bandwidth-sdk/models/multi_channel_channel_list_rbm_object.rb
lib/bandwidth-sdk/models/multi_channel_channel_list_rbm_object_all_of_content.rb
lib/bandwidth-sdk/models/multi_channel_channel_list_rbm_response_object.rb
lib/bandwidth-sdk/models/multi_channel_channel_list_request_object.rb
lib/bandwidth-sdk/models/multi_channel_channel_list_response_object.rb
lib/bandwidth-sdk/models/multi_channel_channel_list_sms_object.rb
lib/bandwidth-sdk/models/multi_channel_channel_list_sms_response_object.rb
lib/bandwidth-sdk/models/multi_channel_error.rb
lib/bandwidth-sdk/models/multi_channel_message_channel_enum.rb
lib/bandwidth-sdk/models/multi_channel_message_content.rb
lib/bandwidth-sdk/models/multi_channel_message_request.rb
lib/bandwidth-sdk/models/multi_channel_message_response_data.rb
lib/bandwidth-sdk/models/multi_channel_message_response_data_channel_list_inner.rb
lib/bandwidth-sdk/models/opt_in_workflow.rb
lib/bandwidth-sdk/models/page_info.rb
lib/bandwidth-sdk/models/priority_enum.rb
Expand Down
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,14 +253,22 @@ Class | Method | HTTP request | Description
- [Bandwidth::MmsMessageContentFile](docs/MmsMessageContentFile.md)
- [Bandwidth::MultiChannelAction](docs/MultiChannelAction.md)
- [Bandwidth::MultiChannelActionCalendarEvent](docs/MultiChannelActionCalendarEvent.md)
- [Bandwidth::MultiChannelChannelListObject](docs/MultiChannelChannelListObject.md)
- [Bandwidth::MultiChannelChannelListObjectContent](docs/MultiChannelChannelListObjectContent.md)
- [Bandwidth::MultiChannelChannelListMMSObject](docs/MultiChannelChannelListMMSObject.md)
- [Bandwidth::MultiChannelChannelListMMSResponseObject](docs/MultiChannelChannelListMMSResponseObject.md)
- [Bandwidth::MultiChannelChannelListObjectBase](docs/MultiChannelChannelListObjectBase.md)
- [Bandwidth::MultiChannelChannelListOwnerObject](docs/MultiChannelChannelListOwnerObject.md)
- [Bandwidth::MultiChannelChannelListRBMObject](docs/MultiChannelChannelListRBMObject.md)
- [Bandwidth::MultiChannelChannelListRBMObjectAllOfContent](docs/MultiChannelChannelListRBMObjectAllOfContent.md)
- [Bandwidth::MultiChannelChannelListRBMResponseObject](docs/MultiChannelChannelListRBMResponseObject.md)
- [Bandwidth::MultiChannelChannelListRequestObject](docs/MultiChannelChannelListRequestObject.md)
- [Bandwidth::MultiChannelChannelListResponseObject](docs/MultiChannelChannelListResponseObject.md)
- [Bandwidth::MultiChannelChannelListSMSObject](docs/MultiChannelChannelListSMSObject.md)
- [Bandwidth::MultiChannelChannelListSMSResponseObject](docs/MultiChannelChannelListSMSResponseObject.md)
- [Bandwidth::MultiChannelError](docs/MultiChannelError.md)
- [Bandwidth::MultiChannelMessageChannelEnum](docs/MultiChannelMessageChannelEnum.md)
- [Bandwidth::MultiChannelMessageContent](docs/MultiChannelMessageContent.md)
- [Bandwidth::MultiChannelMessageRequest](docs/MultiChannelMessageRequest.md)
- [Bandwidth::MultiChannelMessageResponseData](docs/MultiChannelMessageResponseData.md)
- [Bandwidth::MultiChannelMessageResponseDataChannelListInner](docs/MultiChannelMessageResponseDataChannelListInner.md)
- [Bandwidth::OptInWorkflow](docs/OptInWorkflow.md)
- [Bandwidth::PageInfo](docs/PageInfo.md)
- [Bandwidth::PriorityEnum](docs/PriorityEnum.md)
Expand Down
100 changes: 78 additions & 22 deletions bandwidth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2490,7 +2490,7 @@ components:
$ref: '#/components/schemas/multiChannelAction'
maxItems: 11
multiChannelAction:
oneOf:
anyOf:
- $ref: '#/components/schemas/rbmActionBase'
- $ref: '#/components/schemas/rbmActionDial'
- $ref: '#/components/schemas/rbmActionViewLocation'
Expand All @@ -2505,7 +2505,7 @@ components:
CREATE_CALENDAR_EVENT: '#/components/schemas/multiChannelActionCalendarEvent'
OPEN_URL: '#/components/schemas/rbmActionOpenUrl'
REQUEST_LOCATION: '#/components/schemas/rbmActionBase'
multiChannelChannelListObject:
multiChannelChannelListObjectBase:
type: object
properties:
from:
Expand All @@ -2514,19 +2514,85 @@ components:
$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
multiChannelChannelListRBMObject:
allOf:
- $ref: '#/components/schemas/multiChannelChannelListObjectBase'
- type: object
properties:
content:
description: The content of the message.
oneOf:
- $ref: '#/components/schemas/rbmMessageContentText'
- $ref: '#/components/schemas/rbmMessageMedia'
- $ref: '#/components/schemas/rbmMessageContentRichCard'
required:
- content
multiChannelChannelListSMSObject:
allOf:
- $ref: '#/components/schemas/multiChannelChannelListObjectBase'
- type: object
properties:
content:
$ref: '#/components/schemas/smsMessageContent'
required:
- content
multiChannelChannelListMMSObject:
allOf:
- $ref: '#/components/schemas/multiChannelChannelListObjectBase'
- type: object
properties:
content:
$ref: '#/components/schemas/mmsMessageContent'
required:
- content
multiChannelChannelListRBMResponseObject:
allOf:
- $ref: '#/components/schemas/multiChannelChannelListRBMObject'
- $ref: '#/components/schemas/multiChannelChannelListOwnerObject'
multiChannelChannelListSMSResponseObject:
allOf:
- $ref: '#/components/schemas/multiChannelChannelListSMSObject'
- $ref: '#/components/schemas/multiChannelChannelListOwnerObject'
multiChannelChannelListMMSResponseObject:
allOf:
- $ref: '#/components/schemas/multiChannelChannelListMMSObject'
- $ref: '#/components/schemas/multiChannelChannelListOwnerObject'
multiChannelChannelListRequestObject:
anyOf:
- $ref: '#/components/schemas/multiChannelChannelListRBMObject'
- $ref: '#/components/schemas/multiChannelChannelListSMSObject'
- $ref: '#/components/schemas/multiChannelChannelListMMSObject'
discriminator:
propertyName: channel
mapping:
RBM: '#/components/schemas/multiChannelChannelListRBMObject'
SMS: '#/components/schemas/multiChannelChannelListSMSObject'
MMS: '#/components/schemas/multiChannelChannelListMMSObject'
multiChannelChannelListOwnerObject:
type: object
properties:
owner:
type: string
description: >-
The Bandwidth senderId associated with the message. Identical to
'from'.
required:
- owner
multiChannelChannelListResponseObject:
anyOf:
- $ref: '#/components/schemas/multiChannelChannelListRBMResponseObject'
- $ref: '#/components/schemas/multiChannelChannelListSMSResponseObject'
- $ref: '#/components/schemas/multiChannelChannelListMMSResponseObject'
discriminator:
propertyName: channel
mapping:
RBM: '#/components/schemas/multiChannelChannelListRBMResponseObject'
SMS: '#/components/schemas/multiChannelChannelListSMSResponseObject'
MMS: '#/components/schemas/multiChannelChannelListMMSResponseObject'
multiChannelMessageRequest:
description: Multi-Channel Message Request
type: object
Expand All @@ -2540,7 +2606,7 @@ components:
order they are listed. Once a message sends successfully, the others
will be ignored.
items:
$ref: '#/components/schemas/multiChannelChannelListObject'
$ref: '#/components/schemas/multiChannelChannelListRequestObject'
maxItems: 4
tag:
$ref: '#/components/schemas/tag'
Expand Down Expand Up @@ -2573,17 +2639,7 @@ components:
order they are listed. Once a message sends successfully, the others
will be ignored.
items:
allOf:
- $ref: '#/components/schemas/multiChannelChannelListObject'
- type: object
properties:
owner:
type: string
description: >-
The Bandwidth senderId associated with the message.
Identical to 'from'.
required:
- owner
$ref: '#/components/schemas/multiChannelChannelListResponseObject'
maxItems: 4
tag:
$ref: '#/components/schemas/tag'
Expand Down
113 changes: 32 additions & 81 deletions docs/MultiChannelAction.md
Original file line number Diff line number Diff line change
@@ -1,89 +1,40 @@
# Bandwidth::MultiChannelAction

## Class instance methods

### `openapi_one_of`

Returns the list of classes defined in oneOf.

#### Example

```ruby
require 'bandwidth-sdk'

Bandwidth::MultiChannelAction.openapi_one_of
# =>
# [
# :'MultiChannelActionCalendarEvent',
# :'RbmActionBase',
# :'RbmActionDial',
# :'RbmActionOpenUrl',
# :'RbmActionViewLocation'
# ]
```

### `openapi_discriminator_name`

Returns the discriminator's property name.

#### Example

```ruby
require 'bandwidth-sdk'

Bandwidth::MultiChannelAction.openapi_discriminator_name
# => :'type'
```

### `openapi_discriminator_name`

Returns the discriminator's mapping.

#### Example

```ruby
require 'bandwidth-sdk'

Bandwidth::MultiChannelAction.openapi_discriminator_mapping
# =>
# {
# :'CREATE_CALENDAR_EVENT' => :'MultiChannelActionCalendarEvent',
# :'DIAL_PHONE' => :'RbmActionDial',
# :'OPEN_URL' => :'RbmActionOpenUrl',
# :'REPLY' => :'RbmActionBase',
# :'REQUEST_LOCATION' => :'RbmActionBase',
# :'SHOW_LOCATION' => :'RbmActionViewLocation'
# }
```

### build

Find the appropriate object from the `openapi_one_of` list and casts the data into it.

#### Example
## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **type** | [**RbmActionTypeEnum**](RbmActionTypeEnum.md) | | |
| **text** | **String** | Displayed text for user to click | |
| **postback_data** | **String** | Base64 payload the customer receives when the reply is clicked. | |
| **phone_number** | **String** | The phone number to dial. Must be E164 format. | |
| **latitude** | **Float** | The latitude of the location. | |
| **longitude** | **Float** | The longitude of the location. | |
| **label** | **String** | The label of the location. | [optional] |
| **title** | **String** | The title of the event. | |
| **start_time** | **Time** | The start time of the event. | |
| **end_time** | **Time** | The end time of the event. | |
| **description** | **String** | The description of the event. | [optional] |
| **url** | **String** | The URL to open in browser. | |

## Example

```ruby
require 'bandwidth-sdk'

Bandwidth::MultiChannelAction.build(data)
# => #<MultiChannelActionCalendarEvent:0x00007fdd4aab02a0>

Bandwidth::MultiChannelAction.build(data_that_doesnt_match)
# => nil
instance = Bandwidth::MultiChannelAction.new(
type: null,
text: Hello world,
postback_data: U0dWc2JHOGdkMjl5YkdRPQ&#x3D;&#x3D;,
phone_number: +15552223333,
latitude: 37.7749,
longitude: -122.4194,
label: San Francisco,
title: Meeting with John,
start_time: 2022-09-14T18:20:16Z,
end_time: 2022-09-14T18:20:16Z,
description: Discuss the new project,
url: https://dev.bandwidth.com
)
```

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| **data** | **Mixed** | data to be matched against the list of oneOf items |

#### Return type

- `MultiChannelActionCalendarEvent`
- `RbmActionBase`
- `RbmActionDial`
- `RbmActionOpenUrl`
- `RbmActionViewLocation`
- `nil` (if no type matches)

2 changes: 1 addition & 1 deletion docs/MultiChannelApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ end

api_instance = Bandwidth::MultiChannelApi.new
account_id = '9900000' # String | Your Bandwidth Account ID.
multi_channel_message_request = Bandwidth::MultiChannelMessageRequest.new({to: '+15552223333', channel_list: [Bandwidth::MultiChannelChannelListObject.new({from: 'BandwidthRBM', application_id: '93de2206-9669-4e07-948d-329f4b722ee2', channel: Bandwidth::MultiChannelMessageChannelEnum::RBM, content: Bandwidth::MmsMessageContent.new})]}) # MultiChannelMessageRequest |
multi_channel_message_request = Bandwidth::MultiChannelMessageRequest.new({to: '+15552223333', channel_list: [Bandwidth::MultiChannelChannelListRequestObject.new({from: 'BandwidthRBM', application_id: '93de2206-9669-4e07-948d-329f4b722ee2', channel: Bandwidth::MultiChannelMessageChannelEnum::RBM, content: Bandwidth::MmsMessageContent.new})]}) # MultiChannelMessageRequest |

begin
# Create Multi-Channel Message
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Bandwidth::MultiChannelChannelListObject
# Bandwidth::MultiChannelChannelListMMSObject

## Properties

Expand All @@ -7,14 +7,14 @@
| **from** | **String** | The sender ID of the message. This could be an alphanumeric sender ID. | |
| **application_id** | **String** | The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. | |
| **channel** | [**MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | |
| **content** | [**MultiChannelChannelListObjectContent**](MultiChannelChannelListObjectContent.md) | | |
| **content** | [**MmsMessageContent**](MmsMessageContent.md) | | |

## Example

```ruby
require 'bandwidth-sdk'

instance = Bandwidth::MultiChannelChannelListObject.new(
instance = Bandwidth::MultiChannelChannelListMMSObject.new(
from: BandwidthRBM,
application_id: 93de2206-9669-4e07-948d-329f4b722ee2,
channel: null,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Bandwidth::MultiChannelMessageResponseDataChannelListInner
# Bandwidth::MultiChannelChannelListMMSResponseObject

## Properties

Expand All @@ -7,15 +7,15 @@
| **from** | **String** | The sender ID of the message. This could be an alphanumeric sender ID. | |
| **application_id** | **String** | The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. | |
| **channel** | [**MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | |
| **content** | [**MultiChannelChannelListObjectContent**](MultiChannelChannelListObjectContent.md) | | |
| **content** | [**MmsMessageContent**](MmsMessageContent.md) | | |
| **owner** | **String** | The Bandwidth senderId associated with the message. Identical to &#39;from&#39;. | |

## Example

```ruby
require 'bandwidth-sdk'

instance = Bandwidth::MultiChannelMessageResponseDataChannelListInner.new(
instance = Bandwidth::MultiChannelChannelListMMSResponseObject.new(
from: BandwidthRBM,
application_id: 93de2206-9669-4e07-948d-329f4b722ee2,
channel: null,
Expand Down
Loading