lib/purecloudplatformclientv2/models/time_interval.rb in purecloudplatformclientv2-56.0.0 vs lib/purecloudplatformclientv2/models/time_interval.rb in purecloudplatformclientv2-57.0.0
- old
+ new
@@ -16,18 +16,26 @@
require 'date'
module PureCloud
class TimeInterval
+ attr_accessor :months
+
+ attr_accessor :weeks
+
attr_accessor :days
attr_accessor :hours
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
+ :'months' => :'months',
+
+ :'weeks' => :'weeks',
+
:'days' => :'days',
:'hours' => :'hours'
}
@@ -35,10 +43,14 @@
# Attribute type mapping.
def self.swagger_types
{
+ :'months' => :'Integer',
+
+ :'weeks' => :'Integer',
+
:'days' => :'Integer',
:'hours' => :'Integer'
}
@@ -51,10 +63,28 @@
# convert string to symbol for hash key
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
+ if attributes.has_key?(:'months')
+
+
+ self.months = attributes[:'months']
+
+
+ end
+
+
+ if attributes.has_key?(:'weeks')
+
+
+ self.weeks = attributes[:'weeks']
+
+
+ end
+
+
if attributes.has_key?(:'days')
self.days = attributes[:'days']
@@ -92,10 +122,18 @@
+
+
+
+
+
+
+
+
end
@@ -105,15 +143,27 @@
+
+
+
+
+
+
+
+
+
+
# Checks equality by comparing each attribute.
# @param [Object] Object to be compared
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
+ months == o.months &&
+ weeks == o.weeks &&
days == o.days &&
hours == o.hours
end
# @see the `==` method
@@ -123,10 +173,10 @@
end
# Calculates hash code according to all attributes.
# @return [Fixnum] Hash code
def hash
- [days, hours].hash
+ [months, weeks, days, hours].hash
end
# build the object from hash
def build_from_hash(attributes)
return nil unless attributes.is_a?(Hash)