Antel API

<back to all web services

SaveIncompleteUplift

Requires Authentication
The following routes are available for this service:
POST/sync/saveincompleteuplift
<?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 SaveIncompleteUpliftResponse 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<string>|null */
        public ?array $imageIds=null
    ) {
        parent::__construct($description,$heading,$wasSuccessful,$responseStatus);
    }

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

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 UpliftProductData implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $upliftProductId=0,
        /** @var int */
        public int $upliftId=0,
        /** @var int */
        public int $productId=0,
        /** @var float */
        public float $unitPrice=0.0,
        /** @var string|null */
        public ?string $name=null,
        /** @var string|null */
        public ?string $category=null,
        /** @var string|null */
        public ?string $unitBarcode=null,
        /** @var string|null */
        public ?string $unitSize=null,
        /** @var float */
        public float $unitWeight=0.0,
        /** @var string|null */
        public ?string $code=null,
        /** @var array<Object>|null */
        public ?array $upliftImages=null,
        /** @var float */
        public float $quantity=0.0,
        /** @var float */
        public float $value=0.0,
        /** @var bool|null */
        public ?bool $priceOverMax=null,
        /** @var bool|null */
        public ?bool $quantityOverMax=null,
        /** @var bool|null */
        public ?bool $quantityOverRequirement=null,
        /** @var string|null */
        public ?string $serialNumber=null,
        /** @var string|null */
        public ?string $batchCode=null,
        /** @var int */
        public int $stockStatusId=0,
        /** @var string|null */
        public ?string $lotNumber=null,
        /** @var string|null */
        public ?string $expiryDate=null,
        /** @var string|null */
        public ?string $manufactureDate=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['upliftProductId'])) $this->upliftProductId = $o['upliftProductId'];
        if (isset($o['upliftId'])) $this->upliftId = $o['upliftId'];
        if (isset($o['productId'])) $this->productId = $o['productId'];
        if (isset($o['unitPrice'])) $this->unitPrice = $o['unitPrice'];
        if (isset($o['name'])) $this->name = $o['name'];
        if (isset($o['category'])) $this->category = $o['category'];
        if (isset($o['unitBarcode'])) $this->unitBarcode = $o['unitBarcode'];
        if (isset($o['unitSize'])) $this->unitSize = $o['unitSize'];
        if (isset($o['unitWeight'])) $this->unitWeight = $o['unitWeight'];
        if (isset($o['code'])) $this->code = $o['code'];
        if (isset($o['upliftImages'])) $this->upliftImages = JsonConverters::fromArray('Object', $o['upliftImages']);
        if (isset($o['quantity'])) $this->quantity = $o['quantity'];
        if (isset($o['value'])) $this->value = $o['value'];
        if (isset($o['priceOverMax'])) $this->priceOverMax = $o['priceOverMax'];
        if (isset($o['quantityOverMax'])) $this->quantityOverMax = $o['quantityOverMax'];
        if (isset($o['quantityOverRequirement'])) $this->quantityOverRequirement = $o['quantityOverRequirement'];
        if (isset($o['serialNumber'])) $this->serialNumber = $o['serialNumber'];
        if (isset($o['batchCode'])) $this->batchCode = $o['batchCode'];
        if (isset($o['stockStatusId'])) $this->stockStatusId = $o['stockStatusId'];
        if (isset($o['lotNumber'])) $this->lotNumber = $o['lotNumber'];
        if (isset($o['expiryDate'])) $this->expiryDate = $o['expiryDate'];
        if (isset($o['manufactureDate'])) $this->manufactureDate = $o['manufactureDate'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->upliftProductId)) $o['upliftProductId'] = $this->upliftProductId;
        if (isset($this->upliftId)) $o['upliftId'] = $this->upliftId;
        if (isset($this->productId)) $o['productId'] = $this->productId;
        if (isset($this->unitPrice)) $o['unitPrice'] = $this->unitPrice;
        if (isset($this->name)) $o['name'] = $this->name;
        if (isset($this->category)) $o['category'] = $this->category;
        if (isset($this->unitBarcode)) $o['unitBarcode'] = $this->unitBarcode;
        if (isset($this->unitSize)) $o['unitSize'] = $this->unitSize;
        if (isset($this->unitWeight)) $o['unitWeight'] = $this->unitWeight;
        if (isset($this->code)) $o['code'] = $this->code;
        if (isset($this->upliftImages)) $o['upliftImages'] = JsonConverters::toArray('Object', $this->upliftImages);
        if (isset($this->quantity)) $o['quantity'] = $this->quantity;
        if (isset($this->value)) $o['value'] = $this->value;
        if (isset($this->priceOverMax)) $o['priceOverMax'] = $this->priceOverMax;
        if (isset($this->quantityOverMax)) $o['quantityOverMax'] = $this->quantityOverMax;
        if (isset($this->quantityOverRequirement)) $o['quantityOverRequirement'] = $this->quantityOverRequirement;
        if (isset($this->serialNumber)) $o['serialNumber'] = $this->serialNumber;
        if (isset($this->batchCode)) $o['batchCode'] = $this->batchCode;
        if (isset($this->stockStatusId)) $o['stockStatusId'] = $this->stockStatusId;
        if (isset($this->lotNumber)) $o['lotNumber'] = $this->lotNumber;
        if (isset($this->expiryDate)) $o['expiryDate'] = $this->expiryDate;
        if (isset($this->manufactureDate)) $o['manufactureDate'] = $this->manufactureDate;
        return empty($o) ? new class(){} : $o;
    }
}

class UpliftSealData implements JsonSerializable
{
    public function __construct(
        /** @var bool|null */
        public ?bool $unbagged=null,
        /** @var string|null */
        public ?string $sealNumber=null,
        /** @var string|null */
        public ?string $antelSealNumber=null,
        /** @var array<UpliftProductData>|null */
        public ?array $products=null,
        /** @var float */
        public float $totalPrice=0.0,
        /** @var float */
        public float $totalQuantity=0.0,
        /** @var float */
        public float $netWeight=0.0,
        /** @var float */
        public float $grossWeight=0.0,
        /** @var bool|null */
        public ?bool $billableSeal=null,
        /** @var bool|null */
        public ?bool $invalidAntelSealNumber=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['unbagged'])) $this->unbagged = $o['unbagged'];
        if (isset($o['sealNumber'])) $this->sealNumber = $o['sealNumber'];
        if (isset($o['antelSealNumber'])) $this->antelSealNumber = $o['antelSealNumber'];
        if (isset($o['products'])) $this->products = JsonConverters::fromArray('UpliftProductData', $o['products']);
        if (isset($o['totalPrice'])) $this->totalPrice = $o['totalPrice'];
        if (isset($o['totalQuantity'])) $this->totalQuantity = $o['totalQuantity'];
        if (isset($o['netWeight'])) $this->netWeight = $o['netWeight'];
        if (isset($o['grossWeight'])) $this->grossWeight = $o['grossWeight'];
        if (isset($o['billableSeal'])) $this->billableSeal = $o['billableSeal'];
        if (isset($o['invalidAntelSealNumber'])) $this->invalidAntelSealNumber = $o['invalidAntelSealNumber'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->unbagged)) $o['unbagged'] = $this->unbagged;
        if (isset($this->sealNumber)) $o['sealNumber'] = $this->sealNumber;
        if (isset($this->antelSealNumber)) $o['antelSealNumber'] = $this->antelSealNumber;
        if (isset($this->products)) $o['products'] = JsonConverters::toArray('UpliftProductData', $this->products);
        if (isset($this->totalPrice)) $o['totalPrice'] = $this->totalPrice;
        if (isset($this->totalQuantity)) $o['totalQuantity'] = $this->totalQuantity;
        if (isset($this->netWeight)) $o['netWeight'] = $this->netWeight;
        if (isset($this->grossWeight)) $o['grossWeight'] = $this->grossWeight;
        if (isset($this->billableSeal)) $o['billableSeal'] = $this->billableSeal;
        if (isset($this->invalidAntelSealNumber)) $o['invalidAntelSealNumber'] = $this->invalidAntelSealNumber;
        return empty($o) ? new class(){} : $o;
    }
}

