FrameAppWS

<back to all web services

AMDCGetObligacionesXArticuloRQ

Requires Authentication
The following routes are available for this service:
All Verbs/consulta/ConsultaDeudaXArticulo
<?php namespace dtos;

use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};


class DatosBanco implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Banco=null,
        /** @var string|null */
        public ?string $Sucursal=null,
        /** @var string|null */
        public ?string $Usuario=null,
        /** @var string|null */
        public ?string $Terminal=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Banco'])) $this->Banco = $o['Banco'];
        if (isset($o['Sucursal'])) $this->Sucursal = $o['Sucursal'];
        if (isset($o['Usuario'])) $this->Usuario = $o['Usuario'];
        if (isset($o['Terminal'])) $this->Terminal = $o['Terminal'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Banco)) $o['Banco'] = $this->Banco;
        if (isset($this->Sucursal)) $o['Sucursal'] = $this->Sucursal;
        if (isset($this->Usuario)) $o['Usuario'] = $this->Usuario;
        if (isset($this->Terminal)) $o['Terminal'] = $this->Terminal;
        return empty($o) ? new class(){} : $o;
    }
}

class CoreRes implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $TranId=null,
        /** @var string|null */
        public ?string $Code=null,
        /** @var string|null */
        public ?string $InfoMsg=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['TranId'])) $this->TranId = $o['TranId'];
        if (isset($o['Code'])) $this->Code = $o['Code'];
        if (isset($o['InfoMsg'])) $this->InfoMsg = $o['InfoMsg'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->TranId)) $o['TranId'] = $this->TranId;
        if (isset($this->Code)) $o['Code'] = $this->Code;
        if (isset($this->InfoMsg)) $o['InfoMsg'] = $this->InfoMsg;
        return empty($o) ? new class(){} : $o;
    }
}

class Detalle_Obligacion implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $Orden=0,
        // @DataMember(Name="IdObligacion")
        /** @var string|null */
        public ?string $IdObligacion=null,

        // @DataMember(Name="NombreObligacion")
        /** @var string|null */
        public ?string $NombreObligacion=null,

        // @DataMember(Name="TipoImpuesto")
        /** @var string|null */
        public ?string $TipoImpuesto=null,

        /** @var float */
        public float $Impuesto=0.0,
        /** @var float */
        public float $TrenAseo=0.0,
        /** @var float */
        public float $Bomberos=0.0,
        /** @var float */
        public float $Otros=0.0,
        /** @var float */
        public float $Intereses=0.0,
        /** @var float */
        public float $Descuento=0.0,
        /** @var string|null */
        public ?string $FechaExpiracion=null,
        /** @var float */
        public float $TotalFila=0.0,
        /** @var string|null */
        public ?string $Mensaje=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Orden'])) $this->Orden = $o['Orden'];
        if (isset($o['IdObligacion'])) $this->IdObligacion = $o['IdObligacion'];
        if (isset($o['NombreObligacion'])) $this->NombreObligacion = $o['NombreObligacion'];
        if (isset($o['TipoImpuesto'])) $this->TipoImpuesto = $o['TipoImpuesto'];
        if (isset($o['Impuesto'])) $this->Impuesto = $o['Impuesto'];
        if (isset($o['TrenAseo'])) $this->TrenAseo = $o['TrenAseo'];
        if (isset($o['Bomberos'])) $this->Bomberos = $o['Bomberos'];
        if (isset($o['Otros'])) $this->Otros = $o['Otros'];
        if (isset($o['Intereses'])) $this->Intereses = $o['Intereses'];
        if (isset($o['Descuento'])) $this->Descuento = $o['Descuento'];
        if (isset($o['FechaExpiracion'])) $this->FechaExpiracion = $o['FechaExpiracion'];
        if (isset($o['TotalFila'])) $this->TotalFila = $o['TotalFila'];
        if (isset($o['Mensaje'])) $this->Mensaje = $o['Mensaje'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Orden)) $o['Orden'] = $this->Orden;
        if (isset($this->IdObligacion)) $o['IdObligacion'] = $this->IdObligacion;
        if (isset($this->NombreObligacion)) $o['NombreObligacion'] = $this->NombreObligacion;
        if (isset($this->TipoImpuesto)) $o['TipoImpuesto'] = $this->TipoImpuesto;
        if (isset($this->Impuesto)) $o['Impuesto'] = $this->Impuesto;
        if (isset($this->TrenAseo)) $o['TrenAseo'] = $this->TrenAseo;
        if (isset($this->Bomberos)) $o['Bomberos'] = $this->Bomberos;
        if (isset($this->Otros)) $o['Otros'] = $this->Otros;
        if (isset($this->Intereses)) $o['Intereses'] = $this->Intereses;
        if (isset($this->Descuento)) $o['Descuento'] = $this->Descuento;
        if (isset($this->FechaExpiracion)) $o['FechaExpiracion'] = $this->FechaExpiracion;
        if (isset($this->TotalFila)) $o['TotalFila'] = $this->TotalFila;
        if (isset($this->Mensaje)) $o['Mensaje'] = $this->Mensaje;
        return empty($o) ? new class(){} : $o;
    }
}

