@panoptic-it-solutions/quickbooks-client 0.2.0 → 0.3.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/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +16 -0
- package/dist/index.mjs +16 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -490,6 +490,8 @@ declare class QuickBooksClient {
|
|
|
490
490
|
createPayment(payment: Partial<Payment>): Promise<Payment>;
|
|
491
491
|
getAccount(id: string): Promise<Account>;
|
|
492
492
|
getAccounts(where?: string): Promise<Account[]>;
|
|
493
|
+
createAccount(account: Partial<Account>): Promise<Account>;
|
|
494
|
+
updateAccount(account: Account): Promise<Account>;
|
|
493
495
|
getVendor(id: string): Promise<Vendor>;
|
|
494
496
|
getVendors(where?: string): Promise<Vendor[]>;
|
|
495
497
|
createVendor(vendor: Partial<Vendor>): Promise<Vendor>;
|
package/dist/index.d.ts
CHANGED
|
@@ -490,6 +490,8 @@ declare class QuickBooksClient {
|
|
|
490
490
|
createPayment(payment: Partial<Payment>): Promise<Payment>;
|
|
491
491
|
getAccount(id: string): Promise<Account>;
|
|
492
492
|
getAccounts(where?: string): Promise<Account[]>;
|
|
493
|
+
createAccount(account: Partial<Account>): Promise<Account>;
|
|
494
|
+
updateAccount(account: Account): Promise<Account>;
|
|
493
495
|
getVendor(id: string): Promise<Vendor>;
|
|
494
496
|
getVendors(where?: string): Promise<Vendor[]>;
|
|
495
497
|
createVendor(vendor: Partial<Vendor>): Promise<Vendor>;
|
package/dist/index.js
CHANGED
|
@@ -603,6 +603,22 @@ var QuickBooksClient = class {
|
|
|
603
603
|
const sql = where ? `SELECT * FROM Account WHERE ${where}` : "SELECT * FROM Account WHERE Active = true";
|
|
604
604
|
return this.queryAll(sql);
|
|
605
605
|
}
|
|
606
|
+
async createAccount(account) {
|
|
607
|
+
const response = await this.request(
|
|
608
|
+
"POST",
|
|
609
|
+
"/account",
|
|
610
|
+
account
|
|
611
|
+
);
|
|
612
|
+
return response.Account;
|
|
613
|
+
}
|
|
614
|
+
async updateAccount(account) {
|
|
615
|
+
const response = await this.request(
|
|
616
|
+
"POST",
|
|
617
|
+
"/account",
|
|
618
|
+
account
|
|
619
|
+
);
|
|
620
|
+
return response.Account;
|
|
621
|
+
}
|
|
606
622
|
// ============================================
|
|
607
623
|
// Vendor Methods
|
|
608
624
|
// ============================================
|
package/dist/index.mjs
CHANGED
|
@@ -567,6 +567,22 @@ var QuickBooksClient = class {
|
|
|
567
567
|
const sql = where ? `SELECT * FROM Account WHERE ${where}` : "SELECT * FROM Account WHERE Active = true";
|
|
568
568
|
return this.queryAll(sql);
|
|
569
569
|
}
|
|
570
|
+
async createAccount(account) {
|
|
571
|
+
const response = await this.request(
|
|
572
|
+
"POST",
|
|
573
|
+
"/account",
|
|
574
|
+
account
|
|
575
|
+
);
|
|
576
|
+
return response.Account;
|
|
577
|
+
}
|
|
578
|
+
async updateAccount(account) {
|
|
579
|
+
const response = await this.request(
|
|
580
|
+
"POST",
|
|
581
|
+
"/account",
|
|
582
|
+
account
|
|
583
|
+
);
|
|
584
|
+
return response.Account;
|
|
585
|
+
}
|
|
570
586
|
// ============================================
|
|
571
587
|
// Vendor Methods
|
|
572
588
|
// ============================================
|
package/package.json
CHANGED