Class: Twilio::REST::Messaging::V2::TypingIndicatorList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Messaging::V2::TypingIndicatorList
- Defined in:
- lib/twilio-ruby/rest/messaging/v2/typing_indicator.rb
Instance Method Summary collapse
-
#create(channel: nil, message_id: nil) ⇒ TypingIndicatorInstance
Create the TypingIndicatorInstance.
-
#create_with_metadata(channel: nil, message_id: nil) ⇒ TypingIndicatorInstance
Create the TypingIndicatorInstanceMetadata.
-
#initialize(version) ⇒ TypingIndicatorList
constructor
Initialize the TypingIndicatorList.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version) ⇒ TypingIndicatorList
Initialize the TypingIndicatorList
26 27 28 29 30 31 32 33 |
# 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
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/twilio-ruby/rest/messaging/v2/typing_indicator.rb', line 39 def create( channel: nil, message_id: nil ) data = Twilio::Values.of({ 'channel' => channel, 'messageId' => , }) 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 |
#create_with_metadata(channel: nil, message_id: nil) ⇒ TypingIndicatorInstance
Create the TypingIndicatorInstanceMetadata
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/twilio-ruby/rest/messaging/v2/typing_indicator.rb', line 67 def ( channel: nil, message_id: nil ) data = Twilio::Values.of({ 'channel' => channel, 'messageId' => , }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('POST', @uri, data: data, headers: headers) typing_indicator_instance = TypingIndicatorInstance.new( @version, response.body, ) TypingIndicatorInstanceMetadata.new( @version, typing_indicator_instance, response.headers, response.status_code ) end |
#to_s ⇒ Object
Provide a user friendly representation
100 101 102 |
# File 'lib/twilio-ruby/rest/messaging/v2/typing_indicator.rb', line 100 def to_s '#<Twilio.Messaging.V2.TypingIndicatorList>' end |