Package org.cyclos.services.banking
Interface ScheduledPaymentService
-
- All Superinterfaces:
Service
- All Known Subinterfaces:
ScheduledPaymentServiceLocal
public interface ScheduledPaymentService extends Service
Service interface to perform scheduled payments and for searching and retrieve information about a scheduled payment. A scheduled payment is a transaction, and performing a scheduled payment normally starts by usingTransactionService.getPaymentData(org.cyclos.model.banking.accounts.InternalAccountOwner, org.cyclos.model.banking.accounts.InternalAccountOwner, org.cyclos.model.banking.transfertypes.TransferTypeVO). Then, at a certain point, the user cancalculateInstallments(CalculateInstallmentsDTO),preview(PerformScheduledPaymentDTO)and eventuallyperform(PerformScheduledPaymentDTO)the scheduled payment.- See Also:
TransactionService,PaymentService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidblock(@NotNull ScheduledPaymentActionDTO params)Blocks the given scheduled payment, so installments won't be processed on their respective due datesList<InstallmentDTO>calculateInstallments(@NotNull CalculateInstallmentsDTO dto)Calculates future installments for the given parametersList<InstallmentDTO>calculateInstallmentsReceive(@NotNull CalculateInstallmentsDTO dto)Calculates future installments for the given parameters on a receive paymentvoidcancel(@NotNull ScheduledPaymentActionDTO params)Permanently cancels the given scheduled payment, so installments will never be processedScheduledPaymentDatagetData(@NotNull Long id)Returns data about a scheduled paymentScheduledPaymentVOperform(@NotNull PerformScheduledPaymentDTO scheduledPayment)Performs an scheduled payment, returning its dataScheduledPaymentPreviewVOpreview(@NotNull PerformScheduledPaymentDTO parameters)Previews a scheduled payment to be performedScheduledPaymentPreviewVOpreviewReceive(@NotNull PerformScheduledPaymentDTO parameters)Previews a scheduled payment to be receivedTransferVOprocessInstallment(@NotNull InstallmentActionDTO params)Process the given installment if it's status is not terminal, returning the resulting transfer idScheduledPaymentVOreceive(@NotNull PerformScheduledPaymentDTO scheduledPayment)Receives a scheduled payment, returning its datavoidsettleInstallment(@NotNull InstallmentActionDTO params)Marks the given installment status asInstallmentStatus.SETTLEDif the status is not terminal.voidsettleRemaining(@NotNull ScheduledPaymentActionDTO params)Marks all installments whose status is not terminal asInstallmentStatus.SETTLED, and closes the scheduled paymentvoidunblock(@NotNull ScheduledPaymentActionDTO params)Unlocks the given scheduled payment, so installments will be processed on their respective due dates
-
-
-
Method Detail
-
block
void block(@NotNull @NotNull ScheduledPaymentActionDTO params) throws FrameworkExceptionBlocks the given scheduled payment, so installments won't be processed on their respective due dates- Throws:
FrameworkException
-
calculateInstallments
List<InstallmentDTO> calculateInstallments(@NotNull @NotNull CalculateInstallmentsDTO dto) throws FrameworkException
Calculates future installments for the given parameters- Throws:
FrameworkException
-
calculateInstallmentsReceive
List<InstallmentDTO> calculateInstallmentsReceive(@NotNull @NotNull CalculateInstallmentsDTO dto) throws FrameworkException
Calculates future installments for the given parameters on a receive payment- Throws:
FrameworkException
-
cancel
void cancel(@NotNull @NotNull ScheduledPaymentActionDTO params) throws FrameworkExceptionPermanently cancels the given scheduled payment, so installments will never be processed- Throws:
FrameworkException
-
getData
ScheduledPaymentData getData(@NotNull @NotNull Long id) throws FrameworkException
Returns data about a scheduled payment- Throws:
FrameworkException
-
perform
ScheduledPaymentVO perform(@NotNull @NotNull PerformScheduledPaymentDTO scheduledPayment) throws TransferException, FrameworkException
Performs an scheduled payment, returning its data
-
preview
ScheduledPaymentPreviewVO preview(@NotNull @NotNull PerformScheduledPaymentDTO parameters) throws FrameworkException
Previews a scheduled payment to be performed- Throws:
FrameworkException
-
previewReceive
ScheduledPaymentPreviewVO previewReceive(@NotNull @NotNull PerformScheduledPaymentDTO parameters) throws FrameworkException
Previews a scheduled payment to be received- Throws:
FrameworkException
-
processInstallment
TransferVO processInstallment(@NotNull @NotNull InstallmentActionDTO params) throws TransferException, FrameworkException
Process the given installment if it's status is not terminal, returning the resulting transfer id- Throws:
TransferExceptionFrameworkException- See Also:
InstallmentStatus.isTerminal()
-
receive
ScheduledPaymentVO receive(@NotNull @NotNull PerformScheduledPaymentDTO scheduledPayment) throws TransferException, PosPayerException, FrameworkException
Receives a scheduled payment, returning its data
-
settleInstallment
void settleInstallment(@NotNull @NotNull InstallmentActionDTO params) throws FrameworkExceptionMarks the given installment status asInstallmentStatus.SETTLEDif the status is not terminal.- Throws:
FrameworkException- See Also:
InstallmentStatus.isTerminal()
-
settleRemaining
void settleRemaining(@NotNull @NotNull ScheduledPaymentActionDTO params) throws FrameworkExceptionMarks all installments whose status is not terminal asInstallmentStatus.SETTLED, and closes the scheduled payment- Throws:
FrameworkException- See Also:
InstallmentStatus.isTerminal()
-
unblock
void unblock(@NotNull @NotNull ScheduledPaymentActionDTO params) throws FrameworkExceptionUnlocks the given scheduled payment, so installments will be processed on their respective due dates- Throws:
FrameworkException
-
-