Class: VoiceML::SipCredentialListPage
- Inherits:
-
Object
- Object
- VoiceML::SipCredentialListPage
- Includes:
- Pageable
- Defined in:
- lib/voiceml/models/sip.rb
Overview
SipCredentialListPage — spec name is SipCredentialListPage but it's a page of
CREDENTIALS (not credential-lists), mirroring Twilio.
Constant Summary
Constants included from Pageable
Instance Attribute Summary collapse
-
#credentials ⇒ Object
readonly
Returns the value of attribute credentials.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hash = {}) ⇒ SipCredentialListPage
constructor
A new instance of SipCredentialListPage.
Methods included from Pageable
Constructor Details
#initialize(hash = {}) ⇒ SipCredentialListPage
Returns a new instance of SipCredentialListPage.
83 84 85 86 |
# File 'lib/voiceml/models/sip.rb', line 83 def initialize(hash = {}) assign_page_fields(hash) @credentials = (hash['credentials'] || []).map { |h| SipCredential.from_hash(h) } end |
Instance Attribute Details
#credentials ⇒ Object (readonly)
Returns the value of attribute credentials.
82 83 84 |
# File 'lib/voiceml/models/sip.rb', line 82 def credentials @credentials end |
Class Method Details
.from_hash(hash) ⇒ Object
87 |
# File 'lib/voiceml/models/sip.rb', line 87 def self.from_hash(hash); new(hash || {}); end |