"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.LineItems = void 0;
const lineItemsCreate_js_1 = require("../funcs/lineItemsCreate.js");
const lineItemsDelete_js_1 = require("../funcs/lineItemsDelete.js");
const lineItemsGet_js_1 = require("../funcs/lineItemsGet.js");
const lineItemsList_js_1 = require("../funcs/lineItemsList.js");
const lineItemsUpdate_js_1 = require("../funcs/lineItemsUpdate.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 LineItems extends sdks_js_1.ClientSDK {
    /**
     * Get all Line Items
     *
     * @remarks
     * Get all of the Line Items on the service provider.
     */
    async list(request, options) {
        return (0, operations_js_1.unwrapResultIterator)((0, lineItemsList_js_1.lineItemsList)(this, request, options));
    }
    /**
     * Create a Line Item
     *
     * @remarks
     * To create a new Line Item. The responding system must return the set of sourcedIds that have been allocated to the newly created Line Item records.
     */
    async create(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, lineItemsCreate_js_1.lineItemsCreate)(this, request, options));
    }
    /**
     * Get a Line Item
     *
     * @remarks
     * Get a specific Line Item on the service provider. If the corresponding record cannot be located, the api will return a 404 error code and message 'Line item not found.'
     */
    async get(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, lineItemsGet_js_1.lineItemsGet)(this, request, options));
    }
    /**
     * Update a Line Item
     *
     * @remarks
     * To update an existing Line Item. 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, lineItemsUpdate_js_1.lineItemsUpdate)(this, request, options));
    }
    /**
     * Delete a Line Item
     *
     * @remarks
     * Perform a soft delete on a specific Line Item on the service provider. This operation changes the status of the LineItem to 'tobedeleted'.
     */
    async delete(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, lineItemsDelete_js_1.lineItemsDelete)(this, request, options));
    }
}
exports.LineItems = LineItems;
//# sourceMappingURL=lineitems.js.map