End of evening commit, changing supplier to JSONAPI

This commit is contained in:
2015-09-08 23:22:13 +02:00
parent 3cb7fd2a6f
commit 9c1945252d
36 changed files with 195 additions and 230 deletions
@@ -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