Class: Alfabank::Response
- Inherits:
-
Object
- Object
- Alfabank::Response
- Defined in:
- lib/alfabank/response.rb
Constant Summary collapse
- ORDER_STATUS_APPROVED =
2
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
- #approved? ⇒ Boolean
-
#initialize(data) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(data) ⇒ Response
Returns a new instance of Response.
7 8 9 |
# File 'lib/alfabank/response.rb', line 7 def initialize(data) @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
5 6 7 |
# File 'lib/alfabank/response.rb', line 5 def data @data end |
Instance Method Details
#approved? ⇒ Boolean
11 12 13 |
# File 'lib/alfabank/response.rb', line 11 def approved? @data['orderStatus'] == ORDER_STATUS_APPROVED end |