GET | /api/packet/getstatus/{GatewayPacketId} |
---|
<?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 GatewayPacketStatus implements JsonSerializable
{
public function __construct(
/** @var string */
public string $GatewayPacketId='',
/** @var string */
public string $CommunicationStatusId='',
/** @var string|null */
public ?string $CommunicationStatus=null,
/** @var string|null */
public ?string $StatusMessage=null,
/** @var bool|null */
public ?bool $PayloadFinalised=null,
/** @var string|null */
public ?string $AlternateKey=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['GatewayPacketId'])) $this->GatewayPacketId = $o['GatewayPacketId'];
if (isset($o['CommunicationStatusId'])) $this->CommunicationStatusId = $o['CommunicationStatusId'];
if (isset($o['CommunicationStatus'])) $this->CommunicationStatus = $o['CommunicationStatus'];
if (isset($o['StatusMessage'])) $this->StatusMessage = $o['StatusMessage'];
if (isset($o['PayloadFinalised'])) $this->PayloadFinalised = $o['PayloadFinalised'];
if (isset($o['AlternateKey'])) $this->AlternateKey = $o['AlternateKey'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->GatewayPacketId)) $o['GatewayPacketId'] = $this->GatewayPacketId;
if (isset($this->CommunicationStatusId)) $o['CommunicationStatusId'] = $this->CommunicationStatusId;
if (isset($this->CommunicationStatus)) $o['CommunicationStatus'] = $this->CommunicationStatus;
if (isset($this->StatusMessage)) $o['StatusMessage'] = $this->StatusMessage;
if (isset($this->PayloadFinalised)) $o['PayloadFinalised'] = $this->PayloadFinalised;
if (isset($this->AlternateKey)) $o['AlternateKey'] = $this->AlternateKey;
return empty($o) ? new class(){} : $o;
}
}
/** @description Retrieve GatewayPacket status */
// @Api(Description="Retrieve GatewayPacket status")
class GetGatewayPacketStatus implements JsonSerializable
{
public function __construct(
/** @var string */
public string $GatewayPacketId=''
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['GatewayPacketId'])) $this->GatewayPacketId = $o['GatewayPacketId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->GatewayPacketId)) $o['GatewayPacketId'] = $this->GatewayPacketId;
return empty($o) ? new class(){} : $o;
}
}
PHP GetGatewayPacketStatus DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/packet/getstatus/{GatewayPacketId} HTTP/1.1 Host: production-eros-gateway-api-supplierconnect.azurewebsites.net Accept: text/csv
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"CommunicationStatus":"String","StatusMessage":"String","PayloadFinalised":false,"AlternateKey":"String"}