Class: VoiceML::SipDomain

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

Overview

SipDomain — ‘SD…` resource.

Constant Summary collapse

ATTRIBUTES =
%w[
  sid account_sid domain_name api_version friendly_name auth_type
  voice_url voice_method voice_fallback_url voice_fallback_method
  voice_status_callback_url voice_status_callback_method
  sip_registration emergency_calling_enabled secure
  byoc_trunk_sid emergency_caller_sid
  date_created date_updated uri subresource_uris
].freeze

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ SipDomain

Returns a new instance of SipDomain.



27
28
29
# File 'lib/voiceml/models/sip.rb', line 27

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

Class Method Details

.from_hash(h) ⇒ Object



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

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