"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createOrUpdateOrganizationById = createOrUpdateOrganizationById;
async function createOrUpdateOrganizationById(request, domain, organizationId, organization) {
    if (organizationId) {
        return request(`https://${domain}.pipedrive.com/api/v1/organizations/${organizationId}`, {
            method: 'put',
            json: organization
        });
    }
    else {
        return request(`https://${domain}.pipedrive.com/api/v1/organizations`, {
            method: 'post',
            json: organization
        });
    }
}
//# sourceMappingURL=organizations.js.map