Sha256: ee513fa81c88db2f8b312ffc61a450dc83cbaf4a96eb0dfe0e0469415d5c9532
Contents?: true
Size: 666 Bytes
Versions: 52
Compression:
Stored size: 666 Bytes
Contents
module Spree module V2 module Storefront class EstimatedShippingRateSerializer < BaseSerializer set_type :shipping_rate attributes :name, :selected, :cost, :tax_amount, :shipping_method_id attribute :final_price, &:cost attributes :display_cost, :display_final_price do |object, params| Spree::Money.new(object.cost, currency: params[:currency]) end attribute :display_tax_amount do |object, params| Spree::Money.new(object.tax_amount, currency: params[:currency]) end attribute :free do |object| object.cost.zero? end end end end end
Version data entries
52 entries across 52 versions & 1 rubygems