Class: Twilio::REST::Webhooks::V1::TestList::TestDeliveryResultResponse

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ TestDeliveryResultResponse

Returns a new instance of TestDeliveryResultResponse.



26
27
28
29
# File 'lib/twilio-ruby/rest/webhooks/v1/test.rb', line 26

def initialize(payload)
        @status_code = payload["status_code"]
        @headers = payload["headers"]
end

Instance Attribute Details

#headers ⇒ Object

Parameters:



25
26
27
# File 'lib/twilio-ruby/rest/webhooks/v1/test.rb', line 25

def headers
  @headers
end

#status_code ⇒ Object

Parameters:



25
26
27
# File 'lib/twilio-ruby/rest/webhooks/v1/test.rb', line 25

def status_code
  @status_code
end

Instance Method Details

#to_json(options = {}) ⇒ Object



30
31
32
33
34
35
# File 'lib/twilio-ruby/rest/webhooks/v1/test.rb', line 30

def to_json(options = {})
{
        "statusCode": @status_code,
        "headers": @headers,
}.to_json(options)
end