bandwidth-sdk 17.0.0 → 17.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/README.md +11 -3
- data/bandwidth.yml +78 -22
- data/coverage/.last_run.json +1 -1
- data/coverage/.resultset.json +115 -96
- data/coverage/index.html +660 -390
- data/docs/MultiChannelAction.md +32 -81
- data/docs/MultiChannelApi.md +1 -1
- data/docs/{MultiChannelChannelListObject.md → MultiChannelChannelListMMSObject.md} +3 -3
- data/docs/{MultiChannelMessageResponseDataChannelListInner.md → MultiChannelChannelListMMSResponseObject.md} +3 -3
- data/docs/MultiChannelChannelListObjectBase.md +22 -0
- data/docs/MultiChannelChannelListOwnerObject.md +18 -0
- data/docs/MultiChannelChannelListRBMObject.md +24 -0
- data/docs/{MultiChannelChannelListObjectContent.md → MultiChannelChannelListRBMObjectAllOfContent.md} +6 -10
- data/docs/MultiChannelChannelListRBMResponseObject.md +26 -0
- data/docs/MultiChannelChannelListRequestObject.md +24 -0
- data/docs/MultiChannelChannelListResponseObject.md +26 -0
- data/docs/MultiChannelChannelListSMSObject.md +24 -0
- data/docs/MultiChannelChannelListSMSResponseObject.md +26 -0
- data/docs/MultiChannelMessageRequest.md +1 -1
- data/docs/MultiChannelMessageResponseData.md +1 -1
- data/docs/RbmActionBase.md +1 -1
- data/docs/RbmSuggestionResponse.md +1 -1
- data/lib/bandwidth-sdk/models/multi_channel_action.rb +71 -26
- data/lib/bandwidth-sdk/models/{multi_channel_channel_list_object.rb → multi_channel_channel_list_mms_object.rb} +11 -4
- data/lib/bandwidth-sdk/models/{multi_channel_message_response_data_channel_list_inner.rb → multi_channel_channel_list_mms_response_object.rb} +6 -5
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_object_base.rb +275 -0
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_owner_object.rb +220 -0
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_rbm_object.rb +298 -0
- data/lib/bandwidth-sdk/models/{multi_channel_channel_list_object_content.rb → multi_channel_channel_list_rbm_object_all_of_content.rb} +2 -4
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_rbm_response_object.rb +316 -0
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_request_object.rb +104 -0
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_response_object.rb +104 -0
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_sms_object.rb +298 -0
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_sms_response_object.rb +316 -0
- data/lib/bandwidth-sdk/models/multi_channel_message_request.rb +1 -1
- data/lib/bandwidth-sdk/models/multi_channel_message_response_data.rb +1 -1
- data/lib/bandwidth-sdk/version.rb +1 -1
- data/lib/bandwidth-sdk.rb +11 -3
- data/spec/smoke/multi_channel_api_spec.rb +124 -23
- data/spec/smoke/phone_number_lookup_api_spec.rb +1 -1
- data/spec/unit/api/multi_channel_api_spec.rb +13 -2
- metadata +24 -8
data/docs/MultiChannelAction.md
CHANGED
|
@@ -1,89 +1,40 @@
|
|
|
1
1
|
# Bandwidth::MultiChannelAction
|
|
2
2
|
|
|
3
|
-
##
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
# :'RbmActionViewLocation'
|
|
22
|
-
# ]
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
### `openapi_discriminator_name`
|
|
26
|
-
|
|
27
|
-
Returns the discriminator's property name.
|
|
28
|
-
|
|
29
|
-
#### Example
|
|
30
|
-
|
|
31
|
-
```ruby
|
|
32
|
-
require 'bandwidth-sdk'
|
|
33
|
-
|
|
34
|
-
Bandwidth::MultiChannelAction.openapi_discriminator_name
|
|
35
|
-
# => :'type'
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### `openapi_discriminator_name`
|
|
39
|
-
|
|
40
|
-
Returns the discriminator's mapping.
|
|
41
|
-
|
|
42
|
-
#### Example
|
|
43
|
-
|
|
44
|
-
```ruby
|
|
45
|
-
require 'bandwidth-sdk'
|
|
46
|
-
|
|
47
|
-
Bandwidth::MultiChannelAction.openapi_discriminator_mapping
|
|
48
|
-
# =>
|
|
49
|
-
# {
|
|
50
|
-
# :'CREATE_CALENDAR_EVENT' => :'MultiChannelActionCalendarEvent',
|
|
51
|
-
# :'DIAL_PHONE' => :'RbmActionDial',
|
|
52
|
-
# :'OPEN_URL' => :'RbmActionOpenUrl',
|
|
53
|
-
# :'REPLY' => :'RbmActionBase',
|
|
54
|
-
# :'REQUEST_LOCATION' => :'RbmActionBase',
|
|
55
|
-
# :'SHOW_LOCATION' => :'RbmActionViewLocation'
|
|
56
|
-
# }
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
### build
|
|
60
|
-
|
|
61
|
-
Find the appropriate object from the `openapi_one_of` list and casts the data into it.
|
|
62
|
-
|
|
63
|
-
#### Example
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **type** | [**RbmActionTypeEnum**](RbmActionTypeEnum.md) | | |
|
|
8
|
+
| **text** | **String** | Displayed text for user to click | |
|
|
9
|
+
| **postback_data** | **String** | Base64 payload the customer receives when the reply is clicked. | |
|
|
10
|
+
| **phone_number** | **String** | The phone number to dial. Must be E164 format. | |
|
|
11
|
+
| **latitude** | **Float** | The latitude of the location. | |
|
|
12
|
+
| **longitude** | **Float** | The longitude of the location. | |
|
|
13
|
+
| **label** | **String** | The label of the location. | [optional] |
|
|
14
|
+
| **title** | **String** | The title of the event. | |
|
|
15
|
+
| **start_time** | **Time** | The start time of the event. | |
|
|
16
|
+
| **end_time** | **Time** | The end time of the event. | |
|
|
17
|
+
| **description** | **String** | The description of the event. | [optional] |
|
|
18
|
+
| **url** | **String** | The URL to open in browser. | |
|
|
19
|
+
|
|
20
|
+
## Example
|
|
64
21
|
|
|
65
22
|
```ruby
|
|
66
23
|
require 'bandwidth-sdk'
|
|
67
24
|
|
|
68
|
-
Bandwidth::MultiChannelAction.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
25
|
+
instance = Bandwidth::MultiChannelAction.new(
|
|
26
|
+
type: null,
|
|
27
|
+
text: Hello world,
|
|
28
|
+
postback_data: U0dWc2JHOGdkMjl5YkdRPQ==,
|
|
29
|
+
phone_number: +15552223333,
|
|
30
|
+
latitude: 37.7749,
|
|
31
|
+
longitude: -122.4194,
|
|
32
|
+
label: San Francisco,
|
|
33
|
+
title: Meeting with John,
|
|
34
|
+
start_time: 2022-09-14T18:20:16Z,
|
|
35
|
+
end_time: 2022-09-14T18:20:16Z,
|
|
36
|
+
description: Discuss the new project,
|
|
37
|
+
url: https://dev.bandwidth.com
|
|
38
|
+
)
|
|
73
39
|
```
|
|
74
40
|
|
|
75
|
-
#### Parameters
|
|
76
|
-
|
|
77
|
-
| Name | Type | Description |
|
|
78
|
-
| ---- | ---- | ----------- |
|
|
79
|
-
| **data** | **Mixed** | data to be matched against the list of oneOf items |
|
|
80
|
-
|
|
81
|
-
#### Return type
|
|
82
|
-
|
|
83
|
-
- `MultiChannelActionCalendarEvent`
|
|
84
|
-
- `RbmActionBase`
|
|
85
|
-
- `RbmActionDial`
|
|
86
|
-
- `RbmActionOpenUrl`
|
|
87
|
-
- `RbmActionViewLocation`
|
|
88
|
-
- `nil` (if no type matches)
|
|
89
|
-
|
data/docs/MultiChannelApi.md
CHANGED
|
@@ -29,7 +29,7 @@ end
|
|
|
29
29
|
|
|
30
30
|
api_instance = Bandwidth::MultiChannelApi.new
|
|
31
31
|
account_id = '9900000' # String | Your Bandwidth Account ID.
|
|
32
|
-
multi_channel_message_request = Bandwidth::MultiChannelMessageRequest.new({to: '+15552223333', channel_list: [Bandwidth::
|
|
32
|
+
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 |
|
|
33
33
|
|
|
34
34
|
begin
|
|
35
35
|
# Create Multi-Channel Message
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Bandwidth::
|
|
1
|
+
# Bandwidth::MultiChannelChannelListMMSObject
|
|
2
2
|
|
|
3
3
|
## Properties
|
|
4
4
|
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
| **from** | **String** | The sender ID of the message. This could be an alphanumeric sender ID. | |
|
|
8
8
|
| **application_id** | **String** | The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. | |
|
|
9
9
|
| **channel** | [**MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | |
|
|
10
|
-
| **content** | [**
|
|
10
|
+
| **content** | [**MmsMessageContent**](MmsMessageContent.md) | | |
|
|
11
11
|
|
|
12
12
|
## Example
|
|
13
13
|
|
|
14
14
|
```ruby
|
|
15
15
|
require 'bandwidth-sdk'
|
|
16
16
|
|
|
17
|
-
instance = Bandwidth::
|
|
17
|
+
instance = Bandwidth::MultiChannelChannelListMMSObject.new(
|
|
18
18
|
from: BandwidthRBM,
|
|
19
19
|
application_id: 93de2206-9669-4e07-948d-329f4b722ee2,
|
|
20
20
|
channel: null,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Bandwidth::
|
|
1
|
+
# Bandwidth::MultiChannelChannelListMMSResponseObject
|
|
2
2
|
|
|
3
3
|
## Properties
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
| **from** | **String** | The sender ID of the message. This could be an alphanumeric sender ID. | |
|
|
8
8
|
| **application_id** | **String** | The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. | |
|
|
9
9
|
| **channel** | [**MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | |
|
|
10
|
-
| **content** | [**
|
|
10
|
+
| **content** | [**MmsMessageContent**](MmsMessageContent.md) | | |
|
|
11
11
|
| **owner** | **String** | The Bandwidth senderId associated with the message. Identical to 'from'. | |
|
|
12
12
|
|
|
13
13
|
## Example
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
```ruby
|
|
16
16
|
require 'bandwidth-sdk'
|
|
17
17
|
|
|
18
|
-
instance = Bandwidth::
|
|
18
|
+
instance = Bandwidth::MultiChannelChannelListMMSResponseObject.new(
|
|
19
19
|
from: BandwidthRBM,
|
|
20
20
|
application_id: 93de2206-9669-4e07-948d-329f4b722ee2,
|
|
21
21
|
channel: null,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Bandwidth::MultiChannelChannelListObjectBase
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **from** | **String** | The sender ID of the message. This could be an alphanumeric sender ID. | |
|
|
8
|
+
| **application_id** | **String** | The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. | |
|
|
9
|
+
| **channel** | [**MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'bandwidth-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Bandwidth::MultiChannelChannelListObjectBase.new(
|
|
17
|
+
from: BandwidthRBM,
|
|
18
|
+
application_id: 93de2206-9669-4e07-948d-329f4b722ee2,
|
|
19
|
+
channel: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Bandwidth::MultiChannelChannelListOwnerObject
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **owner** | **String** | The Bandwidth senderId associated with the message. Identical to 'from'. | |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'bandwidth-sdk'
|
|
13
|
+
|
|
14
|
+
instance = Bandwidth::MultiChannelChannelListOwnerObject.new(
|
|
15
|
+
owner: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Bandwidth::MultiChannelChannelListRBMObject
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **from** | **String** | The sender ID of the message. This could be an alphanumeric sender ID. | |
|
|
8
|
+
| **application_id** | **String** | The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. | |
|
|
9
|
+
| **channel** | [**MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | |
|
|
10
|
+
| **content** | [**MultiChannelChannelListRBMObjectAllOfContent**](MultiChannelChannelListRBMObjectAllOfContent.md) | | |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'bandwidth-sdk'
|
|
16
|
+
|
|
17
|
+
instance = Bandwidth::MultiChannelChannelListRBMObject.new(
|
|
18
|
+
from: BandwidthRBM,
|
|
19
|
+
application_id: 93de2206-9669-4e07-948d-329f4b722ee2,
|
|
20
|
+
channel: null,
|
|
21
|
+
content: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Bandwidth::
|
|
1
|
+
# Bandwidth::MultiChannelChannelListRBMObjectAllOfContent
|
|
2
2
|
|
|
3
3
|
## Class instance methods
|
|
4
4
|
|
|
@@ -11,14 +11,12 @@ Returns the list of classes defined in oneOf.
|
|
|
11
11
|
```ruby
|
|
12
12
|
require 'bandwidth-sdk'
|
|
13
13
|
|
|
14
|
-
Bandwidth::
|
|
14
|
+
Bandwidth::MultiChannelChannelListRBMObjectAllOfContent.openapi_one_of
|
|
15
15
|
# =>
|
|
16
16
|
# [
|
|
17
|
-
# :'MmsMessageContent',
|
|
18
17
|
# :'RbmMessageContentRichCard',
|
|
19
18
|
# :'RbmMessageContentText',
|
|
20
|
-
# :'RbmMessageMedia'
|
|
21
|
-
# :'SmsMessageContent'
|
|
19
|
+
# :'RbmMessageMedia'
|
|
22
20
|
# ]
|
|
23
21
|
```
|
|
24
22
|
|
|
@@ -31,10 +29,10 @@ Find the appropriate object from the `openapi_one_of` list and casts the data in
|
|
|
31
29
|
```ruby
|
|
32
30
|
require 'bandwidth-sdk'
|
|
33
31
|
|
|
34
|
-
Bandwidth::
|
|
35
|
-
# => #<
|
|
32
|
+
Bandwidth::MultiChannelChannelListRBMObjectAllOfContent.build(data)
|
|
33
|
+
# => #<RbmMessageContentRichCard:0x00007fdd4aab02a0>
|
|
36
34
|
|
|
37
|
-
Bandwidth::
|
|
35
|
+
Bandwidth::MultiChannelChannelListRBMObjectAllOfContent.build(data_that_doesnt_match)
|
|
38
36
|
# => nil
|
|
39
37
|
```
|
|
40
38
|
|
|
@@ -46,10 +44,8 @@ Bandwidth::MultiChannelChannelListObjectContent.build(data_that_doesnt_match)
|
|
|
46
44
|
|
|
47
45
|
#### Return type
|
|
48
46
|
|
|
49
|
-
- `MmsMessageContent`
|
|
50
47
|
- `RbmMessageContentRichCard`
|
|
51
48
|
- `RbmMessageContentText`
|
|
52
49
|
- `RbmMessageMedia`
|
|
53
|
-
- `SmsMessageContent`
|
|
54
50
|
- `nil` (if no type matches)
|
|
55
51
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Bandwidth::MultiChannelChannelListRBMResponseObject
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **from** | **String** | The sender ID of the message. This could be an alphanumeric sender ID. | |
|
|
8
|
+
| **application_id** | **String** | The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. | |
|
|
9
|
+
| **channel** | [**MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | |
|
|
10
|
+
| **content** | [**MultiChannelChannelListRBMObjectAllOfContent**](MultiChannelChannelListRBMObjectAllOfContent.md) | | |
|
|
11
|
+
| **owner** | **String** | The Bandwidth senderId associated with the message. Identical to 'from'. | |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'bandwidth-sdk'
|
|
17
|
+
|
|
18
|
+
instance = Bandwidth::MultiChannelChannelListRBMResponseObject.new(
|
|
19
|
+
from: BandwidthRBM,
|
|
20
|
+
application_id: 93de2206-9669-4e07-948d-329f4b722ee2,
|
|
21
|
+
channel: null,
|
|
22
|
+
content: null,
|
|
23
|
+
owner: null
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Bandwidth::MultiChannelChannelListRequestObject
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **from** | **String** | The sender ID of the message. This could be an alphanumeric sender ID. | |
|
|
8
|
+
| **application_id** | **String** | The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. | |
|
|
9
|
+
| **channel** | [**MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | |
|
|
10
|
+
| **content** | [**MmsMessageContent**](MmsMessageContent.md) | | |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'bandwidth-sdk'
|
|
16
|
+
|
|
17
|
+
instance = Bandwidth::MultiChannelChannelListRequestObject.new(
|
|
18
|
+
from: BandwidthRBM,
|
|
19
|
+
application_id: 93de2206-9669-4e07-948d-329f4b722ee2,
|
|
20
|
+
channel: null,
|
|
21
|
+
content: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Bandwidth::MultiChannelChannelListResponseObject
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **from** | **String** | The sender ID of the message. This could be an alphanumeric sender ID. | |
|
|
8
|
+
| **application_id** | **String** | The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. | |
|
|
9
|
+
| **channel** | [**MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | |
|
|
10
|
+
| **content** | [**MmsMessageContent**](MmsMessageContent.md) | | |
|
|
11
|
+
| **owner** | **String** | The Bandwidth senderId associated with the message. Identical to 'from'. | |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'bandwidth-sdk'
|
|
17
|
+
|
|
18
|
+
instance = Bandwidth::MultiChannelChannelListResponseObject.new(
|
|
19
|
+
from: BandwidthRBM,
|
|
20
|
+
application_id: 93de2206-9669-4e07-948d-329f4b722ee2,
|
|
21
|
+
channel: null,
|
|
22
|
+
content: null,
|
|
23
|
+
owner: null
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Bandwidth::MultiChannelChannelListSMSObject
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **from** | **String** | The sender ID of the message. This could be an alphanumeric sender ID. | |
|
|
8
|
+
| **application_id** | **String** | The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. | |
|
|
9
|
+
| **channel** | [**MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | |
|
|
10
|
+
| **content** | [**SmsMessageContent**](SmsMessageContent.md) | | |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'bandwidth-sdk'
|
|
16
|
+
|
|
17
|
+
instance = Bandwidth::MultiChannelChannelListSMSObject.new(
|
|
18
|
+
from: BandwidthRBM,
|
|
19
|
+
application_id: 93de2206-9669-4e07-948d-329f4b722ee2,
|
|
20
|
+
channel: null,
|
|
21
|
+
content: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Bandwidth::MultiChannelChannelListSMSResponseObject
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **from** | **String** | The sender ID of the message. This could be an alphanumeric sender ID. | |
|
|
8
|
+
| **application_id** | **String** | The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. | |
|
|
9
|
+
| **channel** | [**MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | |
|
|
10
|
+
| **content** | [**SmsMessageContent**](SmsMessageContent.md) | | |
|
|
11
|
+
| **owner** | **String** | The Bandwidth senderId associated with the message. Identical to 'from'. | |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'bandwidth-sdk'
|
|
17
|
+
|
|
18
|
+
instance = Bandwidth::MultiChannelChannelListSMSResponseObject.new(
|
|
19
|
+
from: BandwidthRBM,
|
|
20
|
+
application_id: 93de2206-9669-4e07-948d-329f4b722ee2,
|
|
21
|
+
channel: null,
|
|
22
|
+
content: null,
|
|
23
|
+
owner: null
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **to** | **String** | The phone number the message should be sent to in E164 format. | |
|
|
8
|
-
| **channel_list** | [**Array<
|
|
8
|
+
| **channel_list** | [**Array<MultiChannelChannelListRequestObject>**](MultiChannelChannelListRequestObject.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. | |
|
|
9
9
|
| **tag** | **String** | A custom string that will be included in callback events of the message. Max 1024 characters. | [optional] |
|
|
10
10
|
| **priority** | [**PriorityEnum**](PriorityEnum.md) | | [optional] |
|
|
11
11
|
| **expiration** | **Time** | 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] |
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
| **time** | **Time** | The time the message was received by the Bandwidth API. | |
|
|
9
9
|
| **direction** | [**MessageDirectionEnum**](MessageDirectionEnum.md) | | |
|
|
10
10
|
| **to** | **Array<String>** | The destination phone number(s) of the message, in E164 format. | |
|
|
11
|
-
| **channel_list** | [**Array<
|
|
11
|
+
| **channel_list** | [**Array<MultiChannelChannelListResponseObject>**](MultiChannelChannelListResponseObject.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. | |
|
|
12
12
|
| **tag** | **String** | A custom string that will be included in callback events of the message. Max 1024 characters. | [optional] |
|
|
13
13
|
| **priority** | [**PriorityEnum**](PriorityEnum.md) | | [optional] |
|
|
14
14
|
| **expiration** | **Time** | 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] |
|
data/docs/RbmActionBase.md
CHANGED
|
@@ -16,8 +16,8 @@ require 'time'
|
|
|
16
16
|
module Bandwidth
|
|
17
17
|
module MultiChannelAction
|
|
18
18
|
class << self
|
|
19
|
-
# List of class defined in
|
|
20
|
-
def
|
|
19
|
+
# List of class defined in anyOf (OpenAPI v3)
|
|
20
|
+
def openapi_any_of
|
|
21
21
|
[
|
|
22
22
|
:'MultiChannelActionCalendarEvent',
|
|
23
23
|
:'RbmActionBase',
|
|
@@ -27,35 +27,80 @@ module Bandwidth
|
|
|
27
27
|
]
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
-
# Discriminator's property name (OpenAPI v3)
|
|
31
|
-
def openapi_discriminator_name
|
|
32
|
-
:'type'
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
# Discriminator's mapping (OpenAPI v3)
|
|
36
|
-
def openapi_discriminator_mapping
|
|
37
|
-
{
|
|
38
|
-
:'CREATE_CALENDAR_EVENT' => :'MultiChannelActionCalendarEvent',
|
|
39
|
-
:'DIAL_PHONE' => :'RbmActionDial',
|
|
40
|
-
:'OPEN_URL' => :'RbmActionOpenUrl',
|
|
41
|
-
:'REPLY' => :'RbmActionBase',
|
|
42
|
-
:'REQUEST_LOCATION' => :'RbmActionBase',
|
|
43
|
-
:'SHOW_LOCATION' => :'RbmActionViewLocation'
|
|
44
|
-
}
|
|
45
|
-
end
|
|
46
|
-
|
|
47
30
|
# Builds the object
|
|
48
|
-
# @param [Mixed] Data to be matched against the list of
|
|
31
|
+
# @param [Mixed] Data to be matched against the list of anyOf items
|
|
49
32
|
# @return [Object] Returns the model or the data itself
|
|
50
33
|
def build(data)
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
34
|
+
# Go through the list of anyOf items and attempt to identify the appropriate one.
|
|
35
|
+
# Note:
|
|
36
|
+
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
|
|
37
|
+
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
|
|
38
|
+
# - TODO: scalar values are de facto behaving as if they were nullable.
|
|
39
|
+
# - TODO: logging when debugging is set.
|
|
40
|
+
openapi_any_of.each do |klass|
|
|
41
|
+
begin
|
|
42
|
+
next if klass == :AnyType # "nullable: true"
|
|
43
|
+
typed_data = find_and_cast_into_type(klass, data)
|
|
44
|
+
return typed_data if typed_data
|
|
45
|
+
rescue # rescue all errors so we keep iterating even if the current item lookup raises
|
|
46
|
+
end
|
|
47
|
+
end
|
|
56
48
|
|
|
57
|
-
|
|
49
|
+
openapi_any_of.include?(:AnyType) ? data : nil
|
|
58
50
|
end
|
|
51
|
+
|
|
52
|
+
private
|
|
53
|
+
|
|
54
|
+
SchemaMismatchError = Class.new(StandardError)
|
|
55
|
+
|
|
56
|
+
# Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
|
|
57
|
+
def find_and_cast_into_type(klass, data)
|
|
58
|
+
return if data.nil?
|
|
59
|
+
|
|
60
|
+
case klass.to_s
|
|
61
|
+
when 'Boolean'
|
|
62
|
+
return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
|
|
63
|
+
when 'Float'
|
|
64
|
+
return data if data.instance_of?(Float)
|
|
65
|
+
when 'Integer'
|
|
66
|
+
return data if data.instance_of?(Integer)
|
|
67
|
+
when 'Time'
|
|
68
|
+
return Time.parse(data)
|
|
69
|
+
when 'Date'
|
|
70
|
+
return Date.parse(data)
|
|
71
|
+
when 'String'
|
|
72
|
+
return data if data.instance_of?(String)
|
|
73
|
+
when 'Object' # "type: object"
|
|
74
|
+
return data if data.instance_of?(Hash)
|
|
75
|
+
when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
|
|
76
|
+
if data.instance_of?(Array)
|
|
77
|
+
sub_type = Regexp.last_match[:sub_type]
|
|
78
|
+
return data.map { |item| find_and_cast_into_type(sub_type, item) }
|
|
79
|
+
end
|
|
80
|
+
when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
|
|
81
|
+
if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
|
|
82
|
+
sub_type = Regexp.last_match[:sub_type]
|
|
83
|
+
return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
|
|
84
|
+
end
|
|
85
|
+
else # model
|
|
86
|
+
const = Bandwidth.const_get(klass)
|
|
87
|
+
if const
|
|
88
|
+
if const.respond_to?(:openapi_any_of) # nested anyOf model
|
|
89
|
+
model = const.build(data)
|
|
90
|
+
return model if model
|
|
91
|
+
else
|
|
92
|
+
# raise if data contains keys that are not known to the model
|
|
93
|
+
raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
|
|
94
|
+
model = const.build_from_hash(data)
|
|
95
|
+
return model if model
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
raise # if no match by now, raise
|
|
101
|
+
rescue
|
|
102
|
+
raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
|
|
103
|
+
end
|
|
59
104
|
end
|
|
60
105
|
end
|
|
61
106
|
end
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Bandwidth
|
|
17
|
-
class
|
|
17
|
+
class MultiChannelChannelListMMSObject
|
|
18
18
|
# The sender ID of the message. This could be an alphanumeric sender ID.
|
|
19
19
|
attr_accessor :from
|
|
20
20
|
|
|
@@ -68,7 +68,7 @@ module Bandwidth
|
|
|
68
68
|
:'from' => :'String',
|
|
69
69
|
:'application_id' => :'String',
|
|
70
70
|
:'channel' => :'MultiChannelMessageChannelEnum',
|
|
71
|
-
:'content' => :'
|
|
71
|
+
:'content' => :'MmsMessageContent'
|
|
72
72
|
}
|
|
73
73
|
end
|
|
74
74
|
|
|
@@ -78,17 +78,24 @@ module Bandwidth
|
|
|
78
78
|
])
|
|
79
79
|
end
|
|
80
80
|
|
|
81
|
+
# List of class defined in allOf (OpenAPI v3)
|
|
82
|
+
def self.openapi_all_of
|
|
83
|
+
[
|
|
84
|
+
:'MultiChannelChannelListObjectBase'
|
|
85
|
+
]
|
|
86
|
+
end
|
|
87
|
+
|
|
81
88
|
# Initializes the object
|
|
82
89
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
83
90
|
def initialize(attributes = {})
|
|
84
91
|
if (!attributes.is_a?(Hash))
|
|
85
|
-
fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::
|
|
92
|
+
fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::MultiChannelChannelListMMSObject` initialize method'
|
|
86
93
|
end
|
|
87
94
|
|
|
88
95
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
89
96
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
90
97
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
91
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::
|
|
98
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::MultiChannelChannelListMMSObject`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
92
99
|
end
|
|
93
100
|
h[k.to_sym] = v
|
|
94
101
|
}
|