Quittio 0.3 API

PendingInvoice
in package
uses Macroable

Fluent render call: Quittio::make($order)->profile('en16931')->format('zugferd')->locale('de')->render().

Table of Contents

Properties

$data  : InvoiceData
$manager  : QuittioManager

Methods

__construct()  : mixed
check()  : ValidationResult
Validates like a render run without rendering. An explicit validation request: it validates whatever validation.mode or withoutValidation() say and never throws a ValidationException.
country()  : static
Leading country pack of this call (ISO 3166-1 alpha-2), instead of the seller's country.
data()  : InvoiceData
The invoice data of this call, as passed (not calculated).
format()  : static
Output format of this call, e.g. "zugferd", "xrechnung-cii", "pdf"; replaces earlier formats.
formats()  : static
locale()  : static
Locale of this call; wins over the invoice locale and the configuration.
option()  : static
Output option of this call, e.g. option('fold_marks', false); see the output configuration.
options()  : RenderOptions
The options collected so far, as passed to the render run.
prepare()  : PreparedInvoice
Calculates and validates without rendering, whatever validation.mode or withoutValidation() say; see {@see PreparedInvoice}.
presentation()  : static
Presentation defaults (design, texts) for this call; the invoice's own values win.
profile()  : static
Profile of the XML for this call, as key, alias or Profile object, e.g. "xrechnung"; the format must support it. Wins over the configured profile.
queue()  : QueuedInvoice
Renders in a queued job: Quittio::make($order)->queue()->save('invoices', $path).
render()  : RenderedInvoice
Renders the formats of this call with the events of the run (InvoiceRendering, InvoiceValidated or InvoiceValidationFailed, InvoiceRendered); see Quittio::render().
template()  : static
Template of this call (a shipped or a configured template); wins over the invoice presentation and the configuration.
validate()  : static
Switches validation on (errors throw) or to warnings only.
withoutValidation()  : static
Validation mode "off" for this call: nothing is validated, no ValidationException.

Properties

Methods

check()

Validates like a render run without rendering. An explicit validation request: it validates whatever validation.mode or withoutValidation() say and never throws a ValidationException.

public check() : ValidationResult
Return values
ValidationResult

country()

Leading country pack of this call (ISO 3166-1 alpha-2), instead of the seller's country.

public country(string $country) : static
Parameters
$country : string
Return values
static

format()

Output format of this call, e.g. "zugferd", "xrechnung-cii", "pdf"; replaces earlier formats.

public format(string $format) : static
Parameters
$format : string
Return values
static

formats()

public formats(array<int, string> $formats) : static
Parameters
$formats : array<int, string>
Return values
static

locale()

Locale of this call; wins over the invoice locale and the configuration.

public locale(string $locale) : static
Parameters
$locale : string
Return values
static

option()

Output option of this call, e.g. option('fold_marks', false); see the output configuration.

public option(string $key, mixed $value) : static
Parameters
$key : string
$value : mixed
Return values
static

presentation()

Presentation defaults (design, texts) for this call; the invoice's own values win.

public presentation(Presentation $presentation) : static
Parameters
$presentation : Presentation
Return values
static

profile()

Profile of the XML for this call, as key, alias or Profile object, e.g. "xrechnung"; the format must support it. Wins over the configured profile.

public profile(Profile|string $profile) : static
Parameters
$profile : Profile|string
Return values
static

queue()

Renders in a queued job: Quittio::make($order)->queue()->save('invoices', $path).

public queue([string|null $connection = null ][, string|null $queue = null ]) : QueuedInvoice
Parameters
$connection : string|null = null
$queue : string|null = null
Return values
QueuedInvoice

render()

Renders the formats of this call with the events of the run (InvoiceRendering, InvoiceValidated or InvoiceValidationFailed, InvoiceRendered); see Quittio::render().

public render() : RenderedInvoice
Tags
throws
ValidationException

when validation finds errors in the mode "error"

ConfigurationException

for an unknown format, a profile the format does not support or a watermark with e-invoice XML

MandatoryFieldMissing

when the template omits mandatory values in the guard mode "exception"

CalculationException

when the data cannot be calculated

PdfException

when the PDF cannot be rendered

Return values
RenderedInvoice

template()

Template of this call (a shipped or a configured template); wins over the invoice presentation and the configuration.

public template(string $template) : static
Parameters
$template : string
Return values
static

validate()

Switches validation on (errors throw) or to warnings only.

public validate([bool $throwOnError = true ]) : static
Parameters
$throwOnError : bool = true
Return values
static

withoutValidation()

Validation mode "off" for this call: nothing is validated, no ValidationException.

public withoutValidation() : static
Return values
static
On this page

Search results