Logidav Docs

GlsService
in package

Table of Contents

Properties

$container  : ContainerInterface
$entityManager  : EntityManagerInterface
$logService  : LogServiceInterface
$productService  : ProductService
$saleProductService  : SaleProductService|object
$apiGls  : SaleService|object
$eventDispatcher  : EventDispatcherInterface
$saleLogService  : SaleLogService
$saleProductShipmentService  : SaleProductShipmentService
$saleProductShipmentTrackingService  : SaleProductShipmentTrackingService
$saleService  : SaleService|object
$userService  : UserService

Methods

__construct()  : mixed
GLS Service constructor.
createSaleProductShipment()  : true
generatBodyForEtiquetGls()  : array<string|int, mixed>
generate Body for etiqueete Gls
getParcelInfoByTrackingId()  : mixed
Send Expedition to Gls
isGlsable()  : bool
Check if a package should be handled by GLS based on dimensions and weight
isWithinGlsWeightLimit()  : bool
Check if weight is within GLS limits
saveGlsEtiquette()  : string
sendExpeditionToGls()  : mixed
Send Expedition to Gls
createSaleProductShipmentRecord()  : SaleProductShipment
createSaleProductShipmentTrackingRecord()  : void
dispatchSaleProductsAfterTicketPrintedEvent()  : void
dispatchSaleProductsShippedEvent()  : void
finalizeSale()  : void
isOversizedPackage()  : bool
Calculate if package dimensions qualify as oversized
logShipment()  : void
processShipment()  : void
updateSaleProductStatus()  : void

Properties

$container

protected ContainerInterface $container

$entityManager

protected EntityManagerInterface $entityManager

$eventDispatcher

private EventDispatcherInterface $eventDispatcher

Methods

__construct()

GLS Service constructor.

public __construct(ContainerInterface $container, GlsApi $glsApi, EntityManagerInterface $entityManager, LogServiceInterface $logService, EventDispatcherInterface $eventDispatcher) : mixed
Parameters
$container : ContainerInterface
$glsApi : GlsApi
$entityManager : EntityManagerInterface
$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
throws
GuzzleException
throws
ORMException
throws
OptimisticLockException
Return values
true

generatBodyForEtiquetGls()

generate Body for etiqueete Gls

public generatBodyForEtiquetGls(Sale $sale, mixed $item, mixed $generateBareCode) : array<string|int, mixed>
Parameters
$sale : Sale
$item : mixed
$generateBareCode : mixed
Return values
array<string|int, mixed>

getParcelInfoByTrackingId()

Send Expedition to Gls

public getParcelInfoByTrackingId(mixed $trackingId) : mixed
Parameters
$trackingId : mixed

isGlsable()

Check if a package should be handled by GLS based on dimensions and weight

public static isGlsable(float $length, float $width, float $height, float $weight) : bool
Parameters
$length : float

Length in cm

$width : float

Width in cm

$height : float

Height in cm

$weight : float

Weight in kg

Return values
bool

True if GLS should handle the package

isWithinGlsWeightLimit()

Check if weight is within GLS limits

public static isWithinGlsWeightLimit(float $weight) : bool
Parameters
$weight : float

Weight in kg

Return values
bool

saveGlsEtiquette()

public saveGlsEtiquette(mixed $data, mixed $sp) : string
Parameters
$data : mixed
$sp : mixed
Return values
string

sendExpeditionToGls()

Send Expedition to Gls

public sendExpeditionToGls(mixed $data) : mixed
Parameters
$data : mixed

dispatchSaleProductsShippedEvent()

private dispatchSaleProductsShippedEvent(array<string|int, mixed> $saleProductIds) : void
Parameters
$saleProductIds : array<string|int, mixed>

finalizeSale()

private finalizeSale(Sale $sale, DateTime $now, bool $logChanges, mixed $user) : void
Parameters
$sale : Sale
$now : DateTime
$logChanges : bool
$user : mixed
Tags
throws
GuzzleException

isOversizedPackage()

Calculate if package dimensions qualify as oversized

private static isOversizedPackage(float $length, float $width, float $height) : bool
Parameters
$length : float

Length in cm

$width : float

Width in cm

$height : float

Height in cm

Return values
bool

logShipment()

private logShipment(Sale $sale, bool $shipmentId, SaleProduct $sp, mixed $user) : void
Parameters
$sale : Sale
$shipmentId : bool
$sp : SaleProduct
$user : mixed
Tags
throws
Exception

processShipment()

private processShipment(SaleProduct $sp, Sale $sale, mixed $user, bool $notify) : void
Parameters
$sp : SaleProduct
$sale : Sale
$user : mixed
$notify : bool
Tags
throws
Exception

updateSaleProductStatus()

private updateSaleProductStatus(SaleProduct $sp, DateTime $now) : void
Parameters
$sp : SaleProduct
$now : DateTime
Tags
throws
ORMException
throws
OptimisticLockException

        
On this page

Search results