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.125 app/models/caboose/order_transaction.rb
caboose-cms-0.5.124 app/models/caboose/order_transaction.rb
caboose-cms-0.5.123 app/models/caboose/order_transaction.rb
caboose-cms-0.5.122 app/models/caboose/order_transaction.rb
caboose-cms-0.5.121 app/models/caboose/order_transaction.rb
caboose-cms-0.5.120 app/models/caboose/order_transaction.rb
caboose-cms-0.5.119 app/models/caboose/order_transaction.rb
caboose-cms-0.5.118 app/models/caboose/order_transaction.rb
caboose-cms-0.5.117 app/models/caboose/order_transaction.rb
caboose-cms-0.5.116 app/models/caboose/order_transaction.rb
caboose-cms-0.5.115 app/models/caboose/order_transaction.rb
caboose-cms-0.5.114 app/models/caboose/order_transaction.rb
caboose-cms-0.5.113 app/models/caboose/order_transaction.rb
caboose-cms-0.5.112 app/models/caboose/order_transaction.rb
caboose-cms-0.5.111 app/models/caboose/order_transaction.rb
caboose-cms-0.5.110 app/models/caboose/order_transaction.rb
caboose-cms-0.5.109 app/models/caboose/order_transaction.rb
caboose-cms-0.5.108 app/models/caboose/order_transaction.rb
caboose-cms-0.5.107 app/models/caboose/order_transaction.rb