zohobooks-sdk
Version:
SDK for ZohoBooks integration
36 lines (35 loc) • 1.03 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Estimates = void 0;
const endpoints_1 = require("../../constants/endpoints");
const api_client_1 = require("common/api-client");
class Estimates extends api_client_1.ApiClient {
constructor(baseApi) {
super(baseApi, endpoints_1.EndPoint.ESTIMATES);
}
create(data) {
return this.api.post("/", data);
}
list() {
return this.api.get("/");
}
get(estimateId) {
return this.api.get(`/${estimateId}`);
}
update(estimateId, data) {
return this.api.put(`/${estimateId}`, data);
}
delete(estimateId) {
return this.api.delete(`/${estimateId}`);
}
sendEmail(estimateId) {
return this.api.post(`/${estimateId}/email`);
}
markAsSent(estimateId) {
return this.api.post(`/${estimateId}/status/sent`);
}
convertToInvoice(estimateId) {
return this.api.post(`/${estimateId}/convert`);
}
}
exports.Estimates = Estimates;