SaleProductShipmentTrackingStatusHistoryService
in package
Table of Contents
Constants
- DELIVERY_STATUS_CODES = ['GEODIS' => ['LIV', 'COM'], 'GLS' => ['DELIVERED'], 'TRUSK' => ['DROPOFF_COMPLETED']]
Properties
- $entityManager : EntityManagerInterface
Methods
- __construct() : mixed
- getDeliveryDateForSaleProduct() : DateTime|null
- Get delivery date from tracking history for a SaleProduct Returns the carrier_recorded_at date if product has been delivered
- getRepo() : SaleProductShipmentTrackingStatusHistoryRepository
- getTrackingHistoryForSaleProduct() : array<string|int, mixed>
- 🔹 Récupère l'historique des statuts d’expédition pour un SaleProduct donné
- recordStatus() : SaleProductShipmentTrackingStatusHistory
- normalizeDateTime() : DateTime|null
- normalizeTrackingReference() : string|null
Constants
DELIVERY_STATUS_CODES
private
mixed
DELIVERY_STATUS_CODES
= ['GEODIS' => ['LIV', 'COM'], 'GLS' => ['DELIVERED'], 'TRUSK' => ['DROPOFF_COMPLETED']]
Properties
$entityManager
private
EntityManagerInterface
$entityManager
Methods
__construct()
public
__construct(EntityManagerInterface $entityManager) : mixed
Parameters
- $entityManager : EntityManagerInterface
getDeliveryDateForSaleProduct()
Get delivery date from tracking history for a SaleProduct Returns the carrier_recorded_at date if product has been delivered
public
getDeliveryDateForSaleProduct(SaleProduct $saleProduct) : DateTime|null
Parameters
- $saleProduct : SaleProduct
Return values
DateTime|nullgetRepo()
public
getRepo() : SaleProductShipmentTrackingStatusHistoryRepository
Return values
SaleProductShipmentTrackingStatusHistoryRepositorygetTrackingHistoryForSaleProduct()
🔹 Récupère l'historique des statuts d’expédition pour un SaleProduct donné
public
getTrackingHistoryForSaleProduct(SaleProduct $saleProduct) : array<string|int, mixed>
Parameters
- $saleProduct : SaleProduct
Return values
array<string|int, mixed>recordStatus()
public
recordStatus(SaleProductShipmentTracking $shipmentTracking, mixed $carrier, mixed $status[, DateTimeInterface|null $recordedAt = null ][, DateTimeInterface|null $carrierRecordedAt = null ][, string|null $trackingReference = null ][, mixed $flush = false ][, string|null $comment = null ]) : SaleProductShipmentTrackingStatusHistory
Parameters
- $shipmentTracking : SaleProductShipmentTracking
- $carrier : mixed
- $status : mixed
- $recordedAt : DateTimeInterface|null = null
- $carrierRecordedAt : DateTimeInterface|null = null
- $trackingReference : string|null = null
- $flush : mixed = false
- $comment : string|null = null
Return values
SaleProductShipmentTrackingStatusHistorynormalizeDateTime()
private
normalizeDateTime(DateTimeInterface|null $value) : DateTime|null
Parameters
- $value : DateTimeInterface|null
Return values
DateTime|nullnormalizeTrackingReference()
private
normalizeTrackingReference(string|null $trackingReference) : string|null
Parameters
- $trackingReference : string|null