Sha256: b3718bf4017a90f558998a19e9b484219036b8dd5c797b1904e5bb2872ad41cc

Contents?: true

Size: 565 Bytes

Versions: 45

Compression:

Stored size: 565 Bytes

Contents

require "active_merchant/billing/compatibility"
require "active_merchant/empty"

module ActiveMerchant
  module Billing
    class Model
      include Compatibility::Model
      include Empty

      def initialize(attributes = {})
        attributes.each do |key, value|
          send("#{key}=", value)
        end
      end

      def validate
        {}
      end

      private

      def errors_hash(array)
        array.inject({}) do |hash, (attribute, error)|
          (hash[attribute] ||= []) << error
          hash
        end
      end
    end
  end
end

Version data entries

45 entries across 44 versions & 4 rubygems

Version Path
activemerchant-1.79.2 lib/active_merchant/billing/model.rb
activemerchant-1.79.1 lib/active_merchant/billing/model.rb
activemerchant-1.79.0 lib/active_merchant/billing/model.rb
activemerchant-1.78.0 lib/active_merchant/billing/model.rb
activemerchant-1.77.0 lib/active_merchant/billing/model.rb
activemerchant-1.76.0 lib/active_merchant/billing/model.rb
activemerchant-1.75.0 lib/active_merchant/billing/model.rb
activemerchant-1.74.0 lib/active_merchant/billing/model.rb
activemerchant-1.73.0 lib/active_merchant/billing/model.rb
activemerchant-1.72.0 lib/active_merchant/billing/model.rb
activemerchant-1.71.0 lib/active_merchant/billing/model.rb
activemerchant-1.70.0 lib/active_merchant/billing/model.rb
activemerchant-1.69.0 lib/active_merchant/billing/model.rb
activemerchant-1.68.0 lib/active_merchant/billing/model.rb
activemerchant-1.67.0 lib/active_merchant/billing/model.rb
activemerchant-1.66.0 lib/active_merchant/billing/model.rb
activemerchant-1.65.0 lib/active_merchant/billing/model.rb
activemerchant-1.64.0 lib/active_merchant/billing/model.rb
activemerchant-1.63.0 lib/active_merchant/billing/model.rb
activemerchant-1.62.0 lib/active_merchant/billing/model.rb