Class: Twilio::REST::Webhooks::V1::TestInstance

Inherits:
InstanceResource show all
Defined in:
lib/twilio-ruby/rest/webhooks/v1/test.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload) ⇒ TestInstance

Initialize the TestInstance

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 Test resource.

  • sid (String) —

    The SID of the Call resource to fetch.



180
181
182
183
184
185
186
187
188
189
190
191
# File 'lib/twilio-ruby/rest/webhooks/v1/test.rb', line 180

def initialize(version, payload )
    
    apiV1Version = ApiV1Version.new version.domain, version
    super(apiV1Version)
    
    # Marshaled Properties
    @properties = { 
        'url' => payload['url'],
        'result' => payload['result'],
        'created_at' => Twilio.deserialize_iso8601_datetime(payload['created_at']),
    }
end

Instance Method Details

#created_at ⇒ Time

Returns:

  • (Time)


208
209
210
# File 'lib/twilio-ruby/rest/webhooks/v1/test.rb', line 208

def created_at
    @properties['created_at']
end

#inspect ⇒ Object

Provide a detailed, user friendly representation



220
221
222
# File 'lib/twilio-ruby/rest/webhooks/v1/test.rb', line 220

def inspect
    "<Twilio.Webhooks.V1.TestInstance>"
end

#result ⇒ TestDeliveryResult

Returns:

  • (TestDeliveryResult)


202
203
204
# File 'lib/twilio-ruby/rest/webhooks/v1/test.rb', line 202

def result
    @properties['result']
end

#to_s ⇒ Object

Provide a user friendly representation



214
215
216
# File 'lib/twilio-ruby/rest/webhooks/v1/test.rb', line 214

def to_s
    "<Twilio.Webhooks.V1.TestInstance>"
end

#url ⇒ String

Returns:

  • (String)


196
197
198
# File 'lib/twilio-ruby/rest/webhooks/v1/test.rb', line 196

def url
    @properties['url']
end