lib/purecloudplatformclientv2/models/call_forwarding.rb in purecloudplatformclientv2-20.0.0 vs lib/purecloudplatformclientv2/models/call_forwarding.rb in purecloudplatformclientv2-21.0.0
- old
+ new
@@ -23,14 +23,22 @@
attr_accessor :name
attr_accessor :user
+ # Whether or not CallForwarding is enabled
attr_accessor :enabled
+ # This property is deprecated. Please use the calls property
attr_accessor :phone_number
+ # An ordered list of CallRoutes to be executed when CallForwarding is enabled
+ attr_accessor :calls
+
+ # The type of voicemail to use with the callForwarding configuration
+ attr_accessor :voicemail
+
# Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
attr_accessor :modified_date
# The URI for this object
attr_accessor :self_uri
@@ -47,10 +55,14 @@
:'enabled' => :'enabled',
:'phone_number' => :'phoneNumber',
+ :'calls' => :'calls',
+
+ :'voicemail' => :'voicemail',
+
:'modified_date' => :'modifiedDate',
:'self_uri' => :'selfUri'
}
@@ -68,10 +80,14 @@
:'enabled' => :'BOOLEAN',
:'phone_number' => :'String',
+ :'calls' => :'Array<CallRoute>',
+
+ :'voicemail' => :'String',
+
:'modified_date' => :'DateTime',
:'self_uri' => :'String'
}
@@ -129,10 +145,30 @@
end
+ if attributes.has_key?(:'calls')
+
+ if (value = attributes[:'calls']).is_a?(Array)
+ self.calls = value
+ end
+
+
+
+ end
+
+
+ if attributes.has_key?(:'voicemail')
+
+
+ self.voicemail = attributes[:'voicemail']
+
+
+ end
+
+
if attributes.has_key?(:'modifiedDate')
self.modified_date = attributes[:'modifiedDate']
@@ -188,12 +224,25 @@
+ allowed_values = ["PURECLOUD", "LASTCALL", "NONE"]
+ if @voicemail && !allowed_values.include?(@voicemail)
+ return false
+ end
+
+
+
+
+
+
+
+
+
end
@@ -224,24 +273,45 @@
+ # Custom attribute writer method checking allowed values (enum).
+ # @param [Object] voicemail Object to be assigned
+ def voicemail=(voicemail)
+ allowed_values = ["PURECLOUD", "LASTCALL", "NONE"]
+ if voicemail && !allowed_values.include?(voicemail)
+ fail ArgumentError, "invalid value for 'voicemail', must be one of #{allowed_values}."
+ end
+ @voicemail = voicemail
+ end
+
+
+
+
+
+
+
+
+
+
# Checks equality by comparing each attribute.
# @param [Object] Object to be compared
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
id == o.id &&
name == o.name &&
user == o.user &&
enabled == o.enabled &&
phone_number == o.phone_number &&
+ calls == o.calls &&
+ voicemail == o.voicemail &&
modified_date == o.modified_date &&
self_uri == o.self_uri
end
# @see the `==` method
@@ -251,10 +321,10 @@
end
# Calculates hash code according to all attributes.
# @return [Fixnum] Hash code
def hash
- [id, name, user, enabled, phone_number, modified_date, self_uri].hash
+ [id, name, user, enabled, phone_number, calls, voicemail, modified_date, self_uri].hash
end
# build the object from hash
def build_from_hash(attributes)
return nil unless attributes.is_a?(Hash)