Package com.google.api.adwords.v201008.cm

Examples of com.google.api.adwords.v201008.cm.CampaignPage


    operation.setOperator(Operator.REMOVE);

    CampaignAdExtensionOperation[] operations = new CampaignAdExtensionOperation[] {operation};

    // Add campaign ad extension.
    CampaignAdExtensionReturnValue result = service.mutate(operations);
    CampaignAdExtension testExtension = result.getValue()[0];

    assertEquals(CampaignAdExtensionStatus.DELETED, testExtension.getStatus());
  }
View Full Code Here


  /**
   * Test getting all campaign ad extension for a campaign.
   */
  public void testGetAllForCampaign() throws Exception {
    // Create selector.
    CampaignAdExtensionSelector selector = new CampaignAdExtensionSelector();
    DateRange range = new DateRange(TestUtils.firstDayOfMonth(), TestUtils.today());
    selector.setStatsSelector(new CampaignAdExtensionStatsSelector(range, null));
    selector.setCampaignIds(new long[] {campaignId});
    selector.setStatuses(new CampaignAdExtensionStatus[] {CampaignAdExtensionStatus.ACTIVE,
        CampaignAdExtensionStatus.DELETED});

    CampaignAdExtensionPage page = service.get(selector);

    assertNotNull(page);
View Full Code Here

  /**
   * Test getting all campaign ad extensions for an ad extension.
   */
  public void testGetAllForAdExtension() throws Exception {
    // Create selector.
    CampaignAdExtensionSelector selector = new CampaignAdExtensionSelector();
    selector.setAdExtensionIds(new long[] {adExtensionId});

    CampaignAdExtensionPage page = service.get(selector);

    assertNotNull(page);
    assertNotNull(page.getEntries());
View Full Code Here

  /**
   * Test getting all campaign ad extensions.
   */
  public void testGetAll() throws Exception {
    // Create selector.
    CampaignAdExtensionSelector selector = new CampaignAdExtensionSelector();

    CampaignAdExtensionPage page = service.get(selector);

    assertNotNull(page);
    assertNotNull(page.getEntries());
View Full Code Here

   */
  public void testGetAllForCampaign() throws Exception {
    // Create selector.
    CampaignAdExtensionSelector selector = new CampaignAdExtensionSelector();
    DateRange range = new DateRange(TestUtils.firstDayOfMonth(), TestUtils.today());
    selector.setStatsSelector(new CampaignAdExtensionStatsSelector(range, null));
    selector.setCampaignIds(new long[] {campaignId});
    selector.setStatuses(new CampaignAdExtensionStatus[] {CampaignAdExtensionStatus.ACTIVE,
        CampaignAdExtensionStatus.DELETED});

    CampaignAdExtensionPage page = service.get(selector);
View Full Code Here

    budget.setAmount(new Money(null, 50000000L));
    budget.setDeliveryMethod(BudgetBudgetDeliveryMethod.STANDARD);
    campaign.setBudget(budget);

    // Create operations.
    CampaignOperation operation = new CampaignOperation();
    operation.setOperand(campaign);
    operation.setOperator(Operator.ADD);

    CampaignOperation[] operations = new CampaignOperation[] {operation};

    CampaignReturnValue result = service.mutate(operations);
View Full Code Here

  public void testInvalidCreateCampaign() throws Exception {
    // Create campaign.
    Campaign campaign = new Campaign();

    // Create operations.
    CampaignOperation operation = new CampaignOperation();
    operation.setOperand(campaign);
    operation.setOperator(Operator.ADD);

    CampaignOperation[] operations = new CampaignOperation[] {operation};

    CampaignReturnValue result;
    try {
View Full Code Here

    long[] ids = {campaign1.getId()};
    selector.setIds(ids);
    selector.setStatsSelector(new StatsSelector(new DateRange("20090101", "20090131"), null));

    // Get all campaigns.
    CampaignPage page = campaignService.get(selector);
    Campaign testCampaign = page.getEntries()[0];

    // Set the generated fields.
    campaign1.setCampaignStats(testCampaign.getCampaignStats());
    campaign1.setAdServingOptimizationStatus(testCampaign.getAdServingOptimizationStatus());
    campaign1.setConversionOptimizerEligibility(testCampaign.getConversionOptimizerEligibility());
View Full Code Here

    // Create selector.
    CampaignSelector selector = new CampaignSelector();

    // Get all campaigns.
    CampaignPage page = campaignService.get(selector);

    boolean found1 = false;
    boolean found2 = false;

    for (Campaign testCampaign : page.getEntries()) {
      if (testCampaign.getId().longValue() == campaign1.getId().longValue()) {
        // Set the generated fields.
        campaign1.setCampaignStats(testCampaign.getCampaignStats());
        campaign1.setAdServingOptimizationStatus(testCampaign.getAdServingOptimizationStatus());
        campaign1.setConversionOptimizerEligibility(testCampaign
View Full Code Here

    operation.setOperand(campaign);
    operation.setOperator(Operator.ADD);

    CampaignOperation[] operations = new CampaignOperation[] {operation};

    CampaignReturnValue result = service.mutate(operations);

    assertNull(result);
  }
View Full Code Here

TOP

Related Classes of com.google.api.adwords.v201008.cm.CampaignPage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.