Antel API

<back to all web services

GetUpliftSchedule

Requires Authentication
The following routes are available for this service:
GET/upliftscedule
<?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;
    }
}

enum UpliftScheduleStatus : int
{
    case Unconfirmed = 0;
    case Confirmed = 1;
    case PortalCancelled = 4;
    case UserCancelled = 5;
    case NoOperatorAssigned = 6;
}

class ProductData implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $productId=0,
        /** @var int */
        public int $principalId=0,
        /** @var string|null */
        public ?string $name=null,
        /** @var string|null */
        public ?string $category=null,
        /** @var string|null */
        public ?string $productCode=null,
        /** @var string|null */
        public ?string $unitBarcode=null,
        /** @var int */
        public int $cartonQuantity=0,
        /** @var int */
        public int $shrinkQuantity=0,
        /** @var int */
        public int $unitQuantity=0,
        /** @var string|null */
        public ?string $cartonMeasurement=null,
        /** @var string|null */
        public ?string $shrinkMeasurement=null,
        /** @var string|null */
        public ?string $unitMeasurement=null,
        /** @var float */
        public float $cartonWeight=0.0,
        /** @var float */
        public float $shrinkWeight=0.0,
        /** @var float */
        public float $unitWeight=0.0,
        /** @var float */
        public float $cartonPrice=0.0,
        /** @var float */
        public float $shrinkPrice=0.0,
        /** @var float */
        public float $unitPrice=0.0,
        /** @var int */
        public int $maxQuantity=0,
        /** @var int */
        public int $maxPrice=0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['productId'])) $this->productId = $o['productId'];
        if (isset($o['principalId'])) $this->principalId = $o['principalId'];
        if (isset($o['name'])) $this->name = $o['name'];
        if (isset($o['category'])) $this->category = $o['category'];
        if (isset($o['productCode'])) $this->productCode = $o['productCode'];
        if (isset($o['unitBarcode'])) $this->unitBarcode = $o['unitBarcode'];
        if (isset($o['cartonQuantity'])) $this->cartonQuantity = $o['cartonQuantity'];
        if (isset($o['shrinkQuantity'])) $this->shrinkQuantity = $o['shrinkQuantity'];
        if (isset($o['unitQuantity'])) $this->unitQuantity = $o['unitQuantity'];
        if (isset($o['cartonMeasurement'])) $this->cartonMeasurement = $o['cartonMeasurement'];
        if (isset($o['shrinkMeasurement'])) $this->shrinkMeasurement = $o['shrinkMeasurement'];
        if (isset($o['unitMeasurement'])) $this->unitMeasurement = $o['unitMeasurement'];
        if (isset($o['cartonWeight'])) $this->cartonWeight = $o['cartonWeight'];
        if (isset($o['shrinkWeight'])) $this->shrinkWeight = $o['shrinkWeight'];
        if (isset($o['unitWeight'])) $this->unitWeight = $o['unitWeight'];
        if (isset($o['cartonPrice'])) $this->cartonPrice = $o['cartonPrice'];
        if (isset($o['shrinkPrice'])) $this->shrinkPrice = $o['shrinkPrice'];
        if (isset($o['unitPrice'])) $this->unitPrice = $o['unitPrice'];
        if (isset($o['maxQuantity'])) $this->maxQuantity = $o['maxQuantity'];
        if (isset($o['maxPrice'])) $this->maxPrice = $o['maxPrice'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->productId)) $o['productId'] = $this->productId;
        if (isset($this->principalId)) $o['principalId'] = $this->principalId;
        if (isset($this->name)) $o['name'] = $this->name;
        if (isset($this->category)) $o['category'] = $this->category;
        if (isset($this->productCode)) $o['productCode'] = $this->productCode;
        if (isset($this->unitBarcode)) $o['unitBarcode'] = $this->unitBarcode;
        if (isset($this->cartonQuantity)) $o['cartonQuantity'] = $this->cartonQuantity;
        if (isset($this->shrinkQuantity)) $o['shrinkQuantity'] = $this->shrinkQuantity;
        if (isset($this->unitQuantity)) $o['unitQuantity'] = $this->unitQuantity;
        if (isset($this->cartonMeasurement)) $o['cartonMeasurement'] = $this->cartonMeasurement;
        if (isset($this->shrinkMeasurement)) $o['shrinkMeasurement'] = $this->shrinkMeasurement;
        if (isset($this->unitMeasurement)) $o['unitMeasurement'] = $this->unitMeasurement;
        if (isset($this->cartonWeight)) $o['cartonWeight'] = $this->cartonWeight;
        if (isset($this->shrinkWeight)) $o['shrinkWeight'] = $this->shrinkWeight;
        if (isset($this->unitWeight)) $o['unitWeight'] = $this->unitWeight;
        if (isset($this->cartonPrice)) $o['cartonPrice'] = $this->cartonPrice;
        if (isset($this->shrinkPrice)) $o['shrinkPrice'] = $this->shrinkPrice;
        if (isset($this->unitPrice)) $o['unitPrice'] = $this->unitPrice;
        if (isset($this->maxQuantity)) $o['maxQuantity'] = $this->maxQuantity;
        if (isset($this->maxPrice)) $o['maxPrice'] = $this->maxPrice;
        return empty($o) ? new class(){} : $o;
    }
}

