Examples of Money


Examples of com.google.api.ads.dfp.v201211.Money

      lineItem.setStartDateTimeType(StartDateTimeType.IMMEDIATELY);
      lineItem.setEndDateTime(DateTimeUtils.fromString("2012-09-01T00:00:00"));

      // Set the cost per day to $1.
      lineItem.setCostType(CostType.CPD);
      lineItem.setCostPerUnit(new Money("USD", 1000000L));

      // Set the percentage to be 100%.
      lineItem.setUnitsBought(100L);

      // Create the line item on the server.
View Full Code Here

Examples of com.google.api.ads.dfp.v201302.Money

      lineItem.setStartDateTimeType(StartDateTimeType.IMMEDIATELY);
      lineItem.setEndDateTime(DateTimeUtils.fromString("2013-09-01T00:00:00"));

      // Set the cost per day to $1.
      lineItem.setCostType(CostType.CPD);
      lineItem.setCostPerUnit(new Money("USD", 1000000L));

      // Set the percentage to be 100%.
      lineItem.setUnitsBought(100L);

      // Create the line item on the server.
View Full Code Here

Examples of com.google.api.ads.dfp.v201306.Money

        lineItem.setStartDateTimeType(StartDateTimeType.IMMEDIATELY);
        lineItem.setEndDateTime(DateTimeUtils.fromString("2012-09-01T00:00:00"));

        // Set the cost per unit to $2.
        lineItem.setCostType(CostType.CPM);
        lineItem.setCostPerUnit(new Money("USD", 2000000L));

        // Set the number of units bought to 500,000 so that the budget is
        // $1,000.
        lineItem.setUnitsBought(500000L);
        lineItem.setUnitType(UnitType.IMPRESSIONS);
View Full Code Here

Examples of com.google.api.ads.dfp.v201308.Money

        lineItem.setStartDateTimeType(StartDateTimeType.IMMEDIATELY);
        lineItem.setEndDateTime(DateTimeUtils.fromString("2012-09-01T00:00:00"));

        // Set the cost per unit to $2.
        lineItem.setCostType(CostType.CPM);
        lineItem.setCostPerUnit(new Money("USD", 2000000L));

        // Set the number of units bought to 500,000 so that the budget is
        // $1,000.
        lineItem.setUnitsBought(500000L);
        lineItem.setUnitType(UnitType.IMPRESSIONS);
View Full Code Here

Examples of com.google.api.ads.dfp.v201311.Money

        lineItem.setStartDateTimeType(StartDateTimeType.IMMEDIATELY);
        lineItem.setEndDateTime(DateTimeUtils.fromString("2012-09-01T00:00:00"));

        // Set the cost per unit to $2.
        lineItem.setCostType(CostType.CPM);
        lineItem.setCostPerUnit(new Money("USD", 2000000L));

        // Set the number of units bought to 500,000 so that the budget is
        // $1,000.
        lineItem.setUnitsBought(500000L);
        lineItem.setUnitType(UnitType.IMPRESSIONS);
View Full Code Here

