Class: Bandwidth::TollFreeVerificationApi
- Inherits:
-
Object
- Object
- Bandwidth::TollFreeVerificationApi
- Defined in:
- lib/bandwidth-sdk/api/toll_free_verification_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_webhook_subscription(account_id, webhook_subscription_request_schema, opts = {}) ⇒ WebhookSubscription
Create Webhook Subscription Create a new webhook subscription (this webhook will be called for every update on every submission).
-
#create_webhook_subscription_with_http_info(account_id, webhook_subscription_request_schema, opts = {}) ⇒ Array<(WebhookSubscription, Integer, Hash)>
Create Webhook Subscription Create a new webhook subscription (this webhook will be called for every update on every submission).
-
#delete_verification_request(account_id, phone_number, opts = {}) ⇒ nil
Delete a Toll-Free Verification Submission Delete a toll-free verification submission for a toll-free number.
-
#delete_verification_request_with_http_info(account_id, phone_number, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a Toll-Free Verification Submission Delete a toll-free verification submission for a toll-free number.
-
#delete_webhook_subscription(account_id, id, opts = {}) ⇒ nil
Delete Webhook Subscription Delete a webhook subscription by ID.
-
#delete_webhook_subscription_with_http_info(account_id, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Webhook Subscription Delete a webhook subscription by ID.
-
#get_toll_free_verification_status(account_id, phone_number, opts = {}) ⇒ TfvStatus
Get Toll-Free Verification Status Gets the verification status for a phone number that is provisioned to your account.
-
#get_toll_free_verification_status_with_http_info(account_id, phone_number, opts = {}) ⇒ Array<(TfvStatus, Integer, Hash)>
Get Toll-Free Verification Status Gets the verification status for a phone number that is provisioned to your account.
-
#initialize(api_client = ApiClient.default) ⇒ TollFreeVerificationApi
constructor
A new instance of TollFreeVerificationApi.
-
#list_toll_free_use_cases(opts = {}) ⇒ Array<String>
List Toll-Free Use Cases Lists valid toll-free use cases.
-
#list_toll_free_use_cases_with_http_info(opts = {}) ⇒ Array<(Array<String>, Integer, Hash)>
List Toll-Free Use Cases Lists valid toll-free use cases.
-
#list_webhook_subscriptions(account_id, opts = {}) ⇒ WebhookSubscriptionsListBody
List Webhook Subscriptions Lists all webhook subscriptions that are registered to receive status updates for the toll-free verification requests submitted under this account (password will not be returned through this API If ‘basicAuthentication` is defined, the `password` property of that object will be null).
-
#list_webhook_subscriptions_with_http_info(account_id, opts = {}) ⇒ Array<(WebhookSubscriptionsListBody, Integer, Hash)>
List Webhook Subscriptions Lists all webhook subscriptions that are registered to receive status updates for the toll-free verification requests submitted under this account (password will not be returned through this API If `basicAuthentication` is defined, the `password` property of that object will be null).
-
#request_toll_free_verification(account_id, verification_request, opts = {}) ⇒ nil
Request Toll-Free Verification Submit a request for verification of a toll-free phone number.
-
#request_toll_free_verification_with_http_info(account_id, verification_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Request Toll-Free Verification Submit a request for verification of a toll-free phone number.
-
#update_toll_free_verification_request(account_id, phone_number, tfv_submission_wrapper, opts = {}) ⇒ nil
Update Toll-Free Verification Request Updates a toll-free verification request.
-
#update_toll_free_verification_request_with_http_info(account_id, phone_number, tfv_submission_wrapper, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Update Toll-Free Verification Request Updates a toll-free verification request.
-
#update_webhook_subscription(account_id, id, webhook_subscription_request_schema, opts = {}) ⇒ WebhookSubscription
Update Webhook Subscription Update an existing webhook subscription (‘callbackUrl` and `basicAuthentication` can be updated).
-
#update_webhook_subscription_with_http_info(account_id, id, webhook_subscription_request_schema, opts = {}) ⇒ Array<(WebhookSubscription, Integer, Hash)>
Update Webhook Subscription Update an existing webhook subscription (`callbackUrl` and `basicAuthentication` can be updated).
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ TollFreeVerificationApi
Returns a new instance of TollFreeVerificationApi.
19 20 21 |
# File 'lib/bandwidth-sdk/api/toll_free_verification_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/bandwidth-sdk/api/toll_free_verification_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_webhook_subscription(account_id, webhook_subscription_request_schema, opts = {}) ⇒ WebhookSubscription
Create Webhook Subscription Create a new webhook subscription (this webhook will be called for every update on every submission). In addition to a ‘callbackUrl`, this subscription can provide optional HTTP basic authentication credentials (a username and a password). The returned subscription object will contain an ID that can be used to modify or delete the subscription at a later time.
28 29 30 31 |
# File 'lib/bandwidth-sdk/api/toll_free_verification_api.rb', line 28 def create_webhook_subscription(account_id, webhook_subscription_request_schema, opts = {}) data, _status_code, _headers = create_webhook_subscription_with_http_info(account_id, webhook_subscription_request_schema, opts) data end |
#create_webhook_subscription_with_http_info(account_id, webhook_subscription_request_schema, opts = {}) ⇒ Array<(WebhookSubscription, Integer, Hash)>
Create Webhook Subscription Create a new webhook subscription (this webhook will be called for every update on every submission). In addition to a `callbackUrl`, this subscription can provide optional HTTP basic authentication credentials (a username and a password). The returned subscription object will contain an ID that can be used to modify or delete the subscription at a later time.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/bandwidth-sdk/api/toll_free_verification_api.rb', line 39 def create_webhook_subscription_with_http_info(account_id, webhook_subscription_request_schema, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TollFreeVerificationApi.create_webhook_subscription ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling TollFreeVerificationApi.create_webhook_subscription" end # verify the required parameter 'webhook_subscription_request_schema' is set if @api_client.config.client_side_validation && webhook_subscription_request_schema.nil? fail ArgumentError, "Missing the required parameter 'webhook_subscription_request_schema' when calling TollFreeVerificationApi.create_webhook_subscription" end # resource path local_var_path = '/accounts/{accountId}/tollFreeVerification/webhooks/subscriptions'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(webhook_subscription_request_schema) # return_type return_type = opts[:debug_return_type] || 'WebhookSubscription' # auth_names auth_names = opts[:debug_auth_names] || ['Basic'] = opts.merge( :operation => :"TollFreeVerificationApi.create_webhook_subscription", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TollFreeVerificationApi#create_webhook_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_verification_request(account_id, phone_number, opts = {}) ⇒ nil
Delete a Toll-Free Verification Submission Delete a toll-free verification submission for a toll-free number.
102 103 104 105 |
# File 'lib/bandwidth-sdk/api/toll_free_verification_api.rb', line 102 def delete_verification_request(account_id, phone_number, opts = {}) delete_verification_request_with_http_info(account_id, phone_number, opts) nil end |
#delete_verification_request_with_http_info(account_id, phone_number, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a Toll-Free Verification Submission Delete a toll-free verification submission for a toll-free number.
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
# File 'lib/bandwidth-sdk/api/toll_free_verification_api.rb', line 113 def delete_verification_request_with_http_info(account_id, phone_number, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TollFreeVerificationApi.delete_verification_request ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling TollFreeVerificationApi.delete_verification_request" end # verify the required parameter 'phone_number' is set if @api_client.config.client_side_validation && phone_number.nil? fail ArgumentError, "Missing the required parameter 'phone_number' when calling TollFreeVerificationApi.delete_verification_request" end if @api_client.config.client_side_validation && phone_number.to_s.length > 12 fail ArgumentError, 'invalid value for "phone_number" when calling TollFreeVerificationApi.delete_verification_request, the character length must be smaller than or equal to 12.' end if @api_client.config.client_side_validation && phone_number.to_s.length < 12 fail ArgumentError, 'invalid value for "phone_number" when calling TollFreeVerificationApi.delete_verification_request, the character length must be great than or equal to 12.' end pattern = Regexp.new(/^\+1(800|833|844|855|866|877|888)[2-9]\d{6}$/) if @api_client.config.client_side_validation && phone_number !~ pattern fail ArgumentError, "invalid value for 'phone_number' when calling TollFreeVerificationApi.delete_verification_request, must conform to the pattern #{pattern}." end # resource path local_var_path = '/accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'phoneNumber' + '}', CGI.escape(phone_number.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['Basic'] = opts.merge( :operation => :"TollFreeVerificationApi.delete_verification_request", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TollFreeVerificationApi#delete_verification_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_webhook_subscription(account_id, id, opts = {}) ⇒ nil
Delete Webhook Subscription Delete a webhook subscription by ID.
184 185 186 187 |
# File 'lib/bandwidth-sdk/api/toll_free_verification_api.rb', line 184 def delete_webhook_subscription(account_id, id, opts = {}) delete_webhook_subscription_with_http_info(account_id, id, opts) nil end |
#delete_webhook_subscription_with_http_info(account_id, id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Webhook Subscription Delete a webhook subscription by ID.
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 |
# File 'lib/bandwidth-sdk/api/toll_free_verification_api.rb', line 195 def delete_webhook_subscription_with_http_info(account_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TollFreeVerificationApi.delete_webhook_subscription ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling TollFreeVerificationApi.delete_webhook_subscription" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TollFreeVerificationApi.delete_webhook_subscription" end # resource path local_var_path = '/accounts/{accountId}/tollFreeVerification/webhooks/subscriptions/{id}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['Basic'] = opts.merge( :operation => :"TollFreeVerificationApi.delete_webhook_subscription", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TollFreeVerificationApi#delete_webhook_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_toll_free_verification_status(account_id, phone_number, opts = {}) ⇒ TfvStatus
Get Toll-Free Verification Status Gets the verification status for a phone number that is provisioned to your account. Submission information will be appended to the response if it is available.
253 254 255 256 |
# File 'lib/bandwidth-sdk/api/toll_free_verification_api.rb', line 253 def get_toll_free_verification_status(account_id, phone_number, opts = {}) data, _status_code, _headers = get_toll_free_verification_status_with_http_info(account_id, phone_number, opts) data end |
#get_toll_free_verification_status_with_http_info(account_id, phone_number, opts = {}) ⇒ Array<(TfvStatus, Integer, Hash)>
Get Toll-Free Verification Status Gets the verification status for a phone number that is provisioned to your account. Submission information will be appended to the response if it is available.
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 |
# File 'lib/bandwidth-sdk/api/toll_free_verification_api.rb', line 264 def get_toll_free_verification_status_with_http_info(account_id, phone_number, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TollFreeVerificationApi.get_toll_free_verification_status ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling TollFreeVerificationApi.get_toll_free_verification_status" end # verify the required parameter 'phone_number' is set if @api_client.config.client_side_validation && phone_number.nil? fail ArgumentError, "Missing the required parameter 'phone_number' when calling TollFreeVerificationApi.get_toll_free_verification_status" end if @api_client.config.client_side_validation && phone_number.to_s.length > 12 fail ArgumentError, 'invalid value for "phone_number" when calling TollFreeVerificationApi.get_toll_free_verification_status, the character length must be smaller than or equal to 12.' end if @api_client.config.client_side_validation && phone_number.to_s.length < 12 fail ArgumentError, 'invalid value for "phone_number" when calling TollFreeVerificationApi.get_toll_free_verification_status, the character length must be great than or equal to 12.' end pattern = Regexp.new(/^\+1(800|833|844|855|866|877|888)[2-9]\d{6}$/) if @api_client.config.client_side_validation && phone_number !~ pattern fail ArgumentError, "invalid value for 'phone_number' when calling TollFreeVerificationApi.get_toll_free_verification_status, must conform to the pattern #{pattern}." end # resource path local_var_path = '/accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'phoneNumber' + '}', CGI.escape(phone_number.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'TfvStatus' # auth_names auth_names = opts[:debug_auth_names] || ['Basic'] = opts.merge( :operation => :"TollFreeVerificationApi.get_toll_free_verification_status", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TollFreeVerificationApi#get_toll_free_verification_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_toll_free_use_cases(opts = {}) ⇒ Array<String>
List Toll-Free Use Cases Lists valid toll-free use cases.
333 334 335 336 |
# File 'lib/bandwidth-sdk/api/toll_free_verification_api.rb', line 333 def list_toll_free_use_cases(opts = {}) data, _status_code, _headers = list_toll_free_use_cases_with_http_info(opts) data end |
#list_toll_free_use_cases_with_http_info(opts = {}) ⇒ Array<(Array<String>, Integer, Hash)>
List Toll-Free Use Cases Lists valid toll-free use cases.
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 |
# File 'lib/bandwidth-sdk/api/toll_free_verification_api.rb', line 342 def list_toll_free_use_cases_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TollFreeVerificationApi.list_toll_free_use_cases ...' end # resource path local_var_path = '/tollFreeVerification/useCases' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<String>' # auth_names auth_names = opts[:debug_auth_names] || ['Basic'] = opts.merge( :operation => :"TollFreeVerificationApi.list_toll_free_use_cases", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TollFreeVerificationApi#list_toll_free_use_cases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_webhook_subscriptions(account_id, opts = {}) ⇒ WebhookSubscriptionsListBody
List Webhook Subscriptions Lists all webhook subscriptions that are registered to receive status updates for the toll-free verification requests submitted under this account (password will not be returned through this API If ‘basicAuthentication` is defined, the `password` property of that object will be null).
391 392 393 394 |
# File 'lib/bandwidth-sdk/api/toll_free_verification_api.rb', line 391 def list_webhook_subscriptions(account_id, opts = {}) data, _status_code, _headers = list_webhook_subscriptions_with_http_info(account_id, opts) data end |
#list_webhook_subscriptions_with_http_info(account_id, opts = {}) ⇒ Array<(WebhookSubscriptionsListBody, Integer, Hash)>
List Webhook Subscriptions Lists all webhook subscriptions that are registered to receive status updates for the toll-free verification requests submitted under this account (password will not be returned through this API If `basicAuthentication` is defined, the `password` property of that object will be null).
401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 |
# File 'lib/bandwidth-sdk/api/toll_free_verification_api.rb', line 401 def list_webhook_subscriptions_with_http_info(account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TollFreeVerificationApi.list_webhook_subscriptions ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling TollFreeVerificationApi.list_webhook_subscriptions" end # resource path local_var_path = '/accounts/{accountId}/tollFreeVerification/webhooks/subscriptions'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'WebhookSubscriptionsListBody' # auth_names auth_names = opts[:debug_auth_names] || ['Basic'] = opts.merge( :operation => :"TollFreeVerificationApi.list_webhook_subscriptions", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TollFreeVerificationApi#list_webhook_subscriptions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#request_toll_free_verification(account_id, verification_request, opts = {}) ⇒ nil
Request Toll-Free Verification Submit a request for verification of a toll-free phone number.
455 456 457 458 |
# File 'lib/bandwidth-sdk/api/toll_free_verification_api.rb', line 455 def request_toll_free_verification(account_id, verification_request, opts = {}) request_toll_free_verification_with_http_info(account_id, verification_request, opts) nil end |
#request_toll_free_verification_with_http_info(account_id, verification_request, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Request Toll-Free Verification Submit a request for verification of a toll-free phone number.
466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 |
# File 'lib/bandwidth-sdk/api/toll_free_verification_api.rb', line 466 def request_toll_free_verification_with_http_info(account_id, verification_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TollFreeVerificationApi.request_toll_free_verification ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling TollFreeVerificationApi.request_toll_free_verification" end # verify the required parameter 'verification_request' is set if @api_client.config.client_side_validation && verification_request.nil? fail ArgumentError, "Missing the required parameter 'verification_request' when calling TollFreeVerificationApi.request_toll_free_verification" end # resource path local_var_path = '/accounts/{accountId}/tollFreeVerification'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(verification_request) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['Basic'] = opts.merge( :operation => :"TollFreeVerificationApi.request_toll_free_verification", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TollFreeVerificationApi#request_toll_free_verification\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_toll_free_verification_request(account_id, phone_number, tfv_submission_wrapper, opts = {}) ⇒ nil
Update Toll-Free Verification Request Updates a toll-free verification request. Submissions are only eligible for resubmission for 7 days within being processed and if resubmission is allowed (resubmitAllowed field is true).
530 531 532 533 |
# File 'lib/bandwidth-sdk/api/toll_free_verification_api.rb', line 530 def update_toll_free_verification_request(account_id, phone_number, tfv_submission_wrapper, opts = {}) update_toll_free_verification_request_with_http_info(account_id, phone_number, tfv_submission_wrapper, opts) nil end |
#update_toll_free_verification_request_with_http_info(account_id, phone_number, tfv_submission_wrapper, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Update Toll-Free Verification Request Updates a toll-free verification request. Submissions are only eligible for resubmission for 7 days within being processed and if resubmission is allowed (resubmitAllowed field is true).
542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 |
# File 'lib/bandwidth-sdk/api/toll_free_verification_api.rb', line 542 def update_toll_free_verification_request_with_http_info(account_id, phone_number, tfv_submission_wrapper, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TollFreeVerificationApi.update_toll_free_verification_request ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling TollFreeVerificationApi.update_toll_free_verification_request" end # verify the required parameter 'phone_number' is set if @api_client.config.client_side_validation && phone_number.nil? fail ArgumentError, "Missing the required parameter 'phone_number' when calling TollFreeVerificationApi.update_toll_free_verification_request" end if @api_client.config.client_side_validation && phone_number.to_s.length > 12 fail ArgumentError, 'invalid value for "phone_number" when calling TollFreeVerificationApi.update_toll_free_verification_request, the character length must be smaller than or equal to 12.' end if @api_client.config.client_side_validation && phone_number.to_s.length < 12 fail ArgumentError, 'invalid value for "phone_number" when calling TollFreeVerificationApi.update_toll_free_verification_request, the character length must be great than or equal to 12.' end pattern = Regexp.new(/^\+1(800|833|844|855|866|877|888)[2-9]\d{6}$/) if @api_client.config.client_side_validation && phone_number !~ pattern fail ArgumentError, "invalid value for 'phone_number' when calling TollFreeVerificationApi.update_toll_free_verification_request, must conform to the pattern #{pattern}." end # verify the required parameter 'tfv_submission_wrapper' is set if @api_client.config.client_side_validation && tfv_submission_wrapper.nil? fail ArgumentError, "Missing the required parameter 'tfv_submission_wrapper' when calling TollFreeVerificationApi.update_toll_free_verification_request" end # resource path local_var_path = '/accounts/{accountId}/phoneNumbers/{phoneNumber}/tollFreeVerification'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'phoneNumber' + '}', CGI.escape(phone_number.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(tfv_submission_wrapper) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['Basic'] = opts.merge( :operation => :"TollFreeVerificationApi.update_toll_free_verification_request", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TollFreeVerificationApi#update_toll_free_verification_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_webhook_subscription(account_id, id, webhook_subscription_request_schema, opts = {}) ⇒ WebhookSubscription
Update Webhook Subscription Update an existing webhook subscription (‘callbackUrl` and `basicAuthentication` can be updated).
623 624 625 626 |
# File 'lib/bandwidth-sdk/api/toll_free_verification_api.rb', line 623 def update_webhook_subscription(account_id, id, webhook_subscription_request_schema, opts = {}) data, _status_code, _headers = update_webhook_subscription_with_http_info(account_id, id, webhook_subscription_request_schema, opts) data end |
#update_webhook_subscription_with_http_info(account_id, id, webhook_subscription_request_schema, opts = {}) ⇒ Array<(WebhookSubscription, Integer, Hash)>
Update Webhook Subscription Update an existing webhook subscription (`callbackUrl` and `basicAuthentication` can be updated).
635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 |
# File 'lib/bandwidth-sdk/api/toll_free_verification_api.rb', line 635 def update_webhook_subscription_with_http_info(account_id, id, webhook_subscription_request_schema, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TollFreeVerificationApi.update_webhook_subscription ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling TollFreeVerificationApi.update_webhook_subscription" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling TollFreeVerificationApi.update_webhook_subscription" end # verify the required parameter 'webhook_subscription_request_schema' is set if @api_client.config.client_side_validation && webhook_subscription_request_schema.nil? fail ArgumentError, "Missing the required parameter 'webhook_subscription_request_schema' when calling TollFreeVerificationApi.update_webhook_subscription" end # resource path local_var_path = '/accounts/{accountId}/tollFreeVerification/webhooks/subscriptions/{id}'.sub('{' + 'accountId' + '}', CGI.escape(account_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(webhook_subscription_request_schema) # return_type return_type = opts[:debug_return_type] || 'WebhookSubscription' # auth_names auth_names = opts[:debug_auth_names] || ['Basic'] = opts.merge( :operation => :"TollFreeVerificationApi.update_webhook_subscription", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TollFreeVerificationApi#update_webhook_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |