Class InvoiceMessagesApiImpl

Object
ch.aaap.harvestclient.impl.InvoiceMessagesApiImpl
All Implemented Interfaces:
InvoiceMessagesApi

public class InvoiceMessagesApiImpl extends Object implements InvoiceMessagesApi
  • Constructor Details

  • Method Details

    • list

      public List<InvoiceMessage> list(Reference<Invoice> invoiceReference, Instant updatedSince)
      Specified by:
      list in interface InvoiceMessagesApi
      Parameters:
      invoiceReference - the invoice containing the messages
      updatedSince - return only InvoiceMessages that have been updated at least 1 second after updatedSince. Set to null to disable filtering.
      Returns:
      a list of all InvoiceMessages in the invoice, sorted by creation date, newest first.
    • list

      public Pagination<InvoiceMessage> list(Reference<Invoice> invoiceReference, Instant updatedSince, int page, int perPage)
      Specified by:
      list in interface InvoiceMessagesApi
      Parameters:
      invoiceReference - the invoice containing the messages
      updatedSince - return only InvoiceMessages that have been updated at least 1 second after updatedSince. Set to null to disable filtering.
      page - the page number
      perPage - 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

      public InvoiceMessage create(Reference<Invoice> invoiceReference, InvoiceMessage creationInfo)
      Description copied from interface: InvoiceMessagesApi
      Create a new InvoiceMessage
      Specified by:
      create in interface InvoiceMessagesApi
      Parameters:
      invoiceReference - the invoice that will contain the message
      creationInfo - creation information
      Returns:
      the created InvoiceMessage
    • markAs

      public InvoiceMessage markAs(Reference<Invoice> invoiceReference, InvoiceMessage.EventType eventType)
      Description copied from interface: InvoiceMessagesApi
      Change the state of an invoice to the given eventType. Not all transitions are allowed: see the web interface for more information
      Specified by:
      markAs in interface InvoiceMessagesApi
      Parameters:
      invoiceReference - the invoice against which to record the event
      eventType - the event you want to record for this invoice
      Returns:
      the InvoiceMessage that was used to do the marking
    • delete

      public void delete(Reference<Invoice> invoiceReference, Reference<InvoiceMessage> invoiceMessageReference)
      Description copied from interface: InvoiceMessagesApi
      Delete an existing InvoiceMessage. Deleting an Accept Message does not change the status of the Invoice.
      Specified by:
      delete in interface InvoiceMessagesApi
      Parameters:
      invoiceReference - the invoice that contains the message
      invoiceMessageReference - An existing InvoiceMessage to be deleted