/**
  * Posts a new service request to Open311
  *
  * @param ServiceRequest $serviceRequest
  * @param string $format
  * @return ServiceRequestResponse|null
  * @throws Open311Exception
  */
 public function postServiceRequest(ServiceRequest $serviceRequest, $format = self::FORMAT_JSON)
 {
     if ($serviceRequest instanceof ServiceRequest) {
         $response = $this->post(self::COMMAND_SERVICE_REQUESTS, $format, $serviceRequest->toArray());
         if (!is_null($response)) {
             $responseData = $response->json();
             if (is_array($responseData) && isset($responseData[0])) {
                 return ServiceRequestResponse::fromArray($responseData[0]);
             }
         }
     } else {
         throw new Open311Exception(self::ERROR_INVALID_SERVICE_REQUEST);
     }
     return null;
 }