FrameAppWS

<back to all web services

GetReportsRQ

Requires Authentication
The following routes are available for this service:
All Verbs/restfiles/GetReportsRQ
<?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 FileItemRecursive implements JsonSerializable
{
    public function __construct(
        /** @var float|null */
        public ?float $idArchivo=null,
        /** @var float|null */
        public ?float $carp_carp=null,
        /** @var float|null */
        public ?float $carp_padre=null,
        /** @var bool|null */
        public ?bool $isDirectory=null,
        /** @var string|null */
        public ?string $name=null,
        /** @var string|null */
        public ?string $usua_login=null,
        /** @var DateTime */
        public DateTime $fecha=new DateTime(),
        /** @var array<FileItemRecursive>|null */
        public ?array $items=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['idArchivo'])) $this->idArchivo = $o['idArchivo'];
        if (isset($o['carp_carp'])) $this->carp_carp = $o['carp_carp'];
        if (isset($o['carp_padre'])) $this->carp_padre = $o['carp_padre'];
        if (isset($o['isDirectory'])) $this->isDirectory = $o['isDirectory'];
        if (isset($o['name'])) $this->name = $o['name'];
        if (isset($o['usua_login'])) $this->usua_login = $o['usua_login'];
        if (isset($o['fecha'])) $this->fecha = JsonConverters::from('DateTime', $o['fecha']);
        if (isset($o['items'])) $this->items = JsonConverters::fromArray('FileItemRecursive', $o['items']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->idArchivo)) $o['idArchivo'] = $this->idArchivo;
        if (isset($this->carp_carp)) $o['carp_carp'] = $this->carp_carp;
        if (isset($this->carp_padre)) $o['carp_padre'] = $this->carp_padre;
        if (isset($this->isDirectory)) $o['isDirectory'] = $this->isDirectory;
        if (isset($this->name)) $o['name'] = $this->name;
        if (isset($this->usua_login)) $o['usua_login'] = $this->usua_login;
        if (isset($this->fecha)) $o['fecha'] = JsonConverters::to('DateTime', $this->fecha);
        if (isset($this->items)) $o['items'] = JsonConverters::toArray('FileItemRecursive', $this->items);
        return empty($o) ? new class(){} : $o;
    }
}

class GetDirectoryRS implements JsonSerializable
{
    public function __construct(
        /** @var array<FileItemRecursive>|null */
        public ?array $FileItem=null
    ) {
    }

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

class GetReportsRQ implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $usua_login=null,
        /** @var int */
        public int $sist_sist=0,
        /** @var int */
        public int $empr_empr=0,
        /** @var DateTime */
        public DateTime $fechaini=new DateTime(),
        /** @var DateTime */
        public DateTime $fechafin=new DateTime()
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['usua_login'])) $this->usua_login = $o['usua_login'];
        if (isset($o['sist_sist'])) $this->sist_sist = $o['sist_sist'];
        if (isset($o['empr_empr'])) $this->empr_empr = $o['empr_empr'];
        if (isset($o['fechaini'])) $this->fechaini = JsonConverters::from('DateTime', $o['fechaini']);
        if (isset($o['fechafin'])) $this->fechafin = JsonConverters::from('DateTime', $o['fechafin']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->usua_login)) $o['usua_login'] = $this->usua_login;
        if (isset($this->sist_sist)) $o['sist_sist'] = $this->sist_sist;
        if (isset($this->empr_empr)) $o['empr_empr'] = $this->empr_empr;
        if (isset($this->fechaini)) $o['fechaini'] = JsonConverters::to('DateTime', $this->fechaini);
        if (isset($this->fechafin)) $o['fechafin'] = JsonConverters::to('DateTime', $this->fechafin);
        return empty($o) ? new class(){} : $o;
    }
}

PHP GetReportsRQ 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 /restfiles/GetReportsRQ HTTP/1.1 
Host: soluser-recaudo.sgsas.co 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	usua_login: String,
	sist_sist: 0,
	empr_empr: 0
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	FileItem: 
	[
		{
			
		}
	]
}