mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
13 lines
388 B
Ruby
13 lines
388 B
Ruby
class Api::Admin::BasicEnterpriseSerializer < ActiveModel::Serializer
|
|
attributes :name, :id, :is_primary_producer, :is_distributor, :sells, :category,
|
|
:payment_method_ids, :shipping_method_ids, :producer_profile_only, :permalink
|
|
|
|
def payment_method_ids
|
|
object.payment_methods.map(&:id)
|
|
end
|
|
|
|
def shipping_method_ids
|
|
object.shipping_methods.map(&:id)
|
|
end
|
|
end
|