public function deliveryShipmentsEdit(array $shipment, $site = null)
    {
        if (!count($shipment)) {
            throw new \InvalidArgumentException(
                'Parameter `shipment` must contains a data'
            );
        }

        if (empty($shipment['id'])) {
            throw new \InvalidArgumentException(
                'Parameter `shipment` must contains an `id` field'
            );
        }

        /* @noinspection PhpUndefinedMethodInspection */
        return $this->client->makeRequest(
            sprintf("/delivery/shipments/%s/edit", $shipment['id']),
            "POST",
            $this->fillSite(
                $site,
                [
                    'deliveryShipment' => json_encode($shipment)
                ]
            )
        );
    }
public function deliveryShipmentsEdit(array $shipment, $site = null)
    {
        if (!count($shipment)) {
            throw new \InvalidArgumentException(
                'Parameter `shipment` must contains a data'
            );
        }

        if (empty($shipment['id'])) {
            throw new \InvalidArgumentException(
                'Parameter `shipment` must contains an `id` field'
            );
        }

        /* @noinspection PhpUndefinedMethodInspection */
        return $this->client->makeRequest(
            sprintf("/delivery/shipments/%s/edit", $shipment['id']),
            "POST",
            $this->fillSite(
                $site,
                [
                    'deliveryShipment' => json_encode($shipment)
                ]
            )
        );
    }
public function deliveryShipmentsEdit ( array $ shipment , $ site = null ) { if ( ! count ( $ shipment ) ) { throw new \ InvalidArgumentException ( 'Parameter `shipment` must contains a data' ) ; } if ( empty ( $ shipment [ 'id' ] ) ) { throw new \ InvalidArgumentException ( 'Parameter `shipment` must contains an `id` field' ) ; } /* @noinspection PhpUndefinedMethodInspection */ return $ this -> client -> makeRequest ( sprintf ( "/delivery/shipments/%s/edit" , $ shipment [ 'id' ] ) , "POST" , $ this -> fillSite ( $ site , [ 'deliveryShipment' => json_encode ( $ shipment ) ] ) ) ; }
Edit delivery shipment

@param array $shipment (default: array())
@param null  $site     (default: null)

@throws \InvalidArgumentException
@throws \RetailCrm\Exception\CurlException
@throws \RetailCrm\Exception\InvalidJsonException

@return \RetailCrm\Response\ApiResponse
Edit delivery shipment