Class TransferProcessorExtender
The base class implementation for all extenders of the ITransferProcessor.
Each extender is responsible for transferring a specific type of entity. The system ones already transfer IAllocationAmount, ITransactionAllocated, and IGLPostingAllocated
Inheritance
Inherited Members
Namespace: LemonEdge.API.Core.FinancialServices.Processors.Transactional
Assembly: LemonEdge.API.Core.FinancialServices.dll
Syntax
public abstract class TransferProcessorExtender
Constructors
TransferProcessorExtender(ITransferProcessor)
Creates a new transfer processor extender with the specified transfer processor as the parent
Declaration
public TransferProcessorExtender(ITransferProcessor processor)
Parameters
Type | Name | Description |
---|---|---|
ITransferProcessor | processor | The transfer processor this extender is running within |
Properties
ProcessesTransferTypes
The type of item this extender transfers and the order in which it should be transferred
The core system transfers IAllocationAmount, ITransactionAllocated, and IGLPostingAllocated with order 1, 2, and 3 respectively
Custom extenders should start from 10 or aboveDeclaration
public abstract (EntityDescriptor Descriptor, short Order)[] ProcessesTransferTypes { get; }
Property Value
Type | Description |
---|---|
(EntityDescriptor Descriptor, short Order)[] |
Processor
The parent transfer processor
Declaration
public ITransferProcessor Processor { get; }
Property Value
Type | Description |
---|---|
ITransferProcessor |
Methods
CustomUpdateCancelCorrectedItem(EntityDescriptor, ITransactionalEntity, ITransactionalEntity, bool, IReadOnlyDictionary<Guid, (ITransactionalEntity Original, ITransactionalEntity Cancelling)>, IReadOnlyDictionary<Guid, ITransactionalEntity>)
Declaration
public virtual Task CustomUpdateCancelCorrectedItem(EntityDescriptor type, ITransactionalEntity original, ITransactionalEntity cancelCorrected, bool isCorrectionRecord, IReadOnlyDictionary<Guid, (ITransactionalEntity Original, ITransactionalEntity Cancelling)> cancelledEntities, IReadOnlyDictionary<Guid, ITransactionalEntity> correctedEntities)
Parameters
Type | Name | Description |
---|---|---|
EntityDescriptor | type | |
ITransactionalEntity | original | |
ITransactionalEntity | cancelCorrected | |
bool | isCorrectionRecord | |
IReadOnlyDictionary<Guid, (ITransactionalEntity Original, ITransactionalEntity Cancelling)> | cancelledEntities | |
IReadOnlyDictionary<Guid, ITransactionalEntity> | correctedEntities |
Returns
Type | Description |
---|---|
Task |
GetExtraItemsInThisProcessor()
Declaration
public virtual IEnumerable<IBaseEntity> GetExtraItemsInThisProcessor()
Returns
Type | Description |
---|---|
IEnumerable<IBaseEntity> |
Init()
Initializes this transfer processor extender
Declaration
public virtual Task Init()
Returns
Type | Description |
---|---|
Task | A task indicating the completion of this operation |
ProcessCancel(ITransactionalEntity, bool)
Enumerates all transferred items of the types this extender transfers and allows the extender to perform custom actions for cancelling those items
The BaseTransactionProcessor performs the standard cancel and correction functionality on all ITransactionalEntity
By default this does not do anything custom, but can be used for non transactional items that are transferred such as IAllocationAmount which are just deleted or corrected for cancel/correctsDeclaration
public virtual Task ProcessCancel(ITransactionalEntity cancellingRootItem, bool wasCorrected)
Parameters
Type | Name | Description |
---|---|---|
ITransactionalEntity | cancellingRootItem | The cancelled version of the root transactional entity |
bool | wasCorrected | Indicates if the original value was also corrected |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of this operation |
ProcessCorrect(ITransactionalEntity)
Enumerates all transferred items of the types this extender transfers and allows the extender to perform custom actions for correcting those items
The BaseTransactionProcessor performs the standard cancel and correction functionality on all ITransactionalEntity
By default this does not do anything custom, but can be used for non transactional items that are transferred such as IAllocationAmount which are just deleted or corrected for cancel/correctsDeclaration
public virtual Task ProcessCorrect(ITransactionalEntity correctingRootItem)
Parameters
Type | Name | Description |
---|---|---|
ITransactionalEntity | correctingRootItem | The corrected version of the root transactional entity |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of this operation |
ProcessItemsToTransfer(EntityDescriptor, DateTimeOffset, DateTimeOffset, AllocationTiming)
Transfers all itemType
records in the system that match the specifed parameters for the parent
ITransferProcessor
Declaration
public abstract Task ProcessItemsToTransfer(EntityDescriptor itemType, DateTimeOffset startDate, DateTimeOffset endDate, AllocationTiming timing)
Parameters
Type | Name | Description |
---|---|---|
EntityDescriptor | itemType | The type of entity to transfer. Used if ProcessesTransferTypes contains more than one type of entity |
DateTimeOffset | startDate | The TransactionDate of the ITransfer |
DateTimeOffset | endDate | |
AllocationTiming | timing | The Timing |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |
Validate()
Runs any custom validation for this extender during the save process
Declaration
public virtual Task Validate()
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |