Class: VoiceML::AssistantsV1SendMessageResponse

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

Overview

AssistantsV1SendMessageResponse — POST /v1/Assistants/id/Messages return shape. Distinct from AssistantsV1Message: carries the model's reply body + flag/abort signals.

Constant Summary collapse

ATTRIBUTES =
%w[status flagged aborted session_id account_sid body error].freeze

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ AssistantsV1SendMessageResponse

Returns a new instance of AssistantsV1SendMessageResponse.



189
190
191
# File 'lib/voiceml/models/assistants_v1.rb', line 189

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



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

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