class ProductDataCategory implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $unitBarcode=null,
        /** @var array<ProductData>|null */
        public ?array $products=null
    ) {
    }

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

class ProductExceptionData implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $region=null,
        /** @var string|null */
        public ?string $channel=null,
        /** @var int */
        public int $productId=0,
        /** @var array<int>|null */
        public ?array $stockStatusIds=null
    ) {
    }

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

class PrincipalData implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $principalId=0,
        /** @var string|null */
        public ?string $name=null,
        /** @var array<string>|null */
        public ?array $authLetterFileUrl=null,
        /** @var string|null */
        public ?string $logoImageUrl=null,
        /** @var array<ProductDataCategory>|null */
        public ?array $products=null,
        /** @var string|null */
        public ?string $upliftPrefix=null,
        /** @var string|null */
        public ?string $contactName=null,
        /** @var string|null */
        public ?string $contactNumber=null,
        /** @var string|null */
        public ?string $contactEmail=null,
        /** @var bool|null */
        public ?bool $allowProductLookup=null,
        /** @var bool|null */
        public ?bool $hasLogo=null,
        /** @var bool|null */
        public ?bool $hasAuthLetter=null,
        /** @var bool|null */
        public ?bool $sealNetWeightMandatory=null,
        /** @var bool|null */
        public ?bool $allowBillableSeals=null,
        /** @var bool|null */
        public ?bool $captureSerialNumber=null,
        /** @var bool|null */
        public ?bool $batchCodesMandatory=null,
        /** @var bool|null */
        public ?bool $captureManufactureAndExpiryDate=null,
        /** @var array<ProductExceptionData>|null */
        public ?array $productExceptions=null,
        /** @var bool|null */
        public ?bool $usesOwnSealNumbers=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['principalId'])) $this->principalId = $o['principalId'];
        if (isset($o['name'])) $this->name = $o['name'];
        if (isset($o['authLetterFileUrl'])) $this->authLetterFileUrl = JsonConverters::fromArray('string', $o['authLetterFileUrl']);
        if (isset($o['logoImageUrl'])) $this->logoImageUrl = $o['logoImageUrl'];
        if (isset($o['products'])) $this->products = JsonConverters::fromArray('ProductDataCategory', $o['products']);
        if (isset($o['upliftPrefix'])) $this->upliftPrefix = $o['upliftPrefix'];
        if (isset($o['contactName'])) $this->contactName = $o['contactName'];
        if (isset($o['contactNumber'])) $this->contactNumber = $o['contactNumber'];
        if (isset($o['contactEmail'])) $this->contactEmail = $o['contactEmail'];
        if (isset($o['allowProductLookup'])) $this->allowProductLookup = $o['allowProductLookup'];
        if (isset($o['hasLogo'])) $this->hasLogo = $o['hasLogo'];
        if (isset($o['hasAuthLetter'])) $this->hasAuthLetter = $o['hasAuthLetter'];
        if (isset($o['sealNetWeightMandatory'])) $this->sealNetWeightMandatory = $o['sealNetWeightMandatory'];
        if (isset($o['allowBillableSeals'])) $this->allowBillableSeals = $o['allowBillableSeals'];
        if (isset($o['captureSerialNumber'])) $this->captureSerialNumber = $o['captureSerialNumber'];
        if (isset($o['batchCodesMandatory'])) $this->batchCodesMandatory = $o['batchCodesMandatory'];
        if (isset($o['captureManufactureAndExpiryDate'])) $this->captureManufactureAndExpiryDate = $o['captureManufactureAndExpiryDate'];
        if (isset($o['productExceptions'])) $this->productExceptions = JsonConverters::fromArray('ProductExceptionData', $o['productExceptions']);
        if (isset($o['usesOwnSealNumbers'])) $this->usesOwnSealNumbers = $o['usesOwnSealNumbers'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->principalId)) $o['principalId'] = $this->principalId;
        if (isset($this->name)) $o['name'] = $this->name;
        if (isset($this->authLetterFileUrl)) $o['authLetterFileUrl'] = JsonConverters::toArray('string', $this->authLetterFileUrl);
        if (isset($this->logoImageUrl)) $o['logoImageUrl'] = $this->logoImageUrl;
        if (isset($this->products)) $o['products'] = JsonConverters::toArray('ProductDataCategory', $this->products);
        if (isset($this->upliftPrefix)) $o['upliftPrefix'] = $this->upliftPrefix;
        if (isset($this->contactName)) $o['contactName'] = $this->contactName;
        if (isset($this->contactNumber)) $o['contactNumber'] = $this->contactNumber;
        if (isset($this->contactEmail)) $o['contactEmail'] = $this->contactEmail;
        if (isset($this->allowProductLookup)) $o['allowProductLookup'] = $this->allowProductLookup;
        if (isset($this->hasLogo)) $o['hasLogo'] = $this->hasLogo;
        if (isset($this->hasAuthLetter)) $o['hasAuthLetter'] = $this->hasAuthLetter;
        if (isset($this->sealNetWeightMandatory)) $o['sealNetWeightMandatory'] = $this->sealNetWeightMandatory;
        if (isset($this->allowBillableSeals)) $o['allowBillableSeals'] = $this->allowBillableSeals;
        if (isset($this->captureSerialNumber)) $o['captureSerialNumber'] = $this->captureSerialNumber;
        if (isset($this->batchCodesMandatory)) $o['batchCodesMandatory'] = $this->batchCodesMandatory;
        if (isset($this->captureManufactureAndExpiryDate)) $o['captureManufactureAndExpiryDate'] = $this->captureManufactureAndExpiryDate;
        if (isset($this->productExceptions)) $o['productExceptions'] = JsonConverters::toArray('ProductExceptionData', $this->productExceptions);
        if (isset($this->usesOwnSealNumbers)) $o['usesOwnSealNumbers'] = $this->usesOwnSealNumbers;
        return empty($o) ? new class(){} : $o;
    }
}

