"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.Organizations = void 0;
const organizationsCreate_js_1 = require("../funcs/organizationsCreate.js");
const organizationsDelete_js_1 = require("../funcs/organizationsDelete.js");
const organizationsGet_js_1 = require("../funcs/organizationsGet.js");
const organizationsGetAll_js_1 = require("../funcs/organizationsGetAll.js");
const organizationsUpdate_js_1 = require("../funcs/organizationsUpdate.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 Organizations extends sdks_js_1.ClientSDK {
    /**
     * Get all Organizations
     *
     * @remarks
     * To get all Organizations on the service provider.
     */
    async getAll(request, options) {
        return (0, operations_js_1.unwrapResultIterator)((0, organizationsGetAll_js_1.organizationsGetAll)(this, request, options));
    }
    /**
     * Create an Organization
     *
     * @remarks
     * To create a new Organization. The responding system must return the set of sourcedIds that have been allocated to the newly created org record.
     */
    async create(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, organizationsCreate_js_1.organizationsCreate)(this, request, options));
    }
    /**
     * Get a specific Organization
     *
     * @remarks
     * Get a specific Organization on the service provider. If the corresponding record cannot be located, the api will return a 404 error code and message 'Organization not found.'
     */
    async get(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, organizationsGet_js_1.organizationsGet)(this, request, options));
    }
    /**
     * Update an Organization
     *
     * @remarks
     * To update an existing Organization. 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, organizationsUpdate_js_1.organizationsUpdate)(this, request, options));
    }
    /**
     * Delete an Organization
     *
     * @remarks
     * Perform a soft delete on a specific Organization on the service provider. The operation changes the status of the Organization to 'tobedeleted'.
     */
    async delete(request, options) {
        return (0, fp_js_1.unwrapAsync)((0, organizationsDelete_js_1.organizationsDelete)(this, request, options));
    }
}
exports.Organizations = Organizations;
//# sourceMappingURL=organizations.js.map