Method: PureCloud::TimeAllowed#initialize
- Defined in:
- lib/purecloud/models/time_allowed.rb
#initialize(attributes = {}) ⇒ TimeAllowed
Returns a new instance of TimeAllowed.
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/purecloud/models/time_allowed.rb', line 50 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo} if attributes[:'timeSlots'] if (value = attributes[:'timeSlots']).is_a?(Array) self.time_slots = value end end if attributes[:'timeZoneId'] self.time_zone_id = attributes[:'timeZoneId'] end if attributes[:'empty'] self.empty = attributes[:'empty'] end end |