/** * @param \SimpleXMLElement $xml * * @return Response */ public function fromXml(\SimpleXMLElement $xml) { foreach ($xml->RatedShipment as $ratedShipment) { $this->addShippingMethod(ShippingMethod::fromXml($ratedShipment)); } return $this; }