Add additional return values to PricingEngine interface

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=123658519
This commit is contained in:
mcilwain 2016-05-31 10:47:02 -07:00 committed by Ben McIlwain
parent ca585dd0b5
commit 91f6c7006e
21 changed files with 191 additions and 191 deletions

View file

@ -72,20 +72,18 @@ public class DomainTransferApproveFlow extends
String tld = existingResource.getTld();
int extraYears = transferData.getExtendedRegistrationYears();
// Bill for the transfer.
BillingEvent.OneTime billingEvent = new BillingEvent.OneTime.Builder()
.setReason(Reason.TRANSFER)
.setTargetId(targetId)
.setClientId(gainingClientId)
.setPeriodYears(extraYears)
.setCost(getDomainRenewCost(
targetId,
transferData.getTransferRequestTime(),
transferData.getGainingClientId(),
extraYears))
.setEventTime(now)
.setBillingTime(now.plus(Registry.get(tld).getTransferGracePeriodLength()))
.setParent(historyEntry)
.build();
BillingEvent.OneTime billingEvent =
new BillingEvent.OneTime.Builder()
.setReason(Reason.TRANSFER)
.setTargetId(targetId)
.setClientId(gainingClientId)
.setPeriodYears(extraYears)
.setCost(
getDomainRenewCost(targetId, transferData.getTransferRequestTime(), extraYears))
.setEventTime(now)
.setBillingTime(now.plus(Registry.get(tld).getTransferGracePeriodLength()))
.setParent(historyEntry)
.build();
ofy().save().entity(billingEvent);
// If we are within an autorenew grace period, cancel the autorenew billing event and reduce
// the number of years to extend the registration by one.