End of evening commit, changing supplier to JSONAPI
This commit is contained in:
@@ -1,12 +1,9 @@
|
||||
class Suppliers::SupplierSerializer < Qwaiter::Serializer
|
||||
self.root = :supplier
|
||||
attributes :extended_version, :open, :name, :email, :lat, :lng, :time_zone, :address, :house_number, :house_number_addition, :postal_code, :city, :country,
|
||||
class Suppliers::SupplierSerializer
|
||||
include Qwaiter::SupplierBaseSerializer
|
||||
attributes :open, :name, :email, :lat, :lng, :time_zone, :address, :house_number, :house_number_addition, :postal_code, :city, :country,
|
||||
:facebook_promotion_url, :iens_profile, :week_starts_on_monday, :orders_in_process_count, :orders_placed_count
|
||||
|
||||
def extended_version
|
||||
true
|
||||
end
|
||||
has_many :sections, serializer: Suppliers::ExtendedSectionSerializer
|
||||
has_many :product_categories
|
||||
has_many :sections, serializer: Suppliers::SectionSerializer
|
||||
has_many :product_categories, serializer: Suppliers::ProductCategorySerializer
|
||||
has_many :employees, serializer: Suppliers::EmployeeSerializer
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user