Separate scopes and add purchase operations to QuickBooks node (#1859)

* allow qbo to use accounting or payment scopes separately

* added purchase get and getall

* removed irrelevant field options

*  Sort alphabetically

* 🔥 Remove unused file

* ✏️ Fix description casing

*  Add credentials type

* ✏️ Fix resource dividers

* 🔨 Format import

* ✏️ Fix documentation link

*  Refactor credentials

*  Use multiOptions for scopes

* 🔥 Remove payment scope

The payment scope is used only by the QuickBooks Payments API, but this node implements the QuickBooks Online API, which only needs the accounting scope.

* 🚚 Rename node to QuickBooks Online

This reflects the specific API implemented in this node and allows for a future QuickBooks Payments node. Until node versioning is released, only display name changed.

Co-authored-by: Calvin Tan <calvin14@gmail.com>
This commit is contained in:
Iván Ovejero
2021-06-27 13:21:11 +02:00
committed by GitHub
parent 224a26c922
commit 91a5bc3bc4
6 changed files with 206 additions and 22 deletions

View File

@@ -3,11 +3,6 @@ import {
INodeProperties,
} from 'n8n-workflow';
const scopes = [
'com.intuit.quickbooks.accounting',
'com.intuit.quickbooks.payment',
];
// https://developer.intuit.com/app/developer/qbo/docs/develop/authentication-and-authorization
export class QuickBooksOAuth2Api implements ICredentialType {
@@ -15,7 +10,7 @@ export class QuickBooksOAuth2Api implements ICredentialType {
extends = [
'oAuth2Api',
];
displayName = 'QuickBooks OAuth2 API';
displayName = 'QuickBooks Online OAuth2 API';
documentationUrl = 'quickbooks';
properties: INodeProperties[] = [
{
@@ -34,7 +29,7 @@ export class QuickBooksOAuth2Api implements ICredentialType {
displayName: 'Scope',
name: 'scope',
type: 'hidden',
default: scopes.join(' '),
default: 'com.intuit.quickbooks.accounting',
},
{
displayName: 'Auth URI Query Parameters',