Class: SolidusSubscriptions::Promotion::Rules::SubscriptionInstallmentOrder
- Inherits:
-
Spree::PromotionRule
- Object
- Spree::PromotionRule
- SolidusSubscriptions::Promotion::Rules::SubscriptionInstallmentOrder
- Defined in:
- app/models/solidus_subscriptions/promotion/rules/subscription_installment_order.rb
Instance Method Summary collapse
-
#applicable?(promotable) ⇒ Boolean
Promotion can be applied to an entire order.
-
#eligible?(order, _options = {}) ⇒ Boolean
An order is eligible if it fulfills a subscription Installment.
Instance Method Details
#applicable?(promotable) ⇒ Boolean
Promotion can be applied to an entire order. Will only be true for Spree::Order
14 15 16 |
# File 'app/models/solidus_subscriptions/promotion/rules/subscription_installment_order.rb', line 14 def applicable?(promotable) promotable.is_a? ::Spree::Order end |
#eligible?(order, _options = {}) ⇒ Boolean
An order is eligible if it fulfills a subscription Installment. Will only return true if the order fulfills one or more Installments
25 26 27 |
# File 'app/models/solidus_subscriptions/promotion/rules/subscription_installment_order.rb', line 25 def eligible?(order, = {}) order.subscription_order? end |