Class: Twilio::REST::Messaging::V2::TypingIndicatorInstance

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload) ⇒ TypingIndicatorInstance

Initialize the TypingIndicatorInstance

Parameters:

  • version (Version) —

    Version that contains the resource

  • payload (Hash) —

    payload that contains response from Twilio

  • account_sid (String) —

    The SID of the Account that created this TypingIndicator resource.

  • sid (String) —

    The SID of the Call resource to fetch.



145
146
147
148
149
150
151
152
153
# File 'lib/twilio-ruby/rest/messaging/v2/typing_indicator.rb', line 145

def initialize(version, payload )
    super(version)
    
    
    # Marshaled Properties
    @properties = { 
        'success' => payload['success'],
    }
end

Instance Method Details

#inspect ⇒ Object

Provide a detailed, user friendly representation



170
171
172
# File 'lib/twilio-ruby/rest/messaging/v2/typing_indicator.rb', line 170

def inspect
    "<Twilio.Messaging.V2.TypingIndicatorInstance>"
end

#success ⇒ Boolean

Returns Indicates if the typing indicator was sent successfully.

Returns:

  • (Boolean) —

    Indicates if the typing indicator was sent successfully.



158
159
160
# File 'lib/twilio-ruby/rest/messaging/v2/typing_indicator.rb', line 158

def success
    @properties['success']
end

#to_s ⇒ Object

Provide a user friendly representation



164
165
166
# File 'lib/twilio-ruby/rest/messaging/v2/typing_indicator.rb', line 164

def to_s
    "<Twilio.Messaging.V2.TypingIndicatorInstance>"
end