LibreDTE

SenderWorker extends AbstractExchangeWorker
in package
implements SenderWorkerInterface uses HandlersAwareTrait, StrategiesAwareTrait

Worker "billing.exchange.sender".

Attributes
#[Worker]
$name: 'sender'
$component: 'exchange'
$package: 'billing'

Table of Contents

Interfaces

SenderWorkerInterface
Interfaz para el worker "billing.exchange.sender".

Properties

$optionsSchema  : array<string, array<string|int, mixed>|bool>
Esquema de las opciones.

Methods

__construct()  : mixed
handle()  : array<string|int, mixed>
{@inheritDoc}
send()  : array<string|int, ExchangeResultInterface>
Envía documentos a través del proceso de intercambio mediante la estrategia definida en la bolsa.

Properties

$optionsSchema

Esquema de las opciones.

protected array<string, array<string|int, mixed>|bool> $optionsSchema = ['strategy' => ['types' => 'string', 'default' => 'email.smtp'], 'transport' => ['types' => 'array', 'default' => []]]

Methods

__construct()

public __construct([iterable<string|int, mixed> $handlers = [] ][, iterable<string|int, mixed> $strategies = [] ]) : mixed
Parameters
$handlers : iterable<string|int, mixed> = []
$strategies : iterable<string|int, mixed> = []

send()

Envía documentos a través del proceso de intercambio mediante la estrategia definida en la bolsa.

public send(ExchangeBagInterface $bag) : array<string|int, ExchangeResultInterface>
Parameters
$bag : ExchangeBagInterface

Bolsa con los sobres y opciones para realizar el intercambio de documentos.

Attributes
#[Operation]
$parameters: ['bag' => ['example' => ['options' => ['strategy' => 'email.smtp', 'transport' => ['username' => '', 'password' => '']], 'envelopes' => [['sender' => ['identifier' => ['value' => '76192083-9', 'schemeId' => 'CL-RUT'], 'endpoints' => [['value' => 'emisor@example.com', 'schemeId' => 'EMAIL']]], 'receiver' => ['identifier' => ['value' => '66666666-6', 'schemeId' => 'CL-RUT'], 'endpoints' => [['value' => 'cliente@example.com', 'schemeId' => 'EMAIL']]], 'documentType' => DocumentType::INVOICE, 'process' => ProcessType::BILLING, 'businessMessageID' => 'envio-001', 'documents' => [['type' => DocumentType::INVOICE, 'content' => '']]]]]]]
Return values
array<string|int, ExchangeResultInterface>

Los resultados de procesar los sobres de la bolsa. Tiene el estado de cada estrategia que procesó el sobre.

On this page

Search results