Booster.Microservices

<back to all web services

GetBrandPrivacyPolicy

Requires Authentication
The following routes are available for this service:
POST/warranty/v1/GetBrandPrivacyPolicy
<?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};


/**
 * @template TResponse
 */
class BaseRequest implements IRequest, JsonSerializable
{
    public array $genericArgs = [];
    public static function create(array $genericArgs=[]): BaseRequest {
        $to = new BaseRequest();
        $to->genericArgs = $genericArgs;
        return $to;
    }

    public function __construct(
        /** @var string|null */
        public mixed $sid=null,
        /** @var string|null */
        public mixed $app=null,
        /** @var string|null */
        public mixed $_os=null,
        /** @var string|null */
        public mixed $_appVersion=null,
        /** @var string|null */
        public mixed $_searchMethod=null
    ) {
    }

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

/**
 * @template BaseRequest of String
 */
class GetBrandPrivacyPolicy extends BaseRequest implements JsonSerializable
{
    /**
     * @param string|null $sid
     * @param string|null $app
     * @param string|null $_os
     * @param string|null $_appVersion
     * @param string|null $_searchMethod
     */
    public function __construct(
        ?string $sid=null,
        ?string $app=null,
        ?string $_os=null,
        ?string $_appVersion=null,
        ?string $_searchMethod=null,
        /** @var string|null */
        public ?string $countryId=null,
        /** @var string|null */
        public ?string $languageId=null,
        /** @var string|null */
        public ?string $brandTrigram=null,
        /** @var int|null */
        public ?int $posId=null
    ) {
        parent::__construct($sid,$app,$_os,$_appVersion,$_searchMethod);
    }

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

PHP GetBrandPrivacyPolicy 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 /warranty/v1/GetBrandPrivacyPolicy HTTP/1.1 
Host: qp-microservices-booster.richemont.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"countryId":"String","languageId":"String","brandTrigram":"String","posId":0,"sid":"String","app":"String","_os":"String","_appVersion":"String","_searchMethod":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

(string)