| GET | /customer/{brand}/slim | Get customers list | Get slim list of customers paginated and sorted |
|---|
<?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 GetCustomerInterest implements JsonSerializable
{
public function __construct(
/** @description Interest description */
// @ApiMember(Description="Interest description", IsRequired=true)
/** @var string */
public string $interest='',
/** @description SAP Interest ID, e.g. 'CA-1' */
// @ApiMember(Description="SAP Interest ID, e.g. 'CA-1'", IsRequired=true)
/** @var string */
public string $sapInterestId=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['interest'])) $this->interest = $o['interest'];
if (isset($o['sapInterestId'])) $this->sapInterestId = $o['sapInterestId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->interest)) $o['interest'] = $this->interest;
if (isset($this->sapInterestId)) $o['sapInterestId'] = $this->sapInterestId;
return empty($o) ? new class(){} : $o;
}
}
class GetCustomerHobby implements JsonSerializable
{
public function __construct(
/** @description Hobby description */
// @ApiMember(Description="Hobby description")
/** @var string|null */
public ?string $hobby=null,
/** @description SAP Hobby ID, e.g. 'ART' */
// @ApiMember(Description="SAP Hobby ID, e.g. 'ART'")
/** @var string|null */
public ?string $sapHobbyId=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['hobby'])) $this->hobby = $o['hobby'];
if (isset($o['sapHobbyId'])) $this->sapHobbyId = $o['sapHobbyId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->hobby)) $o['hobby'] = $this->hobby;
if (isset($this->sapHobbyId)) $o['sapHobbyId'] = $this->sapHobbyId;
return empty($o) ? new class(){} : $o;
}
}
class GetCustomerProductCollection implements JsonSerializable
{
public function __construct(
/** @description Product Collection description */
// @ApiMember(Description="Product Collection description", IsRequired=true)
/** @var string */
public string $productCollection='',
/** @description SAP ProductCollection ID, e.g. 'CA-1' */
// @ApiMember(Description="SAP ProductCollection ID, e.g. 'CA-1'", IsRequired=true)
/** @var string */
public string $sapProductCollectionId=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['productCollection'])) $this->productCollection = $o['productCollection'];
if (isset($o['sapProductCollectionId'])) $this->sapProductCollectionId = $o['sapProductCollectionId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->productCollection)) $o['productCollection'] = $this->productCollection;
if (isset($this->sapProductCollectionId)) $o['sapProductCollectionId'] = $this->sapProductCollectionId;
return empty($o) ? new class(){} : $o;
}
}
class ProductCategory implements JsonSerializable
{
public function __construct(
/** @description Brand Category ID */
// @ApiMember(Description="Brand Category ID")
/** @var string|null */
public ?string $brandCategoryId=null,
/** @description Grand Category ID */
// @ApiMember(Description="Grand Category ID", IsRequired=true)
/** @var string */
public string $grandCategoryId='',
/** @description Master Category ID */
// @ApiMember(Description="Master Category ID")
/** @var string|null */
public ?string $masterCategoryId=null,
/** @description Category ID */
// @ApiMember(Description="Category ID")
/** @var string|null */
public ?string $categoryId=null,
/** @description Sub Category ID */
// @ApiMember(Description="Sub Category ID")
/** @var string|null */
public ?string $subCategoryId=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['brandCategoryId'])) $this->brandCategoryId = $o['brandCategoryId'];
if (isset($o['grandCategoryId'])) $this->grandCategoryId = $o['grandCategoryId'];
if (isset($o['masterCategoryId'])) $this->masterCategoryId = $o['masterCategoryId'];
if (isset($o['categoryId'])) $this->categoryId = $o['categoryId'];
if (isset($o['subCategoryId'])) $this->subCategoryId = $o['subCategoryId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->brandCategoryId)) $o['brandCategoryId'] = $this->brandCategoryId;
if (isset($this->grandCategoryId)) $o['grandCategoryId'] = $this->grandCategoryId;
if (isset($this->masterCategoryId)) $o['masterCategoryId'] = $this->masterCategoryId;
if (isset($this->categoryId)) $o['categoryId'] = $this->categoryId;
if (isset($this->subCategoryId)) $o['subCategoryId'] = $this->subCategoryId;
return empty($o) ? new class(){} : $o;
}
}
class SearchCustomer implements JsonSerializable
{
public function __construct(
/** @description Brand */
// @ApiMember(Description="Brand", IsRequired=true)
/** @var string */
public string $brand='',
/** @description POS Legacy */
// @ApiMember(Description="POS Legacy", IsRequired=true)
/** @var array<string>|null */
public ?array $posCodes=null,
/** @description Search key could be: 'Name', 'Email', 'Phone' without prefix, 'BoosterCustomerId' OR 'SapCRMId' */
// @ApiMember(Description="Search key could be: 'Name', 'Email', 'Phone' without prefix, 'BoosterCustomerId' OR 'SapCRMId'")
/** @var string|null */
public ?string $searchKey=null,
/** @description Search by phone number - exact match */
// @ApiMember(Description="Search by phone number - exact match")
/** @var string|null */
public ?string $phoneNumber=null,
/** @description Search by email address - exact match */
// @ApiMember(Description="Search by email address - exact match")
/** @var string|null */
public ?string $email=null,
/** @description Values can be 'it', 'en' etc. */
// @ApiMember(Description="Values can be 'it', 'en' etc.")
/** @var array<string>|null */
public ?array $locationCountryIds=null,
/** @description Client Spending From e.g. '100' */
// @ApiMember(Description="Client Spending From e.g. '100'")
/** @var float|null */
public ?float $clientSpendingFrom=null,
/** @description Client Spending To e.g. '50000' */
// @ApiMember(Description="Client Spending To e.g. '50000'")
/** @var float|null */
public ?float $clientSpendingTo=null,
/** @description Customer Creation Date From e.g. '2022-01-01' */
// @ApiMember(Description="Customer Creation Date From e.g. '2022-01-01'")
/** @var DateTime|null */
public ?DateTime $creationDateFrom=null,
/** @description Customer Creation Date To e.g. '2023-11-01' */
// @ApiMember(Description="Customer Creation Date To e.g. '2023-11-01'")
/** @var DateTime|null */
public ?DateTime $creationDateTo=null,
/** @description Transaction Date From e.g. '2022-01-01' */
// @ApiMember(Description="Transaction Date From e.g. '2022-01-01'")
/** @var DateTime|null */
public ?DateTime $transactionDateFrom=null,
/** @description Transaction Date To e.g. '2023-11-01' */
// @ApiMember(Description="Transaction Date To e.g. '2023-11-01'")
/** @var DateTime|null */
public ?DateTime $transactionDateTo=null,
/** @description Values can be 'true' or 'false' */
// @ApiMember(Description="Values can be 'true' or 'false'")
/** @var bool|null */
public ?bool $canBeContactedByMaison=null,
/** @description Values can be 1 for 'January', 2 for 'February', 3 for 'March', 4 for 'April', 5 for 'May', 6 for 'June', 7 for 'July', 8 for 'August', 9 for 'September', 10 for 'October', 11 for 'November', 12 for 'December' */
// @ApiMember(Description="Values can be 1 for 'January', 2 for 'February', 3 for 'March', 4 for 'April', 5 for 'May', 6 for 'June', 7 for 'July', 8 for 'August', 9 for 'September', 10 for 'October', 11 for 'November', 12 for 'December'")
/** @var array<int>|null */
public ?array $birthdateMonths=null,
/** @description Customer interest filter */
// @ApiMember(Description="Customer interest filter")
/** @var array<GetCustomerInterest>|null */
public ?array $interests=null,
/** @description Customer hobby filter */
// @ApiMember(Description="Customer hobby filter")
/** @var array<GetCustomerHobby>|null */
public ?array $hobbies=null,
/** @description Customer product collection filter */
// @ApiMember(Description="Customer product collection filter")
/** @var array<GetCustomerProductCollection>|null */
public ?array $productCollections=null,
/** @description Customer Status e.g. 'Prospect', 'Client' */
// @ApiMember(Description="Customer Status e.g. 'Prospect', 'Client'")
/** @var array<string>|null */
public ?array $customerStatus=null,
/** @description List of BoosterCustomerIds, e.g. 1234567,1231231,12323423 */
// @ApiMember(Description="List of BoosterCustomerIds, e.g. 1234567,1231231,12323423")
/** @var array<int>|null */
public ?array $boosterCustomerIds=null,
/** @description Values can be 'true' or 'false' */
// @ApiMember(Description="Values can be 'true' or 'false'")
/** @var bool|null */
public ?bool $hasSapCrmError=null,
/** @description Product Categories */
// @ApiMember(Description="Product Categories")
/** @var array<ProductCategory>|null */
public ?array $productCategories=null,
/** @description Sale Reprentative Emails */
// @ApiMember(Description="Sale Reprentative Emails")
/** @var array<string>|null */
public ?array $saleRepresentativeEmails=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['brand'])) $this->brand = $o['brand'];
if (isset($o['posCodes'])) $this->posCodes = JsonConverters::fromArray('string', $o['posCodes']);
if (isset($o['searchKey'])) $this->searchKey = $o['searchKey'];
if (isset($o['phoneNumber'])) $this->phoneNumber = $o['phoneNumber'];
if (isset($o['email'])) $this->email = $o['email'];
if (isset($o['locationCountryIds'])) $this->locationCountryIds = JsonConverters::fromArray('string', $o['locationCountryIds']);
if (isset($o['clientSpendingFrom'])) $this->clientSpendingFrom = $o['clientSpendingFrom'];
if (isset($o['clientSpendingTo'])) $this->clientSpendingTo = $o['clientSpendingTo'];
if (isset($o['creationDateFrom'])) $this->creationDateFrom = JsonConverters::from('DateTime', $o['creationDateFrom']);
if (isset($o['creationDateTo'])) $this->creationDateTo = JsonConverters::from('DateTime', $o['creationDateTo']);
if (isset($o['transactionDateFrom'])) $this->transactionDateFrom = JsonConverters::from('DateTime', $o['transactionDateFrom']);
if (isset($o['transactionDateTo'])) $this->transactionDateTo = JsonConverters::from('DateTime', $o['transactionDateTo']);
if (isset($o['canBeContactedByMaison'])) $this->canBeContactedByMaison = $o['canBeContactedByMaison'];
if (isset($o['birthdateMonths'])) $this->birthdateMonths = JsonConverters::fromArray('int', $o['birthdateMonths']);
if (isset($o['interests'])) $this->interests = JsonConverters::fromArray('GetCustomerInterest', $o['interests']);
if (isset($o['hobbies'])) $this->hobbies = JsonConverters::fromArray('GetCustomerHobby', $o['hobbies']);
if (isset($o['productCollections'])) $this->productCollections = JsonConverters::fromArray('GetCustomerProductCollection', $o['productCollections']);
if (isset($o['customerStatus'])) $this->customerStatus = JsonConverters::fromArray('string', $o['customerStatus']);
if (isset($o['boosterCustomerIds'])) $this->boosterCustomerIds = JsonConverters::fromArray('int', $o['boosterCustomerIds']);
if (isset($o['hasSapCrmError'])) $this->hasSapCrmError = $o['hasSapCrmError'];
if (isset($o['productCategories'])) $this->productCategories = JsonConverters::fromArray('ProductCategory', $o['productCategories']);
if (isset($o['saleRepresentativeEmails'])) $this->saleRepresentativeEmails = JsonConverters::fromArray('string', $o['saleRepresentativeEmails']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->brand)) $o['brand'] = $this->brand;
if (isset($this->posCodes)) $o['posCodes'] = JsonConverters::toArray('string', $this->posCodes);
if (isset($this->searchKey)) $o['searchKey'] = $this->searchKey;
if (isset($this->phoneNumber)) $o['phoneNumber'] = $this->phoneNumber;
if (isset($this->email)) $o['email'] = $this->email;
if (isset($this->locationCountryIds)) $o['locationCountryIds'] = JsonConverters::toArray('string', $this->locationCountryIds);
if (isset($this->clientSpendingFrom)) $o['clientSpendingFrom'] = $this->clientSpendingFrom;
if (isset($this->clientSpendingTo)) $o['clientSpendingTo'] = $this->clientSpendingTo;
if (isset($this->creationDateFrom)) $o['creationDateFrom'] = JsonConverters::to('DateTime', $this->creationDateFrom);
if (isset($this->creationDateTo)) $o['creationDateTo'] = JsonConverters::to('DateTime', $this->creationDateTo);
if (isset($this->transactionDateFrom)) $o['transactionDateFrom'] = JsonConverters::to('DateTime', $this->transactionDateFrom);
if (isset($this->transactionDateTo)) $o['transactionDateTo'] = JsonConverters::to('DateTime', $this->transactionDateTo);
if (isset($this->canBeContactedByMaison)) $o['canBeContactedByMaison'] = $this->canBeContactedByMaison;
if (isset($this->birthdateMonths)) $o['birthdateMonths'] = JsonConverters::toArray('int', $this->birthdateMonths);
if (isset($this->interests)) $o['interests'] = JsonConverters::toArray('GetCustomerInterest', $this->interests);
if (isset($this->hobbies)) $o['hobbies'] = JsonConverters::toArray('GetCustomerHobby', $this->hobbies);
if (isset($this->productCollections)) $o['productCollections'] = JsonConverters::toArray('GetCustomerProductCollection', $this->productCollections);
if (isset($this->customerStatus)) $o['customerStatus'] = JsonConverters::toArray('string', $this->customerStatus);
if (isset($this->boosterCustomerIds)) $o['boosterCustomerIds'] = JsonConverters::toArray('int', $this->boosterCustomerIds);
if (isset($this->hasSapCrmError)) $o['hasSapCrmError'] = $this->hasSapCrmError;
if (isset($this->productCategories)) $o['productCategories'] = JsonConverters::toArray('ProductCategory', $this->productCategories);
if (isset($this->saleRepresentativeEmails)) $o['saleRepresentativeEmails'] = JsonConverters::toArray('string', $this->saleRepresentativeEmails);
return empty($o) ? new class(){} : $o;
}
}
class GetCustomerPaginatedElement implements JsonSerializable
{
public function __construct(
/** @description Booster Customer Id */
// @ApiMember(Description="Booster Customer Id", IsRequired=true)
/** @var int */
public int $boosterCustomerId=0,
/** @description First name */
// @ApiMember(Description="First name", IsRequired=true)
/** @var string */
public string $firstName='',
/** @description Middle name */
// @ApiMember(Description="Middle name", IsRequired=true)
/** @var string */
public string $middleName='',
/** @description Last name */
// @ApiMember(Description="Last name", IsRequired=true)
/** @var string */
public string $lastName='',
/** @description First name Not Latin */
// @ApiMember(Description="First name Not Latin", IsRequired=true)
/** @var string */
public string $firstNameNotLatin='',
/** @description Last name Not Latin */
// @ApiMember(Description="Last name Not Latin", IsRequired=true)
/** @var string */
public string $lastNameNotLatin='',
/** @description Customer phone */
// @ApiMember(Description="Customer phone", IsRequired=true)
/** @var string */
public string $phone='',
/** @description Phone Country Prefix */
// @ApiMember(Description="Phone Country Prefix", IsRequired=true)
/** @var string */
public string $countryPrefix='',
/** @description Customer email */
// @ApiMember(Description="Customer email", IsRequired=true)
/** @var string */
public string $email='',
/** @description Data Sharing Consent */
// @ApiMember(Description="Data Sharing Consent", IsRequired=true)
/** @var bool|null */
public ?bool $dataSharingConsent=null,
/** @description Sellout Transaction Count */
// @ApiMember(Description="Sellout Transaction Count", IsRequired=true)
/** @var int */
public int $selloutTransactionCount=0,
/** @description Elevate Customer ID */
// @ApiMember(Description="Elevate Customer ID")
/** @var string|null */
public ?string $elevateCustomerId=null,
/** @description Elevate Consent Status */
// @ApiMember(Description="Elevate Consent Status")
/** @var string|null */
public ?string $elevateConsentStatus=null,
/** @description Customer Country Id */
// @ApiMember(Description="Customer Country Id")
/** @var string|null */
public ?string $countryId=null,
/** @description Registration date */
// @ApiMember(Description="Registration date")
/** @var DateTime|null */
public ?DateTime $registrationDate=null,
/** @description Sap Crm Error Message */
// @ApiMember(Description="Sap Crm Error Message")
/** @var string|null */
public ?string $sapCrmErrorMessage=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['boosterCustomerId'])) $this->boosterCustomerId = $o['boosterCustomerId'];
if (isset($o['firstName'])) $this->firstName = $o['firstName'];
if (isset($o['middleName'])) $this->middleName = $o['middleName'];
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['phone'])) $this->phone = $o['phone'];
if (isset($o['countryPrefix'])) $this->countryPrefix = $o['countryPrefix'];
if (isset($o['email'])) $this->email = $o['email'];
if (isset($o['dataSharingConsent'])) $this->dataSharingConsent = $o['dataSharingConsent'];
if (isset($o['selloutTransactionCount'])) $this->selloutTransactionCount = $o['selloutTransactionCount'];
if (isset($o['elevateCustomerId'])) $this->elevateCustomerId = $o['elevateCustomerId'];
if (isset($o['elevateConsentStatus'])) $this->elevateConsentStatus = $o['elevateConsentStatus'];
if (isset($o['countryId'])) $this->countryId = $o['countryId'];
if (isset($o['registrationDate'])) $this->registrationDate = JsonConverters::from('DateTime', $o['registrationDate']);
if (isset($o['sapCrmErrorMessage'])) $this->sapCrmErrorMessage = $o['sapCrmErrorMessage'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->boosterCustomerId)) $o['boosterCustomerId'] = $this->boosterCustomerId;
if (isset($this->firstName)) $o['firstName'] = $this->firstName;
if (isset($this->middleName)) $o['middleName'] = $this->middleName;
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->phone)) $o['phone'] = $this->phone;
if (isset($this->countryPrefix)) $o['countryPrefix'] = $this->countryPrefix;
if (isset($this->email)) $o['email'] = $this->email;
if (isset($this->dataSharingConsent)) $o['dataSharingConsent'] = $this->dataSharingConsent;
if (isset($this->selloutTransactionCount)) $o['selloutTransactionCount'] = $this->selloutTransactionCount;
if (isset($this->elevateCustomerId)) $o['elevateCustomerId'] = $this->elevateCustomerId;
if (isset($this->elevateConsentStatus)) $o['elevateConsentStatus'] = $this->elevateConsentStatus;
if (isset($this->countryId)) $o['countryId'] = $this->countryId;
if (isset($this->registrationDate)) $o['registrationDate'] = JsonConverters::to('DateTime', $this->registrationDate);
if (isset($this->sapCrmErrorMessage)) $o['sapCrmErrorMessage'] = $this->sapCrmErrorMessage;
return empty($o) ? new class(){} : $o;
}
}
class GetCustomerPaginatedResponse implements JsonSerializable
{
public function __construct(
/** @description Total Pages */
// @ApiMember(Description="Total Pages", IsRequired=true)
/** @var int */
public int $totalPages=0,
/** @description Total Results */
// @ApiMember(Description="Total Results", IsRequired=true)
/** @var int */
public int $totalResults=0,
/** @description Index of the result set returned */
// @ApiMember(Description="Index of the result set returned", IsRequired=true)
/** @var int */
public int $page=0,
/** @description Size of the result set returned */
// @ApiMember(Description="Size of the result set returned", IsRequired=true)
/** @var int */
public int $items=0,
/** @description List of customers */
// @ApiMember(Description="List of customers", IsRequired=true)
/** @var array<GetCustomerPaginatedElement>|null */
public ?array $elements=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['totalPages'])) $this->totalPages = $o['totalPages'];
if (isset($o['totalResults'])) $this->totalResults = $o['totalResults'];
if (isset($o['page'])) $this->page = $o['page'];
if (isset($o['items'])) $this->items = $o['items'];
if (isset($o['elements'])) $this->elements = JsonConverters::fromArray('GetCustomerPaginatedElement', $o['elements']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->totalPages)) $o['totalPages'] = $this->totalPages;
if (isset($this->totalResults)) $o['totalResults'] = $this->totalResults;
if (isset($this->page)) $o['page'] = $this->page;
if (isset($this->items)) $o['items'] = $this->items;
if (isset($this->elements)) $o['elements'] = JsonConverters::toArray('GetCustomerPaginatedElement', $this->elements);
return empty($o) ? new class(){} : $o;
}
}
class GetCustomerPaginated extends SearchCustomer implements IPagedRequest, JsonSerializable
{
/**
* @param string $brand
* @param array<string>|null $posCodes
* @param string|null $searchKey
* @param string|null $phoneNumber
* @param string|null $email
* @param array<string>|null $locationCountryIds
* @param float|null $clientSpendingFrom
* @param float|null $clientSpendingTo
* @param DateTime|null $creationDateFrom
* @param DateTime|null $creationDateTo
* @param DateTime|null $transactionDateFrom
* @param DateTime|null $transactionDateTo
* @param bool|null $canBeContactedByMaison
* @param array<int>|null $birthdateMonths
* @param array<GetCustomerInterest>|null $interests
* @param array<GetCustomerHobby>|null $hobbies
* @param array<GetCustomerProductCollection>|null $productCollections
* @param array<string>|null $customerStatus
* @param array<int>|null $boosterCustomerIds
* @param bool|null $hasSapCrmError
* @param array<ProductCategory>|null $productCategories
* @param array<string>|null $saleRepresentativeEmails
*/
public function __construct(
string $brand='',
?array $posCodes=null,
?string $searchKey=null,
?string $phoneNumber=null,
?string $email=null,
?array $locationCountryIds=null,
?float $clientSpendingFrom=null,
?float $clientSpendingTo=null,
?DateTime $creationDateFrom=null,
?DateTime $creationDateTo=null,
?DateTime $transactionDateFrom=null,
?DateTime $transactionDateTo=null,
?bool $canBeContactedByMaison=null,
?array $birthdateMonths=null,
?array $interests=null,
?array $hobbies=null,
?array $productCollections=null,
?array $customerStatus=null,
?array $boosterCustomerIds=null,
?bool $hasSapCrmError=null,
?array $productCategories=null,
?array $saleRepresentativeEmails=null,
/** @description Index of the result set returned */
// @ApiMember(Description="Index of the result set returned")
/** @var int */
public int $page=0,
/** @description Size of the result set returned */
// @ApiMember(Description="Size of the result set returned")
/** @var int */
public int $items=0,
/** @description Omit precise record count - save on performance */
// @ApiMember(Description="Omit precise record count - save on performance")
/** @var bool|null */
public ?bool $noCount=null,
/** @description Values can be 'NameDESC', 'NameASC', 'RegASC', 'RegDESC' */
// @ApiMember(Description="Values can be 'NameDESC', 'NameASC', 'RegASC', 'RegDESC'")
/** @var string|null */
public ?string $sortBy=null
) {
parent::__construct($brand,$posCodes,$searchKey,$phoneNumber,$email,$locationCountryIds,$clientSpendingFrom,$clientSpendingTo,$creationDateFrom,$creationDateTo,$transactionDateFrom,$transactionDateTo,$canBeContactedByMaison,$birthdateMonths,$interests,$hobbies,$productCollections,$customerStatus,$boosterCustomerIds,$hasSapCrmError,$productCategories,$saleRepresentativeEmails);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['page'])) $this->page = $o['page'];
if (isset($o['items'])) $this->items = $o['items'];
if (isset($o['noCount'])) $this->noCount = $o['noCount'];
if (isset($o['sortBy'])) $this->sortBy = $o['sortBy'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->page)) $o['page'] = $this->page;
if (isset($this->items)) $o['items'] = $this->items;
if (isset($this->noCount)) $o['noCount'] = $this->noCount;
if (isset($this->sortBy)) $o['sortBy'] = $this->sortBy;
return empty($o) ? new class(){} : $o;
}
}
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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /customer/{brand}/slim HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"totalPages":0,"totalResults":0,"page":0,"items":0}