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.5.226 app/models/caboose/order_transaction.rb
caboose-cms-0.5.225 app/models/caboose/order_transaction.rb
caboose-cms-0.5.224 app/models/caboose/order_transaction.rb
caboose-cms-0.5.223 app/models/caboose/order_transaction.rb
caboose-cms-0.5.222 app/models/caboose/order_transaction.rb
caboose-cms-0.5.221 app/models/caboose/order_transaction.rb
caboose-cms-0.5.220 app/models/caboose/order_transaction.rb
caboose-cms-0.5.219 app/models/caboose/order_transaction.rb
caboose-cms-0.5.218 app/models/caboose/order_transaction.rb
caboose-cms-0.5.217 app/models/caboose/order_transaction.rb
caboose-cms-0.5.216 app/models/caboose/order_transaction.rb
caboose-cms-0.5.215 app/models/caboose/order_transaction.rb
caboose-cms-0.5.214 app/models/caboose/order_transaction.rb
caboose-cms-0.5.213 app/models/caboose/order_transaction.rb
caboose-cms-0.5.212 app/models/caboose/order_transaction.rb
caboose-cms-0.5.211 app/models/caboose/order_transaction.rb
caboose-cms-0.5.210 app/models/caboose/order_transaction.rb
caboose-cms-0.5.209 app/models/caboose/order_transaction.rb
caboose-cms-0.5.208 app/models/caboose/order_transaction.rb
caboose-cms-0.5.207 app/models/caboose/order_transaction.rb