service/LicenseTemplateService.php
public static function create(Context $context, $productModuleNumber, LicenseTemplate $licenseTemplate)
    {
        CheckUtils::paramNotEmpty($productModuleNumber, Constants::PRODUCT_MODULE_NUMBER);

        $licenseTemplate->setProperty(Constants::PRODUCT_MODULE_NUMBER, $productModuleNumber);

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

        $createdLicenseTemplate = null;

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

        return $createdLicenseTemplate;
    }
public static function create(Context $context, $productModuleNumber, LicenseTemplate $licenseTemplate)
    {
        CheckUtils::paramNotEmpty($productModuleNumber, Constants::PRODUCT_MODULE_NUMBER);

        $licenseTemplate->setProperty(Constants::PRODUCT_MODULE_NUMBER, $productModuleNumber);

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

        $createdLicenseTemplate = null;

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

        return $createdLicenseTemplate;
    }
Creates new license template object with given properties.See NetLicensingAPI for details:
https://www.labs64.de/confluence/display/NLICPUB/License+Template+Services#LicenseTemplateServices-Createlicensetemplate

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

parent product module to which the new license template is to be added
@param $productModuleNumber

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 LicenseTemplate $licenseTemplate

the newly created license template object
@return LicenseTemplate|null
@throws MalformedArgumentsException
@throws RestException
@throws \ErrorException