Class: ChargeLine

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/charge_line.rb

Instance Method Summary collapse

Instance Method Details

#add_payment_txn(payment_txn) ⇒ Object



14
15
16
17
18
19
20
21
# File 'app/models/charge_line.rb', line 14

def add_payment_txn(payment_txn)
  charge_line_payment_txn = ChargeLinePaymentTxn.new
  charge_line_payment_txn.charge_line = self
  charge_line_payment_txn.payment_txn = payment_txn
  charge_line_payment_txn.save
  charge_line_payment_txns << charge_line_payment_txn
  self.save
end

#payment_txnsObject



10
11
12
# File 'app/models/charge_line.rb', line 10

def payment_txns
  self.financial_txns
end