Class: VoiceML::SiprecSession
- Inherits:
-
Object
- Object
- VoiceML::SiprecSession
- Defined in:
- lib/voiceml/models/siprec.rb
Overview
SIPREC-session resource (REST equivalent of ‘<Start><Siprec>`).
Constant Summary collapse
- ATTRIBUTES =
%w[ sid account_sid call_sid name connector_name status api_version uri date_created date_updated ].freeze
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ SiprecSession
constructor
A new instance of SiprecSession.
Constructor Details
#initialize(attrs = {}) ⇒ SiprecSession
Returns a new instance of SiprecSession.
15 16 17 18 19 20 |
# File 'lib/voiceml/models/siprec.rb', line 15 def initialize(attrs = {}) ATTRIBUTES.each do |field| value = attrs.key?(field) ? attrs[field] : attrs[field.to_sym] instance_variable_set("@#{field}", value) end end |
Class Method Details
.from_hash(hash) ⇒ Object
22 23 24 25 26 |
# File 'lib/voiceml/models/siprec.rb', line 22 def self.from_hash(hash) return nil if hash.nil? new(hash) end |