Method: PureCloud::Segment#initialize
- Defined in:
- lib/purecloud/models/segment.rb
#initialize(attributes = {}) ⇒ Segment
Returns a new instance of Segment.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/purecloud/models/segment.rb', line 65 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[:'startTime'] self.start_time = attributes[:'startTime'] end if attributes[:'endTime'] self.end_time = attributes[:'endTime'] end if attributes[:'type'] self.type = attributes[:'type'] end if attributes[:'howEnded'] self.how_ended = attributes[:'howEnded'] end if attributes[:'disconnectType'] self.disconnect_type = attributes[:'disconnectType'] end end |