Class: AdvancedBilling::CompoundingStrategy
- Inherits:
-
Object
- Object
- AdvancedBilling::CompoundingStrategy
- Defined in:
- lib/advanced_billing/models/compounding_strategy.rb
Overview
Applicable only to stackable coupons. For ‘compound`, Percentage-based discounts will be calculated against the remaining price, after prior discounts have been calculated. For `full-price`, Percentage-based discounts will always be calculated against the original item price, before other discounts are applied.
Constant Summary collapse
- COMPOUNDING_STRATEGY =
[ # TODO: Write general description for COMPOUND COMPOUND = 'compound'.freeze, # TODO: Write general description for FULLPRICE FULLPRICE = 'full-price'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.validate(value) ⇒ Object
21 22 23 24 25 |
# File 'lib/advanced_billing/models/compounding_strategy.rb', line 21 def self.validate(value) return false if value.nil? COMPOUNDING_STRATEGY.include?(value) end |