lib/bandwidth-sdk/models/create_call.rb in bandwidth-sdk-11.0.0.pre.beta.1.1 vs lib/bandwidth-sdk/models/create_call.rb in bandwidth-sdk-11.0.0.pre.beta.2.0
- old
+ new
@@ -4,20 +4,20 @@
#Bandwidth's Communication APIs
The version of the OpenAPI document: 1.0.0
Contact: letstalk@bandwidth.com
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 6.4.0
+OpenAPI Generator version: 6.5.0
=end
require 'date'
require 'time'
module Bandwidth
class CreateCall
- # The destination to call (must be an E.164 formatted number (e.g. `+15555551212`) or a SIP URI (e.g. `sip:user@server.com`)).
+ # The destination to call (must be an E.164 formatted number (e.g. `+15555551212`) or a SIP URI (e.g. `sip:user@server.example`)).
attr_accessor :to
# 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`).
attr_accessor :from
@@ -25,22 +25,22 @@
attr_accessor :uui
# The id of the application associated with the `from` number.
attr_accessor :application_id
- # 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`
+ # 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`.
attr_accessor :answer_url
attr_accessor :answer_method
# Basic auth username.
attr_accessor :username
# Basic auth password.
attr_accessor :password
- # A fallback url which, if provided, will be used to retry the `answer` webhook delivery in case `answerUrl` fails to respond Must use `https` if specifying `fallbackUsername` and `fallbackPassword`
+ # A fallback url which, if provided, will be used to retry the `answer` webhook delivery in case `answerUrl` fails to respond Must use `https` if specifying `fallbackUsername` and `fallbackPassword`.
attr_accessor :answer_fallback_url
attr_accessor :answer_fallback_method
# Basic auth username.
@@ -167,11 +167,11 @@
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
- fail ArgumentError, "The input argument (attributes) must be a hash in `Bandwidth::CreateCall` initialize method"
+ fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::CreateCall` initialize method'
end
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
@@ -339,10 +339,14 @@
if !@priority.nil? && @priority < 1
invalid_properties.push('invalid value for "priority", must be greater than or equal to 1.')
end
+ if !@tag.nil? && @tag.to_s.length > 256
+ invalid_properties.push('invalid value for "tag", the character length must be smaller than or equal to 256.')
+ end
+
invalid_properties
end
# Check to see if the all the properties in the model are valid
# @return true if the model is valid
@@ -362,10 +366,11 @@
return false if !@call_timeout.nil? && @call_timeout < 1
return false if !@callback_timeout.nil? && @callback_timeout > 25
return false if !@callback_timeout.nil? && @callback_timeout < 1
return false if !@priority.nil? && @priority > 5
return false if !@priority.nil? && @priority < 1
+ return false if !@tag.nil? && @tag.to_s.length > 256
true
end
# Custom attribute writer method with validation
# @param [Object] answer_url Value to be assigned
@@ -484,10 +489,14 @@
end
# Custom attribute writer method with validation
# @param [Object] tag Value to be assigned
def tag=(tag)
+ if !tag.nil? && tag.to_s.length > 256
+ fail ArgumentError, 'invalid value for "tag", the character length must be smaller than or equal to 256.'
+ end
+
@tag = tag
end
# Checks equality by comparing each attribute.
# @param [Object] Object to be compared
@@ -643,9 +652,7 @@
value.to_hash
else
value
end
end
-
end
-
end