From 3dd342372e38f08bdcfd975344786b0dbf0e12ae Mon Sep 17 00:00:00 2001 From: ctingue Date: Fri, 8 Jul 2016 08:31:21 -0700 Subject: [PATCH] Add scaffolding for transfer in TldSpecific For now, all transfer pricing = renew pricing. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=126914004 --- .../pricing/TldSpecificLogicEngine.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/java/google/registry/pricing/TldSpecificLogicEngine.java b/java/google/registry/pricing/TldSpecificLogicEngine.java index 28420e928..94f729156 100644 --- a/java/google/registry/pricing/TldSpecificLogicEngine.java +++ b/java/google/registry/pricing/TldSpecificLogicEngine.java @@ -110,8 +110,6 @@ public final class TldSpecificLogicEngine { /** * Returns a new renew price for the pricer. - * - *

domain name, number of years and date must be defined before calling this. */ public static EppCommandOperations getRenewPrice( Registry registry, String domainName, DateTime date, int years) { @@ -123,9 +121,7 @@ public final class TldSpecificLogicEngine { } /** - * Returns a new restore price (including the renew price) for the pricer. - * - *

domain name, number of years and date must be defined before calling this. + * Returns a new restore price for the pricer. */ public static EppCommandOperations getRestorePrice( Registry registry, String domainName, DateTime date, int years) { @@ -137,12 +133,19 @@ public final class TldSpecificLogicEngine { Fee.create(registry.getStandardRestoreCost().getAmount(), "restore"))); } + /** + * Returns a new transfer price for the pricer. + */ + public static EppCommandOperations getTransferPrice( + Registry registry, String domainName, DateTime transferDate, int additionalYears) { + // Currently, all transfer prices = renew prices, so just pass through. + return getRenewPrice(registry, domainName, transferDate, additionalYears); + } + /** * Returns the fee class for a given domain and date. */ public static Optional getFeeClass(String domainName, DateTime date) { return getPricesForDomainName(domainName, date).getFeeClass(); } - - // TODO(b/29089413): Add support for transfer prices once this is plumbed through the flows. }