Search in sources :

Example 1 with ResultGetLeadChanges

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;
}
Also used : ArrayOfAttribute(com.marketo.mktows.ArrayOfAttribute) ArrayOfAttribute(com.marketo.mktows.ArrayOfAttribute) Attribute(com.marketo.mktows.Attribute) SuccessGetLeadChanges(com.marketo.mktows.SuccessGetLeadChanges) ResultGetLeadChanges(com.marketo.mktows.ResultGetLeadChanges) StreamPosition(com.marketo.mktows.StreamPosition) ArrayOfLeadChangeRecord(com.marketo.mktows.ArrayOfLeadChangeRecord) ArrayOfLeadChangeRecord(com.marketo.mktows.ArrayOfLeadChangeRecord) LeadChangeRecord(com.marketo.mktows.LeadChangeRecord)

Aggregations

ArrayOfAttribute (com.marketo.mktows.ArrayOfAttribute)1 ArrayOfLeadChangeRecord (com.marketo.mktows.ArrayOfLeadChangeRecord)1 Attribute (com.marketo.mktows.Attribute)1 LeadChangeRecord (com.marketo.mktows.LeadChangeRecord)1 ResultGetLeadChanges (com.marketo.mktows.ResultGetLeadChanges)1 StreamPosition (com.marketo.mktows.StreamPosition)1 SuccessGetLeadChanges (com.marketo.mktows.SuccessGetLeadChanges)1