ChronopostService
in package
Table of Contents
Properties
- $eventDispatcher : EventDispatcherInterface
- $logService : LogServiceInterface
- $saleLogService : SaleLogService
- $saleProductService : SaleProductService
- $saleService : SaleService
- $shipmentTrackingSynchronizer : ShipmentTrackingSynchronizer
- $userService : UserService
Methods
- __construct() : mixed
- Chronopost Service constructor.
- createSaleProductShipment() : true
- dispatchSaleProductsAfterTicketPrintedEvent() : void
- dispatchSaleProductsShippedEvent() : void
- extractTrackingIds() : array<int, string>
- finalizeSale() : void
- logShipment() : void
- normalizeToArray() : array<string|int, mixed>
- processShipment() : void
- updateSaleProductStatus() : void
Properties
$eventDispatcher
private
EventDispatcherInterface
$eventDispatcher
$logService
private
LogServiceInterface
$logService
$saleLogService
private
SaleLogService
$saleLogService
$saleProductService
private
SaleProductService
$saleProductService
$saleService
private
SaleService
$saleService
$shipmentTrackingSynchronizer
private
ShipmentTrackingSynchronizer
$shipmentTrackingSynchronizer
$userService
private
UserService
$userService
Methods
__construct()
Chronopost Service constructor.
public
__construct(ContainerInterface $container, LogServiceInterface $logService, EventDispatcherInterface $eventDispatcher) : mixed
Parameters
- $container : ContainerInterface
- $logService : LogServiceInterface
- $eventDispatcher : EventDispatcherInterface
createSaleProductShipment()
public
createSaleProductShipment(array<string|int, int> $saleProductIds[, int|string|null $userId = null ][, bool $logChanges = false ][, bool $notify = true ]) : true
Parameters
- $saleProductIds : array<string|int, int>
- $userId : int|string|null = null
- $logChanges : bool = false
- $notify : bool = true
Tags
Return values
truedispatchSaleProductsAfterTicketPrintedEvent()
private
dispatchSaleProductsAfterTicketPrintedEvent(SaleProductShipment $saleProductShipment) : void
Parameters
- $saleProductShipment : SaleProductShipment
dispatchSaleProductsShippedEvent()
private
dispatchSaleProductsShippedEvent(array<string|int, mixed> $saleProductIds) : void
Parameters
- $saleProductIds : array<string|int, mixed>
extractTrackingIds()
private
extractTrackingIds(mixed $trackingId) : array<int, string>
Parameters
- $trackingId : mixed
Return values
array<int, string>finalizeSale()
private
finalizeSale(Sale $sale, DateTime $now, bool $logChanges, mixed $user) : void
Parameters
- $sale : Sale
- $now : DateTime
- $logChanges : bool
- $user : mixed
Tags
logShipment()
private
logShipment(Sale $sale, bool $shipmentId, SaleProduct $sp, mixed $user) : void
Parameters
- $sale : Sale
- $shipmentId : bool
- $sp : SaleProduct
- $user : mixed
Tags
normalizeToArray()
private
normalizeToArray(mixed $value) : array<string|int, mixed>
Parameters
- $value : mixed
Return values
array<string|int, mixed>processShipment()
private
processShipment(SaleProduct $sp, Sale $sale, mixed $user, bool $notify) : void
Parameters
- $sp : SaleProduct
- $sale : Sale
- $user : mixed
- $notify : bool
Tags
updateSaleProductStatus()
private
updateSaleProductStatus(SaleProduct $sp, DateTime $now) : void
Parameters
- $sp : SaleProduct
- $now : DateTime