code: private function formatResponse(SimpleXMLElement $response)
      {
          if ($this->allowMultipleShipments) {
              $response = $this->convertXmlObject($response);
              if (!is_array($response->Shipment)) {
                  $response->Shipment = [$response->Shipment];
              }
              return $response;
          }
  
          return $this->convertXmlObject($response->Shipment);
      }
docs: Format the response.
  
  @param SimpleXMLElement $response
  
  @return stdClass