Parent recurring billing events under separate HistoryEntries

To log autorenews, we currently run a mapreduce daily that creates synthetic
billing events for each recurring event past its due time. These are all
parented under the original recurring event, which allows these synthetic events to incorrectly stack on the original mutating entry.

We now explicitly create a new HistoryEntry of type DOMAIN_AUTORENEW to log
autorenews alongside other mutating EPP flows. These also parent DomainTransactionRecords for the NET_RENEWS_1_YEAR field, with the reporting time equal to the billing time (which accounts for the autorenew grace period).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166379700
This commit is contained in:
larryruili 2017-08-24 12:41:28 -07:00 committed by Ben McIlwain
parent a349893d3d
commit 7fb44e4f66
6 changed files with 216 additions and 230 deletions

View file

@ -54,6 +54,11 @@ public class HistoryEntry extends ImmutableObject implements Buildable {
DOMAIN_APPLICATION_DELETE,
DOMAIN_APPLICATION_UPDATE,
DOMAIN_APPLICATION_STATUS_UPDATE,
/**
* Used for domain registration autorenews explicitly logged by
* {@link google.registry.batch.ExpandRecurringBillingEventsAction}.
*/
DOMAIN_AUTORENEW,
DOMAIN_CREATE,
DOMAIN_DELETE,
DOMAIN_RENEW,