Class: VoiceML::AssistantsV1Session

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

Overview

AssistantsV1Session — a chat session between an identity and an Assistant.

Constant Summary collapse

ATTRIBUTES =
%w[
  id account_sid assistant_id verified identity date_created date_updated
].freeze

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ AssistantsV1Session

Returns a new instance of AssistantsV1Session.



147
148
149
# File 'lib/voiceml/models/assistants_v1.rb', line 147

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

Class Method Details

.from_hash(h) ⇒ Object



150
# File 'lib/voiceml/models/assistants_v1.rb', line 150

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