lib/quickbooks-payments/charge.rb in quickbooks-payments-0.0.7 vs lib/quickbooks-payments/charge.rb in quickbooks-payments-0.0.8

- old
+ new

@@ -7,11 +7,11 @@ # Create a charge by using `Charge.create()` class Charge < BasicModel @root_url = '/quickbooks/v4/payments/charges' attr_accessor :status, :amount, :currency, :token, :id, :auth_code, - :request_id + :request_id, :errors attr_reader :created_at alias_method :authCode=, :auth_code= # Statuses @@ -79,8 +79,14 @@ Time.parse(string_or_time) end end alias_method :created=, :created_at= + + # Getters + + def error? + errors.any? + end end end end