InvoiceArchiveWriteService

Implements \InvoiceArchiveWriteServiceInterface

Class InvoiceArchiveWriteService

category

System

package

Invoice

Methods

InvoiceListArchiveWriteService constructor.

__construct(\InvoiceListGeneratorInterface $invoiceListGenerator, \InvoiceRepositoryInterface $invoiceRepository, \InvoiceFileEntitlerInterface $fileEntitler, \AbstractFileStorage $fileStorage) 

Arguments

$invoiceListGenerator

\InvoiceListGeneratorInterface

$invoiceRepository

\InvoiceRepositoryInterface

$fileStorage

\AbstractFileStorage

Removes an invoice from the database by the given invoice id.

deleteInvoiceById(\IdType $invoiceId) : $this|\InvoiceArchiveWriteServiceInterface
Throws
\UnexpectedValueException

if invoice does not exist

Arguments

$invoiceId

\IdType

Id of invoice entry to be removed.

Response

$this|\InvoiceArchiveWriteServiceInterface

Imports the given invoice file and store their information in the database.

importInvoiceFile(\ExistingFile $invoiceFile, \InvoiceInformation $invoiceInfo) : integer

Arguments

$invoiceFile

\ExistingFile

Name of pdf invoice file.

$invoiceInfo

\InvoiceInformation

Value objects which holds the invoice information

Response

integer

Invoice id.

Properties

invoiceListGenerator

invoiceListGenerator : \InvoiceListGeneratorInterface

invoiceRepository

invoiceRepository : \InvoiceRepositoryInterface

fileEntitler

fileEntitler : \InvoiceFileEntitlerInterface

fileStorage

fileStorage : \AbstractFileStorage
var

Type(s)

\AbstractFileStorage