Class: Workarea::Payment::Tender::StoreCredit
- Inherits:
-
Workarea::Payment::Tender
- Object
- Workarea::Payment::Tender
- Workarea::Payment::Tender::StoreCredit
- Defined in:
- app/models/workarea/payment/tender/store_credit.rb
Instance Method Summary collapse
Methods inherited from Workarea::Payment::Tender
#authorized_amount, #build_transaction, #capturable?, #capturable_amount, #captured_amount, #has_amount?, #name, #refundable?, #refundable_amount, #refunded_amount, #uncaptured_amount
Methods included from GuardNegativePrice
Methods included from ApplicationDocument
Methods included from Sidekiq::Callbacks
add_worker, assert_valid_config!, async, caching_classes?, disable, enable, inline, #run_callbacks, workers, workers_list
Methods included from Mongoid::Document
Instance Method Details
#amount=(amount) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'app/models/workarea/payment/tender/store_credit.rb', line 9 def amount=(amount) if amount.blank? || profile.blank? super elsif balance >= amount super(amount) else super(balance) end end |
#slug ⇒ Object
5 6 7 |
# File 'app/models/workarea/payment/tender/store_credit.rb', line 5 def slug :store_credit end |