class PayCertify::Gateway::Charge::Validation

Constants

ALL_VALIDATIONS

Public Class Methods

new(attributes={}) click to toggle source
# File lib/paycertify/gateway/charge.rb, line 47
def initialize(attributes={})
  super(attributes)

  ALL_VALIDATIONS.each do |attribute|
    presence_validation(attribute) if attribute[:required]
    send(attribute[:validation], attribute) if value_for(attribute).present?
  end
end