enum ActionOutsideMaxDistanceType : int
{
    case Warn = 0;
    case Block = 1;
}

class TemplateProductData implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $name=null,
        /** @var string|null */
        public ?string $productCode=null,
        /** @var string|null */
        public ?string $barcode=null,
        /** @var array<string,int>|null */
        public ?array $statusQty=null,
        /** @var float */
        public float $returnValue=0.0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['name'])) $this->name = $o['name'];
        if (isset($o['productCode'])) $this->productCode = $o['productCode'];
        if (isset($o['barcode'])) $this->barcode = $o['barcode'];
        if (isset($o['statusQty'])) $this->statusQty = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['int','int']), $o['statusQty']);
        if (isset($o['returnValue'])) $this->returnValue = $o['returnValue'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->name)) $o['name'] = $this->name;
        if (isset($this->productCode)) $o['productCode'] = $this->productCode;
        if (isset($this->barcode)) $o['barcode'] = $this->barcode;
        if (isset($this->statusQty)) $o['statusQty'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['int','int']), $this->statusQty);
        if (isset($this->returnValue)) $o['returnValue'] = $this->returnValue;
        return empty($o) ? new class(){} : $o;
    }
}

class UpliftRequestSealData implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $number=null,
        /** @var float */
        public float $weight=0.0
    ) {
    }

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