class Deuda_Obligacion implements JsonSerializable
{
    public function __construct(
        // @DataMember(Name="NombreContribuyente")
        /** @var string|null */
        public ?string $NombreContribuyente=null,

        // @DataMember(Name="TotalDeuda")
        /** @var float */
        public float $TotalDeuda=0.0,

        /** @var int */
        public int $Anio=0,
        /** @var array<Detalle_Obligacion>|null */
        public ?array $DetalleObligacion=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['NombreContribuyente'])) $this->NombreContribuyente = $o['NombreContribuyente'];
        if (isset($o['TotalDeuda'])) $this->TotalDeuda = $o['TotalDeuda'];
        if (isset($o['Anio'])) $this->Anio = $o['Anio'];
        if (isset($o['DetalleObligacion'])) $this->DetalleObligacion = JsonConverters::fromArray('Detalle_Obligacion', $o['DetalleObligacion']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->NombreContribuyente)) $o['NombreContribuyente'] = $this->NombreContribuyente;
        if (isset($this->TotalDeuda)) $o['TotalDeuda'] = $this->TotalDeuda;
        if (isset($this->Anio)) $o['Anio'] = $this->Anio;
        if (isset($this->DetalleObligacion)) $o['DetalleObligacion'] = JsonConverters::toArray('Detalle_Obligacion', $this->DetalleObligacion);
        return empty($o) ? new class(){} : $o;
    }
}

class AMDCGetObligacionesXArticuloRS extends CoreRes implements JsonSerializable
{
    /**
     * @param string|null $TranId
     * @param string|null $Code
     * @param string|null $InfoMsg
     */
    public function __construct(
        ?string $TranId=null,
        ?string $Code=null,
        ?string $InfoMsg=null,
        /** @var Deuda_Obligacion|null */
        public ?Deuda_Obligacion $DeudaObligacion=null
    ) {
        parent::__construct($TranId,$Code,$InfoMsg);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['DeudaObligacion'])) $this->DeudaObligacion = JsonConverters::from('Deuda_Obligacion', $o['DeudaObligacion']);
        if (isset($o['TranId'])) $this->TranId = $o['TranId'];
        if (isset($o['Code'])) $this->Code = $o['Code'];
        if (isset($o['InfoMsg'])) $this->InfoMsg = $o['InfoMsg'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->DeudaObligacion)) $o['DeudaObligacion'] = JsonConverters::to('Deuda_Obligacion', $this->DeudaObligacion);
        if (isset($this->TranId)) $o['TranId'] = $this->TranId;
        if (isset($this->Code)) $o['Code'] = $this->Code;
        if (isset($this->InfoMsg)) $o['InfoMsg'] = $this->InfoMsg;
        return empty($o) ? new class(){} : $o;
    }
}

