Richemont.Booster2.PublicApi

<back to all web services

GetCrmFormConfigurations

Requires Authentication
The following routes are available for this service:
GET/crmFormConfigurations/{brand}/{posCode}Get all available CRM Form Configurations
<?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 GetCrmFormConfigurationsResponse implements JsonSerializable
{
    public function __construct(
        /** @description Privacy policy agreement in Time Vallée POS group, e.g. M, V, N */
        // @ApiMember(Description="Privacy policy agreement in Time Vallée POS group, e.g. M, V, N", IsRequired=true)
        /** @var string */
        public string $timeValeePrivacyPolicy='',

        /** @description Store data abroad agreement in Time Vallée POS group, e.g. M, V, N */
        // @ApiMember(Description="Store data abroad agreement in Time Vallée POS group, e.g. M, V, N", IsRequired=true)
        /** @var string */
        public string $timeValeeAllowStoreDataAbroad='',

        /** @description Data sharing consent, e.g. M, V, N */
        // @ApiMember(Description="Data sharing consent, e.g. M, V, N", IsRequired=true)
        /** @var string */
        public string $dataSharingConsent='',

        /** @description Requirement for email field, e.g. M, V, N */
        // @ApiMember(Description="Requirement for email field, e.g. M, V, N", IsRequired=true)
        /** @var string */
        public string $email='',

        /** @description Requirement for phone field, e.g. M, V, N */
        // @ApiMember(Description="Requirement for phone field, e.g. M, V, N", IsRequired=true)
        /** @var string */
        public string $phone='',

        /** @description Requirement for middle name field, e.g. M, V, N */
        // @ApiMember(Description="Requirement for middle name field, e.g. M, V, N", IsRequired=true)
        /** @var string */
        public string $middleName='',

        /** @description Privacy policy agreement in Maison, e.g. M, V, N */
        // @ApiMember(Description="Privacy policy agreement in Maison, e.g. M, V, N", IsRequired=true)
        /** @var string */
        public string $privacyPolicy='',

        /** @description Store data abroad agreement in Maison, e.g. M, V, N */
        // @ApiMember(Description="Store data abroad agreement in Maison, e.g. M, V, N", IsRequired=true)
        /** @var string */
        public string $allowStoreDateAbroad='',

        /** @description Requirement for sales representative field, e.g. M, V, N */
        // @ApiMember(Description="Requirement for sales representative field, e.g. M, V, N", IsRequired=true)
        /** @var string */
        public string $salesRep='',

        /** @description Show or hide Transliteration fields */
        // @ApiMember(Description="Show or hide Transliteration fields", IsRequired=true)
        /** @var bool|null */
        public ?bool $showNotLatinFields=null,

        /** @description Transliteration language */
        // @ApiMember(Description="Transliteration language", IsRequired=true)
        /** @var string */
        public string $transliterationLanguage='',

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

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['timeValeePrivacyPolicy'])) $this->timeValeePrivacyPolicy = $o['timeValeePrivacyPolicy'];
        if (isset($o['timeValeeAllowStoreDataAbroad'])) $this->timeValeeAllowStoreDataAbroad = $o['timeValeeAllowStoreDataAbroad'];
        if (isset($o['dataSharingConsent'])) $this->dataSharingConsent = $o['dataSharingConsent'];
        if (isset($o['email'])) $this->email = $o['email'];
        if (isset($o['phone'])) $this->phone = $o['phone'];
        if (isset($o['middleName'])) $this->middleName = $o['middleName'];
        if (isset($o['privacyPolicy'])) $this->privacyPolicy = $o['privacyPolicy'];
        if (isset($o['allowStoreDateAbroad'])) $this->allowStoreDateAbroad = $o['allowStoreDateAbroad'];
        if (isset($o['salesRep'])) $this->salesRep = $o['salesRep'];
        if (isset($o['showNotLatinFields'])) $this->showNotLatinFields = $o['showNotLatinFields'];
        if (isset($o['transliterationLanguage'])) $this->transliterationLanguage = $o['transliterationLanguage'];
        if (isset($o['city'])) $this->city = $o['city'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->timeValeePrivacyPolicy)) $o['timeValeePrivacyPolicy'] = $this->timeValeePrivacyPolicy;
        if (isset($this->timeValeeAllowStoreDataAbroad)) $o['timeValeeAllowStoreDataAbroad'] = $this->timeValeeAllowStoreDataAbroad;
        if (isset($this->dataSharingConsent)) $o['dataSharingConsent'] = $this->dataSharingConsent;
        if (isset($this->email)) $o['email'] = $this->email;
        if (isset($this->phone)) $o['phone'] = $this->phone;
        if (isset($this->middleName)) $o['middleName'] = $this->middleName;
        if (isset($this->privacyPolicy)) $o['privacyPolicy'] = $this->privacyPolicy;
        if (isset($this->allowStoreDateAbroad)) $o['allowStoreDateAbroad'] = $this->allowStoreDateAbroad;
        if (isset($this->salesRep)) $o['salesRep'] = $this->salesRep;
        if (isset($this->showNotLatinFields)) $o['showNotLatinFields'] = $this->showNotLatinFields;
        if (isset($this->transliterationLanguage)) $o['transliterationLanguage'] = $this->transliterationLanguage;
        if (isset($this->city)) $o['city'] = $this->city;
        return empty($o) ? new class(){} : $o;
    }
}

class GetCrmFormConfigurations implements JsonSerializable
{
    public function __construct(
        /** @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 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 ISO Alpha-2 Country Code, e.g. it, ch */
        // @ApiMember(Description="ISO Alpha-2 Country Code, e.g. it, ch", IsRequired=true)
        /** @var string */
        public string $crmCountryId=''
    ) {
    }

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

PHP GetCrmFormConfigurations DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /crmFormConfigurations/{brand}/{posCode} HTTP/1.1 
Host: dev-api-booster.richemont.com 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"timeValeePrivacyPolicy":"String","timeValeeAllowStoreDataAbroad":"String","dataSharingConsent":"String","email":"String","phone":"String","middleName":"String","privacyPolicy":"String","allowStoreDateAbroad":"String","salesRep":"String","showNotLatinFields":false,"transliterationLanguage":"String","city":"String"}