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

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

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

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

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

@return \RetailCrm\Response\ApiResponse
Create delivery shipment