Class: VoiceML::SipCredential

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

Overview

SipCredential — CR.... Password is write-only (never returned).

Constant Summary collapse

ATTRIBUTES =
%w[
  sid account_sid credential_list_sid username
  date_created date_updated uri
].freeze

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ SipCredential

Returns a new instance of SipCredential.



72
73
74
# File 'lib/voiceml/models/sip.rb', line 72

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

Class Method Details

.from_hash(h) ⇒ Object



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

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