/** * @internal * * @param \SimpleXMLElement $xml * * @return ProductType */ public static function fromXml(\SimpleXMLElement $xml) { $productType = new ProductType(); $productType->setIsResponse(); $productType->setCode($xml->Code)->setDescription($xml->Description); return $productType; }