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

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


  public void testGetMonthlyLimits() throws Exception {
    // Create selector.
    InfoSelector selector = new InfoSelector();
    selector.setApiUsageType(ApiUsageType.UNIT_COUNT);

    ApiUsageInfo apiUsageInfo = service.get(selector);

    assertNull(apiUsageInfo.getApiUsageRecords());
    assertNotNull(apiUsageInfo.getCost());
  }
View Full Code Here


    // Create selector.
    DateRange range = new DateRange(TestUtils.firstDayOfMonth(), TestUtils.today());
    InfoSelector selector = new InfoSelector("CampaignService", "mutate", Operator.ADD, range,
        new String[] {clientId}, ApiUsageType.UNIT_COUNT_FOR_CLIENTS);

    ApiUsageInfo apiUsageInfo = service.get(selector);

    assertNotNull(apiUsageInfo.getApiUsageRecords());
    assertEquals(clientId, apiUsageInfo.getApiUsageRecords()[0].getClientEmail());
    assertNotNull(apiUsageInfo.getApiUsageRecords()[0].getCost());
  }
View Full Code Here

    // Create selector.
    DateRange range = new DateRange(TestUtils.firstDayOfMonth(), TestUtils.today());
    InfoSelector selector = new InfoSelector("CampaignService", "mutate", Operator.ADD, range,
        null, ApiUsageType.METHOD_COST);

    ApiUsageInfo apiUsageInfo = service.get(selector);

    assertNull(apiUsageInfo.getApiUsageRecords());
    assertNotNull(apiUsageInfo.getCost());
  }
View Full Code Here

  /**
   * Test getting API usage.
   */
  public void testGetApiUsage() throws Exception {
    // Create selector.
    InfoSelector selector = new InfoSelector();
    selector.setServiceName("CampaignService");
    selector.setMethodName("mutate");
    selector.setOperator(Operator.ADD);
    selector.setDateRange(new DateRange(TestUtils.firstDayOfMonth(), TestUtils.today()));
    selector.setApiUsageType(ApiUsageType.UNIT_COUNT);

    ApiUsageInfo apiUsageInfo = service.get(selector);

    assertNull(apiUsageInfo.getApiUsageRecords());
    assertNotNull(apiUsageInfo.getCost());
View Full Code Here

  /**
   * Test getting monthly API usage limits.
   */
  public void testGetMonthlyLimits() throws Exception {
    // Create selector.
    InfoSelector selector = new InfoSelector();
    selector.setApiUsageType(ApiUsageType.UNIT_COUNT);

    ApiUsageInfo apiUsageInfo = service.get(selector);

    assertNull(apiUsageInfo.getApiUsageRecords());
    assertNotNull(apiUsageInfo.getCost());
View Full Code Here

   * Test getting a unit count for clients.
   */
  public void testGetntCountForClients() throws Exception {
    // Create selector.
    DateRange range = new DateRange(TestUtils.firstDayOfMonth(), TestUtils.today());
    InfoSelector selector = new InfoSelector("CampaignService", "mutate", Operator.ADD, range,
        new String[] {clientId}, ApiUsageType.UNIT_COUNT_FOR_CLIENTS);

    ApiUsageInfo apiUsageInfo = service.get(selector);

    assertNotNull(apiUsageInfo.getApiUsageRecords());
View Full Code Here

   * Test getting the cost of a method.
   */
  public void testGetMethodCost() throws Exception {
    // Create selector.
    DateRange range = new DateRange(TestUtils.firstDayOfMonth(), TestUtils.today());
    InfoSelector selector = new InfoSelector("CampaignService", "mutate", Operator.ADD, range,
        null, ApiUsageType.METHOD_COST);

    ApiUsageInfo apiUsageInfo = service.get(selector);

    assertNull(apiUsageInfo.getApiUsageRecords());
View Full Code Here

      // Get the GeoLocationService.
      GeoLocationServiceInterface geoLocationService =
          user.getService(AdWordsService.V201306.GEO_LOCATION_SERVICE);

      // Create addresses.
      Address address1 = new Address();
      address1.setStreetAddress("1600 Amphitheatre Pkwy");
      address1.setCityName("Mountain View");
      address1.setProvinceCode("US-CA");
      address1.setPostalCode("94043");
      address1.setCountryCode("US");

      Address address2 = new Address();
      address2.setStreetAddress("76 9th Ave");
      address2.setCityName("New York");
      address2.setProvinceCode("US-NY");
      address2.setPostalCode("10011");
      address2.setCountryCode("US");

      Address address3 = new Address();
      address3.setStreetAddress("五四大街1号, Beijing东城区");
      address3.setCountryCode("CN");

      // Create selector.
      GeoLocationSelector selector = new GeoLocationSelector();
      selector.setAddresses(new Address[] {address1, address2, address3});
View Full Code Here

          user.getService(AdWordsService.V201306.GEO_LOCATION_SERVICE);

      long campaignId = Long.parseLong("INSERT_CAMPAIGN_ID_HERE");

      // 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

      // Get the GeoLocationService.
      GeoLocationServiceInterface geoLocationService =
          user.getService(AdWordsService.V201309.GEO_LOCATION_SERVICE);

      // Create addresses.
      Address address1 = new Address();
      address1.setStreetAddress("1600 Amphitheatre Pkwy");
      address1.setCityName("Mountain View");
      address1.setProvinceCode("US-CA");
      address1.setPostalCode("94043");
      address1.setCountryCode("US");

      Address address2 = new Address();
      address2.setStreetAddress("76 9th Ave");
      address2.setCityName("New York");
      address2.setProvinceCode("US-NY");
      address2.setPostalCode("10011");
      address2.setCountryCode("US");

      Address address3 = new Address();
      address3.setStreetAddress("五四大街1号, Beijing东城区");
      address3.setCountryCode("CN");

      // Create selector.
      GeoLocationSelector selector = new GeoLocationSelector();
      selector.setAddresses(new Address[] {address1, address2, address3});
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.