service/LicenseeService.php
public static function create(Context $context, $productNumber, Licensee $licensee)
    {
        CheckUtils::paramNotEmpty($productNumber, Constants::PRODUCT_NUMBER);

        $licensee->setProperty(Constants::PRODUCT_NUMBER, $productNumber);

        $response = NetLicensingService::getInstance()
            ->post($context, Constants::LICENSEE_ENDPOINT_PATH, $licensee->asPropertiesMap());

        $createdLicensee = null;

        if (!empty($response->items->item[0])) {
            $createdLicensee = ItemToLicenseeConverter::convert($response->items->item[0]);
            $createdLicensee->exists = true;
        }

        return $createdLicensee;
    }
public static function create(Context $context, $productNumber, Licensee $licensee)
    {
        CheckUtils::paramNotEmpty($productNumber, Constants::PRODUCT_NUMBER);

        $licensee->setProperty(Constants::PRODUCT_NUMBER, $productNumber);

        $response = NetLicensingService::getInstance()
            ->post($context, Constants::LICENSEE_ENDPOINT_PATH, $licensee->asPropertiesMap());

        $createdLicensee = null;

        if (!empty($response->items->item[0])) {
            $createdLicensee = ItemToLicenseeConverter::convert($response->items->item[0]);
            $createdLicensee->exists = true;
        }

        return $createdLicensee;
    }
Creates new licensee object with given properties.See NetLicensingAPI for details:
https://www.labs64.de/confluence/display/NLICPUB/Licensee+Services#LicenseeServices-Createlicensee

determines the vendor on whose behalf the call is performed
@param Context $context

parent product to which the new licensee is to be added
@param $productNumber

non-null properties will be taken for the new object, null properties will either stay null, or will
be set to a default value, depending on property.
@param Licensee $licensee

return the newly created licensee object
@return Licensee|null
@throws MalformedArgumentsException
@throws \ErrorException
@throws RestException