Examples of calculateBenefitFor()


Examples of rewards.internal.restaurant.Restaurant.calculateBenefitFor()

  // TODO 1: Add transactional annotation to identify this method as needing transactional behavior
  // TODO 3: Add non-default propagation level (don't do this until instructed)
  public RewardConfirmation rewardAccountFor(Dining dining) {
    Account account = accountRepository.findByCreditCard(dining.getCreditCardNumber());
    Restaurant restaurant = restaurantRepository.findByMerchantNumber(dining.getMerchantNumber());
    MonetaryAmount amount = restaurant.calculateBenefitFor(account, dining);
    AccountContribution contribution = account.makeContribution(amount);
    accountRepository.updateBeneficiaries(account);
    return rewardRepository.confirmReward(contribution, dining);
  }
}
View Full Code Here

Examples of rewards.internal.restaurant.Restaurant.calculateBenefitFor()

  }

  public RewardConfirmation rewardAccountFor(Dining dining) {
    Account account = accountRepository.findByCreditCard(dining.getCreditCardNumber());
    Restaurant restaurant = restaurantRepository.findByMerchantNumber(dining.getMerchantNumber());
    MonetaryAmount amount = restaurant.calculateBenefitFor(account, dining);
    AccountContribution contribution = account.makeContribution(amount);
    accountRepository.updateBeneficiaries(account);
    return rewardRepository.confirmReward(contribution, dining);
  }
}
View Full Code Here

Examples of rewards.internal.restaurant.Restaurant.calculateBenefitFor()

  }

  public RewardConfirmation rewardAccountFor(Dining dining) {
    Account account = accountRepository.findByCreditCard(dining.getCreditCardNumber());
    Restaurant restaurant = restaurantRepository.findByMerchantNumber(dining.getMerchantNumber());
    MonetaryAmount amount = restaurant.calculateBenefitFor(account, dining);
    AccountContribution contribution = account.makeContribution(amount);
    accountRepository.updateBeneficiaries(account);
    return rewardRepository.confirmReward(contribution, dining);
  }
}
View Full Code Here

Examples of rewards.internal.restaurant.Restaurant.calculateBenefitFor()

  public RewardConfirmation rewardAccountFor(Dining dining) {

    Account account = accountMapper.findByCreditCard(dining.getCreditCardNumber());
    Restaurant restaurant = restaurantMapper.findByMerchantNumber(dining.getMerchantNumber());
    MonetaryAmount amount = restaurant.calculateBenefitFor(account, dining);
    AccountContribution contribution = account.makeContribution(amount);
    updateBeneficiaries(account);
    return rewardRepository.confirmReward(contribution, dining);
  }
 
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.