FrameAppWS

<back to all web services

AMDCReversarPagoRQ

Requires Authentication
The following routes are available for this service:
All Verbs/pago/ReversarPago
<?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 ResultadoTransaccion implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Resultado=null,
        // @DataMember(Name="Mensaje")
        /** @var string|null */
        public ?string $Mensaje=null,

        /** @var string|null */
        public ?string $FechaTransaccion=null
    ) {
    }

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

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

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['PagoReversadoRespuesta'])) $this->PagoReversadoRespuesta = JsonConverters::from('ResultadoTransaccion', $o['PagoReversadoRespuesta']);
        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->PagoReversadoRespuesta)) $o['PagoReversadoRespuesta'] = JsonConverters::to('ResultadoTransaccion', $this->PagoReversadoRespuesta);
        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 AMDCReversarPagoRQ 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,
        /** @var string|null */
        public ?string $IdTransaccionBanco=null
    ) {
        parent::__construct($Banco,$Sucursal,$Usuario,$Terminal);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['IdTransaccionBanco'])) $this->IdTransaccionBanco = $o['IdTransaccionBanco'];
        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->IdTransaccionBanco)) $o['IdTransaccionBanco'] = $this->IdTransaccionBanco;
        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 AMDCReversarPagoRQ 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 /pago/ReversarPago HTTP/1.1 
Host: soluser-recaudo.sgsas.co 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

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

{
	PagoReversadoRespuesta: 
	{
		Resultado: String,
		Mensaje: String,
		FechaTransaccion: String
	},
	TranId: String,
	Code: String,
	InfoMsg: String
}