mirror of
https://github.com/google/nomulus.git
synced 2025-06-27 23:03:34 +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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue