Package com.google.api.adwords.v201306.cm

Examples of com.google.api.adwords.v201306.cm.LocationExtension


    // Get geo location.
    GeoLocation[] geoLocationResult = geoLocationService.get(selector);
    GeoLocation geoLocation = geoLocationResult[0];

    // Create location extension.
    LocationExtension locationExtension = new LocationExtension();
    locationExtension.setAddress(geoLocation.getAddress());
    locationExtension.setGeoPoint(geoLocation.getGeoPoint());
    locationExtension.setEncodedLocation(geoLocation.getEncodedLocation());
    locationExtension.setSource(LocationExtensionSource.ADWORDS_FRONTEND);

    // You can optionally provide these field(s).
    locationExtension.setCompanyName("Google");
    locationExtension.setPhoneNumber("650-253-0000");

    // Create campaign ad extension.
    CampaignAdExtension campaignAdExtension = new CampaignAdExtension();
    campaignAdExtension.setCampaignId(campaignId);
    campaignAdExtension.setAdExtension(locationExtension);
View Full Code Here


    // Get geo location.
    GeoLocation[] geoLocationResult = geoLocationService.get(selector);
    GeoLocation geoLocation = geoLocationResult[0];

    // Create location extension.
    LocationExtension locationExtension = new LocationExtension();
    locationExtension.setAddress(geoLocation.getAddress());
    locationExtension.setGeoPoint(geoLocation.getGeoPoint());
    locationExtension.setEncodedLocation(geoLocation.getEncodedLocation());
    locationExtension.setSource(LocationExtensionSource.ADWORDS_FRONTEND);

    // You can optionally provide these field(s).
    locationExtension.setCompanyName("Google");
    locationExtension.setPhoneNumber("650-253-0000");

    // Create campaign ad extension.
    CampaignAdExtension campaignAdExtension = new CampaignAdExtension();
    campaignAdExtension.setCampaignId(campaignId);
    campaignAdExtension.setAdExtension(locationExtension);
View Full Code Here

    // Get geo location.
    GeoLocation[] geoLocationResult = geoLocationService.get(selector);
    GeoLocation geoLocation = geoLocationResult[0];

    // Create location extension.
    LocationExtension locationExtension = new LocationExtension();
    locationExtension.setAddress(geoLocation.getAddress());
    locationExtension.setGeoPoint(geoLocation.getGeoPoint());
    locationExtension.setEncodedLocation(geoLocation.getEncodedLocation());
    locationExtension.setSource(LocationExtensionSource.ADWORDS_FRONTEND);

    // You can optionally provide these field(s).
    locationExtension.setCompanyName("Google");
    locationExtension.setPhoneNumber("650-253-0000");

    // Create campaign ad extension.
    CampaignAdExtension campaignAdExtension = new CampaignAdExtension();
    campaignAdExtension.setCampaignId(campaignId);
    campaignAdExtension.setAdExtension(locationExtension);
View Full Code Here

    // Get geo location.
    GeoLocation[] geoLocationResult = geoLocationService.get(selector);
    GeoLocation geoLocation = geoLocationResult[0];

    // Create location extension.
    LocationExtension locationExtension = new LocationExtension();
    locationExtension.setAddress(geoLocation.getAddress());
    locationExtension.setGeoPoint(geoLocation.getGeoPoint());
    locationExtension.setEncodedLocation(geoLocation.getEncodedLocation());
    locationExtension.setSource(LocationExtensionSource.ADWORDS_FRONTEND);

    // You can optionally provide these field(s).
    locationExtension.setCompanyName("Google");
    locationExtension.setPhoneNumber("650-253-0000");

    // Create campaign ad extension.
    CampaignAdExtension campaignAdExtension = new CampaignAdExtension();
    campaignAdExtension.setCampaignId(campaignId);
    campaignAdExtension.setAdExtension(locationExtension);
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"
        + "bGd4BzGR839qM7tGXlW5TvuGUs/lz3WjScPbHY8L0TfYcv2JV3c88di7qZJem7XV9I"
        + "Qqm3SFfWOwyC6K3y1v9p+V3twZoBCf02QVZFiohpTzau9Bj6hbXNoB7LKMHK1skduI"
        + "gs854r83tIp1FevrxVNp3S7npNDcQaNAMHoYzX8iDGASwR8sWg2JUYeiTns6AihCAp"
        + "QmwNTdYHhhgh75B9PqYpSA5ghBWr0xWpiZBnM9713DwvG4LCD2smG43VAGUUrCVknw"
        + "rMxS/XSoF6NMzAFi648SglPozoGrLPdQ/4IbaIr91yAJpegOGivQPQ7NMLc2ClnYt5"
        + "mj/IzHjNK7u1WDJFW2CF0Kw+/50zljzvWDVUiBxGha7da7ihyuR32D+uCJOM+HsCgA==";
    locationExtension.setEncodedLocation(Base64.decodeBase64(encoded.getBytes()));

    locationExtension.setCompanyName("Google");
    locationExtension.setPhoneNumber("(212) 565-0000");
    locationExtension.setSource(LocationExtensionSource.ADWORDS_FRONTEND);

    return new AdExtension[] {locationExtension};
  }
