diff --git a/java/google/registry/flows/domain/DomainFlowUtils.java b/java/google/registry/flows/domain/DomainFlowUtils.java index 8adf4643e..9458657e4 100644 --- a/java/google/registry/flows/domain/DomainFlowUtils.java +++ b/java/google/registry/flows/domain/DomainFlowUtils.java @@ -590,8 +590,9 @@ public class DomainFlowUtils { if (isReserved(domain, isSunrise)) { // Don't return a create price for reserved names. builder.setClass("reserved"); // Override whatever class we've set above. } else { - builder.setFee( - Fee.create(prices.getCreateCost().multipliedBy(years).getAmount(), "create")); + builder.setFees( + ImmutableList.of( + Fee.create(prices.getCreateCost().multipliedBy(years).getAmount(), "create"))); } break; case RESTORE: @@ -599,13 +600,16 @@ public class DomainFlowUtils { throw new RestoresAreAlwaysForOneYearException(); } // Restores have a "renew" and a "restore" fee. - builder.setFee( - Fee.create(prices.getRenewCost().multipliedBy(years).getAmount(), "renew"), - Fee.create(registry.getStandardRestoreCost().getAmount(), "restore")); + builder.setFees( + ImmutableList.of( + Fee.create(prices.getRenewCost().multipliedBy(years).getAmount(), "renew"), + Fee.create(registry.getStandardRestoreCost().getAmount(), "restore"))); break; default: // Anything else (transfer|renew) will have a "renew" fee. - builder.setFee(Fee.create(prices.getRenewCost().multipliedBy(years).getAmount(), "renew")); + builder.setFees( + ImmutableList.of( + Fee.create(prices.getRenewCost().multipliedBy(years).getAmount(), "renew"))); } } diff --git a/java/google/registry/model/domain/fee/BaseFeeResponse.java b/java/google/registry/model/domain/fee/BaseFeeResponse.java index 777b6e1b2..868b1cf20 100644 --- a/java/google/registry/model/domain/fee/BaseFeeResponse.java +++ b/java/google/registry/model/domain/fee/BaseFeeResponse.java @@ -78,13 +78,8 @@ public class BaseFeeResponse extends ImmutableObject { return thisCastToDerived(); } - public B setFee(Fee... fee) { + public B setFees(List fees) { // If there are no fees, set the field to null to suppress the 'fee' section in the xml. - getInstance().fee = forceEmptyToNull(ImmutableList.copyOf(fee)); - return thisCastToDerived(); - } - - public B setFee(List fees) { getInstance().fee = forceEmptyToNull(ImmutableList.copyOf(fees)); return thisCastToDerived(); }