Interface ExpenseCategoriesApi

All Superinterfaces:
Api.Create<ExpenseCategory>, Api.Delete<ExpenseCategory>, Api.Get<ExpenseCategory>, Api.Simple<ExpenseCategory>
All Known Implementing Classes:
ExpenseCategoriesApiImpl

public interface ExpenseCategoriesApi extends Api.Simple<ExpenseCategory>
See Also:
  • Method Details

    • list

      Parameters:
      filter - filtering options
      Returns:
      a list of all ExpenseCategories in the account, sorted by creation date, newest first.
    • list

      Pagination<ExpenseCategory> list(ExpenseCategoryFilter filter, int page, int perPage)
      Parameters:
      filter - filtering options
      page - the page number
      perPage - how many results to return for one page. Max 100
      Returns:
      a list of all ExpenseCategories in the account, sorted by creation date, newest first.
    • get

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

      ExpenseCategory create(ExpenseCategory creationInfo)
      Create a new ExpenseCategory. Example:
       ExpenseCategory expenseCategories = harvest.expenseCategories().create(ImmutableExpenseCategory.builder()
               .name("category name")
               .build());
       
      Specified by:
      create in interface Api.Create<ExpenseCategory>
      Parameters:
      creationInfo - creation information
      Returns:
      the created ExpenseCategory
    • update

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

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