Package com.google.api.ads.dfp.jaxws.v201211

Examples of com.google.api.ads.dfp.jaxws.v201211.OrderPage


      // Get the OrderService.
      OrderServiceInterface orderService =
          user.getService(DfpService.V201311.ORDER_SERVICE);

      // Sets defaults for page and filter.
      OrderPage page = new OrderPage();
      Statement filterStatement = new Statement();
      int offset = 0;

      do {
        // Create a statement to get all orders.
        filterStatement.setQuery("LIMIT 500 OFFSET " + offset);

        // Get orders by statement.
        page = orderService.getOrdersByStatement(filterStatement);

        if (page.getResults() != null) {
          int i = page.getStartIndex();
          for (Order order : page.getResults()) {
            System.out.println(i + ") Order with ID \""
                + order.getId() + "\", name \"" + order.getName()
                + "\", and advertiser ID \"" + order.getAdvertiserId()
                + "\" was found.");
            i++;
          }
        }

        offset += 500;
      } while (page.getResults() != null && page.getResults().length == 500);

      System.out.println("Number of results found: " + page.getTotalResultSetSize());
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
View Full Code Here


      // Create a statement to get all orders.
      Statement filterStatement = new Statement("LIMIT 500", null);

      // Get orders by statement.
      OrderPage page = orderService.getOrdersByStatement(filterStatement);

      if (page.getResults() != null) {
        Order[] orders = page.getResults();

        // Update each local order object by changing its notes.
        int i = 0;
        for (Order order : orders) {
          // Archived orders cannot be updated.
View Full Code Here

TOP

Related Classes of com.google.api.ads.dfp.jaxws.v201211.OrderPage

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.