Module: ActiveMerchant::Billing::Rails::Model

Defined in:
lib/active_merchant/billing/compatibility.rb

Defined Under Namespace

Classes: Errors

Instance Method Summary collapse

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


44
45
46
47
48
49
50
51
52
53
54
# File 'lib/active_merchant/billing/compatibility.rb', line 44

def valid?
  internal_errors.clear

  validate.each do |attribute, errors|
    errors.each do |error|
      internal_errors.add(attribute, error)
    end
  end

  internal_errors.empty?
end