Method: PureCloud::DomainNetworkRoute#initialize

Defined in:
lib/purecloud/models/domain_network_route.rb

#initialize(attributes = {}) ⇒ DomainNetworkRoute

Returns a new instance of DomainNetworkRoute.



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/purecloud/models/domain_network_route.rb', line 44

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[:'prefix']
    self.prefix = attributes[:'prefix']
  end
  
  if attributes[:'nexthop']
    self.nexthop = attributes[:'nexthop']
  end
  
  if attributes[:'persistent']
    self.persistent = attributes[:'persistent']
  else
    self.persistent = false
  end
  
  if attributes[:'metric']
    self.metric = attributes[:'metric']
  end
  
  if attributes[:'family']
    self.family = attributes[:'family']
  end
  
end