Package ch.aaap.harvestclient.api
Interface InvoiceMessagesApi
- All Known Implementing Classes:
InvoiceMessagesApiImpl
public interface InvoiceMessagesApi
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncreate
(Reference<Invoice> invoiceReference, InvoiceMessage creationInfo) Create a new InvoiceMessagevoid
delete
(Reference<Invoice> invoiceReference, Reference<InvoiceMessage> invoiceMessageReference) Delete an existing InvoiceMessage.markAs
(Reference<Invoice> invoiceReference, InvoiceMessage.EventType eventType) Change the state of an invoice to the given eventType.
-
Method Details
-
list
- Parameters:
updatedSince
- return only InvoiceMessages that have been updated at least 1 second after updatedSince. Set to null to disable filtering.invoiceReference
- the invoice containing the messages- Returns:
- a list of all InvoiceMessages in the invoice, sorted by creation date, newest first.
-
list
Pagination<InvoiceMessage> list(Reference<Invoice> invoiceReference, Instant updatedSince, int page, int perPage) - Parameters:
updatedSince
- return only InvoiceMessages that have been updated at least 1 second after updatedSince. Set to null to disable filtering.invoiceReference
- the invoice containing the messagespage
- the page numberperPage
- how many results to return for one page. Max 100- Returns:
- a list of all InvoiceMessages in the invoice, sorted by creation date, newest first.
-
create
Create a new InvoiceMessage- Parameters:
invoiceReference
- the invoice that will contain the messagecreationInfo
- creation information- Returns:
- the created InvoiceMessage
-
markAs
Change the state of an invoice to the given eventType. Not all transitions are allowed: see the web interface for more information- Parameters:
invoiceReference
- the invoice against which to record the eventeventType
- the event you want to record for this invoice- Returns:
- the InvoiceMessage that was used to do the marking
-
delete
Delete an existing InvoiceMessage. Deleting an Accept Message does not change the status of the Invoice.- Parameters:
invoiceReference
- the invoice that contains the messageinvoiceMessageReference
- An existing InvoiceMessage to be deleted
-