View Full Code Here

    // Get geo location.
    GeoLocation[] geoLocationResult = geoLocationService.get(selector);
    GeoLocation geoLocation = geoLocationResult[0];

    // Create location extension.
    LocationExtension locationExtension = new LocationExtension();
    locationExtension.setAddress(geoLocation.getAddress());
    locationExtension.setGeoPoint(geoLocation.getGeoPoint());
    locationExtension.setEncodedLocation(geoLocation.getEncodedLocation());
    locationExtension.setCompanyName("Google");
    locationExtension.setPhoneNumber("650-253-0000");
    locationExtension.setSource(LocationExtensionSource.ADWORDS_FRONTEND);

    // Create campaign ad extension.
    CampaignAdExtension campaignAdExtension = new CampaignAdExtension();
    campaignAdExtension.setCampaignId(campaignId);
    campaignAdExtension.setAdExtension(locationExtension);
View Full Code Here

      // Create ad extension override.
      AdExtensionOverride adExtensionOverride = new AdExtensionOverride();
      adExtensionOverride.setAdId(adId);

      // Create ad extension using existing id.
      AdExtension adExtension = new AdExtension();
      adExtension.setId(campaignAdExtensionId);
      adExtensionOverride.setAdExtension(adExtension);

      // Create operations.
      AdExtensionOverrideOperation operation = new AdExtensionOverrideOperation();
      operation.setOperand(adExtensionOverride);
View Full Code Here

      long adId = Long.parseLong("INSERT_AD_ID_HERE");
      long campaignAdExtensionId = Long.parseLong("INSERT_CAMPAIGN_AD_EXTENSION_ID_HERE");

      // Create ad extension override.
      AdExtensionOverride adExtensionOverride = new AdExtensionOverride();
      adExtensionOverride.setAdId(adId);

      // Create ad extension using existing id.
      AdExtension adExtension = new AdExtension();
      adExtension.setId(campaignAdExtensionId);
      adExtensionOverride.setAdExtension(adExtension);

      // Create operations.
      AdExtensionOverrideOperation operation = new AdExtensionOverrideOperation();
      operation.setOperand(adExtensionOverride);
      operation.setOperator(Operator.ADD);
View Full Code Here

      AdExtension adExtension = new AdExtension();
      adExtension.setId(campaignAdExtensionId);
      adExtensionOverride.setAdExtension(adExtension);

      // Create operations.
      AdExtensionOverrideOperation operation = new AdExtensionOverrideOperation();
      operation.setOperand(adExtensionOverride);
      operation.setOperator(Operator.ADD);

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

      // Add ad extension override.
      AdExtensionOverrideReturnValue result = adExtensionOverrideService.mutate(operations);
View Full Code Here

      operation.setOperator(Operator.ADD);

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

      // Add ad extension override.
      AdExtensionOverrideReturnValue result = adExtensionOverrideService.mutate(operations);

      // Display ad extension overrides.
      if (result != null && result.getValue() != null) {
        for (AdExtensionOverride adExtensionOverrideResult : result.getValue()) {
          System.out.println("Ad extension override with ad id \""
              + adExtensionOverrideResult.getAdId() + "\" and ad extension id \""
              + adExtensionOverrideResult.getAdExtension().getId() + "\" was added.");
        }
      } else {
View Full Code Here

TOP

Related Classes of com.google.api.adwords.v201306.cm.LocationExtension

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.