Richemont.Booster2.PublicApi

<back to all web services

GrantElevateConsent

Requires Authentication
The following routes are available for this service:
POST/customer/{brand}/{elevateCustomerId}/grantElevateConsentUpdate Elevate customer consent to 'Approved'Currently the API sets Elevate customer consent only to 'Approved' status
<?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 GrantElevateConsentResponse implements JsonSerializable
{
    public function __construct(
        /** @description Salesforce Standard ID */
        // @ApiMember(Description="Salesforce Standard ID", IsRequired=true)
        /** @var string */
        public string $salesforceStandardId=''
    ) {
    }

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

class GrantElevateConsent implements JsonSerializable
{
    public function __construct(
        /** @description Elevate customer ID */
        // @ApiMember(Description="Elevate customer ID")
        /** @var string|null */
        public ?string $elevateCustomerId=null,

        /** @description POS Legacy */
        // @ApiMember(Description="POS Legacy", IsRequired=true)
        /** @var string */
        public string $posCode='',

        /** @description Brand e.g. CAR, MTB */
        // @ApiMember(Description="Brand e.g. CAR, MTB", IsRequired=true)
        /** @var string */
        public string $brand='',

        /** @description Phone e.g. cn: 13888889999, jp: 352858088, kr: 023123456. Email or full phone required */
        // @ApiMember(Description="Phone e.g. cn: 13888889999, jp: 352858088, kr: 023123456. Email or full phone required")
        /** @var string|null */
        public ?string $phone=null,

        /** @description Prefix Country Id e.g. it, fr, az. Email or full phone required */
        // @ApiMember(Description="Prefix Country Id e.g. it, fr, az. Email or full phone required")
        /** @var string|null */
        public ?string $phoneCountryPrefix=null,

        /** @description Customer email. Email or full phone required */
        // @ApiMember(Description="Customer email. Email or full phone required")
        /** @var string|null */
        public ?string $email=null
    ) {
    }

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

PHP GrantElevateConsent DTOs

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

HTTP + JSV

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

POST /customer/{brand}/{elevateCustomerId}/grantElevateConsent HTTP/1.1 
Host: dev-api-booster.richemont.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	elevateCustomerId: String,
	posCode: String,
	brand: String,
	phone: String,
	phoneCountryPrefix: String,
	email: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	salesforceStandardId: String
}