| PUT | /posIdentity/{brand} | Update a POS Brand Identity |
|---|
<?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 UpdatePOSBrandIdentityResponse implements JsonSerializable
{
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
return empty($o) ? new class(){} : $o;
}
}
class UpdatePOSBrandIdentity implements JsonSerializable
{
public function __construct(
/** @description Point of Sale Code, e.g. ES100:102048 */
// @ApiMember(Description="Point of Sale Code, e.g. ES100:102048", IsRequired=true)
/** @var string */
public string $posCode='',
/** @description Brand Triagram, e.g. CAR, IWC, VAC */
// @ApiMember(Description="Brand Triagram, e.g. CAR, IWC, VAC", IsRequired=true)
/** @var string */
public string $brand='',
/** @description Alternative Country ISO code, e.g. az, ca, us. max length 50 characters */
// @ApiMember(Description="Alternative Country ISO code, e.g. az, ca, us. max length 50 characters")
/** @var string|null */
public ?string $alternativeCountry=null,
/** @description Alternative Zip Code of POS, max length 50 characters */
// @ApiMember(Description="Alternative Zip Code of POS, max length 50 characters")
/** @var string|null */
public ?string $alternativeZipCode=null,
/** @description Alternative Street Name and Number of the POS */
// @ApiMember(Description="Alternative Street Name and Number of the POS")
/** @var string|null */
public ?string $alternativeStreet=null,
/** @description Alternative City name of the POS, max length 50 characters */
// @ApiMember(Description="Alternative City name of the POS, max length 50 characters")
/** @var string|null */
public ?string $alternativeCity=null,
/** @description Total Maison Commercial Surface */
// @ApiMember(Description="Total Maison Commercial Surface")
/** @var float|null */
public ?float $brandWatchesCommercialSurface=null,
/** @description Watches Commercial Area */
// @ApiMember(Description="Watches Commercial Area")
/** @var float|null */
public ?float $posWatchesCommercialSurface=null,
/** @description Website URL (Partner Website), max length 200 characters */
// @ApiMember(Description="Website URL (Partner Website), max length 200 characters")
/** @var string|null */
public ?string $website=null,
/** @description SWT POS type */
// @ApiMember(Description="SWT POS type")
/** @var int|null */
public ?int $posType=null,
/** @description Post Contract Status Id */
// @ApiMember(Description="Post Contract Status Id")
/** @var int|null */
public ?int $postContractStatusId=null,
/** @description Opening Date */
// @ApiMember(Description="Opening Date")
/** @var DateTime|null */
public ?DateTime $openingDate=null,
/** @description Closing Date */
// @ApiMember(Description="Closing Date")
/** @var DateTime|null */
public ?DateTime $closingDate=null,
/** @description Sub Market Country ID */
// @ApiMember(Description="Sub Market Country ID")
/** @var int|null */
public ?int $subMarketCountryId=null,
/** @description Facility Type Id */
// @ApiMember(Description="Facility Type Id")
/** @var int|null */
public ?int $addressTypeId=null,
/** @description Facility Additional Information */
// @ApiMember(Description="Facility Additional Information")
/** @var string|null */
public ?string $mallOrDeptStoreUnitNumber=null,
/** @description Number of Floors */
// @ApiMember(Description="Number of Floors")
/** @var int|null */
public ?int $floorNumber=null,
/** @description GPS Latitude, value can only be between -90.00 and 90.00 */
// @ApiMember(Description="GPS Latitude, value can only be between -90.00 and 90.00")
/** @var float|null */
public ?float $gpsLatitude=null,
/** @description GPS Longitude, value can only be between -90.00 and 90.00 */
// @ApiMember(Description="GPS Longitude, value can only be between -90.00 and 90.00")
/** @var float|null */
public ?float $gpsLongitude=null,
/** @description Time Vallee */
// @ApiMember(Description="Time Vallee", IsRequired=true)
/** @var bool|null */
public ?bool $timeVallee=null,
/** @description Last Visit Date */
// @ApiMember(Description="Last Visit Date")
/** @var DateTime|null */
public ?DateTime $lastVisitDate=null,
/** @description EPartnerProgram */
// @ApiMember(Description="EPartnerProgram")
/** @var int|null */
public ?int $ePartnerProgram=null,
/** @description ePartner Launch Date */
// @ApiMember(Description="ePartner Launch Date")
/** @var DateTime|null */
public ?DateTime $ePartnerLaunchDate=null,
/** @description ePartner Scoring */
// @ApiMember(Description="ePartner Scoring")
/** @var int|null */
public ?int $ePartnerScoring=null,
/** @description Social Media */
// @ApiMember(Description="Social Media")
/** @var bool|null */
public ?bool $socialMedia=null,
/** @description SEO */
// @ApiMember(Description="SEO")
/** @var bool|null */
public ?bool $seo=null,
/** @description Google Business */
// @ApiMember(Description="Google Business")
/** @var bool|null */
public ?bool $googleBusiness=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['posCode'])) $this->posCode = $o['posCode'];
if (isset($o['brand'])) $this->brand = $o['brand'];
if (isset($o['alternativeCountry'])) $this->alternativeCountry = $o['alternativeCountry'];
if (isset($o['alternativeZipCode'])) $this->alternativeZipCode = $o['alternativeZipCode'];
if (isset($o['alternativeStreet'])) $this->alternativeStreet = $o['alternativeStreet'];
if (isset($o['alternativeCity'])) $this->alternativeCity = $o['alternativeCity'];
if (isset($o['brandWatchesCommercialSurface'])) $this->brandWatchesCommercialSurface = $o['brandWatchesCommercialSurface'];
if (isset($o['posWatchesCommercialSurface'])) $this->posWatchesCommercialSurface = $o['posWatchesCommercialSurface'];
if (isset($o['website'])) $this->website = $o['website'];
if (isset($o['posType'])) $this->posType = $o['posType'];
if (isset($o['postContractStatusId'])) $this->postContractStatusId = $o['postContractStatusId'];
if (isset($o['openingDate'])) $this->openingDate = JsonConverters::from('DateTime', $o['openingDate']);
if (isset($o['closingDate'])) $this->closingDate = JsonConverters::from('DateTime', $o['closingDate']);
if (isset($o['subMarketCountryId'])) $this->subMarketCountryId = $o['subMarketCountryId'];
if (isset($o['addressTypeId'])) $this->addressTypeId = $o['addressTypeId'];
if (isset($o['mallOrDeptStoreUnitNumber'])) $this->mallOrDeptStoreUnitNumber = $o['mallOrDeptStoreUnitNumber'];
if (isset($o['floorNumber'])) $this->floorNumber = $o['floorNumber'];
if (isset($o['gpsLatitude'])) $this->gpsLatitude = $o['gpsLatitude'];
if (isset($o['gpsLongitude'])) $this->gpsLongitude = $o['gpsLongitude'];
if (isset($o['timeVallee'])) $this->timeVallee = $o['timeVallee'];
if (isset($o['lastVisitDate'])) $this->lastVisitDate = JsonConverters::from('DateTime', $o['lastVisitDate']);
if (isset($o['ePartnerProgram'])) $this->ePartnerProgram = $o['ePartnerProgram'];
if (isset($o['ePartnerLaunchDate'])) $this->ePartnerLaunchDate = JsonConverters::from('DateTime', $o['ePartnerLaunchDate']);
if (isset($o['ePartnerScoring'])) $this->ePartnerScoring = $o['ePartnerScoring'];
if (isset($o['socialMedia'])) $this->socialMedia = $o['socialMedia'];
if (isset($o['seo'])) $this->seo = $o['seo'];
if (isset($o['googleBusiness'])) $this->googleBusiness = $o['googleBusiness'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->posCode)) $o['posCode'] = $this->posCode;
if (isset($this->brand)) $o['brand'] = $this->brand;
if (isset($this->alternativeCountry)) $o['alternativeCountry'] = $this->alternativeCountry;
if (isset($this->alternativeZipCode)) $o['alternativeZipCode'] = $this->alternativeZipCode;
if (isset($this->alternativeStreet)) $o['alternativeStreet'] = $this->alternativeStreet;
if (isset($this->alternativeCity)) $o['alternativeCity'] = $this->alternativeCity;
if (isset($this->brandWatchesCommercialSurface)) $o['brandWatchesCommercialSurface'] = $this->brandWatchesCommercialSurface;
if (isset($this->posWatchesCommercialSurface)) $o['posWatchesCommercialSurface'] = $this->posWatchesCommercialSurface;
if (isset($this->website)) $o['website'] = $this->website;
if (isset($this->posType)) $o['posType'] = $this->posType;
if (isset($this->postContractStatusId)) $o['postContractStatusId'] = $this->postContractStatusId;
if (isset($this->openingDate)) $o['openingDate'] = JsonConverters::to('DateTime', $this->openingDate);
if (isset($this->closingDate)) $o['closingDate'] = JsonConverters::to('DateTime', $this->closingDate);
if (isset($this->subMarketCountryId)) $o['subMarketCountryId'] = $this->subMarketCountryId;
if (isset($this->addressTypeId)) $o['addressTypeId'] = $this->addressTypeId;
if (isset($this->mallOrDeptStoreUnitNumber)) $o['mallOrDeptStoreUnitNumber'] = $this->mallOrDeptStoreUnitNumber;
if (isset($this->floorNumber)) $o['floorNumber'] = $this->floorNumber;
if (isset($this->gpsLatitude)) $o['gpsLatitude'] = $this->gpsLatitude;
if (isset($this->gpsLongitude)) $o['gpsLongitude'] = $this->gpsLongitude;
if (isset($this->timeVallee)) $o['timeVallee'] = $this->timeVallee;
if (isset($this->lastVisitDate)) $o['lastVisitDate'] = JsonConverters::to('DateTime', $this->lastVisitDate);
if (isset($this->ePartnerProgram)) $o['ePartnerProgram'] = $this->ePartnerProgram;
if (isset($this->ePartnerLaunchDate)) $o['ePartnerLaunchDate'] = JsonConverters::to('DateTime', $this->ePartnerLaunchDate);
if (isset($this->ePartnerScoring)) $o['ePartnerScoring'] = $this->ePartnerScoring;
if (isset($this->socialMedia)) $o['socialMedia'] = $this->socialMedia;
if (isset($this->seo)) $o['seo'] = $this->seo;
if (isset($this->googleBusiness)) $o['googleBusiness'] = $this->googleBusiness;
return empty($o) ? new class(){} : $o;
}
}
PHP UpdatePOSBrandIdentity DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /posIdentity/{brand} HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
posCode: String,
brand: String,
alternativeCountry: String,
alternativeZipCode: String,
alternativeStreet: String,
alternativeCity: String,
brandWatchesCommercialSurface: 0,
posWatchesCommercialSurface: 0,
website: String,
posType: 0,
postContractStatusId: 0,
openingDate: 0001-01-01,
closingDate: 0001-01-01,
subMarketCountryId: 0,
addressTypeId: 0,
mallOrDeptStoreUnitNumber: String,
floorNumber: 0,
gpsLatitude: 0,
gpsLongitude: 0,
timeVallee: False,
lastVisitDate: 0001-01-01,
ePartnerProgram: 0,
ePartnerLaunchDate: 0001-01-01,
ePartnerScoring: 0,
socialMedia: False,
seo: False,
googleBusiness: False
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
}