Models

Danger

We’re sorry but this documentation section is outdated. Please have that in mind when trying to use it. You can help us making documentation up to date via Sylius Github. Thank you!

Shipment

Shipment object has methods to represent the events that take place during the process of shipment. Shipment has the following properties:

Property Description
id Unique id of the shipment
state Reference to constant from ShipmentInterface
method Reference to ShippingMethod
items Reference to Collection of shipping items
tracking Tracking code for shipment
createdAt Creation time
updatedAt Last update time

Note

This model implements the ShipmentInterface.

For more detailed information go to Sylius API Shipment.

ShipmentItem

ShipmentItem object is used for connecting a shippable object with a proper shipment. ShipmentItems have the following properties:

Property Description
id Unique id of the ShipmentItem
shipment Reference to Shipment
shippable Reference to shippable object
shippingState Reference to constant from ShipmentInterface
createdAt Creation time
updatedAt Last update time

Note

This model implements the ShipmentItemInterface.

For more detailed information go to Sylius API ShipmentItem.

ShippingCategory

ShippingCategory object represents category which can be common for ShippingMethod and object which implements ShippableInterface. ShippingCategory has the following properties:

Property Description
id Unique id of the ShippingCategory
code Unique code of the ShippingCategory
name e.g. “Regular”
description e.g. “Regular weight items”
createdAt Creation time
updatedAt Last update time

Hint

To understand relationship between ShippingMethod and shippable object base on ShippingCategory go to Shipping method requirements.

Note

This model implements the ShippingCategoryInterface.

For more detailed information go to Sylius API ShippingCategory.

ShippingMethod

ShippingMethod object represents method of shipping allowed for given shipment. It has the following properties:

Property Description
id Unique id of the ShippingMethod
code Unique code of the ShippingMethod
category e.g. “Regular”
categoryRequirement Reference to constant from ShippingMethodInterface
enabled Boolean flag of enablement
calculator Reference to constant from DefaultCalculators
configuration Extra configuration for calculator
rules Collection of Rules
createdAt Creation time
updatedAt Last update time
currentTranslation Translation chosen from translations list accordingly to current locale
currentLocale Currently set locale
translations Collection of translations
fallbackLocale Locale used in case no translation is available

Note

This model implements the ShippingMethodInterface and uses the TranslatableTrait.

For more detailed information go to Sylius API ShippingMethod.

ShippingMethodTranslation

ShippingMethodTranslation object allows to translate the shipping method’s name accordingly to the provided locales. It has the following properties:

Property Description
id Unique id of the ShippingMethodTranslation
name e.g. “FedEx”
locale Translation locale
translatable The translatable model assigned to this translation

Note

This model implements the ShippingMethodTranslationInterface and extends AbstractTranslation class.

Form more information go to Sylius API ShippingMethodTranslation.