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.145 app/models/caboose/order_transaction.rb
caboose-cms-0.5.144 app/models/caboose/order_transaction.rb
caboose-cms-0.5.143 app/models/caboose/order_transaction.rb
caboose-cms-0.5.142 app/models/caboose/order_transaction.rb
caboose-cms-0.5.141 app/models/caboose/order_transaction.rb
caboose-cms-0.5.140 app/models/caboose/order_transaction.rb
caboose-cms-0.5.139 app/models/caboose/order_transaction.rb
caboose-cms-0.5.138 app/models/caboose/order_transaction.rb
caboose-cms-0.5.137 app/models/caboose/order_transaction.rb
caboose-cms-0.5.136 app/models/caboose/order_transaction.rb
caboose-cms-0.5.135 app/models/caboose/order_transaction.rb
caboose-cms-0.5.134 app/models/caboose/order_transaction.rb
caboose-cms-0.5.133 app/models/caboose/order_transaction.rb
caboose-cms-0.5.132 app/models/caboose/order_transaction.rb
caboose-cms-0.5.131 app/models/caboose/order_transaction.rb
caboose-cms-0.5.130 app/models/caboose/order_transaction.rb
caboose-cms-0.5.129 app/models/caboose/order_transaction.rb
caboose-cms-0.5.128 app/models/caboose/order_transaction.rb
caboose-cms-0.5.127 app/models/caboose/order_transaction.rb
caboose-cms-0.5.126 app/models/caboose/order_transaction.rb