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

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


    textAdGroupAdOperation.setOperand(ad);
    textAdGroupAdOperation.setOperator(Operator.ADD);
    AdGroupAdOperation[] operations = new AdGroupAdOperation[] {textAdGroupAdOperation};

    // Add ads.
    AdGroupAdReturnValue result = service.mutate(operations);
    AdGroupAd testAd = result.getValue()[0];

    // Set the generated fields.
    ad.getAd().setApprovalStatus(testAd.getAd().getApprovalStatus());
    ad.getAd().setAdType(testAd.getAd().getAdType());
    ad.getAd().setId(testAd.getAd().getId());
View Full Code Here


    operation.setOperator(Operator.SET);

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

    // Update ad.
    AdGroupAdReturnValue result = service.mutate(operations);
    AdGroupAd testAdGroupAd = result.getValue()[0];

    assertEquals(adGroupAd.getStatus(), testAdGroupAd.getStatus());
  }
View Full Code Here

    operation.setOperator(Operator.REMOVE);

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

    // Remove ad.
    AdGroupAdReturnValue result = service.mutate(operations);
    AdGroupAd testAdGroupAd = result.getValue()[0];

    assertEquals(AdGroupAdStatus.DISABLED, testAdGroupAd.getStatus());
  }
View Full Code Here

  /**
   * Test getting an ad group ad.
   */
  public void testGet() throws Exception {
    // Create ad selector.
    AdGroupAdSelector selector = new AdGroupAdSelector();
    selector.setAdIds(new long[] {adId});

    // Create date range.
    DateRange range = new DateRange(TestUtils.firstDayOfMonth(), TestUtils.today());
    selector.setStatsSelector(new AdStatsSelector(range, null));

    // Get ads with the selector created above.
    AdGroupAdPage page = service.get(selector);

    assertNotNull(page);
View Full Code Here

  /**
   * Test getting all ad group ads in an ad group.
   */
  public void testGetAllInAdGroup() throws Exception {
    // Create ad selector.
    AdGroupAdSelector selector = new AdGroupAdSelector();
    selector.setAdGroupIds(new long[] {adGroupId});

    // Get ads with the selector created above.
    AdGroupAdPage page = service.get(selector);

    assertNotNull(page);
View Full Code Here

  /**
   * Test getting all ad group ads in an ad group.
   */
  public void testGetAllInCampaign() throws Exception {
    // Create ad selector.
    AdGroupAdSelector selector = new AdGroupAdSelector();
    selector.setCampaignIds(new long[] {campaignId});

    // Get ads with the selector created above.
    AdGroupAdPage page = service.get(selector);

    assertNotNull(page);
View Full Code Here

  /**
   * Test getting all ad group ads.
   */
  public void testGetAll() throws Exception {
    // Get ads with a created selector.
    AdGroupAdSelector selector = new AdGroupAdSelector();
    AdGroupAdPage page = service.get(selector);

    assertNotNull(page);
    assertNotNull(page.getEntries());
    assertTrue("Expected at least 1 entry", page.getTotalNumEntries() >= 1);
View Full Code Here

    AdGroupAdSelector selector = new AdGroupAdSelector();
    selector.setAdIds(new long[] {adId});

    // Create date range.
    DateRange range = new DateRange(TestUtils.firstDayOfMonth(), TestUtils.today());
    selector.setStatsSelector(new AdStatsSelector(range, null));

    // Get ads with the selector created above.
    AdGroupAdPage page = service.get(selector);

    assertNotNull(page);
View Full Code Here

   * Provides ad extensions.
   */
  private AdExtension[] adExtensionProvider() {
    // Create location extension.
    LocationExtension locationExtension = new LocationExtension();
    locationExtension.setAddress(new Address("76 9th Ave", null, "New York", "NY", "NY", "10011",
        "US"));
    locationExtension.setGeoPoint(new GeoPoint(new Integer(40742412), new Integer(-74004378)));
    String encoded = "qrvM3QDB3iJsdO58XYyix7YGjYhU+jHs3GR0J6uqpGp55fMTsorT5ZLH69crnCWnM3"
        + "FVAFDO9Un4HNbc5/ORF0Y8hZL/sPevCyxMrjZ2gmwbQwi2fvDB2J7RhyWSV4uWA3LT"
        + "0sdG2b22nH34uDh88XZyTyZMk0Fgc6wmmIwKSlUdYlyCzJ00Qd2JGboNgcWnVeHC8c"
View Full Code Here

  /**
   * Test getting geocoding an address.
   */
  public void testGet() throws Exception {
    // Create address.
    Address address = new Address();
    address.setStreetAddress("1600 Amphitheatre Parkway");
    address.setCityName("Mountain View");
    address.setProvinceCode("US-CA");
    address.setPostalCode("94043");
    address.setCountryCode("US");

    // Create geo location selector.
    GeoLocationSelector selector = new GeoLocationSelector();
    selector.setAddresses(new Address[] {address});

View Full Code Here

TOP

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

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.