Interface ClientsApi

All Superinterfaces:
Api.Create<Client>, Api.Delete<Client>, Api.Get<Client>, Api.Simple<Client>
All Known Implementing Classes:
ClientsApiImpl

public interface ClientsApi extends Api.Simple<Client>
See Also:
  • Method Details

    • list

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

      Pagination<Client> list(ClientFilter filter, int page, int perPage)
      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.
      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

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

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

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

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