Package com.dietsodasoftware.yail.xmlrpc.model

Examples of com.dietsodasoftware.yail.xmlrpc.model.CustomField


    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);
    }
View Full Code Here


    private static void exerciseUpdateCustomField(YailClient client) throws InfusionsoftParameterValidationException, InfusionsoftXmlRpcException {
        final int fieldId = 124;
        final String newName = "Carrots";

        final CustomField updates = CustomField.builder()
                .setFieldValue(CustomField.Field.Label, newName)
                .build();

        final DataServiceUpdateCustomFieldOperation updater = new DataServiceUpdateCustomFieldOperation(fieldId, updates);

        final Boolean success = client.call(updater);
        System.out.println("Update custom field:  " + success);

        final DataServiceLoadOperation<CustomField, CustomField> loader = new DataServiceLoadOperation<CustomField, CustomField>(CustomField.class, fieldId);
        final CustomField loaded = client.call(loader);
        System.out.println("Load custom field: " + loaded);
    }
View Full Code Here

TOP

Related Classes of com.dietsodasoftware.yail.xmlrpc.model.CustomField

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.