Method: PureCloud::OutboundRouteBase#initialize

Defined in:
lib/purecloudplatformclientv2/models/outbound_route_base.rb

#initialize(attributes = {}) ⇒ OutboundRouteBase

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# File 'lib/purecloudplatformclientv2/models/outbound_route_base.rb', line 106

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}

  if attributes.has_key?(:'id')
    self.id = attributes[:'id']
  end

  if attributes.has_key?(:'name')
    self.name = attributes[:'name']
  end

  if attributes.has_key?(:'description')
    self.description = attributes[:'description']
  end

  if attributes.has_key?(:'version')
    self.version = attributes[:'version']
  end

  if attributes.has_key?(:'dateCreated')
    self.date_created = attributes[:'dateCreated']
  end

  if attributes.has_key?(:'dateModified')
    self.date_modified = attributes[:'dateModified']
  end

  if attributes.has_key?(:'modifiedBy')
    self.modified_by = attributes[:'modifiedBy']
  end

  if attributes.has_key?(:'createdBy')
    self.created_by = attributes[:'createdBy']
  end

  if attributes.has_key?(:'state')
    self.state = attributes[:'state']
  end

  if attributes.has_key?(:'modifiedByApp')
    self.modified_by_app = attributes[:'modifiedByApp']
  end

  if attributes.has_key?(:'createdByApp')
    self.created_by_app = attributes[:'createdByApp']
  end

  if attributes.has_key?(:'classificationTypes')
    if (value = attributes[:'classificationTypes']).is_a?(Array)
      self.classification_types = value
    end
  end

  if attributes.has_key?(:'enabled')
    self.enabled = attributes[:'enabled']
  end

  if attributes.has_key?(:'distribution')
    self.distribution = attributes[:'distribution']
  end

  if attributes.has_key?(:'externalTrunkBases')
    if (value = attributes[:'externalTrunkBases']).is_a?(Array)
      self.external_trunk_bases = value
    end
  end

  if attributes.has_key?(:'selfUri')
    self.self_uri = attributes[:'selfUri']
  end

end