mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 00:17:20 +02:00
Create a separate billing event when EAP is applied
When EAP is involed we current have one billing event for domain create that has the create fee and EAP fee lumped together. Change it to record two separate billing events for each. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=132335349
This commit is contained in:
parent
969d9483ae
commit
6641f105b7
12 changed files with 196 additions and 72 deletions
|
@ -38,6 +38,7 @@ import google.registry.model.billing.BillingEvent;
|
|||
import google.registry.model.billing.BillingEvent.Reason;
|
||||
import google.registry.model.domain.DomainCommand.Update;
|
||||
import google.registry.model.domain.DomainResource;
|
||||
import google.registry.model.domain.fee.BaseFee.FeeType;
|
||||
import google.registry.model.domain.fee.Fee;
|
||||
import google.registry.model.domain.fee.FeeTransformCommandExtension;
|
||||
import google.registry.model.domain.rgp.GracePeriodStatus;
|
||||
|
@ -187,13 +188,17 @@ public class DomainRestoreRequestFlow extends OwnedResourceMutateFlow<DomainReso
|
|||
return createOutput(
|
||||
Success,
|
||||
null,
|
||||
(feeUpdate == null) ? null : ImmutableList.of(
|
||||
feeUpdate.createResponseBuilder()
|
||||
.setCurrency(restoreCost.getCurrencyUnit())
|
||||
.setFees(ImmutableList.of(
|
||||
Fee.create(restoreCost.getAmount(), "restore"),
|
||||
Fee.create(renewCost.getAmount(), "renew")))
|
||||
.build()));
|
||||
(feeUpdate == null)
|
||||
? null
|
||||
: ImmutableList.of(
|
||||
feeUpdate
|
||||
.createResponseBuilder()
|
||||
.setCurrency(restoreCost.getCurrencyUnit())
|
||||
.setFees(
|
||||
ImmutableList.of(
|
||||
Fee.create(restoreCost.getAmount(), FeeType.RESTORE),
|
||||
Fee.create(renewCost.getAmount(), FeeType.RENEW)))
|
||||
.build()));
|
||||
}
|
||||
|
||||
/** Restore command cannot have other changes specified. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue