LibreDTE

ListDocumentEventsResponse
in package
implements JsonSerializable

Respuesta del SII con el historial de eventos de un DTE.

Cada evento tiene: codigo, glosa, responsable (RUT-DV) y fecha.

Table of Contents

Interfaces

JsonSerializable

Properties

$events  : array<int, DocumentEvent>
Lista de eventos del DTE.

Methods

__construct()  : mixed
getEvents()  : array<int, DocumentEvent>
Entrega los eventos del DTE.
jsonSerialize()  : array<string|int, mixed>
{@inheritDoc}
toArray()  : array<int, DocumentEvent>
Entrega los eventos del DTE.
normalizeFecha()  : string
Normaliza la fecha de un evento desde el formato del SII (`DD-MM-YYYY HH:MM:SS`) a `YYYY-MM-DD HH:MM:SS`.

Properties

Methods

__construct()

public __construct(array<string|int, mixed> $response) : mixed
Parameters
$response : array<string|int, mixed>

jsonSerialize()

{@inheritDoc}

public jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

normalizeFecha()

Normaliza la fecha de un evento desde el formato del SII (`DD-MM-YYYY HH:MM:SS`) a `YYYY-MM-DD HH:MM:SS`.

private static normalizeFecha(string $fecha) : string

Mismo formato de origen y de destino que usa GetDocumentSiiReceptionDateResponse para fecha_recepcion_sii.

Parameters
$fecha : string

Fecha cruda del evento, tal como la entrega el SII.

Return values
string

Fecha normalizada, o la fecha original sin modificar si no calza con el formato esperado (ej. string vacío).

On this page

Search results