class UpliftTemplateData implements JsonSerializable
{
    public function __construct(
        /** @var float */
        public float $totalValue=0.0,
        /** @var array<TemplateProductData>|null */
        public ?array $products=null,
        /** @var array<UpliftRequestSealData>|null */
        public ?array $seals=null
    ) {
    }

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

class StockStatusData implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $id=0,
        /** @var string|null */
        public ?string $name=null,
        /** @var bool|null */
        public ?bool $photoRequired=null,
        /** @var string|null */
        public ?string $color=null
    ) {
    }

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

class SealTemplateProduct implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $productId=0,
        /** @var string|null */
        public ?string $name=null,
        /** @var int */
        public int $productStockStatusId=0,
        /** @var int */
        public int $quantity=0,
        /** @var string|null */
        public ?string $serialNumber=null
    ) {
    }

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

class SealTemplateItemData implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $sealNumber=null,
        /** @var int */
        public int $productStockStatus=0,
        /** @var array<SealTemplateProduct>|null */
        public ?array $products=null
    ) {
    }

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

class SealTemplateData implements JsonSerializable
{
    public function __construct(
        /** @var array<SealTemplateItemData>|null */
        public ?array $items=null
    ) {
    }

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

class AppointmentPrincipleData implements JsonSerializable
{
    public function __construct(
        /** @var PrincipalData|null */
        public ?PrincipalData $principle=null,
        /** @var string|null */
        public ?string $scheduledDate=null,
        /** @var int */
        public int $upliftScheduleId=0,
        /** @var int */
        public int $upliftSchedulePrincipleId=0,
        /** @var int */
        public int $principleOutletId=0,
        /** @var string|null */
        public ?string $verificationCode=null,
        /** @var bool|null */
        public ?bool $goodsToCollect=null,
        /** @var string|null */
        public ?string $outletRegion=null,
        /** @var string|null */
        public ?string $outletName=null,
        /** @var string|null */
        public ?string $outletChannel=null,
        /** @var float */
        public float $outletLatitude=0.0,
        /** @var float */
        public float $outletLongitude=0.0,
        /** @var float */
        public float $maxSubmissionDistance=0.0,
        /** @var ActionOutsideMaxDistanceType|null */
        public ?ActionOutsideMaxDistanceType $actionOutsideMaxDistance=null,
        /** @var string|null */
        public ?string $completedDate=null,
        /** @var bool|null */
        public ?bool $cancelled=null,
        /** @var bool|null */
        public ?bool $completed=null,
        /** @var UpliftTemplateData|null */
        public ?UpliftTemplateData $upliftTemplate=null,
        /** @var bool|null */
        public ?bool $prePopulated=null,
        /** @var array<StockStatusData>|null */
        public ?array $allowedProductStockStatuses=null,
        /** @var string|null */
        public ?string $noteToOperator=null,
        /** @var SealTemplateData|null */
        public ?SealTemplateData $sealTemplate=null,
        /** @var bool|null */
        public ?bool $prePopulatedWithSeals=null,
        /** @var bool|null */
        public ?bool $preAuthed=null,
        /** @var string|null */
        public ?string $operatorName=null,
        /** @var int */
        public int $systemUserId=0,
        /** @var array<ProductExceptionData>|null */
        public ?array $productExceptions=null,
        /** @var string|null */
        public ?string $storeConfirmationDocumentUrl=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['principle'])) $this->principle = JsonConverters::from('PrincipalData', $o['principle']);
        if (isset($o['scheduledDate'])) $this->scheduledDate = $o['scheduledDate'];
        if (isset($o['upliftScheduleId'])) $this->upliftScheduleId = $o['upliftScheduleId'];
        if (isset($o['upliftSchedulePrincipleId'])) $this->upliftSchedulePrincipleId = $o['upliftSchedulePrincipleId'];
        if (isset($o['principleOutletId'])) $this->principleOutletId = $o['principleOutletId'];
        if (isset($o['verificationCode'])) $this->verificationCode = $o['verificationCode'];
        if (isset($o['goodsToCollect'])) $this->goodsToCollect = $o['goodsToCollect'];
        if (isset($o['outletRegion'])) $this->outletRegion = $o['outletRegion'];
        if (isset($o['outletName'])) $this->outletName = $o['outletName'];
        if (isset($o['outletChannel'])) $this->outletChannel = $o['outletChannel'];
        if (isset($o['outletLatitude'])) $this->outletLatitude = $o['outletLatitude'];
        if (isset($o['outletLongitude'])) $this->outletLongitude = $o['outletLongitude'];
        if (isset($o['maxSubmissionDistance'])) $this->maxSubmissionDistance = $o['maxSubmissionDistance'];
        if (isset($o['actionOutsideMaxDistance'])) $this->actionOutsideMaxDistance = JsonConverters::from('ActionOutsideMaxDistanceType', $o['actionOutsideMaxDistance']);
        if (isset($o['completedDate'])) $this->completedDate = $o['completedDate'];
        if (isset($o['cancelled'])) $this->cancelled = $o['cancelled'];
        if (isset($o['completed'])) $this->completed = $o['completed'];
        if (isset($o['upliftTemplate'])) $this->upliftTemplate = JsonConverters::from('UpliftTemplateData', $o['upliftTemplate']);
        if (isset($o['prePopulated'])) $this->prePopulated = $o['prePopulated'];
        if (isset($o['allowedProductStockStatuses'])) $this->allowedProductStockStatuses = JsonConverters::fromArray('StockStatusData', $o['allowedProductStockStatuses']);
        if (isset($o['noteToOperator'])) $this->noteToOperator = $o['noteToOperator'];
        if (isset($o['sealTemplate'])) $this->sealTemplate = JsonConverters::from('SealTemplateData', $o['sealTemplate']);
        if (isset($o['prePopulatedWithSeals'])) $this->prePopulatedWithSeals = $o['prePopulatedWithSeals'];
        if (isset($o['preAuthed'])) $this->preAuthed = $o['preAuthed'];
        if (isset($o['operatorName'])) $this->operatorName = $o['operatorName'];
        if (isset($o['systemUserId'])) $this->systemUserId = $o['systemUserId'];
        if (isset($o['productExceptions'])) $this->productExceptions = JsonConverters::fromArray('ProductExceptionData', $o['productExceptions']);
        if (isset($o['storeConfirmationDocumentUrl'])) $this->storeConfirmationDocumentUrl = $o['storeConfirmationDocumentUrl'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->principle)) $o['principle'] = JsonConverters::to('PrincipalData', $this->principle);
        if (isset($this->scheduledDate)) $o['scheduledDate'] = $this->scheduledDate;
        if (isset($this->upliftScheduleId)) $o['upliftScheduleId'] = $this->upliftScheduleId;
        if (isset($this->upliftSchedulePrincipleId)) $o['upliftSchedulePrincipleId'] = $this->upliftSchedulePrincipleId;
        if (isset($this->principleOutletId)) $o['principleOutletId'] = $this->principleOutletId;
        if (isset($this->verificationCode)) $o['verificationCode'] = $this->verificationCode;
        if (isset($this->goodsToCollect)) $o['goodsToCollect'] = $this->goodsToCollect;
        if (isset($this->outletRegion)) $o['outletRegion'] = $this->outletRegion;
        if (isset($this->outletName)) $o['outletName'] = $this->outletName;
        if (isset($this->outletChannel)) $o['outletChannel'] = $this->outletChannel;
        if (isset($this->outletLatitude)) $o['outletLatitude'] = $this->outletLatitude;
        if (isset($this->outletLongitude)) $o['outletLongitude'] = $this->outletLongitude;
        if (isset($this->maxSubmissionDistance)) $o['maxSubmissionDistance'] = $this->maxSubmissionDistance;
        if (isset($this->actionOutsideMaxDistance)) $o['actionOutsideMaxDistance'] = JsonConverters::to('ActionOutsideMaxDistanceType', $this->actionOutsideMaxDistance);
        if (isset($this->completedDate)) $o['completedDate'] = $this->completedDate;
        if (isset($this->cancelled)) $o['cancelled'] = $this->cancelled;
        if (isset($this->completed)) $o['completed'] = $this->completed;
        if (isset($this->upliftTemplate)) $o['upliftTemplate'] = JsonConverters::to('UpliftTemplateData', $this->upliftTemplate);
        if (isset($this->prePopulated)) $o['prePopulated'] = $this->prePopulated;
        if (isset($this->allowedProductStockStatuses)) $o['allowedProductStockStatuses'] = JsonConverters::toArray('StockStatusData', $this->allowedProductStockStatuses);
        if (isset($this->noteToOperator)) $o['noteToOperator'] = $this->noteToOperator;
        if (isset($this->sealTemplate)) $o['sealTemplate'] = JsonConverters::to('SealTemplateData', $this->sealTemplate);
        if (isset($this->prePopulatedWithSeals)) $o['prePopulatedWithSeals'] = $this->prePopulatedWithSeals;
        if (isset($this->preAuthed)) $o['preAuthed'] = $this->preAuthed;
        if (isset($this->operatorName)) $o['operatorName'] = $this->operatorName;
        if (isset($this->systemUserId)) $o['systemUserId'] = $this->systemUserId;
        if (isset($this->productExceptions)) $o['productExceptions'] = JsonConverters::toArray('ProductExceptionData', $this->productExceptions);
        if (isset($this->storeConfirmationDocumentUrl)) $o['storeConfirmationDocumentUrl'] = $this->storeConfirmationDocumentUrl;
        return empty($o) ? new class(){} : $o;
    }
}

