Package google.registry.model.billing
Class BillingEvent.Cancellation
- java.lang.Object
-
- google.registry.model.ImmutableObject
-
- google.registry.model.billing.BillingEvent
-
- google.registry.model.billing.BillingEvent.Cancellation
-
- All Implemented Interfaces:
Buildable
,TransferData.TransferServerApproveEntity
,UnsafeSerializable
,java.io.Serializable
,java.lang.Cloneable
- Enclosing class:
- BillingEvent
@Entity(name="BillingCancellation") public static class BillingEvent.Cancellation extends BillingEvent
An event representing a cancellation of one of the other two billable event types.This is implemented as a separate event rather than a bit on BillingEvent in order to preserve the immutability of billing events.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BillingEvent.Cancellation.Builder
A builder forBillingEvent.Cancellation
since it is immutable.-
Nested classes/interfaces inherited from class google.registry.model.billing.BillingEvent
BillingEvent.Cancellation, BillingEvent.Flag, BillingEvent.OneTime, BillingEvent.Reason, BillingEvent.Recurring, BillingEvent.RenewalPriceBehavior
-
Nested classes/interfaces inherited from class google.registry.model.ImmutableObject
ImmutableObject.DoNotHydrate, ImmutableObject.IgnoredInDiffableMap, ImmutableObject.Insignificant
-
Nested classes/interfaces inherited from interface google.registry.model.Buildable
Buildable.GenericBuilder<S,B extends Buildable.GenericBuilder<?,?>>, Buildable.Overlayable<T>
-
-
Field Summary
-
Fields inherited from class google.registry.model.ImmutableObject
hashCode
-
-
Constructor Summary
Constructors Constructor Description Cancellation()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BillingEvent.Cancellation.Builder
asBuilder()
Override Buildable.asBuilder() to give this method stronger typing.VKey<BillingEvent.Cancellation>
createVKey()
static VKey<BillingEvent.Cancellation>
createVKey(long id)
static BillingEvent.Cancellation
forGracePeriod(GracePeriod gracePeriod, org.joda.time.DateTime eventTime, HistoryEntry.HistoryEntryId domainHistoryId, java.lang.String targetId)
Creates a cancellation billing event (parented on the provided history key, and with the corresponding event time) that will cancel out the provided grace period's billing event, using the supplied targetId and deriving other metadata (clientId, billing time, and the cancellation reason) from the grace period.org.joda.time.DateTime
getBillingTime()
VKey<? extends BillingEvent>
getEventKey()
-
Methods inherited from class google.registry.model.billing.BillingEvent
getDomainHistoryRevisionId, getDomainRepoId, getEventTime, getFlags, getHistoryEntryId, getId, getReason, getRegistrarId, getTargetId
-
Methods inherited from class google.registry.model.ImmutableObject
clone, cloneEmptyToNull, equals, getSignificantFields, hashCode, toDiffableFieldMap, toHydratedString, toString, toStringHelper
-
-
-
-
Method Detail
-
getBillingTime
public org.joda.time.DateTime getBillingTime()
-
getEventKey
public VKey<? extends BillingEvent> getEventKey()
-
forGracePeriod
public static BillingEvent.Cancellation forGracePeriod(GracePeriod gracePeriod, org.joda.time.DateTime eventTime, HistoryEntry.HistoryEntryId domainHistoryId, java.lang.String targetId)
Creates a cancellation billing event (parented on the provided history key, and with the corresponding event time) that will cancel out the provided grace period's billing event, using the supplied targetId and deriving other metadata (clientId, billing time, and the cancellation reason) from the grace period.
-
createVKey
public VKey<BillingEvent.Cancellation> createVKey()
- Specified by:
createVKey
in interfaceTransferData.TransferServerApproveEntity
- Specified by:
createVKey
in classBillingEvent
-
createVKey
public static VKey<BillingEvent.Cancellation> createVKey(long id)
-
asBuilder
public BillingEvent.Cancellation.Builder asBuilder()
Description copied from class:BillingEvent
Override Buildable.asBuilder() to give this method stronger typing.- Specified by:
asBuilder
in interfaceBuildable
- Specified by:
asBuilder
in classBillingEvent
-
-