Richemont.Booster2.PublicApi

<back to all web services

GetPosAuth

Requires Authentication
The following routes are available for this service:
GET/security/{brand}/{posCode}/{mnemonicCode}Get information if a Pos/User is authorized on a specific function
<?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 GetPosAuthResponse implements JsonSerializable
{
    public function __construct(
        /** @description Is Authorized */
        // @ApiMember(Description="Is Authorized", IsRequired=true)
        /** @var bool|null */
        public ?bool $isAuthorized=null
    ) {
    }

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

class GetPosAuth implements JsonSerializable
{
    public function __construct(
        /** @description Brand Trigram */
        // @ApiMember(Description="Brand Trigram", IsRequired=true)
        /** @var string */
        public string $brand='',

        /** @description POS Legacy */
        // @ApiMember(Description="POS Legacy", IsRequired=true)
        /** @var string */
        public string $posCode='',

        /** @description Mnemonic Petal Code */
        // @ApiMember(Description="Mnemonic Petal Code", IsRequired=true)
        /** @var string */
        public string $mnemonicCode=''
    ) {
    }

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

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

GET /security/{brand}/{posCode}/{mnemonicCode} HTTP/1.1 
Host: dev-api-booster.richemont.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"isAuthorized":false}