Class: Kaui::Payment
- Inherits:
-
Base
- Object
- Base
- Kaui::Payment
show all
- Defined in:
- app/models/kaui/payment.rb
Constant Summary
collapse
- SAMPLE_REASON_CODES =
[ "600 - Alt payment method",
"699 - OTHER" ]
Instance Attribute Summary
Attributes inherited from Base
#errors
Instance Method Summary
collapse
Methods inherited from Base
#==, all, #attributes=, camelize, convert_hash_keys, count, define_attr, #destroy, find, from_json, has_many, has_one, human_attribute_name, #initialize, lookup_ancestors, #new_record?, #persisted?, #read_attribute_for_validation, #save, #to_hash, to_money, #to_param, #update_attributes
Constructor Details
This class inherits a constructor from Kaui::Base
Instance Method Details
#amount_to_money ⇒ Object
30
31
32
|
# File 'app/models/kaui/payment.rb', line 30
def amount_to_money
Kaui::Base.to_money(amount, currency)
end
|
#is_fully_refunded? ⇒ Boolean
38
39
40
41
|
# File 'app/models/kaui/payment.rb', line 38
def is_fully_refunded?
paid_amount == 0
end
|
#paid_amount_to_money ⇒ Object
34
35
36
|
# File 'app/models/kaui/payment.rb', line 34
def paid_amount_to_money
Kaui::Base.to_money(paid_amount, currency)
end
|