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
This commit is contained in:
ctingue 2016-07-08 08:31:21 -07:00 committed by Ben McIlwain
parent 262aab22b9
commit 3dd342372e

View file

@ -110,8 +110,6 @@ public final class TldSpecificLogicEngine {
/** /**
* Returns a new renew price for the pricer. * Returns a new renew price for the pricer.
*
* <p>domain name, number of years and date must be defined before calling this.
*/ */
public static EppCommandOperations getRenewPrice( public static EppCommandOperations getRenewPrice(
Registry registry, String domainName, DateTime date, int years) { 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. * Returns a new restore price for the pricer.
*
* <p>domain name, number of years and date must be defined before calling this.
*/ */
public static EppCommandOperations getRestorePrice( public static EppCommandOperations getRestorePrice(
Registry registry, String domainName, DateTime date, int years) { Registry registry, String domainName, DateTime date, int years) {
@ -137,12 +133,19 @@ public final class TldSpecificLogicEngine {
Fee.create(registry.getStandardRestoreCost().getAmount(), "restore"))); 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. * Returns the fee class for a given domain and date.
*/ */
public static Optional<String> getFeeClass(String domainName, DateTime date) { public static Optional<String> getFeeClass(String domainName, DateTime date) {
return getPricesForDomainName(domainName, date).getFeeClass(); return getPricesForDomainName(domainName, date).getFeeClass();
} }
// TODO(b/29089413): Add support for transfer prices once this is plumbed through the flows.
} }