Class BaseFee

  • All Implemented Interfaces:
    java.lang.Cloneable
    Direct Known Subclasses:
    Credit, Fee

    public abstract class BaseFee
    extends ImmutableObject
    Base class for the fee and credit types.
    • Constructor Detail

      • BaseFee

        public BaseFee()
    • Method Detail

      • getDescription

        public java.lang.String getDescription()
      • getGracePeriod

        public org.joda.time.Period getGracePeriod()
      • getRefundable

        public java.lang.Boolean getRefundable()
      • isPremium

        public boolean isPremium()
        Returns whether the fee in question is a premium price.
      • getCost

        public java.math.BigDecimal 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:
        Registry Fee Extension for EPP - Fees and Credits
      • 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

        public com.google.common.collect.ImmutableList<BaseFee.FeeType> parseDescriptionForTypes()
        Parses the description field and returns BaseFee.FeeTypes that match the description.

        A BaseFee.FeeType is a match when its formatString contains the description, case insensitively.