Class: Kaui::InvoicePayment

Inherits:
KillBillClient::Model::InvoicePayment
  • Object
show all
Defined in:
app/models/kaui/invoice_payment.rb

Constant Summary collapse

SAMPLE_REASON_CODES =
['600 - Alt payment method',
'699 - OTHER']

Instance Method Summary collapse

Instance Method Details

#is_fully_refunded?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'app/models/kaui/invoice_payment.rb', line 21

def is_fully_refunded?
  refunded_amount == captured_amount || refunded_amount == purchased_amount
end


12
13
14
# File 'app/models/kaui/invoice_payment.rb', line 12

def paid_amount_to_money
  captured_amount_to_money + purchased_amount_to_money
end

#returned_amount_to_moneyObject

TODO Better name?



17
18
19
# File 'app/models/kaui/invoice_payment.rb', line 17

def returned_amount_to_money
  refunded_amount_to_money + credited_amount_to_money
end