This script creates new Item Receipt record from existing approved Return Authorization using initialize
operation and PHP Toolkit.
Note: The following sample source code requires PHP Toolkit version 2012.2 or higher.
<?php$initReturn = new InitializeRecord();$initReturn->type = InitializeType::itemReceipt;$initRMA = new InitializeRef();$initRMA->type = InitializeRefType::returnAuthorization;$initRMA->internalId = "123"; // ID of existing approved RMA$initReturn->reference = $initRMA;$initRequest = new InitializeRequest();$initRequest->initializeRecord = $initReturn;$initResponse = $service->initialize($initRequest);$addRequest = new AddRequest();$addRequest->record = $initResponse->readResponse->record;$addResponse = $service->add($addRequest);?>
No comments:
Post a Comment