/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import { categoriesCreate } from "../funcs/categoriesCreate.js";
import { categoriesDelete } from "../funcs/categoriesDelete.js";
import { categoriesGet } from "../funcs/categoriesGet.js";
import { categoriesGetAll } from "../funcs/categoriesGetAll.js";
import { categoriesUpdate } from "../funcs/categoriesUpdate.js";
import { ClientSDK } from "../lib/sdks.js";
import { unwrapAsync } from "../types/fp.js";
import { unwrapResultIterator } from "../types/operations.js";
export class Categories extends ClientSDK {
    /**
     * Get all Categories
     *
     * @remarks
     * Get all of the Line Item Categories on the service provider.
     */
    async getAll(request, options) {
        return unwrapResultIterator(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 unwrapAsync(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 unwrapAsync(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 unwrapAsync(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 unwrapAsync(categoriesDelete(this, request, options));
    }
}
//# sourceMappingURL=categories.js.map