Richemont.Booster2.PublicApi

<back to all web services

CreateTransferRequest

Requires Authentication
The following routes are available for this service:
POST/stock/{brand}/transferRequestCreate a Transfer RequestCreate a Consignment Transfer Request
<?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 CreateTransferRequest implements JsonSerializable
{
    public function __construct(
        /** @description Brand Trigram, e.g. CAR, IWC */
        // @ApiMember(Description="Brand Trigram, e.g. CAR, IWC", IsRequired=true)
        /** @var string */
        public string $brand='',

        /** @description POS Code of the transfer Source POS, e.g. ES100:102048 */
        // @ApiMember(Description="POS Code of the transfer Source POS, e.g. ES100:102048", IsRequired=true)
        /** @var string */
        public string $posCodeFrom='',

        /** @description POS Code of the transfer Target POS, e.g. ES100:101469 */
        // @ApiMember(Description="POS Code of the transfer Target POS, e.g. ES100:101469", IsRequired=true)
        /** @var string */
        public string $posCodeTo='',

        /** @description Legacy Article Code of the item to be transferred */
        // @ApiMember(Description="Legacy Article Code of the item to be transferred", IsRequired=true)
        /** @var string */
        public string $articleCode='',

        /** @description Notes */
        // @ApiMember(Description="Notes")
        /** @var string|null */
        public ?string $notes=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['brand'])) $this->brand = $o['brand'];
        if (isset($o['posCodeFrom'])) $this->posCodeFrom = $o['posCodeFrom'];
        if (isset($o['posCodeTo'])) $this->posCodeTo = $o['posCodeTo'];
        if (isset($o['articleCode'])) $this->articleCode = $o['articleCode'];
        if (isset($o['notes'])) $this->notes = $o['notes'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->brand)) $o['brand'] = $this->brand;
        if (isset($this->posCodeFrom)) $o['posCodeFrom'] = $this->posCodeFrom;
        if (isset($this->posCodeTo)) $o['posCodeTo'] = $this->posCodeTo;
        if (isset($this->articleCode)) $o['articleCode'] = $this->articleCode;
        if (isset($this->notes)) $o['notes'] = $this->notes;
        return empty($o) ? new class(){} : $o;
    }
}

PHP CreateTransferRequest 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 /stock/{brand}/transferRequest HTTP/1.1 
Host: dev-api-booster.richemont.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"brand":"String","posCodeFrom":"String","posCodeTo":"String","articleCode":"String","notes":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{}