private static void exerciseUpdate(final YailClient client, boolean commit) throws InfusionsoftParameterValidationException, InfusionsoftXmlRpcException {
final int id = 333;
final String newName = "Carrots";
final CustomField updates = CustomField.builder()
.setFieldValue(CustomField.Field.Label, newName)
.build();
final DataServiceUpdateOperation update = new DataServiceUpdateOperation(id, updates);
if(commit){
final Integer updated = client.call(update);
System.out.println("Updated field: " + updated + ", was " + id);
}
final DataServiceLoadOperation<CustomField, CustomField> loader = new DataServiceLoadOperation<CustomField, CustomField>(CustomField.class, id);
final CustomField loaded = client.call(loader);
System.out.println("Load custom field: " + loaded);
}