mirror of
https://github.com/google/nomulus.git
synced 2025-05-17 17:59:41 +02:00
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:
parent
262aab22b9
commit
3dd342372e
1 changed files with 10 additions and 7 deletions
|
@ -110,8 +110,6 @@ public final class TldSpecificLogicEngine {
|
|||
|
||||
/**
|
||||
* 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(
|
||||
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.
|
||||
*
|
||||
* <p>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<String> 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.
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue