First push, working on models

This commit is contained in:
David Bomba 2025-05-01 17:26:38 +10:00
parent 5b3155ea9e
commit 2444eacb13
29 changed files with 4764 additions and 0 deletions

View File

@ -0,0 +1,74 @@
<?php
namespace App\Services\EDocument\Standards\Verifactu\Types;
class Cabecera
{
/** @var ObligadoEmision */
protected $obligadoEmision;
/** @var PersonaFisicaJuridicaES|null */
protected $representante;
/** @var array{fechaFinVeriFactu?: string, incidencia?: IncidenciaType}|null */
protected $remisionVoluntaria;
/** @var array{refRequerimiento: string, finRequerimiento?: string}|null */
protected $remisionRequerimiento;
public function getObligadoEmision(): ObligadoEmision
{
return $this->obligadoEmision;
}
public function setObligadoEmision(ObligadoEmision $obligadoEmision): self
{
$this->obligadoEmision = $obligadoEmision;
return $this;
}
public function getRepresentante(): ?PersonaFisicaJuridicaES
{
return $this->representante;
}
public function setRepresentante(?PersonaFisicaJuridicaES $representante): self
{
$this->representante = $representante;
return $this;
}
/**
* @return array{fechaFinVeriFactu?: string, incidencia?: IncidenciaType}|null
*/
public function getRemisionVoluntaria(): ?array
{
return $this->remisionVoluntaria;
}
/**
* @param array{fechaFinVeriFactu?: string, incidencia?: IncidenciaType}|null $remisionVoluntaria
*/
public function setRemisionVoluntaria(?array $remisionVoluntaria): self
{
$this->remisionVoluntaria = $remisionVoluntaria;
return $this;
}
/**
* @return array{refRequerimiento: string, finRequerimiento?: string}|null
*/
public function getRemisionRequerimiento(): ?array
{
return $this->remisionRequerimiento;
}
/**
* @param array{refRequerimiento: string, finRequerimiento?: string}|null $remisionRequerimiento
*/
public function setRemisionRequerimiento(?array $remisionRequerimiento): self
{
$this->remisionRequerimiento = $remisionRequerimiento;
return $this;
}
}

View File

@ -0,0 +1,64 @@
<?php
namespace App\Services\EDocument\Standards\Verifactu\Types\Common;
trait TextTypes
{
protected function validateMaxLength(string $value, int $maxLength, string $fieldName): void
{
if (strlen($value) > $maxLength) {
throw new \InvalidArgumentException("$fieldName must not exceed $maxLength characters");
}
}
protected function validateExactLength(string $value, int $length, string $fieldName): void
{
if (strlen($value) !== $length) {
throw new \InvalidArgumentException("$fieldName must be exactly $length characters long");
}
}
protected function validateNIF(string $nif): void
{
$this->validateExactLength($nif, 9, 'NIF');
// TODO: Add more specific NIF validation rules
}
protected function validateDate(string $date): void
{
if (!preg_match('/^\d{2}-\d{2}-\d{4}$/', $date)) {
throw new \InvalidArgumentException('Date must be in DD-MM-YYYY format');
}
list($day, $month, $year) = explode('-', $date);
if (!checkdate((int)$month, (int)$day, (int)$year)) {
throw new \InvalidArgumentException('Invalid date');
}
}
protected function validateTimestamp(string $timestamp): void
{
if (!preg_match('/^\d{2}-\d{2}-\d{4} \d{2}:\d{2}:\d{2}$/', $timestamp)) {
throw new \InvalidArgumentException('Timestamp must be in DD-MM-YYYY HH:mm:ss format');
}
list($date, $time) = explode(' ', $timestamp);
list($day, $month, $year) = explode('-', $date);
list($hour, $minute, $second) = explode(':', $time);
if (!checkdate((int)$month, (int)$day, (int)$year)) {
throw new \InvalidArgumentException('Invalid date in timestamp');
}
if ($hour > 23 || $minute > 59 || $second > 59) {
throw new \InvalidArgumentException('Invalid time in timestamp');
}
}
protected function validateNumericString(string $value, int $maxIntegerDigits, int $maxDecimalDigits, string $fieldName): void
{
if (!preg_match('/^[+-]?\d{1,' . $maxIntegerDigits . '}(\.\d{0,' . $maxDecimalDigits . '})?$/', $value)) {
throw new \InvalidArgumentException("$fieldName must have at most $maxIntegerDigits digits before decimal point and $maxDecimalDigits after");
}
}
}

View File

@ -0,0 +1,38 @@
<?php
namespace App\Services\EDocument\Standards\Verifactu\Types;
class Desglose
{
/** @var Detalle[] */
protected $detalle = [];
/**
* @return Detalle[]
*/
public function getDetalle(): array
{
return $this->detalle;
}
public function addDetalle(Detalle $detalle): self
{
if (count($this->detalle) >= 1000) {
throw new \RuntimeException('Maximum number of Detalle (1000) exceeded');
}
$this->detalle[] = $detalle;
return $this;
}
/**
* @param Detalle[] $detalle
*/
public function setDetalle(array $detalle): self
{
if (count($detalle) > 1000) {
throw new \RuntimeException('Maximum number of Detalle (1000) exceeded');
}
$this->detalle = $detalle;
return $this;
}
}

View File

@ -0,0 +1,74 @@
<?php
namespace App\Services\EDocument\Standards\Verifactu\Types;
class DesgloseRectificacion
{
/** @var float */
protected $baseRectificada;
/** @var float */
protected $cuotaRectificada;
/** @var float|null */
protected $cuotaRecargoRectificada;
public function getBaseRectificada(): float
{
return $this->baseRectificada;
}
public function setBaseRectificada(float $baseRectificada): self
{
// Validate format: max 12 digits before decimal point, 2 after
$strValue = (string)$baseRectificada;
if (strlen(substr(strrchr($strValue, "."), 1)) > 2) {
throw new \InvalidArgumentException('BaseRectificada must have at most 2 decimal places');
}
if (strlen(explode('.', $strValue)[0]) > 12) {
throw new \InvalidArgumentException('BaseRectificada must have at most 12 digits before decimal point');
}
$this->baseRectificada = $baseRectificada;
return $this;
}
public function getCuotaRectificada(): float
{
return $this->cuotaRectificada;
}
public function setCuotaRectificada(float $cuotaRectificada): self
{
// Validate format: max 12 digits before decimal point, 2 after
$strValue = (string)$cuotaRectificada;
if (strlen(substr(strrchr($strValue, "."), 1)) > 2) {
throw new \InvalidArgumentException('CuotaRectificada must have at most 2 decimal places');
}
if (strlen(explode('.', $strValue)[0]) > 12) {
throw new \InvalidArgumentException('CuotaRectificada must have at most 12 digits before decimal point');
}
$this->cuotaRectificada = $cuotaRectificada;
return $this;
}
public function getCuotaRecargoRectificada(): ?float
{
return $this->cuotaRecargoRectificada;
}
public function setCuotaRecargoRectificada(?float $cuotaRecargoRectificada): self
{
if ($cuotaRecargoRectificada !== null) {
// Validate format: max 12 digits before decimal point, 2 after
$strValue = (string)$cuotaRecargoRectificada;
if (strlen(substr(strrchr($strValue, "."), 1)) > 2) {
throw new \InvalidArgumentException('CuotaRecargoRectificada must have at most 2 decimal places');
}
if (strlen(explode('.', $strValue)[0]) > 12) {
throw new \InvalidArgumentException('CuotaRecargoRectificada must have at most 12 digits before decimal point');
}
}
$this->cuotaRecargoRectificada = $cuotaRecargoRectificada;
return $this;
}
}

View File

@ -0,0 +1,198 @@
<?php
namespace App\Services\EDocument\Standards\Verifactu\Types;
class Detalle
{
/** @var string|null */
protected $impuesto;
/** @var string|null */
protected $claveRegimen;
/** @var string|null */
protected $calificacionOperacion;
/** @var string|null */
protected $operacionExenta;
/** @var float|null */
protected $tipoImpositivo;
/** @var float */
protected $baseImponibleOimporteNoSujeto;
/** @var float|null */
protected $baseImponibleACoste;
/** @var float|null */
protected $cuotaRepercutida;
/** @var float|null */
protected $tipoRecargoEquivalencia;
/** @var float|null */
protected $cuotaRecargoEquivalencia;
public function getImpuesto(): ?string
{
return $this->impuesto;
}
public function setImpuesto(?string $impuesto): self
{
$this->impuesto = $impuesto;
return $this;
}
public function getClaveRegimen(): ?string
{
return $this->claveRegimen;
}
public function setClaveRegimen(?string $claveRegimen): self
{
$this->claveRegimen = $claveRegimen;
return $this;
}
public function getCalificacionOperacion(): ?string
{
return $this->calificacionOperacion;
}
public function setCalificacionOperacion(?string $calificacionOperacion): self
{
if ($calificacionOperacion !== null && $this->operacionExenta !== null) {
throw new \InvalidArgumentException('Cannot set both CalificacionOperacion and OperacionExenta');
}
$this->calificacionOperacion = $calificacionOperacion;
return $this;
}
public function getOperacionExenta(): ?string
{
return $this->operacionExenta;
}
public function setOperacionExenta(?string $operacionExenta): self
{
if ($operacionExenta !== null && $this->calificacionOperacion !== null) {
throw new \InvalidArgumentException('Cannot set both CalificacionOperacion and OperacionExenta');
}
$this->operacionExenta = $operacionExenta;
return $this;
}
public function getTipoImpositivo(): ?float
{
return $this->tipoImpositivo;
}
public function setTipoImpositivo(?float $tipoImpositivo): self
{
if ($tipoImpositivo !== null) {
// Validate format: max 2 decimal places
if (strlen(substr(strrchr((string)$tipoImpositivo, "."), 1)) > 2) {
throw new \InvalidArgumentException('TipoImpositivo must have at most 2 decimal places');
}
}
$this->tipoImpositivo = $tipoImpositivo;
return $this;
}
public function getBaseImponibleOimporteNoSujeto(): float
{
return $this->baseImponibleOimporteNoSujeto;
}
public function setBaseImponibleOimporteNoSujeto(float $baseImponibleOimporteNoSujeto): self
{
// Validate format: max 12 digits before decimal point, 2 after
if (strlen(substr(strrchr((string)$baseImponibleOimporteNoSujeto, "."), 1)) > 2) {
throw new \InvalidArgumentException('BaseImponibleOimporteNoSujeto must have at most 2 decimal places');
}
if (strlen(explode('.', (string)$baseImponibleOimporteNoSujeto)[0]) > 12) {
throw new \InvalidArgumentException('BaseImponibleOimporteNoSujeto must have at most 12 digits before decimal point');
}
$this->baseImponibleOimporteNoSujeto = $baseImponibleOimporteNoSujeto;
return $this;
}
public function getBaseImponibleACoste(): ?float
{
return $this->baseImponibleACoste;
}
public function setBaseImponibleACoste(?float $baseImponibleACoste): self
{
if ($baseImponibleACoste !== null) {
// Validate format: max 12 digits before decimal point, 2 after
if (strlen(substr(strrchr((string)$baseImponibleACoste, "."), 1)) > 2) {
throw new \InvalidArgumentException('BaseImponibleACoste must have at most 2 decimal places');
}
if (strlen(explode('.', (string)$baseImponibleACoste)[0]) > 12) {
throw new \InvalidArgumentException('BaseImponibleACoste must have at most 12 digits before decimal point');
}
}
$this->baseImponibleACoste = $baseImponibleACoste;
return $this;
}
public function getCuotaRepercutida(): ?float
{
return $this->cuotaRepercutida;
}
public function setCuotaRepercutida(?float $cuotaRepercutida): self
{
if ($cuotaRepercutida !== null) {
// Validate format: max 12 digits before decimal point, 2 after
if (strlen(substr(strrchr((string)$cuotaRepercutida, "."), 1)) > 2) {
throw new \InvalidArgumentException('CuotaRepercutida must have at most 2 decimal places');
}
if (strlen(explode('.', (string)$cuotaRepercutida)[0]) > 12) {
throw new \InvalidArgumentException('CuotaRepercutida must have at most 12 digits before decimal point');
}
}
$this->cuotaRepercutida = $cuotaRepercutida;
return $this;
}
public function getTipoRecargoEquivalencia(): ?float
{
return $this->tipoRecargoEquivalencia;
}
public function setTipoRecargoEquivalencia(?float $tipoRecargoEquivalencia): self
{
if ($tipoRecargoEquivalencia !== null) {
// Validate format: max 2 decimal places
if (strlen(substr(strrchr((string)$tipoRecargoEquivalencia, "."), 1)) > 2) {
throw new \InvalidArgumentException('TipoRecargoEquivalencia must have at most 2 decimal places');
}
}
$this->tipoRecargoEquivalencia = $tipoRecargoEquivalencia;
return $this;
}
public function getCuotaRecargoEquivalencia(): ?float
{
return $this->cuotaRecargoEquivalencia;
}
public function setCuotaRecargoEquivalencia(?float $cuotaRecargoEquivalencia): self
{
if ($cuotaRecargoEquivalencia !== null) {
// Validate format: max 12 digits before decimal point, 2 after
if (strlen(substr(strrchr((string)$cuotaRecargoEquivalencia, "."), 1)) > 2) {
throw new \InvalidArgumentException('CuotaRecargoEquivalencia must have at most 2 decimal places');
}
if (strlen(explode('.', (string)$cuotaRecargoEquivalencia)[0]) > 12) {
throw new \InvalidArgumentException('CuotaRecargoEquivalencia must have at most 12 digits before decimal point');
}
}
$this->cuotaRecargoEquivalencia = $cuotaRecargoEquivalencia;
return $this;
}
}

