Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions integrations/.nango/nango.json
Original file line number Diff line number Diff line change
Expand Up @@ -11883,7 +11883,7 @@
"ActionInput_quickbooks_createinvoice",
"ActionOutput_quickbooks_createinvoice"
],
"version": "1.0.0"
"version": "1.0.1"
},
{
"type": "action",
Expand Down Expand Up @@ -12059,7 +12059,7 @@
"ActionInput_quickbooks_updateinvoice",
"ActionOutput_quickbooks_updateinvoice"
],
"version": "1.0.0"
"version": "1.0.1"
},
{
"type": "action",
Expand Down
6 changes: 6 additions & 0 deletions integrations/.nango/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -49447,6 +49447,9 @@
"additionalProperties": false
}
},
"txn_date": {
"type": "string"
},
"due_date": {
"type": "string"
},
Expand Down Expand Up @@ -52104,6 +52107,9 @@
"additionalProperties": false
}
},
"txn_date": {
"type": "string"
},
"due_date": {
"type": "string"
},
Expand Down
2 changes: 2 additions & 0 deletions integrations/.nango/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10468,6 +10468,7 @@ export interface ActionInput_quickbooks_createinvoice {
unit_price_cents?: number | undefined;
discount_rate?: number | undefined;
description?: string | undefined;})[];
txn_date?: string | undefined;
due_date?: string | undefined;
currency_ref: { name?: string | undefined;
value: string;};
Expand Down Expand Up @@ -10938,6 +10939,7 @@ export interface ActionInput_quickbooks_updateinvoice {
unit_price_cents?: number | undefined;
discount_rate?: number | undefined;
description?: string | undefined;})[];
txn_date?: string | undefined;
due_date?: string | undefined;
currency_ref: { name?: string | undefined;
value: string;};
Expand Down
4 changes: 2 additions & 2 deletions integrations/quickbooks/.nango/nango.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"ActionInput_quickbooks_createinvoice",
"ActionOutput_quickbooks_createinvoice"
],
"version": "1.0.0"
"version": "1.0.1"
},
{
"type": "action",
Expand Down Expand Up @@ -286,7 +286,7 @@
"ActionInput_quickbooks_updateinvoice",
"ActionOutput_quickbooks_updateinvoice"
],
"version": "1.0.0"
"version": "1.0.1"
},
{
"type": "action",
Expand Down
6 changes: 6 additions & 0 deletions integrations/quickbooks/.nango/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1736,6 +1736,9 @@
"additionalProperties": false
}
},
"txn_date": {
"type": "string"
},
"due_date": {
"type": "string"
},
Expand Down Expand Up @@ -4393,6 +4396,9 @@
"additionalProperties": false
}
},
"txn_date": {
"type": "string"
},
"due_date": {
"type": "string"
},
Expand Down
2 changes: 2 additions & 0 deletions integrations/quickbooks/.nango/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ export interface ActionInput_quickbooks_createinvoice {
unit_price_cents?: number | undefined;
discount_rate?: number | undefined;
description?: string | undefined;})[];
txn_date?: string | undefined;
due_date?: string | undefined;
currency_ref: { name?: string | undefined;
value: string;};
Expand Down Expand Up @@ -859,6 +860,7 @@ export interface ActionInput_quickbooks_updateinvoice {
unit_price_cents?: number | undefined;
discount_rate?: number | undefined;
description?: string | undefined;})[];
txn_date?: string | undefined;
due_date?: string | undefined;
currency_ref: { name?: string | undefined;
value: string;};
Expand Down
1 change: 1 addition & 0 deletions integrations/quickbooks/actions/create-invoice.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ _No request parameters_
"description?": "<string>"
}
],
"txn_date?": "<string>",
"due_date?": "<string>",
"currency_ref": {
"name?": "<string>",
Expand Down
2 changes: 1 addition & 1 deletion integrations/quickbooks/actions/create-invoice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { Invoice, CreateInvoice } from '../models.js';
*/
const action = createAction({
description: 'Creates a single invoice in QuickBooks.',
version: '1.0.0',
version: '1.0.1',

endpoint: {
method: 'POST',
Expand Down
2 changes: 1 addition & 1 deletion integrations/quickbooks/actions/update-invoice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { Invoice, UpdateInvoice } from '../models.js';
*/
const action = createAction({
description: 'Updates a single invoice in QuickBooks.',
version: '1.0.0',
version: '1.0.1',

endpoint: {
method: 'PUT',
Expand Down
9 changes: 5 additions & 4 deletions integrations/quickbooks/mappers/to-invoice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ export function toQuickBooksInvoice(invoice: CreateInvoice | UpdateInvoice): Par
quickBooksInvoice.CustomerRef = customerRef;
}

if (invoice.txn_date) {
quickBooksInvoice.TxnDate = toDate(invoice.txn_date);
}

if (invoice.due_date) {
quickBooksInvoice.DueDate = toDate(invoice.due_date);
}
Expand All @@ -77,10 +81,7 @@ export function toQuickBooksInvoice(invoice: CreateInvoice | UpdateInvoice): Par

if (line.sales_item_line_detail) {
qbLine.SalesItemLineDetail = {
ItemRef: {
value: line.sales_item_line_detail.item_ref.value,
name: line.sales_item_line_detail.item_ref.name ?? ''
}
ItemRef: { value: line.sales_item_line_detail.item_ref.value, name: line.sales_item_line_detail.item_ref.name ?? '' }
};

if (line.quantity) {
Expand Down
2 changes: 2 additions & 0 deletions integrations/quickbooks/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ export type Line = z.infer<typeof Line>;
export const CreateInvoice = z.object({
customer_ref: Reference,
line: Line.array(),
txn_date: z.string().optional(),
due_date: z.string().optional(),
currency_ref: Reference,
project_ref: Reference
Expand All @@ -263,6 +264,7 @@ export type CreateInvoice = z.infer<typeof CreateInvoice>;
export const UpdateInvoice = z.object({
customer_ref: Reference,
line: Line.array(),
txn_date: z.string().optional(),
due_date: z.string().optional(),
currency_ref: Reference,
project_ref: Reference,
Expand Down
1 change: 1 addition & 0 deletions integrations/quickbooks/schema.zod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ export const lineSchema = z.object({
export const createInvoiceSchema = z.object({
customer_ref: referenceSchema.optional(),
line: z.array(lineSchema).optional(),
txn_date: z.string.optional(),
due_date: z.string().optional(),
currency_ref: referenceSchema.optional(),
project_ref: referenceSchema.optional()
Expand Down
20 changes: 16 additions & 4 deletions internal/flows.zero.json
Original file line number Diff line number Diff line change
Expand Up @@ -72044,7 +72044,7 @@
"output": ["ActionOutput_quickbooks_createinvoice"],
"scopes": ["com.intuit.quickbooks.accounting"],
"usedModels": ["ActionInput_quickbooks_createinvoice", "ActionOutput_quickbooks_createinvoice"],
"version": "1.0.0"
"version": "1.0.1"
},
{
"type": "action",
Expand Down Expand Up @@ -72164,7 +72164,7 @@
"output": ["ActionOutput_quickbooks_updateinvoice"],
"scopes": ["com.intuit.quickbooks.accounting"],
"usedModels": ["ActionInput_quickbooks_updateinvoice", "ActionOutput_quickbooks_updateinvoice"],
"version": "1.0.0"
"version": "1.0.1"
},
{
"type": "action",
Expand Down Expand Up @@ -73850,6 +73850,9 @@
"additionalProperties": false
}
},
"txn_date": {
"type": "string"
},
"due_date": {
"type": "string"
},
Expand Down Expand Up @@ -76094,6 +76097,9 @@
"additionalProperties": false
}
},
"txn_date": {
"type": "string"
},
"due_date": {
"type": "string"
},
Expand Down Expand Up @@ -76787,7 +76793,7 @@
"output": ["ActionOutput_quickbooks_createinvoice"],
"scopes": ["com.intuit.quickbooks.accounting"],
"usedModels": ["ActionInput_quickbooks_createinvoice", "ActionOutput_quickbooks_createinvoice"],
"version": "1.0.0"
"version": "1.0.1"
},
{
"type": "action",
Expand Down Expand Up @@ -76907,7 +76913,7 @@
"output": ["ActionOutput_quickbooks_updateinvoice"],
"scopes": ["com.intuit.quickbooks.accounting"],
"usedModels": ["ActionInput_quickbooks_updateinvoice", "ActionOutput_quickbooks_updateinvoice"],
"version": "1.0.0"
"version": "1.0.1"
},
{
"type": "action",
Expand Down Expand Up @@ -78593,6 +78599,9 @@
"additionalProperties": false
}
},
"txn_date": {
"type": "string"
},
"due_date": {
"type": "string"
},
Expand Down Expand Up @@ -80837,6 +80846,9 @@
"additionalProperties": false
}
},
"txn_date": {
"type": "string"
},
"due_date": {
"type": "string"
},
Expand Down
Loading