Logidav Docs

VirService
in package

Class VirService

Table of Contents

Constants

SFTP_PATH_Write  = 'IN'

Properties

$container  : ContainerInterface
$configSFtpVir  : mixed
$ediHistoryService  : EdiHistoryService
$entityManager  : EntityManagerInterface
$eventDispatcher  : EventDispatcherInterface
$logService  : LogServiceInterface
$saleLogService  : SaleLogService
$saleProductService  : SaleProductService
$saleProductShipmentService  : SaleProductShipmentService
$saleProductShipmentTrackingService  : SaleProductShipmentTrackingService
$saleService  : SaleService
$sftp  : Ftp
$userService  : UserService

Methods

__construct()  : mixed
addOrderToVir()  : mixed
connectSftp()  : false|SFTP
connectToFtp()  : Ftp|false
connectToSftpVirEndOfJourney()  : mixed
createFileVir()  : string
createSaleProductShipment()  : true
createVirPreExpeditionForSale()  : array<string|int, mixed>
generateVirCsvLigne()  : void
getVirShippingPrice()  : float|int
sendEndOfJourneyEmail()  : void
sendFileEndOfJournyyToSftp()  : bool
createSaleProductShipmentRecord()  : SaleProductShipment
createSaleProductShipmentTrackingRecord()  : void
dispatchSaleProductsAfterTicketPrintedEvent()  : void
dispatchSaleProductsShippedEvent()  : void
finalizeSale()  : void
logShipment()  : void
processShipment()  : void
updateSaleProductStatus()  : void

Constants

SFTP_PATH_Write

public mixed SFTP_PATH_Write = 'IN'

Properties

$container

protected ContainerInterface $container

$entityManager

private EntityManagerInterface $entityManager

$eventDispatcher

private EventDispatcherInterface $eventDispatcher

Methods

__construct()

public __construct(EntityManagerInterface $entityManager, ContainerInterface $container, EventDispatcherInterface $eventDispatcher, LogServiceInterface $logService, EdiHistoryService $ediHistoryService) : mixed
Parameters
$entityManager : EntityManagerInterface
$container : ContainerInterface
$eventDispatcher : EventDispatcherInterface
$logService : LogServiceInterface
$ediHistoryService : EdiHistoryService

addOrderToVir()

public addOrderToVir(mixed $exportFile, mixed $order, mixed $nbTotalForOrder, mixed $siret) : mixed
Parameters
$exportFile : mixed
$order : mixed
$nbTotalForOrder : mixed
$siret : mixed

connectSftp()

public connectSftp() : false|SFTP
Return values
false|SFTP

connectToSftpVirEndOfJourney()

public connectToSftpVirEndOfJourney() : mixed

createFileVir()

public createFileVir(array<string|int, Sale$orders, array<string|int, mixed> $shipIds) : string
Parameters
$orders : array<string|int, Sale>
$shipIds : array<string|int, mixed>
Return values
string

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
Return values
true

createVirPreExpeditionForSale()

public createVirPreExpeditionForSale(mixed $orderId, mixed $orderItemId, mixed $token) : array<string|int, mixed>
Parameters
$orderId : mixed
$orderItemId : mixed
$token : mixed
Tags
throws
Exception
Return values
array<string|int, mixed>

generateVirCsvLigne()

public generateVirCsvLigne(mixed $saleProduct, mixed $order, mixed &$packagesTotalV2) : void
Parameters
$saleProduct : mixed
$order : mixed
$packagesTotalV2 : mixed

getVirShippingPrice()

public getVirShippingPrice(mixed $itemWeight[, int $qty = 1 ]) : float|int
Parameters
$itemWeight : mixed
$qty : int = 1
Return values
float|int

sendEndOfJourneyEmail()

public sendEndOfJourneyEmail(string $type[, string $filePath = null ]) : void
Parameters
$type : string
$filePath : string = null

The path of the file to be attached to the email

sendFileEndOfJournyyToSftp()

public sendFileEndOfJournyyToSftp(mixed $filePath) : bool
Parameters
$filePath : mixed
Tags
throws
Exception
Return values
bool

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

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