class AppointmentData implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $scheduleId=0,
        /** @var string|null */
        public ?string $appointmentDate=null,
        /** @var string|null */
        public ?string $outletName=null,
        /** @var string|null */
        public ?string $outletChannel=null,
        /** @var UpliftScheduleStatus|null */
        public ?UpliftScheduleStatus $upliftStatus=null,
        /** @var bool|null */
        public ?bool $isComplete=null,
        /** @var bool|null */
        public ?bool $inProgress=null,
        /** @var bool|null */
        public ?bool $isLate=null,
        /** @var bool|null */
        public ?bool $goodToCollectStatus=null,
        /** @var string|null */
        public ?string $principlesWithGoodsToCollect=null,
        /** @var array<AppointmentPrincipleData>|null */
        public ?array $principleAppointments=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['scheduleId'])) $this->scheduleId = $o['scheduleId'];
        if (isset($o['appointmentDate'])) $this->appointmentDate = $o['appointmentDate'];
        if (isset($o['outletName'])) $this->outletName = $o['outletName'];
        if (isset($o['outletChannel'])) $this->outletChannel = $o['outletChannel'];
        if (isset($o['upliftStatus'])) $this->upliftStatus = JsonConverters::from('UpliftScheduleStatus', $o['upliftStatus']);
        if (isset($o['isComplete'])) $this->isComplete = $o['isComplete'];
        if (isset($o['inProgress'])) $this->inProgress = $o['inProgress'];
        if (isset($o['isLate'])) $this->isLate = $o['isLate'];
        if (isset($o['goodToCollectStatus'])) $this->goodToCollectStatus = $o['goodToCollectStatus'];
        if (isset($o['principlesWithGoodsToCollect'])) $this->principlesWithGoodsToCollect = $o['principlesWithGoodsToCollect'];
        if (isset($o['principleAppointments'])) $this->principleAppointments = JsonConverters::fromArray('AppointmentPrincipleData', $o['principleAppointments']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->scheduleId)) $o['scheduleId'] = $this->scheduleId;
        if (isset($this->appointmentDate)) $o['appointmentDate'] = $this->appointmentDate;
        if (isset($this->outletName)) $o['outletName'] = $this->outletName;
        if (isset($this->outletChannel)) $o['outletChannel'] = $this->outletChannel;
        if (isset($this->upliftStatus)) $o['upliftStatus'] = JsonConverters::to('UpliftScheduleStatus', $this->upliftStatus);
        if (isset($this->isComplete)) $o['isComplete'] = $this->isComplete;
        if (isset($this->inProgress)) $o['inProgress'] = $this->inProgress;
        if (isset($this->isLate)) $o['isLate'] = $this->isLate;
        if (isset($this->goodToCollectStatus)) $o['goodToCollectStatus'] = $this->goodToCollectStatus;
        if (isset($this->principlesWithGoodsToCollect)) $o['principlesWithGoodsToCollect'] = $this->principlesWithGoodsToCollect;
        if (isset($this->principleAppointments)) $o['principleAppointments'] = JsonConverters::toArray('AppointmentPrincipleData', $this->principleAppointments);
        return empty($o) ? new class(){} : $o;
    }
}

