Class: Twilio::REST::Messaging::V2::TypingIndicatorList

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

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ TypingIndicatorList

Initialize the TypingIndicatorList

Parameters:

  • version (Version)

    Version that contains the resource



26
27
28
29
30
31
32
# File 'lib/twilio-ruby/rest/messaging/v2/typing_indicator.rb', line 26

def initialize(version)
    super(version)
    # Path Solution
    @solution = {  }
    @uri = "/Indicators/Typing.json"
    
end

Instance Method Details

#create(channel: nil, message_id: nil) ⇒ TypingIndicatorInstance

Create the TypingIndicatorInstance

Parameters:

  • channel (String) (defaults to: nil)

    Shared channel identifier

  • message_id (String) (defaults to: nil)

    Message SID that identifies the conversation thread for the typing indicator. Must be a valid Twilio Message SID (SM*) or Media SID (MM*) from an existing WhatsApp conversation.

Returns:



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/twilio-ruby/rest/messaging/v2/typing_indicator.rb', line 38

def create(
    channel: nil, 
    message_id: nil
)

    data = Twilio::Values.of({
        'channel' => channel,
        'messageId' => message_id,
    })

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    
    
    payload = @version.create('POST', @uri, data: data, headers: headers)
    TypingIndicatorInstance.new(
        @version,
        payload,
    )
end

#to_sObject

Provide a user friendly representation



65
66
67
# File 'lib/twilio-ruby/rest/messaging/v2/typing_indicator.rb', line 65

def to_s
    '#<Twilio.Messaging.V2.TypingIndicatorList>'
end