View File

@ -0,0 +1,37 @@
<?php
namespace App\Services\EDocument\Standards\Verifactu\Types;
class IDDestinatario extends PersonaFisicaJuridicaES
{
/** @var string|null */
protected $codigoPais;
/** @var IDOtro|null */
protected $idOtro;
public function getCodigoPais(): ?string
{
return $this->codigoPais;
}
public function setCodigoPais(?string $codigoPais): self
{
if ($codigoPais !== null && strlen($codigoPais) !== 2) {
throw new \InvalidArgumentException('CodigoPais must be a 2-character ISO country code');
}
$this->codigoPais = $codigoPais;
return $this;
}
public function getIdOtro(): ?IDOtro
{
return $this->idOtro;
}
public function setIdOtro(?IDOtro $idOtro): self
{
$this->idOtro = $idOtro;
return $this;
}
}

View File

@ -0,0 +1,63 @@
<?php
namespace App\Services\EDocument\Standards\Verifactu\Types;
class IDFactura
{
/** @var string */
protected $idEmisorFactura;
/** @var string */
protected $numSerieFactura;
/** @var string */
protected $fechaExpedicionFactura;
public function getIdEmisorFactura(): string
{
return $this->idEmisorFactura;
}
public function setIdEmisorFactura(string $idEmisorFactura): self
{
// TODO: Add NIF validation
$this->idEmisorFactura = $idEmisorFactura;
return $this;
}
public function getNumSerieFactura(): string
{
return $this->numSerieFactura;
}
public function setNumSerieFactura(string $numSerieFactura): self
{
if (strlen($numSerieFactura) > 60) {
throw new \InvalidArgumentException('NumSerieFactura must not exceed 60 characters');
}
$this->numSerieFactura = $numSerieFactura;
return $this;
}
public function getFechaExpedicionFactura(): string
{
return $this->fechaExpedicionFactura;
}
public function setFechaExpedicionFactura(string $fechaExpedicionFactura): self
{
// Validate date format DD-MM-YYYY
if (!preg_match('/^\d{2}-\d{2}-\d{4}$/', $fechaExpedicionFactura)) {
throw new \InvalidArgumentException('FechaExpedicionFactura must be in DD-MM-YYYY format');
}
// Validate date components
list($day, $month, $year) = explode('-', $fechaExpedicionFactura);
if (!checkdate((int)$month, (int)$day, (int)$year)) {
throw new \InvalidArgumentException('Invalid date');
}
$this->fechaExpedicionFactura = $fechaExpedicionFactura;
return $this;
}
}

View File

@ -0,0 +1,66 @@
<?php
namespace App\Services\EDocument\Standards\Verifactu\Types;
class IDFacturaAR
{
/** @var string NIF format */
protected $idEmisorFactura;
/** @var string */
protected $numSerieFactura;
/** @var string Date format YYYY-MM-DD */
protected $fechaExpedicionFactura;
/** @var string|null */
protected $numRegistroAcuerdoFacturacion;
public function getIdEmisorFactura(): string
{
return $this->idEmisorFactura;
}
public function setIdEmisorFactura(string $idEmisorFactura): self
{
// TODO: Add NIF validation
$this->idEmisorFactura = $idEmisorFactura;
return $this;
}
public function getNumSerieFactura(): string
{
return $this->numSerieFactura;
}
public function setNumSerieFactura(string $numSerieFactura): self
{
$this->numSerieFactura = $numSerieFactura;
return $this;
}
public function getFechaExpedicionFactura(): string
{
return $this->fechaExpedicionFactura;
}
public function setFechaExpedicionFactura(string $fechaExpedicionFactura): self
{
if (!\DateTime::createFromFormat('Y-m-d', $fechaExpedicionFactura)) {
throw new \InvalidArgumentException('FechaExpedicionFactura must be in YYYY-MM-DD format');
}
$this->fechaExpedicionFactura = $fechaExpedicionFactura;
return $this;
}
public function getNumRegistroAcuerdoFacturacion(): ?string
{
return $this->numRegistroAcuerdoFacturacion;
}
public function setNumRegistroAcuerdoFacturacion(?string $numRegistroAcuerdoFacturacion): self
{
$this->numRegistroAcuerdoFacturacion = $numRegistroAcuerdoFacturacion;
return $this;
}
}

View File

@ -0,0 +1,53 @@
<?php
namespace App\Services\EDocument\Standards\Verifactu\Types;
class IDFacturaExpedida
{
/** @var string NIF format */
protected $idEmisorFactura;
/** @var string */
protected $numSerieFactura;
/** @var string Date format YYYY-MM-DD */
protected $fechaExpedicionFactura;
public function getIdEmisorFactura(): string
{
return $this->idEmisorFactura;
}
public function setIdEmisorFactura(string $idEmisorFactura): self
{
// TODO: Add NIF validation
$this->idEmisorFactura = $idEmisorFactura;
return $this;
}
public function getNumSerieFactura(): string
{
return $this->numSerieFactura;
}
public function setNumSerieFactura(string $numSerieFactura): self
{
$this->numSerieFactura = $numSerieFactura;
return $this;
}
public function getFechaExpedicionFactura(): string
{
return $this->fechaExpedicionFactura;
}
public function setFechaExpedicionFactura(string $fechaExpedicionFactura): self
{
// Validate date format
if (!\DateTime::createFromFormat('Y-m-d', $fechaExpedicionFactura)) {
throw new \InvalidArgumentException('FechaExpedicionFactura must be in YYYY-MM-DD format');
}
$this->fechaExpedicionFactura = $fechaExpedicionFactura;
return $this;
}
}

View File

@ -0,0 +1,64 @@
<?php
namespace App\Services\EDocument\Standards\Verifactu\Types;
class IDOtro
{
/** @var string|null ISO 3166-1 alpha-2 */
protected $codigoPais;
/** @var string */
protected $idType;
/** @var string Max length 20 characters */
protected $id;
public function getCodigoPais(): ?string
{
return $this->codigoPais;
}
public function setCodigoPais(?string $codigoPais): self
{
if ($codigoPais !== null) {
if (strlen($codigoPais) !== 2) {
throw new \InvalidArgumentException('CodigoPais must be a 2-letter ISO country code');
}
// Prevent using ES with IDType 01
if ($codigoPais === 'ES' && $this->idType === '01') {
throw new \InvalidArgumentException('Cannot use CodigoPais=ES with IDType=01, use NIF instead');
}
}
$this->codigoPais = $codigoPais;
return $this;
}
public function getIdType(): string
{
return $this->idType;
}
public function setIdType(string $idType): self
{
// Prevent using ES with IDType 01
if ($this->codigoPais === 'ES' && $idType === '01') {
throw new \InvalidArgumentException('Cannot use CodigoPais=ES with IDType=01, use NIF instead');
}
$this->idType = $idType;
return $this;
}
public function getId(): string
{
return $this->id;
}
public function setId(string $id): self
{
if (strlen($id) > 20) {
throw new \InvalidArgumentException('ID must not exceed 20 characters');
}
$this->id = $id;
return $this;
}
}

View File

@ -0,0 +1,35 @@
<?php
namespace App\Services\EDocument\Standards\Verifactu\Types;
use App\Services\EDocument\Standards\Verifactu\Types\Common\TextTypes;
class ImporteSgn14_2
{
use TextTypes;
/** @var string */
protected $value;
public function __construct(string $value)
{
$this->setValue($value);
}
public function getValue(): string
{
return $this->value;
}
public function setValue(string $value): self
{
$this->validateNumericString($value, 14, 2, 'Amount');
$this->value = $value;
return $this;
}
public function __toString(): string
{
return $this->value;
}
}

View File

@ -0,0 +1,74 @@
<?php
namespace App\Services\EDocument\Standards\Verifactu\Types;
class Incidencia
{
/** @var string Max length 2000 characters */
protected $descripcion;
/** @var string|null Max length 120 characters */
protected $nombreRazon;
/** @var string|null NIF format */
protected $nif;
/** @var string|null */
protected $fechaHora;
public function getDescripcion(): string
{
return $this->descripcion;
}
public function setDescripcion(string $descripcion): self
{
if (strlen($descripcion) > 2000) {
throw new \InvalidArgumentException('Descripcion must not exceed 2000 characters');
}
$this->descripcion = $descripcion;
return $this;
}
public function getNombreRazon(): ?string
{
return $this->nombreRazon;
}
public function setNombreRazon(?string $nombreRazon): self
{
if ($nombreRazon !== null && strlen($nombreRazon) > 120) {
throw new \InvalidArgumentException('NombreRazon must not exceed 120 characters');
}
$this->nombreRazon = $nombreRazon;
return $this;
}
public function getNif(): ?string
{
return $this->nif;
}
public function setNif(?string $nif): self
{
// TODO: Add NIF validation
$this->nif = $nif;
return $this;
}
public function getFechaHora(): ?string
{
return $this->fechaHora;
}
public function setFechaHora(?string $fechaHora): self
{
if ($fechaHora !== null) {
if (!\DateTime::createFromFormat('Y-m-d H:i:s', $fechaHora)) {
throw new \InvalidArgumentException('FechaHora must be in YYYY-MM-DD HH:mm:ss format');
}
}
$this->fechaHora = $fechaHora;
return $this;
}
}

View File

@ -0,0 +1,198 @@
<?php
namespace App\Services\EDocument\Standards\Verifactu\Types;
class ObligadoEmision extends PersonaFisicaJuridicaES
{
/** @var string|null */
protected $tipoPersona;
/** @var string|null */
protected $razonSocialCompleta;
/** @var string|null */
protected $nombreComercial;
/** @var string|null */
protected $codigoPostal;
/** @var string|null */
protected $direccion;
/** @var string|null */
protected $poblacion;
/** @var string|null */
protected $provincia;
/** @var string|null */
protected $pais;
/** @var string|null */
protected $telefono;
/** @var string|null */
protected $email;
/** @var string|null */
protected $web;
public function getTipoPersona(): ?string
{
return $this->tipoPersona;
}
public function setTipoPersona(?string $tipoPersona): self
{
if ($tipoPersona !== null && !in_array($tipoPersona, ['F', 'J'])) {
throw new \InvalidArgumentException('TipoPersona must be either "F" (Física) or "J" (Jurídica)');
}
$this->tipoPersona = $tipoPersona;
return $this;
}
public function getRazonSocialCompleta(): ?string
{
return $this->razonSocialCompleta;
}
public function setRazonSocialCompleta(?string $razonSocialCompleta): self
{
if ($razonSocialCompleta !== null && strlen($razonSocialCompleta) > 120) {
throw new \InvalidArgumentException('RazonSocialCompleta must not exceed 120 characters');
}
$this->razonSocialCompleta = $razonSocialCompleta;
return $this;
}
public function getNombreComercial(): ?string
{
return $this->nombreComercial;
}
public function setNombreComercial(?string $nombreComercial): self
{
if ($nombreComercial !== null && strlen($nombreComercial) > 120) {
throw new \InvalidArgumentException('NombreComercial must not exceed 120 characters');
}
$this->nombreComercial = $nombreComercial;
return $this;
}
public function getCodigoPostal(): ?string
{
return $this->codigoPostal;
}
public function setCodigoPostal(?string $codigoPostal): self
{
if ($codigoPostal !== null && strlen($codigoPostal) > 10) {
throw new \InvalidArgumentException('CodigoPostal must not exceed 10 characters');
}
$this->codigoPostal = $codigoPostal;
return $this;
}
public function getDireccion(): ?string
{
return $this->direccion;
}
public function setDireccion(?string $direccion): self
{
if ($direccion !== null && strlen($direccion) > 250) {
throw new \InvalidArgumentException('Direccion must not exceed 250 characters');
}
$this->direccion = $direccion;
return $this;
}
public function getPoblacion(): ?string
{
return $this->poblacion;
}
public function setPoblacion(?string $poblacion): self
{
if ($poblacion !== null && strlen($poblacion) > 50) {
throw new \InvalidArgumentException('Poblacion must not exceed 50 characters');
}
$this->poblacion = $poblacion;
return $this;
}
public function getProvincia(): ?string
{
return $this->provincia;
}
public function setProvincia(?string $provincia): self
{
if ($provincia !== null && strlen($provincia) > 20) {
throw new \InvalidArgumentException('Provincia must not exceed 20 characters');
}
$this->provincia = $provincia;
return $this;
}
public function getPais(): ?string
{
return $this->pais;
}
public function setPais(?string $pais): self
{
if ($pais !== null && strlen($pais) > 20) {
throw new \InvalidArgumentException('Pais must not exceed 20 characters');
}
$this->pais = $pais;
return $this;
}
public function getTelefono(): ?string
{
return $this->telefono;
}
public function setTelefono(?string $telefono): self
{
if ($telefono !== null && strlen($telefono) > 20) {
throw new \InvalidArgumentException('Telefono must not exceed 20 characters');
}
$this->telefono = $telefono;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): self
{
if ($email !== null) {
if (strlen($email) > 120) {
throw new \InvalidArgumentException('Email must not exceed 120 characters');
}
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
throw new \InvalidArgumentException('Invalid email format');
}
}
$this->email = $email;
return $this;
}
public function getWeb(): ?string
{
return $this->web;
}
public function setWeb(?string $web): self
{
if ($web !== null && strlen($web) > 250) {
throw new \InvalidArgumentException('Web must not exceed 250 characters');
}
$this->web = $web;
return $this;
}
}

View File

