Package google.registry.model.domain.fee
Class BaseFee
java.lang.Object
google.registry.model.ImmutableObject
google.registry.model.domain.fee.BaseFee
- All Implemented Interfaces:
Cloneable
Base class for the fee and credit types.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Enum for when a fee is applied.static enum
Enum for the type of the fee.Nested classes/interfaces inherited from class google.registry.model.ImmutableObject
ImmutableObject.DoNotHydrate, ImmutableObject.IgnoredInDiffableMap, ImmutableObject.Insignificant
-
Field Summary
Fields inherited from class google.registry.model.ImmutableObject
hashCode
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetCost()
According to the fee extension specification, a fee must always be non-negative, while a credit must always be negative.org.joda.time.Period
getType()
com.google.common.collect.Range
<org.joda.time.DateTime> boolean
boolean
boolean
boolean
Returns whether the fee in question is a premium price.com.google.common.collect.ImmutableList
<BaseFee.FeeType> Parses the description field and returnsBaseFee.FeeType
s that match the description.Methods inherited from class google.registry.model.ImmutableObject
clone, cloneEmptyToNull, createVKey, equals, getSignificantFields, hashCode, toDiffableFieldMap, toHydratedString, toString, toStringHelper
-
Constructor Details
-
BaseFee
public BaseFee()
-
-
Method Details
-
getDescription
-
getApplied
-
getGracePeriod
public org.joda.time.Period getGracePeriod() -
getRefundable
-
isPremium
public boolean isPremium()Returns whether the fee in question is a premium price. -
getCost
According to the fee extension specification, a fee must always be non-negative, while a credit must always be negative. Essentially, they are the same thing, just with different sign. However, we need them to be separate classes for proper JAXB handling.- See Also:
-
getType
-
hasValidDateRange
public boolean hasValidDateRange() -
getValidDateRange
public com.google.common.collect.Range<org.joda.time.DateTime> getValidDateRange() -
hasZeroCost
public boolean hasZeroCost() -
hasDefaultAttributes
public boolean hasDefaultAttributes() -
parseDescriptionForTypes
Parses the description field and returnsBaseFee.FeeType
s that match the description.A
BaseFee.FeeType
is a match when itsformatString
contains the description, case insensitively.
-