lib/payture/cheques/responses/status.rb in payture-cheques-0.1.0 vs lib/payture/cheques/responses/status.rb in payture-cheques-0.1.2

- old
+ new

@@ -13,14 +13,18 @@ def cheques @cheques ||= body['Cheques'].map { |c| ChequeStatus.new(c) } end def success? - body['Success'] == true + body['Success'] == true && cheques.all?(&:success?) end def error_code body['ErrCode'] || ERROR_STATES[body['Status']] + end + + def status + body['Status'] end end end end