/** * create sample request. * * @param accountId long * @return ConversionTrackerOperation */ public static ConversionTrackerOperation createSampleAddRequest(long accountId) { ConversionTracker addConversionTracker = new ConversionTracker(); addConversionTracker.setAccountId(accountId); addConversionTracker.setConversionTrackerName( "SampleConversionTracker_CreateOn_" + SoapUtils.getCurrentTimestamp()); addConversionTracker.setStatus(ConversionTrackerStatus.ENABLED); addConversionTracker.setCategory(ConversionTrackerCategory.PURCHASE); addConversionTracker.setConversionTrackerType(ConversionTrackerType.WEB_CONVERSION); ConversionTrackerOperation addConversionTrackerOperation = new ConversionTrackerOperation(); addConversionTrackerOperation.setAccountId(accountId); addConversionTrackerOperation.setOperator(Operator.ADD); addConversionTrackerOperation.getOperand().add(addConversionTracker); return addConversionTrackerOperation; }
/** * create sample request. * * @param accountId long * @param campaignValues CampaignValues * @return ConversionTrackerOperation */ public static ConversionTrackerOperation createSampleSetRequest( long accountId, List<ConversionTrackerValues> conversionTrackerValues) { ConversionTrackerOperation setConversionTrackerOperation = new ConversionTrackerOperation(); setConversionTrackerOperation.setAccountId(accountId); setConversionTrackerOperation.setOperator(Operator.SET); for (ConversionTrackerValues values : conversionTrackerValues) { ConversionTracker setConversionTracker = new ConversionTracker(); setConversionTracker.setAccountId(accountId); setConversionTracker.setConversionTrackerId( values.getConversionTracker().getConversionTrackerId()); setConversionTracker.setConversionTrackerName( "SampleConversionTracker_UpdateOn_" + SoapUtils.getCurrentTimestamp()); setConversionTracker.setStatus(ConversionTrackerStatus.DISABLED); setConversionTracker.setCategory(ConversionTrackerCategory.PAGE_VIEW); setConversionTracker.setUserRevenueValue((long) 300); setConversionTracker.setConversionTrackerType(ConversionTrackerType.WEB_CONVERSION); setConversionTrackerOperation.getOperand().add(setConversionTracker); } return setConversionTrackerOperation; }