diff --git a/core/src/main/java/google/registry/model/pricing/StaticPremiumListPricingEngine.java b/core/src/main/java/google/registry/model/pricing/StaticPremiumListPricingEngine.java index ca69c6d03..e7bb93f96 100644 --- a/core/src/main/java/google/registry/model/pricing/StaticPremiumListPricingEngine.java +++ b/core/src/main/java/google/registry/model/pricing/StaticPremiumListPricingEngine.java @@ -42,7 +42,7 @@ public final class StaticPremiumListPricingEngine implements PremiumPricingEngin tld.getPremiumListName().flatMap(pl -> PremiumListDao.getPremiumPrice(pl, label)); return DomainPrices.create( premiumPrice.isPresent(), - premiumPrice.orElse(tld.getCreateBillingCost()), + premiumPrice.orElse(tld.getCreateBillingCost(priceTime)), premiumPrice.orElse(tld.getStandardRenewCost(priceTime))); } } diff --git a/core/src/main/java/google/registry/model/tld/Tld.java b/core/src/main/java/google/registry/model/tld/Tld.java index 015916789..d3be2d3de 100644 --- a/core/src/main/java/google/registry/model/tld/Tld.java +++ b/core/src/main/java/google/registry/model/tld/Tld.java @@ -74,7 +74,6 @@ import google.registry.tldconfig.idn.IdnTableEnum; import google.registry.util.Idn; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Optional; import java.util.Set; import java.util.function.Predicate; @@ -138,10 +137,7 @@ public class Tld extends ImmutableObject implements Buildable, UnsafeSerializabl try { String thisYaml = mapper.writeValueAsString(this); String otherYaml = mapper.writeValueAsString(tldToCompare); - // Since Jackson uses getters and not field values to construct the YAML representation, an - // explicit check of the createBillingCostTransitions is necessary since this field is - // auto-populated in the getter when the field is set to null. - return thisYaml.equals(otherYaml) && createBillingCostTransitionsEqual(tldToCompare); + return thisYaml.equals(otherYaml); } catch (JsonProcessingException e) { throw new RuntimeException(e); } @@ -465,6 +461,7 @@ public class Tld extends ImmutableObject implements Buildable, UnsafeSerializabl // TODO(sarahbot@): Remove this field and make createBillingCostTransitions not-null once all TLDs // are populated with a create cost transition map /** The per-year billing cost for registering a new domain name. */ + @Deprecated @Type(type = JodaMoneyType.TYPE_NAME) @Columns( columns = { @@ -473,11 +470,13 @@ public class Tld extends ImmutableObject implements Buildable, UnsafeSerializabl }) Money createBillingCost = DEFAULT_CREATE_BILLING_COST; - // TODO(sarahbot@): Make this field not null and add a default value once field is populated on - // all existing TLDs + // TODO(sarahbot@): Make this field not null in the database + // TODO(sarahbot@): Rename this field to createBillingCost once the old createBillingCost has been + // removed /** A property that transitions to different create billing costs at different times. */ @JsonDeserialize(using = TimedTransitionPropertyMoneyDeserializer.class) - TimedTransitionProperty createBillingCostTransitions; + TimedTransitionProperty createBillingCostTransitions = + TimedTransitionProperty.withInitialValue(DEFAULT_CREATE_BILLING_COST); /** The one-time billing cost for restoring a domain name from the redemption grace period. */ @Type(type = JodaMoneyType.TYPE_NAME) @@ -684,24 +683,20 @@ public class Tld extends ImmutableObject implements Buildable, UnsafeSerializabl * domain create. */ @VisibleForTesting + public Money getCreateBillingCost(DateTime now) { + return createBillingCostTransitions.getValueAtTime(now); + } + + // This getter is still necessary for the Jackson deserialization in the ConfigureTldCommand + // TODO(sarahbot@): Remove this getter once the deprecated createBillingCost field is removed from + // the schema + @Deprecated public Money getCreateBillingCost() { return createBillingCost; } public ImmutableSortedMap getCreateBillingCostTransitions() { - return Objects.requireNonNullElseGet( - createBillingCostTransitions, - () -> TimedTransitionProperty.withInitialValue(getCreateBillingCost())) - .toValueMap(); - } - - public boolean createBillingCostTransitionsEqual(Tld newTld) { - if (createBillingCostTransitions == null) { - return false; - } - return createBillingCostTransitions - .toValueMap() - .equals(newTld.getCreateBillingCostTransitions()); + return createBillingCostTransitions.toValueMap(); } /** @@ -1171,16 +1166,14 @@ public class Tld extends ImmutableObject implements Buildable, UnsafeSerializabl // and cloned it into a new builder, to block re-building a Tld in an invalid state. instance.tldStateTransitions.checkValidity(); // TODO(sarahbot@): Remove null check when createBillingCostTransitions field is made not-null - if (instance.createBillingCostTransitions != null) { - instance.createBillingCostTransitions.checkValidity(); - } + checkArgumentNotNull( + instance.getCreateBillingCostTransitions(), + "CreateBillingCostTransitions cannot be null"); + instance.createBillingCostTransitions.checkValidity(); instance.renewBillingCostTransitions.checkValidity(); instance.eapFeeSchedule.checkValidity(); // All costs must be in the expected currency. checkArgumentNotNull(instance.getCurrency(), "Currency must be set"); - checkArgument( - instance.getCreateBillingCost().getCurrencyUnit().equals(instance.currency), - "Create cost must be in the tld's currency"); checkArgument( instance.getRestoreBillingCost().getCurrencyUnit().equals(instance.currency), "Restore cost must be in the TLD's currency"); @@ -1195,6 +1188,9 @@ public class Tld extends ImmutableObject implements Buildable, UnsafeSerializabl checkArgument( instance.getRenewBillingCostTransitions().values().stream().allMatch(currencyCheck), "Renew cost must be in the TLD's currency"); + checkArgument( + instance.getCreateBillingCostTransitions().values().stream().allMatch(currencyCheck), + "Create cost must be in the TLD's currency"); checkArgument( instance.eapFeeSchedule.toValueMap().values().stream().allMatch(currencyCheck), "All EAP fees must be in the TLD's currency"); diff --git a/core/src/main/java/google/registry/tools/ConfigureTldCommand.java b/core/src/main/java/google/registry/tools/ConfigureTldCommand.java index c52add665..de4964bd5 100644 --- a/core/src/main/java/google/registry/tools/ConfigureTldCommand.java +++ b/core/src/main/java/google/registry/tools/ConfigureTldCommand.java @@ -25,11 +25,9 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.CharMatcher; import com.google.common.collect.ImmutableSet; -import com.google.common.collect.ImmutableSortedMap; import com.google.common.collect.Sets; import com.google.common.collect.Sets.SetView; import com.google.common.flogger.FluentLogger; -import google.registry.model.common.TimedTransitionProperty; import google.registry.model.tld.Tld; import google.registry.model.tld.label.PremiumList; import google.registry.model.tld.label.PremiumListDao; @@ -43,11 +41,9 @@ import java.nio.file.Path; import java.util.Arrays; import java.util.HashSet; import java.util.Map; -import java.util.Objects; import java.util.Optional; import java.util.Set; import java.util.stream.Collectors; -import java.util.stream.Stream; import javax.inject.Inject; import javax.inject.Named; import org.joda.money.CurrencyUnit; @@ -123,9 +119,7 @@ public class ConfigureTldCommand extends MutatingCommand { checkName(name, tldData); Tld oldTld = getTlds().contains(name) ? Tld.get(name) : null; - checkForMissingFields( - Stream.concat(tldData.keySet().stream(), Stream.of("createBillingCostTransitions")) - .collect(toImmutableSet())); + checkForMissingFields(tldData.keySet().stream().collect(toImmutableSet())); Tld newTld = mapper.readValue(inputFile.toFile(), Tld.class); if (oldTld != null) { oldTldInBreakGlass = oldTld.getBreakglassMode(); @@ -156,14 +150,6 @@ public class ConfigureTldCommand extends MutatingCommand { checkPremiumList(newTld); checkDnsWriters(newTld); checkCurrency(newTld); - // TODO(sarahbot@): Remove this once the createBillingCost field is removed - checkArgument( - Objects.equals( - TimedTransitionProperty.fromValueMap(newTld.getCreateBillingCostTransitions()) - .getValueAtTime(clock.nowUtc()), - newTld.getCreateBillingCost()), - "The createBillingCostTransitions map must have the same current cost as the" - + " createBillingCost field"); // bsaEnrollStartTime only exists in DB. Need to carry it over to the updated copy. See Tld.java // for more information. Optional bsaEnrollTime = @@ -259,9 +245,6 @@ public class ConfigureTldCommand extends MutatingCommand { private void checkCurrency(Tld newTld) { CurrencyUnit currencyUnit = newTld.getCurrency(); - checkArgument( - currencyUnit.equals(newTld.getCreateBillingCost().getCurrencyUnit()), - "createBillingCost must use the same currency as the TLD"); checkArgument( currencyUnit.equals(newTld.getRestoreBillingCost().getCurrencyUnit()), "restoreBillingCost must use the same currency as the TLD"); @@ -271,19 +254,38 @@ public class ConfigureTldCommand extends MutatingCommand { checkArgument( currencyUnit.equals(newTld.getRegistryLockOrUnlockBillingCost().getCurrencyUnit()), "registryLockOrUnlockBillingCost must use the same currency as the TLD"); - ImmutableSortedMap renewBillingCostTransitions = - newTld.getRenewBillingCostTransitions(); - for (Money renewBillingCost : renewBillingCostTransitions.values()) { - checkArgument( - renewBillingCost.getCurrencyUnit().equals(currencyUnit), - "All Money values in the renewBillingCostTransitions map must use the TLD's currency" - + " unit"); - } - ImmutableSortedMap eapFeeSchedule = newTld.getEapFeeScheduleAsMap(); - for (Money eapFee : eapFeeSchedule.values()) { - checkArgument( - eapFee.getCurrencyUnit().equals(currencyUnit), - "All Money values in the eapFeeSchedule map must use the TLD's currency unit"); - } + ImmutableSet currencies = + newTld.getRenewBillingCostTransitions().values().stream() + .map(Money::getCurrencyUnit) + .distinct() + .collect(toImmutableSet()); + checkArgument( + currencies.size() == 1 && currencies.contains(currencyUnit), + "All Money values in the renewBillingCostTransitions map must use the TLD's currency unit" + + " %s. Found %s currency unit(s) in the renewBillingCostTransitionsMap", + currencyUnit, + currencies); + ImmutableSet createCurrencies = + newTld.getCreateBillingCostTransitions().values().stream() + .map(Money::getCurrencyUnit) + .distinct() + .collect(toImmutableSet()); + checkArgument( + createCurrencies.size() == 1 && createCurrencies.contains(currencyUnit), + "All Money values in the createBillingCostTransitions map must use the TLD's currency unit" + + " %s. Found %s currency unit(s) in the createBillingCostTransitionsMap", + currencyUnit, + createCurrencies); + ImmutableSet eapCurrencies = + newTld.getEapFeeScheduleAsMap().values().stream() + .map(Money::getCurrencyUnit) + .distinct() + .collect(toImmutableSet()); + checkArgument( + eapCurrencies.size() == 1 && eapCurrencies.contains(currencyUnit), + "All Money values in the eapFeeSchedule map must use the TLD's currency unit" + + " %s. Found %s currency unit(s) in the eapFeeSchedule", + currencyUnit, + eapCurrencies); } } diff --git a/core/src/test/java/google/registry/flows/domain/DomainCheckFlowTest.java b/core/src/test/java/google/registry/flows/domain/DomainCheckFlowTest.java index f1fe0fd97..332054ea0 100644 --- a/core/src/test/java/google/registry/flows/domain/DomainCheckFlowTest.java +++ b/core/src/test/java/google/registry/flows/domain/DomainCheckFlowTest.java @@ -751,7 +751,8 @@ class DomainCheckFlowTest extends ResourceCheckFlowTestCase { .asBuilder() .setTldType(tldType) .setCurrency(CHF) - .setCreateBillingCost(Money.ofMajor(CHF, 800)) + .setCreateBillingCostTransitions( + ImmutableSortedMap.of(START_OF_TIME, Money.ofMajor(CHF, 800))) .setEapFeeSchedule(ImmutableSortedMap.of(START_OF_TIME, Money.ofMajor(CHF, 800))) .setRenewBillingCostTransitions( ImmutableSortedMap.of(START_OF_TIME, Money.ofMajor(CHF, 800))) diff --git a/core/src/test/java/google/registry/flows/domain/DomainRenewFlowTest.java b/core/src/test/java/google/registry/flows/domain/DomainRenewFlowTest.java index 343d17318..92087cd1c 100644 --- a/core/src/test/java/google/registry/flows/domain/DomainRenewFlowTest.java +++ b/core/src/test/java/google/registry/flows/domain/DomainRenewFlowTest.java @@ -1033,7 +1033,8 @@ class DomainRenewFlowTest extends ResourceFlowTestCase Tld.get("tld") .asBuilder() .setCurrency(EUR) - .setCreateBillingCost(Money.of(EUR, 13)) + .setCreateBillingCostTransitions( + ImmutableSortedMap.of(START_OF_TIME, Money.of(EUR, 13))) .setRestoreBillingCost(Money.of(EUR, 11)) .setRenewBillingCostTransitions(ImmutableSortedMap.of(START_OF_TIME, Money.of(EUR, 7))) .setEapFeeSchedule(ImmutableSortedMap.of(START_OF_TIME, Money.zero(EUR))) @@ -1052,7 +1053,8 @@ class DomainRenewFlowTest extends ResourceFlowTestCase Tld.get("tld") .asBuilder() .setCurrency(EUR) - .setCreateBillingCost(Money.of(EUR, 13)) + .setCreateBillingCostTransitions( + ImmutableSortedMap.of(START_OF_TIME, Money.of(EUR, 13))) .setRestoreBillingCost(Money.of(EUR, 11)) .setRenewBillingCostTransitions(ImmutableSortedMap.of(START_OF_TIME, Money.of(EUR, 7))) .setEapFeeSchedule(ImmutableSortedMap.of(START_OF_TIME, Money.zero(EUR))) @@ -1071,7 +1073,8 @@ class DomainRenewFlowTest extends ResourceFlowTestCase Tld.get("tld") .asBuilder() .setCurrency(EUR) - .setCreateBillingCost(Money.of(EUR, 13)) + .setCreateBillingCostTransitions( + ImmutableSortedMap.of(START_OF_TIME, Money.of(EUR, 13))) .setRestoreBillingCost(Money.of(EUR, 11)) .setRenewBillingCostTransitions(ImmutableSortedMap.of(START_OF_TIME, Money.of(EUR, 7))) .setEapFeeSchedule(ImmutableSortedMap.of(START_OF_TIME, Money.zero(EUR))) @@ -1114,7 +1117,8 @@ class DomainRenewFlowTest extends ResourceFlowTestCase Tld.get("tld") .asBuilder() .setCurrency(JPY) - .setCreateBillingCost(Money.ofMajor(JPY, 800)) + .setCreateBillingCostTransitions( + ImmutableSortedMap.of(START_OF_TIME, Money.ofMajor(JPY, 800))) .setEapFeeSchedule(ImmutableSortedMap.of(START_OF_TIME, Money.ofMajor(JPY, 800))) .setRenewBillingCostTransitions( ImmutableSortedMap.of(START_OF_TIME, Money.ofMajor(JPY, 800))) diff --git a/core/src/test/java/google/registry/flows/domain/DomainRestoreRequestFlowTest.java b/core/src/test/java/google/registry/flows/domain/DomainRestoreRequestFlowTest.java index b38c0d86b..ff058b73a 100644 --- a/core/src/test/java/google/registry/flows/domain/DomainRestoreRequestFlowTest.java +++ b/core/src/test/java/google/registry/flows/domain/DomainRestoreRequestFlowTest.java @@ -559,7 +559,8 @@ class DomainRestoreRequestFlowTest extends ResourceFlowTestCase createCostTransitions = @@ -246,6 +238,10 @@ public final class TldTest extends EntityTestCase { Tld registry = Tld.get("tld").asBuilder().setCreateBillingCostTransitions(createCostTransitions).build(); assertThat(registry.getCreateBillingCostTransitions()).isEqualTo(createCostTransitions); + assertThat(registry.getCreateBillingCost(fakeClock.nowUtc().minus(Duration.standardDays(5)))) + .isEqualTo(Money.of(USD, 8)); + assertThat(registry.getCreateBillingCost(fakeClock.nowUtc().plusMonths(8))) + .isEqualTo(Money.of(USD, 3)); } @Test @@ -275,7 +271,7 @@ public final class TldTest extends EntityTestCase { void testSettingRestoreBillingCost() { Tld registry = Tld.get("tld").asBuilder().setRestoreBillingCost(Money.of(USD, 42)).build(); // The default value of 13 is set in createTld(). - assertThat(registry.getCreateBillingCost()).isEqualTo(Money.of(USD, 13)); + assertThat(registry.getCreateBillingCost(fakeClock.nowUtc())).isEqualTo(Money.of(USD, 13)); assertThat(registry.getRestoreBillingCost()).isEqualTo(Money.of(USD, 42)); } @@ -595,7 +591,13 @@ public final class TldTest extends EntityTestCase { void testFailure_pricingEngineIsRequired() { IllegalArgumentException thrown = assertThrows( - IllegalArgumentException.class, () -> new Tld.Builder().setTldStr("invalid").build()); + IllegalArgumentException.class, + () -> + new Tld.Builder() + .setCreateBillingCostTransitions( + ImmutableSortedMap.of(START_OF_TIME, Money.of(USD, 13))) + .setTldStr("invalid") + .build()); assertThat(thrown) .hasMessageThat() .contains("All registries must have a configured pricing engine"); @@ -680,8 +682,13 @@ public final class TldTest extends EntityTestCase { IllegalArgumentException thrown = assertThrows( IllegalArgumentException.class, - () -> Tld.get("tld").asBuilder().setCreateBillingCost(Money.of(EUR, 42)).build()); - assertThat(thrown).hasMessageThat().contains("cost must be in the tld's currency"); + () -> + Tld.get("tld") + .asBuilder() + .setCreateBillingCostTransitions( + ImmutableSortedMap.of(START_OF_TIME, Money.of(EUR, 42))) + .build()); + assertThat(thrown).hasMessageThat().contains("cost must be in the TLD's currency"); } @Test diff --git a/core/src/test/java/google/registry/testing/DatabaseHelper.java b/core/src/test/java/google/registry/testing/DatabaseHelper.java index d4c2c2720..fffc19746 100644 --- a/core/src/test/java/google/registry/testing/DatabaseHelper.java +++ b/core/src/test/java/google/registry/testing/DatabaseHelper.java @@ -244,6 +244,7 @@ public final class DatabaseHelper { .setRenewBillingCostTransitions(ImmutableSortedMap.of(START_OF_TIME, Money.of(USD, 11))) .setEapFeeSchedule(ImmutableSortedMap.of(START_OF_TIME, Money.zero(USD))) .setCreateBillingCost(Money.of(USD, 13)) + .setCreateBillingCostTransitions(ImmutableSortedMap.of(START_OF_TIME, Money.of(USD, 13))) .setRestoreBillingCost(Money.of(USD, 17)) .setServerStatusChangeBillingCost(Money.of(USD, 19)) // Always set a default premium list. Tests that don't want it can delete it. diff --git a/core/src/test/java/google/registry/tools/ConfigureTldCommandTest.java b/core/src/test/java/google/registry/tools/ConfigureTldCommandTest.java index cdf0e4c92..26b335b93 100644 --- a/core/src/test/java/google/registry/tools/ConfigureTldCommandTest.java +++ b/core/src/test/java/google/registry/tools/ConfigureTldCommandTest.java @@ -89,7 +89,7 @@ public class ConfigureTldCommandTest extends CommandTestCase runCommandForced("--input=" + tldFile)); - assertThat(thrown.getMessage()) - .isEqualTo( - "The createBillingCostTransitions map must have the same current cost as the" - + " createBillingCost field"); - } - @Test void testFailure_fileMissingNullableFieldsOnCreate() throws Exception { File tldFile = tmpDir.resolve("missingnullablefields.yaml").toFile(); @@ -296,7 +266,7 @@ public class ConfigureTldCommandTest extends CommandTestCase newTld("foo", "FOO") .asBuilder() .setCurrency(JPY) - .setCreateBillingCost(Money.of(JPY, new BigDecimal(1300))) + .setCreateBillingCostTransitions( + ImmutableSortedMap.of(START_OF_TIME, Money.of(JPY, new BigDecimal(1300)))) .setRestoreBillingCost(Money.of(JPY, new BigDecimal(1700))) .setServerStatusChangeBillingCost(Money.of(JPY, new BigDecimal(1900))) .setRegistryLockOrUnlockBillingCost(Money.of(JPY, new BigDecimal(2700))) diff --git a/core/src/test/java/google/registry/tools/UpdateRegistrarCommandTest.java b/core/src/test/java/google/registry/tools/UpdateRegistrarCommandTest.java index 281be4168..bb9036988 100644 --- a/core/src/test/java/google/registry/tools/UpdateRegistrarCommandTest.java +++ b/core/src/test/java/google/registry/tools/UpdateRegistrarCommandTest.java @@ -449,7 +449,8 @@ class UpdateRegistrarCommandTest extends CommandTestCase newTld("foo", "FOO") .asBuilder() .setCurrency(JPY) - .setCreateBillingCost(Money.of(JPY, new BigDecimal(1300))) + .setCreateBillingCostTransitions( + ImmutableSortedMap.of(START_OF_TIME, Money.of(JPY, new BigDecimal(1300)))) .setRestoreBillingCost(Money.of(JPY, new BigDecimal(1700))) .setServerStatusChangeBillingCost(Money.of(JPY, new BigDecimal(1900))) .setRegistryLockOrUnlockBillingCost(Money.of(JPY, new BigDecimal(2700))) diff --git a/core/src/test/resources/google/registry/tools/badidn.yaml b/core/src/test/resources/google/registry/tools/badidn.yaml index db173661b..1dd743a33 100644 --- a/core/src/test/resources/google/registry/tools/badidn.yaml +++ b/core/src/test/resources/google/registry/tools/badidn.yaml @@ -8,6 +8,10 @@ claimsPeriodEnd: "294247-01-10T04:00:54.775Z" createBillingCost: currency: "USD" amount: 25.00 +createBillingCostTransitions: + "1970-01-01T00:00:00.000Z": + currency: "USD" + amount: 25.00 creationTime: "2022-09-01T00:00:00.000Z" currency: "USD" defaultPromoTokens: [] diff --git a/core/src/test/resources/google/registry/tools/extrafield.yaml b/core/src/test/resources/google/registry/tools/extrafield.yaml index fb945c786..6339723cb 100644 --- a/core/src/test/resources/google/registry/tools/extrafield.yaml +++ b/core/src/test/resources/google/registry/tools/extrafield.yaml @@ -8,6 +8,10 @@ claimsPeriodEnd: "294247-01-10T04:00:54.775Z" createBillingCost: currency: "USD" amount: 25.00 +createBillingCostTransitions: + "1970-01-01T00:00:00.000Z": + currency: "USD" + amount: 25.00 creationTime: "2022-09-01T00:00:00.000Z" currency: "USD" defaultPromoTokens: [] diff --git a/core/src/test/resources/google/registry/tools/missingnullablefields.yaml b/core/src/test/resources/google/registry/tools/missingnullablefields.yaml index 73a825af7..57f37dbbf 100644 --- a/core/src/test/resources/google/registry/tools/missingnullablefields.yaml +++ b/core/src/test/resources/google/registry/tools/missingnullablefields.yaml @@ -8,6 +8,10 @@ claimsPeriodEnd: "294247-01-10T04:00:54.775Z" createBillingCost: currency: "USD" amount: 25.00 +createBillingCostTransitions: + "1970-01-01T00:00:00.000Z": + currency: "USD" + amount: 25.00 creationTime: "2022-09-01T00:00:00.000Z" defaultPromoTokens: [] dnsAPlusAaaaTtl: null diff --git a/core/src/test/resources/google/registry/tools/nocreatecostmap.yaml b/core/src/test/resources/google/registry/tools/nocreatecostmap.yaml index bede718d8..5108a9c9e 100644 --- a/core/src/test/resources/google/registry/tools/nocreatecostmap.yaml +++ b/core/src/test/resources/google/registry/tools/nocreatecostmap.yaml @@ -8,6 +8,10 @@ claimsPeriodEnd: "294247-01-10T04:00:54.775Z" createBillingCost: currency: "USD" amount: 25.00 +createBillingCostTransitions: + "1970-01-01T00:00:00.000Z": + currency: "USD" + amount: 25.00 creationTime: "2022-09-01T00:00:00.000Z" currency: "USD" defaultPromoTokens: [] diff --git a/core/src/test/resources/google/registry/tools/nullablefieldsallnull.yaml b/core/src/test/resources/google/registry/tools/nullablefieldsallnull.yaml index 675aad65f..848cc21ce 100644 --- a/core/src/test/resources/google/registry/tools/nullablefieldsallnull.yaml +++ b/core/src/test/resources/google/registry/tools/nullablefieldsallnull.yaml @@ -30,6 +30,10 @@ currency: "USD" createBillingCost: currency: "USD" amount: 25.00 +createBillingCostTransitions: + "1970-01-01T00:00:00.000Z": + currency: "USD" + amount: 25.00 restoreBillingCost: currency: "USD" amount: 17.00 diff --git a/core/src/test/resources/google/registry/tools/outoforderfields.yaml b/core/src/test/resources/google/registry/tools/outoforderfields.yaml index e7e505154..732a2cd2c 100644 --- a/core/src/test/resources/google/registry/tools/outoforderfields.yaml +++ b/core/src/test/resources/google/registry/tools/outoforderfields.yaml @@ -53,3 +53,7 @@ eapFeeSchedule: "1970-01-01T00:00:00.000Z": currency: "USD" amount: 0.00 +createBillingCostTransitions: + "1970-01-01T00:00:00.000Z": + currency: "USD" + amount: 25.00 diff --git a/core/src/test/resources/google/registry/tools/wrongcurrency.yaml b/core/src/test/resources/google/registry/tools/wrongcurrency.yaml index 02c1a1fc1..f9c5eb601 100644 --- a/core/src/test/resources/google/registry/tools/wrongcurrency.yaml +++ b/core/src/test/resources/google/registry/tools/wrongcurrency.yaml @@ -30,6 +30,10 @@ currency: "USD" createBillingCost: currency: "USD" amount: 25.00 +createBillingCostTransitions: + "1970-01-01T00:00:00.000Z": + currency: "USD" + amount: 25.00 restoreBillingCost: currency: %RESTORECURRENCY% amount: 70.00