Antel API

<back to all web services

IncompleteUpliftList

Requires Authentication
The following routes are available for this service:
GET/sync/incompleteuplifts
<?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 ApiServiceRequest implements IServiceRequest, IHasApiKey, IHasDeviceInfo, JsonSerializable
{
    public function __construct(
        /** @description The API Key required for authentication */
        // @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)
        /** @var string */
        public string $apiKey='',

        /** @description Latitude of the user making this request */
        // @ApiMember(DataType="double", Description="Latitude of the user making this request")
        /** @var float */
        public float $latitude=0.0,

        /** @description Longitude of the user making this request */
        // @ApiMember(DataType="double", Description="Longitude of the user making this request")
        /** @var float */
        public float $longitude=0.0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['apiKey'])) $this->apiKey = $o['apiKey'];
        if (isset($o['latitude'])) $this->latitude = $o['latitude'];
        if (isset($o['longitude'])) $this->longitude = $o['longitude'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->apiKey)) $o['apiKey'] = $this->apiKey;
        if (isset($this->latitude)) $o['latitude'] = $this->latitude;
        if (isset($this->longitude)) $o['longitude'] = $this->longitude;
        return empty($o) ? new class(){} : $o;
    }
}

class ApiServiceResponse implements IServiceResponse, JsonSerializable
{
    public function __construct(
        /** @description Information about the response. */
        // @ApiMember(Description="Information about the response.", IsRequired=true)
        /** @var string */
        public string $description='',

        /** @description Heading or summary of the response. */
        // @ApiMember(Description="Heading or summary of the response.", IsRequired=true)
        /** @var string */
        public string $heading='',

        /** @description Did the intended operation for this response complete successfully? */
        // @ApiMember(DataType="boolean", Description="Did the intended operation for this response complete successfully?", IsRequired=true)
        /** @var bool|null */
        public ?bool $wasSuccessful=null,

        /** @var ResponseStatus|null */
        public ?ResponseStatus $responseStatus=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['description'])) $this->description = $o['description'];
        if (isset($o['heading'])) $this->heading = $o['heading'];
        if (isset($o['wasSuccessful'])) $this->wasSuccessful = $o['wasSuccessful'];
        if (isset($o['responseStatus'])) $this->responseStatus = JsonConverters::from('ResponseStatus', $o['responseStatus']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->description)) $o['description'] = $this->description;
        if (isset($this->heading)) $o['heading'] = $this->heading;
        if (isset($this->wasSuccessful)) $o['wasSuccessful'] = $this->wasSuccessful;
        if (isset($this->responseStatus)) $o['responseStatus'] = JsonConverters::to('ResponseStatus', $this->responseStatus);
        return empty($o) ? new class(){} : $o;
    }
}

class IncompleteUpliftData implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $systemUserId=0,
        /** @var string */
        public string $incompleteUpliftId='',
        /** @var int */
        public int $upliftSchedulePrincipleId=0,
        /** @var DateTime */
        public DateTime $lastSynced=new DateTime(),
        /** @var bool|null */
        public ?bool $isSubmitted=null,
        /** @var bool|null */
        public ?bool $deleteFromDevice=null,
        /** @var string */
        public string $checkedOutDeviceId='',
        /** @var string|null */
        public ?string $checkedOutOperatorName=null,
        /** @var string|null */
        public ?string $createdByOperatorName=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['systemUserId'])) $this->systemUserId = $o['systemUserId'];
        if (isset($o['incompleteUpliftId'])) $this->incompleteUpliftId = $o['incompleteUpliftId'];
        if (isset($o['upliftSchedulePrincipleId'])) $this->upliftSchedulePrincipleId = $o['upliftSchedulePrincipleId'];
        if (isset($o['lastSynced'])) $this->lastSynced = JsonConverters::from('DateTime', $o['lastSynced']);
        if (isset($o['isSubmitted'])) $this->isSubmitted = $o['isSubmitted'];
        if (isset($o['deleteFromDevice'])) $this->deleteFromDevice = $o['deleteFromDevice'];
        if (isset($o['checkedOutDeviceId'])) $this->checkedOutDeviceId = $o['checkedOutDeviceId'];
        if (isset($o['checkedOutOperatorName'])) $this->checkedOutOperatorName = $o['checkedOutOperatorName'];
        if (isset($o['createdByOperatorName'])) $this->createdByOperatorName = $o['createdByOperatorName'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->systemUserId)) $o['systemUserId'] = $this->systemUserId;
        if (isset($this->incompleteUpliftId)) $o['incompleteUpliftId'] = $this->incompleteUpliftId;
        if (isset($this->upliftSchedulePrincipleId)) $o['upliftSchedulePrincipleId'] = $this->upliftSchedulePrincipleId;
        if (isset($this->lastSynced)) $o['lastSynced'] = JsonConverters::to('DateTime', $this->lastSynced);
        if (isset($this->isSubmitted)) $o['isSubmitted'] = $this->isSubmitted;
        if (isset($this->deleteFromDevice)) $o['deleteFromDevice'] = $this->deleteFromDevice;
        if (isset($this->checkedOutDeviceId)) $o['checkedOutDeviceId'] = $this->checkedOutDeviceId;
        if (isset($this->checkedOutOperatorName)) $o['checkedOutOperatorName'] = $this->checkedOutOperatorName;
        if (isset($this->createdByOperatorName)) $o['createdByOperatorName'] = $this->createdByOperatorName;
        return empty($o) ? new class(){} : $o;
    }
}

class IncompleteUpliftListResponse extends ApiServiceResponse implements JsonSerializable
{
    /**
     * @param string $description
     * @param string $heading
     * @param bool|null $wasSuccessful
     * @param ResponseStatus|null $responseStatus
     */
    public function __construct(
        string $description='',
        string $heading='',
        ?bool $wasSuccessful=null,
        ?ResponseStatus $responseStatus=null,
        /** @var array<IncompleteUpliftData>|null */
        public ?array $incompleteUplifts=null,
        /** @var bool|null */
        public ?bool $allowLogin=null
    ) {
        parent::__construct($description,$heading,$wasSuccessful,$responseStatus);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['incompleteUplifts'])) $this->incompleteUplifts = JsonConverters::fromArray('IncompleteUpliftData', $o['incompleteUplifts']);
        if (isset($o['allowLogin'])) $this->allowLogin = $o['allowLogin'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->incompleteUplifts)) $o['incompleteUplifts'] = JsonConverters::toArray('IncompleteUpliftData', $this->incompleteUplifts);
        if (isset($this->allowLogin)) $o['allowLogin'] = $this->allowLogin;
        return empty($o) ? new class(){} : $o;
    }
}

class IncompleteUpliftList extends ApiServiceRequest implements JsonSerializable
{
    /**
     * @param string $apiKey
     * @param float $latitude
     * @param float $longitude
     */
    public function __construct(
        string $apiKey='',
        float $latitude=0.0,
        float $longitude=0.0
    ) {
        parent::__construct($apiKey,$latitude,$longitude);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        return empty($o) ? new class(){} : $o;
    }
}

PHP IncompleteUpliftList DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /sync/incompleteuplifts HTTP/1.1 
Host: antel.api.dev.86degrees.com 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"incompleteUplifts":[{}],"allowLogin":false,"description":"String","heading":"String","wasSuccessful":false,"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}