class DialMyCalls::CreateCallParameters
Attributes
Schedule this broadcast as an access account.
A list of feature add-ons for the calls.
(Required) The caller id that the message should be sent from.
(Required) List of contact information that should be sent the broadcast.
The recording id of the message that should be played on answering machines. If not supplied the recording_id
will be used. use_amd
must be true in order for this feature to work.
(Required) Name the broadcast.
(Required) The recording id of the message that should be played.
When the broadcast should be sent. (Ex: 2016-07-25T12:00:00+0000)
Also send an email to the contacts?
Should the broadcast go out immediately?
Using answering machine detection?
Public Class Methods
Attribute mapping from ruby-style variable name to JSON key.
# File lib/dialmycalls_client/models/create_call_parameters.rb, line 64 def self.attribute_map { :'name' => :'name', :'callerid_id' => :'callerid_id', :'recording_id' => :'recording_id', :'machine_recording_id' => :'machine_recording_id', :'send_at' => :'send_at', :'send_immediately' => :'send_immediately', :'use_amd' => :'use_amd', :'send_email' => :'send_email', :'accessaccount_id' => :'accessaccount_id', :'contacts' => :'contacts', :'add_ons' => :'add_ons' } end
Initializes the object @param [Hash] attributes Model attributes in the form of hash
# File lib/dialmycalls_client/models/create_call_parameters.rb, line 99 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} if attributes.has_key?(:'name') self.name = attributes[:'name'] end if attributes.has_key?(:'callerid_id') self.callerid_id = attributes[:'callerid_id'] end if attributes.has_key?(:'recording_id') self.recording_id = attributes[:'recording_id'] end if attributes.has_key?(:'machine_recording_id') self.machine_recording_id = attributes[:'machine_recording_id'] end if attributes.has_key?(:'send_at') self.send_at = attributes[:'send_at'] end if attributes.has_key?(:'send_immediately') self.send_immediately = attributes[:'send_immediately'] end if attributes.has_key?(:'use_amd') self.use_amd = attributes[:'use_amd'] end if attributes.has_key?(:'send_email') self.send_email = attributes[:'send_email'] end if attributes.has_key?(:'accessaccount_id') self.accessaccount_id = attributes[:'accessaccount_id'] end if attributes.has_key?(:'contacts') if (value = attributes[:'contacts']).is_a?(Array) self.contacts = value end end if attributes.has_key?(:'add_ons') if (value = attributes[:'add_ons']).is_a?(Array) self.add_ons = value end end end
Attribute type mapping.
# File lib/dialmycalls_client/models/create_call_parameters.rb, line 81 def self.swagger_types { :'name' => :'String', :'callerid_id' => :'String', :'recording_id' => :'String', :'machine_recording_id' => :'String', :'send_at' => :'String', :'send_immediately' => :'BOOLEAN', :'use_amd' => :'BOOLEAN', :'send_email' => :'BOOLEAN', :'accessaccount_id' => :'String', :'contacts' => :'Array<ContactAttributes>', :'add_ons' => :'Array<PushToListenAgain>' } end
Public Instance Methods
Checks equality by comparing each attribute. @param [Object] Object to be compared
# File lib/dialmycalls_client/models/create_call_parameters.rb, line 170 def ==(o) return true if self.equal?(o) self.class == o.class && name == o.name && callerid_id == o.callerid_id && recording_id == o.recording_id && machine_recording_id == o.machine_recording_id && send_at == o.send_at && send_immediately == o.send_immediately && use_amd == o.use_amd && send_email == o.send_email && accessaccount_id == o.accessaccount_id && contacts == o.contacts && add_ons == o.add_ons end
Deserializes the data based on type @param string type Data type @param string value Value to be deserialized @return [Object] Deserialized data
# File lib/dialmycalls_client/models/create_call_parameters.rb, line 222 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /^(true|t|yes|y|1)$/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = DialMyCalls.const_get(type).new temp_model.build_from_hash(value) end end
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash
# File lib/dialmycalls_client/models/create_call_parameters.rb, line 288 def _to_hash(value) if value.is_a?(Array) value.compact.map{ |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end
Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself
# File lib/dialmycalls_client/models/create_call_parameters.rb, line 201 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end
@see the `==` method @param [Object] Object to be compared
# File lib/dialmycalls_client/models/create_call_parameters.rb, line 188 def eql?(o) self == o end
Calculates hash code according to all attributes. @return [Fixnum] Hash code
# File lib/dialmycalls_client/models/create_call_parameters.rb, line 194 def hash [name, callerid_id, recording_id, machine_recording_id, send_at, send_immediately, use_amd, send_email, accessaccount_id, contacts, add_ons].hash end
Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properies with the reasons
# File lib/dialmycalls_client/models/create_call_parameters.rb, line 157 def list_invalid_properties invalid_properties = Array.new return invalid_properties end
Returns the object in the form of hash @return [Hash] Returns the object in the form of hash
# File lib/dialmycalls_client/models/create_call_parameters.rb, line 274 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end
Returns the string representation of the object @return [String] String presentation of the object
# File lib/dialmycalls_client/models/create_call_parameters.rb, line 262 def to_s to_hash.to_s end
Check to see if the all the properties in the model are valid @return true if the model is valid
# File lib/dialmycalls_client/models/create_call_parameters.rb, line 164 def valid? return true end