conductor-node 11.8.0 → 11.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package.json +1 -1
- package/dist/src/Client.d.ts +0 -2
- package/dist/src/Client.js +0 -3
- package/dist/src/integrations/BaseIntegration.d.ts +1 -1
- package/dist/src/integrations/qbd/QbdIntegration.d.ts +25 -0
- package/dist/src/integrations/qbd/QbdIntegration.js +25 -0
- package/dist/src/integrations/qbd/qbdTypes.d.ts +180 -0
- package/dist/src/resources/EndUsersResource.d.ts +1 -2
- package/dist/src/resources/{IntegrationConnectionsResource.d.ts → types.d.ts} +4 -11
- package/package.json +1 -1
- package/dist/src/resources/IntegrationConnectionsResource.js +0 -17
- package/dist/src/resources/base.d.ts +0 -5
- /package/dist/src/resources/{base.js → types.js} +0 -0
package/dist/package.json
CHANGED
package/dist/src/Client.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import QbdIntegration from "./integrations/qbd/QbdIntegration";
|
|
2
2
|
import AuthSessionsResource from "./resources/AuthSessionsResource";
|
|
3
3
|
import EndUsersResource from "./resources/EndUsersResource";
|
|
4
|
-
import IntegrationConnectionsResource from "./resources/IntegrationConnectionsResource";
|
|
5
4
|
export interface ClientOptions {
|
|
6
5
|
/**
|
|
7
6
|
* Enables logging each request, response, and error.
|
|
@@ -10,7 +9,6 @@ export interface ClientOptions {
|
|
|
10
9
|
}
|
|
11
10
|
export default class Client {
|
|
12
11
|
readonly endUsers: EndUsersResource;
|
|
13
|
-
readonly integrationConnections: IntegrationConnectionsResource;
|
|
14
12
|
readonly authSessions: AuthSessionsResource;
|
|
15
13
|
/**
|
|
16
14
|
* Executes any QuickBooks Desktop (QBD) API against the specified EndUser.
|
package/dist/src/Client.js
CHANGED
|
@@ -9,12 +9,10 @@ const errorHandling_1 = require("./interceptors/errorHandling");
|
|
|
9
9
|
const logging_1 = require("./interceptors/logging");
|
|
10
10
|
const AuthSessionsResource_1 = __importDefault(require("./resources/AuthSessionsResource"));
|
|
11
11
|
const EndUsersResource_1 = __importDefault(require("./resources/EndUsersResource"));
|
|
12
|
-
const IntegrationConnectionsResource_1 = __importDefault(require("./resources/IntegrationConnectionsResource"));
|
|
13
12
|
const checkForUpdates_1 = require("./utils/checkForUpdates");
|
|
14
13
|
const axios_1 = __importDefault(require("axios"));
|
|
15
14
|
class Client {
|
|
16
15
|
endUsers;
|
|
17
|
-
integrationConnections;
|
|
18
16
|
authSessions;
|
|
19
17
|
/**
|
|
20
18
|
* Executes any QuickBooks Desktop (QBD) API against the specified EndUser.
|
|
@@ -25,7 +23,6 @@ class Client {
|
|
|
25
23
|
(0, checkForUpdates_1.checkForUpdates)();
|
|
26
24
|
this.httpClient = this.createHttpClient(apiKey, verbose);
|
|
27
25
|
this.endUsers = new EndUsersResource_1.default(this.httpClient);
|
|
28
|
-
this.integrationConnections = new IntegrationConnectionsResource_1.default(this.httpClient);
|
|
29
26
|
this.authSessions = new AuthSessionsResource_1.default(this.httpClient);
|
|
30
27
|
this.qbd = new QbdIntegration_1.default(this.httpClient);
|
|
31
28
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EndUser } from "../resources/EndUsersResource";
|
|
2
|
-
import type { IntegrationSlug } from "../resources/
|
|
2
|
+
import type { IntegrationSlug } from "../resources/types";
|
|
3
3
|
import type { AxiosInstance } from "axios";
|
|
4
4
|
export default abstract class BaseIntegration {
|
|
5
5
|
protected readonly httpClient: AxiosInstance;
|
|
@@ -32,6 +32,31 @@ export default class QbdIntegration extends BaseIntegration {
|
|
|
32
32
|
*/
|
|
33
33
|
query: (endUserId: string, params?: QbdTypes.AccountQueryRq) => Promise<NonNullable<QbdTypes.AccountQueryRs["AccountRet"]>>;
|
|
34
34
|
};
|
|
35
|
+
/**
|
|
36
|
+
* A credit card refund transaction is a transaction that represents a
|
|
37
|
+
* refund of a credit card charge.
|
|
38
|
+
*/
|
|
39
|
+
arRefundCreditCard: {
|
|
40
|
+
/**
|
|
41
|
+
* Adds a credit card refund transaction that is linked to one or more
|
|
42
|
+
* QuickBooks credit memo transactions. You can link the credit card refund
|
|
43
|
+
* to one or more of those credit transactions.
|
|
44
|
+
*
|
|
45
|
+
* Notice that this provides functionality over and above what the UI
|
|
46
|
+
* provides, which currently allows a user to link only one credit card
|
|
47
|
+
* refund to one credit transaction.
|
|
48
|
+
*
|
|
49
|
+
* See more:
|
|
50
|
+
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/ARRefundCreditCardAdd
|
|
51
|
+
*/
|
|
52
|
+
add: (endUserId: string, params: QbdTypes.ARRefundCreditCardAddRq["ARRefundCreditCardAdd"]) => Promise<NonNullable<QbdTypes.ARRefundCreditCardAddRs["ARRefundCreditCardRet"]>>;
|
|
53
|
+
/**
|
|
54
|
+
* Retrieves the specified credit card refund transaction or transactions.
|
|
55
|
+
*
|
|
56
|
+
* See more: https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/ARRefundCreditCardQuery
|
|
57
|
+
*/
|
|
58
|
+
query: (endUserId: string, params?: QbdTypes.ARRefundCreditCardQueryRq) => Promise<NonNullable<QbdTypes.ARRefundCreditCardQueryRs["ARRefundCreditCardRet"]>>;
|
|
59
|
+
};
|
|
35
60
|
/**
|
|
36
61
|
* A bill is a transaction that represents a request-for-payment from a vendor
|
|
37
62
|
* for goods or services that it has provided.
|
|
@@ -37,6 +37,31 @@ class QbdIntegration extends BaseIntegration_1.default {
|
|
|
37
37
|
*/
|
|
38
38
|
query: async (endUserId, params = {}) => this.sendRequestWrapper(endUserId, { AccountQueryRq: params }, "AccountQueryRs", "AccountRet"),
|
|
39
39
|
};
|
|
40
|
+
/**
|
|
41
|
+
* A credit card refund transaction is a transaction that represents a
|
|
42
|
+
* refund of a credit card charge.
|
|
43
|
+
*/
|
|
44
|
+
arRefundCreditCard = {
|
|
45
|
+
/**
|
|
46
|
+
* Adds a credit card refund transaction that is linked to one or more
|
|
47
|
+
* QuickBooks credit memo transactions. You can link the credit card refund
|
|
48
|
+
* to one or more of those credit transactions.
|
|
49
|
+
*
|
|
50
|
+
* Notice that this provides functionality over and above what the UI
|
|
51
|
+
* provides, which currently allows a user to link only one credit card
|
|
52
|
+
* refund to one credit transaction.
|
|
53
|
+
*
|
|
54
|
+
* See more:
|
|
55
|
+
* https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/ARRefundCreditCardAdd
|
|
56
|
+
*/
|
|
57
|
+
add: async (endUserId, params) => this.sendRequestWrapper(endUserId, { ARRefundCreditCardAddRq: { ARRefundCreditCardAdd: params } }, "ARRefundCreditCardAddRs", "ARRefundCreditCardRet"),
|
|
58
|
+
/**
|
|
59
|
+
* Retrieves the specified credit card refund transaction or transactions.
|
|
60
|
+
*
|
|
61
|
+
* See more: https://developer.intuit.com/app/developer/qbdesktop/docs/api-reference/qbdesktop/ARRefundCreditCardQuery
|
|
62
|
+
*/
|
|
63
|
+
query: async (endUserId, params = {}) => this.sendRequestWrapper(endUserId, { ARRefundCreditCardQueryRq: params }, "ARRefundCreditCardQueryRs", "ARRefundCreditCardRet"),
|
|
64
|
+
};
|
|
40
65
|
/**
|
|
41
66
|
* A bill is a transaction that represents a request-for-payment from a vendor
|
|
42
67
|
* for goods or services that it has provided.
|
|
@@ -423,6 +423,148 @@ export interface ARAccountRef {
|
|
|
423
423
|
/** `FullName` (along with `ListID`) is a way to identify a list object. The `FullName` is the name prefixed by the names of each ancestor, for example `Jones:Kitchen:Cabinets`. `FullName` values are not case-sensitive. */
|
|
424
424
|
FullName?: string;
|
|
425
425
|
}
|
|
426
|
+
export interface ARRefundCreditCardAdd {
|
|
427
|
+
/** The customer list includes information about the QuickBooks user’s customers and the individual jobs that are being performed for them. A `CustomerRef` aggregate refers to one of the customers (or customer jobs) on the list. In a request, if a `CustomerRef` aggregate includes both `FullName` and `ListID`, `FullName` will be ignored. Special cases to note: In `SalesReceipt` and `ReceivePayment` requests, `CustomerRef` refers to the customer or customer job to which the payment is credited. In a `TimeTracking` request, `CustomerRef` refers to the customer or customer job to which this time could be billed. If `IsBillable` is set to true, `CustomerRef` is required in `TimeTrackingAdd`. In an `ExpenseLineAdd` request, if `AccountRef` refers to an A/P account, `CustomerRef` must refer to a vendor (not to a customer). If `AccountRef` refers to any other type of account, the `CustomerRef` must refer to a customer. */
|
|
428
|
+
CustomerRef: CustomerRef;
|
|
429
|
+
/** In an `ARRefundCreditCardAdd`, the account which is the source of funds for the credit card refund. Normally this is Undeposited Funds. However, you can specify another account if you wish. If you specify nothing here, Undeposited Funds is used by default. */
|
|
430
|
+
RefundFromAccountRef?: RefundFromAccountRef;
|
|
431
|
+
/** Refers to an accounts receivable account in the QuickBooks file. (The `AccountType` of this account will be `AccountsReceivable`.) If an `ARAccountRef` aggregate includes both `FullName` and `ListID`, `FullName` will be ignored.
|
|
432
|
+
|
|
433
|
+
If this field is in a transaction that links to other transactions, make sure this `ARAccountRef` matches the `ARAccountRef` used in the other transactions. For example, in an `ARRefundCreditCard` transaction, the `ARAccountRef` of the credit card refund transaction must match the `ARAccountRef` used in each of the linked credit transactions. */
|
|
434
|
+
ARAccountRef?: ARAccountRef;
|
|
435
|
+
/** The date of the transaction. In some cases, if you leave `TxnDate` out of an -Add message, QuickBooks will prefill `TxnDate` with the date of the last-saved transaction of the same type. */
|
|
436
|
+
TxnDate?: string;
|
|
437
|
+
/** A string of characters that refers to this transaction and that can be arbitrarily changed by the QuickBooks user.
|
|
438
|
+
|
|
439
|
+
In a `BillPaymentCheckAdd` request, if you want to set the check number, use `RefNumber`.
|
|
440
|
+
|
|
441
|
+
Note (especially relevant to `CheckAdd` requests): When `RefNumber` is left blank in an SDK transaction add request (that is, or ), the `RefNumber` will be left blank in QuickBooks. This behavior is new as of QBFC3. It used to select the next sequential reference number since the last one used by QuickBooks, as though no `RefNumber` had been provided. This is especially relevant to `CheckAdd` requests because with the current behavior, you will not know the number until the check is printed. */
|
|
442
|
+
RefNumber?: string;
|
|
443
|
+
/** If an address request fails, some combination of address fields might be too long. In a Check, `BillPaymentCheck`, or `SalesTaxPaymentCheck` message, `Address` is the address that will print on the check. */
|
|
444
|
+
Address?: Address;
|
|
445
|
+
/** A customer’s payment method, for example, cash, check, or Master Card. A `PaymentMethodRef` aggregate refers to an item on the `PaymentMethod` list. In a request, if a `PaymentMethodRef` aggregate includes both `FullName` and `ListID`, `FullName` will be ignored.
|
|
446
|
+
|
|
447
|
+
In a `SalesReceiptAdd`, `ReceivePaymentAdd`, or `ARRefundCreditCard` request that contains credit card transaction data supplied from QBMS transaction responses, you must specify the payment method, and the payment method must be a credit card type. */
|
|
448
|
+
PaymentMethodRef?: PaymentMethodRef;
|
|
449
|
+
/** Additional information. */
|
|
450
|
+
Memo?: string;
|
|
451
|
+
/** Contains data from the credit card transaction used in the payment. This data originates from a previous `qbmsXML` credit card transaction. The data following the element `CreditCardTxnInputInfo`” data is the data from the original `qbmsXML` request. The “`CreditCardTxnResultInfo`” is the data from the original `qbmsXML` response. */
|
|
452
|
+
CreditCardTxnInfo?: CreditCardTxnInfo;
|
|
453
|
+
/** The exchange rate is the market price for which this currency can be exchanged for the currency used by the QuickBooks company file as the “home” currency. The exchange rate should be considered a snapshot of the rates in effect at the `AsOfDate`.
|
|
454
|
+
|
|
455
|
+
You can update the exchange rate using the exchange rate property when you add a transaction. However, you need to obtain and supply the exchange rate. If you are using USD (United States Dollars) as the home currency and are connected to the Internet, you can download the current exchange rates for all active currencies automatically in the QuickBooks UI by selecting Lists->Currency->Activities->Download latest exchange rates. (Currently, you can’t do this in the SDK.) */
|
|
456
|
+
ExchangeRate?: number;
|
|
457
|
+
/** Allows for the attachment of a user defined GUID value. */
|
|
458
|
+
ExternalGUID?: string;
|
|
459
|
+
/** The list of credit transactions that are being linked and used in this credit card refund. */
|
|
460
|
+
RefundAppliedToTxnAdd: RefundAppliedToTxnAdd | RefundAppliedToTxnAdd[];
|
|
461
|
+
}
|
|
462
|
+
export interface ARRefundCreditCardAddRq {
|
|
463
|
+
ARRefundCreditCardAdd: ARRefundCreditCardAdd;
|
|
464
|
+
/** You use this if you want to limit the data that will be returned in the response. In this list, you specify the name of each top-level element or aggregate that you want to be returned in the response to the request. You cannot specify fields within an aggregate, for example, you cannot specify a `City` within an `Address`: you must specify `Address` and will get the entire address.
|
|
465
|
+
|
|
466
|
+
The names specified in the list are not parsed, so you must be especially careful to supply valid names, properly cased. No error is returned in the status code if you specify an invalid name.
|
|
467
|
+
|
|
468
|
+
Notice that if you want to return custom data or private data extensions, you must specify the `DataExtRet` element and you must supply the `OwnerID` set to either a value of 0 (custom data) or the GUID for the private data. */
|
|
469
|
+
IncludeRetElement?: string | string[];
|
|
470
|
+
}
|
|
471
|
+
export interface ARRefundCreditCardAddRs {
|
|
472
|
+
ARRefundCreditCardRet?: ARRefundCreditCardRet;
|
|
473
|
+
ErrorRecovery?: ErrorRecovery;
|
|
474
|
+
}
|
|
475
|
+
export interface ARRefundCreditCardQueryRq {
|
|
476
|
+
/** One or more `TxnID` values. QuickBooks generates a unique `TxnID` for each transaction that is added to QuickBooks. Notice that you cannot supply the `TxnID` of a `TimeTracking` transaction to `TransactionQuery` requests. If you do, you get an error stating that no such record could be found, even though the transaction is in QuickBooks. This behavior reflects the behavior in the QuicKBooks UI in the Find window. */
|
|
477
|
+
TxnID?: string | string[];
|
|
478
|
+
/** A list of one or more `RefNumber` values. A `RefNumber` is a string of characters that refers to a transaction and that can be arbitrarily changed by the QuickBooks user. Note (especially relevant to `CheckAdd` requests): When `RefNumber` is left blank in an SDK transaction add request, the `RefNumber` will be left blank in QuickBooks. This behavior is new as of QBFC3. It used to select the next sequential reference number since the last one used by QuickBooks, as though no `RefNumber` had been provided. This is especially relevant to `CheckAdd` requests because with the current behavior, you will not know the number until the check is printed. */
|
|
479
|
+
RefNumber?: string | string[];
|
|
480
|
+
/** A list of one or more case sensitive `RefNumber` values. A `RefNumber` is a string of characters that refers to a transaction and that can be arbitrarily changed by the QuickBooks user. You should use this case sensitive ref number list rather than the older `RefNumber` list, because it provides much better performance in certain circumstances. The older `refNumber` list provided slow performance if the `refNumber` values contained letters, not just digits. This `RefNumberCaseSensitive` list, new in SDK 4.0, eliminates this performance hit. */
|
|
481
|
+
RefNumberCaseSensitive?: string | string[];
|
|
482
|
+
/** Limits the number of objects that a query returns. (To get a count of how many objects could possibly be returned, use the `metaData` query attribute.) If you include a `MaxReturned` value, it must be at least 1. */
|
|
483
|
+
MaxReturned?: number;
|
|
484
|
+
/** Filters according to the dates when transactions were last modified. The `ModifiedDateRangeFilter` aggregate is not required to contain any elements, but if it is empty, we recommend that you leave it out altogether. Note that the time portion of the `FromModifiedDate` and `ToModifiedDate` fields was not supported in qbXML version 1.0 or 1.1. (To filter according to the dates when transactions were deleted, use a `TxnDeletedQuery` message.) */
|
|
485
|
+
ModifiedDateRangeFilter?: ModifiedDateRangeFilter;
|
|
486
|
+
/** Filters according to the original transaction dates. */
|
|
487
|
+
TxnDateRangeFilter?: TxnDateRangeFilter;
|
|
488
|
+
/** An entity refers to a person on the QuickBooks Customer list, Vendor list, Employee list, or Other Names list. You can use an `EntityQuery` request to get information about all the entities that are set up in the QuickBooks file. In an `ARRefundCreditCard` query, this must be a customer/customer job. */
|
|
489
|
+
EntityFilter?: EntityFilter;
|
|
490
|
+
/** Filters according to the account name or `ListID`. If the “Use account numbers” preference is enabled in the QuickBooks company file, you can specify an account number (instead of an account name) for `FullName` and get the account you’re looking for. But if numbers have been used as account names, confusion could arise. For example, if you queried for an account named 2050, and 2050 happened to be the account number of a totally different account, the query would not return what you asked for (the account named 2050), but instead would return the account with the account number 2050. This problem will not happen if the “Use account numbers” preference is turned off in the QuickBooks file, orthe account name exactly matches the account number. (In this case, query would return the correct account either way.) To avoid this problem: Do not name an account using a number unless the number exactly matches the account’s account number. If an account name must contain a number that does not match its own account number, have the QuickBooks user change the account’s name slightly, for example `to` 2050a. */
|
|
491
|
+
AccountFilter?: AccountFilter;
|
|
492
|
+
/** Filters according to `RefNumber`. */
|
|
493
|
+
RefNumberFilter?: RefNumberFilter;
|
|
494
|
+
/** Filters according to `RefNumber`. The filtering code will do a numerical comparison (if `FromRefNumber` and `ToRefNumber` only contain digits) or a lexicographical comparison (if either `FromRefNumber` or `ToRefNumber` contain any nondigit characters). In the first situation, if you need to query for a `RefNumber` that is larger than the maximum long integer value of 2147483647, one workaround is to specify a `FromRefNumber` that is less than or equal to 2147483647 without specifying a `ToRefNumber`. */
|
|
495
|
+
RefNumberRangeFilter?: RefNumberRangeFilter;
|
|
496
|
+
/** Filters by the specified currency. */
|
|
497
|
+
CurrencyFilter?: CurrencyFilter;
|
|
498
|
+
/** This filter allows you to omit line items from a query response to get a smaller result. The default value is false, so line items are omitted by default. Set `IncludeLineItems` to true to include line items in the response if you don’t mind getting a larger result. */
|
|
499
|
+
IncludeLineItems?: boolean;
|
|
500
|
+
/** You use this if you want to limit the data that will be returned in the response. In this list, you specify the name of each top-level element or aggregate that you want to be returned in the response to the request. You cannot specify fields within an aggregate, for example, you cannot specify a `City` within an `Address`: you must specify `Address` and will get the entire address. The names specified in the list are not parsed, so you must be especially careful to supply valid names, properly cased. No error is returned in the status code if you specify an invalid name. Notice that if you want to return custom data or private data extensions, you must specify the `DataExtRet` element and you must supply the `OwnerID` set to either a value of 0 (custom data) or the GUID for the private data. */
|
|
501
|
+
IncludeRetElement?: string | string[];
|
|
502
|
+
/** Zero or more `OwnerID` values. `OwnerID` refers to the owner of a data extension:If `OwnerID` is 0, this is a public data extension, also known as a custom field. Custom fields appear in the QuickBooks UI.If `OwnerID` is a GUID, for example `{6B063959-81B0-4622-85D6-F548C8CCB517}`, this field is a private data extension defined by an integrated application. Private data extensions do not appear in the QuickBooks UI. Note that `OwnerID` values are not case-sensitive, meaning that if you enter an `OwnerID` value with lower-case letters, the value will be saved and returned with upper-case letters. When you share a private data extension with another application, the other application must know both the `OwnerID` and the `DataExtName`, as these together form a data extension’s unique name. */
|
|
503
|
+
OwnerID?: string | string[];
|
|
504
|
+
}
|
|
505
|
+
export interface ARRefundCreditCardQueryRs {
|
|
506
|
+
ARRefundCreditCardRet: ARRefundCreditCardRet[];
|
|
507
|
+
}
|
|
508
|
+
export interface ARRefundCreditCardRet {
|
|
509
|
+
/** QuickBooks generates a unique `TxnID` for each transaction that is added to QuickBooks. A `TxnID` returned from a request can be used to refer to the transaction in subsequent requests.
|
|
510
|
+
|
|
511
|
+
Notice that you cannot supply the `TxnID` of a `TimeTracking` transaction to `TransactionQueryRq` requests. If you do, you get an error stating that no such record could be found, even though the transaction is in QuickBooks. This behavior reflects the behavior in the QuicKBooks UI in the Find window. */
|
|
512
|
+
TxnID?: string;
|
|
513
|
+
/** Time the object was created. */
|
|
514
|
+
TimeCreated?: string;
|
|
515
|
+
/** Time the object was last modified. */
|
|
516
|
+
TimeModified?: string;
|
|
517
|
+
/** A number that the server generates and assigns to this object. Every time the object is changed, the server will change its `EditSequence` value. When you try to modify a list object, you must provide its `EditSequence`. The server compares the `EditSequence` you provide with the `EditSequence` in memory to make sure you are dealing with the latest copy of the object. If you are not, the server will reject the request and return an error. Because `EditSequence` is only used to check whether two objects match, there is no reason to interpret its value. */
|
|
518
|
+
EditSequence?: string;
|
|
519
|
+
/** An identifying number for this transaction. */
|
|
520
|
+
TxnNumber?: number;
|
|
521
|
+
/** The customer list includes information about the QuickBooks user’s customers and the individual jobs that are being performed for them. A `CustomerRef` aggregate refers to one of the customers (or customer jobs) on the list. In a request, if a `CustomerRef` aggregate includes both `FullName` and `ListID`, `FullName` will be ignored. Special cases to note: In `SalesReceipt` and `ReceivePayment` requests, `CustomerRef` refers to the customer or customer job to which the payment is credited. In a `TimeTracking` request, `CustomerRef` refers to the customer or customer job to which this time could be billed. If `IsBillable` is set to true, `CustomerRef` is required in `TimeTrackingAdd`. In an `ExpenseLineAdd` request, if `AccountRef` refers to an A/P account, `CustomerRef` must refer to a vendor (not to a customer). If `AccountRef` refers to any other type of account, the `CustomerRef` must refer to a customer. */
|
|
522
|
+
CustomerRef?: CustomerRef;
|
|
523
|
+
/** In an `ARRefundCreditCardAdd`, the account which is the source of funds for the credit card refund. Normally this is Undeposited Funds. However, you can specify another account if you wish. If you specify nothing here, Undeposited Funds is used by default. */
|
|
524
|
+
RefundFromAccountRef?: RefundFromAccountRef;
|
|
525
|
+
/** Refers to an accounts receivable account in the QuickBooks file. (The `AccountType` of this account will be `AccountsReceivable`.) If an `ARAccountRef` aggregate includes both `FullName` and `ListID`, `FullName` will be ignored.
|
|
526
|
+
|
|
527
|
+
If this field is in a transaction that links to other transactions, make sure this `ARAccountRef` matches the `ARAccountRef` used in the other transactions. For example, in an `ARRefundCreditCard` transaction, the `ARAccountRef` of the credit card refund transaction must match the `ARAccountRef` used in each of the linked credit transactions. */
|
|
528
|
+
ARAccountRef?: ARAccountRef;
|
|
529
|
+
/** The date of the transaction. In some cases, if you leave `TxnDate` out of an -Add message, QuickBooks will prefill `TxnDate` with the date of the last-saved transaction of the same type. */
|
|
530
|
+
TxnDate?: string;
|
|
531
|
+
/** A string of characters that refers to this transaction and that can be arbitrarily changed by the QuickBooks user.
|
|
532
|
+
|
|
533
|
+
In a `BillPaymentCheckAdd` request, if you want to set the check number, use `RefNumber`.
|
|
534
|
+
|
|
535
|
+
Note (especially relevant to `CheckAdd` requests): When `RefNumber` is left blank in an SDK transaction add request (that is, or ), the `RefNumber` will be left blank in QuickBooks. This behavior is new as of QBFC3. It used to select the next sequential reference number since the last one used by QuickBooks, as though no `RefNumber` had been provided. This is especially relevant to `CheckAdd` requests because with the current behavior, you will not know the number until the check is printed. */
|
|
536
|
+
RefNumber?: string;
|
|
537
|
+
/** Total amount of money paid or received. In a receive payment add transaction that has payment amount elements (such as `AppliedToTxnAdd` lines) you must supply a `TotalAmount` and the sum of all the `PaymentAmount` elements must not be greater than the `TotalAmount`. */
|
|
538
|
+
TotalAmount?: string;
|
|
539
|
+
/** The currency object contains all of the information needed by QuickBooks to display and use. For built-in currencies, the name and currency code values are internationally accepted values and thus are not editable. The comma format is editable, as is the `IsActive` status. For user-defined currencies, every value in the object is editable including name and currency code.
|
|
540
|
+
|
|
541
|
+
When used with `PriceLevels`, the `CurrencyRef` should only be used with “per item” price levels. */
|
|
542
|
+
CurrencyRef?: CurrencyRef;
|
|
543
|
+
/** The exchange rate is the market price for which this currency can be exchanged for the currency used by the QuickBooks company file as the “home” currency. The exchange rate should be considered a snapshot of the rates in effect at the `AsOfDate`.
|
|
544
|
+
|
|
545
|
+
You can update the exchange rate using the exchange rate property when you add a transaction. However, you need to obtain and supply the exchange rate. If you are using USD (United States Dollars) as the home currency and are connected to the Internet, you can download the current exchange rates for all active currencies automatically in the QuickBooks UI by selecting Lists->Currency->Activities->Download latest exchange rates. (Currently, you can’t do this in the SDK.) */
|
|
546
|
+
ExchangeRate?: number;
|
|
547
|
+
/** Total amount of money paid or received in the Home Currency. */
|
|
548
|
+
TotalAmountInHomeCurrency?: string;
|
|
549
|
+
/** If an address request fails, some combination of address fields might be too long. In a Check, `BillPaymentCheck`, or `SalesTaxPaymentCheck` message, `Address` is the address that will print on the check. */
|
|
550
|
+
Address?: Address;
|
|
551
|
+
/** The address expressed as an address block of `Addr1` through `Addr5`, depending on the number of lines in the original request that created the address. */
|
|
552
|
+
AddressBlock?: AddressBlock;
|
|
553
|
+
/** A customer’s payment method, for example, cash, check, or Master Card. A `PaymentMethodRef` aggregate refers to an item on the `PaymentMethod` list. In a request, if a `PaymentMethodRef` aggregate includes both `FullName` and `ListID`, `FullName` will be ignored.
|
|
554
|
+
|
|
555
|
+
In a `SalesReceiptAdd`, `ReceivePaymentAdd`, or `ARRefundCreditCard` request that contains credit card transaction data supplied from QBMS transaction responses, you must specify the payment method, and the payment method must be a credit card type. */
|
|
556
|
+
PaymentMethodRef?: PaymentMethodRef;
|
|
557
|
+
/** Additional information. */
|
|
558
|
+
Memo?: string;
|
|
559
|
+
/** Contains data from the credit card transaction used in the payment. This data originates from a previous `qbmsXML` credit card transaction. The data following the element `CreditCardTxnInputInfo`” data is the data from the original `qbmsXML` request. The “`CreditCardTxnResultInfo`” is the data from the original `qbmsXML` response. */
|
|
560
|
+
CreditCardTxnInfo?: CreditCardTxnInfo;
|
|
561
|
+
/** Allows for the attachment of a user defined GUID value. */
|
|
562
|
+
ExternalGUID?: string;
|
|
563
|
+
/** The list of credit transactions that are being linked and used in this credit card refund. */
|
|
564
|
+
RefundAppliedToTxnRet?: RefundAppliedToTxnRet | RefundAppliedToTxnRet[];
|
|
565
|
+
/** A list of `IDataExtRet` objects, each of which represents a field that has been added to QuickBooks as a data extension. */
|
|
566
|
+
DataExtRet?: DataExtRet | DataExtRet[];
|
|
567
|
+
}
|
|
426
568
|
export interface AssetAccountRef {
|
|
427
569
|
/** Along with `FullName`, `ListID` is a way to identify a list object. When a list object is added to QuickBooks through the SDK or through the QuickBooks user interface, the server assigns it a `ListID`. A `ListID` is not unique across lists, but it is unique across each particular type of list. For example, two customers could not have the same `ListID`, and a customer could not have the same `ListID` as an employee (because Customer and Employee are both name lists). But a customer could have the same `ListID` as a non-inventory item. */
|
|
428
570
|
ListID?: string;
|
|
@@ -10356,6 +10498,44 @@ export interface RefNumberRangeFilter {
|
|
|
10356
10498
|
/** The final `RefNumber` in the search range. If `ToRefNumber` is omitted, the range will end with last number on the list. */
|
|
10357
10499
|
ToRefNumber?: string;
|
|
10358
10500
|
}
|
|
10501
|
+
export interface RefundAppliedToTxnAdd {
|
|
10502
|
+
/** QuickBooks generates a unique `TxnID` for each transaction that is added to QuickBooks. A `TxnID` returned from a request can be used to refer to the transaction in subsequent requests.
|
|
10503
|
+
|
|
10504
|
+
Notice that you cannot supply the `TxnID` of a `TimeTracking` transaction to `TransactionQueryRq` requests. If you do, you get an error stating that no such record could be found, even though the transaction is in QuickBooks. This behavior reflects the behavior in the QuicKBooks UI in the Find window. */
|
|
10505
|
+
TxnID: string;
|
|
10506
|
+
/** Specifies the amount to be taken from the credit transaction you are linking via this aggregate. The amount specified in this aggregate cannot exceed the amount of the credit transaction you are linking. If you supply an amount that exceeds, you’ll get a runtime error. */
|
|
10507
|
+
RefundAmount: string;
|
|
10508
|
+
}
|
|
10509
|
+
export interface RefundAppliedToTxnRet {
|
|
10510
|
+
/** QuickBooks generates a unique `TxnID` for each transaction that is added to QuickBooks. A `TxnID` returned from a request can be used to refer to the transaction in subsequent requests.
|
|
10511
|
+
|
|
10512
|
+
Notice that you cannot supply the `TxnID` of a `TimeTracking` transaction to `TransactionQueryRq` requests. If you do, you get an error stating that no such record could be found, even though the transaction is in QuickBooks. This behavior reflects the behavior in the QuicKBooks UI in the Find window. */
|
|
10513
|
+
TxnID: string;
|
|
10514
|
+
/** The type of transaction. */
|
|
10515
|
+
TxnType: TxnType;
|
|
10516
|
+
/** The date of the transaction. In some cases, if you leave `TxnDate` out of an -Add message, QuickBooks will prefill `TxnDate` with the date of the last-saved transaction of the same type. */
|
|
10517
|
+
TxnDate: string;
|
|
10518
|
+
/** A string of characters that refers to this transaction and that can be arbitrarily changed by the QuickBooks user.
|
|
10519
|
+
|
|
10520
|
+
In a `BillPaymentCheckAdd` request, if you want to set the check number, use `RefNumber`.
|
|
10521
|
+
|
|
10522
|
+
Note (especially relevant to `CheckAdd` requests): When `RefNumber` is left blank in an SDK transaction add request (that is, or ), the `RefNumber` will be left blank in QuickBooks. This behavior is new as of QBFC3. It used to select the next sequential reference number since the last one used by QuickBooks, as though no `RefNumber` had been provided. This is especially relevant to `CheckAdd` requests because with the current behavior, you will not know the number until the check is printed. */
|
|
10523
|
+
RefNumber?: string;
|
|
10524
|
+
/** Available credit. */
|
|
10525
|
+
CreditRemaining: string;
|
|
10526
|
+
/** Specifies the amount to be taken from the credit transaction you are linking via this aggregate. The amount specified in this aggregate cannot exceed the amount of the credit transaction you are linking. If you supply an amount that exceeds, you’ll get a runtime error. */
|
|
10527
|
+
RefundAmount: string;
|
|
10528
|
+
/** The amount of the remaining credit, expressed in units of the current home currency. */
|
|
10529
|
+
CreditRemainingInHomeCurrency?: string;
|
|
10530
|
+
/** Specifies the amount to be taken from the credit transaction you are linking via this aggregate in the home currency. */
|
|
10531
|
+
RefundAmountInHomeCurrency?: string;
|
|
10532
|
+
}
|
|
10533
|
+
export interface RefundFromAccountRef {
|
|
10534
|
+
/** Along with `FullName`, `ListID` is a way to identify a list object. When a list object is added to QuickBooks through the SDK or through the QuickBooks user interface, the server assigns it a `ListID`. A `ListID` is not unique across lists, but it is unique across each particular type of list. For example, two customers could not have the same `ListID`, and a customer could not have the same `ListID` as an employee (because Customer and Employee are both name lists). But a customer could have the same `ListID` as a non-inventory item. */
|
|
10535
|
+
ListID?: string;
|
|
10536
|
+
/** `FullName` (along with `ListID`) is a way to identify a list object. The `FullName` is the name prefixed by the names of each ancestor, for example `Jones:Kitchen:Cabinets`. `FullName` values are not case-sensitive. */
|
|
10537
|
+
FullName?: string;
|
|
10538
|
+
}
|
|
10359
10539
|
export type Relation = "Brother" | "Daughter" | "Father" | "Friend" | "Mother" | "Other" | "Partner" | "Sister" | "Son" | "Spouse";
|
|
10360
10540
|
export interface ReportAccountFilter {
|
|
10361
10541
|
/** Allows you to report on a specific account type. */
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import BaseResource from "../resources/BaseResource";
|
|
2
|
-
import type { IntegrationConnection, IntegrationSlug } from "../resources/
|
|
3
|
-
import type { ApiListResponse } from "../resources/base";
|
|
2
|
+
import type { ApiListResponse, IntegrationConnection, IntegrationSlug } from "../resources/types";
|
|
4
3
|
export interface EndUser {
|
|
5
4
|
/**
|
|
6
5
|
* The unique identifier for this EndUser. You must save this value to your
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import BaseResource from "../resources/BaseResource";
|
|
2
|
-
import type { ApiListResponse } from "../resources/base";
|
|
3
1
|
export type IntegrationSlug = "quickbooks_desktop";
|
|
4
2
|
export interface IntegrationConnection {
|
|
5
3
|
/**
|
|
@@ -28,13 +26,8 @@ export interface IntegrationConnection {
|
|
|
28
26
|
*/
|
|
29
27
|
readonly lastRequestAt: string | null;
|
|
30
28
|
}
|
|
31
|
-
export interface
|
|
32
|
-
readonly
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
protected readonly ROUTE = "/integration-connections";
|
|
36
|
-
/**
|
|
37
|
-
* Returns a list of all IntegrationConnections of all your EndUsers.
|
|
38
|
-
*/
|
|
39
|
-
list(): Promise<ApiListResponse<IntegrationConnection>>;
|
|
29
|
+
export interface ApiListResponse<T> {
|
|
30
|
+
readonly url: string;
|
|
31
|
+
readonly objectType: "list";
|
|
32
|
+
readonly data: T[];
|
|
40
33
|
}
|
package/package.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const BaseResource_1 = __importDefault(require("../resources/BaseResource"));
|
|
7
|
-
class IntegrationConnectionsResource extends BaseResource_1.default {
|
|
8
|
-
ROUTE = "/integration-connections";
|
|
9
|
-
/**
|
|
10
|
-
* Returns a list of all IntegrationConnections of all your EndUsers.
|
|
11
|
-
*/
|
|
12
|
-
async list() {
|
|
13
|
-
const { data } = await this.httpClient.get(this.ROUTE);
|
|
14
|
-
return data;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.default = IntegrationConnectionsResource;
|
|
File without changes
|