FBiHBetting.Aggregator.WebApi

<back to all web services

GetReportParameters

The following routes are available for this service:
GET/reportParameters
<?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};


enum ReportOperation : int
{
    case Prijava_od_strane_poreznog_obveznika = 0;
    case Prijava_u_ime_poreznog_obveznika = 1;
    case Izmjena = 2;
    case Izmjena_prijava_poreske_uprave = 3;
}

class ReportParameters implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $id=null,
        /** @var int */
        public int $documentOrdinal=0,
        /** @var string|null */
        public ?string $official=null,
        /** @var ReportOperation|null */
        public ?ReportOperation $operation=null,
        /** @var DateTime */
        public DateTime $dateOfReceipt=new DateTime(),
        /** @var string|null */
        public ?string $authorizedPersonJMBG=null,
        /** @var string|null */
        public ?string $authorizedPersonFullName=null,
        /** @var string|null */
        public ?string $authorizedPersonLocation=null,
        /** @var DateTime */
        public DateTime $authorizedPersonStatementDate=new DateTime()
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['id'])) $this->id = $o['id'];
        if (isset($o['documentOrdinal'])) $this->documentOrdinal = $o['documentOrdinal'];
        if (isset($o['official'])) $this->official = $o['official'];
        if (isset($o['operation'])) $this->operation = JsonConverters::from('ReportOperation', $o['operation']);
        if (isset($o['dateOfReceipt'])) $this->dateOfReceipt = JsonConverters::from('DateTime', $o['dateOfReceipt']);
        if (isset($o['authorizedPersonJMBG'])) $this->authorizedPersonJMBG = $o['authorizedPersonJMBG'];
        if (isset($o['authorizedPersonFullName'])) $this->authorizedPersonFullName = $o['authorizedPersonFullName'];
        if (isset($o['authorizedPersonLocation'])) $this->authorizedPersonLocation = $o['authorizedPersonLocation'];
        if (isset($o['authorizedPersonStatementDate'])) $this->authorizedPersonStatementDate = JsonConverters::from('DateTime', $o['authorizedPersonStatementDate']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->id)) $o['id'] = $this->id;
        if (isset($this->documentOrdinal)) $o['documentOrdinal'] = $this->documentOrdinal;
        if (isset($this->official)) $o['official'] = $this->official;
        if (isset($this->operation)) $o['operation'] = JsonConverters::to('ReportOperation', $this->operation);
        if (isset($this->dateOfReceipt)) $o['dateOfReceipt'] = JsonConverters::to('DateTime', $this->dateOfReceipt);
        if (isset($this->authorizedPersonJMBG)) $o['authorizedPersonJMBG'] = $this->authorizedPersonJMBG;
        if (isset($this->authorizedPersonFullName)) $o['authorizedPersonFullName'] = $this->authorizedPersonFullName;
        if (isset($this->authorizedPersonLocation)) $o['authorizedPersonLocation'] = $this->authorizedPersonLocation;
        if (isset($this->authorizedPersonStatementDate)) $o['authorizedPersonStatementDate'] = JsonConverters::to('DateTime', $this->authorizedPersonStatementDate);
        return empty($o) ? new class(){} : $o;
    }
}

class GetReportParameters implements JsonSerializable
{
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        return empty($o) ? new class(){} : $o;
    }
}

PHP GetReportParameters DTOs

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

HTTP + OTHER

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

GET /reportParameters HTTP/1.1 
Host: fbihtaapi.bettor.webhop.biz 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"id":"String","documentOrdinal":0,"official":"String","operation":0,"dateOfReceipt":"0001-01-01T00:00:00.0000000Z","authorizedPersonJMBG":"String","authorizedPersonFullName":"String","authorizedPersonLocation":"String","authorizedPersonStatementDate":"0001-01-01T00:00:00.0000000Z"}