Search in sources :

Example 1 with ArrayOfActivityRecord

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

the class MarketoSOAPClientTest method getLeadActivityResult.

public SuccessGetLeadActivity getLeadActivityResult() throws Exception {
    SuccessGetLeadActivity result = new SuccessGetLeadActivity();
    LeadActivityList res = new LeadActivityList();
    res.setReturnCount(1);
    res.setRemainingCount(0);
    StreamPosition sp = new StreamPosition();
    sp.setOffset(objectFactory.createStreamPositionOffset(""));
    res.setNewStartPosition(sp);
    ArrayOfActivityRecord arecords = new ArrayOfActivityRecord();
    // 
    ActivityRecord ar = new ActivityRecord();
    ar.setId(objectFactory.createActivityRecordId(123456L));
    ar.setMarketoGUID("ABC-123-DEF");
    ar.setMktgAssetName("mktgAssetName");
    ar.setActivityDateTime(factory.newXMLGregorianCalendar(gcDateTest));
    ar.setActivityType("activityType");
    ar.setCampaign(objectFactory.createActivityRecordCampaign("campaign"));
    ar.setForeignSysId(objectFactory.createActivityRecordForeignSysId("foreignSysId"));
    ar.setForeignSysOrgId(objectFactory.createActivityRecordForeignSysOrgId("foreignSysOrgId"));
    ar.setMktPersonId("mktPersonId");
    ar.setPersonName(objectFactory.createActivityRecordPersonName("personName"));
    ar.setOrgName(objectFactory.createActivityRecordOrgName("orgName"));
    ArrayOfAttribute aoa = objectFactory.createArrayOfAttribute();
    Attribute attr = new Attribute();
    attr.setAttrName("attrName");
    attr.setAttrValue("attrValue");
    aoa.getAttributes().add(attr);
    ar.setActivityAttributes(objectFactory.createActivityRecordActivityAttributes(aoa));
    // 
    arecords.getActivityRecords().add(ar);
    res.setActivityRecordList(objectFactory.createLeadActivityListActivityRecordList(arecords));
    result.setLeadActivityList(res);
    return result;
}
Also used : ArrayOfActivityRecord(com.marketo.mktows.ArrayOfActivityRecord) ArrayOfAttribute(com.marketo.mktows.ArrayOfAttribute) ArrayOfAttribute(com.marketo.mktows.ArrayOfAttribute) Attribute(com.marketo.mktows.Attribute) SuccessGetLeadActivity(com.marketo.mktows.SuccessGetLeadActivity) StreamPosition(com.marketo.mktows.StreamPosition) ArrayOfActivityRecord(com.marketo.mktows.ArrayOfActivityRecord) ActivityRecord(com.marketo.mktows.ActivityRecord) LeadActivityList(com.marketo.mktows.LeadActivityList)

Aggregations

ActivityRecord (com.marketo.mktows.ActivityRecord)1 ArrayOfActivityRecord (com.marketo.mktows.ArrayOfActivityRecord)1 ArrayOfAttribute (com.marketo.mktows.ArrayOfAttribute)1 Attribute (com.marketo.mktows.Attribute)1 LeadActivityList (com.marketo.mktows.LeadActivityList)1 StreamPosition (com.marketo.mktows.StreamPosition)1 SuccessGetLeadActivity (com.marketo.mktows.SuccessGetLeadActivity)1