Class: Kaui::Payment
- Inherits:
-
KillBillClient::Model::Payment
- Object
- KillBillClient::Model::Payment
- Kaui::Payment
- Defined in:
- app/models/kaui/payment.rb
Constant Summary collapse
- SAMPLE_REASON_CODES =
['600 - Alt payment method', '699 - OTHER']
Instance Method Summary collapse
- #is_fully_refunded? ⇒ Boolean
- #paid_amount_to_money ⇒ Object
-
#returned_amount_to_money ⇒ Object
TODO Better name?.
Instance Method Details
#is_fully_refunded? ⇒ Boolean
21 22 23 |
# File 'app/models/kaui/payment.rb', line 21 def is_fully_refunded? refunded_amount == captured_amount || refunded_amount == purchased_amount end |
#paid_amount_to_money ⇒ Object
12 13 14 |
# File 'app/models/kaui/payment.rb', line 12 def paid_amount_to_money captured_amount_to_money + purchased_amount_to_money end |
#returned_amount_to_money ⇒ Object
TODO Better name?
17 18 19 |
# File 'app/models/kaui/payment.rb', line 17 def returned_amount_to_money refunded_amount_to_money + credited_amount_to_money end |