Method: PureCloud::RuleSet#initialize
- Defined in:
- lib/purecloud/models/rule_set.rb
#initialize(attributes = {}) ⇒ RuleSet
Returns a new instance of RuleSet.
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 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/purecloud/models/rule_set.rb', line 85 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[:'id'] self.id = attributes[:'id'] end if attributes[:'name'] self.name = attributes[:'name'] end if attributes[:'dateCreated'] self.date_created = attributes[:'dateCreated'] end if attributes[:'dateModified'] self.date_modified = attributes[:'dateModified'] end if attributes[:'version'] self.version = attributes[:'version'] end if attributes[:'contactList'] self.contact_list = attributes[:'contactList'] end if attributes[:'queue'] self.queue = attributes[:'queue'] end if attributes[:'rules'] if (value = attributes[:'rules']).is_a?(Array) self.rules = value end end if attributes[:'selfUri'] self.self_uri = attributes[:'selfUri'] end end |