Method: PureCloud::Wrapup#initialize
- Defined in:
- lib/purecloud/models/wrapup.rb
#initialize(attributes = {}) ⇒ Wrapup
Returns a new instance of Wrapup.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/purecloud/models/wrapup.rb', line 77 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[:'code'] self.code = attributes[:'code'] end if attributes[:'name'] self.name = attributes[:'name'] end if attributes[:'notes'] self.notes = attributes[:'notes'] end if attributes[:'tags'] if (value = attributes[:'tags']).is_a?(Array) self. = value end end if attributes[:'durationSeconds'] self.duration_seconds = attributes[:'durationSeconds'] end if attributes[:'endTime'] self.end_time = attributes[:'endTime'] end if attributes[:'provisional'] self.provisional = attributes[:'provisional'] else self.provisional = false end end |