diff --git a/Resources/config/app/config.yml b/Resources/config/app/config.yml index dde63ab..a672b4e 100644 --- a/Resources/config/app/config.yml +++ b/Resources/config/app/config.yml @@ -24,7 +24,25 @@ jms_serializer: directories: sylius-core: namespace_prefix: "Sylius\\Component\\Core" - path: "@SyliusAdminApiBundle/Resources/config/serializer" + path: "@SyliusAdminApiBundle/Resources/config/serializer/core" + sylius-addressing: + namespace_prefix: "Sylius\\Component\\Addressing" + path: "@SyliusAdminApiBundle/Resources/config/serializer/addressing" + sylius-currency: + namespace_prefix: "Sylius\\Component\\Currency" + path: "@SyliusAdminApiBundle/Resources/config/serializer/currency" + sylius-locale: + namespace_prefix: "Sylius\\Component\\Locale" + path: "@SyliusAdminApiBundle/Resources/config/serializer/locale" + sylius-product: + namespace_prefix: "Sylius\\Component\\Product" + path: "@SyliusAdminApiBundle/Resources/config/serializer/product" + sylius-shipping: + namespace_prefix: "Sylius\\Component\\Shipping" + path: "@SyliusAdminApiBundle/Resources/config/serializer/shipping" + sylius-taxation: + namespace_prefix: "Sylius\\Component\\Taxation" + path: "@SyliusAdminApiBundle/Resources/config/serializer/taxation" parameters: sylius.security.api_regex: "^/api/v1" diff --git a/Resources/config/serializer/addressing/Model.Address.yml b/Resources/config/serializer/addressing/Model.Address.yml new file mode 100644 index 0000000..b629b96 --- /dev/null +++ b/Resources/config/serializer/addressing/Model.Address.yml @@ -0,0 +1,44 @@ +Sylius\Component\Addressing\Model\Address: + exclusion_policy: ALL + xml_root_name: address + properties: + id: + expose: true + type: integer + xml_attribute: true + firstName: + expose: true + type: string + groups: [Default, Detailed] + lastName: + expose: true + type: string + groups: [Default, Detailed] + street: + expose: true + type: string + groups: [Default, Detailed] + city: + expose: true + type: string + groups: [Default, Detailed] + postcode: + expose: true + type: string + groups: [Default, Detailed] + phoneNumber: + expose: true + type: string + groups: [Default, Detailed] + countryCode: + expose: true + type: string + groups: [Default, Detailed] + provinceCode: + expose: true + type: string + groups: [Default, Detailed] + provinceName: + expose: true + type: string + groups: [Default, Detailed] diff --git a/Resources/config/serializer/addressing/Model.Country.yml b/Resources/config/serializer/addressing/Model.Country.yml new file mode 100644 index 0000000..eeb881a --- /dev/null +++ b/Resources/config/serializer/addressing/Model.Country.yml @@ -0,0 +1,27 @@ +Sylius\Component\Addressing\Model\Country: + exclusion_policy: ALL + xml_root_name: country + properties: + id: + expose: true + type: integer + xml_attribute: true + groups: [Default, Detailed] + code: + expose: true + type: string + groups: [Default, Detailed] + enabled: + expose: true + type: boolean + groups: [Detailed] + provinces: + expose: true + type: iterable + groups: [Detailed] + relations: + - rel: self + href: + route: sylius_admin_api_country_show + parameters: + code: expr(object.getCode()) diff --git a/Resources/config/serializer/addressing/Model.Province.yml b/Resources/config/serializer/addressing/Model.Province.yml new file mode 100644 index 0000000..720050d --- /dev/null +++ b/Resources/config/serializer/addressing/Model.Province.yml @@ -0,0 +1,45 @@ +Sylius\Component\Addressing\Model\Province: + exclusion_policy: ALL + xml_root_name: province + properties: + id: + expose: true + type: integer + xml_attribute: true + groups: [Default, Detailed] + code: + expose: true + type: string + groups: [Default, Detailed] + name: + expose: true + type: string + groups: [Default, Detailed] + abbreviation: + expose: true + type: string + groups: [Detailed] + createdAt: + expose: true + type: DateTime + groups: [Detailed] + updatedAt: + expose: true + type: DateTime + groups: [Detailed] + relations: + - rel: self + href: + route: sylius_admin_api_province_show + parameters: + countryCode: expr(object.getCountry().getCode()) + code: expr(object.getCode()) + exclusion: + groups: [Default, Detailed] + - rel: country + href: + route: sylius_admin_api_country_show + parameters: + code: expr(object.getCountry().getCode()) + exclusion: + groups: [Detailed] diff --git a/Resources/config/serializer/addressing/Model.Zone.yml b/Resources/config/serializer/addressing/Model.Zone.yml new file mode 100644 index 0000000..e27dd01 --- /dev/null +++ b/Resources/config/serializer/addressing/Model.Zone.yml @@ -0,0 +1,43 @@ +Sylius\Component\Addressing\Model\Zone: + exclusion_policy: ALL + xml_root_name: zone + properties: + id: + expose: true + type: integer + xml_attribute: true + groups: [Default, Detailed] + code: + expose: true + type: string + groups: [Default, Detailed] + name: + expose: true + type: string + groups: [Default, Detailed] + type: + expose: true + type: string + groups: [Default, Detailed] + scope: + expose: true + type: string + groups: [Detailed] + members: + expose: true + type: iterable + groups: [Detailed] + createdAt: + expose: true + type: DateTime + groups: [Detailed] + updatedAt: + expose: true + type: DateTime + groups: [Detailed] + relations: + - rel: self + href: + route: sylius_admin_api_zone_show + parameters: + code: expr(object.getCode()) diff --git a/Resources/config/serializer/Model.AdminUser.yml b/Resources/config/serializer/core/Model.AdminUser.yml similarity index 100% rename from Resources/config/serializer/Model.AdminUser.yml rename to Resources/config/serializer/core/Model.AdminUser.yml diff --git a/Resources/config/serializer/Model.Channel.yml b/Resources/config/serializer/core/Model.Channel.yml similarity index 100% rename from Resources/config/serializer/Model.Channel.yml rename to Resources/config/serializer/core/Model.Channel.yml diff --git a/Resources/config/serializer/Model.ChannelPricing.yml b/Resources/config/serializer/core/Model.ChannelPricing.yml similarity index 100% rename from Resources/config/serializer/Model.ChannelPricing.yml rename to Resources/config/serializer/core/Model.ChannelPricing.yml diff --git a/Resources/config/serializer/Model.Customer.yml b/Resources/config/serializer/core/Model.Customer.yml similarity index 100% rename from Resources/config/serializer/Model.Customer.yml rename to Resources/config/serializer/core/Model.Customer.yml diff --git a/Resources/config/serializer/Model.Image.yml b/Resources/config/serializer/core/Model.Image.yml similarity index 100% rename from Resources/config/serializer/Model.Image.yml rename to Resources/config/serializer/core/Model.Image.yml diff --git a/Resources/config/serializer/Model.Order.yml b/Resources/config/serializer/core/Model.Order.yml similarity index 100% rename from Resources/config/serializer/Model.Order.yml rename to Resources/config/serializer/core/Model.Order.yml diff --git a/Resources/config/serializer/Model.OrderItem.yml b/Resources/config/serializer/core/Model.OrderItem.yml similarity index 100% rename from Resources/config/serializer/Model.OrderItem.yml rename to Resources/config/serializer/core/Model.OrderItem.yml diff --git a/Resources/config/serializer/Model.OrderItemUnit.yml b/Resources/config/serializer/core/Model.OrderItemUnit.yml similarity index 100% rename from Resources/config/serializer/Model.OrderItemUnit.yml rename to Resources/config/serializer/core/Model.OrderItemUnit.yml diff --git a/Resources/config/serializer/Model.Payment.yml b/Resources/config/serializer/core/Model.Payment.yml similarity index 100% rename from Resources/config/serializer/Model.Payment.yml rename to Resources/config/serializer/core/Model.Payment.yml diff --git a/Resources/config/serializer/Model.PaymentMethod.yml b/Resources/config/serializer/core/Model.PaymentMethod.yml similarity index 100% rename from Resources/config/serializer/Model.PaymentMethod.yml rename to Resources/config/serializer/core/Model.PaymentMethod.yml diff --git a/Resources/config/serializer/Model.Product.yml b/Resources/config/serializer/core/Model.Product.yml similarity index 100% rename from Resources/config/serializer/Model.Product.yml rename to Resources/config/serializer/core/Model.Product.yml diff --git a/Resources/config/serializer/Model.ProductImage.yml b/Resources/config/serializer/core/Model.ProductImage.yml similarity index 100% rename from Resources/config/serializer/Model.ProductImage.yml rename to Resources/config/serializer/core/Model.ProductImage.yml diff --git a/Resources/config/serializer/Model.ProductTaxon.yml b/Resources/config/serializer/core/Model.ProductTaxon.yml similarity index 100% rename from Resources/config/serializer/Model.ProductTaxon.yml rename to Resources/config/serializer/core/Model.ProductTaxon.yml diff --git a/Resources/config/serializer/Model.ProductVariant.yml b/Resources/config/serializer/core/Model.ProductVariant.yml similarity index 100% rename from Resources/config/serializer/Model.ProductVariant.yml rename to Resources/config/serializer/core/Model.ProductVariant.yml diff --git a/Resources/config/serializer/Model.Promotion.yml b/Resources/config/serializer/core/Model.Promotion.yml similarity index 100% rename from Resources/config/serializer/Model.Promotion.yml rename to Resources/config/serializer/core/Model.Promotion.yml diff --git a/Resources/config/serializer/Model.PromotionCoupon.yml b/Resources/config/serializer/core/Model.PromotionCoupon.yml similarity index 100% rename from Resources/config/serializer/Model.PromotionCoupon.yml rename to Resources/config/serializer/core/Model.PromotionCoupon.yml diff --git a/Resources/config/serializer/Model.Property.yml b/Resources/config/serializer/core/Model.Property.yml similarity index 100% rename from Resources/config/serializer/Model.Property.yml rename to Resources/config/serializer/core/Model.Property.yml diff --git a/Resources/config/serializer/Model.Shipment.yml b/Resources/config/serializer/core/Model.Shipment.yml similarity index 100% rename from Resources/config/serializer/Model.Shipment.yml rename to Resources/config/serializer/core/Model.Shipment.yml diff --git a/Resources/config/serializer/Model.ShippingMethod.yml b/Resources/config/serializer/core/Model.ShippingMethod.yml similarity index 100% rename from Resources/config/serializer/Model.ShippingMethod.yml rename to Resources/config/serializer/core/Model.ShippingMethod.yml diff --git a/Resources/config/serializer/Model.ShopUser.yml b/Resources/config/serializer/core/Model.ShopUser.yml similarity index 100% rename from Resources/config/serializer/Model.ShopUser.yml rename to Resources/config/serializer/core/Model.ShopUser.yml diff --git a/Resources/config/serializer/Model.TaxRate.yml b/Resources/config/serializer/core/Model.TaxRate.yml similarity index 100% rename from Resources/config/serializer/Model.TaxRate.yml rename to Resources/config/serializer/core/Model.TaxRate.yml diff --git a/Resources/config/serializer/Model.Taxon.yml b/Resources/config/serializer/core/Model.Taxon.yml similarity index 100% rename from Resources/config/serializer/Model.Taxon.yml rename to Resources/config/serializer/core/Model.Taxon.yml diff --git a/Resources/config/serializer/currency/Model.Currency.yml b/Resources/config/serializer/currency/Model.Currency.yml new file mode 100644 index 0000000..6bb02da --- /dev/null +++ b/Resources/config/serializer/currency/Model.Currency.yml @@ -0,0 +1,27 @@ +Sylius\Component\Currency\Model\Currency: + exclusion_policy: ALL + xml_root_name: currency + properties: + id: + expose: true + type: integer + xml_attribute: true + groups: [Default, Detailed] + code: + expose: true + type: string + groups: [Default, Detailed] + exchangeRate: + expose: true + type: float + groups: [Default, Detailed] + enabled: + expose: true + type: boolean + groups: [Default, Detailed] + relations: + - rel: self + href: + route: sylius_admin_api_currency_show + parameters: + code: expr(object.getCode()) diff --git a/Resources/config/serializer/currency/Model.ExchangeRate.yml b/Resources/config/serializer/currency/Model.ExchangeRate.yml new file mode 100644 index 0000000..14b2f30 --- /dev/null +++ b/Resources/config/serializer/currency/Model.ExchangeRate.yml @@ -0,0 +1,30 @@ +Sylius\Component\Currency\Model\ExchangeRate: + exclusion_policy: ALL + xml_root_name: exchange_rate + properties: + id: + expose: true + type: integer + xml_attribute: true + ratio: + expose: true + type: float + groups: [Default, Detailed] + sourceCurrency: + expose: true + groups: [Default, Detailed] + targetCurrency: + expose: true + groups: [Default, Detailed] + updatedAt: + expose: true + groups: [Default, Detailed] + relations: + - rel: self + href: + route: sylius_admin_api_exchange_rate_show + parameters: + sourceCurrencyCode: expr(object.getSourceCurrency().getCode()) + targetCurrencyCode: expr(object.getTargetCurrency().getCode()) + exclusion: + groups: [Default, Detailed] diff --git a/Resources/config/serializer/locale/Model.Locale.yml b/Resources/config/serializer/locale/Model.Locale.yml new file mode 100644 index 0000000..20ba13c --- /dev/null +++ b/Resources/config/serializer/locale/Model.Locale.yml @@ -0,0 +1,27 @@ +Sylius\Component\Locale\Model\Locale: + exclusion_policy: ALL + xml_root_name: locale + properties: + id: + expose: true + type: integer + xml_attribute: true + groups: [Default, Detailed] + code: + expose: true + type: string + groups: [Default, Detailed] + createdAt: + expose: true + type: DateTime + groups: [Detailed] + updatedAt: + expose: true + type: DateTime + groups: [Detailed] + relations: + - rel: self + href: + route: sylius_admin_api_locale_show + parameters: + code: expr(object.getCode()) diff --git a/Resources/config/serializer/product/Model.Product.yml b/Resources/config/serializer/product/Model.Product.yml new file mode 100644 index 0000000..da7db1b --- /dev/null +++ b/Resources/config/serializer/product/Model.Product.yml @@ -0,0 +1,33 @@ +Sylius\Component\Product\Model\Product: + exclusion_policy: ALL + xml_root_name: product + properties: + id: + expose: true + type: integer + xml_attribute: true + groups: [Default, Detailed, Autocomplete] + code: + expose: true + type: string + groups: [Default, Detailed, Autocomplete] + options: + expose: true + type: iterable + groups: [Default, Detailed] + attributes: + expose: true + type: iterable + groups: [Detailed] + associations: + expose: true + type: iterable + groups: [Detailed] + translations: + expose: true + type: iterable + groups: [Detailed] + virtual_properties: + getName: + serialized_name: name + groups: [Default, Detailed, Autocomplete] diff --git a/Resources/config/serializer/product/Model.ProductAssociation.yml b/Resources/config/serializer/product/Model.ProductAssociation.yml new file mode 100644 index 0000000..c85a6aa --- /dev/null +++ b/Resources/config/serializer/product/Model.ProductAssociation.yml @@ -0,0 +1,19 @@ +Sylius\Component\Product\Model\ProductAssociation: + exclusion_policy: ALL + xml_root_name: product-association + properties: + id: + expose: true + type: integer + xml_attribute: true + groups: [Default, Detailed] + type: + expose: true + groups: [Default, Detailed] + product: + expose: true + groups: [Default, Detailed] + associatedProducts: + expose: true + type: iterable + groups: [Default, Detailed] diff --git a/Resources/config/serializer/product/Model.ProductAssociationType.yml b/Resources/config/serializer/product/Model.ProductAssociationType.yml new file mode 100644 index 0000000..2aab9ba --- /dev/null +++ b/Resources/config/serializer/product/Model.ProductAssociationType.yml @@ -0,0 +1,31 @@ +Sylius\Component\Product\Model\ProductAssociationType: + exclusion_policy: ALL + xml_root_name: product-association-type + properties: + id: + expose: true + type: integer + xml_attribute: true + groups: [Default, Detailed] + code: + expose: true + type: string + groups: [Default, Detailed] + translations: + expose: true + type: iterable + groups: [Default, Detailed] + createdAt: + expose: true + type: DateTime + groups: [Detailed] + updatedAt: + expose: true + type: DateTime + groups: [Detailed] + relations: + - rel: self + href: + route: sylius_admin_api_product_association_type_show + parameters: + code: expr(object.getCode()) diff --git a/Resources/config/serializer/product/Model.ProductAttribute.yml b/Resources/config/serializer/product/Model.ProductAttribute.yml new file mode 100644 index 0000000..3bbec40 --- /dev/null +++ b/Resources/config/serializer/product/Model.ProductAttribute.yml @@ -0,0 +1,15 @@ +Sylius\Component\Product\Model\ProductAttribute: + exclusion_policy: ALL + xml_root_name: product-attribute + properties: + id: + expose: true + type: integer + xml_attribute: true + groups: [Default, Detailed] + relations: + - rel: self + href: + route: sylius_admin_api_product_attribute_show + parameters: + code: expr(object.getCode()) diff --git a/Resources/config/serializer/product/Model.ProductOption.yml b/Resources/config/serializer/product/Model.ProductOption.yml new file mode 100644 index 0000000..a22dfcb --- /dev/null +++ b/Resources/config/serializer/product/Model.ProductOption.yml @@ -0,0 +1,31 @@ +Sylius\Component\Product\Model\ProductOption: + exclusion_policy: ALL + xml_root_name: product-option + properties: + id: + expose: true + type: integer + xml_attribute: true + groups: [Default, Detailed] + code: + expose: true + type: string + groups: [Default, Detailed] + position: + expose: true + type: integer + groups: [Default, Detailed] + values: + expose: true + type: iterable + groups: [Default, Detailed] + translations: + expose: true + type: iterable + groups: [Default, Detailed] + relations: + - rel: self + href: + route: sylius_admin_api_product_option_show + parameters: + code: expr(object.getCode()) diff --git a/Resources/config/serializer/product/Model.ProductOptionValue.yml b/Resources/config/serializer/product/Model.ProductOptionValue.yml new file mode 100644 index 0000000..4fc4d1f --- /dev/null +++ b/Resources/config/serializer/product/Model.ProductOptionValue.yml @@ -0,0 +1,12 @@ +Sylius\Component\Product\Model\ProductOptionValue: + exclusion_policy: ALL + xml_root_name: option-value + properties: + code: + expose: true + type: string + groups: [Default, Detailed, DetailedCart] + translations: + expose: true + type: iterable + groups: [Default, Detailed, DetailedCart] diff --git a/Resources/config/serializer/product/Model.ProductOptionValueTranslation.yml b/Resources/config/serializer/product/Model.ProductOptionValueTranslation.yml new file mode 100644 index 0000000..7ffcfd0 --- /dev/null +++ b/Resources/config/serializer/product/Model.ProductOptionValueTranslation.yml @@ -0,0 +1,15 @@ +Sylius\Component\Product\Model\ProductOptionValueTranslation: + exclusion_policy: ALL + xml_root_name: option-value + properties: + id: + expose: true + groups: [Default, Detailed, DetailedCart] + locale: + expose: true + type: string + groups: [Default, Detailed, DetailedCart] + value: + expose: true + type: string + groups: [Default, Detailed, DetailedCart] diff --git a/Resources/config/serializer/product/Model.ProductVariant.yml b/Resources/config/serializer/product/Model.ProductVariant.yml new file mode 100644 index 0000000..48c97af --- /dev/null +++ b/Resources/config/serializer/product/Model.ProductVariant.yml @@ -0,0 +1,29 @@ +Sylius\Component\Product\Model\ProductVariant: + exclusion_policy: ALL + xml_root_name: variant + properties: + id: + expose: true + type: integer + xml_attribute: true + groups: [Default, Detailed, DetailedCart, Autocomplete] + code: + expose: true + type: string + groups: [Default, Detailed, DetailedCart, Autocomplete] + position: + expose: true + type: integer + groups: [Default, Detailed, DetailedCart] + optionValues: + expose: true + type: iterable + groups: [Default, Detailed, DetailedCart] + translations: + expose: true + type: iterable + groups: [Default, Detailed, DetailedCart] + virtual_properties: + getDescriptor: + serialized_name: descriptor + groups: [Autocomplete] diff --git a/Resources/config/serializer/product/Model.ProductVariantTranslation.yml b/Resources/config/serializer/product/Model.ProductVariantTranslation.yml new file mode 100644 index 0000000..7c41405 --- /dev/null +++ b/Resources/config/serializer/product/Model.ProductVariantTranslation.yml @@ -0,0 +1,15 @@ +Sylius\Component\Product\Model\ProductVariantTranslation: + exclusion_policy: ALL + xml_root_name: variant + properties: + id: + expose: true + groups: [Default, Detailed, DetailedCart] + locale: + expose: true + type: string + groups: [Default, Detailed, DetailedCart] + name: + expose: true + type: string + groups: [Default, Detailed, DetailedCart] diff --git a/Resources/config/serializer/shipping/Model.Shipment.yml b/Resources/config/serializer/shipping/Model.Shipment.yml new file mode 100644 index 0000000..72468de --- /dev/null +++ b/Resources/config/serializer/shipping/Model.Shipment.yml @@ -0,0 +1,19 @@ +Sylius\Component\Shipping\Model\Shipment: + exclusion_policy: ALL + xml_root_name: shipment + properties: + id: + expose: true + type: integer + xml_attribute: true + groups: [Default, Detailed] + state: + expose: true + type: string + groups: [Default, Detailed] + method: + expose: true + groups: [Default, Detailed] + tracking: + expose: true + groups: [Default, Detailed] diff --git a/Resources/config/serializer/shipping/Model.ShipmentUnit.yml b/Resources/config/serializer/shipping/Model.ShipmentUnit.yml new file mode 100644 index 0000000..610a2ee --- /dev/null +++ b/Resources/config/serializer/shipping/Model.ShipmentUnit.yml @@ -0,0 +1,29 @@ +Sylius\Component\Shipping\Model\ShipmentUnit: + exclusion_policy: ALL + xml_root_name: shipment-unit + properties: + id: + expose: true + type: integer + xml_attribute: true + shippingState: + expose: true + type: string + createdAt: + expose: true + type: DateTime + updatedAt: + expose: true + type: DateTime + relations: + - rel: self + href: + route: sylius_admin_api_shipment_unit_show + parameters: + shipmentId: expr(object.getShipment().getId()) + id: expr(object.getId()) + - rel: shipment + href: + route: sylius_admin_api_shipment_show + parameters: + id: expr(object.getShipment().getId()) diff --git a/Resources/config/serializer/shipping/Model.ShippingCategory.yml b/Resources/config/serializer/shipping/Model.ShippingCategory.yml new file mode 100644 index 0000000..ea3f1a1 --- /dev/null +++ b/Resources/config/serializer/shipping/Model.ShippingCategory.yml @@ -0,0 +1,35 @@ +Sylius\Component\Shipping\Model\ShippingCategory: + exclusion_policy: ALL + xml_root_name: shipping-category + properties: + id: + expose: true + type: integer + xml_attribute: true + groups: [Default, Detailed] + name: + expose: true + type: string + groups: [Default, Detailed] + code: + expose: true + type: string + groups: [Default, Detailed] + description: + expose: true + type: string + groups: [Detailed] + createdAt: + expose: true + type: DateTime + groups: [Detailed] + updatedAt: + expose: true + type: DateTime + groups: [Detailed] + relations: + - rel: self + href: + route: sylius_admin_api_shipping_category_show + parameters: + code: expr(object.getCode()) diff --git a/Resources/config/serializer/shipping/Model.ShippingMethod.yml b/Resources/config/serializer/shipping/Model.ShippingMethod.yml new file mode 100644 index 0000000..8ebd142 --- /dev/null +++ b/Resources/config/serializer/shipping/Model.ShippingMethod.yml @@ -0,0 +1,20 @@ +Sylius\Component\Shipping\Model\ShippingMethod: + exclusion_policy: ALL + xml_root_name: shipping-method + properties: + id: + expose: true + type: integer + xml_attribute: true + name: + expose: true + type: string + groups: [Default, Detailed] + enabled: + expose: true + type: boolean + groups: [Default, Detailed] + code: + expose: true + type: string + groups: [Default, Detailed] diff --git a/Resources/config/serializer/taxation/Model.TaxCategory.yml b/Resources/config/serializer/taxation/Model.TaxCategory.yml new file mode 100644 index 0000000..df2721c --- /dev/null +++ b/Resources/config/serializer/taxation/Model.TaxCategory.yml @@ -0,0 +1,35 @@ +Sylius\Component\Taxation\Model\TaxCategory: + exclusion_policy: ALL + xml_root_name: tax-category + properties: + id: + expose: true + type: integer + xml_attribute: true + groups: [Default, Detailed] + name: + expose: true + type: string + groups: [Default, Detailed] + code: + expose: true + type: string + groups: [Default, Detailed] + description: + expose: true + type: string + groups: [Detailed] + createdAt: + expose: true + type: DateTime + groups: [Detailed] + updatedAt: + expose: true + type: DateTime + groups: [Detailed] + relations: + - rel: self + href: + route: sylius_admin_api_tax_category_show + parameters: + code: expr(object.getCode()) diff --git a/Resources/config/serializer/taxation/Model.TaxRate.yml b/Resources/config/serializer/taxation/Model.TaxRate.yml new file mode 100644 index 0000000..dbb9ab0 --- /dev/null +++ b/Resources/config/serializer/taxation/Model.TaxRate.yml @@ -0,0 +1,30 @@ +Sylius\Component\Taxation\Model\TaxRate: + exclusion_policy: ALL + xml_root_name: tax-rate + properties: + id: + expose: true + type: integer + xml_attribute: true + code: + expose: true + type: string + name: + expose: true + type: string + amount: + expose: true + type: float + includedInPrice: + expose: true + type: boolean + xml_attribute: true + calculator: + expose: true + type: string + createdAt: + expose: true + type: DateTime + updatedAt: + expose: true + type: DateTime