import { Service } from "../service.ts";import { Payload } from "../client.ts";import { TombaException } from "../exception.ts";
export class LeadsAttributes extends Service { async getLeadAttributes<T extends unknown>(): Promise<T> { let path = "/leads/attributes/{id}"; let payload: Payload = {};
return await this.client.call("get", path, { "content-type": "application/json", }, payload); }
async deleteLeadAttribute<T extends unknown>(id: string): Promise<T> { if (typeof id === "undefined") { throw new TombaException('Missing required parameter: "id"'); }
let path = "/leads/attributes/{id}".replace("{id}", id); let payload: Payload = {};
return await this.client.call("delete", path, { "content-type": "application/json", }, payload); }
async createLeadAttribute<T extends unknown>(): Promise<T> { let path = "/leads/attributes/{id}"; let payload: Payload = {};
return await this.client.call("post", path, { "content-type": "application/json", }, payload); }
async updateLeadAttribute<T extends unknown>(id: string): Promise<T> { if (typeof id === "undefined") { throw new TombaException('Missing required parameter: "id"'); }
let path = "/leads/attributes/{id}".replace("{id}", id); let payload: Payload = {};
return await this.client.call("put", path, { "content-type": "application/json", }, payload); }}