Sha256: bae4dc8c3b964dad0303615ccbb213e804a68d88212bfbcb8b4117b0afe513b8
Contents?: true
Size: 762 Bytes
Versions: 19
Compression:
Stored size: 762 Bytes
Contents
module Spree module V2 module Storefront class UserSerializer < BaseSerializer set_type :user attributes :email attribute :store_credits do |user| user.total_available_store_credit end attribute :completed_orders do |object| object.orders.complete.count end has_one :default_billing_address, id_method_name: :bill_address_id, object_method_name: :bill_address, record_type: :address, serializer: :address has_one :default_shipping_address, id_method_name: :ship_address_id, object_method_name: :ship_address, record_type: :address, serializer: :address end end end end
Version data entries
19 entries across 19 versions & 1 rubygems