Class: Spree::StoreCreditEvent
- Inherits:
-
Object
- Object
- Spree::StoreCreditEvent
- Extended by:
- DisplayMoney
- Defined in:
- app/models/spree/store_credit_event.rb
Instance Method Summary collapse
- #allocation? ⇒ Boolean
- #authorized? ⇒ Boolean
- #captured? ⇒ Boolean
- #credit? ⇒ Boolean
- #display_action ⇒ Object
- #voided? ⇒ Boolean
Methods included from DisplayMoney
Instance Method Details
#allocation? ⇒ Boolean
37 38 39 |
# File 'app/models/spree/store_credit_event.rb', line 37 def allocation? action == Spree::StoreCredit::ALLOCATION_ACTION end |
#authorized? ⇒ Boolean
53 54 55 |
# File 'app/models/spree/store_credit_event.rb', line 53 def action == Spree::StoreCredit::AUTHORIZE_ACTION end |
#captured? ⇒ Boolean
45 46 47 |
# File 'app/models/spree/store_credit_event.rb', line 45 def captured? action == Spree::StoreCredit::CAPTURE_ACTION end |
#credit? ⇒ Boolean
41 42 43 |
# File 'app/models/spree/store_credit_event.rb', line 41 def credit? action == Spree::StoreCredit::CREDIT_ACTION end |
#display_action ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'app/models/spree/store_credit_event.rb', line 22 def display_action case action when Spree::StoreCredit::CAPTURE_ACTION Spree.t('store_credit.captured') when Spree::StoreCredit::AUTHORIZE_ACTION Spree.t('store_credit.authorized') when Spree::StoreCredit::ALLOCATION_ACTION Spree.t('store_credit.allocated') when Spree::StoreCredit::ELIGIBLE_ACTION Spree.t('store_credit.eligible') when Spree::StoreCredit::VOID_ACTION, Spree::StoreCredit::CREDIT_ACTION Spree.t('store_credit.credit') end end |
#voided? ⇒ Boolean
49 50 51 |
# File 'app/models/spree/store_credit_event.rb', line 49 def voided? action == Spree::StoreCredit::VOID_ACTION end |