| GET | /qry/recentJackpotWinners |
|---|
<?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 RecentJackpotWinner implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $betId=null,
/** @var string|null */
public ?string $slipId=null,
/** @var string|null */
public ?string $jpId=null,
/** @var float */
public float $amount=0.0,
/** @var string|null */
public ?string $locationId=null,
/** @var string|null */
public ?string $locationName=null,
/** @var string|null */
public ?string $addressLine=null,
/** @var string|null */
public ?string $roundId=null,
/** @var DateTime */
public DateTime $wonAtUtc=new DateTime()
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['betId'])) $this->betId = $o['betId'];
if (isset($o['slipId'])) $this->slipId = $o['slipId'];
if (isset($o['jpId'])) $this->jpId = $o['jpId'];
if (isset($o['amount'])) $this->amount = $o['amount'];
if (isset($o['locationId'])) $this->locationId = $o['locationId'];
if (isset($o['locationName'])) $this->locationName = $o['locationName'];
if (isset($o['addressLine'])) $this->addressLine = $o['addressLine'];
if (isset($o['roundId'])) $this->roundId = $o['roundId'];
if (isset($o['wonAtUtc'])) $this->wonAtUtc = JsonConverters::from('DateTime', $o['wonAtUtc']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->betId)) $o['betId'] = $this->betId;
if (isset($this->slipId)) $o['slipId'] = $this->slipId;
if (isset($this->jpId)) $o['jpId'] = $this->jpId;
if (isset($this->amount)) $o['amount'] = $this->amount;
if (isset($this->locationId)) $o['locationId'] = $this->locationId;
if (isset($this->locationName)) $o['locationName'] = $this->locationName;
if (isset($this->addressLine)) $o['addressLine'] = $this->addressLine;
if (isset($this->roundId)) $o['roundId'] = $this->roundId;
if (isset($this->wonAtUtc)) $o['wonAtUtc'] = JsonConverters::to('DateTime', $this->wonAtUtc);
return empty($o) ? new class(){} : $o;
}
}
class RecentJackpotWinners implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $id=null,
/** @var array<RecentJackpotWinner>|null */
public ?array $recentWinners=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['id'])) $this->id = $o['id'];
if (isset($o['recentWinners'])) $this->recentWinners = JsonConverters::fromArray('RecentJackpotWinner', $o['recentWinners']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->id)) $o['id'] = $this->id;
if (isset($this->recentWinners)) $o['recentWinners'] = JsonConverters::toArray('RecentJackpotWinner', $this->recentWinners);
return empty($o) ? new class(){} : $o;
}
}
class GetRecentJackpotWinners implements JsonSerializable
{
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
return empty($o) ? new class(){} : $o;
}
}
PHP GetRecentJackpotWinners DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /qry/recentJackpotWinners HTTP/1.1 Host: grh1.api.bettor.webhop.biz Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"id":"String","recentWinners":[{"betId":"String","slipId":"String","jpId":"String","amount":0,"locationId":"String","locationName":"String","addressLine":"String","roundId":"String","wonAtUtc":"0001-01-01T00:00:00.0000000Z"}]}