2namespace Sale\Handlers\Delivery\Additional\DeliveryRequests\RusPost\Requests;
5use Bitrix\Main\Localization\Loc;
6use Bitrix\Main\Web\HttpClient;
7use Bitrix\Sale\Delivery\Requests;
9Loc::loadMessages(__FILE__);
17class Batch
extends Base
19 protected $path =
"/1.0/batch/{name}";
20 protected $type = HttpClient::HTTP_GET;
21 protected $internalId = 0;
22 protected $externalId =
'';
29 protected function convertResponse($rawData, $requestData)
31 $result =
new Requests\RequestResult();
33 if(isset($rawData[
'batch-name']))
35 $result->setExternalId($rawData[
'batch-name']);
36 $result->setInternalId($this->internalId);
44 'SALE_DLVRS_ADD_DREQ_RBATCH_01',
46 '#INTERNAL_ID#' => $this->internalId,
47 '#EXTERNAL_ID#' => $this->externalId
64 $result =
new Requests\Result();
66 if(
count($requestIds) !== 1)
68 $result->addError(
new Error(Loc::getMessage(
'SALE_DLVRS_ADD_DREQ_RBATCH_02')));
72 $requestId = current($requestIds);
74 if(intval($requestId) <= 0)
76 $result->addError(
new Error(Loc::getMessage(
'SALE_DLVRS_ADD_DREQ_RBATCH_03')));
80 $res =Requests\RequestTable::getList(
array(
88 if(!$row || $row[
'EXTERNAL_ID'] ==
'')
90 $result->addError(
new Error(Loc::getMessage(
'SALE_DLVRS_ADD_DREQ_RBATCH_04')));
94 $this->externalId = $row[
'EXTERNAL_ID'];
95 $this->internalId= $row[
'INTERNAL_ID'];
96 $this->
path = str_replace(
'{name}', $this->externalId, $this->
path);
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
send(AbstractCommand $command, Workgroup $entity)
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"