Class ClientsApiImpl

Object
ch.aaap.harvestclient.impl.ClientsApiImpl
All Implemented Interfaces:
Api.Create<Client>, Api.Delete<Client>, Api.Get<Client>, Api.Simple<Client>, ClientsApi

public class ClientsApiImpl extends Object implements ClientsApi
  • Constructor Details

  • Method Details

    • list

      public List<Client> list(ClientFilter filter)
      Specified by:
      list in interface ClientsApi
      Parameters:
      filter - filtering options
      Returns:
      a list of all Clients in the account, sorted by creation date, newest first.
    • list

      public Pagination<Client> list(ClientFilter filter, int page, int perPage)
      Description copied from interface: ClientsApi
      Return a list of clients, sorted by creation date, newest first. Use the filter object to filter the list. Page and perPage allow controlling how many results to return.
      Specified by:
      list in interface ClientsApi
      Parameters:
      filter - filtering options
      page - the page number
      perPage - how many results to return for one page. Max 100
      Returns:
      a (filtered) list of Client
    • get

      public Client get(Reference<Client> clientReference)
      Description copied from interface: ClientsApi
      Return an existing Client.
      Specified by:
      get in interface Api.Get<Client>
      Specified by:
      get in interface ClientsApi
      Parameters:
      clientReference - a reference to an existing Client
      Returns:
      the full Client object
    • create

      public Client create(Client creationInfo)
      Description copied from interface: ClientsApi
      Create a new Client
      Specified by:
      create in interface Api.Create<Client>
      Specified by:
      create in interface ClientsApi
      Parameters:
      creationInfo - creation information
      Returns:
      the created Client
    • update

      public Client update(Reference<Client> clientReference, ClientUpdateInfo toChange)
      Description copied from interface: ClientsApi
      Updates the specific client by setting the values of the parameters passed. Any parameters not provided will be left unchanged
      Specified by:
      update in interface ClientsApi
      Parameters:
      clientReference - An existing Client to be updated
      toChange - the changes to be performed
      Returns:
      the updated Client
    • delete

      public void delete(Reference<Client> clientReference)
      Description copied from interface: ClientsApi
      Delete an existing Client.
      Specified by:
      delete in interface Api.Delete<Client>
      Specified by:
      delete in interface ClientsApi
      Parameters:
      clientReference - a reference to the Client to be deleted