class AMDCGetObligacionesXArticuloRQ extends DatosBanco implements JsonSerializable
{
    /**
     * @param string|null $Banco
     * @param string|null $Sucursal
     * @param string|null $Usuario
     * @param string|null $Terminal
     */
    public function __construct(
        ?string $Banco=null,
        ?string $Sucursal=null,
        ?string $Usuario=null,
        ?string $Terminal=null,
        // @DataMember(Name="IdDocumento")
        /** @var string|null */
        public ?string $IdDocumento=null,

        /** @var int */
        public int $Anio=0,
        // @DataMember(Name="IdTipoImpuesto")
        /** @var int */
        public int $IdTipoImpuesto=0,

        /** @var int */
        public int $PagoParcial=0
    ) {
        parent::__construct($Banco,$Sucursal,$Usuario,$Terminal);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['IdDocumento'])) $this->IdDocumento = $o['IdDocumento'];
        if (isset($o['Anio'])) $this->Anio = $o['Anio'];
        if (isset($o['IdTipoImpuesto'])) $this->IdTipoImpuesto = $o['IdTipoImpuesto'];
        if (isset($o['PagoParcial'])) $this->PagoParcial = $o['PagoParcial'];
        if (isset($o['Banco'])) $this->Banco = $o['Banco'];
        if (isset($o['Sucursal'])) $this->Sucursal = $o['Sucursal'];
        if (isset($o['Usuario'])) $this->Usuario = $o['Usuario'];
        if (isset($o['Terminal'])) $this->Terminal = $o['Terminal'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->IdDocumento)) $o['IdDocumento'] = $this->IdDocumento;
        if (isset($this->Anio)) $o['Anio'] = $this->Anio;
        if (isset($this->IdTipoImpuesto)) $o['IdTipoImpuesto'] = $this->IdTipoImpuesto;
        if (isset($this->PagoParcial)) $o['PagoParcial'] = $this->PagoParcial;
        if (isset($this->Banco)) $o['Banco'] = $this->Banco;
        if (isset($this->Sucursal)) $o['Sucursal'] = $this->Sucursal;
        if (isset($this->Usuario)) $o['Usuario'] = $this->Usuario;
        if (isset($this->Terminal)) $o['Terminal'] = $this->Terminal;
        return empty($o) ? new class(){} : $o;
    }
}

PHP AMDCGetObligacionesXArticuloRQ DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /consulta/ConsultaDeudaXArticulo HTTP/1.1 
Host: soluser-recaudo.sgsas.co 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<AMDCGetObligacionesXArticuloRQ xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AMDC.Modelo.Tipo.Consulta">
  <Banco xmlns="http://schemas.datacontract.org/2004/07/AMDC.Modelo.Contexto.General">String</Banco>
  <Sucursal xmlns="http://schemas.datacontract.org/2004/07/AMDC.Modelo.Contexto.General">String</Sucursal>
  <Terminal xmlns="http://schemas.datacontract.org/2004/07/AMDC.Modelo.Contexto.General">String</Terminal>
  <Usuario xmlns="http://schemas.datacontract.org/2004/07/AMDC.Modelo.Contexto.General">String</Usuario>
  <Anio>0</Anio>
  <IdTipoObligacion>0</IdTipoObligacion>
  <NumeroDocumento>String</NumeroDocumento>
  <PagoParcial>0</PagoParcial>
</AMDCGetObligacionesXArticuloRQ>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<AMDCGetObligacionesXArticuloRS xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AMDC.Modelo.Tipo.Consulta">
  <Code xmlns="http://schemas.datacontract.org/2004/07/AMDC.Modelo.Contexto.General">String</Code>
  <InfoMsg xmlns="http://schemas.datacontract.org/2004/07/AMDC.Modelo.Contexto.General">String</InfoMsg>
  <TranId xmlns="http://schemas.datacontract.org/2004/07/AMDC.Modelo.Contexto.General">String</TranId>
  <DeudaObligacion xmlns:d2p1="http://schemas.datacontract.org/2004/07/AMDC.Modelo.Contexto.Consulta">
    <d2p1:Actor>String</d2p1:Actor>
    <d2p1:Anio>0</d2p1:Anio>
    <d2p1:DetalleObligacion i:nil="true" />
    <d2p1:Total>0</d2p1:Total>
  </DeudaObligacion>
</AMDCGetObligacionesXArticuloRS>