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.27 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.5.26 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.4.45 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.5.25 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.5.23 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.4.44 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.5.22 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.4.43 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.5.21 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.4.42 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.5.20 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.4.41 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.5.19 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.4.40 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.5.18 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.4.39 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.5.17 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.4.38 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.5.16 lib/generators/workarea/discount/templates/model.rb.erb
workarea-core-3.4.37 lib/generators/workarea/discount/templates/model.rb.erb