CL$WS Host : D5239-staging-cl

<back to all web services

cl_repriseRequest

The following routes are available for this service:
GET, POST/cl_reprise/{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 _reprise 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 $num_facture=null,
        /** @var string|null */
        public ?string $type_reprise=null,
        /** @var string|null */
        public ?string $article_id=null,
        /** @var int */
        public int $article_absent=0,
        /** @var int */
        public int $quantite=0,
        /** @var int */
        public int $reintegrable=0,
        /** @var string|null */
        public ?string $commentaire=null,
        /** @var string|null */
        public ?string $date=null,
        /** @var float|null */
        public ?float $qte_uv=null,
        /** @var float|null */
        public ?float $qte_uc=null,
        /** @var float|null */
        public ?float $cdt_uc=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['num_facture'])) $this->num_facture = $o['num_facture'];
        if (isset($o['type_reprise'])) $this->type_reprise = $o['type_reprise'];
        if (isset($o['article_id'])) $this->article_id = $o['article_id'];
        if (isset($o['article_absent'])) $this->article_absent = $o['article_absent'];
        if (isset($o['quantite'])) $this->quantite = $o['quantite'];
        if (isset($o['reintegrable'])) $this->reintegrable = $o['reintegrable'];
        if (isset($o['commentaire'])) $this->commentaire = $o['commentaire'];
        if (isset($o['date'])) $this->date = $o['date'];
        if (isset($o['qte_uv'])) $this->qte_uv = $o['qte_uv'];
        if (isset($o['qte_uc'])) $this->qte_uc = $o['qte_uc'];
        if (isset($o['cdt_uc'])) $this->cdt_uc = $o['cdt_uc'];
    }
    
    /** @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->num_facture)) $o['num_facture'] = $this->num_facture;
        if (isset($this->type_reprise)) $o['type_reprise'] = $this->type_reprise;
        if (isset($this->article_id)) $o['article_id'] = $this->article_id;
        if (isset($this->article_absent)) $o['article_absent'] = $this->article_absent;
        if (isset($this->quantite)) $o['quantite'] = $this->quantite;
        if (isset($this->reintegrable)) $o['reintegrable'] = $this->reintegrable;
        if (isset($this->commentaire)) $o['commentaire'] = $this->commentaire;
        if (isset($this->date)) $o['date'] = $this->date;
        if (isset($this->qte_uv)) $o['qte_uv'] = $this->qte_uv;
        if (isset($this->qte_uc)) $o['qte_uc'] = $this->qte_uc;
        if (isset($this->cdt_uc)) $o['cdt_uc'] = $this->cdt_uc;
        return empty($o) ? new class(){} : $o;
    }
}

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

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

PHP cl_repriseRequest 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_reprise/{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","reprises":[{"id_operateur":"String","id_tournee":"String","num_facture":"String","type_reprise":"String","article_id":"String","article_absent":0,"quantite":0,"reintegrable":0,"commentaire":"String","date":"String","qte_uv":0,"qte_uc":0,"cdt_uc":0}]}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"id_operateur":"String","id_tournee":"String","reprises":[{"id_operateur":"String","id_tournee":"String","num_facture":"String","type_reprise":"String","article_id":"String","article_absent":0,"quantite":0,"reintegrable":0,"commentaire":"String","date":"String","qte_uv":0,"qte_uc":0,"cdt_uc":0}]}