Always require acknowledgment of premium fees

This removes the configuration ability on both Registry and Registrar entities
to allow operations on premium domains to succeed without acking the fees using
the fee extension. We only ever used this ability during the minna launch, and
it was a fiasco. We have no intention of ever allowing creation, renewal,
transfer, restoring, etc. of premium domains without acking the fees ever again,
and haven't done so since 2013, so removing this ability allows us to simplify
our code, data model, and tests.

Note that all TLDs in our production system currently require price ACKing
anyway, so from an external partner perspective this commit is a noop.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=229423650
This commit is contained in:
mcilwain 2019-01-15 12:56:32 -08:00 committed by jianglai
parent 3e0eaecc9b
commit 37aa1d1815
33 changed files with 81 additions and 257 deletions

View file

@ -290,7 +290,7 @@ public class DomainCreateFlow implements TransactionalFlow {
eppInput.getSingleExtension(FeeCreateCommandExtension.class);
FeesAndCredits feesAndCredits =
pricingLogic.getCreatePrice(registry, targetId, now, years, isAnchorTenant);
validateFeeChallenge(targetId, registry.getTldStr(), clientId, now, feeCreate, feesAndCredits);
validateFeeChallenge(targetId, now, feeCreate, feesAndCredits);
Optional<SecDnsCreateExtension> secDnsCreate =
validateSecDnsExtension(eppInput.getSingleExtension(SecDnsCreateExtension.class));
String repoId = createDomainRepoId(ObjectifyService.allocateId(), registry.getTldStr());

View file

@ -672,18 +672,11 @@ public class DomainFlowUtils {
*/
public static void validateFeeChallenge(
String domainName,
String tld,
String clientId,
DateTime priceTime,
final Optional<? extends FeeTransformCommandExtension> feeCommand,
FeesAndCredits feesAndCredits)
throws EppException {
Registry registry = Registry.get(tld);
Registrar registrar = Registrar.loadByClientIdCached(clientId).get();
boolean premiumAckRequired =
registry.getPremiumPriceAckRequired() || registrar.getPremiumPriceAckRequired();
if (premiumAckRequired && isDomainPremium(domainName, priceTime) && !feeCommand.isPresent()) {
if (isDomainPremium(domainName, priceTime) && !feeCommand.isPresent()) {
throw new FeesRequiredForPremiumNameException();
}
validateFeesAckedIfPresent(feeCommand, feesAndCredits);

View file

@ -149,8 +149,7 @@ public final class DomainRenewFlow implements TransactionalFlow {
eppInput.getSingleExtension(FeeRenewCommandExtension.class);
FeesAndCredits feesAndCredits =
pricingLogic.getRenewPrice(Registry.get(existingDomain.getTld()), targetId, now, years);
validateFeeChallenge(
targetId, existingDomain.getTld(), clientId, now, feeRenew, feesAndCredits);
validateFeeChallenge(targetId, now, feeRenew, feesAndCredits);
flowCustomLogic.afterValidation(
AfterValidationParameters.newBuilder()
.setExistingDomain(existingDomain)

View file

@ -208,8 +208,7 @@ public final class DomainRestoreRequestFlow implements TransactionalFlow {
if (!existingDomain.getGracePeriodStatuses().contains(GracePeriodStatus.REDEMPTION)) {
throw new DomainNotEligibleForRestoreException();
}
validateFeeChallenge(
targetId, existingDomain.getTld(), clientId, now, feeUpdate, feesAndCredits);
validateFeeChallenge(targetId, now, feeUpdate, feesAndCredits);
}
private ImmutableSet<BillingEvent.OneTime> createRestoreAndRenewBillingEvents(

View file

@ -167,7 +167,7 @@ public final class DomainTransferRequestFlow implements TransactionalFlow {
? Optional.empty()
: Optional.of(pricingLogic.getTransferPrice(registry, targetId, now));
if (feesAndCredits.isPresent()) {
validateFeeChallenge(targetId, tld, gainingClientId, now, feeTransfer, feesAndCredits.get());
validateFeeChallenge(targetId, now, feeTransfer, feesAndCredits.get());
}
HistoryEntry historyEntry = buildHistoryEntry(existingDomain, registry, now, period);
DateTime automaticTransferTime =

View file

@ -394,13 +394,6 @@ public class Registrar extends ImmutableObject implements Buildable, Jsonifiable
*/
boolean contactsRequireSyncing = true;
/** Whether the registrar must acknowledge the price to register non-standard-priced domains. */
boolean premiumPriceAckRequired;
public boolean getPremiumPriceAckRequired() {
return premiumPriceAckRequired;
}
@NonFinalForTesting
private static Supplier<byte[]> saltSupplier =
() -> {
@ -593,7 +586,6 @@ public class Registrar extends ImmutableObject implements Buildable, Jsonifiable
.put("emailAddress", emailAddress)
.put("whoisServer", getWhoisServer())
.put("blockPremiumNames", blockPremiumNames)
.put("premiumPriceAckRequired", premiumPriceAckRequired)
.put("url", url)
.put("icannReferralEmail", getIcannReferralEmail())
.put("driveFolderId", driveFolderId)
@ -866,11 +858,6 @@ public class Registrar extends ImmutableObject implements Buildable, Jsonifiable
return this;
}
public Builder setPremiumPriceAckRequired(boolean premiumPriceAckRequired) {
getInstance().premiumPriceAckRequired = premiumPriceAckRequired;
return this;
}
/** Build the registrar, nullifying empty fields. */
@Override
public Registrar build() {

View file

@ -334,9 +334,6 @@ public class Registry extends ImmutableObject implements Buildable {
/** Whether the pull queue that writes to authoritative DNS is paused for this TLD. */
boolean dnsPaused = DEFAULT_DNS_PAUSED;
/** Whether the price must be acknowledged to register premium names on this TLD. */
boolean premiumPriceAckRequired = true;
/**
* Whether only domains with {@link ReservationType#NAMESERVER_RESTRICTED} reservation type in a
* reserved list can be registered on this TLD.
@ -462,10 +459,6 @@ public class Registry extends ImmutableObject implements Buildable {
return driveFolderId;
}
public boolean getPremiumPriceAckRequired() {
return premiumPriceAckRequired;
}
/**
* Returns true if only domains with nameserver restricted reservation on this TLD can be created.
*/
@ -658,11 +651,6 @@ public class Registry extends ImmutableObject implements Buildable {
return this;
}
public Builder setPremiumPriceAckRequired(boolean premiumPriceAckRequired) {
getInstance().premiumPriceAckRequired = premiumPriceAckRequired;
return this;
}
public Builder setDomainCreateRestricted(boolean domainCreateRestricted) {
getInstance().domainCreateRestricted = domainCreateRestricted;
return this;

View file

@ -259,13 +259,6 @@ abstract class CreateOrUpdateRegistrarCommand extends MutatingCommand {
description = "Hostname of registrar WHOIS server. (Default: whois.nic.google)")
String whoisServer;
@Nullable
@Parameter(
names = "--premium_price_ack_required",
description = "Whether operations on premium domains require explicit ack of prices",
arity = 1)
private Boolean premiumPriceAckRequired;
/** Returns the existing registrar (for update) or null (for creates). */
@Nullable
abstract Registrar getOldRegistrar(String clientId);
@ -392,7 +385,6 @@ abstract class CreateOrUpdateRegistrarCommand extends MutatingCommand {
Optional.ofNullable(phonePasscode).ifPresent(builder::setPhonePasscode);
Optional.ofNullable(icannReferralEmail).ifPresent(builder::setIcannReferralEmail);
Optional.ofNullable(whoisServer).ifPresent(builder::setWhoisServer);
Optional.ofNullable(premiumPriceAckRequired).ifPresent(builder::setPremiumPriceAckRequired);
// If the registrarName is being set, verify that it is either null or it normalizes uniquely.
String oldRegistrarName = (oldRegistrar == null) ? null : oldRegistrar.getRegistrarName();

View file

@ -117,13 +117,6 @@ abstract class CreateOrUpdateTldCommand extends MutatingCommand {
description = "Tld type (REAL or TEST)")
private TldType tldType;
@Nullable
@Parameter(
names = "--premium_price_ack_required",
description = "Whether operations on premium domains require explicit ack of prices",
arity = 1)
private Boolean premiumPriceAckRequired;
@Nullable
@Parameter(
names = "--create_billing_cost",
@ -335,7 +328,6 @@ abstract class CreateOrUpdateTldCommand extends MutatingCommand {
Optional.ofNullable(serverStatusChangeCost)
.ifPresent(builder::setServerStatusChangeBillingCost);
Optional.ofNullable(tldType).ifPresent(builder::setTldType);
Optional.ofNullable(premiumPriceAckRequired).ifPresent(builder::setPremiumPriceAckRequired);
Optional.ofNullable(lordnUsername).ifPresent(u -> builder.setLordnUsername(u.orElse(null)));
Optional.ofNullable(claimsPeriodEnd).ifPresent(builder::setClaimsPeriodEnd);
Optional.ofNullable(domainCreateRestricted).ifPresent(builder::setDomainCreateRestricted);

View file

@ -57,8 +57,7 @@ public final class ListTldsAction extends ListObjectsAction<Registry> {
return ImmutableBiMap.of(
"TLD", "tldStr",
"dns", "dnsPaused",
"escrow", "escrowEnabled",
"premiumPricing", "premiumPriceAckRequired");
"escrow", "escrowEnabled");
}
@Override
@ -67,7 +66,6 @@ public final class ListTldsAction extends ListObjectsAction<Registry> {
return new ImmutableMap.Builder<String, String>()
.put("dnsPaused", registry.getDnsPaused() ? "paused" : "-")
.put("escrowEnabled", registry.getEscrowEnabled() ? "enabled" : "-")
.put("premiumPriceAckRequired", registry.getPremiumPriceAckRequired() ? "ack req'd" : "-")
.put("tldState", registry.isPdt(now) ? "PDT" : registry.getTldState(now).toString())
.put("tldStateTransitions", registry.getTldStateTransitions().toString())
.put("renewBillingCost", registry.getStandardRenewCost(now).toString())

View file

@ -87,8 +87,7 @@ registry.json.Response.prototype.results;
* localizedAddress: registry.json.RegistrarAddress,
* whoisServer: (string?|undefined),
* referralUrl: (string?|undefined),
* contacts: !Array.<registry.json.RegistrarContact>,
* premiumPriceAckRequired: boolean
* contacts: !Array.<registry.json.RegistrarContact>
* }}
*/
registry.json.Registrar;

View file

@ -279,9 +279,6 @@ public final class RegistrarFormFields {
args, L10N_STREET_FIELD, L10N_CITY_FIELD, L10N_STATE_FIELD, L10N_ZIP_FIELD))
.build();
public static final FormField<Boolean, Boolean> PREMIUM_PRICE_ACK_REQUIRED =
FormField.named("premiumPriceAckRequired", Boolean.class).build();
private static @Nullable RegistrarAddress toNewAddress(
@Nullable Map<String, ?> args,
final FormField<List<String>, List<String>> streetField,

View file

@ -35,7 +35,6 @@ import com.google.template.soy.data.SoyMapData;
import com.google.template.soy.shared.SoyCssRenamingMap;
import com.google.template.soy.tofu.SoyTofu;
import google.registry.config.RegistryConfig.Config;
import google.registry.model.registrar.Registrar;
import google.registry.request.Action;
import google.registry.request.Parameter;
import google.registry.request.Response;
@ -149,8 +148,7 @@ public final class ConsoleUiAction implements Runnable {
// since we double check the access to the registrar on any read / update request. We have to
// - since the access might get revoked between the initial page load and the request! (also
// because the requests come from the browser, and can easily be faked)
Registrar registrar = registrarAccessor.getRegistrar(clientId);
data.put("requireFeeExtension", registrar.getPremiumPriceAckRequired());
registrarAccessor.getRegistrar(clientId);
} catch (RegistrarAccessDeniedException e) {
logger.atWarning().withCause(e).log(
"User %s doesn't have access to registrar console.", authResult.userIdForLogging());

View file

@ -260,11 +260,6 @@ public class RegistrarSettingsAction implements Runnable, JsonActionRunner.JsonA
Registrar.Builder builder = initialRegistrar.asBuilder();
// BILLING
RegistrarFormFields.PREMIUM_PRICE_ACK_REQUIRED
.extractUntyped(args)
.ifPresent(builder::setPremiumPriceAckRequired);
// WHOIS
//
// Because of how whoisServer handles "default value", it's possible that setting the existing

View file

@ -315,8 +315,6 @@
{template .resources}
{@param? driveFolderId: string}
{@param technicalDocsUrl: string}
{@param premiumPriceAckRequired: bool}
{@param readonly: bool}
<div id="domain-registrar-resources">
<h1>Resources &amp; billing</h1>
<p>
@ -341,15 +339,6 @@
{else}
<em>Your billing folder is pending allocation.</em>
{/if}
<h2><img src="/assets/images/folder.png">EPP Settings</h2>
<p>Use the 'Edit' button above to switch to enable editing the information
below. <i>Updates may require up to 10 minutes to take effect.</i>
<form name="item" class="{css('item')} {css('registrar')}">
<input type="checkbox" id="premiumPriceAckRequired" name="premiumPriceAckRequired"
{if $premiumPriceAckRequired} checked{/if}
{if $readonly} disabled{/if}>
Require use of fee extension to acknowledge all premium domain prices.
</form>
</div>
{/template}

View file

@ -656,20 +656,9 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
assertAboutEppExceptions().that(thrown).marshalsToXml();
}
@Test
public void testSuccess_premium() throws Exception {
createTld("example");
persistResource(Registry.get("example").asBuilder().setPremiumPriceAckRequired(false).build());
setEppInput("domain_create_premium.xml");
persistContactsAndHosts("net");
doSuccessfulTest(
"example", "domain_create_response_premium.xml", ImmutableMap.of("DOMAIN", "rich.example"));
}
@Test
public void testSuccess_premiumAndEap() throws Exception {
createTld("example");
persistResource(Registry.get("example").asBuilder().setPremiumPriceAckRequired(true).build());
setEppInput("domain_create_premium_eap.xml");
persistContactsAndHosts("net");
persistResource(
@ -1258,7 +1247,6 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
@Test
public void testSuccess_superuserOverridesPremiumNameBlock() throws Exception {
createTld("example");
persistResource(Registry.get("example").asBuilder().setPremiumPriceAckRequired(false).build());
setEppInput("domain_create_premium.xml");
persistContactsAndHosts("net");
// Modify the Registrar to block premium names.
@ -1421,7 +1409,6 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
@Test
public void testFailure_premiumBlocked() {
createTld("example");
persistResource(Registry.get("example").asBuilder().setPremiumPriceAckRequired(false).build());
setEppInput("domain_create_premium.xml");
persistContactsAndHosts("net");
// Modify the Registrar to block premium names.
@ -1431,34 +1418,9 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow,
}
@Test
public void testFailure_premiumNotAcked_byRegistryRequiringAcking() {
public void testFailure_premiumNotAcked() {
createTld("example");
assertThat(Registry.get("example").getPremiumPriceAckRequired()).isTrue();
setEppInput("domain_create_premium.xml");
persistContactsAndHosts("net");
EppException thrown = assertThrows(FeesRequiredForPremiumNameException.class, this::runFlow);
assertAboutEppExceptions().that(thrown).marshalsToXml();
}
@Test
public void testFailure_premiumNotAcked_byRegistrarRequiringAcking() {
createTld("example");
persistResource(Registry.get("example").asBuilder().setPremiumPriceAckRequired(false).build());
persistResource(
loadRegistrar("TheRegistrar").asBuilder().setPremiumPriceAckRequired(true).build());
setEppInput("domain_create_premium.xml");
persistContactsAndHosts("net");
EppException thrown = assertThrows(FeesRequiredForPremiumNameException.class, this::runFlow);
assertAboutEppExceptions().that(thrown).marshalsToXml();
}
@Test
public void testFailure_premiumNotAcked_whenRegistrarAndRegistryRequireAcking() {
createTld("example");
persistResource(Registry.get("example").asBuilder().setPremiumPriceAckRequired(true).build());
persistResource(
loadRegistrar("TheRegistrar").asBuilder().setPremiumPriceAckRequired(true).build());
setEppInput("domain_create_premium.xml");
setEppInput("domain_create.xml", ImmutableMap.of("DOMAIN", "rich.example"));
persistContactsAndHosts("net");
EppException thrown = assertThrows(FeesRequiredForPremiumNameException.class, this::runFlow);
assertAboutEppExceptions().that(thrown).marshalsToXml();

View file

@ -715,21 +715,8 @@ public class DomainRenewFlowTest extends ResourceFlowTestCase<DomainRenewFlow, D
}
@Test
public void testFailure_registryRequiresAcking_feeNotProvidedOnPremiumName() throws Exception {
public void testFailure_feeNotProvidedOnPremiumName() throws Exception {
createTld("example");
persistResource(Registry.get("example").asBuilder().setPremiumPriceAckRequired(true).build());
setEppInput("domain_renew_premium.xml");
persistDomain();
EppException thrown = assertThrows(FeesRequiredForPremiumNameException.class, this::runFlow);
assertAboutEppExceptions().that(thrown).marshalsToXml();
}
@Test
public void testFailure_registrarRequiresAcking_feeNotProvidedOnPremiumName() throws Exception {
createTld("example");
persistResource(Registry.get("example").asBuilder().setPremiumPriceAckRequired(false).build());
persistResource(
loadRegistrar("TheRegistrar").asBuilder().setPremiumPriceAckRequired(true).build());
setEppInput("domain_renew_premium.xml");
persistDomain();
EppException thrown = assertThrows(FeesRequiredForPremiumNameException.class, this::runFlow);

View file

@ -88,7 +88,7 @@ public class DomainRestoreRequestFlowTest
@Before
public void initDomainTest() {
createTld("tld");
setEppInput("domain_update_restore_request.xml");
setEppInput("domain_update_restore_request.xml", ImmutableMap.of("DOMAIN", "example.tld"));
}
void persistPendingDeleteDomain() throws Exception {
@ -123,14 +123,14 @@ public class DomainRestoreRequestFlowTest
@Test
public void testDryRun() throws Exception {
setEppInput("domain_update_restore_request.xml");
setEppInput("domain_update_restore_request.xml", ImmutableMap.of("DOMAIN", "example.tld"));
persistPendingDeleteDomain();
dryRunFlowAssertResponse(loadFile("generic_success_response.xml"));
}
@Test
public void testSuccess() throws Exception {
setEppInput("domain_update_restore_request.xml");
setEppInput("domain_update_restore_request.xml", ImmutableMap.of("DOMAIN", "example.tld"));
persistPendingDeleteDomain();
assertTransactionalFlow(true);
// Double check that we see a poll message in the future for when the delete happens.
@ -321,10 +321,9 @@ public class DomainRestoreRequestFlowTest
@Test
public void testSuccess_premiumNotBlocked() throws Exception {
createTld("example");
persistResource(Registry.get("example").asBuilder().setPremiumPriceAckRequired(false).build());
setEppInput("domain_update_restore_request_premium.xml");
persistPendingDeleteDomain();
runFlow();
runFlowAssertResponse(loadFile("domain_update_restore_request_response_premium.xml"));
}
@Test
@ -342,13 +341,14 @@ public class DomainRestoreRequestFlowTest
@Test
public void testSuccess_superuserOverridesPremiumNameBlock() throws Exception {
createTld("example");
persistResource(Registry.get("example").asBuilder().setPremiumPriceAckRequired(false).build());
setEppInput("domain_update_restore_request_premium.xml");
persistPendingDeleteDomain();
// Modify the Registrar to block premium names.
persistResource(loadRegistrar("TheRegistrar").asBuilder().setBlockPremiumNames(true).build());
runFlowAssertResponse(
CommitMode.LIVE, UserPrivileges.SUPERUSER, loadFile("generic_success_response.xml"));
CommitMode.LIVE,
UserPrivileges.SUPERUSER,
loadFile("domain_update_restore_request_response_premium.xml"));
}
@Test
@ -591,21 +591,9 @@ public class DomainRestoreRequestFlowTest
}
@Test
public void testFailure_premiumNotAcked_whenRegistryRequiresFeeAcking() throws Exception {
public void testFailure_premiumNotAcked() throws Exception {
createTld("example");
setEppInput("domain_update_restore_request_premium.xml");
persistPendingDeleteDomain();
EppException thrown = assertThrows(FeesRequiredForPremiumNameException.class, this::runFlow);
assertAboutEppExceptions().that(thrown).marshalsToXml();
}
@Test
public void testFailure_premiumNotAcked_whenRegistrarRequiresFeeAcking() throws Exception {
createTld("example");
persistResource(Registry.get("example").asBuilder().setPremiumPriceAckRequired(false).build());
persistResource(
loadRegistrar("TheRegistrar").asBuilder().setPremiumPriceAckRequired(true).build());
setEppInput("domain_update_restore_request_premium.xml");
setEppInput("domain_update_restore_request.xml", ImmutableMap.of("DOMAIN", "rich.example"));
persistPendingDeleteDomain();
EppException thrown = assertThrows(FeesRequiredForPremiumNameException.class, this::runFlow);
assertAboutEppExceptions().that(thrown).marshalsToXml();

View file

@ -1150,21 +1150,35 @@ public class DomainTransferRequestFlowTest
@Test
public void testSuccess_premiumNotBlocked() throws Exception {
setupDomain("rich", "example");
persistResource(Registry.get("example").asBuilder().setPremiumPriceAckRequired(false).build());
clock.advanceOneMilli();
// We don't verify the results; just check that the flow doesn't fail.
runTest("domain_transfer_request_premium.xml", UserPrivileges.NORMAL);
runTest(
"domain_transfer_request_fee.xml",
UserPrivileges.NORMAL,
ImmutableMap.of(
"DOMAIN", "rich.example",
"YEARS", "1",
"AMOUNT", "100.00",
"FEE_VERSION", "0.12",
"FEE_NS", "fee12"));
}
@Test
public void testSuccess_premiumNotBlockedInSuperuserMode() throws Exception {
setupDomain("rich", "example");
persistResource(Registry.get("example").asBuilder().setPremiumPriceAckRequired(false).build());
clock.advanceOneMilli();
// Modify the Registrar to block premium names.
persistResource(loadRegistrar("NewRegistrar").asBuilder().setBlockPremiumNames(true).build());
// We don't verify the results; just check that the flow doesn't fail.
runTest("domain_transfer_request_premium.xml", UserPrivileges.SUPERUSER);
runTest(
"domain_transfer_request_fee.xml",
UserPrivileges.SUPERUSER,
ImmutableMap.of(
"DOMAIN", "rich.example",
"YEARS", "1",
"AMOUNT", "100.00",
"FEE_VERSION", "0.12",
"FEE_NS", "fee12"));
}
private void runWrongCurrencyTest(Map<String, String> substitutions) {
@ -1275,7 +1289,7 @@ public class DomainTransferRequestFlowTest
}
@Test
public void testFailure_registryRequiresAcking_feeNotProvidedOnPremiumName() {
public void testFailure_feeNotProvidedOnPremiumName() {
setupDomain("rich", "example");
EppException thrown =
assertThrows(
@ -1284,20 +1298,6 @@ public class DomainTransferRequestFlowTest
assertAboutEppExceptions().that(thrown).marshalsToXml();
}
@Test
public void testFailure_registrarRequiresAcking_feeNotProvidedOnPremiumName() {
setupDomain("rich", "example");
persistResource(Registry.get("example").asBuilder().setPremiumPriceAckRequired(false).build());
persistResource(
loadRegistrar("NewRegistrar").asBuilder().setPremiumPriceAckRequired(true).build());
clock.advanceOneMilli();
EppException thrown =
assertThrows(
FeesRequiredForPremiumNameException.class,
() -> doFailingTest("domain_transfer_request_premium.xml"));
assertAboutEppExceptions().that(thrown).marshalsToXml();
}
@Test
public void testFailure_noAuthInfo() {
setupDomain("example", "tld");

View file

@ -17,6 +17,12 @@
</domain:authInfo>
</domain:create>
</create>
<extension>
<fee:create xmlns:fee="urn:ietf:params:xml:ns:fee-0.12">
<fee:currency>USD</fee:currency>
<fee:fee>200.00</fee:fee>
</fee:create>
</extension>
<clTRID>ABC-12345</clTRID>
</command>
</epp>

View file

@ -11,6 +11,12 @@
<domain:exDate>2001-04-03T22:00:00.0Z</domain:exDate>
</domain:creData>
</resData>
<extension>
<fee:creData xmlns:fee="urn:ietf:params:xml:ns:fee-0.12">
<fee:currency>USD</fee:currency>
<fee:fee description="create">200.00</fee:fee>
</fee:creData>
</extension>
<trID>
<clTRID>ABC-12345</clTRID>
<svTRID>server-trid</svTRID>

View file

@ -3,7 +3,7 @@
<update>
<domain:update
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
<domain:name>example.tld</domain:name>
<domain:name>%DOMAIN%</domain:name>
<domain:chg/>
</domain:update>
</update>

View file

@ -11,6 +11,15 @@
<rgp:update xmlns:rgp="urn:ietf:params:xml:ns:rgp-1.0">
<rgp:restore op="request"/>
</rgp:update>
<fee:update xmlns:fee="urn:ietf:params:xml:ns:fee-0.12">
<fee:currency>USD</fee:currency>
<fee:fee description="renew" refundable="true" grace-period="P0D" applied="immediate">
100.00
</fee:fee>
<fee:fee description="restore" refundable="true" grace-period="P0D" applied="immediate">
17.00
</fee:fee>
</fee:update>
</extension>
<clTRID>ABC-12345</clTRID>
</command>

View file

@ -0,0 +1,18 @@
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<response>
<result code="1000">
<msg>Command completed successfully</msg>
</result>
<extension>
<fee:updData xmlns:fee="urn:ietf:params:xml:ns:fee-0.12">
<fee:currency>USD</fee:currency>
<fee:fee description="restore">17.00</fee:fee>
<fee:fee description="renew">100.00</fee:fee>
</fee:updData>
</extension>
<trID>
<clTRID>ABC-12345</clTRID>
<svTRID>server-trid</svTRID>
</trID>
</response>
</epp>

View file

@ -98,7 +98,6 @@ public class RegistrarTest extends EntityTestCase {
.setBillingAccountMap(
ImmutableMap.of(CurrencyUnit.USD, "abc123", CurrencyUnit.JPY, "789xyz"))
.setPhonePasscode("01234")
.setPremiumPriceAckRequired(true)
.build());
persistResource(registrar);
abuseAdminContact =

View file

@ -409,7 +409,6 @@ class google.registry.model.registrar.Registrar {
@Parent com.googlecode.objectify.Key<google.registry.model.common.EntityGroupRoot> parent;
boolean blockPremiumNames;
boolean contactsRequireSyncing;
boolean premiumPriceAckRequired;
google.registry.model.CreateAutoTimestamp creationTime;
google.registry.model.UpdateAutoTimestamp lastUpdateTime;
google.registry.model.registrar.Registrar$State state;
@ -491,7 +490,6 @@ class google.registry.model.registry.Registry {
boolean dnsPaused;
boolean domainCreateRestricted;
boolean escrowEnabled;
boolean premiumPriceAckRequired;
com.googlecode.objectify.Key<google.registry.model.registry.label.PremiumList> premiumList;
google.registry.model.CreateAutoTimestamp creationTime;
google.registry.model.common.TimedTransitionProperty<google.registry.model.registry.Registry$TldState, google.registry.model.registry.Registry$TldStateTransition> tldStateTransitions;

View file

@ -88,7 +88,6 @@ public class CreateRegistrarCommandTest extends CommandTestCase<CreateRegistrarC
assertThat(registrar.getCreationTime()).isIn(Range.closed(before, after));
assertThat(registrar.getLastUpdateTime()).isEqualTo(registrar.getCreationTime());
assertThat(registrar.getBlockPremiumNames()).isFalse();
assertThat(registrar.getPremiumPriceAckRequired()).isFalse();
assertThat(registrar.getPoNumber()).isEmpty();
verify(connection)
@ -787,28 +786,6 @@ public class CreateRegistrarCommandTest extends CommandTestCase<CreateRegistrarC
assertThat(registrar.get().getFaxNumber()).isEqualTo("+1.2125556342");
}
@Test
public void testSuccess_premiumPriceAckRequired() throws Exception {
runCommandForced(
"--name=blobio",
"--password=some_password",
"--registrar_type=REAL",
"--iana_id=8",
"--passcode=01234",
"--icann_referral_email=foo@bar.test",
"--street=\"123 Fake St\"",
"--city Fakington",
"--state MA",
"--zip 00351",
"--cc US",
"--premium_price_ack_required=true",
"clientz");
Optional<Registrar> registrar = Registrar.loadByClientId("clientz");
assertThat(registrar).isPresent();
assertThat(registrar.get().getPremiumPriceAckRequired()).isTrue();
}
@Test
public void testFailure_missingRegistrarType() {
IllegalArgumentException thrown =

View file

@ -275,16 +275,6 @@ public class CreateTldCommandTest extends CommandTestCase<CreateTldCommand> {
.containsExactly("xn--q9jyb4c_abuse", "common_abuse");
}
@Test
public void testSuccess_setPremiumPriceAckRequired() throws Exception {
runCommandForced(
"--premium_price_ack_required=true",
"--roid_suffix=Q9JYB4C",
"--dns_writers=VoidDnsWriter",
"xn--q9jyb4c");
assertThat(Registry.get("xn--q9jyb4c").getPremiumPriceAckRequired()).isTrue();
}
@Test
public void testFailure_invalidAddGracePeriod() {
IllegalArgumentException thrown =

View file

@ -312,28 +312,12 @@ public class UpdateRegistrarCommandTest extends CommandTestCase<UpdateRegistrarC
assertThat(loadRegistrar("NewRegistrar").getBlockPremiumNames()).isFalse();
}
@Test
public void testSuccess_premiumPriceAckRequired() throws Exception {
assertThat(loadRegistrar("NewRegistrar").getPremiumPriceAckRequired()).isFalse();
runCommandForced("--premium_price_ack_required=true", "NewRegistrar");
assertThat(loadRegistrar("NewRegistrar").getPremiumPriceAckRequired()).isTrue();
}
@Test
public void testSuccess_resetPremiumPriceAckRequired() throws Exception {
persistResource(
loadRegistrar("NewRegistrar").asBuilder().setPremiumPriceAckRequired(true).build());
runCommandForced("--premium_price_ack_required=false", "NewRegistrar");
assertThat(loadRegistrar("NewRegistrar").getPremiumPriceAckRequired()).isFalse();
}
@Test
public void testSuccess_unspecifiedBooleansArentChanged() throws Exception {
persistResource(
loadRegistrar("NewRegistrar")
.asBuilder()
.setBlockPremiumNames(true)
.setPremiumPriceAckRequired(true)
.setContactsRequireSyncing(true)
.build());
// Make some unrelated change where we don't specify the flags for the booleans.
@ -341,7 +325,6 @@ public class UpdateRegistrarCommandTest extends CommandTestCase<UpdateRegistrarC
// Make sure that the boolean fields didn't get reset back to false.
Registrar reloadedRegistrar = loadRegistrar("NewRegistrar");
assertThat(reloadedRegistrar.getBlockPremiumNames()).isTrue();
assertThat(reloadedRegistrar.getPremiumPriceAckRequired()).isTrue();
assertThat(reloadedRegistrar.getContactsRequireSyncing()).isTrue();
}

View file

@ -229,19 +229,6 @@ public class UpdateTldCommandTest extends CommandTestCase<UpdateTldCommand> {
.isEqualTo(Money.ofMajor(JPY, 101112));
}
@Test
public void testSuccess_setPremiumPriceAckRequired() throws Exception {
runCommandForced("--premium_price_ack_required=true", "xn--q9jyb4c");
assertThat(Registry.get("xn--q9jyb4c").getPremiumPriceAckRequired()).isTrue();
}
@Test
public void testSuccess_clearPremiumPriceAckRequired() throws Exception {
persistResource(Registry.get("xn--q9jyb4c").asBuilder().setPremiumPriceAckRequired(true).build());
runCommandForced("--premium_price_ack_required=false", "xn--q9jyb4c");
assertThat(Registry.get("xn--q9jyb4c").getPremiumPriceAckRequired()).isFalse();
}
@Test
public void testSuccess_setLordnUsername() throws Exception {
runCommandForced("--lordn_username=lordn000", "xn--q9jyb4c");

View file

@ -115,7 +115,6 @@ function testNavToResources() {
path: 'resources',
xsrfToken: test.testXsrfToken,
technicalDocsUrl: 'http://example.com/techdocs',
premiumPriceAckRequired: false,
readonly: true,
});
const xhr = goog.testing.net.XhrIo.getSendInstances().pop();

View file

@ -345,15 +345,6 @@ public class RegistrarSettingsActionTest extends RegistrarSettingsActionTestCase
CLIENT_ID, "update", allExceptCorrectRoles.toString(), "ERROR: ForbiddenException");
}
@Test
public void testUpdate_premiumPriceAck() {
doTestUpdate(
Role.OWNER,
Registrar::getPremiumPriceAckRequired,
true,
Registrar.Builder::setPremiumPriceAckRequired);
}
@Test
public void testUpdate_whoisServer() {
doTestUpdate(

View file

@ -1,2 +0,0 @@
The following changes were made to the registrar:
premiumPriceAckRequired: false -> true