mirror of
https://github.com/google/nomulus.git
synced 2025-06-26 22:34:55 +02:00
Add additional specific PricingEngineProxy methods
We already had methods to return just the create or just the renew price. I added more to return just the premium flag or just the fee class. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=136833071
This commit is contained in:
parent
fad0aa4ffa
commit
aecca10989
7 changed files with 29 additions and 19 deletions
|
@ -27,7 +27,7 @@ import static google.registry.model.EppResourceUtils.loadByForeignKey;
|
|||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static google.registry.model.registry.Registries.findTldForName;
|
||||
import static google.registry.model.registry.label.ReservedList.getReservation;
|
||||
import static google.registry.pricing.PricingEngineProxy.getPricesForDomainName;
|
||||
import static google.registry.pricing.PricingEngineProxy.isDomainPremium;
|
||||
import static google.registry.tldconfig.idn.IdnLabelValidator.findValidIdnTableForTld;
|
||||
import static google.registry.util.CollectionUtils.nullToEmpty;
|
||||
import static google.registry.util.DateTimeUtils.END_OF_TIME;
|
||||
|
@ -413,7 +413,7 @@ public class DomainFlowUtils {
|
|||
*/
|
||||
static void verifyPremiumNameIsNotBlocked(
|
||||
String domainName, DateTime priceTime, String clientId) throws EppException {
|
||||
if (getPricesForDomainName(domainName, priceTime).isPremium()) {
|
||||
if (isDomainPremium(domainName, priceTime)) {
|
||||
// NB: The load of the Registar object is transactionless, which means that it should hit
|
||||
// memcache most of the time.
|
||||
if (Registrar.loadByClientId(clientId).getBlockPremiumNames()) {
|
||||
|
@ -686,7 +686,7 @@ public class DomainFlowUtils {
|
|||
throws EppException {
|
||||
Registry registry = Registry.get(tld);
|
||||
if (registry.getPremiumPriceAckRequired()
|
||||
&& getPricesForDomainName(domainName, priceTime).isPremium()
|
||||
&& isDomainPremium(domainName, priceTime)
|
||||
&& feeCommand == null) {
|
||||
throw new FeesRequiredForPremiumNameException();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue