Go-to-Light Service 4.0.0.2397 - 121 - API License to Cloud Demo

<back to all web services

ValidateDispatchReturnsItem

Requires Authentication
The following routes are available for this service:
All Verbs/ValidateDispatchReturnsItem
<?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 StockAdditional implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $StockID=0,
        /** @var string */
        public string $Gtin='',
        /** @var string */
        public string $StockLocation='',
        /** @var float */
        public float $PhysicalQuantityStockLocation=0.0
    ) {
    }

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

class Stock implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $StockID=0,
        /** @var string */
        public string $ProductID='',
        /** @var string */
        public string $ProductAttributeID='',
        /** @var string */
        public string $Reference='',
        /** @var string */
        public string $Gtin='',
        /** @var string */
        public string $GtinAttribute='',
        /** @var string */
        public string $Label='',
        /** @var string */
        public string $StockLocation='',
        /** @var float */
        public float $PhysicalQuantityStockLocation=0.0,
        /** @var string */
        public string $ReserveStockLocation='',
        /** @var float */
        public float $PhysicalQuantityReserveStockLocation=0.0,
        /** @var int|null */
        public ?int $NbSKUInPackage=null,
        /** @var string */
        public string $PackageReference='',
        /** @var int|null */
        public ?int $NbSKUInPackage2=null,
        /** @var string */
        public string $PackageReference2='',
        /** @var string */
        public string $Weight='',
        /** @var bool|null */
        public ?bool $FillInBatchNumber=null,
        /** @var bool|null */
        public ?bool $FillInDate=null,
        /** @var string */
        public string $PictureURL='',
        /** @var array<StockAdditional>|null */
        public ?array $StockAdditionals=null,
        /** @var string */
        public string $SearchKey=''
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['StockID'])) $this->StockID = $o['StockID'];
        if (isset($o['ProductID'])) $this->ProductID = $o['ProductID'];
        if (isset($o['ProductAttributeID'])) $this->ProductAttributeID = $o['ProductAttributeID'];
        if (isset($o['Reference'])) $this->Reference = $o['Reference'];
        if (isset($o['Gtin'])) $this->Gtin = $o['Gtin'];
        if (isset($o['GtinAttribute'])) $this->GtinAttribute = $o['GtinAttribute'];
        if (isset($o['Label'])) $this->Label = $o['Label'];
        if (isset($o['StockLocation'])) $this->StockLocation = $o['StockLocation'];
        if (isset($o['PhysicalQuantityStockLocation'])) $this->PhysicalQuantityStockLocation = $o['PhysicalQuantityStockLocation'];
        if (isset($o['ReserveStockLocation'])) $this->ReserveStockLocation = $o['ReserveStockLocation'];
        if (isset($o['PhysicalQuantityReserveStockLocation'])) $this->PhysicalQuantityReserveStockLocation = $o['PhysicalQuantityReserveStockLocation'];
        if (isset($o['NbSKUInPackage'])) $this->NbSKUInPackage = $o['NbSKUInPackage'];
        if (isset($o['PackageReference'])) $this->PackageReference = $o['PackageReference'];
        if (isset($o['NbSKUInPackage2'])) $this->NbSKUInPackage2 = $o['NbSKUInPackage2'];
        if (isset($o['PackageReference2'])) $this->PackageReference2 = $o['PackageReference2'];
        if (isset($o['Weight'])) $this->Weight = $o['Weight'];
        if (isset($o['FillInBatchNumber'])) $this->FillInBatchNumber = $o['FillInBatchNumber'];
        if (isset($o['FillInDate'])) $this->FillInDate = $o['FillInDate'];
        if (isset($o['PictureURL'])) $this->PictureURL = $o['PictureURL'];
        if (isset($o['StockAdditionals'])) $this->StockAdditionals = JsonConverters::fromArray('StockAdditional', $o['StockAdditionals']);
        if (isset($o['SearchKey'])) $this->SearchKey = $o['SearchKey'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->StockID)) $o['StockID'] = $this->StockID;
        if (isset($this->ProductID)) $o['ProductID'] = $this->ProductID;
        if (isset($this->ProductAttributeID)) $o['ProductAttributeID'] = $this->ProductAttributeID;
        if (isset($this->Reference)) $o['Reference'] = $this->Reference;
        if (isset($this->Gtin)) $o['Gtin'] = $this->Gtin;
        if (isset($this->GtinAttribute)) $o['GtinAttribute'] = $this->GtinAttribute;
        if (isset($this->Label)) $o['Label'] = $this->Label;
        if (isset($this->StockLocation)) $o['StockLocation'] = $this->StockLocation;
        if (isset($this->PhysicalQuantityStockLocation)) $o['PhysicalQuantityStockLocation'] = $this->PhysicalQuantityStockLocation;
        if (isset($this->ReserveStockLocation)) $o['ReserveStockLocation'] = $this->ReserveStockLocation;
        if (isset($this->PhysicalQuantityReserveStockLocation)) $o['PhysicalQuantityReserveStockLocation'] = $this->PhysicalQuantityReserveStockLocation;
        if (isset($this->NbSKUInPackage)) $o['NbSKUInPackage'] = $this->NbSKUInPackage;
        if (isset($this->PackageReference)) $o['PackageReference'] = $this->PackageReference;
        if (isset($this->NbSKUInPackage2)) $o['NbSKUInPackage2'] = $this->NbSKUInPackage2;
        if (isset($this->PackageReference2)) $o['PackageReference2'] = $this->PackageReference2;
        if (isset($this->Weight)) $o['Weight'] = $this->Weight;
        if (isset($this->FillInBatchNumber)) $o['FillInBatchNumber'] = $this->FillInBatchNumber;
        if (isset($this->FillInDate)) $o['FillInDate'] = $this->FillInDate;
        if (isset($this->PictureURL)) $o['PictureURL'] = $this->PictureURL;
        if (isset($this->StockAdditionals)) $o['StockAdditionals'] = JsonConverters::toArray('StockAdditional', $this->StockAdditionals);
        if (isset($this->SearchKey)) $o['SearchKey'] = $this->SearchKey;
        return empty($o) ? new class(){} : $o;
    }
}

