Class: Twilio::TwilioResponse
- Inherits:
-
Object
- Object
- Twilio::TwilioResponse
- Defined in:
- lib/twilio-ruby/framework/twilio_response.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#status_code ⇒ Object
Returns the value of attribute status_code.
Instance Method Summary collapse
-
#initialize(status_code, body) ⇒ TwilioResponse
constructor
deprecated
Deprecated.
Use ‘Twilio::Response’ instead.
- #to_s ⇒ Object
Constructor Details
#initialize(status_code, body) ⇒ TwilioResponse
Deprecated.
Use ‘Twilio::Response’ instead.
Returns a new instance of TwilioResponse.
6 7 8 9 10 11 |
# File 'lib/twilio-ruby/framework/twilio_response.rb', line 6 def initialize(status_code, body) warn "'Twilio::TwilioResponse' has been deprecated. Use 'Twilio::Response' instead." response = Twilio::Response.new(status_code, body) @status_code = response.status_code @body = response.body end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
3 4 5 |
# File 'lib/twilio-ruby/framework/twilio_response.rb', line 3 def body @body end |
#status_code ⇒ Object
Returns the value of attribute status_code.
3 4 5 |
# File 'lib/twilio-ruby/framework/twilio_response.rb', line 3 def status_code @status_code end |
Instance Method Details
#to_s ⇒ Object
13 14 15 |
# File 'lib/twilio-ruby/framework/twilio_response.rb', line 13 def to_s "[#{@status_code}] #{@body}" end |