use of com.marketo.mktows.ResultListOperation 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;
}
Aggregations