conductor-node 12.5.1 → 12.7.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/CHANGELOG.md +16 -0
- package/package.json +1 -1
- package/resources/qbd/customers.d.ts +2 -2
- package/resources/qbd/customers.d.ts.map +1 -1
- package/resources/qbd/employees.d.ts +3 -3
- package/resources/qbd/employees.d.ts.map +1 -1
- package/resources/qbd/index.d.ts +1 -0
- package/resources/qbd/index.d.ts.map +1 -1
- package/resources/qbd/index.js +5 -2
- package/resources/qbd/index.js.map +1 -1
- package/resources/qbd/index.mjs +1 -0
- package/resources/qbd/index.mjs.map +1 -1
- package/resources/qbd/payment-methods.d.ts +213 -0
- package/resources/qbd/payment-methods.d.ts.map +1 -0
- package/resources/qbd/payment-methods.js +76 -0
- package/resources/qbd/payment-methods.js.map +1 -0
- package/resources/qbd/payment-methods.mjs +71 -0
- package/resources/qbd/payment-methods.mjs.map +1 -0
- package/resources/qbd/qbd.d.ts +4 -0
- package/resources/qbd/qbd.d.ts.map +1 -1
- package/resources/qbd/qbd.js +5 -0
- package/resources/qbd/qbd.js.map +1 -1
- package/resources/qbd/qbd.mjs +5 -0
- package/resources/qbd/qbd.mjs.map +1 -1
- package/resources/qbd/vendors.d.ts +2 -2
- package/resources/qbd/vendors.d.ts.map +1 -1
- package/src/resources/qbd/customers.ts +2 -2
- package/src/resources/qbd/employees.ts +3 -3
- package/src/resources/qbd/index.ts +8 -0
- package/src/resources/qbd/payment-methods.ts +311 -0
- package/src/resources/qbd/qbd.ts +21 -0
- package/src/resources/qbd/vendors.ts +2 -2
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import * as Core from '../../core';
|
|
5
|
+
import { CursorPage, type CursorPageParams } from '../../pagination';
|
|
6
|
+
|
|
7
|
+
export class PaymentMethods extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Creates a new payment method.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const paymentMethod =
|
|
14
|
+
* await client.qbd.paymentMethods.create({
|
|
15
|
+
* name: 'Cash',
|
|
16
|
+
* paymentMethodType: 'cash',
|
|
17
|
+
* conductorEndUserId: 'end_usr_1234567abcdefg',
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
create(params: PaymentMethodCreateParams, options?: Core.RequestOptions): Core.APIPromise<PaymentMethod> {
|
|
22
|
+
const { conductorEndUserId, ...body } = params;
|
|
23
|
+
return this._client.post('/quickbooks-desktop/payment-methods', {
|
|
24
|
+
body,
|
|
25
|
+
...options,
|
|
26
|
+
headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Retrieves a payment method by ID.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const paymentMethod =
|
|
36
|
+
* await client.qbd.paymentMethods.retrieve(
|
|
37
|
+
* '80000001-1234567890',
|
|
38
|
+
* { conductorEndUserId: 'end_usr_1234567abcdefg' },
|
|
39
|
+
* );
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
retrieve(
|
|
43
|
+
id: string,
|
|
44
|
+
params: PaymentMethodRetrieveParams,
|
|
45
|
+
options?: Core.RequestOptions,
|
|
46
|
+
): Core.APIPromise<PaymentMethod> {
|
|
47
|
+
const { conductorEndUserId } = params;
|
|
48
|
+
return this._client.get(`/quickbooks-desktop/payment-methods/${id}`, {
|
|
49
|
+
...options,
|
|
50
|
+
headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Returns a list of payment methods. Use the `cursor` parameter to paginate
|
|
56
|
+
* through the results.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* // Automatically fetches more pages as needed.
|
|
61
|
+
* for await (const paymentMethod of client.qbd.paymentMethods.list(
|
|
62
|
+
* { conductorEndUserId: 'end_usr_1234567abcdefg' },
|
|
63
|
+
* )) {
|
|
64
|
+
* // ...
|
|
65
|
+
* }
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
list(
|
|
69
|
+
params: PaymentMethodListParams,
|
|
70
|
+
options?: Core.RequestOptions,
|
|
71
|
+
): Core.PagePromise<PaymentMethodsCursorPage, PaymentMethod> {
|
|
72
|
+
const { conductorEndUserId, ...query } = params;
|
|
73
|
+
return this._client.getAPIList('/quickbooks-desktop/payment-methods', PaymentMethodsCursorPage, {
|
|
74
|
+
query,
|
|
75
|
+
...options,
|
|
76
|
+
headers: { 'Conductor-End-User-Id': conductorEndUserId, ...options?.headers },
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export class PaymentMethodsCursorPage extends CursorPage<PaymentMethod> {}
|
|
82
|
+
|
|
83
|
+
export interface PaymentMethod {
|
|
84
|
+
/**
|
|
85
|
+
* The unique identifier assigned by QuickBooks to this payment method. This ID is
|
|
86
|
+
* unique across all payment methods but not across different QuickBooks object
|
|
87
|
+
* types.
|
|
88
|
+
*/
|
|
89
|
+
id: string;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* The date and time when this payment method was created, in ISO 8601 format
|
|
93
|
+
* (YYYY-MM-DDThh:mm:ss±hh:mm). The time zone is the same as the user's time zone
|
|
94
|
+
* in QuickBooks.
|
|
95
|
+
*/
|
|
96
|
+
createdAt: string;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Indicates whether this payment method is active. Inactive objects are typically
|
|
100
|
+
* hidden from views and reports in QuickBooks. Defaults to `true`.
|
|
101
|
+
*/
|
|
102
|
+
isActive: boolean;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* The case-insensitive unique name of this payment method, unique across all
|
|
106
|
+
* payment methods.
|
|
107
|
+
*
|
|
108
|
+
* **NOTE**: Payment methods do not have a `fullName` field because they are not
|
|
109
|
+
* hierarchical objects, which is why `name` is unique for them but not for objects
|
|
110
|
+
* that have parents.
|
|
111
|
+
*/
|
|
112
|
+
name: string;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* The type of object. This value is always `"qbd_payment_method"`.
|
|
116
|
+
*/
|
|
117
|
+
objectType: 'qbd_payment_method';
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* This payment method's type.
|
|
121
|
+
*/
|
|
122
|
+
paymentMethodType:
|
|
123
|
+
| 'american_express'
|
|
124
|
+
| 'cash'
|
|
125
|
+
| 'check'
|
|
126
|
+
| 'debit_card'
|
|
127
|
+
| 'discover'
|
|
128
|
+
| 'e_check'
|
|
129
|
+
| 'gift_card'
|
|
130
|
+
| 'master_card'
|
|
131
|
+
| 'other'
|
|
132
|
+
| 'other_credit_card'
|
|
133
|
+
| 'visa';
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* The current QuickBooks-assigned revision number of this payment method object,
|
|
137
|
+
* which changes each time the object is modified. When updating this object, you
|
|
138
|
+
* must provide the most recent `revisionNumber` to ensure you're working with the
|
|
139
|
+
* latest data; otherwise, the update will return an error.
|
|
140
|
+
*/
|
|
141
|
+
revisionNumber: string;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* The date and time when this payment method was last updated, in ISO 8601 format
|
|
145
|
+
* (YYYY-MM-DDThh:mm:ss±hh:mm). The time zone is the same as the user's time zone
|
|
146
|
+
* in QuickBooks.
|
|
147
|
+
*/
|
|
148
|
+
updatedAt: string;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export interface PaymentMethodCreateParams {
|
|
152
|
+
/**
|
|
153
|
+
* Body param: The case-insensitive unique name of this payment method, unique
|
|
154
|
+
* across all payment methods.
|
|
155
|
+
*
|
|
156
|
+
* **NOTE**: Payment methods do not have a `fullName` field because they are not
|
|
157
|
+
* hierarchical objects, which is why `name` is unique for them but not for objects
|
|
158
|
+
* that have parents.
|
|
159
|
+
*
|
|
160
|
+
* Maximum length: 31 characters.
|
|
161
|
+
*/
|
|
162
|
+
name: string;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Body param: This payment method's type.
|
|
166
|
+
*/
|
|
167
|
+
paymentMethodType:
|
|
168
|
+
| 'american_express'
|
|
169
|
+
| 'cash'
|
|
170
|
+
| 'check'
|
|
171
|
+
| 'debit_card'
|
|
172
|
+
| 'discover'
|
|
173
|
+
| 'e_check'
|
|
174
|
+
| 'gift_card'
|
|
175
|
+
| 'master_card'
|
|
176
|
+
| 'other'
|
|
177
|
+
| 'other_credit_card'
|
|
178
|
+
| 'visa';
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Header param: The ID of the EndUser to receive this request (e.g.,
|
|
182
|
+
* `"Conductor-End-User-Id: {{END_USER_ID}}"`).
|
|
183
|
+
*/
|
|
184
|
+
conductorEndUserId: string;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Body param: Indicates whether this payment method is active. Inactive objects
|
|
188
|
+
* are typically hidden from views and reports in QuickBooks. Defaults to `true`.
|
|
189
|
+
*/
|
|
190
|
+
isActive?: boolean;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export interface PaymentMethodRetrieveParams {
|
|
194
|
+
/**
|
|
195
|
+
* The ID of the EndUser to receive this request (e.g.,
|
|
196
|
+
* `"Conductor-End-User-Id: {{END_USER_ID}}"`).
|
|
197
|
+
*/
|
|
198
|
+
conductorEndUserId: string;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export interface PaymentMethodListParams extends CursorPageParams {
|
|
202
|
+
/**
|
|
203
|
+
* Header param: The ID of the EndUser to receive this request (e.g.,
|
|
204
|
+
* `"Conductor-End-User-Id: {{END_USER_ID}}"`).
|
|
205
|
+
*/
|
|
206
|
+
conductorEndUserId: string;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Query param: Filter for specific payment methods by their QuickBooks-assigned
|
|
210
|
+
* unique identifier(s).
|
|
211
|
+
*
|
|
212
|
+
* **IMPORTANT**: If you include this parameter, QuickBooks will ignore all other
|
|
213
|
+
* query parameters for this request.
|
|
214
|
+
*
|
|
215
|
+
* **NOTE**: If any of the values you specify in this parameter are not found, the
|
|
216
|
+
* request will return an error.
|
|
217
|
+
*/
|
|
218
|
+
ids?: Array<string>;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Query param: Filter for payment methods whose `name` contains this substring,
|
|
222
|
+
* case-insensitive. NOTE: If you use this parameter, you cannot also use
|
|
223
|
+
* `nameStartsWith` or `nameEndsWith`.
|
|
224
|
+
*/
|
|
225
|
+
nameContains?: string;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Query param: Filter for payment methods whose `name` ends with this substring,
|
|
229
|
+
* case-insensitive. NOTE: If you use this parameter, you cannot also use
|
|
230
|
+
* `nameContains` or `nameStartsWith`.
|
|
231
|
+
*/
|
|
232
|
+
nameEndsWith?: string;
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Query param: Filter for payment methods whose `name` is alphabetically greater
|
|
236
|
+
* than or equal to this value.
|
|
237
|
+
*/
|
|
238
|
+
nameFrom?: string;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Query param: Filter for specific payment methods by their name(s),
|
|
242
|
+
* case-insensitive. Like `id`, `name` is a unique identifier for a payment method.
|
|
243
|
+
*
|
|
244
|
+
* **IMPORTANT**: If you include this parameter, QuickBooks will ignore all other
|
|
245
|
+
* query parameters for this request.
|
|
246
|
+
*
|
|
247
|
+
* **NOTE**: If any of the values you specify in this parameter are not found, the
|
|
248
|
+
* request will return an error.
|
|
249
|
+
*/
|
|
250
|
+
names?: Array<string>;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Query param: Filter for payment methods whose `name` starts with this substring,
|
|
254
|
+
* case-insensitive. NOTE: If you use this parameter, you cannot also use
|
|
255
|
+
* `nameContains` or `nameEndsWith`.
|
|
256
|
+
*/
|
|
257
|
+
nameStartsWith?: string;
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Query param: Filter for payment methods whose `name` is alphabetically less than
|
|
261
|
+
* or equal to this value.
|
|
262
|
+
*/
|
|
263
|
+
nameTo?: string;
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Query param: Filter for payment methods of this type.
|
|
267
|
+
*/
|
|
268
|
+
paymentMethodType?:
|
|
269
|
+
| 'american_express'
|
|
270
|
+
| 'cash'
|
|
271
|
+
| 'check'
|
|
272
|
+
| 'debit_card'
|
|
273
|
+
| 'discover'
|
|
274
|
+
| 'e_check'
|
|
275
|
+
| 'gift_card'
|
|
276
|
+
| 'master_card'
|
|
277
|
+
| 'other'
|
|
278
|
+
| 'other_credit_card'
|
|
279
|
+
| 'visa';
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Query param: Filter for payment methods that are active, inactive, or both.
|
|
283
|
+
*/
|
|
284
|
+
status?: 'active' | 'all' | 'inactive';
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Query param: Filter for payment methods updated on or after this date and time,
|
|
288
|
+
* in ISO 8601 format (YYYY-MM-DDTHH:mm:ss). If you only provide a date
|
|
289
|
+
* (YYYY-MM-DD), the time is assumed to be 00:00:00 of that day.
|
|
290
|
+
*/
|
|
291
|
+
updatedAfter?: string;
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Query param: Filter for payment methods updated on or before this date and time,
|
|
295
|
+
* in ISO 8601 format (YYYY-MM-DDTHH:mm:ss). If you only provide a date
|
|
296
|
+
* (YYYY-MM-DD), the time is assumed to be 23:59:59 of that day.
|
|
297
|
+
*/
|
|
298
|
+
updatedBefore?: string;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
PaymentMethods.PaymentMethodsCursorPage = PaymentMethodsCursorPage;
|
|
302
|
+
|
|
303
|
+
export declare namespace PaymentMethods {
|
|
304
|
+
export {
|
|
305
|
+
type PaymentMethod as PaymentMethod,
|
|
306
|
+
PaymentMethodsCursorPage as PaymentMethodsCursorPage,
|
|
307
|
+
type PaymentMethodCreateParams as PaymentMethodCreateParams,
|
|
308
|
+
type PaymentMethodRetrieveParams as PaymentMethodRetrieveParams,
|
|
309
|
+
type PaymentMethodListParams as PaymentMethodListParams,
|
|
310
|
+
};
|
|
311
|
+
}
|
package/src/resources/qbd/qbd.ts
CHANGED
|
@@ -271,6 +271,15 @@ import {
|
|
|
271
271
|
NonInventoryItems,
|
|
272
272
|
NonInventoryItemsCursorPage,
|
|
273
273
|
} from './non-inventory-items';
|
|
274
|
+
import * as PaymentMethodsAPI from './payment-methods';
|
|
275
|
+
import {
|
|
276
|
+
PaymentMethod,
|
|
277
|
+
PaymentMethodCreateParams,
|
|
278
|
+
PaymentMethodListParams,
|
|
279
|
+
PaymentMethodRetrieveParams,
|
|
280
|
+
PaymentMethods,
|
|
281
|
+
PaymentMethodsCursorPage,
|
|
282
|
+
} from './payment-methods';
|
|
274
283
|
import * as PayrollWageItemsAPI from './payroll-wage-items';
|
|
275
284
|
import {
|
|
276
285
|
PayrollWageItem,
|
|
@@ -490,6 +499,7 @@ export class Qbd extends APIResource {
|
|
|
490
499
|
nonInventoryItems: NonInventoryItemsAPI.NonInventoryItems = new NonInventoryItemsAPI.NonInventoryItems(
|
|
491
500
|
this._client,
|
|
492
501
|
);
|
|
502
|
+
paymentMethods: PaymentMethodsAPI.PaymentMethods = new PaymentMethodsAPI.PaymentMethods(this._client);
|
|
493
503
|
payrollWageItems: PayrollWageItemsAPI.PayrollWageItems = new PayrollWageItemsAPI.PayrollWageItems(
|
|
494
504
|
this._client,
|
|
495
505
|
);
|
|
@@ -605,6 +615,8 @@ Qbd.JournalEntries = JournalEntries;
|
|
|
605
615
|
Qbd.JournalEntriesCursorPage = JournalEntriesCursorPage;
|
|
606
616
|
Qbd.NonInventoryItems = NonInventoryItems;
|
|
607
617
|
Qbd.NonInventoryItemsCursorPage = NonInventoryItemsCursorPage;
|
|
618
|
+
Qbd.PaymentMethods = PaymentMethods;
|
|
619
|
+
Qbd.PaymentMethodsCursorPage = PaymentMethodsCursorPage;
|
|
608
620
|
Qbd.PayrollWageItems = PayrollWageItems;
|
|
609
621
|
Qbd.PayrollWageItemsCursorPage = PayrollWageItemsCursorPage;
|
|
610
622
|
Qbd.PriceLevels = PriceLevels;
|
|
@@ -915,6 +927,15 @@ export declare namespace Qbd {
|
|
|
915
927
|
type NonInventoryItemListParams as NonInventoryItemListParams,
|
|
916
928
|
};
|
|
917
929
|
|
|
930
|
+
export {
|
|
931
|
+
PaymentMethods as PaymentMethods,
|
|
932
|
+
type PaymentMethod as PaymentMethod,
|
|
933
|
+
PaymentMethodsCursorPage as PaymentMethodsCursorPage,
|
|
934
|
+
type PaymentMethodCreateParams as PaymentMethodCreateParams,
|
|
935
|
+
type PaymentMethodRetrieveParams as PaymentMethodRetrieveParams,
|
|
936
|
+
type PaymentMethodListParams as PaymentMethodListParams,
|
|
937
|
+
};
|
|
938
|
+
|
|
918
939
|
export {
|
|
919
940
|
PayrollWageItems as PayrollWageItems,
|
|
920
941
|
type PayrollWageItem as PayrollWageItem,
|
|
@@ -481,7 +481,7 @@ export namespace Vendor {
|
|
|
481
481
|
/**
|
|
482
482
|
* The value of the contact field.
|
|
483
483
|
*/
|
|
484
|
-
value: string;
|
|
484
|
+
value: string | null;
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
487
|
|
|
@@ -629,7 +629,7 @@ export namespace Vendor {
|
|
|
629
629
|
/**
|
|
630
630
|
* The value of the contact field.
|
|
631
631
|
*/
|
|
632
|
-
value: string;
|
|
632
|
+
value: string | null;
|
|
633
633
|
}
|
|
634
634
|
|
|
635
635
|
export interface CustomField {
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '12.
|
|
1
|
+
export const VERSION = '12.7.0'; // x-release-please-version
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "12.
|
|
1
|
+
export declare const VERSION = "12.7.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '12.
|
|
1
|
+
export const VERSION = '12.7.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|