FrameAppWS

<back to all web services

CreateUserAdm

Requires Authentication
The following routes are available for this service:
All Verbs/admin/crearusuario
<?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 NovedadesCarga implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $Fila=0,
        /** @var int */
        public int $Columna=0,
        /** @var string|null */
        public ?string $TipoError=null,
        /** @var string|null */
        public ?string $Novedad=null
    ) {
    }

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

class GuardarDatosFormaDetalleRS implements JsonSerializable
{
    public function __construct(
        /** @var float */
        public float $IDDetalle=0.0,
        /** @var array<NovedadesCarga>|null */
        public ?array $Novedades=null
    ) {
    }

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

class GeneralRS implements JsonSerializable
{
    public function __construct(
        /** @description Id del código de respuesta 1: Correcto, -1: Error */
        // @ApiMember(DataType="int", Description="Id del código de respuesta 1: Correcto, -1: Error", IsRequired=true, ParameterType="body")
        /** @var int */
        public int $Codigo=0,

        /** @description Mensaje que se envía al ejecutar el servicio */
        // @ApiMember(DataType="string", Description="Mensaje que se envía al ejecutar el servicio", IsRequired=true, ParameterType="body")
        /** @var string */
        public string $Mensaje=''
    ) {
    }

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

class ExecuteDBFunctionRS extends GeneralRS implements JsonSerializable
{
    /**
     * @param int $Codigo
     * @param string $Mensaje
     */
    public function __construct(
        int $Codigo=0,
        string $Mensaje='',
        /** @var Object|null */
        public ?Object $Respuesta=null,
        /** @var float */
        public float $IDEjecucion=0.0,
        /** @var string|null */
        public ?string $URLArchivo=null,
        /** @var string|null */
        public ?string $TipoRespuesta=null,
        /** @var bool|null */
        public ?bool $Background=null,
        /** @var int */
        public int $TiempoRespuestaBD=0,
        /** @var int */
        public int $TiempoRespuestaTotal=0
    ) {
        parent::__construct($Codigo,$Mensaje);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['Respuesta'])) $this->Respuesta = JsonConverters::from('Object', $o['Respuesta']);
        if (isset($o['IDEjecucion'])) $this->IDEjecucion = $o['IDEjecucion'];
        if (isset($o['URLArchivo'])) $this->URLArchivo = $o['URLArchivo'];
        if (isset($o['TipoRespuesta'])) $this->TipoRespuesta = $o['TipoRespuesta'];
        if (isset($o['Background'])) $this->Background = $o['Background'];
        if (isset($o['TiempoRespuestaBD'])) $this->TiempoRespuestaBD = $o['TiempoRespuestaBD'];
        if (isset($o['TiempoRespuestaTotal'])) $this->TiempoRespuestaTotal = $o['TiempoRespuestaTotal'];
        if (isset($o['Codigo'])) $this->Codigo = $o['Codigo'];
        if (isset($o['Mensaje'])) $this->Mensaje = $o['Mensaje'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->Respuesta)) $o['Respuesta'] = JsonConverters::to('Object', $this->Respuesta);
        if (isset($this->IDEjecucion)) $o['IDEjecucion'] = $this->IDEjecucion;
        if (isset($this->URLArchivo)) $o['URLArchivo'] = $this->URLArchivo;
        if (isset($this->TipoRespuesta)) $o['TipoRespuesta'] = $this->TipoRespuesta;
        if (isset($this->Background)) $o['Background'] = $this->Background;
        if (isset($this->TiempoRespuestaBD)) $o['TiempoRespuestaBD'] = $this->TiempoRespuestaBD;
        if (isset($this->TiempoRespuestaTotal)) $o['TiempoRespuestaTotal'] = $this->TiempoRespuestaTotal;
        if (isset($this->Codigo)) $o['Codigo'] = $this->Codigo;
        if (isset($this->Mensaje)) $o['Mensaje'] = $this->Mensaje;
        return empty($o) ? new class(){} : $o;
    }
}

