bandwidth-sdk 11.0.0.pre.beta.3.0 → 11.0.0.pre.beta.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/README.md +3 -0
- data/bandwidth-sdk.gemspec +1 -1
- data/bandwidth.yml +26 -0
- data/coverage/.resultset.json +8 -6
- data/coverage/index.html +287 -265
- data/custom_templates/README.mustache +3 -0
- data/docs/CreateCall.md +2 -0
- data/lib/bandwidth-sdk/api/calls_api.rb +1 -1
- data/lib/bandwidth-sdk/api/conferences_api.rb +1 -1
- data/lib/bandwidth-sdk/api/media_api.rb +1 -1
- data/lib/bandwidth-sdk/api/messages_api.rb +1 -1
- data/lib/bandwidth-sdk/api/mfa_api.rb +1 -1
- data/lib/bandwidth-sdk/api/phone_number_lookup_api.rb +1 -1
- data/lib/bandwidth-sdk/api/recordings_api.rb +1 -1
- data/lib/bandwidth-sdk/api/statistics_api.rb +1 -1
- data/lib/bandwidth-sdk/api_client.rb +1 -1
- data/lib/bandwidth-sdk/api_error.rb +1 -1
- data/lib/bandwidth-sdk/configuration.rb +1 -1
- data/lib/bandwidth-sdk/models/account_statistics.rb +1 -1
- data/lib/bandwidth-sdk/models/answer_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/bridge_complete_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/bridge_target_complete_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/call_direction_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/call_recording_metadata.rb +1 -1
- data/lib/bandwidth-sdk/models/call_state.rb +1 -1
- data/lib/bandwidth-sdk/models/call_state_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/callback_method_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/code_request.rb +1 -1
- data/lib/bandwidth-sdk/models/conference.rb +1 -1
- data/lib/bandwidth-sdk/models/conference_completed_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/conference_created_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/conference_member.rb +1 -1
- data/lib/bandwidth-sdk/models/conference_member_exit_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/conference_member_join_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/conference_recording_available_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/conference_recording_metadata.rb +1 -1
- data/lib/bandwidth-sdk/models/conference_redirect_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/conference_state_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/create_call.rb +28 -2
- data/lib/bandwidth-sdk/models/create_call_response.rb +1 -1
- data/lib/bandwidth-sdk/models/create_lookup_response.rb +1 -1
- data/lib/bandwidth-sdk/models/create_message_request_error.rb +1 -1
- data/lib/bandwidth-sdk/models/deferred_result.rb +1 -1
- data/lib/bandwidth-sdk/models/disconnect_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/diversion.rb +1 -1
- data/lib/bandwidth-sdk/models/dtmf_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/field_error.rb +1 -1
- data/lib/bandwidth-sdk/models/file_format_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/gather_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/inbound_message_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/inbound_message_callback_message.rb +1 -1
- data/lib/bandwidth-sdk/models/initiate_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/list_message_direction_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/list_message_item.rb +1 -1
- data/lib/bandwidth-sdk/models/lookup_request.rb +1 -1
- data/lib/bandwidth-sdk/models/lookup_result.rb +1 -1
- data/lib/bandwidth-sdk/models/lookup_status.rb +1 -1
- data/lib/bandwidth-sdk/models/lookup_status_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/machine_detection_complete_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/machine_detection_configuration.rb +1 -1
- data/lib/bandwidth-sdk/models/machine_detection_mode_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/machine_detection_result.rb +1 -1
- data/lib/bandwidth-sdk/models/media.rb +1 -1
- data/lib/bandwidth-sdk/models/message.rb +1 -1
- data/lib/bandwidth-sdk/models/message_delivered_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/message_delivered_callback_message.rb +1 -1
- data/lib/bandwidth-sdk/models/message_direction_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/message_failed_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/message_failed_callback_message.rb +1 -1
- data/lib/bandwidth-sdk/models/message_request.rb +1 -1
- data/lib/bandwidth-sdk/models/message_sending_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/message_sending_callback_message.rb +1 -1
- data/lib/bandwidth-sdk/models/message_status_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/message_type_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/messages_list.rb +1 -1
- data/lib/bandwidth-sdk/models/messaging_code_response.rb +1 -1
- data/lib/bandwidth-sdk/models/messaging_request_error.rb +1 -1
- data/lib/bandwidth-sdk/models/mfa_forbidden_request_error.rb +1 -1
- data/lib/bandwidth-sdk/models/mfa_request_error.rb +1 -1
- data/lib/bandwidth-sdk/models/mfa_unauthorized_request_error.rb +1 -1
- data/lib/bandwidth-sdk/models/page_info.rb +1 -1
- data/lib/bandwidth-sdk/models/priority_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/recording_available_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/recording_complete_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/recording_state_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/redirect_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/redirect_method_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/stir_shaken.rb +1 -1
- data/lib/bandwidth-sdk/models/tag.rb +1 -1
- data/lib/bandwidth-sdk/models/tn_lookup_request_error.rb +1 -1
- data/lib/bandwidth-sdk/models/transcribe_recording.rb +1 -1
- data/lib/bandwidth-sdk/models/transcription.rb +1 -1
- data/lib/bandwidth-sdk/models/transcription_available_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/transcription_list.rb +1 -1
- data/lib/bandwidth-sdk/models/transcription_metadata.rb +1 -1
- data/lib/bandwidth-sdk/models/transfer_answer_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/transfer_complete_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/transfer_disconnect_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/update_call.rb +1 -1
- data/lib/bandwidth-sdk/models/update_call_recording.rb +1 -1
- data/lib/bandwidth-sdk/models/update_conference.rb +1 -1
- data/lib/bandwidth-sdk/models/update_conference_member.rb +1 -1
- data/lib/bandwidth-sdk/models/verify_code_request.rb +1 -1
- data/lib/bandwidth-sdk/models/verify_code_response.rb +1 -1
- data/lib/bandwidth-sdk/models/voice_api_error.rb +1 -1
- data/lib/bandwidth-sdk/models/voice_code_response.rb +1 -1
- data/lib/bandwidth-sdk/version.rb +2 -2
- data/lib/bandwidth-sdk.rb +1 -1
- data/openapitools.json +1 -1
- data/spec/api/calls_api_spec.rb +2 -0
- data/spec/integration/calls_api_integration_spec.rb +3 -1
- metadata +36 -37
- data/custom_templates/version.mustache +0 -7
@@ -14,6 +14,9 @@
|
|
14
14
|
|
15
15
|
{{moduleName}} - the Ruby gem for the {{appName}}
|
16
16
|
|
17
|
+
# Generated with the command:
|
18
|
+
`openapi-generator generate -g ruby -i bandwidth.yml -c openapi-config.yml -o ./`
|
19
|
+
|
17
20
|
{{#appDescriptionWithNewLines}}
|
18
21
|
{{{.}}}
|
19
22
|
{{/appDescriptionWithNewLines}}
|
data/docs/CreateCall.md
CHANGED
@@ -6,6 +6,7 @@
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **to** | **String** | The destination to call (must be an E.164 formatted number (e.g. `+15555551212`) or a SIP URI (e.g. `sip:user@server.example`)). | |
|
8
8
|
| **from** | **String** | A Bandwidth phone number on your account the call should come from (must be in E.164 format, like `+15555551212`, or be one of the following strings: `Restricted`, `Anonymous`, `Private`, or `Unavailable`). | |
|
9
|
+
| **display_name** | **String** | The caller display name to use when the call is created. May not exceed 256 characters nor contain control characters such as new lines. | [optional] |
|
9
10
|
| **uui** | **String** | A comma-separated list of 'User-To-User' headers to be sent in the INVITE when calling a SIP URI. Each value must end with an 'encoding' parameter as described in <a href='https://tools.ietf.org/html/rfc7433'>RFC 7433</a>. Only 'jwt' and 'base64' encodings are allowed. The entire value cannot exceed 350 characters, including parameters and separators. | [optional] |
|
10
11
|
| **application_id** | **String** | The id of the application associated with the `from` number. | |
|
11
12
|
| **answer_url** | **String** | The full URL to send the <a href='/docs/voice/webhooks/answer'>Answer</a> event to when the called party answers. This endpoint should return the first <a href='/docs/voice/bxml'>BXML document</a> to be executed in the call. Must use `https` if specifying `username` and `password`. | |
|
@@ -32,6 +33,7 @@ require 'bandwidth-sdk'
|
|
32
33
|
instance = Bandwidth::CreateCall.new(
|
33
34
|
to: +19195551234,
|
34
35
|
from: +19195554321,
|
36
|
+
display_name: John Doe,
|
35
37
|
uui: eyJhbGciOiJIUzI1NiJ9.WyJoaSJd.-znkjYyCkgz4djmHUPSXl9YrJ6Nix_XvmlwKGFh5ERM;encoding=jwt,aGVsbG8gd29ybGQ;encoding=base64,
|
36
38
|
application_id: 1234-qwer-5679-tyui,
|
37
39
|
answer_url: https://www.myCallbackServer.example/webhooks/answer,
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
7
7
|
Contact: letstalk@bandwidth.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 7.0.0
|
9
|
+
OpenAPI Generator version: 7.0.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -21,6 +21,9 @@ module Bandwidth
|
|
21
21
|
# A Bandwidth phone number on your account the call should come from (must be in E.164 format, like `+15555551212`, or be one of the following strings: `Restricted`, `Anonymous`, `Private`, or `Unavailable`).
|
22
22
|
attr_accessor :from
|
23
23
|
|
24
|
+
# The caller display name to use when the call is created. May not exceed 256 characters nor contain control characters such as new lines.
|
25
|
+
attr_accessor :display_name
|
26
|
+
|
24
27
|
# A comma-separated list of 'User-To-User' headers to be sent in the INVITE when calling a SIP URI. Each value must end with an 'encoding' parameter as described in <a href='https://tools.ietf.org/html/rfc7433'>RFC 7433</a>. Only 'jwt' and 'base64' encodings are allowed. The entire value cannot exceed 350 characters, including parameters and separators.
|
25
28
|
attr_accessor :uui
|
26
29
|
|
@@ -95,6 +98,7 @@ module Bandwidth
|
|
95
98
|
{
|
96
99
|
:'to' => :'to',
|
97
100
|
:'from' => :'from',
|
101
|
+
:'display_name' => :'displayName',
|
98
102
|
:'uui' => :'uui',
|
99
103
|
:'application_id' => :'applicationId',
|
100
104
|
:'answer_url' => :'answerUrl',
|
@@ -125,6 +129,7 @@ module Bandwidth
|
|
125
129
|
{
|
126
130
|
:'to' => :'String',
|
127
131
|
:'from' => :'String',
|
132
|
+
:'display_name' => :'String',
|
128
133
|
:'uui' => :'String',
|
129
134
|
:'application_id' => :'String',
|
130
135
|
:'answer_url' => :'String',
|
@@ -148,6 +153,7 @@ module Bandwidth
|
|
148
153
|
# List of attributes with nullable: true
|
149
154
|
def self.openapi_nullable
|
150
155
|
Set.new([
|
156
|
+
:'display_name',
|
151
157
|
:'uui',
|
152
158
|
:'answer_method',
|
153
159
|
:'username',
|
@@ -192,6 +198,10 @@ module Bandwidth
|
|
192
198
|
self.from = nil
|
193
199
|
end
|
194
200
|
|
201
|
+
if attributes.key?(:'display_name')
|
202
|
+
self.display_name = attributes[:'display_name']
|
203
|
+
end
|
204
|
+
|
195
205
|
if attributes.key?(:'uui')
|
196
206
|
self.uui = attributes[:'uui']
|
197
207
|
end
|
@@ -290,6 +300,10 @@ module Bandwidth
|
|
290
300
|
invalid_properties.push('invalid value for "from", from cannot be nil.')
|
291
301
|
end
|
292
302
|
|
303
|
+
if !@display_name.nil? && @display_name.to_s.length > 256
|
304
|
+
invalid_properties.push('invalid value for "display_name", the character length must be smaller than or equal to 256.')
|
305
|
+
end
|
306
|
+
|
293
307
|
if @application_id.nil?
|
294
308
|
invalid_properties.push('invalid value for "application_id", application_id cannot be nil.')
|
295
309
|
end
|
@@ -363,6 +377,7 @@ module Bandwidth
|
|
363
377
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
364
378
|
return false if @to.nil?
|
365
379
|
return false if @from.nil?
|
380
|
+
return false if !@display_name.nil? && @display_name.to_s.length > 256
|
366
381
|
return false if @application_id.nil?
|
367
382
|
return false if @answer_url.nil?
|
368
383
|
return false if @answer_url.to_s.length > 2048
|
@@ -382,6 +397,16 @@ module Bandwidth
|
|
382
397
|
true
|
383
398
|
end
|
384
399
|
|
400
|
+
# Custom attribute writer method with validation
|
401
|
+
# @param [Object] display_name Value to be assigned
|
402
|
+
def display_name=(display_name)
|
403
|
+
if !display_name.nil? && display_name.to_s.length > 256
|
404
|
+
fail ArgumentError, 'invalid value for "display_name", the character length must be smaller than or equal to 256.'
|
405
|
+
end
|
406
|
+
|
407
|
+
@display_name = display_name
|
408
|
+
end
|
409
|
+
|
385
410
|
# Custom attribute writer method with validation
|
386
411
|
# @param [Object] answer_url Value to be assigned
|
387
412
|
def answer_url=(answer_url)
|
@@ -515,6 +540,7 @@ module Bandwidth
|
|
515
540
|
self.class == o.class &&
|
516
541
|
to == o.to &&
|
517
542
|
from == o.from &&
|
543
|
+
display_name == o.display_name &&
|
518
544
|
uui == o.uui &&
|
519
545
|
application_id == o.application_id &&
|
520
546
|
answer_url == o.answer_url &&
|
@@ -543,7 +569,7 @@ module Bandwidth
|
|
543
569
|
# Calculates hash code according to all attributes.
|
544
570
|
# @return [Integer] Hash code
|
545
571
|
def hash
|
546
|
-
[to, from, uui, application_id, answer_url, answer_method, username, password, answer_fallback_url, answer_fallback_method, fallback_username, fallback_password, disconnect_url, disconnect_method, call_timeout, callback_timeout, machine_detection, priority, tag].hash
|
572
|
+
[to, from, display_name, uui, application_id, answer_url, answer_method, username, password, answer_fallback_url, answer_fallback_method, fallback_username, fallback_password, disconnect_url, disconnect_method, call_timeout, callback_timeout, machine_detection, priority, tag].hash
|
547
573
|
end
|
548
574
|
|
549
575
|
# Builds the object from hash
|