Sha256: 600d3bdc31b077499497abd88668bb7507c24e424842cf142f92d53fa76f3481

Contents?: true

Size: 1.17 KB

Versions: 15

Compression:

Stored size: 1.17 KB

Contents

module Spree
  module V2
    module Storefront
      class CartSerializer < BaseSerializer
        set_type :cart

        attributes :number, :item_total, :total, :ship_total, :adjustment_total, :created_at,
                   :updated_at, :completed_at, :included_tax_total, :additional_tax_total, :display_additional_tax_total,
                   :display_included_tax_total, :tax_total, :currency, :state, :token, :email,
                   :display_item_total, :display_ship_total, :display_adjustment_total, :display_tax_total,
                   :promo_total, :display_promo_total, :item_count, :special_instructions, :display_total

        has_many   :line_items
        has_many   :variants
        has_many   :promotions, object_method_name: :valid_promotions, id_method_name: :valid_promotion_ids
        has_many   :payments do |cart|
          cart.payments.valid
        end
        has_many   :shipments

        belongs_to :user
        belongs_to :billing_address,
          id_method_name: :bill_address_id,
          serializer: :address

        belongs_to :shipping_address,
          id_method_name: :ship_address_id,
          serializer: :address
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
spree_api-4.0.5 app/serializers/spree/v2/storefront/cart_serializer.rb
spree_api-4.0.4 app/serializers/spree/v2/storefront/cart_serializer.rb
spree_api-4.1.5 app/serializers/spree/v2/storefront/cart_serializer.rb
spree_api-4.1.4 app/serializers/spree/v2/storefront/cart_serializer.rb
spree_api-4.1.3 app/serializers/spree/v2/storefront/cart_serializer.rb
spree_api-4.1.2 app/serializers/spree/v2/storefront/cart_serializer.rb
spree_api-4.1.1 app/serializers/spree/v2/storefront/cart_serializer.rb
spree_api-4.1.0 app/serializers/spree/v2/storefront/cart_serializer.rb
spree_api-4.1.0.rc3 app/serializers/spree/v2/storefront/cart_serializer.rb
spree_api-4.1.0.rc2 app/serializers/spree/v2/storefront/cart_serializer.rb
spree_api-4.1.0.rc1 app/serializers/spree/v2/storefront/cart_serializer.rb
spree_api-4.0.3 app/serializers/spree/v2/storefront/cart_serializer.rb
spree_api-4.0.2 app/serializers/spree/v2/storefront/cart_serializer.rb
spree_api-4.0.1 app/serializers/spree/v2/storefront/cart_serializer.rb
spree_api-4.0.0 app/serializers/spree/v2/storefront/cart_serializer.rb