Required role: | Admin | Required permission: | CanAccess |
GET | /sync/admin/orders/search |
---|
<?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};
/** @description The number of query results to skip. */
// @Api(Description="The number of query results to skip.")
class PaginationBase implements IPaginate, JsonSerializable
{
public function __construct(
/** @description The number of query results to skip. */
// @ApiMember(Description="The number of query results to skip.")
/** @var int|null */
public ?int $skip=null,
/** @description The number of query results to include. */
// @ApiMember(Description="The number of query results to include.")
/** @var int|null */
public ?int $take=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['skip'])) $this->skip = $o['skip'];
if (isset($o['take'])) $this->take = $o['take'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->skip)) $o['skip'] = $this->skip;
if (isset($this->take)) $o['take'] = $this->take;
return empty($o) ? new class(){} : $o;
}
}
/** @description Represents a specific time interval, within which, an action was carried out. */
enum PeriodMode : string
{
case Today = 'Today';
case Yesterday = 'Yesterday';
case LastWeek = 'LastWeek';
case Last30Days = 'Last30Days';
case Last90Days = 'Last90Days';
case Last180Days = 'Last180Days';
}
/** @description Specifies a service request from an admin user to search for orders. */
// @Api(Description="Specifies a service request from an admin user to search for orders.")
class AdminSearchOrdersBase extends PaginationBase implements IGet, JsonSerializable
{
/**
* @param int|null $skip
* @param int|null $take
*/
public function __construct(
?int $skip=null,
?int $take=null,
/** @description The user name of the account. */
// @ApiMember(Description="The user name of the account.")
/** @var string|null */
public ?string $userName=null,
/** @description The unique identifier of the order. */
// @ApiMember(Description="The unique identifier of the order.")
/** @var int|null */
public ?int $orderId=null,
/** @description The unique identifier of the product, for which the order is made. */
// @ApiMember(Description="The unique identifier of the product, for which the order is made.")
/** @var int|null */
public ?int $productId=null,
/** @description The unique identifier of the user account, who made the order. */
// @ApiMember(Description="The unique identifier of the user account, who made the order.")
/** @var int|null */
public ?int $accountId=null,
/** @description The name of the order. */
// @ApiMember(Description="The name of the order.")
/** @var string|null */
public ?string $name=null,
/** @description Search by using the name of the order that starts with the specified value. */
// @ApiMember(Description="Search by using the name of the order that starts with the specified value.")
/** @var string|null */
public ?string $nameStartsWith=null,
/** @description Search by using the name of the order that ends with the specified value. */
// @ApiMember(Description="Search by using the name of the order that ends with the specified value.")
/** @var string|null */
public ?string $nameEndsWith=null,
/** @description Search by using the name of the order that contains the specified value. */
// @ApiMember(Description="Search by using the name of the order that contains the specified value.")
/** @var string|null */
public ?string $nameContains=null,
/** @description Search by using the name of the order that contains the specified value. */
// @ApiMember(Description="Search by using the name of the order that contains the specified value.")
/** @var string|null */
public ?string $serviceName=null,
/** @description Search by using the service name of the order that starts with the specified value. */
// @ApiMember(Description="Search by using the service name of the order that starts with the specified value.")
/** @var string|null */
public ?string $serviceNameStartsWith=null,
/** @description Search by using the service name of the order that ends with the specified value. */
// @ApiMember(Description="Search by using the service name of the order that ends with the specified value.")
/** @var string|null */
public ?string $serviceNameEndsWith=null,
/** @description Search by using the service name of the order that contains the specified value. */
// @ApiMember(Description="Search by using the service name of the order that contains the specified value.")
/** @var string|null */
public ?string $serviceNameContains=null,
/** @description Search for orders placed before a certain date and time. The specified date is included in the search. */
// @ApiMember(Description="Search for orders placed before a certain date and time. The specified date is included in the search.")
/** @var DateTime|null */
public ?DateTime $before=null,
/** @description Search for orders placed after a certain date and time. The specified date is included in the search. */
// @ApiMember(Description="Search for orders placed after a certain date and time. The specified date is included in the search.")
/** @var DateTime|null */
public ?DateTime $after=null,
/** @description Search for orders placed within a date and time period. The specified date is the start of the period and it is included in the search. */
// @ApiMember(Description="Search for orders placed within a date and time period. The specified date is the start of the period and it is included in the search.")
/** @var DateTime|null */
public ?DateTime $periodStartDate=null,
/** @description Search for orders placed within a date and time period. The specified date is the start of the period and it is included in the search. */
// @ApiMember(Description="Search for orders placed within a date and time period. The specified date is the start of the period and it is included in the search.")
/** @var DateTime|null */
public ?DateTime $periodEndDate=null,
/** @description Search for orders placed within the last 180 days. Today is included in the search. */
// @ApiMember(Description="Search for orders placed within the last 180 days. Today is included in the search.")
/** @var PeriodMode|null */
public ?PeriodMode $periodMode=null,
/** @description The URI from which the order was initiated. */
// @ApiMember(Description="The URI from which the order was initiated.")
/** @var string|null */
public ?string $requestUri=null,
/** @description The HTTP method of the order request. */
// @ApiMember(Description="The HTTP method of the order request.")
/** @var string|null */
public ?string $requestHttpMethod=null,
/** @description Was the order request successful? */
// @ApiMember(Description="Was the order request successful?")
/** @var bool|null */
public ?bool $orderRequestSucceeded=null,
/** @description The initial IP address of client, who made the order. */
// @ApiMember(Description="The initial IP address of client, who made the order.")
/** @var string|null */
public ?string $clientIPAddress=null,
/** @description The unit of measurement for the order. */
// @ApiMember(Description="The unit of measurement for the order.")
/** @var string|null */
public ?string $unitOfMeasurement=null,
/** @description Search by using the unit of measurement of the order that starts with the specified value. */
// @ApiMember(Description="Search by using the unit of measurement of the order that starts with the specified value.")
/** @var string|null */
public ?string $unitOfMeasurementStartsWith=null,
/** @description Search by using the unit of measurement of the order that ends with the specified value. */
// @ApiMember(Description="Search by using the unit of measurement of the order that ends with the specified value.")
/** @var string|null */
public ?string $unitOfMeasurementEndsWith=null,
/** @description Search by using the unit of measurement of the order that contains the specified value. */
// @ApiMember(Description="Search by using the unit of measurement of the order that contains the specified value.")
/** @var string|null */
public ?string $unitOfMeasurementContains=null,
/** @description The type of process, for which the order is charged. */
// @ApiMember(Description="The type of process, for which the order is charged.")
/** @var string|null */
public ?string $processType=null,
/** @description Search by using the process type of the order that starts with the specified value. */
// @ApiMember(Description="Search by using the process type of the order that starts with the specified value.")
/** @var string|null */
public ?string $processTypeStartsWith=null,
/** @description Search by using the process type of the order that ends with the specified value. */
// @ApiMember(Description="Search by using the process type of the order that ends with the specified value.")
/** @var string|null */
public ?string $processTypeEndsWith=null,
/** @description Search by using the process type of the order that contains the specified value. */
// @ApiMember(Description="Search by using the process type of the order that contains the specified value.")
/** @var string|null */
public ?string $processTypeContains=null,
/** @description The type of data, for which the order is charged. */
// @ApiMember(Description="The type of data, for which the order is charged.")
/** @var string|null */
public ?string $dataType=null,
/** @description Search by using the type of data, for which the order is charged that starts with the specified value. */
// @ApiMember(Description="Search by using the type of data, for which the order is charged that starts with the specified value.")
/** @var string|null */
public ?string $dataTypeStartsWith=null,
/** @description Search by using the type of data, for which the order is charged that ends with the specified value. */
// @ApiMember(Description="Search by using the type of data, for which the order is charged that ends with the specified value.")
/** @var string|null */
public ?string $dataTypeEndsWith=null,
/** @description Search by using the type of data, for which the order is charged that contains the specified value. */
// @ApiMember(Description="Search by using the type of data, for which the order is charged that contains the specified value.")
/** @var string|null */
public ?string $dataTypeContains=null,
/** @description The name of the data, for which the order is charged. */
// @ApiMember(Description="The name of the data, for which the order is charged.")
/** @var string|null */
public ?string $dataName=null,
/** @description Search by using the name of data, for which the order is charged that starts with the specified value. */
// @ApiMember(Description="Search by using the name of data, for which the order is charged that starts with the specified value.")
/** @var string|null */
public ?string $dataNameStartsWith=null,
/** @description Search by using the name of data, for which the order is charged that ends with the specified value. */
// @ApiMember(Description="Search by using the name of data, for which the order is charged that ends with the specified value.")
/** @var string|null */
public ?string $dataNameEndsWith=null,
/** @description Search by using the name of data, for which the order is charged that contains the specified value. */
// @ApiMember(Description="Search by using the name of data, for which the order is charged that contains the specified value.")
/** @var string|null */
public ?string $dataNameContains=null
) {
parent::__construct($skip,$take);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['userName'])) $this->userName = $o['userName'];
if (isset($o['orderId'])) $this->orderId = $o['orderId'];
if (isset($o['productId'])) $this->productId = $o['productId'];
if (isset($o['accountId'])) $this->accountId = $o['accountId'];
if (isset($o['name'])) $this->name = $o['name'];
if (isset($o['nameStartsWith'])) $this->nameStartsWith = $o['nameStartsWith'];
if (isset($o['nameEndsWith'])) $this->nameEndsWith = $o['nameEndsWith'];
if (isset($o['nameContains'])) $this->nameContains = $o['nameContains'];
if (isset($o['serviceName'])) $this->serviceName = $o['serviceName'];
if (isset($o['serviceNameStartsWith'])) $this->serviceNameStartsWith = $o['serviceNameStartsWith'];
if (isset($o['serviceNameEndsWith'])) $this->serviceNameEndsWith = $o['serviceNameEndsWith'];
if (isset($o['serviceNameContains'])) $this->serviceNameContains = $o['serviceNameContains'];
if (isset($o['before'])) $this->before = JsonConverters::from('DateTime', $o['before']);
if (isset($o['after'])) $this->after = JsonConverters::from('DateTime', $o['after']);
if (isset($o['periodStartDate'])) $this->periodStartDate = JsonConverters::from('DateTime', $o['periodStartDate']);
if (isset($o['periodEndDate'])) $this->periodEndDate = JsonConverters::from('DateTime', $o['periodEndDate']);
if (isset($o['periodMode'])) $this->periodMode = JsonConverters::from('PeriodMode', $o['periodMode']);
if (isset($o['requestUri'])) $this->requestUri = $o['requestUri'];
if (isset($o['requestHttpMethod'])) $this->requestHttpMethod = $o['requestHttpMethod'];
if (isset($o['orderRequestSucceeded'])) $this->orderRequestSucceeded = $o['orderRequestSucceeded'];
if (isset($o['clientIPAddress'])) $this->clientIPAddress = $o['clientIPAddress'];
if (isset($o['unitOfMeasurement'])) $this->unitOfMeasurement = $o['unitOfMeasurement'];
if (isset($o['unitOfMeasurementStartsWith'])) $this->unitOfMeasurementStartsWith = $o['unitOfMeasurementStartsWith'];
if (isset($o['unitOfMeasurementEndsWith'])) $this->unitOfMeasurementEndsWith = $o['unitOfMeasurementEndsWith'];
if (isset($o['unitOfMeasurementContains'])) $this->unitOfMeasurementContains = $o['unitOfMeasurementContains'];
if (isset($o['processType'])) $this->processType = $o['processType'];
if (isset($o['processTypeStartsWith'])) $this->processTypeStartsWith = $o['processTypeStartsWith'];
if (isset($o['processTypeEndsWith'])) $this->processTypeEndsWith = $o['processTypeEndsWith'];
if (isset($o['processTypeContains'])) $this->processTypeContains = $o['processTypeContains'];
if (isset($o['dataType'])) $this->dataType = $o['dataType'];
if (isset($o['dataTypeStartsWith'])) $this->dataTypeStartsWith = $o['dataTypeStartsWith'];
if (isset($o['dataTypeEndsWith'])) $this->dataTypeEndsWith = $o['dataTypeEndsWith'];
if (isset($o['dataTypeContains'])) $this->dataTypeContains = $o['dataTypeContains'];
if (isset($o['dataName'])) $this->dataName = $o['dataName'];
if (isset($o['dataNameStartsWith'])) $this->dataNameStartsWith = $o['dataNameStartsWith'];
if (isset($o['dataNameEndsWith'])) $this->dataNameEndsWith = $o['dataNameEndsWith'];
if (isset($o['dataNameContains'])) $this->dataNameContains = $o['dataNameContains'];
if (isset($o['skip'])) $this->skip = $o['skip'];
if (isset($o['take'])) $this->take = $o['take'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->userName)) $o['userName'] = $this->userName;
if (isset($this->orderId)) $o['orderId'] = $this->orderId;
if (isset($this->productId)) $o['productId'] = $this->productId;
if (isset($this->accountId)) $o['accountId'] = $this->accountId;
if (isset($this->name)) $o['name'] = $this->name;
if (isset($this->nameStartsWith)) $o['nameStartsWith'] = $this->nameStartsWith;
if (isset($this->nameEndsWith)) $o['nameEndsWith'] = $this->nameEndsWith;
if (isset($this->nameContains)) $o['nameContains'] = $this->nameContains;
if (isset($this->serviceName)) $o['serviceName'] = $this->serviceName;
if (isset($this->serviceNameStartsWith)) $o['serviceNameStartsWith'] = $this->serviceNameStartsWith;
if (isset($this->serviceNameEndsWith)) $o['serviceNameEndsWith'] = $this->serviceNameEndsWith;
if (isset($this->serviceNameContains)) $o['serviceNameContains'] = $this->serviceNameContains;
if (isset($this->before)) $o['before'] = JsonConverters::to('DateTime', $this->before);
if (isset($this->after)) $o['after'] = JsonConverters::to('DateTime', $this->after);
if (isset($this->periodStartDate)) $o['periodStartDate'] = JsonConverters::to('DateTime', $this->periodStartDate);
if (isset($this->periodEndDate)) $o['periodEndDate'] = JsonConverters::to('DateTime', $this->periodEndDate);
if (isset($this->periodMode)) $o['periodMode'] = JsonConverters::to('PeriodMode', $this->periodMode);
if (isset($this->requestUri)) $o['requestUri'] = $this->requestUri;
if (isset($this->requestHttpMethod)) $o['requestHttpMethod'] = $this->requestHttpMethod;
if (isset($this->orderRequestSucceeded)) $o['orderRequestSucceeded'] = $this->orderRequestSucceeded;
if (isset($this->clientIPAddress)) $o['clientIPAddress'] = $this->clientIPAddress;
if (isset($this->unitOfMeasurement)) $o['unitOfMeasurement'] = $this->unitOfMeasurement;
if (isset($this->unitOfMeasurementStartsWith)) $o['unitOfMeasurementStartsWith'] = $this->unitOfMeasurementStartsWith;
if (isset($this->unitOfMeasurementEndsWith)) $o['unitOfMeasurementEndsWith'] = $this->unitOfMeasurementEndsWith;
if (isset($this->unitOfMeasurementContains)) $o['unitOfMeasurementContains'] = $this->unitOfMeasurementContains;
if (isset($this->processType)) $o['processType'] = $this->processType;
if (isset($this->processTypeStartsWith)) $o['processTypeStartsWith'] = $this->processTypeStartsWith;
if (isset($this->processTypeEndsWith)) $o['processTypeEndsWith'] = $this->processTypeEndsWith;
if (isset($this->processTypeContains)) $o['processTypeContains'] = $this->processTypeContains;
if (isset($this->dataType)) $o['dataType'] = $this->dataType;
if (isset($this->dataTypeStartsWith)) $o['dataTypeStartsWith'] = $this->dataTypeStartsWith;
if (isset($this->dataTypeEndsWith)) $o['dataTypeEndsWith'] = $this->dataTypeEndsWith;
if (isset($this->dataTypeContains)) $o['dataTypeContains'] = $this->dataTypeContains;
if (isset($this->dataName)) $o['dataName'] = $this->dataName;
if (isset($this->dataNameStartsWith)) $o['dataNameStartsWith'] = $this->dataNameStartsWith;
if (isset($this->dataNameEndsWith)) $o['dataNameEndsWith'] = $this->dataNameEndsWith;
if (isset($this->dataNameContains)) $o['dataNameContains'] = $this->dataNameContains;
if (isset($this->skip)) $o['skip'] = $this->skip;
if (isset($this->take)) $o['take'] = $this->take;
return empty($o) ? new class(){} : $o;
}
}
/** @description Represents a commission to consume services. */
// @Api(Description="Represents a commission to consume services.")
class Order implements IHasName, JsonSerializable
{
public function __construct(
/** @description The unique identifier of the order. */
// @ApiMember(Description="The unique identifier of the order.", IsRequired=true)
/** @var int */
public int $id=0,
/** @description The unique identifier of the product, for which the order is made. */
// @ApiMember(Description="The unique identifier of the product, for which the order is made.", IsRequired=true)
/** @var int */
public int $productId=0,
/** @description The unique identifier of the user account, who placed the order. */
// @ApiMember(Description="The unique identifier of the user account, who placed the order.", IsRequired=true)
/** @var int */
public int $accountId=0,
/** @description A name to identify the order. */
// @ApiMember(Description="A name to identify the order.", IsRequired=true)
// @Validate(Validator="NotEmpty")
/** @var string */
public string $name='',
/** @description The name of the service, for which the order was made. */
// @ApiMember(Description="The name of the service, for which the order was made.")
/** @var string|null */
public ?string $serviceName=null,
/** @description The time stamp at which the order was initiated. */
// @ApiMember(Description="The time stamp at which the order was initiated.")
/** @var DateTime|null */
public ?DateTime $requestTimestamp=null,
/** @description The time stamp at which the order was completed. */
// @ApiMember(Description="The time stamp at which the order was completed.")
/** @var DateTime|null */
public ?DateTime $responseTimestamp=null,
/** @description The URI from which the order was initiated. */
// @ApiMember(Description="The URI from which the order was initiated.")
/** @var string|null */
public ?string $requestUri=null,
/** @description The HTTP method of the order request. */
// @ApiMember(Description="The HTTP method of the order request.")
/** @var string|null */
public ?string $requestHttpMethod=null,
/** @description The duration of the order request. */
// @ApiMember(Description="The duration of the order request.")
/** @var DateInterval|null */
public ?DateInterval $requestDuration=null,
/** @description The HTTP status code of the order request. */
// @ApiMember(Description="The HTTP status code of the order request.")
/** @var HttpStatusCode|null */
public ?HttpStatusCode $responseStatusCode=null,
/** @description The IP address of client, who placed the order. */
// @ApiMember(Description="The IP address of client, who placed the order.")
/** @var string|null */
public ?string $clientIPAddress=null,
/** @description The unit of measurement for the order. */
// @ApiMember(Description="The unit of measurement for the order.")
/** @var string|null */
public ?string $unitOfMeasurement=null,
/** @description The type of process, for which the order is charged. */
// @ApiMember(Description="The type of process, for which the order is charged.")
/** @var string|null */
public ?string $processType=null,
/** @description The type of data, for which the order is charged. */
// @ApiMember(Description="The type of data, for which the order is charged.")
/** @var string|null */
public ?string $dataType=null,
/** @description The name of the data, for which the order is charged. */
// @ApiMember(Description="The name of the data, for which the order is charged.")
/** @var string|null */
public ?string $dataName=null,
/** @description The date of creation of the order. */
// @ApiMember(Description="The date of creation of the order.")
/** @var DateTime */
public DateTime $creationDate=new DateTime(),
/** @description The final date to retain the order in the records. After this date, the order is expunged from the records. */
// @ApiMember(Description="The final date to retain the order in the records. After this date, the order is expunged from the records.")
/** @var DateTime|null */
public ?DateTime $expiryDate=null,
/** @description Indicates whether the order is simulated for test purposes. True if the order is simulated for test purposes; otherwise it is a false order for production purposes. */
// @ApiMember(Description="Indicates whether the order is simulated for test purposes. True if the order is simulated for test purposes; otherwise it is a false order for production purposes.")
/** @var bool|null */
public ?bool $isTest=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['id'])) $this->id = $o['id'];
if (isset($o['productId'])) $this->productId = $o['productId'];
if (isset($o['accountId'])) $this->accountId = $o['accountId'];
if (isset($o['name'])) $this->name = $o['name'];
if (isset($o['serviceName'])) $this->serviceName = $o['serviceName'];
if (isset($o['requestTimestamp'])) $this->requestTimestamp = JsonConverters::from('DateTime', $o['requestTimestamp']);
if (isset($o['responseTimestamp'])) $this->responseTimestamp = JsonConverters::from('DateTime', $o['responseTimestamp']);
if (isset($o['requestUri'])) $this->requestUri = $o['requestUri'];
if (isset($o['requestHttpMethod'])) $this->requestHttpMethod = $o['requestHttpMethod'];
if (isset($o['requestDuration'])) $this->requestDuration = JsonConverters::from('TimeSpan', $o['requestDuration']);
if (isset($o['responseStatusCode'])) $this->responseStatusCode = JsonConverters::from('HttpStatusCode', $o['responseStatusCode']);
if (isset($o['clientIPAddress'])) $this->clientIPAddress = $o['clientIPAddress'];
if (isset($o['unitOfMeasurement'])) $this->unitOfMeasurement = $o['unitOfMeasurement'];
if (isset($o['processType'])) $this->processType = $o['processType'];
if (isset($o['dataType'])) $this->dataType = $o['dataType'];
if (isset($o['dataName'])) $this->dataName = $o['dataName'];
if (isset($o['creationDate'])) $this->creationDate = JsonConverters::from('DateTime', $o['creationDate']);
if (isset($o['expiryDate'])) $this->expiryDate = JsonConverters::from('DateTime', $o['expiryDate']);
if (isset($o['isTest'])) $this->isTest = $o['isTest'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->id)) $o['id'] = $this->id;
if (isset($this->productId)) $o['productId'] = $this->productId;
if (isset($this->accountId)) $o['accountId'] = $this->accountId;
if (isset($this->name)) $o['name'] = $this->name;
if (isset($this->serviceName)) $o['serviceName'] = $this->serviceName;
if (isset($this->requestTimestamp)) $o['requestTimestamp'] = JsonConverters::to('DateTime', $this->requestTimestamp);
if (isset($this->responseTimestamp)) $o['responseTimestamp'] = JsonConverters::to('DateTime', $this->responseTimestamp);
if (isset($this->requestUri)) $o['requestUri'] = $this->requestUri;
if (isset($this->requestHttpMethod)) $o['requestHttpMethod'] = $this->requestHttpMethod;
if (isset($this->requestDuration)) $o['requestDuration'] = JsonConverters::to('TimeSpan', $this->requestDuration);
if (isset($this->responseStatusCode)) $o['responseStatusCode'] = JsonConverters::to('HttpStatusCode', $this->responseStatusCode);
if (isset($this->clientIPAddress)) $o['clientIPAddress'] = $this->clientIPAddress;
if (isset($this->unitOfMeasurement)) $o['unitOfMeasurement'] = $this->unitOfMeasurement;
if (isset($this->processType)) $o['processType'] = $this->processType;
if (isset($this->dataType)) $o['dataType'] = $this->dataType;
if (isset($this->dataName)) $o['dataName'] = $this->dataName;
if (isset($this->creationDate)) $o['creationDate'] = JsonConverters::to('DateTime', $this->creationDate);
if (isset($this->expiryDate)) $o['expiryDate'] = JsonConverters::to('DateTime', $this->expiryDate);
if (isset($this->isTest)) $o['isTest'] = $this->isTest;
return empty($o) ? new class(){} : $o;
}
}
/** @description Represents a query response that contains a structured error information and encapsulates customers. */
// @Api(Description="Represents a query response that contains a structured error information and encapsulates customers.")
/**
* @template QueryResponse of Order
*/
class OrderQueryResponse extends QueryResponse implements JsonSerializable
{
/**
* @param int $offset
* @param int $total
* @param array<T>|null $results
* @param array<string,string>|null $meta
* @param ResponseStatus|null $responseStatus
*/
public function __construct(
int $offset=0,
int $total=0,
?array $results=null,
?array $meta=null,
?ResponseStatus $responseStatus=null
) {
parent::__construct($offset,$total,$results,$meta,$responseStatus);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['offset'])) $this->offset = $o['offset'];
if (isset($o['total'])) $this->total = $o['total'];
if (isset($o['results'])) $this->results = JsonConverters::fromArray('Order', $o['results']);
if (isset($o['meta'])) $this->meta = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','string']), $o['meta']);
if (isset($o['responseStatus'])) $this->responseStatus = JsonConverters::from('ResponseStatus', $o['responseStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->offset)) $o['offset'] = $this->offset;
if (isset($this->total)) $o['total'] = $this->total;
if (isset($this->results)) $o['results'] = JsonConverters::toArray('Order', $this->results);
if (isset($this->meta)) $o['meta'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','string']), $this->meta);
if (isset($this->responseStatus)) $o['responseStatus'] = JsonConverters::to('ResponseStatus', $this->responseStatus);
return empty($o) ? new class(){} : $o;
}
}
/** @description Represents a service request from an admin user to search for orders. */
// @Api(Description="Represents a service request from an admin user to search for orders.")
class AdminSearchOrders extends AdminSearchOrdersBase implements JsonSerializable
{
/**
* @param int|null $skip
* @param int|null $take
* @param string|null $userName
* @param int|null $orderId
* @param int|null $productId
* @param int|null $accountId
* @param string|null $name
* @param string|null $nameStartsWith
* @param string|null $nameEndsWith
* @param string|null $nameContains
* @param string|null $serviceName
* @param string|null $serviceNameStartsWith
* @param string|null $serviceNameEndsWith
* @param string|null $serviceNameContains
* @param DateTime|null $before
* @param DateTime|null $after
* @param DateTime|null $periodStartDate
* @param DateTime|null $periodEndDate
* @param PeriodMode|null $periodMode
* @param string|null $requestUri
* @param string|null $requestHttpMethod
* @param bool|null $orderRequestSucceeded
* @param string|null $clientIPAddress
* @param string|null $unitOfMeasurement
* @param string|null $unitOfMeasurementStartsWith
* @param string|null $unitOfMeasurementEndsWith
* @param string|null $unitOfMeasurementContains
* @param string|null $processType
* @param string|null $processTypeStartsWith
* @param string|null $processTypeEndsWith
* @param string|null $processTypeContains
* @param string|null $dataType
* @param string|null $dataTypeStartsWith
* @param string|null $dataTypeEndsWith
* @param string|null $dataTypeContains
* @param string|null $dataName
* @param string|null $dataNameStartsWith
* @param string|null $dataNameEndsWith
* @param string|null $dataNameContains
* @param int|null $skip
* @param int|null $take
*/
public function __construct(
?int $skip=null,
?int $take=null,
?string $userName=null,
?int $orderId=null,
?int $productId=null,
?int $accountId=null,
?string $name=null,
?string $nameStartsWith=null,
?string $nameEndsWith=null,
?string $nameContains=null,
?string $serviceName=null,
?string $serviceNameStartsWith=null,
?string $serviceNameEndsWith=null,
?string $serviceNameContains=null,
?DateTime $before=null,
?DateTime $after=null,
?DateTime $periodStartDate=null,
?DateTime $periodEndDate=null,
?PeriodMode $periodMode=null,
?string $requestUri=null,
?string $requestHttpMethod=null,
?bool $orderRequestSucceeded=null,
?string $clientIPAddress=null,
?string $unitOfMeasurement=null,
?string $unitOfMeasurementStartsWith=null,
?string $unitOfMeasurementEndsWith=null,
?string $unitOfMeasurementContains=null,
?string $processType=null,
?string $processTypeStartsWith=null,
?string $processTypeEndsWith=null,
?string $processTypeContains=null,
?string $dataType=null,
?string $dataTypeStartsWith=null,
?string $dataTypeEndsWith=null,
?string $dataTypeContains=null,
?string $dataName=null,
?string $dataNameStartsWith=null,
?string $dataNameEndsWith=null,
?string $dataNameContains=null,
?int $skip=null,
?int $take=null
) {
parent::__construct($skip,$take,$userName,$orderId,$productId,$accountId,$name,$nameStartsWith,$nameEndsWith,$nameContains,$serviceName,$serviceNameStartsWith,$serviceNameEndsWith,$serviceNameContains,$before,$after,$periodStartDate,$periodEndDate,$periodMode,$requestUri,$requestHttpMethod,$orderRequestSucceeded,$clientIPAddress,$unitOfMeasurement,$unitOfMeasurementStartsWith,$unitOfMeasurementEndsWith,$unitOfMeasurementContains,$processType,$processTypeStartsWith,$processTypeEndsWith,$processTypeContains,$dataType,$dataTypeStartsWith,$dataTypeEndsWith,$dataTypeContains,$dataName,$dataNameStartsWith,$dataNameEndsWith,$dataNameContains,$skip,$take);
}
/** @throws Exception */
public function fromMap($o): void {
parent::fromMap($o);
if (isset($o['userName'])) $this->userName = $o['userName'];
if (isset($o['orderId'])) $this->orderId = $o['orderId'];
if (isset($o['productId'])) $this->productId = $o['productId'];
if (isset($o['accountId'])) $this->accountId = $o['accountId'];
if (isset($o['name'])) $this->name = $o['name'];
if (isset($o['nameStartsWith'])) $this->nameStartsWith = $o['nameStartsWith'];
if (isset($o['nameEndsWith'])) $this->nameEndsWith = $o['nameEndsWith'];
if (isset($o['nameContains'])) $this->nameContains = $o['nameContains'];
if (isset($o['serviceName'])) $this->serviceName = $o['serviceName'];
if (isset($o['serviceNameStartsWith'])) $this->serviceNameStartsWith = $o['serviceNameStartsWith'];
if (isset($o['serviceNameEndsWith'])) $this->serviceNameEndsWith = $o['serviceNameEndsWith'];
if (isset($o['serviceNameContains'])) $this->serviceNameContains = $o['serviceNameContains'];
if (isset($o['before'])) $this->before = JsonConverters::from('DateTime', $o['before']);
if (isset($o['after'])) $this->after = JsonConverters::from('DateTime', $o['after']);
if (isset($o['periodStartDate'])) $this->periodStartDate = JsonConverters::from('DateTime', $o['periodStartDate']);
if (isset($o['periodEndDate'])) $this->periodEndDate = JsonConverters::from('DateTime', $o['periodEndDate']);
if (isset($o['periodMode'])) $this->periodMode = JsonConverters::from('PeriodMode', $o['periodMode']);
if (isset($o['requestUri'])) $this->requestUri = $o['requestUri'];
if (isset($o['requestHttpMethod'])) $this->requestHttpMethod = $o['requestHttpMethod'];
if (isset($o['orderRequestSucceeded'])) $this->orderRequestSucceeded = $o['orderRequestSucceeded'];
if (isset($o['clientIPAddress'])) $this->clientIPAddress = $o['clientIPAddress'];
if (isset($o['unitOfMeasurement'])) $this->unitOfMeasurement = $o['unitOfMeasurement'];
if (isset($o['unitOfMeasurementStartsWith'])) $this->unitOfMeasurementStartsWith = $o['unitOfMeasurementStartsWith'];
if (isset($o['unitOfMeasurementEndsWith'])) $this->unitOfMeasurementEndsWith = $o['unitOfMeasurementEndsWith'];
if (isset($o['unitOfMeasurementContains'])) $this->unitOfMeasurementContains = $o['unitOfMeasurementContains'];
if (isset($o['processType'])) $this->processType = $o['processType'];
if (isset($o['processTypeStartsWith'])) $this->processTypeStartsWith = $o['processTypeStartsWith'];
if (isset($o['processTypeEndsWith'])) $this->processTypeEndsWith = $o['processTypeEndsWith'];
if (isset($o['processTypeContains'])) $this->processTypeContains = $o['processTypeContains'];
if (isset($o['dataType'])) $this->dataType = $o['dataType'];
if (isset($o['dataTypeStartsWith'])) $this->dataTypeStartsWith = $o['dataTypeStartsWith'];
if (isset($o['dataTypeEndsWith'])) $this->dataTypeEndsWith = $o['dataTypeEndsWith'];
if (isset($o['dataTypeContains'])) $this->dataTypeContains = $o['dataTypeContains'];
if (isset($o['dataName'])) $this->dataName = $o['dataName'];
if (isset($o['dataNameStartsWith'])) $this->dataNameStartsWith = $o['dataNameStartsWith'];
if (isset($o['dataNameEndsWith'])) $this->dataNameEndsWith = $o['dataNameEndsWith'];
if (isset($o['dataNameContains'])) $this->dataNameContains = $o['dataNameContains'];
if (isset($o['skip'])) $this->skip = $o['skip'];
if (isset($o['take'])) $this->take = $o['take'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = parent::jsonSerialize();
if (isset($this->userName)) $o['userName'] = $this->userName;
if (isset($this->orderId)) $o['orderId'] = $this->orderId;
if (isset($this->productId)) $o['productId'] = $this->productId;
if (isset($this->accountId)) $o['accountId'] = $this->accountId;
if (isset($this->name)) $o['name'] = $this->name;
if (isset($this->nameStartsWith)) $o['nameStartsWith'] = $this->nameStartsWith;
if (isset($this->nameEndsWith)) $o['nameEndsWith'] = $this->nameEndsWith;
if (isset($this->nameContains)) $o['nameContains'] = $this->nameContains;
if (isset($this->serviceName)) $o['serviceName'] = $this->serviceName;
if (isset($this->serviceNameStartsWith)) $o['serviceNameStartsWith'] = $this->serviceNameStartsWith;
if (isset($this->serviceNameEndsWith)) $o['serviceNameEndsWith'] = $this->serviceNameEndsWith;
if (isset($this->serviceNameContains)) $o['serviceNameContains'] = $this->serviceNameContains;
if (isset($this->before)) $o['before'] = JsonConverters::to('DateTime', $this->before);
if (isset($this->after)) $o['after'] = JsonConverters::to('DateTime', $this->after);
if (isset($this->periodStartDate)) $o['periodStartDate'] = JsonConverters::to('DateTime', $this->periodStartDate);
if (isset($this->periodEndDate)) $o['periodEndDate'] = JsonConverters::to('DateTime', $this->periodEndDate);
if (isset($this->periodMode)) $o['periodMode'] = JsonConverters::to('PeriodMode', $this->periodMode);
if (isset($this->requestUri)) $o['requestUri'] = $this->requestUri;
if (isset($this->requestHttpMethod)) $o['requestHttpMethod'] = $this->requestHttpMethod;
if (isset($this->orderRequestSucceeded)) $o['orderRequestSucceeded'] = $this->orderRequestSucceeded;
if (isset($this->clientIPAddress)) $o['clientIPAddress'] = $this->clientIPAddress;
if (isset($this->unitOfMeasurement)) $o['unitOfMeasurement'] = $this->unitOfMeasurement;
if (isset($this->unitOfMeasurementStartsWith)) $o['unitOfMeasurementStartsWith'] = $this->unitOfMeasurementStartsWith;
if (isset($this->unitOfMeasurementEndsWith)) $o['unitOfMeasurementEndsWith'] = $this->unitOfMeasurementEndsWith;
if (isset($this->unitOfMeasurementContains)) $o['unitOfMeasurementContains'] = $this->unitOfMeasurementContains;
if (isset($this->processType)) $o['processType'] = $this->processType;
if (isset($this->processTypeStartsWith)) $o['processTypeStartsWith'] = $this->processTypeStartsWith;
if (isset($this->processTypeEndsWith)) $o['processTypeEndsWith'] = $this->processTypeEndsWith;
if (isset($this->processTypeContains)) $o['processTypeContains'] = $this->processTypeContains;
if (isset($this->dataType)) $o['dataType'] = $this->dataType;
if (isset($this->dataTypeStartsWith)) $o['dataTypeStartsWith'] = $this->dataTypeStartsWith;
if (isset($this->dataTypeEndsWith)) $o['dataTypeEndsWith'] = $this->dataTypeEndsWith;
if (isset($this->dataTypeContains)) $o['dataTypeContains'] = $this->dataTypeContains;
if (isset($this->dataName)) $o['dataName'] = $this->dataName;
if (isset($this->dataNameStartsWith)) $o['dataNameStartsWith'] = $this->dataNameStartsWith;
if (isset($this->dataNameEndsWith)) $o['dataNameEndsWith'] = $this->dataNameEndsWith;
if (isset($this->dataNameContains)) $o['dataNameContains'] = $this->dataNameContains;
if (isset($this->skip)) $o['skip'] = $this->skip;
if (isset($this->take)) $o['take'] = $this->take;
return empty($o) ? new class(){} : $o;
}
}
// @DataContract
/**
* @template T
*/
class QueryResponse implements JsonSerializable
{
public array $genericArgs = [];
public static function create(array $genericArgs=[]): QueryResponse {
$to = new QueryResponse();
$to->genericArgs = $genericArgs;
return $to;
}
public function __construct(
// @DataMember(Order=1)
/** @var int */
public mixed $offset=0,
// @DataMember(Order=2)
/** @var int */
public mixed $total=0,
// @DataMember(Order=3)
/** @var array<T>|null */
public mixed $results=null,
// @DataMember(Order=4)
/** @var array<string,string>|null */
public mixed $meta=null,
// @DataMember(Order=5)
/** @var ResponseStatus|null */
public mixed $responseStatus=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['offset'])) $this->offset = $o['offset'];
if (isset($o['total'])) $this->total = $o['total'];
if (isset($o['results'])) $this->results = JsonConverters::fromArray($this->genericArgs[0], $o['results']);
if (isset($o['meta'])) $this->meta = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['string','string']), $o['meta']);
if (isset($o['responseStatus'])) $this->responseStatus = JsonConverters::from('ResponseStatus', $o['responseStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->offset)) $o['offset'] = $this->offset;
if (isset($this->total)) $o['total'] = $this->total;
if (isset($this->results)) $o['results'] = JsonConverters::toArray($this->genericArgs[0], $this->results);
if (isset($this->meta)) $o['meta'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['string','string']), $this->meta);
if (isset($this->responseStatus)) $o['responseStatus'] = JsonConverters::to('ResponseStatus', $this->responseStatus);
return empty($o) ? new class(){} : $o;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .x-msgpack suffix or ?format=x-msgpack
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /sync/admin/orders/search HTTP/1.1 Host: taxfiling.staging.pwc.de Accept: application/x-msgpack
HTTP/1.1 200 OK Content-Type: application/x-msgpack Content-Length: length {"offset":0,"total":0,"results":[{"id":0,"productId":0,"accountId":0,"name":"String","serviceName":"String","requestTimestamp":"\/Date(-62135596800000-0000)\/","responseTimestamp":"\/Date(-62135596800000-0000)\/","requestUri":"String","requestHttpMethod":"String","requestDuration":"PT0S","responseStatusCode":"Continue","clientIPAddress":"String","unitOfMeasurement":"String","processType":"String","dataType":"String","dataName":"String","creationDate":"\/Date(-62135596800000-0000)\/","expiryDate":"\/Date(-62135596800000-0000)\/","isTest":false}],"meta":{"String":"String"},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}