YellowCube Inventory (BAR)

In order to retrieve a complete status report including the YellowCube warehouse stock call YellowCube\Service::getInventory().

$service = new YellowCube\Service(YellowCube\Config::testConfig());
$articleList = $service->getInventory();

echo "Retrieved " . count($articleList) . " articles from inventory." . PHP_EOL . PHP_EOL;

foreach ($articleList as $article) {
    echo "ArticleNo: "
        .  $article->getArticleNo() . PHP_EOL;
    echo "Quantity: " .  (string) $article->getQuantityUOM() . ' '
        . $article->getQuantityUOM()->getQuantityISO() . PHP_EOL;
    echo "ArticleDescription: "
        .  $article->getArticleDescription() . PHP_EOL;
    echo "Plant: "
        .  $article->getPlant() . PHP_EOL;
    echo "StorageLocation: "
        .  $article->getStorageLocation() . PHP_EOL;
    echo "YCLot: "
        .  $article->getYCLot() . PHP_EOL;
    echo "YCArticleNo: "
        .  $article->getYCArticleNo() . PHP_EOL;

    echo PHP_EOL . PHP_EOL;
}

echo "List of all data: ";
print_r($articleList);

A list of YellowCube\BAR\Article objects is returned.

Fatal error: Uncaught exception 'SoapFault' with message 'Inventory report not available yet.' in /home/travis/build/swisspost-yellowcube/yellowcube-php/src/YellowCube/Util/SoapClient.php on line 145

SoapFault: Inventory report not available yet. in /home/travis/build/swisspost-yellowcube/yellowcube-php/src/YellowCube/Util/SoapClient.php on line 139

Call Stack:
    0.0002     646960   1. {main}() /home/travis/build/swisspost-yellowcube/yellowcube-php/docs/.dexy/work/53/532da82a9bd0f6fc91b71e5328449eac-001-php/inventory/00-get-inventory.php:0
    0.0041    1534152   2. YellowCube\Service->getInventory() /home/travis/build/swisspost-yellowcube/yellowcube-php/docs/.dexy/work/53/532da82a9bd0f6fc91b71e5328449eac-001-php/inventory/00-get-inventory.php:6
    0.0059    2234656   3. YellowCube\Util\SoapClient->GetInventory() /home/travis/build/swisspost-yellowcube/yellowcube-php/src/YellowCube/Service.php:163
    0.0059    2235008   4. YellowCube\Util\SoapClient->__call() /home/travis/build/swisspost-yellowcube/yellowcube-php/src/YellowCube/Service.php:163
    0.0059    2235056   5. SoapClient->__call() /home/travis/build/swisspost-yellowcube/yellowcube-php/src/YellowCube/Util/SoapClient.php:139

YellowCube\Util\YellowCubeException: Inventory report not available yet.

Request XML: 
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://service.swisspost.ch/apache/yellowcube/YellowCube_BAR_REQUEST_ArticleList.xsd"><SOAP-ENV:Body><ns1:BAR_Request><ns1:ControlReference><ns1:Type>BAR</ns1:Type><ns1:Sender>YCTest</ns1:Sender><ns1:Receiver>YELLOWCUBE</ns1:Receiver><ns1:Timestamp>20150414093002</ns1:Timestamp><ns1:OperatingMode>T</ns1:OperatingMode><ns1:Version>1.0</ns1:Version><ns1:CommType>SOAP</ns1:CommType></ns1:ControlReference></ns1:BAR_Request></SOAP-ENV:Body></SOAP-ENV:Envelope>
 in /home/travis/build/swisspost-yellowcube/yellowcube-php/src/YellowCube/Util/SoapClient.php on line 145

Call Stack:
    0.0002     646960   1. {main}() /home/travis/build/swisspost-yellowcube/yellowcube-php/docs/.dexy/work/53/532da82a9bd0f6fc91b71e5328449eac-001-php/inventory/00-get-inventory.php:0
    0.0041    1534152   2. YellowCube\Service->getInventory() /home/travis/build/swisspost-yellowcube/yellowcube-php/docs/.dexy/work/53/532da82a9bd0f6fc91b71e5328449eac-001-php/inventory/00-get-inventory.php:6
    0.0059    2234656   3. YellowCube\Util\SoapClient->GetInventory() /home/travis/build/swisspost-yellowcube/yellowcube-php/src/YellowCube/Service.php:163
    0.0059    2235008   4. YellowCube\Util\SoapClient->__call() /home/travis/build/swisspost-yellowcube/yellowcube-php/src/YellowCube/Service.php:163