| DELETE | /warranty/equipment/{brand}/{posCode}/{equipmentNr}/{warrantyType} | Delete the specified equipment warranty from SAP |
|---|
<?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 DeleteEquipmentWarrantyResponse implements JsonSerializable
{
public function __construct(
/** @var bool|null */
public ?bool $success=null,
/** @var HttpStatusCode|null */
public ?HttpStatusCode $statuscode=null,
/** @var string|null */
public ?string $message=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['success'])) $this->success = $o['success'];
if (isset($o['statuscode'])) $this->statuscode = JsonConverters::from('HttpStatusCode', $o['statuscode']);
if (isset($o['message'])) $this->message = $o['message'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->success)) $o['success'] = $this->success;
if (isset($this->statuscode)) $o['statuscode'] = JsonConverters::to('HttpStatusCode', $this->statuscode);
if (isset($this->message)) $o['message'] = $this->message;
return empty($o) ? new class(){} : $o;
}
}
class DeleteEquipmentWarranty implements JsonSerializable
{
public function __construct(
/** @description Brand Trigram, e.g. CAR, IWC; compulsory only if articleCode is not provided */
// @ApiMember(Description="Brand Trigram, e.g. CAR, IWC; compulsory only if articleCode is not provided")
/** @var string|null */
public ?string $brand=null,
/** @description Richemont POS code */
// @ApiMember(Description="Richemont POS code", IsRequired=true)
/** @var string */
public string $posCode='',
/** @description EquipmentNumber */
// @ApiMember(Description="EquipmentNumber", IsRequired=true)
/** @var string */
public string $equipmentNr='',
/** @description WarrantyType */
// @ApiMember(Description="WarrantyType", IsRequired=true)
/** @var string */
public string $warrantyType=''
) {
}
/** @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['equipmentNr'])) $this->equipmentNr = $o['equipmentNr'];
if (isset($o['warrantyType'])) $this->warrantyType = $o['warrantyType'];
}
/** @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->equipmentNr)) $o['equipmentNr'] = $this->equipmentNr;
if (isset($this->warrantyType)) $o['warrantyType'] = $this->warrantyType;
return empty($o) ? new class(){} : $o;
}
}
PHP DeleteEquipmentWarranty 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.
DELETE /warranty/equipment/{brand}/{posCode}/{equipmentNr}/{warrantyType} HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"success":false,"statuscode":"Continue","message":"String"}