Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/Model/Shipment.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ class Shipment
*/
public $shippingProductId = 0;

/**
* 0 if Shipment, 1 if Retoure
* @var int
* @DataField(name="ShipmentType", type="int")
*/
public $shipmentType = 0;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using magic numbers it's better to use constants. Please create a src/Type/ShipmentType.php and add the constants SHIPMENT=0 and RETOURE=1. Use ShipmentType::SHIPMENT in this class.
(Similar to the definition of ProductCondition and its usage:

public $condition = ProductCondition::BRAND_NEW;
)


/**
* Creates a shipment based on models
*
Expand Down