class UpliftClaimData implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $upliftClaimId=0,
        /** @var int */
        public int $claimUnits=0,
        /** @var string|null */
        public ?string $claimNumber=null,
        /** @var float */
        public float $claimValue=0.0,
        /** @var array<Object>|null */
        public ?array $claimDocumentImages=null,
        /** @var string|null */
        public ?string $returnOrderNumber=null,
        /** @var int */
        public int $lineCount=0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['upliftClaimId'])) $this->upliftClaimId = $o['upliftClaimId'];
        if (isset($o['claimUnits'])) $this->claimUnits = $o['claimUnits'];
        if (isset($o['claimNumber'])) $this->claimNumber = $o['claimNumber'];
        if (isset($o['claimValue'])) $this->claimValue = $o['claimValue'];
        if (isset($o['claimDocumentImages'])) $this->claimDocumentImages = JsonConverters::fromArray('Object', $o['claimDocumentImages']);
        if (isset($o['returnOrderNumber'])) $this->returnOrderNumber = $o['returnOrderNumber'];
        if (isset($o['lineCount'])) $this->lineCount = $o['lineCount'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->upliftClaimId)) $o['upliftClaimId'] = $this->upliftClaimId;
        if (isset($this->claimUnits)) $o['claimUnits'] = $this->claimUnits;
        if (isset($this->claimNumber)) $o['claimNumber'] = $this->claimNumber;
        if (isset($this->claimValue)) $o['claimValue'] = $this->claimValue;
        if (isset($this->claimDocumentImages)) $o['claimDocumentImages'] = JsonConverters::toArray('Object', $this->claimDocumentImages);
        if (isset($this->returnOrderNumber)) $o['returnOrderNumber'] = $this->returnOrderNumber;
        if (isset($this->lineCount)) $o['lineCount'] = $this->lineCount;
        return empty($o) ? new class(){} : $o;
    }
}

class UpliftData implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $upliftId=0,
        /** @var int */
        public int $principleOutletId=0,
        /** @var int */
        public int $upliftScheduleId=0,
        /** @var int */
        public int $upliftSchedulePrincipleId=0,
        /** @var string */
        public string $authRequestId='',
        /** @var bool|null */
        public ?bool $delayedAuth=null,
        /** @var AppointmentPrincipleData|null */
        public ?AppointmentPrincipleData $appointmentPrincipleData=null,
        /** @var string|null */
        public ?string $authCode=null,
        /** @var string|null */
        public ?string $startTime=null,
        /** @var string|null */
        public ?string $endTime=null,
        /** @var string|null */
        public ?string $sequentialNumber=null,
        /** @var float */
        public float $startLatitude=0.0,
        /** @var float */
        public float $startLongitude=0.0,
        /** @var float */
        public float $endLatitude=0.0,
        /** @var float */
        public float $endLongitude=0.0,
        /** @var float */
        public float $totalValue=0.0,
        /** @var float */
        public float $totalUnits=0.0,
        /** @var string|null */
        public ?string $comments=null,
        /** @var string|null */
        public ?string $adhocEmailAddress=null,
        /** @var float */
        public float $vatValue=0.0,
        /** @var array<string,Object[]>|null */
        public ?array $statusImages=null,
        /** @var array<Object>|null */
        public ?array $damagedOkImages=null,
        /** @var array<Object>|null */
        public ?array $damagedBadImages=null,
        /** @var array<Object>|null */
        public ?array $expiredImages=null,
        /** @var array<Object>|null */
        public ?array $recallImages=null,
        /** @var array<Object>|null */
        public ?array $goodStockImages=null,
        /** @var array<Object>|null */
        public ?array $derangedImages=null,
        /** @var array<Object>|null */
        public ?array $overstockedImages=null,
        /** @var array<Object>|null */
        public ?array $factoryFaultImages=null,
        /** @var string|null */
        public ?string $outletContactName=null,
        /** @var string|null */
        public ?string $outletContactNumber=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 Object|null */
        public ?Object $outletSignatureImage=null,
        /** @var Object|null */
        public ?Object $operatorSignatureImage=null,
        /** @var Object|null */
        public ?Object $operatorRegNumberImage=null,
        /** @var array<UpliftSealData>|null */
        public ?array $seals=null,
        /** @var bool|null */
        public ?bool $invalidAntelSeal=null,
        /** @var UpliftSealData|null */
        public ?UpliftSealData $unbaggedItems=null,
        /** @var bool|null */
        public ?bool $authorised=null,
        /** @var array<UpliftClaimData>|null */
        public ?array $claims=null,
        /** @var DateTime */
        public DateTime $lastUpdated=new DateTime(),
        /** @var DateTime */
        public DateTime $lastSynced=new DateTime(),
        /** @var string */
        public string $checkedOutDeviceId='',
        /** @var string|null */
        public ?string $checkedOutOperatorName=null,
        /** @var string */
        public string $incompleteUpliftId='',
        /** @var string|null */
        public ?string $pauseReason=null,
        /** @var string|null */
        public ?string $storeConfirmationDocumentUrl=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['upliftId'])) $this->upliftId = $o['upliftId'];
        if (isset($o['principleOutletId'])) $this->principleOutletId = $o['principleOutletId'];
        if (isset($o['upliftScheduleId'])) $this->upliftScheduleId = $o['upliftScheduleId'];
        if (isset($o['upliftSchedulePrincipleId'])) $this->upliftSchedulePrincipleId = $o['upliftSchedulePrincipleId'];
        if (isset($o['authRequestId'])) $this->authRequestId = $o['authRequestId'];
        if (isset($o['delayedAuth'])) $this->delayedAuth = $o['delayedAuth'];
        if (isset($o['appointmentPrincipleData'])) $this->appointmentPrincipleData = JsonConverters::from('AppointmentPrincipleData', $o['appointmentPrincipleData']);
        if (isset($o['authCode'])) $this->authCode = $o['authCode'];
        if (isset($o['startTime'])) $this->startTime = $o['startTime'];
        if (isset($o['endTime'])) $this->endTime = $o['endTime'];
        if (isset($o['sequentialNumber'])) $this->sequentialNumber = $o['sequentialNumber'];
        if (isset($o['startLatitude'])) $this->startLatitude = $o['startLatitude'];
        if (isset($o['startLongitude'])) $this->startLongitude = $o['startLongitude'];
        if (isset($o['endLatitude'])) $this->endLatitude = $o['endLatitude'];
        if (isset($o['endLongitude'])) $this->endLongitude = $o['endLongitude'];
        if (isset($o['totalValue'])) $this->totalValue = $o['totalValue'];
        if (isset($o['totalUnits'])) $this->totalUnits = $o['totalUnits'];
        if (isset($o['comments'])) $this->comments = $o['comments'];
        if (isset($o['adhocEmailAddress'])) $this->adhocEmailAddress = $o['adhocEmailAddress'];
        if (isset($o['vatValue'])) $this->vatValue = $o['vatValue'];
        if (isset($o['statusImages'])) $this->statusImages = JsonConverters::from(JsonConverters::context('Dictionary',genericArgs:['int','List<Object>']), $o['statusImages']);
        if (isset($o['damagedOkImages'])) $this->damagedOkImages = JsonConverters::fromArray('Object', $o['damagedOkImages']);
        if (isset($o['damagedBadImages'])) $this->damagedBadImages = JsonConverters::fromArray('Object', $o['damagedBadImages']);
        if (isset($o['expiredImages'])) $this->expiredImages = JsonConverters::fromArray('Object', $o['expiredImages']);
        if (isset($o['recallImages'])) $this->recallImages = JsonConverters::fromArray('Object', $o['recallImages']);
        if (isset($o['goodStockImages'])) $this->goodStockImages = JsonConverters::fromArray('Object', $o['goodStockImages']);
        if (isset($o['derangedImages'])) $this->derangedImages = JsonConverters::fromArray('Object', $o['derangedImages']);
        if (isset($o['overstockedImages'])) $this->overstockedImages = JsonConverters::fromArray('Object', $o['overstockedImages']);
        if (isset($o['factoryFaultImages'])) $this->factoryFaultImages = JsonConverters::fromArray('Object', $o['factoryFaultImages']);
        if (isset($o['outletContactName'])) $this->outletContactName = $o['outletContactName'];
        if (isset($o['outletContactNumber'])) $this->outletContactNumber = $o['outletContactNumber'];
        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['outletSignatureImage'])) $this->outletSignatureImage = JsonConverters::from('Object', $o['outletSignatureImage']);
        if (isset($o['operatorSignatureImage'])) $this->operatorSignatureImage = JsonConverters::from('Object', $o['operatorSignatureImage']);
        if (isset($o['operatorRegNumberImage'])) $this->operatorRegNumberImage = JsonConverters::from('Object', $o['operatorRegNumberImage']);
        if (isset($o['seals'])) $this->seals = JsonConverters::fromArray('UpliftSealData', $o['seals']);
        if (isset($o['invalidAntelSeal'])) $this->invalidAntelSeal = $o['invalidAntelSeal'];
        if (isset($o['unbaggedItems'])) $this->unbaggedItems = JsonConverters::from('UpliftSealData', $o['unbaggedItems']);
        if (isset($o['authorised'])) $this->authorised = $o['authorised'];
        if (isset($o['claims'])) $this->claims = JsonConverters::fromArray('UpliftClaimData', $o['claims']);
        if (isset($o['lastUpdated'])) $this->lastUpdated = JsonConverters::from('DateTime', $o['lastUpdated']);
        if (isset($o['lastSynced'])) $this->lastSynced = JsonConverters::from('DateTime', $o['lastSynced']);
        if (isset($o['checkedOutDeviceId'])) $this->checkedOutDeviceId = $o['checkedOutDeviceId'];
        if (isset($o['checkedOutOperatorName'])) $this->checkedOutOperatorName = $o['checkedOutOperatorName'];
        if (isset($o['incompleteUpliftId'])) $this->incompleteUpliftId = $o['incompleteUpliftId'];
        if (isset($o['pauseReason'])) $this->pauseReason = $o['pauseReason'];
        if (isset($o['storeConfirmationDocumentUrl'])) $this->storeConfirmationDocumentUrl = $o['storeConfirmationDocumentUrl'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->upliftId)) $o['upliftId'] = $this->upliftId;
        if (isset($this->principleOutletId)) $o['principleOutletId'] = $this->principleOutletId;
        if (isset($this->upliftScheduleId)) $o['upliftScheduleId'] = $this->upliftScheduleId;
        if (isset($this->upliftSchedulePrincipleId)) $o['upliftSchedulePrincipleId'] = $this->upliftSchedulePrincipleId;
        if (isset($this->authRequestId)) $o['authRequestId'] = $this->authRequestId;
        if (isset($this->delayedAuth)) $o['delayedAuth'] = $this->delayedAuth;
        if (isset($this->appointmentPrincipleData)) $o['appointmentPrincipleData'] = JsonConverters::to('AppointmentPrincipleData', $this->appointmentPrincipleData);
        if (isset($this->authCode)) $o['authCode'] = $this->authCode;
        if (isset($this->startTime)) $o['startTime'] = $this->startTime;
        if (isset($this->endTime)) $o['endTime'] = $this->endTime;
        if (isset($this->sequentialNumber)) $o['sequentialNumber'] = $this->sequentialNumber;
        if (isset($this->startLatitude)) $o['startLatitude'] = $this->startLatitude;
        if (isset($this->startLongitude)) $o['startLongitude'] = $this->startLongitude;
        if (isset($this->endLatitude)) $o['endLatitude'] = $this->endLatitude;
        if (isset($this->endLongitude)) $o['endLongitude'] = $this->endLongitude;
        if (isset($this->totalValue)) $o['totalValue'] = $this->totalValue;
        if (isset($this->totalUnits)) $o['totalUnits'] = $this->totalUnits;
        if (isset($this->comments)) $o['comments'] = $this->comments;
        if (isset($this->adhocEmailAddress)) $o['adhocEmailAddress'] = $this->adhocEmailAddress;
        if (isset($this->vatValue)) $o['vatValue'] = $this->vatValue;
        if (isset($this->statusImages)) $o['statusImages'] = JsonConverters::to(JsonConverters::context('Dictionary',genericArgs:['int','List<Object>']), $this->statusImages);
        if (isset($this->damagedOkImages)) $o['damagedOkImages'] = JsonConverters::toArray('Object', $this->damagedOkImages);
        if (isset($this->damagedBadImages)) $o['damagedBadImages'] = JsonConverters::toArray('Object', $this->damagedBadImages);
        if (isset($this->expiredImages)) $o['expiredImages'] = JsonConverters::toArray('Object', $this->expiredImages);
        if (isset($this->recallImages)) $o['recallImages'] = JsonConverters::toArray('Object', $this->recallImages);
        if (isset($this->goodStockImages)) $o['goodStockImages'] = JsonConverters::toArray('Object', $this->goodStockImages);
        if (isset($this->derangedImages)) $o['derangedImages'] = JsonConverters::toArray('Object', $this->derangedImages);
        if (isset($this->overstockedImages)) $o['overstockedImages'] = JsonConverters::toArray('Object', $this->overstockedImages);
        if (isset($this->factoryFaultImages)) $o['factoryFaultImages'] = JsonConverters::toArray('Object', $this->factoryFaultImages);
        if (isset($this->outletContactName)) $o['outletContactName'] = $this->outletContactName;
        if (isset($this->outletContactNumber)) $o['outletContactNumber'] = $this->outletContactNumber;
        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->outletSignatureImage)) $o['outletSignatureImage'] = JsonConverters::to('Object', $this->outletSignatureImage);
        if (isset($this->operatorSignatureImage)) $o['operatorSignatureImage'] = JsonConverters::to('Object', $this->operatorSignatureImage);
        if (isset($this->operatorRegNumberImage)) $o['operatorRegNumberImage'] = JsonConverters::to('Object', $this->operatorRegNumberImage);
        if (isset($this->seals)) $o['seals'] = JsonConverters::toArray('UpliftSealData', $this->seals);
        if (isset($this->invalidAntelSeal)) $o['invalidAntelSeal'] = $this->invalidAntelSeal;
        if (isset($this->unbaggedItems)) $o['unbaggedItems'] = JsonConverters::to('UpliftSealData', $this->unbaggedItems);
        if (isset($this->authorised)) $o['authorised'] = $this->authorised;
        if (isset($this->claims)) $o['claims'] = JsonConverters::toArray('UpliftClaimData', $this->claims);
        if (isset($this->lastUpdated)) $o['lastUpdated'] = JsonConverters::to('DateTime', $this->lastUpdated);
        if (isset($this->lastSynced)) $o['lastSynced'] = JsonConverters::to('DateTime', $this->lastSynced);
        if (isset($this->checkedOutDeviceId)) $o['checkedOutDeviceId'] = $this->checkedOutDeviceId;
        if (isset($this->checkedOutOperatorName)) $o['checkedOutOperatorName'] = $this->checkedOutOperatorName;
        if (isset($this->incompleteUpliftId)) $o['incompleteUpliftId'] = $this->incompleteUpliftId;
        if (isset($this->pauseReason)) $o['pauseReason'] = $this->pauseReason;
        if (isset($this->storeConfirmationDocumentUrl)) $o['storeConfirmationDocumentUrl'] = $this->storeConfirmationDocumentUrl;
        return empty($o) ? new class(){} : $o;
    }
}

