Sha256: 5ec84df63e35d598e9af45582d89c38a98be125a35dda91db549e57246fef48d

Contents?: true

Size: 638 Bytes

Versions: 199

Compression:

Stored size: 638 Bytes

Contents

module Caboose
  class OrderTransaction < ActiveRecord::Base
    self.table_name  = 'store_order_transactions'
    self.primary_key = 'id'
    
    belongs_to :order
    attr_accessible :id,    
      :order_id,
      :transaction_id,
      :transaction_type,
      :amount,
      :auth_code,
      :date_processed,
      :response_code,
      :success 
        
    TYPE_AUTHORIZE = 'auth'
    TYPE_CAPTURE   = 'capture'
    TYPE_VOID      = 'void'
    TYPE_REFUND    = 'refund'
    
    after_initialize :check_nil_fields
    
    def check_nil_fields
      self.amount = 0.00 if self.amount.nil?        
    end
    
  end
end
   
    

Version data entries

199 entries across 199 versions & 1 rubygems

Version Path
caboose-cms-0.7.32 app/models/caboose/order_transaction.rb
caboose-cms-0.7.31 app/models/caboose/order_transaction.rb
caboose-cms-0.7.30 app/models/caboose/order_transaction.rb
caboose-cms-0.7.29 app/models/caboose/order_transaction.rb
caboose-cms-0.7.28 app/models/caboose/order_transaction.rb
caboose-cms-0.7.27 app/models/caboose/order_transaction.rb
caboose-cms-0.7.26 app/models/caboose/order_transaction.rb
caboose-cms-0.7.25 app/models/caboose/order_transaction.rb
caboose-cms-0.7.24 app/models/caboose/order_transaction.rb
caboose-cms-0.7.23 app/models/caboose/order_transaction.rb
caboose-cms-0.7.22 app/models/caboose/order_transaction.rb
caboose-cms-0.7.21 app/models/caboose/order_transaction.rb
caboose-cms-0.7.20 app/models/caboose/order_transaction.rb
caboose-cms-0.7.19 app/models/caboose/order_transaction.rb
caboose-cms-0.7.18 app/models/caboose/order_transaction.rb
caboose-cms-0.7.17 app/models/caboose/order_transaction.rb
caboose-cms-0.7.16 app/models/caboose/order_transaction.rb
caboose-cms-0.7.15 app/models/caboose/order_transaction.rb
caboose-cms-0.7.14 app/models/caboose/order_transaction.rb
caboose-cms-0.7.13 app/models/caboose/order_transaction.rb