Examples of com.google.api.adwords.v200909.cm.Money

    Random generator = new Random();

    int numCamp = generator.nextInt(4) + 1;
    for (int i = 0; i < numCamp; i++) {
      Campaign campaign = new Campaign();
      campaign.setBudget(new Budget(BudgetBudgetPeriod.DAILY, new Money("USD", 1000000L),
          BudgetBudgetDeliveryMethod.STANDARD));
      campaign.setStatus(CampaignStatus.PAUSED);
      campaign.setBiddingStrategy(new ManualCPC());
      CampaignReturnValue crv =
          campaignService.mutate(new CampaignOperation[] {new CampaignOperation(Operator.ADD, null,
              null, campaign)});
      campaign = crv.getValue()[0];


      campaignTargetService.mutate(new CampaignTargetOperation[] {new CampaignTargetOperation(
          Operator.SET, null, new NetworkTargetList(campaign.getId(), null,
              new NetworkTarget[] {new NetworkTarget(null, NetworkCoverageType.GOOGLE_SEARCH)}))});

      NegativeCampaignCriterion negativeCampaignCriterion = new NegativeCampaignCriterion();
      negativeCampaignCriterion.setCampaignId(campaign.getId());
      negativeCampaignCriterion.setCriterion(new Placement(null, null, "http://example.com/"));

      CampaignCriterionOperation operation = new CampaignCriterionOperation();
      operation.setOperator(Operator.ADD);
      operation.setOperand(negativeCampaignCriterion);

      campaignCriterionService.mutate(new CampaignCriterionOperation[] {operation});

      int numAdGrp = generator.nextInt(6) + 1;
      for (int j = 0; j < numAdGrp; j++) {
        AdGroupPage adGroupPage =
            adGroupService.get(new AdGroupSelector(campaign.getId(), null, null, null));
        AdGroup[] adGroups = adGroupPage.getEntries();
        AdGroup adGroup = null;
        if (adGroups != null && j < adGroups.length) {
          adGroup = adGroups[j];
        } else {
          adGroup = new AdGroup();
          adGroup.setName("AdGroup " + (j + 1));
          adGroup.setBids(new ManualCPCAdGroupBids(null, new Bid(new Money("USD",
              generator.nextInt(10) * 50000L + 50000L)), null, null));
          adGroup.setCampaignId(campaign.getId());

          AdGroupReturnValue adGroupReturnValue =
              adGroupService.mutate(new AdGroupOperation[] {new AdGroupOperation(Operator.ADD,
View Full Code Here

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

    campaign.setStatus(CampaignStatus.PAUSED);

    // Create budget
    Budget budget = new Budget();
    budget.setPeriod(BudgetBudgetPeriod.DAILY);
    budget.setAmount(new Money(null, 50000000L));
    budget.setDeliveryMethod(BudgetBudgetDeliveryMethod.STANDARD);
    campaign.setBudget(budget);

    // Create operations.
    CampaignOperation operation = new CampaignOperation();
View Full Code Here

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

      List<AdGroupEstimateRequest> adGroupEstimateRequests =
          new ArrayList<AdGroupEstimateRequest>();
      AdGroupEstimateRequest adGroupEstimateRequest = new AdGroupEstimateRequest();
      adGroupEstimateRequest.setKeywordEstimateRequests(
          keywordEstimateRequests.toArray(new KeywordEstimateRequest[]{}));
      adGroupEstimateRequest.setMaxCpc(new Money(null, 1000000L));
      adGroupEstimateRequests.add(adGroupEstimateRequest);

      // Create campaign estimate requests.
      List<CampaignEstimateRequest> campaignEstimateRequests =
        new ArrayList<CampaignEstimateRequest>();
View Full Code Here

Examples of com.google.api.adwords.v201309.cm.Money

      List<AdGroupEstimateRequest> adGroupEstimateRequests =
          new ArrayList<AdGroupEstimateRequest>();
      AdGroupEstimateRequest adGroupEstimateRequest = new AdGroupEstimateRequest();
      adGroupEstimateRequest.setKeywordEstimateRequests(
          keywordEstimateRequests.toArray(new KeywordEstimateRequest[]{}));
      adGroupEstimateRequest.setMaxCpc(new Money(null, 1000000L));
      adGroupEstimateRequests.add(adGroupEstimateRequest);

      // Create campaign estimate requests.
      List<CampaignEstimateRequest> campaignEstimateRequests =
        new ArrayList<CampaignEstimateRequest>();
View Full Code Here

Examples of com.google.checkout.schema._2.Money

   * @param amount Numeric amount to charge the customer.
   * @param currency 3-letter ISO-4217 currency code: USD, JPY, GBP
   */
  public Document chargeOrder(String orderNumber, float amount, String currency)
      throws ProtocolException {
    Money money = createMoney(amount, currency);
    ChargeOrderRequest chargeReq = _objectFact.createChargeOrderRequest();
    chargeReq.setGoogleOrderNumber(orderNumber);
    chargeReq.setAmount(money);
    JAXBElement<ChargeOrderRequest> elem
        = _objectFact.createChargeOrder(chargeReq);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.