//////////////////////////////////////////////////////////////////
// Update Enforced TLS settings
// PATCH /user/settings/enforced_tls


public class Example {
  public static void main(String[] args) throws IOException {
    try {
      SendGrid sg = new SendGrid(System.getenv("SENDGRID_API_KEY"));
      Request request = new Request();
      request.setMethod(Method.PATCH);
      request.setEndpoint("user/settings/enforced_tls");
      request.setBody("{\"require_tls\":true,\"require_valid_cert\":false}");
      Response response = sg.api(request);
      System.out.println(response.getStatusCode());
      System.out.println(response.getBody());
      System.out.println(response.getHeaders());
    } catch (IOException ex) {
      throw ex;
    }
  }
}