class GuardarDatosFormaRS implements JsonSerializable
{
    public function __construct(
        /** @var bool|null */
        public ?bool $Success=null,
        /** @var string|null */
        public ?string $Error=null,
        /** @var array<string,Object>|null */
        public ?array $DatosLlaveMaestro=null,
        /** @var array<GuardarDatosFormaDetalleRS>|null */
        public ?array $NovedadesDetalles=null,
        /** @var ExecuteDBFunctionRS|null */
        public ?ExecuteDBFunctionRS $RespuestaProcAlmacenado=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Success'])) $this->Success = $o['Success'];
        if (isset($o['Error'])) $this->Error = $o['Error'];
        if (isset($o['DatosLlaveMaestro'])) $this->DatosLlaveMaestro = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','Object']), $o['DatosLlaveMaestro']);
        if (isset($o['NovedadesDetalles'])) $this->NovedadesDetalles = JsonConverters::fromArray('GuardarDatosFormaDetalleRS', $o['NovedadesDetalles']);
        if (isset($o['RespuestaProcAlmacenado'])) $this->RespuestaProcAlmacenado = JsonConverters::from('ExecuteDBFunctionRS', $o['RespuestaProcAlmacenado']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Success)) $o['Success'] = $this->Success;
        if (isset($this->Error)) $o['Error'] = $this->Error;
        if (isset($this->DatosLlaveMaestro)) $o['DatosLlaveMaestro'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','Object']), $this->DatosLlaveMaestro);
        if (isset($this->NovedadesDetalles)) $o['NovedadesDetalles'] = JsonConverters::toArray('GuardarDatosFormaDetalleRS', $this->NovedadesDetalles);
        if (isset($this->RespuestaProcAlmacenado)) $o['RespuestaProcAlmacenado'] = JsonConverters::to('ExecuteDBFunctionRS', $this->RespuestaProcAlmacenado);
        return empty($o) ? new class(){} : $o;
    }
}

class CreateUserAdm extends GuardarDatosFormaRS implements JsonSerializable
{
    /**
     * @param bool|null $Success
     * @param string|null $Error
     * @param array<string,Object>|null $DatosLlaveMaestro
     * @param array<GuardarDatosFormaDetalleRS>|null $NovedadesDetalles
     * @param ExecuteDBFunctionRS|null $RespuestaProcAlmacenado
     */
    public function __construct(
        ?bool $Success=null,
        ?string $Error=null,
        ?array $DatosLlaveMaestro=null,
        ?array $NovedadesDetalles=null,
        ?ExecuteDBFunctionRS $RespuestaProcAlmacenado=null,
        /** @var string|null */
        public ?string $Identificacion=null,
        /** @var string|null */
        public ?string $Nombres=null,
        /** @var string|null */
        public ?string $Direccion=null,
        /** @var string|null */
        public ?string $Telefonos=null,
        /** @var string|null */
        public ?string $Email=null,
        /** @var string|null */
        public ?string $UsuarioCreo=null,
        /** @var string|null */
        public ?string $Estado=null,
        /** @var string|null */
        public ?string $LoginAdicional=null,
        /** @var int */
        public int $ID=0,
        /** @var int */
        public int $CodSistema=0,
        /** @var int */
        public int $CodEmpresa=0
    ) {
        parent::__construct($Success,$Error,$DatosLlaveMaestro,$NovedadesDetalles,$RespuestaProcAlmacenado);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['Identificacion'])) $this->Identificacion = $o['Identificacion'];
        if (isset($o['Nombres'])) $this->Nombres = $o['Nombres'];
        if (isset($o['Direccion'])) $this->Direccion = $o['Direccion'];
        if (isset($o['Telefonos'])) $this->Telefonos = $o['Telefonos'];
        if (isset($o['Email'])) $this->Email = $o['Email'];
        if (isset($o['UsuarioCreo'])) $this->UsuarioCreo = $o['UsuarioCreo'];
        if (isset($o['Estado'])) $this->Estado = $o['Estado'];
        if (isset($o['LoginAdicional'])) $this->LoginAdicional = $o['LoginAdicional'];
        if (isset($o['ID'])) $this->ID = $o['ID'];
        if (isset($o['CodSistema'])) $this->CodSistema = $o['CodSistema'];
        if (isset($o['CodEmpresa'])) $this->CodEmpresa = $o['CodEmpresa'];
        if (isset($o['Success'])) $this->Success = $o['Success'];
        if (isset($o['Error'])) $this->Error = $o['Error'];
        if (isset($o['DatosLlaveMaestro'])) $this->DatosLlaveMaestro = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','Object']), $o['DatosLlaveMaestro']);
        if (isset($o['NovedadesDetalles'])) $this->NovedadesDetalles = JsonConverters::fromArray('GuardarDatosFormaDetalleRS', $o['NovedadesDetalles']);
        if (isset($o['RespuestaProcAlmacenado'])) $this->RespuestaProcAlmacenado = JsonConverters::from('ExecuteDBFunctionRS', $o['RespuestaProcAlmacenado']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->Identificacion)) $o['Identificacion'] = $this->Identificacion;
        if (isset($this->Nombres)) $o['Nombres'] = $this->Nombres;
        if (isset($this->Direccion)) $o['Direccion'] = $this->Direccion;
        if (isset($this->Telefonos)) $o['Telefonos'] = $this->Telefonos;
        if (isset($this->Email)) $o['Email'] = $this->Email;
        if (isset($this->UsuarioCreo)) $o['UsuarioCreo'] = $this->UsuarioCreo;
        if (isset($this->Estado)) $o['Estado'] = $this->Estado;
        if (isset($this->LoginAdicional)) $o['LoginAdicional'] = $this->LoginAdicional;
        if (isset($this->ID)) $o['ID'] = $this->ID;
        if (isset($this->CodSistema)) $o['CodSistema'] = $this->CodSistema;
        if (isset($this->CodEmpresa)) $o['CodEmpresa'] = $this->CodEmpresa;
        if (isset($this->Success)) $o['Success'] = $this->Success;
        if (isset($this->Error)) $o['Error'] = $this->Error;
        if (isset($this->DatosLlaveMaestro)) $o['DatosLlaveMaestro'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','Object']), $this->DatosLlaveMaestro);
        if (isset($this->NovedadesDetalles)) $o['NovedadesDetalles'] = JsonConverters::toArray('GuardarDatosFormaDetalleRS', $this->NovedadesDetalles);
        if (isset($this->RespuestaProcAlmacenado)) $o['RespuestaProcAlmacenado'] = JsonConverters::to('ExecuteDBFunctionRS', $this->RespuestaProcAlmacenado);
        return empty($o) ? new class(){} : $o;
    }
}

PHP CreateUserAdm DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /admin/crearusuario HTTP/1.1 
Host: soluser-recaudo.sgsas.co 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"Identificacion":"String","Nombres":"String","Direccion":"String","Telefonos":"String","Email":"String","UsuarioCreo":"String","Estado":"String","LoginAdicional":"String","ID":0,"CodSistema":0,"CodEmpresa":0,"Success":false,"Error":"String","DatosLlaveMaestro":{"String":{}},"NovedadesDetalles":[{"IDDetalle":0,"Novedades":[{"Fila":0,"Columna":0,"TipoError":"String","Novedad":"String"}]}],"RespuestaProcAlmacenado":{"Respuesta":{},"IDEjecucion":0,"URLArchivo":"String","TipoRespuesta":"String","Background":false,"TiempoRespuestaBD":0,"TiempoRespuestaTotal":0,"Codigo":0,"Mensaje":"String"}}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Success":false,"Error":"String","DatosLlaveMaestro":{"String":{}},"NovedadesDetalles":[{"IDDetalle":0,"Novedades":[{"Fila":0,"Columna":0,"TipoError":"String","Novedad":"String"}]}],"RespuestaProcAlmacenado":{"Respuesta":{},"IDEjecucion":0,"URLArchivo":"String","TipoRespuesta":"String","Background":false,"TiempoRespuestaBD":0,"TiempoRespuestaTotal":0,"Codigo":0,"Mensaje":"String"}}