Class: Twilio::REST::Messaging::V3::TypingIndicatorList::TypingIndicatorRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/twilio-ruby/rest/messaging/v3/typing_indicator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ TypingIndicatorRequest

Returns a new instance of TypingIndicatorRequest.



29
30
31
32
33
34
35
# File 'lib/twilio-ruby/rest/messaging/v3/typing_indicator.rb', line 29

def initialize(payload)
        @channel = payload["channel"]
        @message_id = payload["message_id"]
        @from = payload["from"]
        @to = payload["to"]
        @event = payload["event"]
end

Instance Attribute Details

#channel ⇒ Object

Parameters:

  • : (channel) —

    [String] The messaging channel. Must be "RCS".

  • : (message_id) —

    [String] The SID of a recent inbound message from the recipient. Must be an SM or MM SID format.

  • : (from) —

    [String] The RCS agent identifier of the sender (business).

  • : (to) —

    [String] The RCS recipient identifier in E.164 format prefixed with "rcs:".

  • : (event) —

    [String] The type of typing event. Currently only "START" is supported for RCS, indicating the agent began typing. Defaults to "START".



28
29
30
# File 'lib/twilio-ruby/rest/messaging/v3/typing_indicator.rb', line 28

def channel
  @channel
end

#event ⇒ Object

Parameters:

  • : (channel) —

    [String] The messaging channel. Must be "RCS".

  • : (message_id) —

    [String] The SID of a recent inbound message from the recipient. Must be an SM or MM SID format.

  • : (from) —

    [String] The RCS agent identifier of the sender (business).

  • : (to) —

    [String] The RCS recipient identifier in E.164 format prefixed with "rcs:".

  • : (event) —

    [String] The type of typing event. Currently only "START" is supported for RCS, indicating the agent began typing. Defaults to "START".



28
29
30
# File 'lib/twilio-ruby/rest/messaging/v3/typing_indicator.rb', line 28

def event
  @event
end

#from ⇒ Object

Parameters:

  • : (channel) —

    [String] The messaging channel. Must be "RCS".

  • : (message_id) —

    [String] The SID of a recent inbound message from the recipient. Must be an SM or MM SID format.

  • : (from) —

    [String] The RCS agent identifier of the sender (business).

  • : (to) —

    [String] The RCS recipient identifier in E.164 format prefixed with "rcs:".

  • : (event) —

    [String] The type of typing event. Currently only "START" is supported for RCS, indicating the agent began typing. Defaults to "START".



28
29
30
# File 'lib/twilio-ruby/rest/messaging/v3/typing_indicator.rb', line 28

def from
  @from
end

#message_id ⇒ Object

Parameters:

  • : (channel) —

    [String] The messaging channel. Must be "RCS".

  • : (message_id) —

    [String] The SID of a recent inbound message from the recipient. Must be an SM or MM SID format.

  • : (from) —

    [String] The RCS agent identifier of the sender (business).

  • : (to) —

    [String] The RCS recipient identifier in E.164 format prefixed with "rcs:".

  • : (event) —

    [String] The type of typing event. Currently only "START" is supported for RCS, indicating the agent began typing. Defaults to "START".



28
29
30
# File 'lib/twilio-ruby/rest/messaging/v3/typing_indicator.rb', line 28

def message_id
  @message_id
end

#to ⇒ Object

Parameters:

  • : (channel) —

    [String] The messaging channel. Must be "RCS".

  • : (message_id) —

    [String] The SID of a recent inbound message from the recipient. Must be an SM or MM SID format.

  • : (from) —

    [String] The RCS agent identifier of the sender (business).

  • : (to) —

    [String] The RCS recipient identifier in E.164 format prefixed with "rcs:".

  • : (event) —

    [String] The type of typing event. Currently only "START" is supported for RCS, indicating the agent began typing. Defaults to "START".



28
29
30
# File 'lib/twilio-ruby/rest/messaging/v3/typing_indicator.rb', line 28

def to
  @to
end

Instance Method Details

#to_json(options = {}) ⇒ Object



36
37
38
39
40
41
42
43
44
# File 'lib/twilio-ruby/rest/messaging/v3/typing_indicator.rb', line 36

def to_json(options = {})
{
        "channel": @channel,
        "messageId": @message_id,
        "from": @from,
        "to": @to,
        "event": @event,
}.to_json(options)
end