| All Verbs | /CompanyLocations/Summary/{CompanyId} | ||
|---|---|---|---|
| All Verbs | /CompanyLocations/Summary/{CompanyId}/{UserId} |
<?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 LocationSummaryRequest implements JsonSerializable
{
public function __construct(
/** @var int */
public int $companyId=0,
/** @var string|null */
public ?string $userId=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['companyId'])) $this->companyId = $o['companyId'];
if (isset($o['userId'])) $this->userId = $o['userId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->companyId)) $o['companyId'] = $this->companyId;
if (isset($this->userId)) $o['userId'] = $this->userId;
return empty($o) ? new class(){} : $o;
}
}
PHP LocationSummaryRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /CompanyLocations/Summary/{CompanyId} HTTP/1.1
Host: cip-reporting-dev.chargeitpro.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
companyId: 0,
userId: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
[
{
locationName: String,
locationKey: 0,
count: 0,
allCards: 0,
allCC: 0,
db: 0,
vsmcdc: 0,
ax: 0,
vs: 0,
mc: 0,
dc: 0,
jc: 0,
cu: 0,
xx: 0,
deviceSummaries:
[
{
serialNumber: String,
count: 0,
allCards: 0,
allCC: 0,
db: 0,
vsmcdc: 0,
ax: 0,
vs: 0,
mc: 0,
dc: 0,
jc: 0,
cu: 0,
xx: 0
}
]
}
]