CL$WS Host : D5239-staging-cl

<back to all web services

cl_multi_photoRequest

The following routes are available for this service:
GET, POST/cl_multi_photo/{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 _multi_photo 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 $id_client=null,
        /** @var string|null */
        public ?string $num_facture=null,
        /** @var int */
        public int $type=0,
        /** @var int */
        public int $index=0,
        /** @var string|null */
        public ?string $path=null,
        /** @var string|null */
        public ?string $photo=null,
        /** @var string|null */
        public ?string $photo_light=null,
        /** @var string|null */
        public ?string $date=null,
        /** @var float */
        public float $latitude=0.0,
        /** @var float */
        public float $longitude=0.0
    ) {
    }

    /** @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['id_client'])) $this->id_client = $o['id_client'];
        if (isset($o['num_facture'])) $this->num_facture = $o['num_facture'];
        if (isset($o['type'])) $this->type = $o['type'];
        if (isset($o['index'])) $this->index = $o['index'];
        if (isset($o['path'])) $this->path = $o['path'];
        if (isset($o['photo'])) $this->photo = $o['photo'];
        if (isset($o['photo_light'])) $this->photo_light = $o['photo_light'];
        if (isset($o['date'])) $this->date = $o['date'];
        if (isset($o['latitude'])) $this->latitude = $o['latitude'];
        if (isset($o['longitude'])) $this->longitude = $o['longitude'];
    }
    
    /** @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->id_client)) $o['id_client'] = $this->id_client;
        if (isset($this->num_facture)) $o['num_facture'] = $this->num_facture;
        if (isset($this->type)) $o['type'] = $this->type;
        if (isset($this->index)) $o['index'] = $this->index;
        if (isset($this->path)) $o['path'] = $this->path;
        if (isset($this->photo)) $o['photo'] = $this->photo;
        if (isset($this->photo_light)) $o['photo_light'] = $this->photo_light;
        if (isset($this->date)) $o['date'] = $this->date;
        if (isset($this->latitude)) $o['latitude'] = $this->latitude;
        if (isset($this->longitude)) $o['longitude'] = $this->longitude;
        return empty($o) ? new class(){} : $o;
    }
}

class cl_multi_photoResponse implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $id_operateur=null,
        /** @var string|null */
        public ?string $id_tournee=null,
        /** @var array<_multi_photo>|null */
        public ?array $multi_photos=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['multi_photos'])) $this->multi_photos = JsonConverters::fromArray('_multi_photo', $o['multi_photos']);
    }
    
    /** @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->multi_photos)) $o['multi_photos'] = JsonConverters::toArray('_multi_photo', $this->multi_photos);
        return empty($o) ? new class(){} : $o;
    }
}

class cl_multi_photoRequest implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $id_operateur=null,
        /** @var string|null */
        public ?string $id_tournee=null,
        /** @var array<_multi_photo>|null */
        public ?array $multi_photos=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['multi_photos'])) $this->multi_photos = JsonConverters::fromArray('_multi_photo', $o['multi_photos']);
    }
    
    /** @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->multi_photos)) $o['multi_photos'] = JsonConverters::toArray('_multi_photo', $this->multi_photos);
        return empty($o) ? new class(){} : $o;
    }
}

PHP cl_multi_photoRequest 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 /cl_multi_photo/{id_operateur}/{id_tournee} HTTP/1.1 
Host: freemotion-staging.milliet.paris 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"id_operateur":"String","id_tournee":"String","multi_photos":[{"id_operateur":"String","id_tournee":"String","id_client":"String","num_facture":"String","type":0,"index":0,"path":"String","photo":"String","photo_light":"String","date":"String","latitude":0,"longitude":0}]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"id_operateur":"String","id_tournee":"String","multi_photos":[{"id_operateur":"String","id_tournee":"String","id_client":"String","num_facture":"String","type":0,"index":0,"path":"String","photo":"String","photo_light":"String","date":"String","latitude":0,"longitude":0}]}