code: def to_array(self):
          
          array = super(WebhookInfo, self).to_array()
          array['url'] = u(self.url)  # py2: type unicode, py3: type str
          array['has_custom_certificate'] = bool(self.has_custom_certificate)  # type bool
          array['pending_update_count'] = int(self.pending_update_count)  # type int
          if self.last_error_date is not None:
              array['last_error_date'] = int(self.last_error_date)  # type int
          if self.last_error_message is not None:
              array['last_error_message'] = u(self.last_error_message)  # py2: type unicode, py3: type str
          if self.max_connections is not None:
              array['max_connections'] = int(self.max_connections)  # type int
          if self.allowed_updates is not None:
              array['allowed_updates'] = self._as_array(self.allowed_updates)  # type list of str
          return array
docs: Serializes this WebhookInfo to a dictionary.
  
          :return: dictionary representation of this object.
          :rtype: dict