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.



116
117
118
# File 'lib/voiceml/models/sip.rb', line 116

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

Class Method Details

.from_hash(h) ⇒ Object



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

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