Class: Twilio::REST::Assistants::V1::AssistantContext::MessageList::AssistantsV1ServiceAssistantSendMessageRequest
- Inherits:
-
Object
- Object
- Twilio::REST::Assistants::V1::AssistantContext::MessageList::AssistantsV1ServiceAssistantSendMessageRequest
- Defined in:
- lib/twilio-ruby/rest/assistants/v1/assistant/message.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(payload) ⇒ AssistantsV1ServiceAssistantSendMessageRequest
constructor
A new instance of AssistantsV1ServiceAssistantSendMessageRequest.
- #to_json(options = {}) ⇒ Object
Constructor Details
#initialize(payload) ⇒ AssistantsV1ServiceAssistantSendMessageRequest
Returns a new instance of AssistantsV1ServiceAssistantSendMessageRequest.
31 32 33 34 35 36 37 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/message.rb', line 31 def initialize(payload) @identity = payload["identity"] @session_id = payload["session_id"] @body = payload["body"] @webhook = payload["webhook"] @mode = payload["mode"] end |
Instance Attribute Details
#body ⇒ Object
30 31 32 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/message.rb', line 30 def body @body end |
#identity ⇒ Object
30 31 32 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/message.rb', line 30 def identity @identity end |
#mode ⇒ Object
30 31 32 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/message.rb', line 30 def mode @mode end |
#session_id ⇒ Object
30 31 32 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/message.rb', line 30 def session_id @session_id end |
#webhook ⇒ Object
30 31 32 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/message.rb', line 30 def webhook @webhook end |
Instance Method Details
#to_json(options = {}) ⇒ Object
38 39 40 41 42 43 44 45 46 |
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/message.rb', line 38 def to_json( = {}) { "identity": @identity, "session_id": @session_id, "body": @body, "webhook": @webhook, "mode": @mode, }.to_json() end |