use of com.marketo.mktows.ResultGetLeadChanges in project components by Talend.
the class MarketoSOAPClientTest method getLeadChangeResult.
public SuccessGetLeadChanges getLeadChangeResult() {
SuccessGetLeadChanges result = new SuccessGetLeadChanges();
ResultGetLeadChanges res = new ResultGetLeadChanges();
res.setReturnCount(1);
res.setRemainingCount(0);
StreamPosition sp = new StreamPosition();
sp.setOffset(objectFactory.createStreamPositionOffset(""));
res.setNewStartPosition(sp);
//
ArrayOfLeadChangeRecord lcr = new ArrayOfLeadChangeRecord();
LeadChangeRecord lc = new LeadChangeRecord();
lc.setId(objectFactory.createLeadChangeRecordId(123456L));
lc.setMarketoGUID("ABC-123-DEF");
lc.setMktgAssetName(objectFactory.createLeadChangeRecordMktgAssetName("mktgAssetName"));
lc.setActivityDateTime(factory.newXMLGregorianCalendar(gcDateTest));
lc.setActivityType("activityType");
lc.setCampaign("campaign");
lc.setMktPersonId("mktPersonId");
ArrayOfAttribute aoa = objectFactory.createArrayOfAttribute();
Attribute attr = new Attribute();
attr.setAttrName("attrName");
attr.setAttrValue("attrValue");
aoa.getAttributes().add(attr);
lc.setActivityAttributes(objectFactory.createActivityRecordActivityAttributes(aoa));
lcr.getLeadChangeRecords().add(lc);
//
res.setLeadChangeRecordList(objectFactory.createResultGetLeadChangesLeadChangeRecordList(lcr));
result.setResult(res);
return result;
}
Aggregations