Class: Gupshup::GupshupResponse
- Inherits:
-
Object
- Object
- Gupshup::GupshupResponse
- Defined in:
- lib/gupshup-rb/framework/gupshup_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) ⇒ GupshupResponse
constructor
deprecated
Deprecated.
Use ‘Gupshup::Response’ instead.
- #to_s ⇒ Object
Constructor Details
#initialize(status_code, body) ⇒ GupshupResponse
Deprecated.
Use ‘Gupshup::Response’ instead.
Returns a new instance of GupshupResponse.
8 9 10 11 12 13 |
# File 'lib/gupshup-rb/framework/gupshup_response.rb', line 8 def initialize(status_code, body) warn "'Gupshup::GupshupResponse' has been deprecated. Use 'Gupshup::Response' instead." response = Gupshup::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.
5 6 7 |
# File 'lib/gupshup-rb/framework/gupshup_response.rb', line 5 def body @body end |
#status_code ⇒ Object
Returns the value of attribute status_code.
5 6 7 |
# File 'lib/gupshup-rb/framework/gupshup_response.rb', line 5 def status_code @status_code end |
Instance Method Details
#to_s ⇒ Object
15 16 17 |
# File 'lib/gupshup-rb/framework/gupshup_response.rb', line 15 def to_s "[#{@status_code}] #{@body}" end |