UNPKG

@crediblex.io/fineract-api-client

Version:
57 lines 2.3 kB
import { HttpClient } from "../utils/http-client"; /** * API client for Fineract Loan Products related operations. * It uses the HttpClient for making requests. */ export declare class FineractLoanProductsApi { private readonly httpClient; constructor(httpClient: HttpClient); /** * Retrieves all loan products from Fineract. * Corresponds to the GET /loanproducts endpoint. * * @returns A promise that resolves to the list of loan products or rejects with an error. */ getAll(): Promise<any[]>; /** * Retrieves a specific loan product by ID from Fineract. * Corresponds to the GET /loanproducts/{productId} endpoint. * * @param productId The ID of the loan product to retrieve. * @returns A promise that resolves to the loan product details or rejects with an error. */ getById(productId: number): Promise<any>; /** * Creates a new loan product in Fineract. * Corresponds to the POST /loanproducts endpoint. * * @param productData The data for the new loan product. * @returns A promise that resolves to the creation response or rejects with an error. */ create(productData: any): Promise<any>; /** * Updates an existing loan product in Fineract. * Corresponds to the PUT /loanproducts/{productId} endpoint. * * @param productId The ID of the loan product to update. * @param productData The updated data for the loan product. * @returns A promise that resolves to the update response or rejects with an error. */ update(productId: number, productData: any): Promise<any>; /** * Deletes a loan product from Fineract. * Corresponds to the DELETE /loanproducts/{productId} endpoint. * * @param productId The ID of the loan product to delete. * @returns A promise that resolves to the deletion response or rejects with an error. */ delete(productId: number): Promise<any>; /** * Retrieves template data for creating a new loan product. * Corresponds to the GET /loanproducts/template endpoint. * * @returns A promise that resolves to the template data or rejects with an error. */ getTemplate(): Promise<any>; } //# sourceMappingURL=fineract-loanproducts-api.d.ts.map