mirror of
https://github.com/google/nomulus.git
synced 2025-07-21 18:26:12 +02:00
Add a domain application update custom pricing logic test
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=142294037
This commit is contained in:
parent
9764ab0a56
commit
d485c5d7e2
3 changed files with 56 additions and 3 deletions
|
@ -82,6 +82,26 @@ public class TestDomainPricingCustomLogic extends DomainPricingCustomLogic {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public FeesAndCredits customizeApplicationUpdatePrice(
|
||||
ApplicationUpdatePriceParameters priceParameters) throws EppException {
|
||||
if (priceParameters
|
||||
.domainApplication()
|
||||
.getFullyQualifiedDomainName()
|
||||
.startsWith("non-free-update")) {
|
||||
FeesAndCredits feesAndCredits = priceParameters.feesAndCredits();
|
||||
List<BaseFee> newFeesAndCredits =
|
||||
new ImmutableList.Builder<BaseFee>()
|
||||
.addAll(feesAndCredits.getFeesAndCredits())
|
||||
.add(Fee.create(BigDecimal.valueOf(100), FeeType.UPDATE))
|
||||
.build();
|
||||
return new FeesAndCredits(
|
||||
feesAndCredits.getCurrency(), toArray(newFeesAndCredits, BaseFee.class));
|
||||
} else {
|
||||
return priceParameters.feesAndCredits();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public FeesAndCredits customizeRenewPrice(RenewPriceParameters priceParameters)
|
||||
throws EppException {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue