Class: Twilio::REST::Conversations::V2::ActionList::ConversationsV2SendMessagePayload

Inherits:
Object
  • Object
show all
Defined in:
lib/twilio-ruby/rest/conversations/v2/action.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ ConversationsV2SendMessagePayload

Returns a new instance of ConversationsV2SendMessagePayload.



69
70
71
72
73
74
# File 'lib/twilio-ruby/rest/conversations/v2/action.rb', line 69

def initialize(payload)
        @from = payload["from"]
        @to = payload["to"]
        @content = payload["content"]
        @channel_settings = payload["channel_settings"]
end

Instance Attribute Details

#channel_settingsObject

Parameters:

  • : (from)
    ActionList.ConversationsV2SendMessageParticipant
  • : (to)
    Array<ActionList.ConversationsV2SendMessageParticipant>

    The recipients of this action.

  • : (content)
    ActionList.ConversationsV2SendMessageContent
  • : (channel_settings)
    Hash<String, Object>

    Channel-specific parameters forwarded as-is to the downstream sending service. Allows passing backend-specific fields without requiring API changes.



68
69
70
# File 'lib/twilio-ruby/rest/conversations/v2/action.rb', line 68

def channel_settings
  @channel_settings
end

#contentObject

Parameters:

  • : (from)
    ActionList.ConversationsV2SendMessageParticipant
  • : (to)
    Array<ActionList.ConversationsV2SendMessageParticipant>

    The recipients of this action.

  • : (content)
    ActionList.ConversationsV2SendMessageContent
  • : (channel_settings)
    Hash<String, Object>

    Channel-specific parameters forwarded as-is to the downstream sending service. Allows passing backend-specific fields without requiring API changes.



68
69
70
# File 'lib/twilio-ruby/rest/conversations/v2/action.rb', line 68

def content
  @content
end

#fromObject

Parameters:

  • : (from)
    ActionList.ConversationsV2SendMessageParticipant
  • : (to)
    Array<ActionList.ConversationsV2SendMessageParticipant>

    The recipients of this action.

  • : (content)
    ActionList.ConversationsV2SendMessageContent
  • : (channel_settings)
    Hash<String, Object>

    Channel-specific parameters forwarded as-is to the downstream sending service. Allows passing backend-specific fields without requiring API changes.



68
69
70
# File 'lib/twilio-ruby/rest/conversations/v2/action.rb', line 68

def from
  @from
end

#toObject

Parameters:

  • : (from)
    ActionList.ConversationsV2SendMessageParticipant
  • : (to)
    Array<ActionList.ConversationsV2SendMessageParticipant>

    The recipients of this action.

  • : (content)
    ActionList.ConversationsV2SendMessageContent
  • : (channel_settings)
    Hash<String, Object>

    Channel-specific parameters forwarded as-is to the downstream sending service. Allows passing backend-specific fields without requiring API changes.



68
69
70
# File 'lib/twilio-ruby/rest/conversations/v2/action.rb', line 68

def to
  @to
end

Instance Method Details

#to_json(options = {}) ⇒ Object



75
76
77
78
79
80
81
82
# File 'lib/twilio-ruby/rest/conversations/v2/action.rb', line 75

def to_json(options = {})
{
        "from": @from,
        "to": @to,
        "content": @content,
        "channelSettings": @channel_settings,
}.to_json(options)
end