POST | /v1/ValidateBaumusterOfferUpload | Validate Baumuster Offer file |
---|
<?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 DataProcessResponse implements JsonSerializable
{
public function __construct(
/** @var int */
public int $id=0,
/** @var int */
public int $type=0,
/** @var string */
public string $typeName='',
/** @var string */
public string $statusName='',
/** @var int */
public int $status=0,
/** @var int */
public int $totalRecords=0,
/** @var int */
public int $processedRecords=0,
/** @var string */
public string $fileName='',
/** @var string */
public string $originalFileName='',
/** @var string */
public string $dateCreated='',
/** @var string */
public string $dateStarted='',
/** @var string */
public string $dateFinished='',
/** @var string */
public string $gasId=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['id'])) $this->id = $o['id'];
if (isset($o['type'])) $this->type = $o['type'];
if (isset($o['typeName'])) $this->typeName = $o['typeName'];
if (isset($o['statusName'])) $this->statusName = $o['statusName'];
if (isset($o['status'])) $this->status = $o['status'];
if (isset($o['totalRecords'])) $this->totalRecords = $o['totalRecords'];
if (isset($o['processedRecords'])) $this->processedRecords = $o['processedRecords'];
if (isset($o['fileName'])) $this->fileName = $o['fileName'];
if (isset($o['originalFileName'])) $this->originalFileName = $o['originalFileName'];
if (isset($o['dateCreated'])) $this->dateCreated = $o['dateCreated'];
if (isset($o['dateStarted'])) $this->dateStarted = $o['dateStarted'];
if (isset($o['dateFinished'])) $this->dateFinished = $o['dateFinished'];
if (isset($o['gasId'])) $this->gasId = $o['gasId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->id)) $o['id'] = $this->id;
if (isset($this->type)) $o['type'] = $this->type;
if (isset($this->typeName)) $o['typeName'] = $this->typeName;
if (isset($this->statusName)) $o['statusName'] = $this->statusName;
if (isset($this->status)) $o['status'] = $this->status;
if (isset($this->totalRecords)) $o['totalRecords'] = $this->totalRecords;
if (isset($this->processedRecords)) $o['processedRecords'] = $this->processedRecords;
if (isset($this->fileName)) $o['fileName'] = $this->fileName;
if (isset($this->originalFileName)) $o['originalFileName'] = $this->originalFileName;
if (isset($this->dateCreated)) $o['dateCreated'] = $this->dateCreated;
if (isset($this->dateStarted)) $o['dateStarted'] = $this->dateStarted;
if (isset($this->dateFinished)) $o['dateFinished'] = $this->dateFinished;
if (isset($this->gasId)) $o['gasId'] = $this->gasId;
return empty($o) ? new class(){} : $o;
}
}
class ValidationBaumusterOfferUploadRequest implements IPost, JsonSerializable
{
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
return empty($o) ? new class(){} : $o;
}
}
PHP ValidationBaumusterOfferUploadRequest 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 /v1/ValidateBaumusterOfferUpload HTTP/1.1
Host: uat-api-vehicle-mgt-mb-dhc.rapp-customers.co.uk
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"id":0,"type":0,"typeName":"String","statusName":"String","status":0,"totalRecords":0,"processedRecords":0,"fileName":"String","originalFileName":"String","dateCreated":"String","dateStarted":"String","dateFinished":"String","gasId":"String"}