1. Go to this page and download the library: Download uru/digital-river-models library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
uru / digital-river-models example snippets
$data = new Product();
$data->setVendorId($vendorId);
$data->setProductCode($productCode);
$data->setName($fullName);
$data->setProductType((new ProductTypeEnum(ProductTypeEnum::NMP)));
$data->setStatus((new ProductStatusEnum(ProductStatusEnum::NSE)));
$data->setDefaultCurrency(self::DEFAULT_CURRENCY);
$priceScale = new PriceScale();
$priceScale->setQuantityFrom(1);
$price = new Price();
$price->setCurrency(self::DEFAULT_CURRENCY);
$price->setPrice($price);
$priceScale->setPrices([$price]);
$data->setPriceScale([$priceScale]);
$productDescriptions = new ProductDescriptions();
$productDescriptions->setLanguage('en');
$productDescriptions->setDisplayName($fullName);
$productDescriptions->setShortDescription($description);
$productDescriptions->setFullDescription($fullDescription);
$data->setDescriptions([$productDescriptions]);
$exportRegulation = new ExportRegulations();
$exportRegulation->setECCN((new ECCNIdEnum(ECCNIdEnum::EAR99)));
$exportRegulation->setCountryOfOrigin('ru');
if (!$licenseIsRequire) {
$exportRegulation->setLicenseException((new LicenseExceptionsEnum(LicenseExceptionsEnum::NLR)));
}
$data->setExportRegulations($exportRegulation);
$deliveryItems = new ProductDelivery();
$deliveryItems->setDeliveryType((new DeliveryTypeEnum(DeliveryTypeEnum::EL5_KEY_INL)));
$deliveryItems->setLicenseKeyDefinition((new LicenseKey($url)));
$data->setProductDelivery([$deliveryItems]);
// output to curl
echo json_encode($data);