FrameAppWS

<back to all web services

AMDCGetTipoObligacionesRQ

Requires Authentication
The following routes are available for this service:
All Verbs/consulta/ListaTipoObligaciones
<?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 Tipo_Obligacion implements JsonSerializable
{
    public function __construct(
        // @DataMember(Name="IdTipoImpuesto")
        /** @var int */
        public int $IdTipoImpuesto=0,

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

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

class AMDCGetTipoObligacionesRS 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 array<Tipo_Obligacion>|null */
        public ?array $ListaObligaciones=null
    ) {
        parent::__construct($TranId,$Code,$InfoMsg);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['ListaObligaciones'])) $this->ListaObligaciones = JsonConverters::fromArray('Tipo_Obligacion', $o['ListaObligaciones']);
        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->ListaObligaciones)) $o['ListaObligaciones'] = JsonConverters::toArray('Tipo_Obligacion', $this->ListaObligaciones);
        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 AMDCGetTipoObligacionesRQ 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
    ) {
        parent::__construct($Banco,$Sucursal,$Usuario,$Terminal);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        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->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 AMDCGetTipoObligacionesRQ DTOs

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

HTTP + JSV

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

POST /consulta/ListaTipoObligaciones HTTP/1.1 
Host: soluser-recaudo.sgsas.co 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Banco: String,
	Sucursal: String,
	Usuario: String,
	Terminal: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ListaObligaciones: 
	[
		{
			IdTipoImpuesto: 0,
			TipoImpuesto: String
		}
	],
	TranId: String,
	Code: String,
	InfoMsg: String
}