mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02:00
Modify create price custom logic to return FeesAndCredits
Previously DomainPricingCustomLogic#customizeCreatePrice takes in the create price itself and modifies it. Change it to take in the entire FeesAndCredits (previously named EppCommandOperations) which may contain other fees related to domain creation, such as EAP fees, and returns FeesAndCredits that may either change the fees or add new type of fees. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=141600614
This commit is contained in:
parent
a56a0677ba
commit
74d64f502e
7 changed files with 90 additions and 91 deletions
|
@ -52,7 +52,7 @@ import google.registry.flows.FlowModule.ClientId;
|
|||
import google.registry.flows.FlowModule.Superuser;
|
||||
import google.registry.flows.FlowModule.TargetId;
|
||||
import google.registry.flows.TransactionalFlow;
|
||||
import google.registry.flows.domain.DomainPricingLogic.EppCommandOperations;
|
||||
import google.registry.flows.domain.DomainPricingLogic.FeesAndCredits;
|
||||
import google.registry.model.ImmutableObject;
|
||||
import google.registry.model.billing.BillingEvent;
|
||||
import google.registry.model.billing.BillingEvent.Flag;
|
||||
|
@ -390,13 +390,12 @@ public class DomainAllocateFlow implements TransactionalFlow {
|
|||
|
||||
private ImmutableList<FeeTransformResponseExtension> createResponseExtensions(
|
||||
DateTime now, Registry registry, int years) throws EppException {
|
||||
EppCommandOperations commandOperations =
|
||||
pricingLogic.getCreatePrice(registry, targetId, now, years);
|
||||
FeesAndCredits feesAndCredits = pricingLogic.getCreatePrice(registry, targetId, now, years);
|
||||
FeeCreateCommandExtension feeCreate =
|
||||
eppInput.getSingleExtension(FeeCreateCommandExtension.class);
|
||||
return (feeCreate == null)
|
||||
? ImmutableList.<FeeTransformResponseExtension>of()
|
||||
: ImmutableList.of(createFeeCreateResponse(feeCreate, commandOperations));
|
||||
: ImmutableList.of(createFeeCreateResponse(feeCreate, feesAndCredits));
|
||||
}
|
||||
|
||||
/** Domain application with specific ROID does not exist. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue