CL$WS Host : D5239-staging-cl

<back to all web services

cl_info_tourneeRequest

The following routes are available for this service:
GET, POST/cl_info_tournee/{id_operateur}/{id_tournee}
<?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 _info_tournee implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $id_operateur=null,
        /** @var string|null */
        public ?string $id_tournee=null,
        /** @var string|null */
        public ?string $date=null,
        /** @var float */
        public float $latitude=0.0,
        /** @var float */
        public float $longitude=0.0,
        /** @var int */
        public int $aptitude=0,
        /** @var string|null */
        public ?string $id_fin_tournee=null,
        /** @var string|null */
        public ?string $kilometrage_depart=null,
        /** @var int */
        public int $carburant_correct=0,
        /** @var int */
        public int $ad_blue_allume=0,
        /** @var string|null */
        public ?string $platform=null,
        /** @var string|null */
        public ?string $brand=null,
        /** @var string|null */
        public ?string $model=null,
        /** @var string|null */
        public ?string $release=null,
        /** @var string|null */
        public ?string $sdk=null,
        /** @var string|null */
        public ?string $app_version=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['id_operateur'])) $this->id_operateur = $o['id_operateur'];
        if (isset($o['id_tournee'])) $this->id_tournee = $o['id_tournee'];
        if (isset($o['date'])) $this->date = $o['date'];
        if (isset($o['latitude'])) $this->latitude = $o['latitude'];
        if (isset($o['longitude'])) $this->longitude = $o['longitude'];
        if (isset($o['aptitude'])) $this->aptitude = $o['aptitude'];
        if (isset($o['id_fin_tournee'])) $this->id_fin_tournee = $o['id_fin_tournee'];
        if (isset($o['kilometrage_depart'])) $this->kilometrage_depart = $o['kilometrage_depart'];
        if (isset($o['carburant_correct'])) $this->carburant_correct = $o['carburant_correct'];
        if (isset($o['ad_blue_allume'])) $this->ad_blue_allume = $o['ad_blue_allume'];
        if (isset($o['platform'])) $this->platform = $o['platform'];
        if (isset($o['brand'])) $this->brand = $o['brand'];
        if (isset($o['model'])) $this->model = $o['model'];
        if (isset($o['release'])) $this->release = $o['release'];
        if (isset($o['sdk'])) $this->sdk = $o['sdk'];
        if (isset($o['app_version'])) $this->app_version = $o['app_version'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->id_operateur)) $o['id_operateur'] = $this->id_operateur;
        if (isset($this->id_tournee)) $o['id_tournee'] = $this->id_tournee;
        if (isset($this->date)) $o['date'] = $this->date;
        if (isset($this->latitude)) $o['latitude'] = $this->latitude;
        if (isset($this->longitude)) $o['longitude'] = $this->longitude;
        if (isset($this->aptitude)) $o['aptitude'] = $this->aptitude;
        if (isset($this->id_fin_tournee)) $o['id_fin_tournee'] = $this->id_fin_tournee;
        if (isset($this->kilometrage_depart)) $o['kilometrage_depart'] = $this->kilometrage_depart;
        if (isset($this->carburant_correct)) $o['carburant_correct'] = $this->carburant_correct;
        if (isset($this->ad_blue_allume)) $o['ad_blue_allume'] = $this->ad_blue_allume;
        if (isset($this->platform)) $o['platform'] = $this->platform;
        if (isset($this->brand)) $o['brand'] = $this->brand;
        if (isset($this->model)) $o['model'] = $this->model;
        if (isset($this->release)) $o['release'] = $this->release;
        if (isset($this->sdk)) $o['sdk'] = $this->sdk;
        if (isset($this->app_version)) $o['app_version'] = $this->app_version;
        return empty($o) ? new class(){} : $o;
    }
}

class cl_info_tourneeResponse implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $id_operateur=null,
        /** @var string|null */
        public ?string $id_tournee=null,
        /** @var array<_info_tournee>|null */
        public ?array $infos_tournees=null
    ) {
    }

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

class cl_info_tourneeRequest implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $id_operateur=null,
        /** @var string|null */
        public ?string $id_tournee=null,
        /** @var array<_info_tournee>|null */
        public ?array $infos_tournees=null
    ) {
    }

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

PHP cl_info_tourneeRequest 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.

POST /cl_info_tournee/{id_operateur}/{id_tournee} HTTP/1.1 
Host: freemotion-staging.milliet.paris 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"id_operateur":"String","id_tournee":"String","infos_tournees":[{"id_operateur":"String","id_tournee":"String","date":"String","latitude":0,"longitude":0,"aptitude":0,"id_fin_tournee":"String","kilometrage_depart":"String","carburant_correct":0,"ad_blue_allume":0,"platform":"String","brand":"String","model":"String","release":"String","sdk":"String","app_version":"String"}]}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"id_operateur":"String","id_tournee":"String","infos_tournees":[{"id_operateur":"String","id_tournee":"String","date":"String","latitude":0,"longitude":0,"aptitude":0,"id_fin_tournee":"String","kilometrage_depart":"String","carburant_correct":0,"ad_blue_allume":0,"platform":"String","brand":"String","model":"String","release":"String","sdk":"String","app_version":"String"}]}