lib/centaman/object/effect.rb in centaman-4.0.5 vs lib/centaman/object/effect.rb in centaman-5.0.0
- old
+ new
@@ -1,7 +1,19 @@
module Centaman
class Object::Effect < Centaman::Object
# rubocop:disable Metrics/MethodLength
+ def dollar_discount
+ effect_type == 'DiscountAmount'
+ end
+
+ def percent_discount
+ effect_type == 'DiscountPercent'
+ end
+
+ def override_discount
+ effect_type == 'PriceOverride'
+ end
+
def attributes
[
Centaman::Attribute.new(
centaman_key: 'Valid',
app_key: :valid,