Package com.google.api.ads.adwords.jaxws.v201309.cm

Examples of com.google.api.ads.adwords.jaxws.v201309.cm.AdGroupBidModifierServiceInterface


  }

  public static void runExample(AdWordsUser user, Long adGroupId)
      throws Exception {
    // Get the AdGroupBidModifierService.
    AdGroupBidModifierServiceInterface bidModifierService =
        user.getService(AdWordsService.V201306.ADGROUP_BID_MODIFIER_SERVICE);

    // Create mobile platform. The ID can be found in the documentation.
    // https://developers.google.com/adwords/api/docs/appendix/platforms
    Platform mobile = new Platform();
    mobile.setId(30001L);

    AdGroupBidModifier adGroupBidModifier = new AdGroupBidModifier();
    adGroupBidModifier.setAdGroupId(adGroupId);
    adGroupBidModifier.setBidModifier(BID_MODIFIER);
    adGroupBidModifier.setCriterion(mobile);

    // Create ADD operation.
    AdGroupBidModifierOperation operation = new AdGroupBidModifierOperation();
    operation.setOperand(adGroupBidModifier);
    // Use 'ADD' to add a new modifier and 'SET' to update an existing one. A
    // modifier can be removed with the 'REMOVE' operator.
    operation.setOperator(Operator.ADD);

    // Update ad group bid modifier.
    AdGroupBidModifierReturnValue result =
        bidModifierService.mutate(new AdGroupBidModifierOperation[] {operation});
    for (AdGroupBidModifier bidModifierResult : result.getValue()) {
      System.out.printf(
          "Campaign ID '%d', AdGroup ID '%d' was updated with ad group level modifier: %.2f\n",
          bidModifierResult.getCampaignId(), bidModifierResult.getAdGroupId(),
          bidModifierResult.getBidModifier());
View Full Code Here


    runExample(user);
  }

  public static void runExample(AdWordsUser user) throws Exception {
    // Get the AdGroupBidModifierService.
    AdGroupBidModifierServiceInterface bidModifierService =
        user.getService(AdWordsService.V201306.ADGROUP_BID_MODIFIER_SERVICE);

    int offset = 0;

    // Create selector.
    Selector selector = new Selector();
    selector.setFields(new String[] {"CampaignId", "AdGroupId", "BidModifier", "Id"});
    selector.setPaging(new Paging(offset, PAGE_SIZE));

    AdGroupBidModifierPage page = bidModifierService.get(selector);
    if (page.getEntries() != null) {
      for (AdGroupBidModifier bidModifierResult : page.getEntries()) {
        String bidModifierValue =
            bidModifierResult.getBidModifier() != null ? bidModifierResult.getBidModifier()
                .toString()
View Full Code Here

  }

  public static void runExample(AdWordsUser user, Long adGroupId)
      throws Exception {
    // Get the AdGroupBidModifierService.
    AdGroupBidModifierServiceInterface bidModifierService =
        user.getService(AdWordsService.V201309.ADGROUP_BID_MODIFIER_SERVICE);

    // Create mobile platform. The ID can be found in the documentation.
    // https://developers.google.com/adwords/api/docs/appendix/platforms
    Platform mobile = new Platform();
    mobile.setId(30001L);

    AdGroupBidModifier adGroupBidModifier = new AdGroupBidModifier();
    adGroupBidModifier.setAdGroupId(adGroupId);
    adGroupBidModifier.setBidModifier(BID_MODIFIER);
    adGroupBidModifier.setCriterion(mobile);

    // Create ADD operation.
    AdGroupBidModifierOperation operation = new AdGroupBidModifierOperation();
    operation.setOperand(adGroupBidModifier);
    // Use 'ADD' to add a new modifier and 'SET' to update an existing one. A
    // modifier can be removed with the 'REMOVE' operator.
    operation.setOperator(Operator.ADD);

    // Update ad group bid modifier.
    AdGroupBidModifierReturnValue result =
        bidModifierService.mutate(new AdGroupBidModifierOperation[] {operation});
    for (AdGroupBidModifier bidModifierResult : result.getValue()) {
      System.out.printf(
          "Campaign ID '%d', AdGroup ID '%d' was updated with ad group level modifier: %.2f\n",
          bidModifierResult.getCampaignId(), bidModifierResult.getAdGroupId(),
          bidModifierResult.getBidModifier());
View Full Code Here

    runExample(user);
  }

  public static void runExample(AdWordsUser user) throws Exception {
    // Get the AdGroupBidModifierService.
    AdGroupBidModifierServiceInterface bidModifierService =
        user.getService(AdWordsService.V201309.ADGROUP_BID_MODIFIER_SERVICE);

    int offset = 0;

    // Create selector.
    Selector selector = new Selector();
    selector.setFields(new String[] {"CampaignId", "AdGroupId", "BidModifier", "Id"});
    selector.setPaging(new Paging(offset, PAGE_SIZE));

    AdGroupBidModifierPage page = bidModifierService.get(selector);
    if (page.getEntries() != null) {
      for (AdGroupBidModifier bidModifierResult : page.getEntries()) {
        String bidModifierValue =
            bidModifierResult.getBidModifier() != null ? bidModifierResult.getBidModifier()
                .toString()
View Full Code Here

TOP

Related Classes of com.google.api.ads.adwords.jaxws.v201309.cm.AdGroupBidModifierServiceInterface

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.