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
39 40 41 |
# File 'app/models/spree/store_credit_event.rb', line 39 def allocation? action == Spree::StoreCredit::ALLOCATION_ACTION end |
#authorized? ⇒ Boolean
55 56 57 |
# File 'app/models/spree/store_credit_event.rb', line 55 def action == Spree::StoreCredit::AUTHORIZE_ACTION end |
#captured? ⇒ Boolean
47 48 49 |
# File 'app/models/spree/store_credit_event.rb', line 47 def captured? action == Spree::StoreCredit::CAPTURE_ACTION end |
#credit? ⇒ Boolean
43 44 45 |
# File 'app/models/spree/store_credit_event.rb', line 43 def credit? action == Spree::StoreCredit::CREDIT_ACTION end |
#display_action ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'app/models/spree/store_credit_event.rb', line 24 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
51 52 53 |
# File 'app/models/spree/store_credit_event.rb', line 51 def voided? action == Spree::StoreCredit::VOID_ACTION end |