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

@@ -29,6 +29,10 @@ import {
OptionsWithUri,
} from 'request';
import {
QuickBooksOAuth2Credentials,
} from './types';
/**
* Make an authenticated API request to QuickBooks.
*/
@@ -53,7 +57,7 @@ export async function quickBooksApiRequest(
const productionUrl = 'https://quickbooks.api.intuit.com';
const sandboxUrl = 'https://sandbox-quickbooks.api.intuit.com';
const credentials = this.getCredentials('quickBooksOAuth2Api') as IDataObject;
const credentials = this.getCredentials('quickBooksOAuth2Api') as QuickBooksOAuth2Credentials;
const options: OptionsWithUri = {
headers: {