"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.Categories = void 0;
const categoriesCreate_js_1 = require("../funcs/categoriesCreate.js");
const categoriesDelete_js_1 = require("../funcs/categoriesDelete.js");
const categoriesGet_js_1 = require("../funcs/categoriesGet.js");
const categoriesGetAll_js_1 = require("../funcs/categoriesGetAll.js");
const categoriesUpdate_js_1 = require("../funcs/categoriesUpdate.js");
const sdks_js_1 = require("../lib/sdks.js");
const fp_js_1 = require("../types/fp.js");
const operations_js_1 = require("../types/operations.js");
class Categories extends sdks_js_1.ClientSDK {
    /**
     * Get all Categories
     *
     * @remarks
     * Get all of the Line Item Categories on the service provider.
     */
    async getAll(request, options) {
        return (0, operations_js_1.unwrapResultIterator)((0, categoriesGetAll_js_1.categoriesGetAll)(this, request, options));
    }
    /**
     * Create a Category
     *
     * @remarks
     * To create a new Category. The responding system must return the set of sourcedIds that have been allocated to the newly created category record. A 'title' MUST be provided when creating a category.
     */
    async create(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, categoriesCreate_js_1.categoriesCreate)(this, request, options));
    }
    /**
     * Get a Category
     *
     * @remarks
     * Get a specific category on the service provider. If the corresponding record cannot be located, the api will return a 404 error code and message 'Category not found.'
     */
    async get(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, categoriesGet_js_1.categoriesGet)(this, request, options));
    }
    /**
     * Update a Category
     *
     * @remarks
     * To update an existing Category. The sourcedId for the record to be updated is supplied by the requesting system.
     */
    async update(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, categoriesUpdate_js_1.categoriesUpdate)(this, request, options));
    }
    /**
     * Delete a Category
     *
     * @remarks
     * Perform a soft delete on a specific Category on the service provider. This operation changes the status of the Category to 'tobedeleted'.
     */
    async delete(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, categoriesDelete_js_1.categoriesDelete)(this, request, options));
    }
}
exports.Categories = Categories;
//# sourceMappingURL=categories.js.map