mirror of
https://github.com/google/nomulus.git
synced 2025-07-20 09:46:03 +02:00
Simplify the use of the fee extension a little
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=133149148
This commit is contained in:
parent
1ee02108ae
commit
01e2e0141d
11 changed files with 57 additions and 92 deletions
|
@ -29,7 +29,7 @@ public class FeeCheckCommandExtensionItemV06
|
|||
String name;
|
||||
|
||||
CurrencyUnit currency;
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isDomainNameSupported() {
|
||||
return true;
|
||||
|
@ -40,11 +40,6 @@ public class FeeCheckCommandExtensionItemV06
|
|||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCurrencySupported() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CurrencyUnit getCurrency() {
|
||||
return currency;
|
||||
|
|
|
@ -32,18 +32,13 @@ public class FeeCheckCommandExtensionV06 extends ImmutableObject
|
|||
implements FeeCheckCommandExtension<
|
||||
FeeCheckCommandExtensionItemV06,
|
||||
FeeCheckResponseExtensionV06> {
|
||||
|
||||
|
||||
@XmlElement(name = "domain")
|
||||
Set<FeeCheckCommandExtensionItemV06> items;
|
||||
|
||||
@Override
|
||||
public boolean isCurrencySupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CurrencyUnit getCurrency() {
|
||||
throw new UnsupportedOperationException("Currency not supported");
|
||||
return null; // This version of the fee extension doesn't specify a top-level currency.
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -25,15 +25,10 @@ import org.joda.money.CurrencyUnit;
|
|||
@XmlType(propOrder = {"currency", "command", "period"})
|
||||
public class FeeInfoCommandExtensionV06
|
||||
extends FeeQueryCommandExtensionItemImpl implements CommandExtension {
|
||||
|
||||
|
||||
/** A three-character ISO4217 currency code. */
|
||||
CurrencyUnit currency;
|
||||
|
||||
@Override
|
||||
public boolean isCurrencySupported() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CurrencyUnit getCurrency() {
|
||||
return currency;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue