Class: VoiceML::SipIpAddress

Inherits:
Object
  • Object
show all
Defined in:
lib/voiceml/models/sip.rb

Overview

SipIpAddress — IP....

Constant Summary collapse

ATTRIBUTES =
%w[
  sid account_sid ip_access_control_list_sid
  friendly_name ip_address cidr_prefix_length
  date_created date_updated uri
].freeze

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ SipIpAddress

Returns a new instance of SipIpAddress.



120
121
122
# File 'lib/voiceml/models/sip.rb', line 120

def initialize(attrs = {})
  ATTRIBUTES.each { |f| instance_variable_set("@#{f}", attrs[f] || attrs[f.to_sym]) }
end

Class Method Details

.from_hash(h) ⇒ Object



123
# File 'lib/voiceml/models/sip.rb', line 123

def self.from_hash(h); h.nil? ? nil : new(h); end