Sha256: 71d3ed30b29de9816ebaada2808c24fac2e6db749f9bef3b4fd1e85b4f6aabbd
Contents?: true
Size: 542 Bytes
Versions: 4
Compression:
Stored size: 542 Bytes
Contents
# frozen_string_literal: true module SolidusVolumePricing class PricingOptions < ::Spree::Variant::PricingOptions attr_accessor :quantity, :user def initialize(options = {}) super options.except(:quantity, :user) @quantity = options.delete(:quantity) @user = options.delete(:user) end def self.from_line_item(line_item) pricing_options = super(line_item) pricing_options.quantity = line_item.quantity pricing_options.user = line_item.order.user pricing_options end end end
Version data entries
4 entries across 4 versions & 1 rubygems