class GetUpliftScheduleResponse 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<AppointmentData>|null */
        public ?array $appointments=null
    ) {
        parent::__construct($description,$heading,$wasSuccessful,$responseStatus);
    }

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

class GetUpliftSchedule 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 GetUpliftSchedule 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 /upliftscedule HTTP/1.1 
Host: antel.api.dev.86degrees.com 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"appointments":[{"scheduleId":0,"appointmentDate":"String","outletName":"String","outletChannel":"String","upliftStatus":0,"isComplete":false,"inProgress":false,"isLate":false,"goodToCollectStatus":false,"principlesWithGoodsToCollect":"","principleAppointments":[{"principle":{"principalId":0,"name":"String","authLetterFileUrl":["String"],"logoImageUrl":"String","products":[{"unitBarcode":"String","products":[{"productId":0,"principalId":0,"name":"String","category":"String","productCode":"String","unitBarcode":"String","cartonQuantity":0,"shrinkQuantity":0,"unitQuantity":0,"cartonMeasurement":"String","shrinkMeasurement":"String","unitMeasurement":"String","cartonWeight":0,"shrinkWeight":0,"unitWeight":0,"cartonPrice":0,"shrinkPrice":0,"unitPrice":0,"maxQuantity":0,"maxPrice":0}]}],"upliftPrefix":"String","contactName":"String","contactNumber":"String","contactEmail":"String","allowProductLookup":false,"hasLogo":false,"hasAuthLetter":false,"sealNetWeightMandatory":false,"allowBillableSeals":false,"captureSerialNumber":false,"batchCodesMandatory":false,"captureManufactureAndExpiryDate":false,"productExceptions":[{"region":"String","channel":"String","productId":0,"stockStatusIds":[0]}],"usesOwnSealNumbers":false},"scheduledDate":"String","upliftScheduleId":0,"upliftSchedulePrincipleId":0,"principleOutletId":0,"verificationCode":"String","goodsToCollect":false,"outletRegion":"String","outletName":"String","outletChannel":"String","outletLatitude":0,"outletLongitude":0,"maxSubmissionDistance":0,"actionOutsideMaxDistance":0,"completedDate":"String","cancelled":false,"completed":false,"upliftTemplate":{"totalValue":0,"products":[{"name":"String","productCode":"String","barcode":"String","statusQty":{"0":0},"returnValue":0}],"seals":[{"number":"String","weight":0}]},"prePopulated":false,"allowedProductStockStatuses":[{"id":0,"name":"String","photoRequired":false,"color":"String"}],"noteToOperator":"String","sealTemplate":{"items":[{"sealNumber":"String","productStockStatus":0,"products":[{"productId":0,"name":"String","productStockStatusId":0,"quantity":0,"serialNumber":"String"}]}]},"prePopulatedWithSeals":false,"preAuthed":false,"operatorName":"String","systemUserId":0,"productExceptions":[{"region":"String","channel":"String","productId":0,"stockStatusIds":[0]}],"storeConfirmationDocumentUrl":"String"}]}],"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"}}}