Class: Payoneer::Response
- Inherits:
-
Object
- Object
- Payoneer::Response
- Defined in:
- lib/payoneer/response.rb
Constant Summary collapse
- OK_STATUS_CODE =
'000'.freeze
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(code, body) ⇒ Response
constructor
A new instance of Response.
- #ok? ⇒ Boolean
Constructor Details
#initialize(code, body) ⇒ Response
Returns a new instance of Response.
7 8 9 10 |
# File 'lib/payoneer/response.rb', line 7 def initialize(code, body) @code = code @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
5 6 7 |
# File 'lib/payoneer/response.rb', line 5 def body @body end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
5 6 7 |
# File 'lib/payoneer/response.rb', line 5 def code @code end |
Instance Method Details
#ok? ⇒ Boolean
12 13 14 |
# File 'lib/payoneer/response.rb', line 12 def ok? code == OK_STATUS_CODE end |