public function create($containerId, Item $item)
    {
        $properties = $item->export()['properties'];
        if (count($properties) === 0) {
            throw new \InvalidArgumentException('Item should has at least one property!');
        }

        return $this->client->sendRequest(
            $this->getBase() . '/' . $containerId,
            'POST',
            $properties
        );
    }
public function create($containerId, Item $item)
    {
        $properties = $item->export()['properties'];
        if (count($properties) === 0) {
            throw new \InvalidArgumentException('Item should has at least one property!');
        }

        return $this->client->sendRequest(
            $this->getBase() . '/' . $containerId,
            'POST',
            $properties
        );
    }
public function create ( $ containerId , Item $ item ) { $ properties = $ item -> export ( ) [ 'properties' ] ; if ( count ( $ properties ) === 0 ) { throw new \ InvalidArgumentException ( 'Item should has at least one property!' ) ; } return $ this -> client -> sendRequest ( $ this -> getBase ( ) . '/' . $ containerId , 'POST' , $ properties ) ; }
Create Item.

@param string $containerId Container ID.
@param Item   $item        Item model.

@return string Created item ID.

@throws \InvalidArgumentException If Item has no properties.
@throws \Comindware\Tracker\API\Exception\RuntimeException In case of non-API errors.
@throws \Comindware\Tracker\API\Exception\WebApiClientException Ore one of descendants.
@throws \LogicException On internal errors.

@since 0.1
Create Item .