mirror of
https://github.com/google/nomulus
synced 2026-04-26 19:15:24 +00: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:
@@ -56,7 +56,7 @@ import google.registry.flows.EppException.ParameterValueSyntaxErrorException;
|
||||
import google.registry.flows.EppException.RequiredParameterMissingException;
|
||||
import google.registry.flows.EppException.StatusProhibitsOperationException;
|
||||
import google.registry.flows.EppException.UnimplementedOptionException;
|
||||
import google.registry.flows.domain.DomainPricingLogic.EppCommandOperations;
|
||||
import google.registry.flows.domain.DomainPricingLogic.FeesAndCredits;
|
||||
import google.registry.flows.exceptions.ResourceAlreadyExistsException;
|
||||
import google.registry.flows.exceptions.ResourceHasClientUpdateProhibitedException;
|
||||
import google.registry.model.EppResource;
|
||||
@@ -994,12 +994,12 @@ public class DomainFlowUtils {
|
||||
|
||||
/** Create a response extension listign the fees on a domain or application create. */
|
||||
static FeeTransformResponseExtension createFeeCreateResponse(
|
||||
FeeTransformCommandExtension feeCreate,
|
||||
EppCommandOperations commandOperations) {
|
||||
return feeCreate.createResponseBuilder()
|
||||
.setCurrency(commandOperations.getCurrency())
|
||||
.setFees(commandOperations.getFees())
|
||||
.setCredits(commandOperations.getCredits())
|
||||
FeeTransformCommandExtension feeCreate, FeesAndCredits feesAndCredits) {
|
||||
return feeCreate
|
||||
.createResponseBuilder()
|
||||
.setCurrency(feesAndCredits.getCurrency())
|
||||
.setFees(feesAndCredits.getFees())
|
||||
.setCredits(feesAndCredits.getCredits())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user