@ -0,0 +1,53 @@
<?php
namespace App\Services\EDocument\Standards\Verifactu\Types;
class OperacionExent
{
public const E1 = 'E1'; // EXENTA por Art. 20
public const E2 = 'E2'; // EXENTA por Art. 21
public const E3 = 'E3'; // EXENTA por Art. 22
public const E4 = 'E4'; // EXENTA por Art. 24
public const E5 = 'E5'; // EXENTA por Art. 25
public const E6 = 'E6'; // EXENTA por otros
/** @var string */
protected $value;
public function __construct(string $value)
{
$this->setValue($value);
}
public function getValue(): string
{
return $this->value;
}
public function setValue(string $value): self
{
$validValues = [
self::E1,
self::E2,
self::E3,
self::E4,
self::E5,
self::E6,
];
if (!in_array($value, $validValues)) {
throw new \InvalidArgumentException(sprintf(
'Invalid OperacionExenta value. Must be one of: %s',
implode(', ', $validValues)
));
}
$this->value = $value;
return $this;
}
public function __toString(): string
{
return $this->value;
}
}

View File

@ -0,0 +1,58 @@
<?php
namespace App\Services\EDocument\Standards\Verifactu\Types;
class PersonaFisicaJuridica
{
/** @var string|null Max length 120 characters */
protected $nombreRazon;
/** @var string|null NIF format */
protected $nif;
/** @var IDOtro|null */
protected $idOtro;
public function getNombreRazon(): ?string
{
return $this->nombreRazon;
}
public function setNombreRazon(?string $nombreRazon): self
{
if ($nombreRazon !== null && strlen($nombreRazon) > 120) {
throw new \InvalidArgumentException('NombreRazon must not exceed 120 characters');
}
$this->nombreRazon = $nombreRazon;
return $this;
}
public function getNif(): ?string
{
return $this->nif;
}
public function setNif(?string $nif): self
{
// TODO: Add NIF validation
if ($nif !== null && $this->idOtro !== null) {
throw new \InvalidArgumentException('Cannot set both NIF and IDOtro');
}
$this->nif = $nif;
return $this;
}
public function getIdOtro(): ?IDOtro
{
return $this->idOtro;
}
public function setIdOtro(?IDOtro $idOtro): self
{
if ($idOtro !== null && $this->nif !== null) {
throw new \InvalidArgumentException('Cannot set both NIF and IDOtro');
}
$this->idOtro = $idOtro;
return $this;
}
}

View File

@ -0,0 +1,38 @@
<?php
namespace App\Services\EDocument\Standards\Verifactu\Types;
class PersonaFisicaJuridicaES
{
/** @var string NIF format */
protected $nif;
/** @var string|null Max length 120 characters */
protected $nombreRazon;
public function getNif(): string
{
return $this->nif;
}
public function setNif(string $nif): self
{
// TODO: Add NIF validation
$this->nif = $nif;
return $this;
}
public function getNombreRazon(): ?string
{
return $this->nombreRazon;
}
public function setNombreRazon(?string $nombreRazon): self
{
if ($nombreRazon !== null && strlen($nombreRazon) > 120) {
throw new \InvalidArgumentException('NombreRazon must not exceed 120 characters');
}
$this->nombreRazon = $nombreRazon;
return $this;
}
}

View File

@ -0,0 +1,34 @@
<?php
namespace App\Services\EDocument\Standards\Verifactu\Types;
class RegFactuSistemaFacturacion
{
/** @var Cabecera */
protected $cabecera;
/** @var RegistroFactura */
protected $registroFactura;
public function getCabecera(): Cabecera
{
return $this->cabecera;
}
public function setCabecera(Cabecera $cabecera): self
{
$this->cabecera = $cabecera;
return $this;
}
public function getRegistroFactura(): RegistroFactura
{
return $this->registroFactura;
}
public function setRegistroFactura(RegistroFactura $registroFactura): self
{
$this->registroFactura = $registroFactura;
return $this;
}
}

View File

@ -0,0 +1,227 @@
<?php
namespace App\Services\EDocument\Standards\Verifactu\Types;
class RegistroAlta
{
/** @var string */
protected $idVersion;
/** @var IDFactura */
protected $idFactura;
/** @var string */
protected $nombreRazonEmisor;
/** @var string */
protected $tipoFactura;
/** @var string */
protected $descripcionOperacion;
/** @var array<IDDestinatario> */
protected $destinatarios = [];
/** @var array<DetalleDesglose> */
protected $desglose = [];
/** @var float */
protected $cuotaTotal;
/** @var float */
protected $importeTotal;
/** @var RegistroAnterior|null */
protected $encadenamiento;
/** @var SistemaInformatico */
protected $sistemaInformatico;
/** @var string */
protected $fechaHoraHusoGenRegistro;
/** @var string */
protected $tipoHuella;
/** @var string */
protected $huella;
public function getIdVersion(): string
{
return $this->idVersion;
}
public function setIdVersion(string $idVersion): self
{
$this->idVersion = $idVersion;
return $this;
}
public function getIdFactura(): IDFactura
{
return $this->idFactura;
}
public function setIdFactura(IDFactura $idFactura): self
{
$this->idFactura = $idFactura;
return $this;
}
public function getNombreRazonEmisor(): string
{
return $this->nombreRazonEmisor;
}
public function setNombreRazonEmisor(string $nombreRazonEmisor): self
{
if (strlen($nombreRazonEmisor) > 120) {
throw new \InvalidArgumentException('NombreRazonEmisor must not exceed 120 characters');
}
$this->nombreRazonEmisor = $nombreRazonEmisor;
return $this;
}
public function getTipoFactura(): string
{
return $this->tipoFactura;
}
public function setTipoFactura(string $tipoFactura): self
{
if (!in_array($tipoFactura, ['F1', 'F2', 'F3', 'F4', 'R1', 'R2', 'R3', 'R4'])) {
throw new \InvalidArgumentException('Invalid TipoFactura value');
}
$this->tipoFactura = $tipoFactura;
return $this;
}
public function getDescripcionOperacion(): string
{
return $this->descripcionOperacion;
}
public function setDescripcionOperacion(string $descripcionOperacion): self
{
if (strlen($descripcionOperacion) > 500) {
throw new \InvalidArgumentException('DescripcionOperacion must not exceed 500 characters');
}
$this->descripcionOperacion = $descripcionOperacion;
return $this;
}
/**
* @return array<IDDestinatario>
*/
public function getDestinatarios(): array
{
return $this->destinatarios;
}
public function addDestinatario(IDDestinatario $destinatario): self
{
$this->destinatarios[] = $destinatario;
return $this;
}
/**
* @return array<DetalleDesglose>
*/
public function getDesglose(): array
{
return $this->desglose;
}
public function addDesglose(DetalleDesglose $detalle): self
{
$this->desglose[] = $detalle;
return $this;
}
public function getCuotaTotal(): float
{
return $this->cuotaTotal;
}
public function setCuotaTotal(float $cuotaTotal): self
{
$this->cuotaTotal = $cuotaTotal;
return $this;
}
public function getImporteTotal(): float
{
return $this->importeTotal;
}
public function setImporteTotal(float $importeTotal): self
{
$this->importeTotal = $importeTotal;
return $this;
}
public function getEncadenamiento(): ?RegistroAnterior
{
return $this->encadenamiento;
}
public function setEncadenamiento(?RegistroAnterior $encadenamiento): self
{
$this->encadenamiento = $encadenamiento;
return $this;
}
public function getSistemaInformatico(): SistemaInformatico
{
return $this->sistemaInformatico;
}
public function setSistemaInformatico(SistemaInformatico $sistemaInformatico): self
{
$this->sistemaInformatico = $sistemaInformatico;
return $this;
}
public function getFechaHoraHusoGenRegistro(): string
{
return $this->fechaHoraHusoGenRegistro;
}
public function setFechaHoraHusoGenRegistro(string $fechaHoraHusoGenRegistro): self
{
// Validate ISO 8601 format with timezone
if (!preg_match('/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+-]\d{2}:\d{2}$/', $fechaHoraHusoGenRegistro)) {
throw new \InvalidArgumentException('FechaHoraHusoGenRegistro must be in ISO 8601 format with timezone (e.g. 2024-09-13T19:20:30+01:00)');
}
$this->fechaHoraHusoGenRegistro = $fechaHoraHusoGenRegistro;
return $this;
}
public function getTipoHuella(): string
{
return $this->tipoHuella;
}
public function setTipoHuella(string $tipoHuella): self
{
if (!in_array($tipoHuella, ['01', '02', '03', '04'])) {
throw new \InvalidArgumentException('Invalid TipoHuella value');
}
$this->tipoHuella = $tipoHuella;
return $this;
}
public function getHuella(): string
{
return $this->huella;
}
public function setHuella(string $huella): self
{
if (strlen($huella) > 100) {
throw new \InvalidArgumentException('Huella must not exceed 100 characters');
}
$this->huella = $huella;
return $this;
}
}

View File

@ -0,0 +1,40 @@
<?php
namespace App\Services\EDocument\Standards\Verifactu\Types;
class RegistroFactura
{
/** @var RegistroAlta */
protected $registroAlta;
/** @var RegistroFacturacionAnulacion|null */
protected $registroAnulacion;
public function getRegistroAlta(): RegistroAlta
{
return $this->registroAlta;
}
public function setRegistroAlta(RegistroAlta $registroAlta): self
{
if ($registroAlta !== null && $this->registroAnulacion !== null) {
throw new \InvalidArgumentException('Cannot set both RegistroAlta and RegistroAnulacion');
}
$this->registroAlta = $registroAlta;
return $this;
}
public function getRegistroAnulacion(): ?RegistroFacturacionAnulacion
{
return $this->registroAnulacion;
}
public function setRegistroAnulacion(?RegistroFacturacionAnulacion $registroAnulacion): self
{
if ($registroAnulacion !== null && $this->registroAlta !== null) {
throw new \InvalidArgumentException('Cannot set both RegistroAlta and RegistroAnulacion');
}
$this->registroAnulacion = $registroAnulacion;
return $this;
}
}

View File

@ -0,0 +1,184 @@
<?php
namespace App\Services\EDocument\Standards\Verifactu\Types;
class RegistroFacturacionAlta
{
/** @var string */
protected $idVersion;
/** @var IDFacturaExpedida */
protected $idFactura;
/** @var string|null Max length 70 characters */
protected $refExterna;
/** @var string Max length 120 characters */
protected $nombreRazonEmisor;
/** @var Subsanacion|null */
protected $subsanacion;
/** @var RechazoPrevio|null */
protected $rechazoPrevio;
/** @var string */
protected $tipoFactura;
/** @var string|null */
protected $tipoRectificativa;
/** @var IDFacturaAR[]|null */
protected $facturasRectificadas = [];
/** @var IDFacturaAR[]|null */
protected $facturasSustituidas = [];
/** @var DesgloseRectificacion|null */
protected $importeRectificacion;
/** @var string|null */
protected $fechaOperacion;
/** @var string Max length 500 characters */
protected $descripcionOperacion;
/** @var string|null */
protected $facturaSimplificadaArt7273;
/** @var string|null */
protected $facturaSinIdentifDestinatarioArt61d;
/** @var string|null */
protected $macrodato;
/** @var string|null */
protected $emitidaPorTerceroODestinatario;
/** @var PersonaFisicaJuridica|null */
protected $tercero;
/** @var PersonaFisicaJuridica[]|null */
protected $destinatarios = [];
/** @var array|null */
protected $cupon;
/** @var Desglose */
protected $desglose;
/** @var float */
protected $cuotaTotal;
/** @var float */
protected $importeTotal;
/** @var array */
protected $encadenamiento;
/** @var SistemaInformatico */
protected $sistemaInformatico;
/** @var \DateTime */
protected $fechaHoraHusoGenRegistro;
/** @var string|null Max length 15 characters */
protected $numRegistroAcuerdoFacturacion;
/** @var string|null Max length 16 characters */
protected $idAcuerdoSistemaInformatico;
/** @var string */
protected $tipoHuella;
/** @var string Max length 64 characters */
protected $huella;
/** @var string|null */
protected $signature;
// Getters and setters with validation
public function getIdVersion(): string
{
return $this->idVersion;
}
public function setIdVersion(string $idVersion): self
{
$this->idVersion = $idVersion;
return $this;
}
public function getIdFactura(): IDFacturaExpedida
{
return $this->idFactura;
}
public function setIdFactura(IDFacturaExpedida $idFactura): self
{
$this->idFactura = $idFactura;
return $this;
}
public function getRefExterna(): ?string
{
return $this->refExterna;
}
public function setRefExterna(?string $refExterna): self
{
if ($refExterna !== null && strlen($refExterna) > 70) {
throw new \InvalidArgumentException('RefExterna must not exceed 70 characters');
}
$this->refExterna = $refExterna;
return $this;
}
public function getNombreRazonEmisor(): string
{
return $this->nombreRazonEmisor;
}
public function setNombreRazonEmisor(string $nombreRazonEmisor): self
{
if (strlen($nombreRazonEmisor) > 120) {
throw new \InvalidArgumentException('NombreRazonEmisor must not exceed 120 characters');
}
$this->nombreRazonEmisor = $nombreRazonEmisor;
return $this;
}
// Add remaining getters and setters with appropriate validation...
/**
* @return PersonaFisicaJuridica[]
*/
public function getDestinatarios(): array
{
return $this->destinatarios;
}
public function addDestinatario(PersonaFisicaJuridica $destinatario): self
{
if (count($this->destinatarios) >= 1000) {
throw new \RuntimeException('Maximum number of Destinatarios (1000) exceeded');
}
$this->destinatarios[] = $destinatario;
return $this;
}
public function getHuella(): string
{
return $this->huella;
}
public function setHuella(string $huella): self
{
if (strlen($huella) > 64) {
throw new \InvalidArgumentException('Huella must not exceed 64 characters');
}
$this->huella = $huella;
return $this;
}
}

View File

@ -0,0 +1,192 @@
<?php
namespace App\Services\EDocument\Standards\Verifactu\Types;
class RegistroFacturacionAnulacion
{
/** @var string */
protected $idVersion;
/** @var IDFacturaExpedida */
protected $idFactura;
/** @var string|null Max length 70 characters */
protected $refExterna;
/** @var string Max length 120 characters */
protected $nombreRazonEmisor;
/** @var string|null Max length 2000 characters */
protected $motivoAnulacion;
/** @var SistemaInformatico */
protected $sistemaInformatico;
/** @var \DateTime */
protected $fechaHoraHusoGenRegistro;
/** @var string|null Max length 15 characters */
protected $numRegistroAcuerdoFacturacion;
/** @var string|null Max length 16 characters */
protected $idAcuerdoSistemaInformatico;
/** @var string */
protected $tipoHuella;
/** @var string Max length 64 characters */
protected $huella;
/** @var string|null */
protected $signature;
public function getIdVersion(): string
{
return $this->idVersion;
}
public function setIdVersion(string $idVersion): self
{
$this->idVersion = $idVersion;
return $this;
}
public function getIdFactura(): IDFacturaExpedida
{
return $this->idFactura;
}
public function setIdFactura(IDFacturaExpedida $idFactura): self
{
$this->idFactura = $idFactura;
return $this;
}
public function getRefExterna(): ?string
{
return $this->refExterna;
}
public function setRefExterna(?string $refExterna): self
{
if ($refExterna !== null && strlen($refExterna) > 70) {
throw new \InvalidArgumentException('RefExterna must not exceed 70 characters');
}
$this->refExterna = $refExterna;
return $this;
}
public function getNombreRazonEmisor(): string
{
return $this->nombreRazonEmisor;
}
public function setNombreRazonEmisor(string $nombreRazonEmisor): self
{
if (strlen($nombreRazonEmisor) > 120) {
throw new \InvalidArgumentException('NombreRazonEmisor must not exceed 120 characters');
}
$this->nombreRazonEmisor = $nombreRazonEmisor;
return $this;
}
public function getMotivoAnulacion(): ?string
{
return $this->motivoAnulacion;
}
public function setMotivoAnulacion(?string $motivoAnulacion): self
{
if ($motivoAnulacion !== null && strlen($motivoAnulacion) > 2000) {
throw new \InvalidArgumentException('MotivoAnulacion must not exceed 2000 characters');
}
$this->motivoAnulacion = $motivoAnulacion;
return $this;
}
public function getSistemaInformatico(): SistemaInformatico
{
return $this->sistemaInformatico;
}
public function setSistemaInformatico(SistemaInformatico $sistemaInformatico): self
{
$this->sistemaInformatico = $sistemaInformatico;
return $this;
}
public function getFechaHoraHusoGenRegistro(): \DateTime
{
return $this->fechaHoraHusoGenRegistro;
}
public function setFechaHoraHusoGenRegistro(\DateTime $fechaHoraHusoGenRegistro): self
{
$this->fechaHoraHusoGenRegistro = $fechaHoraHusoGenRegistro;
return $this;
}
public function getNumRegistroAcuerdoFacturacion(): ?string
{
return $this->numRegistroAcuerdoFacturacion;
}
public function setNumRegistroAcuerdoFacturacion(?string $numRegistroAcuerdoFacturacion): self
{
if ($numRegistroAcuerdoFacturacion !== null && strlen($numRegistroAcuerdoFacturacion) > 15) {
throw new \InvalidArgumentException('NumRegistroAcuerdoFacturacion must not exceed 15 characters');
}
$this->numRegistroAcuerdoFacturacion = $numRegistroAcuerdoFacturacion;
return $this;
}
public function getIdAcuerdoSistemaInformatico(): ?string
{
return $this->idAcuerdoSistemaInformatico;
}
public function setIdAcuerdoSistemaInformatico(?string $idAcuerdoSistemaInformatico): self
{
if ($idAcuerdoSistemaInformatico !== null && strlen($idAcuerdoSistemaInformatico) > 16) {
throw new \InvalidArgumentException('IdAcuerdoSistemaInformatico must not exceed 16 characters');
}
$this->idAcuerdoSistemaInformatico = $idAcuerdoSistemaInformatico;
return $this;
}
public function getTipoHuella(): string
{
return $this->tipoHuella;
}
public function setTipoHuella(string $tipoHuella): self
{
$this->tipoHuella = $tipoHuella;
return $this;
}
public function getHuella(): string
{
return $this->huella;
}
public function setHuella(string $huella): self
{
if (strlen($huella) > 64) {
throw new \InvalidArgumentException('Huella must not exceed 64 characters');
}
$this->huella = $huella;
return $this;
}
public function getSignature(): ?string
{
return $this->signature;
}
public function setSignature(?string $signature): self
{
$this->signature = $signature;
return $this;
}
}

View File

@ -0,0 +1,171 @@
<?php
namespace App\Services\EDocument\Standards\Verifactu\Types;
class SistemaInformatico
{
/** @var string Max length 120 characters */
protected $nombreRazon;
/** @var string|null NIF format */
protected $nif;
/** @var array|null */
protected $idOtro;
/** @var string Max length 30 characters */
protected $nombreSistemaInformatico;
/** @var string Max length 2 characters */
protected $idSistemaInformatico;
/** @var string Max length 50 characters */
protected $version;
/** @var string Max length 100 characters */
protected $numeroInstalacion;
/** @var string 'S' or 'N' */
protected $tipoUsoPosibleSoloVerifactu;
/** @var string 'S' or 'N' */
protected $tipoUsoPosibleMultiOT;
/** @var string 'S' or 'N' */
protected $indicadorMultiplesOT;
public function getNombreRazon(): string
{
return $this->nombreRazon;
}
public function setNombreRazon(string $nombreRazon): self
{
if (strlen($nombreRazon) > 120) {
throw new \InvalidArgumentException('NombreRazon must not exceed 120 characters');
}
$this->nombreRazon = $nombreRazon;
return $this;
}
public function getNif(): ?string
{
return $this->nif;
}
public function setNif(?string $nif): self
{
// TODO: Add NIF validation
$this->nif = $nif;
return $this;
}
public function getIdOtro(): ?array
{
return $this->idOtro;
}
public function setIdOtro(?array $idOtro): self
{
$this->idOtro = $idOtro;
return $this;
}
public function getNombreSistemaInformatico(): string
{
return $this->nombreSistemaInformatico;
}
public function setNombreSistemaInformatico(string $nombreSistemaInformatico): self
{
if (strlen($nombreSistemaInformatico) > 30) {
throw new \InvalidArgumentException('NombreSistemaInformatico must not exceed 30 characters');
}
$this->nombreSistemaInformatico = $nombreSistemaInformatico;
return $this;
}
public function getIdSistemaInformatico(): string
{
return $this->idSistemaInformatico;
}
public function setIdSistemaInformatico(string $idSistemaInformatico): self
{
if (strlen($idSistemaInformatico) > 2) {
throw new \InvalidArgumentException('IdSistemaInformatico must not exceed 2 characters');
}
$this->idSistemaInformatico = $idSistemaInformatico;
return $this;
}
public function getVersion(): string
{
return $this->version;
}
public function setVersion(string $version): self
{
if (strlen($version) > 50) {
throw new \InvalidArgumentException('Version must not exceed 50 characters');
}
$this->version = $version;
return $this;
}
public function getNumeroInstalacion(): string
{
return $this->numeroInstalacion;
}
public function setNumeroInstalacion(string $numeroInstalacion): self
{
if (strlen($numeroInstalacion) > 100) {
throw new \InvalidArgumentException('NumeroInstalacion must not exceed 100 characters');
}
$this->numeroInstalacion = $numeroInstalacion;
return $this;
}
public function getTipoUsoPosibleSoloVerifactu(): string
{
return $this->tipoUsoPosibleSoloVerifactu;
}
public function setTipoUsoPosibleSoloVerifactu(string $value): self
{
if (!in_array($value, ['S', 'N'])) {
throw new \InvalidArgumentException('TipoUsoPosibleSoloVerifactu must be either "S" or "N"');
}
$this->tipoUsoPosibleSoloVerifactu = $value;
return $this;
}
public function getTipoUsoPosibleMultiOT(): string
{
return $this->tipoUsoPosibleMultiOT;
}
public function setTipoUsoPosibleMultiOT(string $value): self
{
if (!in_array($value, ['S', 'N'])) {
throw new \InvalidArgumentException('TipoUsoPosibleMultiOT must be either "S" or "N"');
}
$this->tipoUsoPosibleMultiOT = $value;
return $this;
}
public function getIndicadorMultiplesOT(): string
{
return $this->indicadorMultiplesOT;
}
public function setIndicadorMultiplesOT(string $value): self
{
if (!in_array($value, ['S', 'N'])) {
throw new \InvalidArgumentException('IndicadorMultiplesOT must be either "S" or "N"');
}
$this->indicadorMultiplesOT = $value;
return $this;
}
}

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- editado con XMLSpy v2019 sp1 (x64) (http://www.altova.com) por AEAT (Agencia Estatal de Administracion Tributaria ((AEAT))) -->
<!-- edited with XMLSpy v2009 sp1 (http://www.altova.com) by PC Corporativo (AGENCIA TRIBUTARIA) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sfLRC="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/ConsultaLR.xsd" xmlns:sf="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SuministroInformacion.xsd" targetNamespace="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/ConsultaLR.xsd" elementFormDefault="qualified">
<import namespace="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SuministroInformacion.xsd" schemaLocation="SuministroInformacion.xsd"/>
<!-- edited with XMLSpy v2009 sp1 (http://www.altova.com) by PC Corporativo (AGENCIA TRIBUTARIA) -->
<element name="ConsultaFactuSistemaFacturacion" type="sfLRC:ConsultaFactuSistemaFacturacionType">
<annotation>
<documentation>Servicio de consulta Registros Facturacion</documentation>
</annotation>
</element>
<complexType name="ConsultaFactuSistemaFacturacionType">
<sequence>
<element name="Cabecera" type="sf:CabeceraConsultaSf"/>
<element name="FiltroConsulta" type="sfLRC:LRFiltroRegFacturacionType"/>
</sequence>
</complexType>
<complexType name="LRFiltroRegFacturacionType">
<sequence>
<!-- <element name="PeriodoImputacion" type="sf:PeriodoImputacionType"/> -->
<element name="NumSerieFactura" type="sf:TextoIDFacturaType" minOccurs="0">
<annotation>
<documentation xml:lang="es"> Nº Serie+Nº Factura de la Factura del Emisor.</documentation>
</annotation>
</element>
<element name="Contraparte" type="sf:ContraparteConsultaType" minOccurs="0">
<annotation>
<documentation xml:lang="es">Contraparte del NIF de la cabecera que realiza la consulta.
Obligado si la cosulta la realiza el Destinatario de los registros de facturacion.
Destinatario si la cosulta la realiza el Obligado dde los registros de facturacion.</documentation>
</annotation>
</element>
<element name="FechaExpedicionFactura" type="sf:FechaExpedicionConsultaType" minOccurs="0"/>
<element name="SistemaInformatico" type="sf:SistemaInformaticoType" minOccurs="0"/>
<element name="ClavePaginacion" type="sf:IDFacturaExpedidaBCType" minOccurs="0"/>
</sequence>
</complexType>
</schema>

View File

@ -0,0 +1,823 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- editado con XMLSpy v2019 sp1 (x64) (http://www.altova.com) por AEAT (Agencia Estatal de Administracion Tributaria ((AEAT))) -->
<!-- edited with XMLSpy v2009 sp1 (http://www.altova.com) by PC Corporativo (AGENCIA TRIBUTARIA) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:sf="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/EventosSIF.xsd" targetNamespace="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/EventosSIF.xsd" elementFormDefault="qualified">
<import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
<element name="RegistroEvento">
<complexType>
<sequence>
<element name="IDVersion" type="sf:VersionType"/>
<element name="Evento" type="sf:EventoType"/>
</sequence>
</complexType>
</element>
<complexType name="EventoType">
<sequence>
<element name="SistemaInformatico" type="sf:SistemaInformaticoType"/>
<element name="ObligadoEmision" type="sf:PersonaFisicaJuridicaESType">
<annotation>
<documentation xml:lang="es"> Obligado a expedir la factura. </documentation>
</annotation>
</element>
<element name="EmitidaPorTerceroODestinatario" type="sf:TercerosODestinatarioType" minOccurs="0"/>
<element name="TerceroODestinatario" type="sf:PersonaFisicaJuridicaType" minOccurs="0"/>
<element name="FechaHoraHusoGenEvento" type="dateTime">
<annotation>
<documentation xml:lang="es">Formato: YYYY-MM-DDThh:mm:ssTZD (ej: 2024-01-01T19:20:30+01:00) (ISO 8601)</documentation>
</annotation>
</element>
<element name="TipoEvento" type="sf:TipoEventoType"/>
<element name="DatosPropiosEvento" type="sf:DatosPropiosEventoType" minOccurs="0"/>
<element name="OtrosDatosEvento" type="sf:TextMax100Type" minOccurs="0"/>
<element name="Encadenamiento" type="sf:EncadenamientoType"/>
<element name="TipoHuella" type="sf:TipoHuellaType"/>
<element name="HuellaEvento" type="sf:TextMax64Type"/>
<element ref="ds:Signature"/>
</sequence>
</complexType>
<complexType name="SistemaInformaticoType">
<sequence>
<sequence>
<element name="NombreRazon" type="sf:TextMax120Type"/>
<choice>
<element name="NIF" type="sf:NIFType"/>
<element name="IDOtro" type="sf:IDOtroType"/>
</choice>
</sequence>
<element name="NombreSistemaInformatico" type="sf:TextMax30Type" minOccurs="0"/>
<element name="IdSistemaInformatico" type="sf:TextMax2Type"/>
<element name="Version" type="sf:TextMax50Type"/>
<element name="NumeroInstalacion" type="sf:TextMax100Type"/>
<element name="TipoUsoPosibleSoloVerifactu" type="sf:SiNoType" minOccurs="0"/>
<element name="TipoUsoPosibleMultiOT" type="sf:SiNoType" minOccurs="0"/>
<element name="IndicadorMultiplesOT" type="sf:SiNoType" minOccurs="0"/>
</sequence>
</complexType>
<complexType name="DatosPropiosEventoType">
<choice>
<element name="LanzamientoProcesoDeteccionAnomaliasRegFacturacion" type="sf:LanzamientoProcesoDeteccionAnomaliasRegFacturacionType"/>
<element name="DeteccionAnomaliasRegFacturacion" type="sf:DeteccionAnomaliasRegFacturacionType"/>
<element name="LanzamientoProcesoDeteccionAnomaliasRegEvento" type="sf:LanzamientoProcesoDeteccionAnomaliasRegEventoType"/>
<element name="DeteccionAnomaliasRegEvento" type="sf:DeteccionAnomaliasRegEventoType"/>
<element name="ExportacionRegFacturacionPeriodo" type="sf:ExportacionRegFacturacionPeriodoType"/>
<element name="ExportacionRegEventoPeriodo" type="sf:ExportacionRegEventoPeriodoType"/>
<element name="ResumenEventos" type="sf:ResumenEventosType"/>
</choice>
</complexType>
<complexType name="EncadenamientoType">
<choice>
<element name="PrimerEvento" type="sf:TextMax1Type"/>
<element name="EventoAnterior" type="sf:RegEventoAntType"/>
</choice>
</complexType>
<complexType name="LanzamientoProcesoDeteccionAnomaliasRegFacturacionType">
<sequence>
<element name="RealizadoProcesoSobreIntegridadHuellasRegFacturacion" type="sf:SiNoType"/>
<element name="NumeroDeRegistrosFacturacionProcesadosSobreIntegridadHuellas" type="sf:DigitosMax7Type" minOccurs="0"/>
<element name="RealizadoProcesoSobreIntegridadFirmasRegFacturacion" type="sf:SiNoType"/>
<element name="NumeroDeRegistrosFacturacionProcesadosSobreIntegridadFirmas" type="sf:DigitosMax7Type" minOccurs="0"/>
<element name="RealizadoProcesoSobreTrazabilidadCadenaRegFacturacion" type="sf:SiNoType"/>
<element name="NumeroDeRegistrosFacturacionProcesadosSobreTrazabilidadCadena" type="sf:DigitosMax7Type" minOccurs="0"/>
<element name="RealizadoProcesoSobreTrazabilidadFechasRegFacturacion" type="sf:SiNoType"/>
<element name="NumeroDeRegistrosFacturacionProcesadosSobreTrazabilidadFechas" type="sf:DigitosMax7Type" minOccurs="0"/>
</sequence>
</complexType>
<complexType name="DeteccionAnomaliasRegFacturacionType">
<sequence>
<element name="TipoAnomalia" type="sf:TipoAnomaliaType"/>
<element name="OtrosDatosAnomalia" type="sf:TextMax100Type" minOccurs="0"/>
<element name="RegistroFacturacionAnomalo" type="sf:IDFacturaExpedidaType" minOccurs="0"/>
</sequence>
</complexType>
<complexType name="LanzamientoProcesoDeteccionAnomaliasRegEventoType">
<sequence>
<element name="RealizadoProcesoSobreIntegridadHuellasRegEvento" type="sf:SiNoType"/>
<element name="NumeroDeRegistrosEventoProcesadosSobreIntegridadHuellas" type="sf:DigitosMax5Type" minOccurs="0"/>
<element name="RealizadoProcesoSobreIntegridadFirmasRegEvento" type="sf:SiNoType"/>
<element name="NumeroDeRegistrosEventoProcesadosSobreIntegridadFirmas" type="sf:DigitosMax5Type" minOccurs="0"/>
<element name="RealizadoProcesoSobreTrazabilidadCadenaRegEvento" type="sf:SiNoType"/>
<element name="NumeroDeRegistrosEventoProcesadosSobreTrazabilidadCadena" type="sf:DigitosMax5Type" minOccurs="0"/>
<element name="RealizadoProcesoSobreTrazabilidadFechasRegEvento" type="sf:SiNoType"/>
<element name="NumeroDeRegistrosEventoProcesadosSobreTrazabilidadFechas" type="sf:DigitosMax5Type" minOccurs="0"/>
</sequence>
</complexType>
<complexType name="DeteccionAnomaliasRegEventoType">
<sequence>
<element name="TipoAnomalia" type="sf:TipoAnomaliaType"/>
<element name="OtrosDatosAnomalia" type="sf:TextMax100Type" minOccurs="0"/>
<element name="RegEventoAnomalo" type="sf:RegEventoType" minOccurs="0"/>
</sequence>
</complexType>
<complexType name="ExportacionRegFacturacionPeriodoType">
<sequence>
<element name="FechaHoraHusoInicioPeriodoExport" type="dateTime">
<annotation>
<documentation xml:lang="es">Formato: YYYY-MM-DDThh:mm:ssTZD (ej: 2024-01-01T19:20:30+01:00) (ISO 8601)</documentation>
</annotation>
</element>
<element name="FechaHoraHusoFinPeriodoExport" type="dateTime">
<annotation>
<documentation xml:lang="es">Formato: YYYY-MM-DDThh:mm:ssTZD (ej: 2024-01-01T19:20:30+01:00) (ISO 8601)</documentation>
</annotation>
</element>
<element name="RegistroFacturacionInicialPeriodo" type="sf:IDFacturaExpedidaHuellaType"/>
<element name="RegistroFacturacionFinalPeriodo" type="sf:IDFacturaExpedidaHuellaType"/>
<element name="NumeroDeRegistrosFacturacionAltaExportados" type="sf:DigitosMax9Type"/>
<element name="SumaCuotaTotalAlta" type="sf:ImporteSgn12.2Type"/>
<element name="SumaImporteTotalAlta" type="sf:ImporteSgn12.2Type"/>
<element name="NumeroDeRegistrosFacturacionAnulacionExportados" type="sf:DigitosMax9Type"/>
<element name="RegistrosFacturacionExportadosDejanDeConservarse" type="sf:SiNoType"/>
</sequence>
</complexType>
<complexType name="ExportacionRegEventoPeriodoType">
<sequence>
<element name="FechaHoraHusoInicioPeriodoExport" type="dateTime">
<annotation>
<documentation xml:lang="es">Formato: YYYY-MM-DDThh:mm:ssTZD (ej: 2024-01-01T19:20:30+01:00) (ISO 8601)</documentation>
</annotation>
</element>
<element name="FechaHoraHusoFinPeriodoExport" type="dateTime">
<annotation>
<documentation xml:lang="es">Formato: YYYY-MM-DDThh:mm:ssTZD (ej: 2024-01-01T19:20:30+01:00) (ISO 8601)</documentation>
</annotation>
</element>
<element name="RegistroEventoInicialPeriodo" type="sf:RegEventoType"/>
<element name="RegistroEventoFinalPeriodo" type="sf:RegEventoType"/>
<element name="NumeroDeRegEventoExportados" type="sf:DigitosMax7Type"/>
<element name="RegEventoExportadosDejanDeConservarse" type="sf:SiNoType"/>
</sequence>
</complexType>
<complexType name="ResumenEventosType">
<sequence>
<element name="TipoEvento" type="sf:TipoEventoAgrType" maxOccurs="20"/>
<element name="RegistroFacturacionInicialPeriodo" type="sf:IDFacturaExpedidaHuellaType" minOccurs="0"/>
<element name="RegistroFacturacionFinalPeriodo" type="sf:IDFacturaExpedidaHuellaType" minOccurs="0"/>
<element name="NumeroDeRegistrosFacturacionAltaGenerados" type="sf:DigitosMax6Type"/>
<element name="SumaCuotaTotalAlta" type="sf:ImporteSgn12.2Type"/>
<element name="SumaImporteTotalAlta" type="sf:ImporteSgn12.2Type"/>
<element name="NumeroDeRegistrosFacturacionAnulacionGenerados" type="sf:DigitosMax6Type"/>
</sequence>
</complexType>
<complexType name="RegEventoType">
<sequence>
<element name="TipoEvento" type="sf:TipoEventoType"/>
<element name="FechaHoraHusoEvento" type="dateTime">
<annotation>
<documentation xml:lang="es">Formato: YYYY-MM-DDThh:mm:ssTZD (ej: 2024-01-01T19:20:30+01:00) (ISO 8601)</documentation>
</annotation>
</element>
<element name="HuellaEvento" type="sf:TextMax64Type"/>
</sequence>
</complexType>
<complexType name="RegEventoAntType">
<sequence>
<element name="TipoEvento" type="sf:TipoEventoType"/>
<element name="FechaHoraHusoGenEvento" type="dateTime">
<annotation>
<documentation xml:lang="es">Formato: YYYY-MM-DDThh:mm:ssTZD (ej: 2024-01-01T19:20:30+01:00) (ISO 8601)</documentation>
</annotation>
</element>
<element name="HuellaEvento" type="sf:TextMax64Type"/>
</sequence>
</complexType>
<complexType name="TipoEventoAgrType">
<sequence>
<element name="TipoEvento" type="sf:TipoEventoType"/>
<element name="NumeroDeEventos" type="sf:DigitosMax4Type"/>
</sequence>
</complexType>
<!-- Datos de persona Física o jurídica : Denominación, representación, identificación (NIF) -->
<complexType name="PersonaFisicaJuridicaESType">
<annotation>
<documentation xml:lang="es">Datos de una persona física o jurídica Española con un NIF asociado</documentation>
</annotation>
<sequence>
<element name="NombreRazon" type="sf:TextMax120Type"/>
<element name="NIF" type="sf:NIFType"/>
</sequence>
</complexType>
<simpleType name="NIFType">
<annotation>
<documentation xml:lang="es">NIF</documentation>
</annotation>
<restriction base="string">
<length value="9"/>
</restriction>
</simpleType>
<!-- Datos de persona Física o jurídica : Denominación, representación, identificación (NIF/Otro) -->
<complexType name="PersonaFisicaJuridicaType">
<annotation>
<documentation xml:lang="es">Datos de una persona física o jurídica Española o Extranjera</documentation>
</annotation>
<sequence>
<element name="NombreRazon" type="sf:TextMax120Type"/>
<choice>
<element name="NIF" type="sf:NIFType"/>
<element name="IDOtro" type="sf:IDOtroType"/>
</choice>
</sequence>
</complexType>
<!-- Datos de persona Física o jurídica : Denominación, representación, identificación (NIF/Otro) -->
<complexType name="IDOtroType">
<annotation>
<documentation xml:lang="es">Identificador de persona Física o jurídica distinto del NIF
(Código pais, Tipo de Identificador, y hasta 15 caractéres)
No se permite CodigoPais=ES e IDType=01-NIFContraparte
para ese caso, debe utilizarse NIF en lugar de IDOtro.
</documentation>
</annotation>
<sequence>
<element name="CodigoPais" type="sf:CountryType2" minOccurs="0"/>
<element name="IDType" type="sf:PersonaFisicaJuridicaIDTypeType"/>
<element name="ID" type="sf:TextMax20Type"/>
</sequence>
</complexType>
<!-- Tercero o Destinatario -->
<simpleType name="TercerosODestinatarioType">
<restriction base="string">
<enumeration value="D">
<annotation>
<documentation xml:lang="es">Destinatario</documentation>
</annotation>
</enumeration>
<enumeration value="T">
<annotation>
<documentation xml:lang="es">Tercero</documentation>
</annotation>
</enumeration>
</restriction>
</simpleType>
<simpleType name="SiNoType">
<restriction base="string">
<enumeration value="S"/>
<enumeration value="N"/>
</restriction>
</simpleType>
<simpleType name="VersionType">
<restriction base="string">
<enumeration value="1.0"/>
</restriction>
</simpleType>
<!-- Cadena de 120 caracteres -->
<simpleType name="TextMax120Type">
<restriction base="string">
<maxLength value="120"/>
</restriction>
</simpleType>
<!-- Cadena de 100 caracteres -->
<simpleType name="TextMax100Type">
<restriction base="string">
<maxLength value="100"/>
</restriction>
</simpleType>
<!-- Cadena de 64 caracteres -->
<simpleType name="TextMax64Type">
<restriction base="string">
<maxLength value="64"/>
</restriction>
</simpleType>
<!-- Cadena de 60 caracteres -->
<simpleType name="TextMax60Type">
<restriction base="string">
<maxLength value="60"/>
</restriction>
</simpleType>
<!-- Cadena de 50 caracteres -->
<simpleType name="TextMax50Type">
<restriction base="string">
<maxLength value="50"/>
</restriction>
</simpleType>
<!-- Cadena de 30 caracteres -->
<simpleType name="TextMax30Type">
<restriction base="string">
<maxLength value="30"/>
</restriction>
</simpleType>
<!-- Cadena de 20 caracteres -->
<simpleType name="TextMax20Type">
<restriction base="string">
<maxLength value="20"/>
</restriction>
</simpleType>
<!-- Cadena de 2 caracteres -->
<simpleType name="TextMax2Type">
<restriction base="string">
<maxLength value="2"/>
</restriction>
</simpleType>
<!-- Cadena de 1 caracteres -->
<simpleType name="TextMax1Type">
<restriction base="string">
<maxLength value="1"/>
</restriction>
</simpleType>
<!-- Definición de un tipo simple restringido a 9 dígitos -->
<simpleType name="DigitosMax9Type">
<restriction base="string">
<maxLength value="9"/>
<pattern value="\d{1,9}"/>
</restriction>
</simpleType>
<!-- Definición de un tipo simple restringido a 7 dígitos -->
<simpleType name="DigitosMax7Type">
<restriction base="string">
<maxLength value="7"/>
<pattern value="\d{1,7}"/>
</restriction>
</simpleType>
<!-- Definición de un tipo simple restringido a 6 dígitos -->
<simpleType name="DigitosMax6Type">
<restriction base="string">
<maxLength value="6"/>
<pattern value="\d{1,6}"/>
</restriction>
</simpleType>
<!-- Definición de un tipo simple restringido a 5 dígitos -->
<simpleType name="DigitosMax5Type">
<restriction base="string">
<maxLength value="5"/>
<pattern value="\d{1,5}"/>
</restriction>
</simpleType>
<!-- Definición de un tipo simple restringido a 4 dígitos -->
<simpleType name="DigitosMax4Type">
<restriction base="string">
<maxLength value="4"/>
<pattern value="\d{1,4}"/>
</restriction>
</simpleType>
<!-- Fecha (dd-mm-yyyy) -->
<simpleType name="fecha">
<restriction base="string">
<length value="10"/>
<pattern value="\d{2,2}-\d{2,2}-\d{4,4}"/>
</restriction>
</simpleType>
<!-- Importe de 15 dígitos (12+2) "." como separador decimal -->
<simpleType name="ImporteSgn12.2Type">
<restriction base="string">
<pattern value="(\+|-)?\d{1,12}(\.\d{0,2})?"/>
</restriction>
</simpleType>
<!-- Tipo de identificador fiscal de persona Física o jurídica -->
<simpleType name="PersonaFisicaJuridicaIDTypeType">
<restriction base="string">
<enumeration value="02">
<annotation>
<documentation xml:lang="es">NIF-IVA</documentation>
</annotation>
</enumeration>
<enumeration value="03">
<annotation>
<documentation xml:lang="es">Pasaporte</documentation>
</annotation>
</enumeration>
<enumeration value="04">
<annotation>
<documentation xml:lang="es">IDEnPaisResidencia</documentation>
</annotation>
</enumeration>
<enumeration value="05">
<annotation>
<documentation xml:lang="es">Certificado Residencia</documentation>
</annotation>
</enumeration>
<enumeration value="06">
<annotation>
<documentation xml:lang="es">Otro documento Probatorio</documentation>
</annotation>
</enumeration>
<enumeration value="07">
<annotation>
<documentation xml:lang="es">No Censado</documentation>
</annotation>
</enumeration>
</restriction>
</simpleType>
<!-- Tipo Hash -->
<simpleType name="TipoHuellaType">
<restriction base="string">
<enumeration value="01">
<annotation>
<documentation xml:lang="es">SHA-256</documentation>
</annotation>
</enumeration>
</restriction>
</simpleType>
<simpleType name="TipoEventoType">
<restriction base="string">
<enumeration value="01">
<annotation>
<documentation xml:lang="es">Inicio del funcionamiento del sistema informático como «NO VERI*FACTU».</documentation>
</annotation>
</enumeration>
<enumeration value="02">
<annotation>
<documentation xml:lang="es">Fin del funcionamiento del sistema informático como «NO VERI*FACTU».</documentation>
</annotation>
</enumeration>
<enumeration value="03">
<annotation>
<documentation xml:lang="es">Lanzamiento del proceso de detección de anomalías en los registros de facturación.</documentation>
</annotation>
</enumeration>
<enumeration value="04">
<annotation>
<documentation xml:lang="es">Detección de anomalías en la integridad, inalterabilidad y trazabilidad de registros de facturación.</documentation>
</annotation>
</enumeration>
<enumeration value="05">
<annotation>
<documentation xml:lang="es">Lanzamiento del proceso de detección de anomalías en los registros de evento.</documentation>
</annotation>
</enumeration>
<enumeration value="06">
<annotation>
<documentation xml:lang="es">Detección de anomalías en la integridad, inalterabilidad y trazabilidad de registros de evento.</documentation>
</annotation>
</enumeration>
<enumeration value="07">
<annotation>
<documentation xml:lang="es">Restauración de copia de seguridad, cuando ésta se gestione desde el propio sistema informático de facturación.</documentation>
</annotation>
</enumeration>
<enumeration value="08">
<annotation>
<documentation xml:lang="es">Exportación de registros de facturación generados en un periodo.</documentation>
</annotation>
</enumeration>
<enumeration value="09">
<annotation>
<documentation xml:lang="es">Exportación de registros de evento generados en un periodo.</documentation>
</annotation>
</enumeration>
<enumeration value="10">
<annotation>
<documentation xml:lang="es">Registro resumen de eventos</documentation>
</annotation>
</enumeration>
<enumeration value="90">
<annotation>
<documentation xml:lang="es">Otros tipos de eventos a registrar voluntariamente por la persona o entidad productora del sistema informático.
</documentation>
</annotation>
</enumeration>
</restriction>
</simpleType>
<simpleType name="TipoAnomaliaType">
<restriction base="string">
<enumeration value="01">
<annotation>
<documentation xml:lang="es">Integridad-huella</documentation>
</annotation>
</enumeration>
<enumeration value="02">
<annotation>
<documentation xml:lang="es">Integridad-firma</documentation>
</annotation>
</enumeration>
<enumeration value="03">
<annotation>
<documentation xml:lang="es">Integridad - Otros</documentation>
</annotation>
</enumeration>
<enumeration value="04">
<annotation>
<documentation xml:lang="es">Trazabilidad-cadena-registro - Reg. no primero pero con reg. anterior no anotado o inexistente</documentation>
</annotation>
</enumeration>
<enumeration value="05">
<annotation>
<documentation xml:lang="es">Trazabilidad-cadena-registro - Reg. no último pero con reg. posterior no anotado o inexistente</documentation>
</annotation>
</enumeration>
<enumeration value="06">
<annotation>
<documentation xml:lang="es">Trazabilidad-cadena-registro - Otros</documentation>
</annotation>
</enumeration>
<enumeration value="07">
<annotation>
<documentation xml:lang="es">Trazabilidad-cadena-huella - Huella del reg. no se corresponde con la 'huella del reg. anterior' almacenada en el registro posterior</documentation>
</annotation>
</enumeration>
<enumeration value="08">
<annotation>
<documentation xml:lang="es">Trazabilidad-cadena-huella - Campo 'huella del reg. anterior' no se corresponde con la huella del reg. anterior</documentation>
</annotation>
</enumeration>
<enumeration value="09">
<annotation>
<documentation xml:lang="es">Trazabilidad-cadena-huella - Otros</documentation>
</annotation>
</enumeration>
<enumeration value="10">
<annotation>
<documentation xml:lang="es">Trazabilidad-cadena - Otros</documentation>
</annotation>
</enumeration>
<enumeration value="11">
<annotation>
<documentation xml:lang="es">Trazabilidad-fechas - Fecha-hora anterior a la fecha del reg. anterior</documentation>
</annotation>
</enumeration>
<enumeration value="12">
<annotation>
<documentation xml:lang="es">Trazabilidad-fechas - Fecha-hora posterior a la fecha del reg. posterior</documentation>
</annotation>
</enumeration>
<enumeration value="13">
<annotation>
<documentation xml:lang="es">Trazabilidad-fechas - Reg. con fecha-hora de generación posterior a la fecha-hora actual del sistema</documentation>
</annotation>
</enumeration>
<enumeration value="14">
<annotation>
<documentation xml:lang="es">Trazabilidad-fechas - Otros</documentation>
</annotation>
</enumeration>
<enumeration value="15">
<annotation>
<documentation xml:lang="es">Trazabilidad - Otros</documentation>
</annotation>
</enumeration>
<enumeration value="90">
<annotation>
<documentation xml:lang="es">Otros</documentation>
</annotation>
</enumeration>
</restriction>
</simpleType>
<complexType name="IDFacturaExpedidaType">
<annotation>
<documentation xml:lang="es"> Datos de identificación de factura expedida para operaciones de consulta</documentation>
</annotation>
<sequence>
<element name="IDEmisorFactura" type="sf:NIFType"/>
<element name="NumSerieFactura" type="sf:TextMax60Type"/>
<element name="FechaExpedicionFactura" type="sf:fecha"/>
</sequence>
</complexType>
<complexType name="IDFacturaExpedidaHuellaType">
<annotation>
<documentation xml:lang="es">Datos de encadenamiento </documentation>
</annotation>
<sequence>
<element name="IDEmisorFactura" type="sf:NIFType"/>
<element name="NumSerieFactura" type="sf:TextMax60Type"/>
<element name="FechaExpedicionFactura" type="sf:fecha"/>
<element name="Huella" type="sf:TextMax64Type"/>
</sequence>
</complexType>
<!-- ISO 3166-1 alpha-2 codes -->
<simpleType name="CountryType2">
<restriction base="string">
<enumeration value="AF"/>
<enumeration value="AL"/>
<enumeration value="DE"/>
<enumeration value="AD"/>
<enumeration value="AO"/>
<enumeration value="AI"/>
<enumeration value="AQ"/>
<enumeration value="AG"/>
<enumeration value="SA"/>
<enumeration value="DZ"/>
<enumeration value="AR"/>
<enumeration value="AM"/>
<enumeration value="AW"/>
<enumeration value="AU"/>
<enumeration value="AT"/>
<enumeration value="AZ"/>
<enumeration value="BS"/>
<enumeration value="BH"/>
<enumeration value="BD"/>
<enumeration value="BB"/>
<enumeration value="BE"/>
<enumeration value="BZ"/>
<enumeration value="BJ"/>
<enumeration value="BM"/>
<enumeration value="BY"/>
<enumeration value="BO"/>
<enumeration value="BA"/>
<enumeration value="BW"/>
<enumeration value="BV"/>
<enumeration value="BR"/>
<enumeration value="BN"/>
<enumeration value="BG"/>
<enumeration value="BF"/>
<enumeration value="BI"/>
<enumeration value="BT"/>
<enumeration value="CV"/>
<enumeration value="KY"/>
<enumeration value="KH"/>
<enumeration value="CM"/>
<enumeration value="CA"/>
<enumeration value="CF"/>
<enumeration value="CC"/>
<enumeration value="CO"/>
<enumeration value="KM"/>
<enumeration value="CG"/>
<enumeration value="CD"/>
<enumeration value="CK"/>
<enumeration value="KP"/>
<enumeration value="KR"/>
<enumeration value="CI"/>
<enumeration value="CR"/>
<enumeration value="HR"/>
<enumeration value="CU"/>
<enumeration value="TD"/>
<enumeration value="CZ"/>
<enumeration value="CL"/>
<enumeration value="CN"/>
<enumeration value="CY"/>
<enumeration value="CW"/>
<enumeration value="DK"/>
<enumeration value="DM"/>
<enumeration value="DO"/>
<enumeration value="EC"/>
<enumeration value="EG"/>
<enumeration value="AE"/>
<enumeration value="ER"/>
<enumeration value="SK"/>
<enumeration value="SI"/>
<enumeration value="ES"/>
<enumeration value="US"/>
<enumeration value="EE"/>
<enumeration value="ET"/>
<enumeration value="FO"/>
<enumeration value="PH"/>
<enumeration value="FI"/>
<enumeration value="FJ"/>
<enumeration value="FR"/>
<enumeration value="GA"/>
<enumeration value="GM"/>
<enumeration value="GE"/>
<enumeration value="GS"/>
<enumeration value="GH"/>
<enumeration value="GI"/>
<enumeration value="GD"/>
<enumeration value="GR"/>
<enumeration value="GL"/>
<enumeration value="GU"/>
<enumeration value="GT"/>
<enumeration value="GG"/>
<enumeration value="GN"/>
<enumeration value="GQ"/>
<enumeration value="GW"/>
<enumeration value="GY"/>
<enumeration value="HT"/>
<enumeration value="HM"/>
<enumeration value="HN"/>
<enumeration value="HK"/>
<enumeration value="HU"/>
<enumeration value="IN"/>
<enumeration value="ID"/>
<enumeration value="IR"/>
<enumeration value="IQ"/>
<enumeration value="IE"/>
<enumeration value="IM"/>
<enumeration value="IS"/>
<enumeration value="IL"/>
<enumeration value="IT"/>
<enumeration value="JM"/>
<enumeration value="JP"/>
<enumeration value="JE"/>
<enumeration value="JO"/>
<enumeration value="KZ"/>
<enumeration value="KE"/>
<enumeration value="KG"/>
<enumeration value="KI"/>
<enumeration value="KW"/>
<enumeration value="LA"/>
<enumeration value="LS"/>
<enumeration value="LV"/>
<enumeration value="LB"/>
<enumeration value="LR"/>
<enumeration value="LY"/>
<enumeration value="LI"/>
<enumeration value="LT"/>
<enumeration value="LU"/>
<enumeration value="XG"/>
<enumeration value="MO"/>
<enumeration value="MK"/>
<enumeration value="MG"/>
<enumeration value="MY"/>
<enumeration value="MW"/>
<enumeration value="MV"/>
<enumeration value="ML"/>
<enumeration value="MT"/>
<enumeration value="FK"/>
<enumeration value="MP"/>
<enumeration value="MA"/>
<enumeration value="MH"/>
<enumeration value="MU"/>
<enumeration value="MR"/>
<enumeration value="YT"/>
<enumeration value="UM"/>
<enumeration value="MX"/>
<enumeration value="FM"/>
<enumeration value="MD"/>
<enumeration value="MC"/>
<enumeration value="MN"/>
<enumeration value="ME"/>
<enumeration value="MS"/>
<enumeration value="MZ"/>
<enumeration value="MM"/>
<enumeration value="NA"/>
<enumeration value="NR"/>
<enumeration value="CX"/>
<enumeration value="NP"/>
<enumeration value="NI"/>
<enumeration value="NE"/>
<enumeration value="NG"/>
<enumeration value="NU"/>
<enumeration value="NF"/>
<enumeration value="NO"/>
<enumeration value="NC"/>
<enumeration value="NZ"/>
<enumeration value="IO"/>
<enumeration value="OM"/>
<enumeration value="NL"/>
<enumeration value="BQ"/>
<enumeration value="PK"/>
<enumeration value="PW"/>
<enumeration value="PA"/>
<enumeration value="PG"/>
<enumeration value="PY"/>
<enumeration value="PE"/>
<enumeration value="PN"/>
<enumeration value="PF"/>
<enumeration value="PL"/>
<enumeration value="PT"/>
<enumeration value="PR"/>
<enumeration value="QA"/>
<enumeration value="GB"/>
<enumeration value="RW"/>
<enumeration value="RO"/>
<enumeration value="RU"/>
<enumeration value="SB"/>
<enumeration value="SV"/>
<enumeration value="WS"/>
<enumeration value="AS"/>
<enumeration value="KN"/>
<enumeration value="SM"/>
<enumeration value="SX"/>
<enumeration value="PM"/>
<enumeration value="VC"/>
<enumeration value="SH"/>
<enumeration value="LC"/>
<enumeration value="ST"/>
<enumeration value="SN"/>
<enumeration value="RS"/>
<enumeration value="SC"/>
<enumeration value="SL"/>
<enumeration value="SG"/>
<enumeration value="SY"/>
<enumeration value="SO"/>
<enumeration value="LK"/>
<enumeration value="SZ"/>
<enumeration value="ZA"/>
<enumeration value="SD"/>
<enumeration value="SS"/>
<enumeration value="SE"/>
<enumeration value="CH"/>
<enumeration value="SR"/>
<enumeration value="TH"/>
<enumeration value="TW"/>
<enumeration value="TZ"/>
<enumeration value="TJ"/>
<enumeration value="PS"/>
<enumeration value="TF"/>
<enumeration value="TL"/>
<enumeration value="TG"/>
<enumeration value="TK"/>
<enumeration value="TO"/>
<enumeration value="TT"/>
<enumeration value="TN"/>
<enumeration value="TC"/>
<enumeration value="TM"/>
<enumeration value="TR"/>
<enumeration value="TV"/>
<enumeration value="UA"/>
<enumeration value="UG"/>
<enumeration value="UY"/>
<enumeration value="UZ"/>
<enumeration value="VU"/>
<enumeration value="VA"/>
<enumeration value="VE"/>
<enumeration value="VN"/>
<enumeration value="VG"/>
<enumeration value="VI"/>
<enumeration value="WF"/>
<enumeration value="YE"/>
<enumeration value="DJ"/>
<enumeration value="ZM"/>
<enumeration value="ZW"/>
<enumeration value="QU"/>
<enumeration value="XB"/>
<enumeration value="XU"/>
<enumeration value="XN"/>
</restriction>
</simpleType>
</schema>

View File

@ -0,0 +1,195 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- editado con XMLSpy v2019 sp1 (x64) (http://www.altova.com) por AEAT (Agencia Estatal de Administracion Tributaria ((AEAT))) -->
<!-- edited with XMLSpy v2009 sp1 (http://www.altova.com) by PC Corporativo (AGENCIA TRIBUTARIA) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sfLRRC="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/RespuestaConsultaLR.xsd" xmlns:sf="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SuministroInformacion.xsd" targetNamespace="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/RespuestaConsultaLR.xsd" elementFormDefault="qualified">
<import namespace="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SuministroInformacion.xsd" schemaLocation="SuministroInformacion.xsd"/>
<!-- edited with XMLSpy v2009 sp1 (http://www.altova.com) by PC Corporativo (AGENCIA TRIBUTARIA) -->
<element name="RespuestaConsultaFactuSistemaFacturacion" type="sfLRRC:RespuestaConsultaFactuSistemaFacturacionType">
<annotation>
<documentation>Servicio de consulta de regIstros de facturacion</documentation>
</annotation>
</element>
<complexType name="RespuestaConsultaFactuSistemaFacturacionType">
<complexContent>
<extension base="sfLRRC:RespuestaConsultaType">
<sequence>
<element name="RegistroRespuestaConsultaFactuSistemaFacturacion" type="sfLRRC:RegistroRespuestaConsultaRegFacturacionType" minOccurs="0" maxOccurs="10000"/>
<element name="ClavePaginacion" type="sf:IDFacturaExpedidaBCType" minOccurs="0"/>
</sequence>
</extension>
</complexContent>
</complexType>
<complexType name="EstadoRegFactuType">
<sequence>
<element name="TimestampUltimaModificacion" type="dateTime"/>
<element name="EstadoRegistro" type="sfLRRC:EstadoRegistroType">
<annotation>
<documentation xml:lang="es">
Estado del registro almacenado en el sistema. Los estados posibles son: Correcta, AceptadaConErrores y Anulada
</documentation>
</annotation>
</element>
<element name="CodigoErrorRegistro" type="sfLRRC:ErrorDetalleType" minOccurs="0">
<annotation>
<documentation xml:lang="es">
Código del error de registro, en su caso.
</documentation>
</annotation>
</element>
<element name="DescripcionErrorRegistro" type="sf:TextMax500Type" minOccurs="0">
<annotation>
<documentation xml:lang="es">
Descripción detallada del error de registro, en su caso.
</documentation>
</annotation>
</element>
</sequence>
</complexType>
<complexType name="RegistroRespuestaConsultaRegFacturacionType">
<sequence>
<element name="IDFactura" type="sf:IDFacturaExpedidaType"/>
<element name="DatosRegistroFacturacion" type="sfLRRC:RespuestaDatosRegistroFacturacionType"/>
<element name="DatosPresentacion" type="sf:DatosPresentacion2Type" minOccurs="0"/>
<element name="EstadoRegistro" type="sfLRRC:EstadoRegFactuType" />
</sequence>
</complexType>
<complexType name="RespuestaConsultaType">
<sequence>
<element name="Cabecera" type="sf:CabeceraConsultaSf"/>
<element name="PeriodoImputacion">
<complexType>
<annotation>
<documentation xml:lang="es"> Período al que corresponden los apuntes. todos los apuntes deben corresponder al mismo período impositivo </documentation>
</annotation>
<sequence>
<element name="Ejercicio" type="sf:YearType"/>
<element name="Periodo" type="sf:TipoPeriodoType"/>
</sequence>
</complexType>
</element>
<element name="IndicadorPaginacion" type="sfLRRC:IndicadorPaginacionType"/>
<element name="ResultadoConsulta" type="sfLRRC:ResultadoConsultaType"/>
</sequence>
</complexType>
<!-- Datos del registro de facturacion -->
<complexType name="RespuestaDatosRegistroFacturacionType">
<annotation>
<documentation xml:lang="es"> Apunte correspondiente al libro de facturas expedidas. </documentation>
</annotation>
<sequence>
<element name="RefExterna" type="sf:TextMax70Type" minOccurs="0"/>
<element name="Subsanacion" type="sf:SubsanacionType" minOccurs="0"/>
<element name="RechazoPrevio" type="sf:RechazoPrevioType" minOccurs="0"/>
<element name="SinRegistroPrevio" type="sf:SinRegistroPrevioType" minOccurs="0"/>
<element name="GeneradoPor" type="sf:GeneradoPorType" minOccurs="0"/>
<element name="Generador" type="sf:PersonaFisicaJuridicaType" minOccurs="0"/>
<element name="TipoFactura" type="sf:ClaveTipoFacturaType" minOccurs="0">
<annotation>
<documentation xml:lang="es"> Clave del tipo de factura </documentation>
</annotation>
</element>
<element name="TipoRectificativa" type="sf:ClaveTipoRectificativaType" minOccurs="0">
<annotation>
<documentation xml:lang="es"> Identifica si el tipo de factura rectificativa es por sustitución o por diferencia </documentation>
</annotation>
</element>
<element name="FacturasRectificadas" minOccurs="0">
<complexType>
<annotation>
<documentation xml:lang="es">El ID de las facturas rectificadas, únicamente se rellena en el caso de rectificación de facturas</documentation>
</annotation>
<sequence>
<element name="IDFacturaRectificada" type="sf:IDFacturaARType" maxOccurs="1000"/>
</sequence>
</complexType>
</element>
<element name="FacturasSustituidas" minOccurs="0">
<complexType>
<annotation>
<documentation xml:lang="es">El ID de las facturas sustituidas, únicamente se rellena en el caso de facturas sustituidas</documentation>
</annotation>
<sequence>
<element name="IDFacturaSustituida" type="sf:IDFacturaARType" maxOccurs="1000"/>
</sequence>
</complexType>
</element>
<element name="ImporteRectificacion" type="sf:DesgloseRectificacionType" minOccurs="0"/>
<element name="FechaOperacion" type="sf:fecha" minOccurs="0"/>
<element name="DescripcionOperacion" type="sf:TextMax500Type" minOccurs="0"/>
<element name="FacturaSimplificadaArt7273" type="sf:SimplificadaCualificadaType" minOccurs="0"/>
<element name="FacturaSinIdentifDestinatarioArt61d" type="sf:CompletaSinDestinatarioType" minOccurs="0"/>
<element name="Macrodato" type="sf:MacrodatoType" minOccurs="0"/>
<element name="EmitidaPorTerceroODestinatario" type="sf:TercerosODestinatarioType" minOccurs="0"/>
<element name="Tercero" type="sf:PersonaFisicaJuridicaType" minOccurs="0">
<annotation>
<documentation xml:lang="es"> Tercero que expida la factura y/o genera el registro de alta. </documentation>
</annotation>
</element>
<element name="Destinatarios" minOccurs="0">
<complexType>
<annotation>
<documentation xml:lang="es">Contraparte de la operación. Cliente</documentation>
</annotation>
<sequence>
<element name="IDDestinatario" type="sf:PersonaFisicaJuridicaType" maxOccurs="1000"/>
</sequence>
</complexType>
</element>
<element name="Cupon" type="sf:CuponType" minOccurs="0"/>
<element name="Desglose" type="sf:DesgloseType" minOccurs="0"/>
<element name="CuotaTotal" type="sf:ImporteSgn12.2Type" minOccurs="0"/>
<element name="ImporteTotal" type="sf:ImporteSgn12.2Type" minOccurs="0"/>
<element name="Encadenamiento" minOccurs="0">
<complexType>
<choice>
<element name="PrimerRegistro" type="sf:PrimerRegistroCadenaType"/>
<element name="RegistroAnterior" type="sf:EncadenamientoFacturaAnteriorType"/>
</choice>
</complexType>
</element>
<element name="FechaHoraHusoGenRegistro" type="dateTime" minOccurs="0"/>
<element name="NumRegistroAcuerdoFacturacion" type="sf:TextMax15Type" minOccurs="0"/>
<element name="IdAcuerdoSistemaInformatico" type="sf:TextMax16Type" minOccurs="0"/>
<element name="TipoHuella" type="sf:TipoHuellaType" minOccurs="0"/>
<element name="Huella" type="sf:TextMax64Type" minOccurs="0"/>
<element name="NifRepresentante" type="sf:NIFType" minOccurs="0"/>
<element name="FechaFinVeriFactu" type="sf:fecha" minOccurs="0"/>
<element name="Incidencia" type="sf:IncidenciaType" minOccurs="0"/>
</sequence>
</complexType>
<simpleType name="IndicadorPaginacionType">
<restriction base="string">
<enumeration value="S"/>
<enumeration value="N"/>
</restriction>
</simpleType>
<simpleType name="ResultadoConsultaType">
<restriction base="string">
<enumeration value="ConDatos"/>
<enumeration value="SinDatos"/>
</restriction>
</simpleType>
<simpleType name="ErrorDetalleType">
<restriction base="integer"/>
</simpleType>
<!-- Estado del registro almacenado en el sistema -->
<simpleType name="EstadoRegistroType">
<restriction base="string">
<enumeration value="Correcta">
<annotation>
<documentation xml:lang="es">El registro se almacenado sin errores</documentation>
</annotation>
</enumeration>
<enumeration value="AceptadaConErrores">
<annotation>
<documentation xml:lang="es">El registro se almacenado tiene algunos errores. Ver detalle del error</documentation>
</annotation>
</enumeration>
<enumeration value="Anulada">
<annotation>
<documentation xml:lang="es">El registro almacenado ha sido anulado</documentation>
</annotation>
</enumeration>
</restriction>
</simpleType>
</schema>

View File

@ -0,0 +1,139 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- editado con XMLSpy v2019 sp1 (x64) (http://www.altova.com) por Puesto de Trabajo (Agencia Estatal de Administracion Tributaria ((AEAT))) -->
<!-- edited with XMLSpy v2009 sp1 (http://www.altova.com) by PC Corporativo (AGENCIA TRIBUTARIA) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sfR="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/RespuestaSuministro.xsd" xmlns:sf="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SuministroInformacion.xsd" xmlns:sfLR="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SuministroLR.xsd" targetNamespace="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/RespuestaSuministro.xsd" elementFormDefault="qualified">
<import namespace="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SuministroInformacion.xsd" schemaLocation="SuministroInformacion.xsd"/>
<import namespace="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SuministroLR.xsd" schemaLocation="SuministroLR.xsd"/>
<element name="RespuestaRegFactuSistemaFacturacion" type="sfR:RespuestaRegFactuSistemaFacturacionType"/>
<complexType name="RespuestaBaseType">
<sequence>
<element name="CSV" type="string" minOccurs="0">
<annotation>
<documentation xml:lang="es"> CSV asociado al envío generado por AEAT. Solo se genera si no hay rechazo del envio</documentation>
</annotation>
</element>
<element name="DatosPresentacion" type="sf:DatosPresentacionType" minOccurs="0">
<annotation>
<documentation xml:lang="es"> Se devuelven datos de la presentacion realizada. Solo se genera si no hay rechazo del envio </documentation>
</annotation>
</element>
<element name="Cabecera" type="sf:CabeceraType">
<annotation>
<documentation xml:lang="es"> Se devuelve la cabecera que se incluyó en el envío. </documentation>
</annotation>
</element>
<element name="TiempoEsperaEnvio" type="sf:Tipo6Type"/>
<element name="EstadoEnvio" type="sfR:EstadoEnvioType">
<annotation>
<documentation xml:lang="es">
Estado del envío en conjunto.
Si los datos de cabecera y todos los registros son correctos,el estado es correcto.
En caso de estructura y cabecera correctos donde todos los registros son incorrectos, el estado es incorrecto
En caso de estructura y cabecera correctos con al menos un registro incorrecto, el estado global es parcialmente correcto.
</documentation>
</annotation>
</element>
</sequence>
</complexType>
<complexType name="RespuestaRegFactuSistemaFacturacionType">
<annotation>
<documentation xml:lang="es"> Respuesta a un envío de registro de facturacion</documentation>
</annotation>
<complexContent>
<extension base="sfR:RespuestaBaseType">
<sequence>
<element name="RespuestaLinea" type="sfR:RespuestaExpedidaType" minOccurs="0" maxOccurs="1000">
<annotation>
<documentation xml:lang="es">
Estado detallado de cada línea del suministro.
</documentation>
</annotation>
</element>
</sequence>
</extension>
</complexContent>
</complexType>
<complexType name="RespuestaExpedidaType">
<annotation>
<documentation xml:lang="es"> Respuesta a un envío </documentation>
</annotation>
<sequence>
<element name="IDFactura" type="sf:IDFacturaExpedidaType">
<annotation>
<documentation xml:lang="es"> ID Factura Expedida </documentation>
</annotation>
</element>
<element name="Operacion" type="sf:OperacionType"/>
<element name="RefExterna" type="sf:TextMax70Type" minOccurs="0"/>
<element name="EstadoRegistro" type="sfR:EstadoRegistroType">
<annotation>
<documentation xml:lang="es">
Estado del registro. Correcto o Incorrecto
</documentation>
</annotation>
</element>
<element name="CodigoErrorRegistro" type="sfR:ErrorDetalleType" minOccurs="0">
<annotation>
<documentation xml:lang="es">
Código del error de registro, en su caso.
</documentation>
</annotation>
</element>
<element name="DescripcionErrorRegistro" type="sf:TextMax1500Type" minOccurs="0">
<annotation>
<documentation xml:lang="es">
Descripción detallada del error de registro, en su caso.
</documentation>
</annotation>
</element>
<element name="RegistroDuplicado" type="sf:RegistroDuplicadoType" minOccurs="0">
<annotation>
<documentation xml:lang="es">
Solo en el caso de que se rechace el registro por duplicado se devuelve este nodo con la informacion registrada en el sistema para este registro
</documentation>
</annotation>
</element>
</sequence>
</complexType>
<simpleType name="EstadoEnvioType">
<restriction base="string">
<enumeration value="Correcto">
<annotation>
<documentation xml:lang="es">Correcto</documentation>
</annotation>
</enumeration>
<enumeration value="ParcialmenteCorrecto">
<annotation>
<documentation xml:lang="es">Parcialmente correcto. Ver detalle de errores</documentation>
</annotation>
</enumeration>
<enumeration value="Incorrecto">
<annotation>
<documentation xml:lang="es">Incorrecto</documentation>
</annotation>
</enumeration>
</restriction>
</simpleType>
<simpleType name="EstadoRegistroType">
<restriction base="string">
<enumeration value="Correcto">
<annotation>
<documentation xml:lang="es">Correcto</documentation>
</annotation>
</enumeration>
<enumeration value="AceptadoConErrores">
<annotation>
<documentation xml:lang="es">Aceptado con Errores. Ver detalle del error</documentation>
</annotation>
</enumeration>
<enumeration value="Incorrecto">
<annotation>
<documentation xml:lang="es">Incorrecto</documentation>
</annotation>
</enumeration>
</restriction>
</simpleType>
<simpleType name="ErrorDetalleType">
<restriction base="integer"/>
</simpleType>
</schema>

View File

@ -0,0 +1,110 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- editado con XMLSpy v2019 sp1 (x64) (http://www.altova.com) por AEAT (Agencia Estatal de Administracion Tributaria ((AEAT))) -->
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:sfLR="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SuministroLR.xsd" xmlns:sf="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SuministroInformacion.xsd" xmlns:sfR="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/RespuestaSuministro.xsd" xmlns:sfLRC="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/ConsultaLR.xsd" xmlns:sfLRRC="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/RespuestaConsultaLR.xsd" xmlns:sfWdsl="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SistemaFacturacion.wsdl" xmlns:ns="http://www.w3.org/2000/09/xmldsig#" targetNamespace="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SistemaFacturacion.wsdl">
<wsdl:types>
<xs:schema targetNamespace="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SistemaFacturacion.wsdl" elementFormDefault="qualified" xmlns:sfWdsl="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SistemaFacturacion.wsdl" xmlns:sf="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SuministroInformacion.xsd" xmlns:sfLR="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SuministroLR.xsd" xmlns:sfLRC="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/ConsultaLR.xsd" xmlns:sfLRRC="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/RespuestaConsultaLR.xsd">
<xs:import namespace="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SuministroInformacion.xsd" schemaLocation="SuministroInformacion.xsd"/>
<xs:import namespace="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SuministroLR.xsd" schemaLocation="SuministroLR.xsd"/>
<xs:import namespace="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/ConsultaLR.xsd" schemaLocation="ConsultaLR.xsd"/>
<xs:import namespace="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/RespuestaConsultaLR.xsd" schemaLocation="RespuestaConsultaLR.xsd"/>
<xs:import namespace="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/RespuestaSuministro.xsd" schemaLocation="RespuestaSuministro.xsd"/>
</xs:schema>
</wsdl:types>
<wsdl:message name="EntradaRegFactuSistemaFacturacion">
<wsdl:part name="RegFactuSistemaFacturacion" element="sfLR:RegFactuSistemaFacturacion"/>
</wsdl:message>
<wsdl:message name="EntradaConsultaFactuSistemaFacturacion">
<wsdl:part name="ConsultaFactuSistemaFacturacion" element="sfLRC:ConsultaFactuSistemaFacturacion"/>
</wsdl:message>
<wsdl:message name="RespuestaRegFactuSistemaFacturacion">
<wsdl:part name="RespuestaRegFactuSistemaFacturacion" element="sfR:RespuestaRegFactuSistemaFacturacion"/>
</wsdl:message>
<wsdl:message name="RespuestaConsultaFactuSistemaFacturacion">
<wsdl:part name="RespuestaConsultaFactuSistemaFacturacion" element="sfLRRC:RespuestaConsultaFactuSistemaFacturacion"/>
</wsdl:message>
<wsdl:portType name="sfPortTypeVerifactu">
<wsdl:operation name="RegFactuSistemaFacturacion">
<wsdl:input message="sfWdsl:EntradaRegFactuSistemaFacturacion"/>
<wsdl:output message="sfWdsl:RespuestaRegFactuSistemaFacturacion"/>
</wsdl:operation>
<wsdl:operation name="ConsultaFactuSistemaFacturacion">
<wsdl:input message="sfWdsl:EntradaConsultaFactuSistemaFacturacion"/>
<wsdl:output message="sfWdsl:RespuestaConsultaFactuSistemaFacturacion"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:portType name="sfPortTypePorRequerimiento">
<wsdl:operation name="RegFactuSistemaFacturacion">
<wsdl:input message="sfWdsl:EntradaRegFactuSistemaFacturacion"/>
<wsdl:output message="sfWdsl:RespuestaRegFactuSistemaFacturacion"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="sfVerifactu" type="sfWdsl:sfPortTypeVerifactu">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="RegFactuSistemaFacturacion">
<soap:operation soapAction=""/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="ConsultaFactuSistemaFacturacion">
<soap:operation soapAction=""/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="sfRequerimiento" type="sfWdsl:sfPortTypePorRequerimiento">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="RegFactuSistemaFacturacion">
<soap:operation soapAction=""/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="sfVerifactu">
<!-- Sistemas que emiten facturas verificables. Entorno de PRODUCCION -->
<wsdl:port name="SistemaVerifactu" binding="sfWdsl:sfVerifactu">
<soap:address location="https://www1.agenciatributaria.gob.es/wlpl/TIKE-CONT/ws/SistemaFacturacion/VerifactuSOAP"/>
</wsdl:port>
<!-- Sistemas que emiten facturas verificables. Entorno de PRODUCCION para acceso con certificado de sello -->
<wsdl:port name="SistemaVerifactuSello" binding="sfWdsl:sfVerifactu">
<soap:address location="https://www10.agenciatributaria.gob.es/wlpl/TIKE-CONT/ws/SistemaFacturacion/VerifactuSOAP"/>
</wsdl:port>
<!-- Sistemas que emiten facturas verificables. Entorno de PRUEBAS -->
<wsdl:port name="SistemaVerifactuPruebas" binding="sfWdsl:sfVerifactu">
<soap:address location="https://prewww1.aeat.es/wlpl/TIKE-CONT/ws/SistemaFacturacion/VerifactuSOAP"/>
</wsdl:port>
<!-- Sistemas que emiten facturas verificables. Entorno de PRUEBAS para acceso con certificado de sello -->
<wsdl:port name="SistemaVerifactuSelloPruebas" binding="sfWdsl:sfVerifactu">
<soap:address location="https://prewww10.aeat.es/wlpl/TIKE-CONT/ws/SistemaFacturacion/VerifactuSOAP"/>
</wsdl:port>
</wsdl:service>
<wsdl:service name="sfRequerimiento">
<!-- Sistemas que emiten facturas NO verificables. (Remision bajo requerimiento). Entorno de PRODUCCION -->
<wsdl:port name="SistemaRequerimiento" binding="sfWdsl:sfRequerimiento">
<soap:address location="https://www1.agenciatributaria.gob.es/wlpl/TIKE-CONT/ws/SistemaFacturacion/RequerimientoSOAP"/>
</wsdl:port>
<!-- Sistemas que emiten facturas NO verificables. (Remision bajo requerimiento). Entorno de PRODUCCION para acceso con certificado de sello -->
<wsdl:port name="SistemaRequerimientoSello" binding="sfWdsl:sfRequerimiento">
<soap:address location="https://www10.agenciatributaria.gob.es/wlpl/TIKE-CONT/ws/SistemaFacturacion/RequerimientoSOAP"/>
</wsdl:port>
<!-- Sistemas que emiten facturas NO verificables. (Remision bajo requerimiento). Entorno de PRUEBAS -->
<wsdl:port name="SistemaRequerimientoPruebas" binding="sfWdsl:sfRequerimiento">
<soap:address location="https://prewww1.aeat.es/wlpl/TIKE-CONT/ws/SistemaFacturacion/RequerimientoSOAP"/>
</wsdl:port>
<!-- Sistemas que emiten facturas NO verificables. (Remision bajo requerimiento). Entorno de PRUEBAS para acceso con certificado de sello -->
<wsdl:port name="SistemaRequerimientoSelloPruebas" binding="sfWdsl:sfRequerimiento">
<soap:address location="https://prewww10.aeat.es/wlpl/TIKE-CONT/ws/SistemaFacturacion/RequerimientoSOAP"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- editado con XMLSpy v2019 sp1 (x64) (http://www.altova.com) por Puesto de Trabajo (Agencia Estatal de Administracion Tributaria ((AEAT))) -->
<!-- edited with XMLSpy v2009 sp1 (http://www.altova.com) by PC Corporativo (AGENCIA TRIBUTARIA) -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:sfLR="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SuministroLR.xsd" xmlns:sf="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SuministroInformacion.xsd" targetNamespace="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SuministroLR.xsd" elementFormDefault="qualified">
<import namespace="https://www2.agenciatributaria.gob.es/static_files/common/internet/dep/aplicaciones/es/aeat/tike/cont/ws/SuministroInformacion.xsd" schemaLocation="SuministroInformacion.xsd"/>
<element name="RegFactuSistemaFacturacion">
<complexType>
<sequence>
<element name="Cabecera" type="sf:CabeceraType"/>
<element name="RegistroFactura" type="sfLR:RegistroFacturaType" maxOccurs="1000"/>
</sequence>
</complexType>
</element>
<complexType name="RegistroFacturaType">
<annotation>
<documentation xml:lang="es">Datos correspondientes a los registros de facturacion</documentation>
</annotation>
<sequence>
<choice>
<element ref="sf:RegistroAlta"/>
<element ref="sf:RegistroAnulacion"/>
</choice>
</sequence>
</complexType>
</schema>