class SaveIncompleteUplift 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,
        /** @var string */
        public string $incompleteUpliftId='',
        /** @var array<string>|null */
        public ?array $imageIdsOnDevice=null,
        /** @var UpliftData|null */
        public ?UpliftData $upliftData=null
    ) {
        parent::__construct($apiKey,$latitude,$longitude);
    }

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

PHP SaveIncompleteUplift DTOs

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

HTTP + OTHER

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

POST /sync/saveincompleteuplift HTTP/1.1 
Host: antel.api.dev.86degrees.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"imageIdsOnDevice":["String"],"upliftData":{"upliftId":0,"principleOutletId":0,"upliftScheduleId":0,"upliftSchedulePrincipleId":0,"delayedAuth":false,"appointmentPrincipleData":{"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"},"authCode":"String","startTime":"String","endTime":"String","sequentialNumber":"String","startLatitude":0,"startLongitude":0,"endLatitude":0,"endLongitude":0,"totalValue":0,"totalUnits":0,"comments":"String","adhocEmailAddress":"String","vatValue":0,"statusImages":{"0":[{}]},"damagedOkImages":[{}],"damagedBadImages":[{}],"expiredImages":[{}],"recallImages":[{}],"goodStockImages":[{}],"derangedImages":[{}],"overstockedImages":[{}],"factoryFaultImages":[{}],"outletContactName":"String","outletContactNumber":"String","outletLatitude":0,"outletLongitude":0,"maxSubmissionDistance":0,"actionOutsideMaxDistance":0,"outletSignatureImage":{},"operatorSignatureImage":{},"operatorRegNumberImage":{},"seals":[{"unbagged":false,"sealNumber":"String","antelSealNumber":"String","products":[{"upliftProductId":0,"upliftId":0,"productId":0,"unitPrice":0,"name":"String","category":"String","unitBarcode":"String","unitSize":"String","unitWeight":0,"code":"String","upliftImages":[{}],"quantity":0,"value":0,"priceOverMax":false,"quantityOverMax":false,"quantityOverRequirement":false,"serialNumber":"String","batchCode":"String","stockStatusId":0,"lotNumber":"String","expiryDate":"String","manufactureDate":"String"}],"totalPrice":0,"totalQuantity":0,"netWeight":0,"grossWeight":0,"billableSeal":false,"invalidAntelSealNumber":false}],"invalidAntelSeal":false,"unbaggedItems":{"unbagged":false,"sealNumber":"String","antelSealNumber":"String","products":[{"upliftProductId":0,"upliftId":0,"productId":0,"unitPrice":0,"name":"String","category":"String","unitBarcode":"String","unitSize":"String","unitWeight":0,"code":"String","upliftImages":[{}],"quantity":0,"value":0,"priceOverMax":false,"quantityOverMax":false,"quantityOverRequirement":false,"serialNumber":"String","batchCode":"String","stockStatusId":0,"lotNumber":"String","expiryDate":"String","manufactureDate":"String"}],"totalPrice":0,"totalQuantity":0,"netWeight":0,"grossWeight":0,"billableSeal":false,"invalidAntelSealNumber":false},"authorised":false,"claims":[{"upliftClaimId":0,"claimUnits":0,"claimNumber":"String","claimValue":0,"claimDocumentImages":[{}],"returnOrderNumber":"String","lineCount":0}],"lastUpdated":"0001-01-01T00:00:00.0000000","lastSynced":"0001-01-01T00:00:00.0000000","checkedOutOperatorName":"String","pauseReason":"String","storeConfirmationDocumentUrl":"String"},"apiKey":"String","latitude":0,"longitude":0}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"imageIds":["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"}}}