InvoiceArchiveWriteService
in package
implements
InvoiceArchiveWriteServiceInterface
Class InvoiceArchiveWriteService
Tags
Interfaces, Classes and Traits
- InvoiceArchiveWriteServiceInterface
- Interface InvoiceArchiveWriteServiceInterface
Table of Contents
- $fileEntitler : InvoiceFileEntitlerInterface
- $fileStorage : AbstractFileStorage
- $invoiceListGenerator : InvoiceListGeneratorInterface
- $invoiceRepository : InvoiceRepositoryInterface
- __construct() : mixed
- InvoiceListArchiveWriteService constructor.
- deleteInvoiceById() : $this|InvoiceArchiveWriteServiceInterface
- Removes an invoice from the database by the given invoice id.
- importInvoiceFile() : int
- Imports the given invoice file and store their information in the database.
Properties
$fileEntitler
protected
InvoiceFileEntitlerInterface
$fileEntitler
$fileStorage
protected
AbstractFileStorage
$fileStorage
$invoiceListGenerator
protected
InvoiceListGeneratorInterface
$invoiceListGenerator
$invoiceRepository
protected
InvoiceRepositoryInterface
$invoiceRepository
Methods
__construct()
InvoiceListArchiveWriteService constructor.
public
__construct(InvoiceListGeneratorInterface $invoiceListGenerator, InvoiceRepositoryInterface $invoiceRepository, InvoiceFileEntitlerInterface $fileEntitler, AbstractFileStorage $fileStorage) : mixed
Parameters
- $invoiceListGenerator : InvoiceListGeneratorInterface
- $invoiceRepository : InvoiceRepositoryInterface
- $fileEntitler : InvoiceFileEntitlerInterface
- $fileStorage : AbstractFileStorage
Return values
mixed —deleteInvoiceById()
Removes an invoice from the database by the given invoice id.
public
deleteInvoiceById(IdType $invoiceId) : $this|InvoiceArchiveWriteServiceInterface
Parameters
- $invoiceId : IdType
-
Id of invoice entry to be removed.
Tags
Return values
$this|InvoiceArchiveWriteServiceInterface —importInvoiceFile()
Imports the given invoice file and store their information in the database.
public
importInvoiceFile(ExistingFile $invoiceFile, InvoiceInformation $invoiceInfo) : int
Parameters
- $invoiceFile : ExistingFile
-
Name of pdf invoice file.
- $invoiceInfo : InvoiceInformation
-
Value objects which holds the invoice information
Return values
int —Invoice id.