mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-22 00:57:26 +00:00
16 lines
353 B
Ruby
16 lines
353 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Api
|
|
module V1
|
|
class CustomerSerializer < BaseSerializer
|
|
attributes :id, :enterprise_id, :first_name, :last_name, :code, :email
|
|
|
|
belongs_to :enterprise, links: {
|
|
related: ->(object) {
|
|
url_helpers.api_v1_enterprise_url(id: object.enterprise_id)
|
|
}
|
|
}
|
|
end
|
|
end
|
|
end
|