Skip to content

ShipmentType in Shipment model is missing - #57

Open
knaepel wants to merge 1 commit into
billbeeio:masterfrom
knaepel:master
Open

ShipmentType in Shipment model is missing#57
knaepel wants to merge 1 commit into
billbeeio:masterfrom
knaepel:master

Conversation

@knaepel

@knaepel knaepel commented Feb 22, 2022

Copy link
Copy Markdown

In this pull request, I added the ShipmentType field to the Shipment Model.

@knaepel

knaepel commented Feb 22, 2022

Copy link
Copy Markdown
Author

#56

@knaepel knaepel changed the title ShipmentType in Shipment model is missing #56 ShipmentType in Shipment model is missing Feb 22, 2022
Comment thread src/Model/Shipment.php
* @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;
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants