YellowCube Deactivate Article

To deactivate an existing article in YellowCube, create a new Article with a ChangeFlag::DEACTIVATE and pass it to YellowCube/Service::insertArticleMasterData().

Hint
Make sure to set the change flag to ChangeFlag::DEACTIVATE.
use YellowCube\ART\Article;
use YellowCube\ART\ChangeFlag;
use YellowCube\ART\UnitsOfMeasure\ISO;

$article = new Article;
$article
    ->setChangeFlag(ChangeFlag::DEACTIVATE)
    ->setPlantID('Y012')
    ->setDepositorNo('0000040750')
    ->setArticleNo('47686-3009-35/38')
    ->setBaseUOM(ISO::PCE)
    ->setNetWeight(0.042, ISO::KGM)
    ->setAlternateUnitISO(ISO::PCE)
    ->addArticleDescription('Ich wars nicht.', 'de');

Pass this article to the insertArticleMasterData method.

$service = new YellowCube\Service(YellowCube\Config::testConfig());
$response = $service->insertArticleMasterData($article);

echo "Successfully deleted article with reference {$response->getReference()}." . PHP_EOL . PHP_EOL;
print_r($response);

Running this code, a GEN_Response is returned.

Successfully deleted article with reference 14287.

YellowCube\GEN_Response Object
(
    [EventTimestamp:protected] => 2015-04-14T09:30:03Z
    [MessageType:protected] => ART
    [StatusCode:protected] => 10
    [StatusType:protected] => S
    [StatusText:protected] => File received
    [Reference:protected] => 14287
    [Reference1:protected] => 
    [Reference2:protected] => 
    [Reference3:protected] => 
    [Reference4:protected] => 
)