Sha256: 1432eb9fe8937f2afd60d63057e0118ec416f929873fa83534e2120890aa263f
Contents?: true
Size: 740 Bytes
Versions: 12
Compression:
Stored size: 740 Bytes
Contents
module Spree module V2 module Storefront class CountrySerializer < BaseSerializer set_type :country attributes :iso, :iso3, :iso_name, :name, :states_required, :zipcode_required attribute :default do |object| object.default? end has_many :states, if: proc { |_record, params| params && params[:include_states] } has_many :checkout_zone_applicable_states, serializer: ::Spree::V2::Storefront::StateSerializer, if: proc { |_record, params| params && params[:current_store].present? } do |object, params| params[:current_store].states_available_for_checkout(object) end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems