bandwidth-sdk 15.1.0 → 16.0.0
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 +11 -11
- data/README.md +17 -10
- data/bandwidth.yml +523 -184
- data/coverage/.last_run.json +1 -1
- data/coverage/.resultset.json +321 -366
- data/coverage/index.html +10047 -10501
- data/custom_templates/README.mustache +1 -1
- data/docs/BlockedWebhook.md +2 -2
- data/docs/Callback.md +84 -0
- data/docs/CreateMultiChannelMessageResponse.md +3 -3
- data/docs/ErrorObject.md +6 -4
- data/docs/ErrorSource.md +24 -0
- data/docs/FailureWebhook.md +2 -2
- data/docs/InboundCallback.md +28 -0
- data/docs/InboundCallbackMessage.md +48 -0
- data/docs/{MultiChannelStatusEnum.md → InboundCallbackTypeEnum.md} +2 -2
- data/docs/ListMessageItem.md +1 -1
- data/docs/Message.md +5 -5
- data/docs/MessageRequest.md +1 -1
- data/docs/MmsMessageContent.md +2 -2
- data/docs/MmsMessageContentFile.md +18 -0
- data/docs/MultiChannelActionCalendarEvent.md +2 -2
- data/docs/MultiChannelError.md +22 -0
- data/docs/MultiChannelMessageContent.md +20 -0
- data/docs/MultiChannelMessageResponseData.md +32 -0
- data/docs/MultiChannelMessageResponseDataChannelListInner.md +26 -0
- data/docs/RbmActionBase.md +2 -2
- data/docs/RbmActionDial.md +2 -2
- data/docs/RbmActionOpenUrl.md +2 -2
- data/docs/RbmActionViewLocation.md +2 -2
- data/docs/RbmLocationResponse.md +20 -0
- data/docs/RbmSuggestionResponse.md +20 -0
- data/docs/StatusCallback.md +32 -0
- data/docs/StatusCallbackMessage.md +42 -0
- data/docs/{CallbackTypeEnum.md → StatusCallbackTypeEnum.md} +2 -2
- data/docs/TfvStatus.md +2 -2
- data/docs/TfvSubmissionInfo.md +3 -3
- data/docs/TollFreeVerificationApi.md +72 -0
- data/docs/VerificationDenialWebhook.md +2 -2
- data/docs/VerificationRequest.md +3 -3
- data/docs/VerificationUpdateRequest.md +3 -3
- data/lib/bandwidth-sdk/api/toll_free_verification_api.rb +82 -0
- data/lib/bandwidth-sdk/configuration.rb +6 -0
- data/lib/bandwidth-sdk/models/blocked_webhook.rb +2 -2
- data/lib/bandwidth-sdk/models/callback.rb +60 -0
- data/lib/bandwidth-sdk/models/create_multi_channel_message_response.rb +1 -1
- data/lib/bandwidth-sdk/models/error_object.rb +45 -13
- data/lib/bandwidth-sdk/models/error_source.rb +244 -0
- data/lib/bandwidth-sdk/models/failure_webhook.rb +7 -7
- data/lib/bandwidth-sdk/models/{message_callback.rb → inbound_callback.rb} +9 -20
- data/lib/bandwidth-sdk/models/inbound_callback_message.rb +454 -0
- data/lib/bandwidth-sdk/models/{multi_channel_message_direction_enum.rb → inbound_callback_type_enum.rb} +7 -6
- data/lib/bandwidth-sdk/models/list_message_item.rb +1 -1
- data/lib/bandwidth-sdk/models/message.rb +3 -3
- data/lib/bandwidth-sdk/models/message_request.rb +1 -1
- data/lib/bandwidth-sdk/models/mms_message_content.rb +1 -2
- data/lib/bandwidth-sdk/models/{multi_channel_message_callback_data.rb → mms_message_content_file.rb} +37 -100
- data/lib/bandwidth-sdk/models/multi_channel_action_calendar_event.rb +21 -21
- data/lib/bandwidth-sdk/models/multi_channel_error.rb +235 -0
- data/lib/bandwidth-sdk/models/{deferred_result.rb → multi_channel_message_content.rb} +17 -16
- data/lib/bandwidth-sdk/models/multi_channel_message_response_data.rb +372 -0
- data/lib/bandwidth-sdk/models/{multi_channel_message_data.rb → multi_channel_message_response_data_channel_list_inner.rb} +62 -59
- data/lib/bandwidth-sdk/models/rbm_action_base.rb +21 -21
- data/lib/bandwidth-sdk/models/rbm_action_dial.rb +21 -21
- data/lib/bandwidth-sdk/models/rbm_action_open_url.rb +21 -21
- data/lib/bandwidth-sdk/models/rbm_action_view_location.rb +21 -21
- data/lib/bandwidth-sdk/models/{tag.rb → rbm_location_response.rb} +18 -16
- data/lib/bandwidth-sdk/models/{multi_channel_callback_data.rb → rbm_suggestion_response.rb} +37 -67
- data/lib/bandwidth-sdk/models/status_callback.rb +338 -0
- data/lib/bandwidth-sdk/models/{message_callback_message.rb → status_callback_message.rb} +25 -17
- data/lib/bandwidth-sdk/models/{callback_type_enum.rb → status_callback_type_enum.rb} +5 -5
- data/lib/bandwidth-sdk/models/tfv_status.rb +2 -2
- data/lib/bandwidth-sdk/models/tfv_submission_info.rb +3 -3
- data/lib/bandwidth-sdk/models/verification_denial_webhook.rb +2 -2
- data/lib/bandwidth-sdk/models/verification_request.rb +3 -3
- data/lib/bandwidth-sdk/models/verification_update_request.rb +3 -3
- data/lib/bandwidth-sdk/version.rb +1 -1
- data/lib/bandwidth-sdk.rb +15 -9
- data/spec/smoke/multi_channel_api_spec.rb +18 -20
- data/spec/smoke/toll_free_verification_api_spec.rb +7 -0
- data/spec/unit/api/toll_free_verification_api_spec.rb +8 -0
- data/spec/unit/client/api_client_spec.rb +4 -4
- data/spec/unit/models/tfv_error_spec.rb +78 -0
- data/spec/unit/models/verify_code_response_spec.rb +70 -0
- metadata +112 -100
- data/docs/DeferredResult.md +0 -20
- data/docs/MessageCallback.md +0 -30
- data/docs/MessageCallbackMessage.md +0 -40
- data/docs/MultiChannelCallbackData.md +0 -26
- data/docs/MultiChannelMessageCallbackData.md +0 -32
- data/docs/MultiChannelMessageData.md +0 -34
- data/docs/MultiChannelMessageDirectionEnum.md +0 -15
- data/docs/Tag.md +0 -20
- data/lib/bandwidth-sdk/models/multi_channel_status_enum.rb +0 -42
- data/spec/unit/models/deferred_result_spec.rb +0 -74
- /data/coverage/assets/{0.13.1 → 0.13.2}/DataTables-1.10.20/images/sort_asc.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/DataTables-1.10.20/images/sort_asc_disabled.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/DataTables-1.10.20/images/sort_both.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/DataTables-1.10.20/images/sort_desc.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/DataTables-1.10.20/images/sort_desc_disabled.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/application.css +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/application.js +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/colorbox/border.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/colorbox/controls.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/colorbox/loading.gif +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/colorbox/loading_background.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/favicon_green.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/favicon_red.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/favicon_yellow.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-icons_222222_256x240.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-icons_2e83ff_256x240.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-icons_454545_256x240.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-icons_888888_256x240.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/images/ui-icons_cd0a0a_256x240.png +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/loading.gif +0 -0
- /data/coverage/assets/{0.13.1 → 0.13.2}/magnify.png +0 -0
@@ -0,0 +1,42 @@
|
|
1
|
+
# Bandwidth::StatusCallbackMessage
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | A unique identifier of the message. | |
|
8
|
+
| **owner** | **String** | The Bandwidth phone number or alphanumeric identifier associated with the message. | |
|
9
|
+
| **application_id** | **String** | The ID of the Application your from number or senderId is associated with in the Bandwidth Phone Number Dashboard. | |
|
10
|
+
| **time** | **Time** | | |
|
11
|
+
| **segment_count** | **Integer** | The number of segments the user's message is broken into before sending over carrier networks. | |
|
12
|
+
| **direction** | [**MessageDirectionEnum**](MessageDirectionEnum.md) | | |
|
13
|
+
| **to** | **Array<String>** | The phone number recipients of the message. | |
|
14
|
+
| **from** | **String** | The Bandwidth phone number or alphanumeric identifier the message was sent from. | |
|
15
|
+
| **text** | **String** | | [optional] |
|
16
|
+
| **tag** | **String** | A custom string that will be included in callback events of the message. Max 1024 characters. | [optional] |
|
17
|
+
| **media** | **Array<String>** | Optional media, not applicable for sms | [optional] |
|
18
|
+
| **priority** | [**PriorityEnum**](PriorityEnum.md) | | [optional] |
|
19
|
+
| **channel** | [**MultiChannelMessageChannelEnum**](MultiChannelMessageChannelEnum.md) | | [optional] |
|
20
|
+
|
21
|
+
## Example
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
require 'bandwidth-sdk'
|
25
|
+
|
26
|
+
instance = Bandwidth::StatusCallbackMessage.new(
|
27
|
+
id: 1661365814859loidf7mcwd4qacn7,
|
28
|
+
owner: +15553332222,
|
29
|
+
application_id: 93de2206-9669-4e07-948d-329f4b722ee2,
|
30
|
+
time: 2024-12-02T20:15:57.666Z,
|
31
|
+
segment_count: 1,
|
32
|
+
direction: null,
|
33
|
+
to: ["+15552223333"],
|
34
|
+
from: +15553332222,
|
35
|
+
text: Hello world,
|
36
|
+
tag: custom string,
|
37
|
+
media: ["https://dev.bandwidth.com/images/bandwidth-logo.png","https://dev.bandwidth.com/images/github_logo.png"],
|
38
|
+
priority: null,
|
39
|
+
channel: null
|
40
|
+
)
|
41
|
+
```
|
42
|
+
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Bandwidth::
|
1
|
+
# Bandwidth::StatusCallbackTypeEnum
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
@@ -10,6 +10,6 @@
|
|
10
10
|
```ruby
|
11
11
|
require 'bandwidth-sdk'
|
12
12
|
|
13
|
-
instance = Bandwidth::
|
13
|
+
instance = Bandwidth::StatusCallbackTypeEnum.new()
|
14
14
|
```
|
15
15
|
|
data/docs/TfvStatus.md
CHANGED
@@ -12,8 +12,8 @@
|
|
12
12
|
| **created_date_time** | **Time** | Date and time the verification request was created. | [optional] |
|
13
13
|
| **modified_date_time** | **Time** | Date and time the verification request was last modified. | [optional] |
|
14
14
|
| **submission** | [**TfvSubmissionInfo**](TfvSubmissionInfo.md) | | [optional] |
|
15
|
-
| **blocked** | **Boolean** | Whether a Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked.
|
16
|
-
| **blocked_reason** | **String** | The reason why the Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked.
|
15
|
+
| **blocked** | **Boolean** | Whether a Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. | [optional] |
|
16
|
+
| **blocked_reason** | **String** | The reason why the Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. | [optional] |
|
17
17
|
|
18
18
|
## Example
|
19
19
|
|
data/docs/TfvSubmissionInfo.md
CHANGED
@@ -13,9 +13,9 @@
|
|
13
13
|
| **opt_in_workflow** | [**OptInWorkflow**](OptInWorkflow.md) | | [optional] |
|
14
14
|
| **additional_information** | **String** | Any additional information. | [optional] |
|
15
15
|
| **isv_reseller** | **String** | ISV name. | [optional] |
|
16
|
-
| **privacy_policy_url** | **String** | The Toll-Free Verification request privacy policy URL.
|
17
|
-
| **terms_and_conditions_url** | **String** | The Toll-Free Verification request terms and conditions policy URL.
|
18
|
-
| **business_dba** | **String** | The company 'Doing Business As'.
|
16
|
+
| **privacy_policy_url** | **String** | The Toll-Free Verification request privacy policy URL. | [optional] |
|
17
|
+
| **terms_and_conditions_url** | **String** | The Toll-Free Verification request terms and conditions policy URL. | [optional] |
|
18
|
+
| **business_dba** | **String** | The company 'Doing Business As'. | [optional] |
|
19
19
|
|
20
20
|
## Example
|
21
21
|
|
@@ -5,6 +5,7 @@ All URIs are relative to *http://localhost*
|
|
5
5
|
| Method | HTTP request | Description |
|
6
6
|
| ------ | ------------ | ----------- |
|
7
7
|
| [**create_webhook_subscription**](TollFreeVerificationApi.md#create_webhook_subscription) | **POST** /accounts/{accountId}/tollFreeVerification/webhooks/subscriptions | Create Webhook Subscription |
|
8
|
+
| [**delete_verification_request**](TollFreeVerificationApi.md#delete_verification_request) | **DELETE** /accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification | Delete a Toll-Free Verification Submission |
|
8
9
|
| [**delete_webhook_subscription**](TollFreeVerificationApi.md#delete_webhook_subscription) | **DELETE** /accounts/{accountId}/tollFreeVerification/webhooks/subscriptions/{id} | Delete Webhook Subscription |
|
9
10
|
| [**get_toll_free_verification_status**](TollFreeVerificationApi.md#get_toll_free_verification_status) | **GET** /accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification | Get Toll-Free Verification Status |
|
10
11
|
| [**list_toll_free_use_cases**](TollFreeVerificationApi.md#list_toll_free_use_cases) | **GET** /tollFreeVerification/useCases | List Toll-Free Use Cases |
|
@@ -86,6 +87,77 @@ end
|
|
86
87
|
- **Accept**: application/json
|
87
88
|
|
88
89
|
|
90
|
+
## delete_verification_request
|
91
|
+
|
92
|
+
> delete_verification_request(account_id, phone_number)
|
93
|
+
|
94
|
+
Delete a Toll-Free Verification Submission
|
95
|
+
|
96
|
+
Delete a toll-free verification submission for a toll-free number.
|
97
|
+
|
98
|
+
### Examples
|
99
|
+
|
100
|
+
```ruby
|
101
|
+
require 'time'
|
102
|
+
require 'bandwidth-sdk'
|
103
|
+
# setup authorization
|
104
|
+
Bandwidth.configure do |config|
|
105
|
+
# Configure HTTP basic authorization: Basic
|
106
|
+
config.username = 'YOUR USERNAME'
|
107
|
+
config.password = 'YOUR PASSWORD'
|
108
|
+
end
|
109
|
+
|
110
|
+
api_instance = Bandwidth::TollFreeVerificationApi.new
|
111
|
+
account_id = '9900000' # String | Your Bandwidth Account ID.
|
112
|
+
phone_number = '+18885555555' # String | Valid Toll-Free telephone number in E.164 format.
|
113
|
+
|
114
|
+
begin
|
115
|
+
# Delete a Toll-Free Verification Submission
|
116
|
+
api_instance.delete_verification_request(account_id, phone_number)
|
117
|
+
rescue Bandwidth::ApiError => e
|
118
|
+
puts "Error when calling TollFreeVerificationApi->delete_verification_request: #{e}"
|
119
|
+
end
|
120
|
+
```
|
121
|
+
|
122
|
+
#### Using the delete_verification_request_with_http_info variant
|
123
|
+
|
124
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
125
|
+
|
126
|
+
> <Array(nil, Integer, Hash)> delete_verification_request_with_http_info(account_id, phone_number)
|
127
|
+
|
128
|
+
```ruby
|
129
|
+
begin
|
130
|
+
# Delete a Toll-Free Verification Submission
|
131
|
+
data, status_code, headers = api_instance.delete_verification_request_with_http_info(account_id, phone_number)
|
132
|
+
p status_code # => 2xx
|
133
|
+
p headers # => { ... }
|
134
|
+
p data # => nil
|
135
|
+
rescue Bandwidth::ApiError => e
|
136
|
+
puts "Error when calling TollFreeVerificationApi->delete_verification_request_with_http_info: #{e}"
|
137
|
+
end
|
138
|
+
```
|
139
|
+
|
140
|
+
### Parameters
|
141
|
+
|
142
|
+
| Name | Type | Description | Notes |
|
143
|
+
| ---- | ---- | ----------- | ----- |
|
144
|
+
| **account_id** | **String** | Your Bandwidth Account ID. | |
|
145
|
+
| **phone_number** | **String** | Valid Toll-Free telephone number in E.164 format. | |
|
146
|
+
|
147
|
+
### Return type
|
148
|
+
|
149
|
+
nil (empty response body)
|
150
|
+
|
151
|
+
### Authorization
|
152
|
+
|
153
|
+
[Basic](../README.md#Basic)
|
154
|
+
|
155
|
+
### HTTP request headers
|
156
|
+
|
157
|
+
- **Content-Type**: Not defined
|
158
|
+
- **Accept**: application/json
|
159
|
+
|
160
|
+
|
89
161
|
## delete_webhook_subscription
|
90
162
|
|
91
163
|
> delete_webhook_subscription(account_id, id)
|
@@ -12,8 +12,8 @@
|
|
12
12
|
| **phone_number** | **String** | Toll-free telephone number in E.164 format. | [optional] |
|
13
13
|
| **resubmit_allowed** | **Boolean** | Whether a Toll-Free Verification request qualifies for resubmission via PUT. | [optional] |
|
14
14
|
| **status** | **String** | | [optional][default to 'UNVERIFIED'] |
|
15
|
-
| **blocked** | **Boolean** | Whether a Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked.
|
16
|
-
| **blocked_reason** | **String** | The reason why the Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked.
|
15
|
+
| **blocked** | **Boolean** | Whether a Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. | [optional] |
|
16
|
+
| **blocked_reason** | **String** | The reason why the Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked. | [optional] |
|
17
17
|
|
18
18
|
## Example
|
19
19
|
|
data/docs/VerificationRequest.md
CHANGED
@@ -14,9 +14,9 @@
|
|
14
14
|
| **opt_in_workflow** | [**OptInWorkflow**](OptInWorkflow.md) | | |
|
15
15
|
| **additional_information** | **String** | Any additional information. | [optional] |
|
16
16
|
| **isv_reseller** | **String** | ISV name. | [optional] |
|
17
|
-
| **privacy_policy_url** | **String** | The Toll-Free Verification request privacy policy URL.
|
18
|
-
| **terms_and_conditions_url** | **String** | The Toll-Free Verification request terms and conditions policy URL.
|
19
|
-
| **business_dba** | **String** | The company 'Doing Business As'.
|
17
|
+
| **privacy_policy_url** | **String** | The Toll-Free Verification request privacy policy URL. | [optional] |
|
18
|
+
| **terms_and_conditions_url** | **String** | The Toll-Free Verification request terms and conditions policy URL. | [optional] |
|
19
|
+
| **business_dba** | **String** | The company 'Doing Business As'. | [optional] |
|
20
20
|
|
21
21
|
## Example
|
22
22
|
|
@@ -13,9 +13,9 @@
|
|
13
13
|
| **opt_in_workflow** | [**OptInWorkflow**](OptInWorkflow.md) | | |
|
14
14
|
| **additional_information** | **String** | Any additional information. | [optional] |
|
15
15
|
| **isv_reseller** | **String** | ISV name. | [optional] |
|
16
|
-
| **privacy_policy_url** | **String** | The Toll-Free Verification request privacy policy URL.
|
17
|
-
| **terms_and_conditions_url** | **String** | The Toll-Free Verification request terms and conditions policy URL.
|
18
|
-
| **business_dba** | **String** | The company 'Doing Business As'.
|
16
|
+
| **privacy_policy_url** | **String** | The Toll-Free Verification request privacy policy URL. | [optional] |
|
17
|
+
| **terms_and_conditions_url** | **String** | The Toll-Free Verification request terms and conditions policy URL. | [optional] |
|
18
|
+
| **business_dba** | **String** | The company 'Doing Business As'. | [optional] |
|
19
19
|
|
20
20
|
## Example
|
21
21
|
|
@@ -93,6 +93,88 @@ module Bandwidth
|
|
93
93
|
return data, status_code, headers
|
94
94
|
end
|
95
95
|
|
96
|
+
# Delete a Toll-Free Verification Submission
|
97
|
+
# Delete a toll-free verification submission for a toll-free number.
|
98
|
+
# @param account_id [String] Your Bandwidth Account ID.
|
99
|
+
# @param phone_number [String] Valid Toll-Free telephone number in E.164 format.
|
100
|
+
# @param [Hash] opts the optional parameters
|
101
|
+
# @return [nil]
|
102
|
+
def delete_verification_request(account_id, phone_number, opts = {})
|
103
|
+
delete_verification_request_with_http_info(account_id, phone_number, opts)
|
104
|
+
nil
|
105
|
+
end
|
106
|
+
|
107
|
+
# Delete a Toll-Free Verification Submission
|
108
|
+
# Delete a toll-free verification submission for a toll-free number.
|
109
|
+
# @param account_id [String] Your Bandwidth Account ID.
|
110
|
+
# @param phone_number [String] Valid Toll-Free telephone number in E.164 format.
|
111
|
+
# @param [Hash] opts the optional parameters
|
112
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
113
|
+
def delete_verification_request_with_http_info(account_id, phone_number, opts = {})
|
114
|
+
if @api_client.config.debugging
|
115
|
+
@api_client.config.logger.debug 'Calling API: TollFreeVerificationApi.delete_verification_request ...'
|
116
|
+
end
|
117
|
+
# verify the required parameter 'account_id' is set
|
118
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
119
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling TollFreeVerificationApi.delete_verification_request"
|
120
|
+
end
|
121
|
+
# verify the required parameter 'phone_number' is set
|
122
|
+
if @api_client.config.client_side_validation && phone_number.nil?
|
123
|
+
fail ArgumentError, "Missing the required parameter 'phone_number' when calling TollFreeVerificationApi.delete_verification_request"
|
124
|
+
end
|
125
|
+
if @api_client.config.client_side_validation && phone_number.to_s.length > 12
|
126
|
+
fail ArgumentError, 'invalid value for "phone_number" when calling TollFreeVerificationApi.delete_verification_request, the character length must be smaller than or equal to 12.'
|
127
|
+
end
|
128
|
+
|
129
|
+
if @api_client.config.client_side_validation && phone_number.to_s.length < 12
|
130
|
+
fail ArgumentError, 'invalid value for "phone_number" when calling TollFreeVerificationApi.delete_verification_request, the character length must be great than or equal to 12.'
|
131
|
+
end
|
132
|
+
|
133
|
+
pattern = Regexp.new(/^\+1(800|833|844|855|866|877|888)[2-9]\d{6}$/)
|
134
|
+
if @api_client.config.client_side_validation && phone_number !~ pattern
|
135
|
+
fail ArgumentError, "invalid value for 'phone_number' when calling TollFreeVerificationApi.delete_verification_request, must conform to the pattern #{pattern}."
|
136
|
+
end
|
137
|
+
|
138
|
+
# resource path
|
139
|
+
local_var_path = '/accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'phoneNumber' + '}', CGI.escape(phone_number.to_s))
|
140
|
+
|
141
|
+
# query parameters
|
142
|
+
query_params = opts[:query_params] || {}
|
143
|
+
|
144
|
+
# header parameters
|
145
|
+
header_params = opts[:header_params] || {}
|
146
|
+
# HTTP header 'Accept' (if needed)
|
147
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
148
|
+
|
149
|
+
# form parameters
|
150
|
+
form_params = opts[:form_params] || {}
|
151
|
+
|
152
|
+
# http body (model)
|
153
|
+
post_body = opts[:debug_body]
|
154
|
+
|
155
|
+
# return_type
|
156
|
+
return_type = opts[:debug_return_type]
|
157
|
+
|
158
|
+
# auth_names
|
159
|
+
auth_names = opts[:debug_auth_names] || ['Basic']
|
160
|
+
|
161
|
+
new_options = opts.merge(
|
162
|
+
:operation => :"TollFreeVerificationApi.delete_verification_request",
|
163
|
+
:header_params => header_params,
|
164
|
+
:query_params => query_params,
|
165
|
+
:form_params => form_params,
|
166
|
+
:body => post_body,
|
167
|
+
:auth_names => auth_names,
|
168
|
+
:return_type => return_type
|
169
|
+
)
|
170
|
+
|
171
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
172
|
+
if @api_client.config.debugging
|
173
|
+
@api_client.config.logger.debug "API called: TollFreeVerificationApi#delete_verification_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
174
|
+
end
|
175
|
+
return data, status_code, headers
|
176
|
+
end
|
177
|
+
|
96
178
|
# Delete Webhook Subscription
|
97
179
|
# Delete a webhook subscription by ID.
|
98
180
|
# @param account_id [String] Your Bandwidth Account ID.
|
@@ -498,6 +498,12 @@ module Bandwidth
|
|
498
498
|
description: "Production",
|
499
499
|
}
|
500
500
|
],
|
501
|
+
"TollFreeVerificationApi.delete_verification_request": [
|
502
|
+
{
|
503
|
+
url: "https://api.bandwidth.com/api/v2",
|
504
|
+
description: "Production",
|
505
|
+
}
|
506
|
+
],
|
501
507
|
"TollFreeVerificationApi.delete_webhook_subscription": [
|
502
508
|
{
|
503
509
|
url: "https://api.bandwidth.com/api/v2",
|
@@ -26,10 +26,10 @@ module Bandwidth
|
|
26
26
|
# Unique identifier (UUID) generated by Bandwidth to assist in tracking the verification status of a toll-free number.
|
27
27
|
attr_accessor :internal_ticket_number
|
28
28
|
|
29
|
-
# Whether a Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked.
|
29
|
+
# Whether a Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked.
|
30
30
|
attr_accessor :blocked
|
31
31
|
|
32
|
-
# The reason why the Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked.
|
32
|
+
# The reason why the Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked.
|
33
33
|
attr_accessor :blocked_reason
|
34
34
|
|
35
35
|
class EnumAttributeValidator
|
@@ -0,0 +1,60 @@
|
|
1
|
+
=begin
|
2
|
+
#Bandwidth
|
3
|
+
|
4
|
+
#Bandwidth's Communication APIs
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
Contact: letstalk@bandwidth.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.8.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Bandwidth
|
17
|
+
# Callbacks are divided into two types based on direction of the related message: - `statusCallback` indicates status of an outbound MT SMS, MMS, or RBM message. - `inboundCallback` indicates an inbound MO message or a multichannel message client's response to a suggestion or location request.
|
18
|
+
module Callback
|
19
|
+
class << self
|
20
|
+
# List of class defined in oneOf (OpenAPI v3)
|
21
|
+
def openapi_one_of
|
22
|
+
[
|
23
|
+
:'InboundCallback',
|
24
|
+
:'StatusCallback'
|
25
|
+
]
|
26
|
+
end
|
27
|
+
|
28
|
+
# Discriminator's property name (OpenAPI v3)
|
29
|
+
def openapi_discriminator_name
|
30
|
+
:'type'
|
31
|
+
end
|
32
|
+
|
33
|
+
# Discriminator's mapping (OpenAPI v3)
|
34
|
+
def openapi_discriminator_mapping
|
35
|
+
{
|
36
|
+
:'message-delivered' => :'StatusCallback',
|
37
|
+
:'message-failed' => :'StatusCallback',
|
38
|
+
:'message-read' => :'StatusCallback',
|
39
|
+
:'message-received' => :'InboundCallback',
|
40
|
+
:'message-sent' => :'StatusCallback',
|
41
|
+
:'request-location-response' => :'InboundCallback',
|
42
|
+
:'suggestion-response' => :'InboundCallback'
|
43
|
+
}
|
44
|
+
end
|
45
|
+
|
46
|
+
# Builds the object
|
47
|
+
# @param [Mixed] Data to be matched against the list of oneOf items
|
48
|
+
# @return [Object] Returns the model or the data itself
|
49
|
+
def build(data)
|
50
|
+
discriminator_value = data[openapi_discriminator_name]
|
51
|
+
return nil if discriminator_value.nil?
|
52
|
+
|
53
|
+
klass = openapi_discriminator_mapping[discriminator_value.to_s.to_sym]
|
54
|
+
return nil unless klass
|
55
|
+
|
56
|
+
Bandwidth.const_get(klass).build_from_hash(data)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -15,15 +15,20 @@ require 'time'
|
|
15
15
|
|
16
16
|
module Bandwidth
|
17
17
|
class ErrorObject
|
18
|
-
|
18
|
+
# A concise summary of the error used for categorization.
|
19
|
+
attr_accessor :type
|
19
20
|
|
20
|
-
|
21
|
+
# A detailed explanation of the error.
|
22
|
+
attr_accessor :description
|
23
|
+
|
24
|
+
attr_accessor :source
|
21
25
|
|
22
26
|
# Attribute mapping from ruby-style variable name to JSON key.
|
23
27
|
def self.attribute_map
|
24
28
|
{
|
25
|
-
:'
|
26
|
-
:'
|
29
|
+
:'type' => :'type',
|
30
|
+
:'description' => :'description',
|
31
|
+
:'source' => :'source'
|
27
32
|
}
|
28
33
|
end
|
29
34
|
|
@@ -35,8 +40,9 @@ module Bandwidth
|
|
35
40
|
# Attribute type mapping.
|
36
41
|
def self.openapi_types
|
37
42
|
{
|
38
|
-
:'
|
39
|
-
:'
|
43
|
+
:'type' => :'String',
|
44
|
+
:'description' => :'String',
|
45
|
+
:'source' => :'ErrorSource'
|
40
46
|
}
|
41
47
|
end
|
42
48
|
|
@@ -61,12 +67,22 @@ module Bandwidth
|
|
61
67
|
h[k.to_sym] = v
|
62
68
|
}
|
63
69
|
|
64
|
-
if attributes.key?(:'
|
65
|
-
self.
|
70
|
+
if attributes.key?(:'type')
|
71
|
+
self.type = attributes[:'type']
|
72
|
+
else
|
73
|
+
self.type = nil
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.key?(:'description')
|
77
|
+
self.description = attributes[:'description']
|
78
|
+
else
|
79
|
+
self.description = nil
|
66
80
|
end
|
67
81
|
|
68
|
-
if attributes.key?(:'
|
69
|
-
self.
|
82
|
+
if attributes.key?(:'source')
|
83
|
+
self.source = attributes[:'source']
|
84
|
+
else
|
85
|
+
self.source = nil
|
70
86
|
end
|
71
87
|
end
|
72
88
|
|
@@ -75,6 +91,18 @@ module Bandwidth
|
|
75
91
|
def list_invalid_properties
|
76
92
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
77
93
|
invalid_properties = Array.new
|
94
|
+
if @type.nil?
|
95
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
96
|
+
end
|
97
|
+
|
98
|
+
if @description.nil?
|
99
|
+
invalid_properties.push('invalid value for "description", description cannot be nil.')
|
100
|
+
end
|
101
|
+
|
102
|
+
if @source.nil?
|
103
|
+
invalid_properties.push('invalid value for "source", source cannot be nil.')
|
104
|
+
end
|
105
|
+
|
78
106
|
invalid_properties
|
79
107
|
end
|
80
108
|
|
@@ -82,6 +110,9 @@ module Bandwidth
|
|
82
110
|
# @return true if the model is valid
|
83
111
|
def valid?
|
84
112
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
113
|
+
return false if @type.nil?
|
114
|
+
return false if @description.nil?
|
115
|
+
return false if @source.nil?
|
85
116
|
true
|
86
117
|
end
|
87
118
|
|
@@ -90,8 +121,9 @@ module Bandwidth
|
|
90
121
|
def ==(o)
|
91
122
|
return true if self.equal?(o)
|
92
123
|
self.class == o.class &&
|
93
|
-
|
94
|
-
|
124
|
+
type == o.type &&
|
125
|
+
description == o.description &&
|
126
|
+
source == o.source
|
95
127
|
end
|
96
128
|
|
97
129
|
# @see the `==` method
|
@@ -103,7 +135,7 @@ module Bandwidth
|
|
103
135
|
# Calculates hash code according to all attributes.
|
104
136
|
# @return [Integer] Hash code
|
105
137
|
def hash
|
106
|
-
[
|
138
|
+
[type, description, source].hash
|
107
139
|
end
|
108
140
|
|
109
141
|
# Builds the object from hash
|