Class: Alfabank::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/alfabank/response.rb

Constant Summary collapse

ORDER_STATUS_APPROVED =
2

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dataObject (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

Returns:

  • (Boolean)


11
12
13
# File 'lib/alfabank/response.rb', line 11

def approved?
  @data['orderStatus'] == ORDER_STATUS_APPROVED
end