Add clientId and time parameters to pricing methods

This is a broken-out refactoring from []
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=121603352
This commit is contained in:
mcilwain 2016-05-05 12:19:50 -07:00 committed by Justine Tunney
parent 4a9be60e0b
commit 6f69e96465
18 changed files with 105 additions and 62 deletions

View file

@ -17,6 +17,7 @@ package google.registry.tools;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Strings.isNullOrEmpty;
import static google.registry.model.registry.Registries.findTldForNameOrThrow;
import static org.joda.time.DateTimeZone.UTC;
import com.google.common.net.InternetDomainName;
import com.google.template.soy.data.SoyMapData;
@ -29,6 +30,7 @@ import google.registry.tools.Command.GtechCommand;
import google.registry.tools.soy.CreateAnchorTenantSoyInfo;
import org.joda.money.Money;
import org.joda.time.DateTime;
import javax.inject.Inject;
@ -86,7 +88,9 @@ final class CreateAnchorTenantCommand extends MutatingEppToolCommand implements
Money cost = null;
if (fee) {
cost = Registry.get(tld).getDomainCreateCost(domainName, DEFAULT_ANCHOR_TENANT_PERIOD_YEARS);
cost = Registry.get(tld)
.getDomainCreateCost(
domainName, DateTime.now(UTC), clientIdentifier, DEFAULT_ANCHOR_TENANT_PERIOD_YEARS);
}
setSoyTemplate(CreateAnchorTenantSoyInfo.getInstance(),