mirror of
https://github.com/google/nomulus
synced 2026-05-21 23:31:51 +00:00
Change RESTORE BillingEvents to have 1-year periods
This simplifies calculating the overall invoice by giving RESTORE fees a period equal to the period of the associated RENEW (1 year). Older BillingEvents will not be backfilled, and will have periodYears = null. Invoicing and business both agree this is a valid representation, since RESTORE fees are intrinsically tied to the 1-year RENEW it's associated with. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=188041777
This commit is contained in:
@@ -239,7 +239,6 @@ public final class DomainRestoreRequestFlow implements TransactionalFlow {
|
||||
private OneTime createRenewBillingEvent(
|
||||
HistoryEntry historyEntry, Money renewCost, DateTime now) {
|
||||
return prepareBillingEvent(historyEntry, renewCost, now)
|
||||
.setPeriodYears(1)
|
||||
.setReason(Reason.RENEW)
|
||||
.build();
|
||||
}
|
||||
@@ -257,6 +256,7 @@ public final class DomainRestoreRequestFlow implements TransactionalFlow {
|
||||
.setClientId(clientId)
|
||||
.setEventTime(now)
|
||||
.setBillingTime(now)
|
||||
.setPeriodYears(1)
|
||||
.setCost(cost)
|
||||
.setParent(historyEntry);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user