Search in sources :

Example 1 with ArrayOfLeadStatus

use of com.marketo.mktows.ArrayOfLeadStatus in project components by Talend.

the class MarketoSOAPClientTest method getListOperation.

public SuccessListOperation getListOperation(boolean isSuccess, String status) {
    SuccessListOperation result = new SuccessListOperation();
    ResultListOperation rlo = new ResultListOperation();
    if (isSuccess) {
        rlo.setSuccess(true);
        ArrayOfLeadStatus aols = new ArrayOfLeadStatus();
        LeadStatus ls = new LeadStatus();
        LeadKey lk = new LeadKey();
        lk.setKeyType(LeadKeyRef.IDNUM);
        lk.setKeyValue("12345");
        ls.setLeadKey(lk);
        aols.getLeadStatuses().add(ls);
        rlo.setStatusList(objectFactory.createResultListOperationStatusList(aols));
        result.setResult(rlo);
    } else {
        rlo.setSuccess(false);
        rlo.setStatusList(objectFactory.createResultListOperationStatusList(null));
        result.setResult(rlo);
    }
    return result;
}
Also used : SuccessListOperation(com.marketo.mktows.SuccessListOperation) ResultListOperation(com.marketo.mktows.ResultListOperation) ArrayOfLeadStatus(com.marketo.mktows.ArrayOfLeadStatus) LeadKey(com.marketo.mktows.LeadKey) ArrayOfLeadStatus(com.marketo.mktows.ArrayOfLeadStatus) LeadStatus(com.marketo.mktows.LeadStatus)

Aggregations

ArrayOfLeadStatus (com.marketo.mktows.ArrayOfLeadStatus)1 LeadKey (com.marketo.mktows.LeadKey)1 LeadStatus (com.marketo.mktows.LeadStatus)1 ResultListOperation (com.marketo.mktows.ResultListOperation)1 SuccessListOperation (com.marketo.mktows.SuccessListOperation)1