Copied!

ShipmentCreateStruct

ShipmentCreateStruct.php : 19
Extends ValueObject

The base class for all value objects and structs.

Supports read-only properties by marking them as protected. In this case they will only be writable using constructor, and need to be documented using @property-read <type> <$var> annotation in class doc in addition to inline property doc. Writable properties must be public and must be documented inline.

Methods

public__construct()

ShipmentCreateStruct.php : 34

Construct object optionally with a set of properties.

public __construct(ShippingMethodInterface $method, OrderInterface $order, Money $amount[, UserReference|null $owner = null ])

Readonly properties values must be set using $properties as they aren't writable anymore after object has been created.

Parameters

Name Type Default value Description
$method ShippingMethodInterface - -
$order OrderInterface - -
$amount Money - -
$owner UserReference|null null -

publicgetAmount()

ShipmentCreateStruct.php : 78
public getAmount() : Money

Return values

Money

publicgetContext()

ShipmentCreateStruct.php : 101
public getContext() : MapInterface<string, mixed>|null

Return values

MapInterface<string, mixed>|null

publicgetIdentifier()

ShipmentCreateStruct.php : 48
public getIdentifier() : string|null

Return values

string|null

publicgetMethod()

ShipmentCreateStruct.php : 58
public getMethod() : ShippingMethodInterface

Return values

ShippingMethodInterface

publicgetOrder()

ShipmentCreateStruct.php : 68
public getOrder() : OrderInterface

Return values

OrderInterface

publicgetOwner()

ShipmentCreateStruct.php : 88
public getOwner() : UserReference|null

Return values

UserReference|null

publicsetAmount()

ShipmentCreateStruct.php : 83
public setAmount(Money $amount) : void

Parameters

Name Type Default value Description
$amount Money - -

publicsetContext()

ShipmentCreateStruct.php : 109
public setContext(MapInterface<string, mixed>|null $context) : void

Parameters

Name Type Default value Description
$context MapInterface<string, mixed>|null - -

publicsetIdentifier()

ShipmentCreateStruct.php : 53
public setIdentifier(string|null $identifier) : void

Parameters

Name Type Default value Description
$identifier string|null - -

publicsetMethod()

ShipmentCreateStruct.php : 63
public setMethod(ShippingMethodInterface $method) : void

Parameters

Name Type Default value Description
$method ShippingMethodInterface - -

publicsetOrder()

ShipmentCreateStruct.php : 73
public setOrder(OrderInterface $order) : void

Parameters

Name Type Default value Description
$order OrderInterface - -

publicsetOwner()

ShipmentCreateStruct.php : 93
public setOwner([UserReference|null $owner = null ]) : void

Parameters

Name Type Default value Description
$owner UserReference|null null -

protectedgetProperties()

ValueObject.php : 54

Returns list of available properties' names.

protected getProperties([array<int, string> $dynamicProperties = [] ]) : array<int, string>

Override to add dynamic properties.

Parameters

Name Type Default value Description
$dynamicProperties array<int, string> []

Additional dynamic properties exposed on the object

Return values

array<int, string>

Tags
Serializerignore

()