import { ExpenseCategoriesPagenationParameters , ExpenseCategory } from '../models/expenseCategories.models' ; export class ExpenseCategoriesAPI { harvest ; baseUrl : string ; constructor ( harvest ) { this . baseUrl = '/v2/expense_categories' ; this . harvest = harvest ; } public get ( id ) { return this . harvest . request ( 'GET' , `${ this . baseUrl }/${ id }` ) ; } public list ( query ) { return this . harvest . request ( 'GET' , this . baseUrl , query ) ; } public create ( data ) { return this . harvest . request ( 'POST' , this . baseUrl , data ) ; } public update ( id , data ) { return this . harvest . request ( 'PATCH' , `${ this . baseUrl }/${ id }` , data ) ; } public delete ( id ) { return this . harvest . request ( 'DELETE' , `${ this . baseUrl }/${ id }` ) ; } }