Class: VoiceML::SipAuthMappingList
- Inherits:
-
Object
- Object
- VoiceML::SipAuthMappingList
- Includes:
- Pageable
- Defined in:
- lib/voiceml/models/sip.rb
Overview
SipAuthMappingList — page envelope used by all four /Auth/* mapping list
endpoints. Twilio's spec uses a generic contents envelope key here (not
credential_list_mappings / ip_access_control_list_mappings) because
the same list shape is reused across CredentialList and IpAccessControlList
auth mappings; the inner items decode as SipDomainMapping either way.
Constant Summary
Constants included from Pageable
Instance Attribute Summary collapse
-
#contents ⇒ Object
readonly
Returns the value of attribute contents.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hash = {}) ⇒ SipAuthMappingList
constructor
A new instance of SipAuthMappingList.
Methods included from Pageable
Constructor Details
#initialize(hash = {}) ⇒ SipAuthMappingList
Returns a new instance of SipAuthMappingList.
178 179 180 181 |
# File 'lib/voiceml/models/sip.rb', line 178 def initialize(hash = {}) assign_page_fields(hash) @contents = (hash['contents'] || []).map { |h| SipDomainMapping.from_hash(h) } end |
Instance Attribute Details
#contents ⇒ Object (readonly)
Returns the value of attribute contents.
177 178 179 |
# File 'lib/voiceml/models/sip.rb', line 177 def contents @contents end |
Class Method Details
.from_hash(hash) ⇒ Object
182 |
# File 'lib/voiceml/models/sip.rb', line 182 def self.from_hash(hash); new(hash || {}); end |