enum ReturnRackPositionStatus : string
{
    case EMPTY = 'EMPTY';
    case USED = 'USED';
    case FULL = 'FULL';
}

class ReturnsDispatchingRackPosition implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $ID=0,
        /** @var int */
        public int $ReturnsDispersionRackID=0,
        /** @var string */
        public string $Name='',
        /** @var string */
        public string $EAN='',
        /** @var string */
        public string $BatchNumber='',
        /** @var DateTime|null */
        public ?DateTime $ItemDate=null,
        /** @var int */
        public int $Quantity=0,
        /** @var ReturnRackPositionStatus|null */
        public ?ReturnRackPositionStatus $Status=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ID'])) $this->ID = $o['ID'];
        if (isset($o['ReturnsDispersionRackID'])) $this->ReturnsDispersionRackID = $o['ReturnsDispersionRackID'];
        if (isset($o['Name'])) $this->Name = $o['Name'];
        if (isset($o['EAN'])) $this->EAN = $o['EAN'];
        if (isset($o['BatchNumber'])) $this->BatchNumber = $o['BatchNumber'];
        if (isset($o['ItemDate'])) $this->ItemDate = JsonConverters::from('DateTime', $o['ItemDate']);
        if (isset($o['Quantity'])) $this->Quantity = $o['Quantity'];
        if (isset($o['Status'])) $this->Status = JsonConverters::from('ReturnRackPositionStatus', $o['Status']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ID)) $o['ID'] = $this->ID;
        if (isset($this->ReturnsDispersionRackID)) $o['ReturnsDispersionRackID'] = $this->ReturnsDispersionRackID;
        if (isset($this->Name)) $o['Name'] = $this->Name;
        if (isset($this->EAN)) $o['EAN'] = $this->EAN;
        if (isset($this->BatchNumber)) $o['BatchNumber'] = $this->BatchNumber;
        if (isset($this->ItemDate)) $o['ItemDate'] = JsonConverters::to('DateTime', $this->ItemDate);
        if (isset($this->Quantity)) $o['Quantity'] = $this->Quantity;
        if (isset($this->Status)) $o['Status'] = JsonConverters::to('ReturnRackPositionStatus', $this->Status);
        return empty($o) ? new class(){} : $o;
    }
}

class ReturnsResultInfo implements JsonSerializable
{
    public function __construct(
        /** @var string */
        public string $Result='',
        /** @var string */
        public string $Error='',
        /** @var Stock|null */
        public ?Stock $Stock=null,
        /** @var ReturnsDispatchingRackPosition|null */
        public ?ReturnsDispatchingRackPosition $RackPosition=null,
        /** @var int */
        public int $RackID=0,
        /** @var string */
        public string $EAN='',
        /** @var string */
        public string $BatchNumber='',
        /** @var DateTime|null */
        public ?DateTime $ItemDate=null,
        /** @var array<string>|null */
        public ?array $SpecificCaseToBeTreated=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Result'])) $this->Result = $o['Result'];
        if (isset($o['Error'])) $this->Error = $o['Error'];
        if (isset($o['Stock'])) $this->Stock = JsonConverters::from('Stock', $o['Stock']);
        if (isset($o['RackPosition'])) $this->RackPosition = JsonConverters::from('ReturnsDispatchingRackPosition', $o['RackPosition']);
        if (isset($o['RackID'])) $this->RackID = $o['RackID'];
        if (isset($o['EAN'])) $this->EAN = $o['EAN'];
        if (isset($o['BatchNumber'])) $this->BatchNumber = $o['BatchNumber'];
        if (isset($o['ItemDate'])) $this->ItemDate = JsonConverters::from('DateTime', $o['ItemDate']);
        if (isset($o['SpecificCaseToBeTreated'])) $this->SpecificCaseToBeTreated = JsonConverters::fromArray('string', $o['SpecificCaseToBeTreated']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Result)) $o['Result'] = $this->Result;
        if (isset($this->Error)) $o['Error'] = $this->Error;
        if (isset($this->Stock)) $o['Stock'] = JsonConverters::to('Stock', $this->Stock);
        if (isset($this->RackPosition)) $o['RackPosition'] = JsonConverters::to('ReturnsDispatchingRackPosition', $this->RackPosition);
        if (isset($this->RackID)) $o['RackID'] = $this->RackID;
        if (isset($this->EAN)) $o['EAN'] = $this->EAN;
        if (isset($this->BatchNumber)) $o['BatchNumber'] = $this->BatchNumber;
        if (isset($this->ItemDate)) $o['ItemDate'] = JsonConverters::to('DateTime', $this->ItemDate);
        if (isset($this->SpecificCaseToBeTreated)) $o['SpecificCaseToBeTreated'] = JsonConverters::toArray('string', $this->SpecificCaseToBeTreated);
        return empty($o) ? new class(){} : $o;
    }
}

class ValidateDispatchReturnsItem implements JsonSerializable
{
    public function __construct(
        /** @description Returns rack result  */
        // @ApiMember(Description="Returns rack result ", IsRequired=true)
        /** @var ReturnsResultInfo|null */
        public ?ReturnsResultInfo $ReturnsResult=null,

        /** @description rack id */
        // @ApiMember(Description="rack id", IsRequired=true)
        /** @var int */
        public int $RackID=0
    ) {
    }

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

PHP ValidateDispatchReturnsItem DTOs

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

HTTP + XML

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

POST /ValidateDispatchReturnsItem HTTP/1.1 
Host: clouddemo.pickeos.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<ValidateDispatchReturnsItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/GoToLightAPI">
  <RackID>0</RackID>
  <ReturnsResult xmlns:d2p1="http://schemas.datacontract.org/2004/07/GoToLightAPI.Entities">
    <d2p1:BatchNumber>String</d2p1:BatchNumber>
    <d2p1:EAN>String</d2p1:EAN>
    <d2p1:Error>String</d2p1:Error>
    <d2p1:ItemDate>0001-01-01T00:00:00</d2p1:ItemDate>
    <d2p1:RackID>0</d2p1:RackID>
    <d2p1:RackPosition>
      <d2p1:BatchNumber>String</d2p1:BatchNumber>
      <d2p1:EAN>String</d2p1:EAN>
      <d2p1:ID>0</d2p1:ID>
      <d2p1:ItemDate>0001-01-01T00:00:00</d2p1:ItemDate>
      <d2p1:Name>String</d2p1:Name>
      <d2p1:Quantity>0</d2p1:Quantity>
      <d2p1:ReturnsDispersionRackID>0</d2p1:ReturnsDispersionRackID>
      <d2p1:Status>EMPTY</d2p1:Status>
    </d2p1:RackPosition>
    <d2p1:Result>String</d2p1:Result>
    <d2p1:SpecificCaseToBeTreated xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:string>String</d3p1:string>
    </d2p1:SpecificCaseToBeTreated>
    <d2p1:Stock>
      <FillInBatchNumber>false</FillInBatchNumber>
      <FillInDate>false</FillInDate>
      <Gtin>String</Gtin>
      <GtinAttribute>String</GtinAttribute>
      <Label>String</Label>
      <NbSKUInPackage>0</NbSKUInPackage>
      <NbSKUInPackage2>0</NbSKUInPackage2>
      <PackageReference>String</PackageReference>
      <PackageReference2>String</PackageReference2>
      <PhysicalQuantityReserveStockLocation>0</PhysicalQuantityReserveStockLocation>
      <PhysicalQuantityStockLocation>0</PhysicalQuantityStockLocation>
      <PictureURL>String</PictureURL>
      <ProductAttributeID>String</ProductAttributeID>
      <ProductID>String</ProductID>
      <Reference>String</Reference>
      <ReserveStockLocation>String</ReserveStockLocation>
      <StockAdditionals>
        <StockAdditional>
          <Gtin>String</Gtin>
          <PhysicalQuantityStockLocation>0</PhysicalQuantityStockLocation>
          <StockID>0</StockID>
          <StockLocation>String</StockLocation>
        </StockAdditional>
      </StockAdditionals>
      <StockID>0</StockID>
      <StockLocation>String</StockLocation>
      <Weight>String</Weight>
    </d2p1:Stock>
  </ReturnsResult>
</ValidateDispatchReturnsItem>