@arathron/n8n-nodes-zoho-books
Version:
n8n community nodes for Zoho Books and Zoho Inventory API integration - Complete CRUD operations for Sales Orders, Invoices, Items, Vendors, Credit Notes, Payments, Purchase Orders, Bills, Composite Items, Tax Management, Tax Groups, and Tax Exemptions
313 lines (308 loc) • 9.38 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.taxExemptionResource = void 0;
exports.taxExemptionResource = [
{
displayName: 'Resource',
name: 'resource',
type: 'options',
noDataExpression: true,
options: [
{
name: 'Tax Exemption (US only)',
value: 'taxExemption',
},
],
default: 'taxExemption',
required: true,
description: '⚠️ US EDITION ONLY: Tax Exemptions are only available in the US edition of Zoho Books. The node will validate this automatically.',
},
{
displayName: 'Operation',
name: 'operation',
type: 'options',
noDataExpression: true,
displayOptions: {
show: {
resource: ['taxExemption'],
},
},
options: [
{
name: 'Create',
value: 'create',
description: 'Create a new tax exemption (US edition only)',
action: 'Create a tax exemption',
},
{
name: 'Delete',
value: 'delete',
description: 'Delete a tax exemption (US edition only)',
action: 'Delete a tax exemption',
},
{
name: 'Get',
value: 'get',
description: 'Get a tax exemption by ID (US edition only)',
action: 'Get a tax exemption',
},
{
name: 'Get All',
value: 'getAll',
description: 'Get all tax exemptions (US edition only)',
action: 'Get all tax exemptions',
},
{
name: 'Update',
value: 'update',
description: 'Update a tax exemption (US edition only)',
action: 'Update a tax exemption',
},
],
default: 'getAll',
required: true,
},
{
displayName: 'Tax Exemption ID',
name: 'taxExemptionId',
type: 'options',
displayOptions: {
show: {
resource: ['taxExemption'],
operation: ['get', 'update', 'delete'],
},
},
typeOptions: {
loadOptionsMethod: 'getTaxExemptions',
},
default: '',
required: true,
description: 'Select the tax exemption to operate on (US edition only)',
},
{
displayName: 'Tax Exemption Code',
name: 'taxExemptionCode',
type: 'string',
displayOptions: {
show: {
resource: ['taxExemption'],
operation: ['create', 'update'],
},
},
default: '',
required: true,
description: 'The tax exemption code (e.g., "RESELLER", "NONPROFIT") - alphanumeric, spaces, hyphens, and underscores only',
placeholder: 'e.g., RESELLER',
},
{
displayName: 'Description',
name: 'description',
type: 'string',
displayOptions: {
show: {
resource: ['taxExemption'],
operation: ['create', 'update'],
},
},
default: '',
required: false,
description: 'A description of the tax exemption reason',
placeholder: 'e.g., Tax exempted because the contact is a reseller',
},
{
displayName: 'Type',
name: 'type',
type: 'options',
displayOptions: {
show: {
resource: ['taxExemption'],
operation: ['create', 'update'],
},
},
options: [
{
name: 'Customer',
value: 'customer',
description: 'Tax exemption applies to customers',
},
],
default: 'customer',
required: true,
description: 'The type of tax exemption (currently only customer is supported)',
},
{
displayName: 'Return All',
name: 'returnAll',
type: 'boolean',
displayOptions: {
show: {
resource: ['taxExemption'],
operation: ['getAll'],
},
},
default: false,
description: 'Whether to return all results or only up to a given limit',
},
{
displayName: 'Limit',
name: 'limit',
type: 'number',
displayOptions: {
show: {
resource: ['taxExemption'],
operation: ['getAll'],
returnAll: [false],
},
},
typeOptions: {
minValue: 1,
maxValue: 200,
},
default: 50,
description: 'Max number of results to return (max 200)',
},
{
displayName: 'Page',
name: 'page',
type: 'number',
displayOptions: {
show: {
resource: ['taxExemption'],
operation: ['getAll'],
returnAll: [false],
},
},
typeOptions: {
minValue: 1,
},
default: 1,
description: 'Page number for pagination',
},
{
displayName: 'Per Page',
name: 'perPage',
type: 'number',
displayOptions: {
show: {
resource: ['taxExemption'],
operation: ['getAll'],
returnAll: [false],
},
},
typeOptions: {
minValue: 1,
maxValue: 200,
},
default: 50,
description: 'Number of results per page (max 200)',
},
{
displayName: 'Additional Fields',
name: 'additionalFields',
type: 'collection',
placeholder: 'Add Field',
displayOptions: {
show: {
resource: ['taxExemption'],
operation: ['create', 'update'],
},
},
default: {},
options: [
{
displayName: 'Tax Exemption Percentage',
name: 'tax_exemption_percentage',
type: 'number',
default: 100,
description: 'The percentage of tax to be exempted (0-100%)',
typeOptions: {
minValue: 0,
maxValue: 100,
numberPrecision: 2,
},
},
],
},
{
displayName: 'Update Fields',
name: 'updateFields',
type: 'collection',
placeholder: 'Add Field',
displayOptions: {
show: {
resource: ['taxExemption'],
operation: ['update'],
},
},
default: {},
options: [
{
displayName: 'Tax Exemption Code',
name: 'tax_exemption_code',
type: 'string',
default: '',
description: 'The updated tax exemption code',
},
{
displayName: 'Description',
name: 'description',
type: 'string',
default: '',
description: 'The updated description',
},
{
displayName: 'Type',
name: 'type',
type: 'options',
options: [
{
name: 'Customer',
value: 'customer',
},
],
default: 'customer',
description: 'The updated type (currently only customer is supported)',
},
{
displayName: 'Tax Exemption Percentage',
name: 'tax_exemption_percentage',
type: 'number',
default: 100,
description: 'The updated percentage of tax to be exempted',
typeOptions: {
minValue: 0,
maxValue: 100,
numberPrecision: 2,
},
},
],
},
{
displayName: '⚠️ US Edition Requirement',
name: 'usEditionNotice',
type: 'notice',
displayOptions: {
show: {
resource: ['taxExemption'],
},
},
default: '',
description: `**IMPORTANT:** Tax Exemptions are only available in the US edition of Zoho Books.
🔍 **How to check your edition:**
• Go to Zoho Books → Settings → Organization Profile
• Look for "Country" or "Edition" information
🌍 **Current supported countries/editions:**
• United States (US)
• USA
• Any organization with country_code = "US"
❌ **What happens if not US edition:**
• The node will show a clear error message
• No API calls will be made to avoid unnecessary rate limiting
• You'll need to contact Zoho support to migrate to US edition
📞 **Need help?**
• Contact Zoho Books support to upgrade your edition
• Or use the Tax and Tax Group resources instead
📚 **Reference:** https://www.zoho.com/books/api/v3/taxes/#overview`,
},
];
//# sourceMappingURL=TaxExemption.descriptions.js.map