Richemont.Booster2.PublicApi

<back to all web services

GetFilterValues

Requires Authentication
The following routes are available for this service:
GET/customer/{brand}/filter-valuesGet filters for customer search
<?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 FilterValues implements JsonSerializable
{
    public function __construct(
        /** @description Id */
        // @ApiMember(Description="Id", IsRequired=true)
        /** @var string */
        public string $id='',

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

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

class GetFilterValuesResponse implements JsonSerializable
{
    public function __construct(
        /** @var array<FilterValues>|null */
        public ?array $salesReps=null
    ) {
    }

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

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

        /** @description Fields */
        // @ApiMember(Description="Fields", IsRequired=true)
        /** @var array<string>|null */
        public ?array $fields=null,

        /** @description List of POS Legacy */
        // @ApiMember(Description="List of POS Legacy", IsRequired=true)
        /** @var array<string>|null */
        public ?array $posCodes=null
    ) {
    }

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

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

GET /customer/{brand}/filter-values HTTP/1.1 
Host: dev-api-booster.richemont.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"salesReps":[{"id":"String","name":"String"}]}