Sha256: b734848b98c0c9e7e08c5f3b6d2453770d6fee6594407692b8bcea36062fb1c8

Contents?: true

Size: 667 Bytes

Versions: 62

Compression:

Stored size: 667 Bytes

Contents

module Workarea
  module Pricing
    class Discount
      # Persists data for discounts related to <%= class_name.titleize %>
      class <%= class_name %> < Discount
        # TODO: Set the level at which price changes apply (e.g. 'shipping',
        # 'item', 'order', 'tax').
        # self.price_level = 'shipping'

        def self.model_name
          Discount.model_name
        end

        def apply(order)
          # TODO: Implement `#apply` to fulfill the contract for
          # `Workarea::Pricing::Discount`. This method defines what is to
          # be added to the order to reflect the user of this discount.
        end
      end
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.5.15 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.4.36 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.5.14 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.4.35 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.5.13 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.4.34 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.5.12 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.4.33 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.5.11 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.5.10 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.4.32 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.5.9 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.4.31 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.5.8 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.4.30 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.5.7 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.4.29 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.5.6 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.4.28 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.5.5 lib/generators/workarea/discount/templates/model.rb.erb