Sha256: 8106ec1665ecb41f2b737b35f2796c94e52b0a18710f37f2ddefa29b3d525966

Contents?: true

Size: 380 Bytes

Versions: 50

Compression:

Stored size: 380 Bytes

Contents

module Dugway
  module Drops
    class CartItemDrop < BaseDrop 
      def price
        unit_price * quantity
      end

      def total
        price + shipping
      end

      def product
        ProductDrop.new(source['product'])
      end

      def option
        ProductOptionDrop.new(source['option'])
      end

      def shipping
        0.0
      end
    end
  end
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
dugway-0.6.4 lib/dugway/liquid/drops/cart_item_drop.rb
dugway-0.6.3 lib/dugway/liquid/drops/cart_item_drop.rb
dugway-0.6.2 lib/dugway/liquid/drops/cart_item_drop.rb
dugway-0.6.1 lib/dugway/liquid/drops/cart_item_drop.rb
dugway-0.6.0 lib/dugway/liquid/drops/cart_item_drop.rb
dugway-0.5.9 lib/dugway/liquid/drops/cart_item_drop.rb
dugway-0.5.8 lib/dugway/liquid/drops/cart_item_drop.rb
dugway-0.5.7 lib/dugway/liquid/drops/cart_item_drop.rb
dugway-0.5.6 lib/dugway/liquid/drops/cart_item_drop.rb
dugway-0.5.4 lib/dugway/liquid/drops/cart_item_drop.rb