Class: VoiceML::SipDomainMapping

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

Overview

SipDomainMapping — round-trip shape for every domain mapping sub-resource. ‘sid` echoes the bound resource (CL… for credential mappings, AL… for IP-ACL); `domain_sid` records which domain the binding is attached to.

Constant Summary collapse

ATTRIBUTES =
%w[
  sid account_sid friendly_name domain_sid date_created date_updated uri
].freeze

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ SipDomainMapping

Returns a new instance of SipDomainMapping.



139
140
141
# File 'lib/voiceml/models/sip.rb', line 139

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

Class Method Details

.from_hash(h) ⇒ Object



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

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