| POST | /warranty/v1/GetCustomerSuggestion |
|---|
<?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;
}
}
class BaseResponse implements IRespose, JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $_xmlns=null,
/** @var string|null */
public ?string $_type=null,
/** @var string|null */
public ?string $_source=null,
/** @var string|null */
public ?string $_tstamp=null,
/** @var string|null */
public ?string $_user=null,
/** @var string|null */
public ?string $_env=null,
/** @var string|null */
public ?string $_uri=null,
/** @var string|null */
public ?string $_query=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['_xmlns'])) $this->_xmlns = $o['_xmlns'];
if (isset($o['_type'])) $this->_type = $o['_type'];
if (isset($o['_source'])) $this->_source = $o['_source'];
if (isset($o['_tstamp'])) $this->_tstamp = $o['_tstamp'];
if (isset($o['_user'])) $this->_user = $o['_user'];
if (isset($o['_env'])) $this->_env = $o['_env'];
if (isset($o['_uri'])) $this->_uri = $o['_uri'];
if (isset($o['_query'])) $this->_query = $o['_query'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->_xmlns)) $o['_xmlns'] = $this->_xmlns;
if (isset($this->_type)) $o['_type'] = $this->_type;
if (isset($this->_source)) $o['_source'] = $this->_source;
if (isset($this->_tstamp)) $o['_tstamp'] = $this->_tstamp;
if (isset($this->_user)) $o['_user'] = $this->_user;
if (isset($this->_env)) $o['_env'] = $this->_env;
if (isset($this->_uri)) $o['_uri'] = $this->_uri;
if (isset($this->_query)) $o['_query'] = $this->_query;
return empty($o) ? new class(){} : $o;
}
}
class CustomerAddress implements JsonSerializable
{
public function __construct(
/** @var string */
public string $addressId='',
/** @var string|null */
public ?string $description=null,
/** @var string|null */
public ?string $addressLine1=null,
/** @var string|null */
public ?string $addressLine2=null,
/** @var string|null */
public ?string $addressLine3=null,
/** @var string|null */
public ?string $addressLine4=null,
/** @var string|null */
public ?string $addressLine5=null,
/** @var string|null */
public ?string $houseNumber=null,
/** @var string|null */
public ?string $city=null,
/** @var string|null */
public ?string $region=null,
/** @var string|null */
public ?string $county=null,
/** @var string|null */
public ?string $stateOrProvinceId=null,
/** @var string|null */
public ?string $countryId=null,
/** @var string|null */
public ?string $countryDs=null,
/** @var string|null */
public ?string $zipCode=null,
/** @var string|null */
public ?string $addressTypeId=null,
/** @var bool|null */
public ?bool $isMailingAddress=null,
/** @var bool|null */
public ?bool $isMainAddress=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['addressId'])) $this->addressId = $o['addressId'];
if (isset($o['description'])) $this->description = $o['description'];
if (isset($o['addressLine1'])) $this->addressLine1 = $o['addressLine1'];
if (isset($o['addressLine2'])) $this->addressLine2 = $o['addressLine2'];
if (isset($o['addressLine3'])) $this->addressLine3 = $o['addressLine3'];
if (isset($o['addressLine4'])) $this->addressLine4 = $o['addressLine4'];
if (isset($o['addressLine5'])) $this->addressLine5 = $o['addressLine5'];
if (isset($o['houseNumber'])) $this->houseNumber = $o['houseNumber'];
if (isset($o['city'])) $this->city = $o['city'];
if (isset($o['region'])) $this->region = $o['region'];
if (isset($o['county'])) $this->county = $o['county'];
if (isset($o['stateOrProvinceId'])) $this->stateOrProvinceId = $o['stateOrProvinceId'];
if (isset($o['countryId'])) $this->countryId = $o['countryId'];
if (isset($o['countryDs'])) $this->countryDs = $o['countryDs'];
if (isset($o['zipCode'])) $this->zipCode = $o['zipCode'];
if (isset($o['addressTypeId'])) $this->addressTypeId = $o['addressTypeId'];
if (isset($o['isMailingAddress'])) $this->isMailingAddress = $o['isMailingAddress'];
if (isset($o['isMainAddress'])) $this->isMainAddress = $o['isMainAddress'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->addressId)) $o['addressId'] = $this->addressId;
if (isset($this->description)) $o['description'] = $this->description;
if (isset($this->addressLine1)) $o['addressLine1'] = $this->addressLine1;
if (isset($this->addressLine2)) $o['addressLine2'] = $this->addressLine2;
if (isset($this->addressLine3)) $o['addressLine3'] = $this->addressLine3;
if (isset($this->addressLine4)) $o['addressLine4'] = $this->addressLine4;
if (isset($this->addressLine5)) $o['addressLine5'] = $this->addressLine5;
if (isset($this->houseNumber)) $o['houseNumber'] = $this->houseNumber;
if (isset($this->city)) $o['city'] = $this->city;
if (isset($this->region)) $o['region'] = $this->region;
if (isset($this->county)) $o['county'] = $this->county;
if (isset($this->stateOrProvinceId)) $o['stateOrProvinceId'] = $this->stateOrProvinceId;
if (isset($this->countryId)) $o['countryId'] = $this->countryId;
if (isset($this->countryDs)) $o['countryDs'] = $this->countryDs;
if (isset($this->zipCode)) $o['zipCode'] = $this->zipCode;
if (isset($this->addressTypeId)) $o['addressTypeId'] = $this->addressTypeId;
if (isset($this->isMailingAddress)) $o['isMailingAddress'] = $this->isMailingAddress;
if (isset($this->isMainAddress)) $o['isMainAddress'] = $this->isMainAddress;
return empty($o) ? new class(){} : $o;
}
}
class CustomerEmail implements JsonSerializable
{
public function __construct(
/** @var string */
public string $emailId='',
/** @var string|null */
public ?string $description=null,
/** @var string|null */
public ?string $email=null,
/** @var bool|null */
public ?bool $isMainEmail=null,
/** @var Lookup<string>|null */
public ?Lookup $type=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['emailId'])) $this->emailId = $o['emailId'];
if (isset($o['description'])) $this->description = $o['description'];
if (isset($o['email'])) $this->email = $o['email'];
if (isset($o['isMainEmail'])) $this->isMainEmail = $o['isMainEmail'];
if (isset($o['type'])) $this->type = JsonConverters::from(JsonConverters::context('Lookup',genericArgs:['Char']), $o['type']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->emailId)) $o['emailId'] = $this->emailId;
if (isset($this->description)) $o['description'] = $this->description;
if (isset($this->email)) $o['email'] = $this->email;
if (isset($this->isMainEmail)) $o['isMainEmail'] = $this->isMainEmail;
if (isset($this->type)) $o['type'] = JsonConverters::to(JsonConverters::context('Lookup',genericArgs:['Char']), $this->type);
return empty($o) ? new class(){} : $o;
}
}
class CustomerPhone implements JsonSerializable
{
public function __construct(
/** @var string */
public string $phoneId='',
/** @var string|null */
public ?string $description=null,
/** @var string|null */
public ?string $phone=null,
/** @var bool|null */
public ?bool $isMainPhone=null,
/** @var string|null */
public ?string $prefixCountryId=null,
/** @var string|null */
public ?string $telephonePrefix=null,
/** @var Lookup<int>|null */
public ?Lookup $type=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['phoneId'])) $this->phoneId = $o['phoneId'];
if (isset($o['description'])) $this->description = $o['description'];
if (isset($o['phone'])) $this->phone = $o['phone'];
if (isset($o['isMainPhone'])) $this->isMainPhone = $o['isMainPhone'];
if (isset($o['prefixCountryId'])) $this->prefixCountryId = $o['prefixCountryId'];
if (isset($o['telephonePrefix'])) $this->telephonePrefix = $o['telephonePrefix'];
if (isset($o['type'])) $this->type = JsonConverters::from(JsonConverters::context('Lookup',genericArgs:['int']), $o['type']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->phoneId)) $o['phoneId'] = $this->phoneId;
if (isset($this->description)) $o['description'] = $this->description;
if (isset($this->phone)) $o['phone'] = $this->phone;
if (isset($this->isMainPhone)) $o['isMainPhone'] = $this->isMainPhone;
if (isset($this->prefixCountryId)) $o['prefixCountryId'] = $this->prefixCountryId;
if (isset($this->telephonePrefix)) $o['telephonePrefix'] = $this->telephonePrefix;
if (isset($this->type)) $o['type'] = JsonConverters::to(JsonConverters::context('Lookup',genericArgs:['int']), $this->type);
return empty($o) ? new class(){} : $o;
}
}
class GetCustomerSuggestionResponse extends BaseResponse implements JsonSerializable
{
/**
* @param string|null $_xmlns
* @param string|null $_type
* @param string|null $_source
* @param string|null $_tstamp
* @param string|null $_user
* @param string|null $_env
* @param string|null $_uri
* @param string|null $_query
*/
public function __construct(
?string $_xmlns=null,
?string $_type=null,
?string $_source=null,
?string $_tstamp=null,
?string $_user=null,
?string $_env=null,
?string $_uri=null,
?string $_query=null,
/** @var string|null */
public ?string $customerType=null,
/** @var string|null */
public ?string $customerRef=null,
/** @var int|null */
public ?int $title=null,
/** @var string|null */
public ?string $titleDs=null,
/** @var string|null */
public ?string $firstName=null,
/** @var string|null */
public ?string $lastName=null,
/** @var string|null */
public ?string $firstNameNotLatin=null,
/** @var string|null */
public ?string $lastNameNotLatin=null,
/** @var string|null */
public ?string $birthday=null,
/** @var string|null */
public ?string $birthDayEventId=null,
/** @var string|null */
public ?string $weddingDate=null,
/** @var bool|null */
public ?bool $canBeContacted=null,
/** @var string|null */
public ?string $seller=null,
/** @var string|null */
public ?string $language=null,
/** @var string|null */
public ?string $languageDs=null,
/** @var string|null */
public ?string $nameSuffix=null,
/** @var string|null */
public ?string $gender=null,
/** @var string|null */
public ?string $companyName=null,
/** @var string|null */
public ?string $middleName=null,
/** @var string|null */
public ?string $customerId=null,
/** @var string|null */
public ?string $personId=null,
/** @var int|null */
public ?int $boosterCustomerId=null,
/** @var int|null */
public ?int $posOwnerId=null,
/** @var string|null */
public ?string $brandOwnerId=null,
/** @var int|null */
public ?int $businessUnitId=null,
/** @var string|null */
public ?string $sapGenderId=null,
/** @var bool|null */
public ?bool $allowStoreDataAbroad=null,
/** @var bool|null */
public ?bool $privacyPolicyAcceptanceStorage=null,
/** @var bool|null */
public ?bool $tvAllowStoreDataAbroad=null,
/** @var bool|null */
public ?bool $tvPrivacyPolicyAcceptanceStorage=null,
/** @var bool|null */
public ?bool $contactByMail=null,
/** @var bool|null */
public ?bool $contactByEmail=null,
/** @var bool|null */
public ?bool $contactByPhone=null,
/** @var bool|null */
public ?bool $contactBySMS=null,
/** @var bool|null */
public ?bool $contactBySocialMedia=null,
/** @var array<CustomerAddress>|null */
public ?array $addresses=null,
/** @var array<CustomerEmail>|null */
public ?array $emails=null,
/** @var array<CustomerPhone>|null */
public ?array $phones=null,
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null
) {
parent::__construct($_xmlns,$_type,$_source,$_tstamp,$_user,$_env,$_uri,$_query);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['customerType'])) $this->customerType = $o['customerType'];
if (isset($o['customerRef'])) $this->customerRef = $o['customerRef'];
if (isset($o['title'])) $this->title = $o['title'];
if (isset($o['titleDs'])) $this->titleDs = $o['titleDs'];
if (isset($o['firstName'])) $this->firstName = $o['firstName'];
if (isset($o['lastName'])) $this->lastName = $o['lastName'];
if (isset($o['firstNameNotLatin'])) $this->firstNameNotLatin = $o['firstNameNotLatin'];
if (isset($o['lastNameNotLatin'])) $this->lastNameNotLatin = $o['lastNameNotLatin'];
if (isset($o['birthday'])) $this->birthday = $o['birthday'];
if (isset($o['birthDayEventId'])) $this->birthDayEventId = $o['birthDayEventId'];
if (isset($o['weddingDate'])) $this->weddingDate = $o['weddingDate'];
if (isset($o['canBeContacted'])) $this->canBeContacted = $o['canBeContacted'];
if (isset($o['seller'])) $this->seller = $o['seller'];
if (isset($o['language'])) $this->language = $o['language'];
if (isset($o['languageDs'])) $this->languageDs = $o['languageDs'];
if (isset($o['nameSuffix'])) $this->nameSuffix = $o['nameSuffix'];
if (isset($o['gender'])) $this->gender = $o['gender'];
if (isset($o['companyName'])) $this->companyName = $o['companyName'];
if (isset($o['middleName'])) $this->middleName = $o['middleName'];
if (isset($o['customerId'])) $this->customerId = $o['customerId'];
if (isset($o['personId'])) $this->personId = $o['personId'];
if (isset($o['boosterCustomerId'])) $this->boosterCustomerId = $o['boosterCustomerId'];
if (isset($o['posOwnerId'])) $this->posOwnerId = $o['posOwnerId'];
if (isset($o['brandOwnerId'])) $this->brandOwnerId = $o['brandOwnerId'];
if (isset($o['businessUnitId'])) $this->businessUnitId = $o['businessUnitId'];
if (isset($o['sapGenderId'])) $this->sapGenderId = $o['sapGenderId'];
if (isset($o['allowStoreDataAbroad'])) $this->allowStoreDataAbroad = $o['allowStoreDataAbroad'];
if (isset($o['privacyPolicyAcceptanceStorage'])) $this->privacyPolicyAcceptanceStorage = $o['privacyPolicyAcceptanceStorage'];
if (isset($o['tvAllowStoreDataAbroad'])) $this->tvAllowStoreDataAbroad = $o['tvAllowStoreDataAbroad'];
if (isset($o['tvPrivacyPolicyAcceptanceStorage'])) $this->tvPrivacyPolicyAcceptanceStorage = $o['tvPrivacyPolicyAcceptanceStorage'];
if (isset($o['contactByMail'])) $this->contactByMail = $o['contactByMail'];
if (isset($o['contactByEmail'])) $this->contactByEmail = $o['contactByEmail'];
if (isset($o['contactByPhone'])) $this->contactByPhone = $o['contactByPhone'];
if (isset($o['contactBySMS'])) $this->contactBySMS = $o['contactBySMS'];
if (isset($o['contactBySocialMedia'])) $this->contactBySocialMedia = $o['contactBySocialMedia'];
if (isset($o['addresses'])) $this->addresses = JsonConverters::fromArray('CustomerAddress', $o['addresses']);
if (isset($o['emails'])) $this->emails = JsonConverters::fromArray('CustomerEmail', $o['emails']);
if (isset($o['phones'])) $this->phones = JsonConverters::fromArray('CustomerPhone', $o['phones']);
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->customerType)) $o['customerType'] = $this->customerType;
if (isset($this->customerRef)) $o['customerRef'] = $this->customerRef;
if (isset($this->title)) $o['title'] = $this->title;
if (isset($this->titleDs)) $o['titleDs'] = $this->titleDs;
if (isset($this->firstName)) $o['firstName'] = $this->firstName;
if (isset($this->lastName)) $o['lastName'] = $this->lastName;
if (isset($this->firstNameNotLatin)) $o['firstNameNotLatin'] = $this->firstNameNotLatin;
if (isset($this->lastNameNotLatin)) $o['lastNameNotLatin'] = $this->lastNameNotLatin;
if (isset($this->birthday)) $o['birthday'] = $this->birthday;
if (isset($this->birthDayEventId)) $o['birthDayEventId'] = $this->birthDayEventId;
if (isset($this->weddingDate)) $o['weddingDate'] = $this->weddingDate;
if (isset($this->canBeContacted)) $o['canBeContacted'] = $this->canBeContacted;
if (isset($this->seller)) $o['seller'] = $this->seller;
if (isset($this->language)) $o['language'] = $this->language;
if (isset($this->languageDs)) $o['languageDs'] = $this->languageDs;
if (isset($this->nameSuffix)) $o['nameSuffix'] = $this->nameSuffix;
if (isset($this->gender)) $o['gender'] = $this->gender;
if (isset($this->companyName)) $o['companyName'] = $this->companyName;
if (isset($this->middleName)) $o['middleName'] = $this->middleName;
if (isset($this->customerId)) $o['customerId'] = $this->customerId;
if (isset($this->personId)) $o['personId'] = $this->personId;
if (isset($this->boosterCustomerId)) $o['boosterCustomerId'] = $this->boosterCustomerId;
if (isset($this->posOwnerId)) $o['posOwnerId'] = $this->posOwnerId;
if (isset($this->brandOwnerId)) $o['brandOwnerId'] = $this->brandOwnerId;
if (isset($this->businessUnitId)) $o['businessUnitId'] = $this->businessUnitId;
if (isset($this->sapGenderId)) $o['sapGenderId'] = $this->sapGenderId;
if (isset($this->allowStoreDataAbroad)) $o['allowStoreDataAbroad'] = $this->allowStoreDataAbroad;
if (isset($this->privacyPolicyAcceptanceStorage)) $o['privacyPolicyAcceptanceStorage'] = $this->privacyPolicyAcceptanceStorage;
if (isset($this->tvAllowStoreDataAbroad)) $o['tvAllowStoreDataAbroad'] = $this->tvAllowStoreDataAbroad;
if (isset($this->tvPrivacyPolicyAcceptanceStorage)) $o['tvPrivacyPolicyAcceptanceStorage'] = $this->tvPrivacyPolicyAcceptanceStorage;
if (isset($this->contactByMail)) $o['contactByMail'] = $this->contactByMail;
if (isset($this->contactByEmail)) $o['contactByEmail'] = $this->contactByEmail;
if (isset($this->contactByPhone)) $o['contactByPhone'] = $this->contactByPhone;
if (isset($this->contactBySMS)) $o['contactBySMS'] = $this->contactBySMS;
if (isset($this->contactBySocialMedia)) $o['contactBySocialMedia'] = $this->contactBySocialMedia;
if (isset($this->addresses)) $o['addresses'] = JsonConverters::toArray('CustomerAddress', $this->addresses);
if (isset($this->emails)) $o['emails'] = JsonConverters::toArray('CustomerEmail', $this->emails);
if (isset($this->phones)) $o['phones'] = JsonConverters::toArray('CustomerPhone', $this->phones);
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
return empty($o) ? new class(){} : $o;
}
}
/**
* @template BaseRequest of GetCustomerSuggestionResponse
*/
class GetCustomerSuggestion 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 $emailAddress=null,
/** @var int */
public int $posId=0,
/** @var string|null */
public ?string $brandTrigram=null,
/** @var string|null */
public ?string $phoneNumber=null,
/** @var string|null */
public ?string $prefixCountryId=null,
/** @var string|null */
public ?string $countryId=null
) {
parent::__construct($sid,$app,$_os,$_appVersion,$_searchMethod);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['emailAddress'])) $this->emailAddress = $o['emailAddress'];
if (isset($o['posId'])) $this->posId = $o['posId'];
if (isset($o['brandTrigram'])) $this->brandTrigram = $o['brandTrigram'];
if (isset($o['phoneNumber'])) $this->phoneNumber = $o['phoneNumber'];
if (isset($o['prefixCountryId'])) $this->prefixCountryId = $o['prefixCountryId'];
if (isset($o['countryId'])) $this->countryId = $o['countryId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->emailAddress)) $o['emailAddress'] = $this->emailAddress;
if (isset($this->posId)) $o['posId'] = $this->posId;
if (isset($this->brandTrigram)) $o['brandTrigram'] = $this->brandTrigram;
if (isset($this->phoneNumber)) $o['phoneNumber'] = $this->phoneNumber;
if (isset($this->prefixCountryId)) $o['prefixCountryId'] = $this->prefixCountryId;
if (isset($this->countryId)) $o['countryId'] = $this->countryId;
return empty($o) ? new class(){} : $o;
}
}
/**
* @template T
*/
class Lookup implements JsonSerializable
{
public array $genericArgs = [];
public static function create(array $genericArgs=[]): Lookup {
$to = new Lookup();
$to->genericArgs = $genericArgs;
return $to;
}
public function __construct(
/** @var T|null */
public mixed $Id=null,
/** @var string|null */
public mixed $Description=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = JsonConverters::from($this->genericArgs[0], $o['Id']);
if (isset($o['Description'])) $this->Description = $o['Description'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = JsonConverters::to($this->genericArgs[0], $this->Id);
if (isset($this->Description)) $o['Description'] = $this->Description;
return empty($o) ? new class(){} : $o;
}
}
PHP GetCustomerSuggestion DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /warranty/v1/GetCustomerSuggestion HTTP/1.1
Host: qp-microservices-booster.richemont.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"emailAddress":"String","posId":0,"brandTrigram":"String","phoneNumber":"String","prefixCountryId":"String","countryId":"String","sid":"String","app":"String","_os":"String","_appVersion":"String","_searchMethod":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"customerType":"String","customerRef":"String","title":0,"titleDs":"String","firstName":"String","lastName":"String","firstNameNotLatin":"String","lastNameNotLatin":"String","birthday":"String","birthDayEventId":"00000000000000000000000000000000","weddingDate":"String","canBeContacted":false,"seller":"00000000000000000000000000000000","language":"String","languageDs":"String","nameSuffix":"String","gender":"String","companyName":"String","middleName":"String","customerId":"00000000000000000000000000000000","personId":"00000000000000000000000000000000","boosterCustomerId":0,"posOwnerId":0,"brandOwnerId":"String","businessUnitId":0,"sapGenderId":"String","allowStoreDataAbroad":false,"privacyPolicyAcceptanceStorage":false,"tvAllowStoreDataAbroad":false,"tvPrivacyPolicyAcceptanceStorage":false,"contactByMail":false,"contactByEmail":false,"contactByPhone":false,"contactBySMS":false,"contactBySocialMedia":false,"addresses":[{"addressId":"00000000000000000000000000000000","description":"String","addressLine1":"String","addressLine2":"String","addressLine3":"String","addressLine4":"String","addressLine5":"String","houseNumber":"String","city":"String","region":"String","county":"String","stateOrProvinceId":"String","countryId":"String","countryDs":"String","zipCode":"String","addressTypeId":"String","isMailingAddress":false,"isMainAddress":false}],"emails":[{"emailId":"00000000000000000000000000000000","description":"String","email":"String","isMainEmail":false,"type":{"Id":"\u0000","Description":"String"}}],"phones":[{"phoneId":"00000000000000000000000000000000","description":"String","phone":"String","isMainPhone":false,"prefixCountryId":"String","telephonePrefix":"String","type":{"Id":0,"Description":"String"}}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"_xmlns":"String","_type":"String","_source":"String","_tstamp":"String","_user":"String","_env":"String","_uri":"String","_query":"String"}