public interface TicketService extends Service
| Modifier and Type | Method and Description |
|---|---|
TicketVO |
approve(@NotNull ApproveTicketDTO params)
Approves a ticket, as a payer, only if status is
TicketStatus.OPEN.If there is no "success URL" defined then it generates a new direct payment and the ticket goes to TicketStatus.PROCESSED. |
SerializableInputStream |
barcode(@NotNull TicketBarcodeParams params)
Generates a two-dimensional barcode (aka QR code) only if status is
TicketStatus.OPEN containing a URL of
the form: .../pay/ticket_id (e.g
https://www.cyclos.org/pay/1234567890123456789). |
void |
cancel(@NotNull TicketVO ticket)
Cancels the ticket only if status is
TicketStatus.OPEN and the logged user is the ticket's receiver
or a manger of him. |
TicketVO |
create(@NotNull CreateTicketDTO params)
Creates a new ticket with status
TicketStatus.OPEN for the logged user (i.e setting it as the receiver). |
CreateTicketData |
getCreateData(UserLocatorVO payer)
Returns data used to crate a new ticket, optionally with a fixed payer.
|
TicketData |
getData(@NotNull TicketVO vo)
Returns data to view the ticket's details.
|
EasyInvoiceData |
getEasyInvoiceData(PerformPaymentDTO params)
Returns data for an easy invoice after logging in.
|
TicketPaymentTypeData |
getTicketPaymentTypeData(@NotNull TransferTypeVO transferType)
Returns the data for a specific payment type used to create a new ticket
|
PrepareEasyInvoiceData |
prepareEasyInvoice(PrepareEasyInvoiceParams params)
Returns data for displaying details of an easy invoice while still as guest.
|
ApproveTicketPreviewVO |
previewApprove(@NotNull TicketVO ticket)
Previews the payment which would be performed when approving the given ticket as the payer.
|
TicketProcessResult |
process(ProcessTicketDTO params)
Processes a ticket as the receiver of the payment (i.e the ticket creator).
Only if the ticket status is TicketStatus.APPROVED a new direct payment will be generated and the new
ticket status will be: TicketStatus.PROCESSED. |
Page<TicketEntryVO> |
search(@NotNull TicketQuery query)
Searches for tickets according to the given query.
|
TicketVO approve(@NotNull @NotNull ApproveTicketDTO params) throws TransferException, FrameworkException
TicketStatus.OPEN.TicketStatus.PROCESSED. Otherwise, no payment is generated and the ticket goes to
TicketStatus.APPROVED status. The payment will be generated only after being processed by the receiver.TransferExceptionFrameworkExceptionSerializableInputStream barcode(@NotNull @NotNull TicketBarcodeParams params) throws FrameworkException
TicketStatus.OPEN containing a URL of
the form: .../pay/ticket_id (e.g
https://www.cyclos.org/pay/1234567890123456789).FrameworkExceptionvoid cancel(@NotNull
@NotNull TicketVO ticket)
throws FrameworkException
TicketStatus.OPEN and the logged user is the ticket's receiver
or a manger of him.FrameworkExceptionTicketVO create(@NotNull @NotNull CreateTicketDTO params) throws FrameworkException
TicketStatus.OPEN for the logged user (i.e setting it as the receiver).FrameworkExceptionCreateTicketData getCreateData(UserLocatorVO payer) throws FrameworkException
FrameworkExceptionTicketData getData(@NotNull @NotNull TicketVO vo) throws FrameworkException
FrameworkExceptionEasyInvoiceData getEasyInvoiceData(PerformPaymentDTO params) throws FrameworkException
prepareEasyInvoice(PrepareEasyInvoiceParams)
The resulting data will contain the resolved read-only custom field values.
The resulting PerformPaymentTypeData will contain the custom fields for the missing values.FrameworkExceptionTicketPaymentTypeData getTicketPaymentTypeData(@NotNull @NotNull TransferTypeVO transferType) throws FrameworkException
FrameworkExceptionPrepareEasyInvoiceData prepareEasyInvoice(PrepareEasyInvoiceParams params) throws FrameworkException, RemoteAddressBlockedException
EntityNotFoundException will be thrown.ApproveTicketPreviewVO previewApprove(@NotNull @NotNull TicketVO ticket) throws FrameworkException
TicketStatus.APPROVED or TicketStatus.OPEN without a success url.FrameworkExceptionTicketProcessResult process(ProcessTicketDTO params) throws TransferException, FrameworkException
TicketStatus.APPROVED a new direct payment will be generated and the new
ticket status will be: TicketStatus.PROCESSED.
There could be a case where this method is invoked for an already processed ticket (e.g. the ticket has both a
success url and an success webhook), for it, only in case the given process code is the correct one this method
runs without errors and returns the same result as the previous invocation (no payment is generated) but with the
TicketProcessResult.ACTUALLY_PROCESSED flag in false.TransferExceptionFrameworkExceptionPage<TicketEntryVO> search(@NotNull @NotNull TicketQuery query) throws FrameworkException
FrameworkException