Class EstimateMessagesApiImpl

Object
ch.aaap.harvestclient.impl.EstimateMessagesApiImpl
All Implemented Interfaces:
EstimateMessagesApi

public class EstimateMessagesApiImpl extends Object implements EstimateMessagesApi
  • Constructor Details

  • Method Details

    • list

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

      public Pagination<EstimateMessage> list(Reference<Estimate> estimateReference, Instant updatedSince, int page, int perPage)
      Specified by:
      list in interface EstimateMessagesApi
      Parameters:
      estimateReference - the estimate containing the messages
      updatedSince - return only EstimateMessages 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 EstimateMessages in the estimate, sorted by creation date, newest first.
    • create

      public EstimateMessage create(Reference<Estimate> estimateReference, EstimateMessage creationInfo)
      Description copied from interface: EstimateMessagesApi
      Create a new EstimateMessage
      Specified by:
      create in interface EstimateMessagesApi
      Parameters:
      estimateReference - the estimate that will contain the message
      creationInfo - creation information
      Returns:
      the created EstimateMessage
    • markAs

      public EstimateMessage markAs(Reference<Estimate> estimateReference, EstimateMessage.EventType eventType)
      Description copied from interface: EstimateMessagesApi
      Change the state of an estimate to the given eventType. Not all transitions are allowed: see the web interface for more information
      Specified by:
      markAs in interface EstimateMessagesApi
      Parameters:
      estimateReference - the estimate against which to record the event
      eventType - the event you want to record for this estimate
      Returns:
      the updated Estimate
    • delete

      public void delete(Reference<Estimate> estimateReference, Reference<EstimateMessage> estimateMessageReference)
      Description copied from interface: EstimateMessagesApi
      Delete an existing EstimateMessage. Deleting an Accept Message does not change the status of the Estimate.
      Specified by:
      delete in interface EstimateMessagesApi
      Parameters:
      estimateReference - the estimate that contains the message
      estimateMessageReference - An existing EstimateMessage to be deleted