mirror of
https://github.com/google/nomulus.git
synced 2025-08-06 01:35:17 +02:00
Change EAP fee billing event reason to EARLY_ACCESS
The reason field is 1:1 mapped to skus in billing reports. Need to add a new reason for EAP for this type of billing event for reporting to work correctly. Also map that reason to the correct SKU. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=134005364
This commit is contained in:
parent
414781e79b
commit
add9474e9a
4 changed files with 16 additions and 20 deletions
|
@ -217,20 +217,15 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
|
|||
|
||||
// If EAP is applied, a billing event for EAP should be present.
|
||||
if (!eapFee.isZero()) {
|
||||
ImmutableSet<BillingEvent.Flag> eapFlags =
|
||||
isAnchorTenant
|
||||
? ImmutableSet.of(BillingEvent.Flag.ANCHOR_TENANT, BillingEvent.Flag.EAP)
|
||||
: ImmutableSet.of(BillingEvent.Flag.EAP);
|
||||
BillingEvent.OneTime eapBillingEvent =
|
||||
new BillingEvent.OneTime.Builder()
|
||||
.setReason(Reason.CREATE)
|
||||
.setReason(Reason.FEE_EARLY_ACCESS)
|
||||
.setTargetId(getUniqueIdFromCommand())
|
||||
.setClientId("TheRegistrar")
|
||||
.setCost(eapFee)
|
||||
.setPeriodYears(2)
|
||||
.setEventTime(clock.nowUtc())
|
||||
.setBillingTime(billingTime)
|
||||
.setFlags(eapFlags)
|
||||
.setFlags(billingFlags)
|
||||
.setParent(historyEntry)
|
||||
.build();
|
||||
billingEvents = ImmutableSet.<BillingEvent>builder()
|
||||
|
|
|
@ -24,7 +24,6 @@ enum google.registry.model.billing.BillingEvent$Flag {
|
|||
ALLOCATION;
|
||||
ANCHOR_TENANT;
|
||||
AUTO_RENEW;
|
||||
EAP;
|
||||
LANDRUSH;
|
||||
SUNRISE;
|
||||
SYNTHETIC;
|
||||
|
@ -59,6 +58,7 @@ enum google.registry.model.billing.BillingEvent$Reason {
|
|||
AUTO_RENEW;
|
||||
CREATE;
|
||||
ERROR;
|
||||
FEE_EARLY_ACCESS;
|
||||
RENEW;
|
||||
RESTORE;
|
||||
SERVER_STATUS;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue