| POST | /partner/warranty/equipment | Create Equipment Warranty By Partner | Create Equipment Warranty API for Partners |
|---|
<?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 CreateEquipmentWarrantyPartnerResponse implements JsonSerializable
{
public function __construct(
/** @description Sales Force Sellout ID */
// @ApiMember(Description="Sales Force Sellout ID", IsRequired=true)
/** @var string */
public string $sfSelloutId=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['sfSelloutId'])) $this->sfSelloutId = $o['sfSelloutId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->sfSelloutId)) $o['sfSelloutId'] = $this->sfSelloutId;
return empty($o) ? new class(){} : $o;
}
}
class CreateEquipmentWarrantyPartner implements JsonSerializable
{
public function __construct(
/** @description Brand Trigram, e.g. CAR, IWC */
// @ApiMember(Description="Brand Trigram, e.g. CAR, IWC", IsRequired=true)
/** @var string */
public string $brand='',
/** @description POS code, e.g. 102048 */
// @ApiMember(Description="POS code, e.g. 102048", IsRequired=true)
/** @var string */
public string $posCode='',
/** @description SerialNumber */
// @ApiMember(Description="SerialNumber", IsRequired=true)
/** @var string */
public string $serialNumber='',
/** @description Reference like 'CRWSTA0030' */
// @ApiMember(Description="Reference like 'CRWSTA0030'")
/** @var string|null */
public ?string $articleCode=null
) {
}
/** @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['serialNumber'])) $this->serialNumber = $o['serialNumber'];
if (isset($o['articleCode'])) $this->articleCode = $o['articleCode'];
}
/** @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->serialNumber)) $o['serialNumber'] = $this->serialNumber;
if (isset($this->articleCode)) $o['articleCode'] = $this->articleCode;
return empty($o) ? new class(){} : $o;
}
}
PHP CreateEquipmentWarrantyPartner 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 /partner/warranty/equipment HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"brand":"String","posCode":"String","serialNumber":"String","articleCode":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"sfSelloutId":"String"}