Class: SecupayRuby::Requests::Response
- Inherits:
-
Object
- Object
- SecupayRuby::Requests::Response
- Defined in:
- lib/secupay_ruby/requests/response.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#errors ⇒ Object
Returns the value of attribute errors.
-
#http_status ⇒ Object
Returns the value of attribute http_status.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
- #failed? ⇒ Boolean
-
#initialize(http_status:, status:, data:, errors:) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(http_status:, status:, data:, errors:) ⇒ Response
Returns a new instance of Response.
6 7 8 9 10 11 |
# File 'lib/secupay_ruby/requests/response.rb', line 6 def initialize(http_status:, status:, data:, errors:) self.http_status = http_status self.status = status self.data = data self.errors = errors end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
4 5 6 |
# File 'lib/secupay_ruby/requests/response.rb', line 4 def data @data end |
#errors ⇒ Object
Returns the value of attribute errors.
4 5 6 |
# File 'lib/secupay_ruby/requests/response.rb', line 4 def errors @errors end |
#http_status ⇒ Object
Returns the value of attribute http_status.
4 5 6 |
# File 'lib/secupay_ruby/requests/response.rb', line 4 def http_status @http_status end |
#status ⇒ Object
Returns the value of attribute status.
4 5 6 |
# File 'lib/secupay_ruby/requests/response.rb', line 4 def status @status end |
Instance Method Details
#failed? ⇒ Boolean
13 14 15 |
# File 'lib/secupay_ruby/requests/response.rb', line 13 def failed? http_status != "200" || status != "ok" end |