conductor-node 12.32.0 → 12.33.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.
Files changed (92) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/package.json +1 -1
  3. package/resources/qbd/bill-check-payments.d.ts +4 -8
  4. package/resources/qbd/bill-check-payments.d.ts.map +1 -1
  5. package/resources/qbd/bill-check-payments.js.map +1 -1
  6. package/resources/qbd/bill-check-payments.mjs.map +1 -1
  7. package/resources/qbd/bill-credit-card-payments.d.ts +4 -8
  8. package/resources/qbd/bill-credit-card-payments.d.ts.map +1 -1
  9. package/resources/qbd/bill-credit-card-payments.js.map +1 -1
  10. package/resources/qbd/bill-credit-card-payments.mjs.map +1 -1
  11. package/resources/qbd/bills.d.ts +2 -4
  12. package/resources/qbd/bills.d.ts.map +1 -1
  13. package/resources/qbd/bills.js.map +1 -1
  14. package/resources/qbd/bills.mjs.map +1 -1
  15. package/resources/qbd/checks.d.ts +2 -4
  16. package/resources/qbd/checks.d.ts.map +1 -1
  17. package/resources/qbd/checks.js.map +1 -1
  18. package/resources/qbd/checks.mjs.map +1 -1
  19. package/resources/qbd/credit-card-refunds.d.ts +1011 -0
  20. package/resources/qbd/credit-card-refunds.d.ts.map +1 -0
  21. package/resources/qbd/credit-card-refunds.js +105 -0
  22. package/resources/qbd/credit-card-refunds.js.map +1 -0
  23. package/resources/qbd/credit-card-refunds.mjs +100 -0
  24. package/resources/qbd/credit-card-refunds.mjs.map +1 -0
  25. package/resources/qbd/credit-memos.d.ts +6 -16
  26. package/resources/qbd/credit-memos.d.ts.map +1 -1
  27. package/resources/qbd/credit-memos.js.map +1 -1
  28. package/resources/qbd/credit-memos.mjs.map +1 -1
  29. package/resources/qbd/estimates.d.ts +2 -4
  30. package/resources/qbd/estimates.d.ts.map +1 -1
  31. package/resources/qbd/estimates.js.map +1 -1
  32. package/resources/qbd/estimates.mjs.map +1 -1
  33. package/resources/qbd/index.d.ts +1 -0
  34. package/resources/qbd/index.d.ts.map +1 -1
  35. package/resources/qbd/index.js +5 -2
  36. package/resources/qbd/index.js.map +1 -1
  37. package/resources/qbd/index.mjs +1 -0
  38. package/resources/qbd/index.mjs.map +1 -1
  39. package/resources/qbd/invoices.d.ts +6 -16
  40. package/resources/qbd/invoices.d.ts.map +1 -1
  41. package/resources/qbd/invoices.js.map +1 -1
  42. package/resources/qbd/invoices.mjs.map +1 -1
  43. package/resources/qbd/item-receipts.d.ts +2 -4
  44. package/resources/qbd/item-receipts.d.ts.map +1 -1
  45. package/resources/qbd/item-receipts.js.map +1 -1
  46. package/resources/qbd/item-receipts.mjs.map +1 -1
  47. package/resources/qbd/purchase-orders.d.ts +2 -4
  48. package/resources/qbd/purchase-orders.d.ts.map +1 -1
  49. package/resources/qbd/purchase-orders.js.map +1 -1
  50. package/resources/qbd/purchase-orders.mjs.map +1 -1
  51. package/resources/qbd/qbd.d.ts +4 -0
  52. package/resources/qbd/qbd.d.ts.map +1 -1
  53. package/resources/qbd/qbd.js +5 -0
  54. package/resources/qbd/qbd.js.map +1 -1
  55. package/resources/qbd/qbd.mjs +5 -0
  56. package/resources/qbd/qbd.mjs.map +1 -1
  57. package/resources/qbd/receive-payments.d.ts +8 -20
  58. package/resources/qbd/receive-payments.d.ts.map +1 -1
  59. package/resources/qbd/receive-payments.js.map +1 -1
  60. package/resources/qbd/receive-payments.mjs.map +1 -1
  61. package/resources/qbd/sales-orders.d.ts +2 -4
  62. package/resources/qbd/sales-orders.d.ts.map +1 -1
  63. package/resources/qbd/sales-orders.js.map +1 -1
  64. package/resources/qbd/sales-orders.mjs.map +1 -1
  65. package/resources/qbd/transactions.d.ts +2 -4
  66. package/resources/qbd/transactions.d.ts.map +1 -1
  67. package/resources/qbd/transactions.js.map +1 -1
  68. package/resources/qbd/transactions.mjs.map +1 -1
  69. package/resources/qbd/vendor-credits.d.ts +2 -4
  70. package/resources/qbd/vendor-credits.d.ts.map +1 -1
  71. package/resources/qbd/vendor-credits.js.map +1 -1
  72. package/resources/qbd/vendor-credits.mjs.map +1 -1
  73. package/src/resources/qbd/bill-check-payments.ts +59 -8
  74. package/src/resources/qbd/bill-credit-card-payments.ts +59 -8
  75. package/src/resources/qbd/bills.ts +31 -5
  76. package/src/resources/qbd/checks.ts +31 -5
  77. package/src/resources/qbd/credit-card-refunds.ts +1252 -0
  78. package/src/resources/qbd/credit-memos.ts +35 -17
  79. package/src/resources/qbd/estimates.ts +31 -5
  80. package/src/resources/qbd/index.ts +10 -0
  81. package/src/resources/qbd/invoices.ts +35 -17
  82. package/src/resources/qbd/item-receipts.ts +31 -5
  83. package/src/resources/qbd/purchase-orders.ts +31 -5
  84. package/src/resources/qbd/qbd.ts +27 -0
  85. package/src/resources/qbd/receive-payments.ts +64 -21
  86. package/src/resources/qbd/sales-orders.ts +31 -5
  87. package/src/resources/qbd/transactions.ts +29 -4
  88. package/src/resources/qbd/vendor-credits.ts +31 -5
  89. package/src/version.ts +1 -1
  90. package/version.d.ts +1 -1
  91. package/version.js +1 -1
  92. package/version.mjs +1 -1
@@ -0,0 +1,1011 @@
1
+ import { APIResource } from "../../resource.js";
2
+ import * as Core from "../../core.js";
3
+ import { CursorPage, type CursorPageParams } from "../../pagination.js";
4
+ export declare class CreditCardRefunds extends APIResource {
5
+ /**
6
+ * Creates a credit card refund linked to one or more existing credit transactions,
7
+ * such as credit memos or overpayments. You must supply at least one entry in
8
+ * `refundAppliedToTransactions`, and the refund amount cannot exceed the available
9
+ * balance on the linked credits.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const creditCardRefund =
14
+ * await conductor.qbd.creditCardRefunds.create({
15
+ * customerId: '80000001-1234567890',
16
+ * refundAppliedToTransactions: [
17
+ * {
18
+ * refundAmount: '15.00',
19
+ * transactionId: '123ABC-1234567890',
20
+ * },
21
+ * ],
22
+ * transactionDate: '2024-10-01',
23
+ * conductorEndUserId: 'end_usr_1234567abcdefg',
24
+ * });
25
+ * ```
26
+ */
27
+ create(params: CreditCardRefundCreateParams, options?: Core.RequestOptions): Core.APIPromise<CreditCardRefund>;
28
+ /**
29
+ * Retrieves a credit card refund by ID.
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * const creditCardRefund =
34
+ * await conductor.qbd.creditCardRefunds.retrieve(
35
+ * '123ABC-1234567890',
36
+ * { conductorEndUserId: 'end_usr_1234567abcdefg' },
37
+ * );
38
+ * ```
39
+ */
40
+ retrieve(id: string, params: CreditCardRefundRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<CreditCardRefund>;
41
+ /**
42
+ * Returns a list of credit card refunds. Use the `cursor` parameter to paginate
43
+ * through the results.
44
+ *
45
+ * @example
46
+ * ```ts
47
+ * // Automatically fetches more pages as needed.
48
+ * for await (const creditCardRefund of conductor.qbd.creditCardRefunds.list(
49
+ * { conductorEndUserId: 'end_usr_1234567abcdefg' },
50
+ * )) {
51
+ * // ...
52
+ * }
53
+ * ```
54
+ */
55
+ list(params: CreditCardRefundListParams, options?: Core.RequestOptions): Core.PagePromise<CreditCardRefundsCursorPage, CreditCardRefund>;
56
+ /**
57
+ * Permanently deletes a a credit card refund. The deletion will fail if the credit
58
+ * card refund is currently in use or has any linked transactions that are in use.
59
+ *
60
+ * @example
61
+ * ```ts
62
+ * const creditCardRefund =
63
+ * await conductor.qbd.creditCardRefunds.delete(
64
+ * '123ABC-1234567890',
65
+ * { conductorEndUserId: 'end_usr_1234567abcdefg' },
66
+ * );
67
+ * ```
68
+ */
69
+ delete(id: string, params: CreditCardRefundDeleteParams, options?: Core.RequestOptions): Core.APIPromise<CreditCardRefundDeleteResponse>;
70
+ }
71
+ export declare class CreditCardRefundsCursorPage extends CursorPage<CreditCardRefund> {
72
+ }
73
+ export interface CreditCardRefund {
74
+ /**
75
+ * The unique identifier assigned by QuickBooks to this credit card refund. This ID
76
+ * is unique across all transaction types.
77
+ */
78
+ id: string;
79
+ /**
80
+ * The address that is printed on the credit card refund.
81
+ */
82
+ address: CreditCardRefund.Address | null;
83
+ /**
84
+ * The date and time when this credit card refund was created, in ISO 8601 format
85
+ * (YYYY-MM-DDThh:mm:ss±hh:mm), which QuickBooks Desktop interprets in the local
86
+ * timezone of the end-user's computer.
87
+ */
88
+ createdAt: string;
89
+ /**
90
+ * The credit card transaction data for this credit card refund's payment when
91
+ * using QuickBooks Merchant Services (QBMS).
92
+ */
93
+ creditCardTransaction: CreditCardRefund.CreditCardTransaction | null;
94
+ /**
95
+ * The credit card refund's currency. For built-in currencies, the name and code
96
+ * are standard international values. For user-defined currencies, all values are
97
+ * editable.
98
+ */
99
+ currency: CreditCardRefund.Currency | null;
100
+ /**
101
+ * The customer or customer-job associated with this credit card refund.
102
+ */
103
+ customer: CreditCardRefund.Customer;
104
+ /**
105
+ * The custom fields for the credit card refund object, added as user-defined data
106
+ * extensions, not included in the standard QuickBooks object.
107
+ */
108
+ customFields: Array<CreditCardRefund.CustomField>;
109
+ /**
110
+ * The market exchange rate between this credit card refund's currency and the home
111
+ * currency in QuickBooks at the time of this transaction. Represented as a decimal
112
+ * value (e.g., 1.2345 for 1 EUR = 1.2345 USD if USD is the home currency).
113
+ */
114
+ exchangeRate: number | null;
115
+ /**
116
+ * A globally unique identifier (GUID) you, the developer, can provide for tracking
117
+ * this object in your external system. This field is immutable and can only be set
118
+ * during object creation.
119
+ */
120
+ externalId: string | null;
121
+ /**
122
+ * A memo or note for this credit card refund.
123
+ */
124
+ memo: string | null;
125
+ /**
126
+ * The type of object. This value is always `"qbd_credit_card_refund"`.
127
+ */
128
+ objectType: 'qbd_credit_card_refund';
129
+ /**
130
+ * The credit card refund's payment method (e.g., cash, check, credit card).
131
+ */
132
+ paymentMethod: CreditCardRefund.PaymentMethod | null;
133
+ /**
134
+ * The Accounts-Receivable (A/R) account to which this credit card refund is
135
+ * assigned, used to track the amount owed. If not specified, QuickBooks Desktop
136
+ * will use its default A/R account.
137
+ *
138
+ * **IMPORTANT**: If this credit card refund is linked to other transactions, this
139
+ * A/R account must match the `receivablesAccount` used in all linked transactions.
140
+ * For example, when refunding a credit card payment, the A/R account must match
141
+ * the one used in each linked credit transaction being refunded.
142
+ */
143
+ receivablesAccount: CreditCardRefund.ReceivablesAccount | null;
144
+ /**
145
+ * The case-sensitive user-defined reference number for this credit card refund,
146
+ * which can be used to identify the transaction in QuickBooks. This value is not
147
+ * required to be unique and can be arbitrarily changed by the QuickBooks user.
148
+ */
149
+ refNumber: string | null;
150
+ /**
151
+ * The credit transactions refunded by this credit card refund.
152
+ */
153
+ refundAppliedToTransactions: Array<CreditCardRefund.RefundAppliedToTransaction>;
154
+ /**
155
+ * The account providing funds for this credit card refund. This is typically the
156
+ * Undeposited Funds account used to hold customer payments.
157
+ */
158
+ refundFromAccount: CreditCardRefund.RefundFromAccount | null;
159
+ /**
160
+ * The current QuickBooks-assigned revision number of this credit card refund
161
+ * object, which changes each time the object is modified. When updating this
162
+ * object, you must provide the most recent `revisionNumber` to ensure you're
163
+ * working with the latest data; otherwise, the update will return an error.
164
+ */
165
+ revisionNumber: string;
166
+ /**
167
+ * The total monetary amount of this credit card refund, represented as a decimal
168
+ * string.
169
+ */
170
+ totalAmount: string;
171
+ /**
172
+ * The total monetary amount of this credit card refund converted to the home
173
+ * currency of the QuickBooks company file. Represented as a decimal string.
174
+ */
175
+ totalAmountInHomeCurrency: string | null;
176
+ /**
177
+ * The date of this credit card refund, in ISO 8601 format (YYYY-MM-DD).
178
+ */
179
+ transactionDate: string;
180
+ /**
181
+ * The date and time when this credit card refund was last updated, in ISO 8601
182
+ * format (YYYY-MM-DDThh:mm:ss±hh:mm), which QuickBooks Desktop interprets in the
183
+ * local timezone of the end-user's computer.
184
+ */
185
+ updatedAt: string;
186
+ }
187
+ export declare namespace CreditCardRefund {
188
+ /**
189
+ * The address that is printed on the credit card refund.
190
+ */
191
+ interface Address {
192
+ /**
193
+ * The city, district, suburb, town, or village name of the address.
194
+ */
195
+ city: string | null;
196
+ /**
197
+ * The country name of the address.
198
+ */
199
+ country: string | null;
200
+ /**
201
+ * The first line of the address (e.g., street, PO Box, or company name).
202
+ */
203
+ line1: string | null;
204
+ /**
205
+ * The second line of the address, if needed (e.g., apartment, suite, unit, or
206
+ * building).
207
+ */
208
+ line2: string | null;
209
+ /**
210
+ * The third line of the address, if needed.
211
+ */
212
+ line3: string | null;
213
+ /**
214
+ * The fourth line of the address, if needed.
215
+ */
216
+ line4: string | null;
217
+ /**
218
+ * The fifth line of the address, if needed.
219
+ */
220
+ line5: string | null;
221
+ /**
222
+ * A note written at the bottom of the address in the form in which it appears,
223
+ * such as the invoice form.
224
+ */
225
+ note: string | null;
226
+ /**
227
+ * The postal code or ZIP code of the address.
228
+ */
229
+ postalCode: string | null;
230
+ /**
231
+ * The state, county, province, or region name of the address.
232
+ */
233
+ state: string | null;
234
+ }
235
+ /**
236
+ * The credit card transaction data for this credit card refund's payment when
237
+ * using QuickBooks Merchant Services (QBMS).
238
+ */
239
+ interface CreditCardTransaction {
240
+ /**
241
+ * The transaction request data originally supplied for this credit card
242
+ * transaction when using QuickBooks Merchant Services (QBMS).
243
+ */
244
+ request: CreditCardTransaction.Request | null;
245
+ /**
246
+ * The transaction response data for this credit card transaction when using
247
+ * QuickBooks Merchant Services (QBMS).
248
+ */
249
+ response: CreditCardTransaction.Response | null;
250
+ }
251
+ namespace CreditCardTransaction {
252
+ /**
253
+ * The transaction request data originally supplied for this credit card
254
+ * transaction when using QuickBooks Merchant Services (QBMS).
255
+ */
256
+ interface Request {
257
+ /**
258
+ * The card's billing address.
259
+ */
260
+ address: string | null;
261
+ /**
262
+ * The commercial card code identifies the type of business credit card being used
263
+ * (purchase, corporate, or business) for Visa and Mastercard transactions only.
264
+ * When provided, this code may qualify the transaction for lower processing fees
265
+ * compared to the standard rates that apply when no code is specified.
266
+ */
267
+ commercialCardCode: string | null;
268
+ /**
269
+ * The month when the credit card expires.
270
+ */
271
+ expirationMonth: number;
272
+ /**
273
+ * The year when the credit card expires.
274
+ */
275
+ expirationYear: number;
276
+ /**
277
+ * The cardholder's name on the card.
278
+ */
279
+ name: string | null;
280
+ /**
281
+ * The credit card number. Must be masked with lower case "x" and no dashes.
282
+ */
283
+ number: string;
284
+ /**
285
+ * The card's billing address ZIP or postal code.
286
+ */
287
+ postalCode: string | null;
288
+ /**
289
+ * Indicates whether this credit card transaction came from a card swipe
290
+ * (`card_present`) or not (`card_not_present`).
291
+ */
292
+ transactionMode: 'card_not_present' | 'card_present' | null;
293
+ /**
294
+ * The QBMS transaction type from which the current transaction data originated.
295
+ */
296
+ transactionType: 'authorization' | 'capture' | 'charge' | 'refund' | 'voice_authorization' | null;
297
+ }
298
+ /**
299
+ * The transaction response data for this credit card transaction when using
300
+ * QuickBooks Merchant Services (QBMS).
301
+ */
302
+ interface Response {
303
+ /**
304
+ * The authorization code returned from the credit card processor to indicate that
305
+ * this charge will be paid by the card issuer.
306
+ */
307
+ authorizationCode: string | null;
308
+ /**
309
+ * Indicates whether the street address supplied in the transaction request matches
310
+ * the customer's address on file at the card issuer.
311
+ */
312
+ avsStreetStatus: 'fail' | 'not_available' | 'pass' | null;
313
+ /**
314
+ * Indicates whether the customer postal ZIP code supplied in the transaction
315
+ * request matches the customer's postal code recognized at the card issuer.
316
+ */
317
+ avsZipStatus: 'fail' | 'not_available' | 'pass' | null;
318
+ /**
319
+ * Indicates whether the card security code supplied in the transaction request
320
+ * matches the card security code recognized for that credit card number at the
321
+ * card issuer.
322
+ */
323
+ cardSecurityCodeMatch: 'fail' | 'not_available' | 'pass' | null;
324
+ /**
325
+ * A value returned from QBMS transactions for future use by the QuickBooks
326
+ * Reconciliation feature.
327
+ */
328
+ clientTransactionId: string | null;
329
+ /**
330
+ * The ID returned from the credit card processor for this credit card transaction.
331
+ */
332
+ creditCardTransactionId: string;
333
+ /**
334
+ * The QBMS account number of the merchant who is running this transaction using
335
+ * the customer's credit card.
336
+ */
337
+ merchantAccountNumber: string;
338
+ /**
339
+ * An internal code returned by QuickBooks Merchant Services (QBMS) from the
340
+ * transaction request, needed for the QuickBooks reconciliation feature.
341
+ */
342
+ paymentGroupingCode: number | null;
343
+ /**
344
+ * Indicates whether this credit card transaction is known to have been
345
+ * successfully processed by the card issuer.
346
+ */
347
+ paymentStatus: 'completed' | 'unknown';
348
+ /**
349
+ * An internal ID returned by QuickBooks Merchant Services (QBMS) from the
350
+ * transaction request, needed for the QuickBooks reconciliation feature.
351
+ */
352
+ reconBatchId: string | null;
353
+ /**
354
+ * The status code returned in the original QBMS transaction response for this
355
+ * credit card transaction.
356
+ */
357
+ statusCode: number;
358
+ /**
359
+ * The status message returned in the original QBMS transaction response for this
360
+ * credit card transaction.
361
+ */
362
+ statusMessage: string;
363
+ /**
364
+ * An internal value for this credit card transaction, needed for the QuickBooks
365
+ * reconciliation feature.
366
+ */
367
+ transactionAuthorizationStamp: number | null;
368
+ /**
369
+ * The date and time when the credit card processor authorized this credit card
370
+ * transaction.
371
+ */
372
+ transactionAuthorizedAt: string;
373
+ }
374
+ }
375
+ /**
376
+ * The credit card refund's currency. For built-in currencies, the name and code
377
+ * are standard international values. For user-defined currencies, all values are
378
+ * editable.
379
+ */
380
+ interface Currency {
381
+ /**
382
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
383
+ * across all objects of the same type, but not across different QuickBooks object
384
+ * types.
385
+ */
386
+ id: string | null;
387
+ /**
388
+ * The fully-qualified unique name for this object, formed by combining the names
389
+ * of its parent objects with its own `name`, separated by colons. Not
390
+ * case-sensitive.
391
+ */
392
+ fullName: string | null;
393
+ }
394
+ /**
395
+ * The customer or customer-job associated with this credit card refund.
396
+ */
397
+ interface Customer {
398
+ /**
399
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
400
+ * across all objects of the same type, but not across different QuickBooks object
401
+ * types.
402
+ */
403
+ id: string | null;
404
+ /**
405
+ * The fully-qualified unique name for this object, formed by combining the names
406
+ * of its parent objects with its own `name`, separated by colons. Not
407
+ * case-sensitive.
408
+ */
409
+ fullName: string | null;
410
+ }
411
+ interface CustomField {
412
+ /**
413
+ * The name of the custom field, unique for the specified `ownerId`. For public
414
+ * custom fields, this name is visible as a label in the QuickBooks UI.
415
+ */
416
+ name: string;
417
+ /**
418
+ * The identifier of the owner of the custom field, which QuickBooks internally
419
+ * calls a "data extension". For public custom fields visible in the UI, such as
420
+ * those added by the QuickBooks user, this is always "0". For private custom
421
+ * fields that are only visible to the application that created them, this is a
422
+ * valid GUID identifying the owning application. Internally, Conductor always
423
+ * fetches all public custom fields (those with an `ownerId` of "0") for all
424
+ * objects.
425
+ */
426
+ ownerId: string;
427
+ /**
428
+ * The data type of this custom field.
429
+ */
430
+ type: 'amount_type' | 'date_time_type' | 'integer_type' | 'percent_type' | 'price_type' | 'quantity_type' | 'string_1024_type' | 'string_255_type';
431
+ /**
432
+ * The value of this custom field. The maximum length depends on the field's data
433
+ * type.
434
+ */
435
+ value: string;
436
+ }
437
+ /**
438
+ * The credit card refund's payment method (e.g., cash, check, credit card).
439
+ */
440
+ interface PaymentMethod {
441
+ /**
442
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
443
+ * across all objects of the same type, but not across different QuickBooks object
444
+ * types.
445
+ */
446
+ id: string | null;
447
+ /**
448
+ * The fully-qualified unique name for this object, formed by combining the names
449
+ * of its parent objects with its own `name`, separated by colons. Not
450
+ * case-sensitive.
451
+ */
452
+ fullName: string | null;
453
+ }
454
+ /**
455
+ * The Accounts-Receivable (A/R) account to which this credit card refund is
456
+ * assigned, used to track the amount owed. If not specified, QuickBooks Desktop
457
+ * will use its default A/R account.
458
+ *
459
+ * **IMPORTANT**: If this credit card refund is linked to other transactions, this
460
+ * A/R account must match the `receivablesAccount` used in all linked transactions.
461
+ * For example, when refunding a credit card payment, the A/R account must match
462
+ * the one used in each linked credit transaction being refunded.
463
+ */
464
+ interface ReceivablesAccount {
465
+ /**
466
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
467
+ * across all objects of the same type, but not across different QuickBooks object
468
+ * types.
469
+ */
470
+ id: string | null;
471
+ /**
472
+ * The fully-qualified unique name for this object, formed by combining the names
473
+ * of its parent objects with its own `name`, separated by colons. Not
474
+ * case-sensitive.
475
+ */
476
+ fullName: string | null;
477
+ }
478
+ interface RefundAppliedToTransaction {
479
+ /**
480
+ * The remaining balance of this credit transaction that has not yet been applied
481
+ * to other transactions or refunded to the customer. Represented as a decimal
482
+ * string.
483
+ */
484
+ creditRemaining: string | null;
485
+ /**
486
+ * The remaining balance of this credit transaction converted to the home currency
487
+ * of the QuickBooks company file. Represented as a decimal string.
488
+ */
489
+ creditRemainingInHomeCurrency: string | null;
490
+ /**
491
+ * The case-sensitive user-defined reference number for this credit transaction,
492
+ * which can be used to identify the transaction in QuickBooks. This value is not
493
+ * required to be unique and can be arbitrarily changed by the QuickBooks user.
494
+ */
495
+ refNumber: string | null;
496
+ /**
497
+ * The monetary amount to refund from the linked credit transaction within this
498
+ * credit transaction, represented as a decimal string.
499
+ */
500
+ refundAmount: string;
501
+ /**
502
+ * The monetary amount to refund from the linked credit transaction in this credit
503
+ * transaction, converted to the home currency of the QuickBooks company file.
504
+ * Represented as a decimal string.
505
+ */
506
+ refundAmountInHomeCurrency: string | null;
507
+ /**
508
+ * The date of this credit transaction, in ISO 8601 format (YYYY-MM-DD).
509
+ */
510
+ transactionDate: string | null;
511
+ /**
512
+ * The ID of the credit transaction being refunded by this credit card refund.
513
+ */
514
+ transactionId: string;
515
+ /**
516
+ * The type of transaction for this credit transaction.
517
+ */
518
+ transactionType: 'ar_refund_credit_card' | 'bill' | 'bill_payment_check' | 'bill_payment_credit_card' | 'build_assembly' | 'charge' | 'check' | 'credit_card_charge' | 'credit_card_credit' | 'credit_memo' | 'deposit' | 'estimate' | 'inventory_adjustment' | 'invoice' | 'item_receipt' | 'journal_entry' | 'liability_adjustment' | 'paycheck' | 'payroll_liability_check' | 'purchase_order' | 'receive_payment' | 'sales_order' | 'sales_receipt' | 'sales_tax_payment_check' | 'transfer' | 'vendor_credit' | 'ytd_adjustment';
519
+ }
520
+ /**
521
+ * The account providing funds for this credit card refund. This is typically the
522
+ * Undeposited Funds account used to hold customer payments.
523
+ */
524
+ interface RefundFromAccount {
525
+ /**
526
+ * The unique identifier assigned by QuickBooks to this object. This ID is unique
527
+ * across all objects of the same type, but not across different QuickBooks object
528
+ * types.
529
+ */
530
+ id: string | null;
531
+ /**
532
+ * The fully-qualified unique name for this object, formed by combining the names
533
+ * of its parent objects with its own `name`, separated by colons. Not
534
+ * case-sensitive.
535
+ */
536
+ fullName: string | null;
537
+ }
538
+ }
539
+ export interface CreditCardRefundDeleteResponse {
540
+ /**
541
+ * The QuickBooks-assigned unique identifier of the deleted credit card refund.
542
+ */
543
+ id: string;
544
+ /**
545
+ * Indicates whether the credit card refund was deleted.
546
+ */
547
+ deleted: boolean;
548
+ /**
549
+ * The type of object. This value is always `"qbd_credit_card_refund"`.
550
+ */
551
+ objectType: 'qbd_credit_card_refund';
552
+ /**
553
+ * The case-sensitive user-defined reference number of the deleted credit card
554
+ * refund.
555
+ */
556
+ refNumber: string | null;
557
+ }
558
+ export interface CreditCardRefundCreateParams {
559
+ /**
560
+ * Body param: The customer or customer-job associated with this credit card
561
+ * refund.
562
+ */
563
+ customerId: string;
564
+ /**
565
+ * Body param: The credit transactions to refund in this credit card refund. Each
566
+ * entry links this credit card refund to an existing credit (for example, a credit
567
+ * memo or unused receive-payment credit).
568
+ *
569
+ * **IMPORTANT**: The `refundAmount` for each linked credit cannot exceed that
570
+ * credit's remaining balance, and the combined `refundAmount` across all links
571
+ * cannot exceed this credit card refund's `totalAmount`.
572
+ */
573
+ refundAppliedToTransactions: Array<CreditCardRefundCreateParams.RefundAppliedToTransaction>;
574
+ /**
575
+ * Body param: The date of this credit card refund, in ISO 8601 format
576
+ * (YYYY-MM-DD).
577
+ */
578
+ transactionDate: string;
579
+ /**
580
+ * Header param: The ID of the EndUser to receive this request (e.g.,
581
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
582
+ */
583
+ conductorEndUserId: string;
584
+ /**
585
+ * Body param: The address that is printed on the credit card refund.
586
+ */
587
+ address?: CreditCardRefundCreateParams.Address;
588
+ /**
589
+ * Body param: The credit card transaction data for this credit card refund's
590
+ * payment when using QuickBooks Merchant Services (QBMS). If specifying this
591
+ * field, you must also specify the `paymentMethod` field.
592
+ */
593
+ creditCardTransaction?: CreditCardRefundCreateParams.CreditCardTransaction;
594
+ /**
595
+ * Body param: The market exchange rate between this credit card refund's currency
596
+ * and the home currency in QuickBooks at the time of this transaction. Represented
597
+ * as a decimal value (e.g., 1.2345 for 1 EUR = 1.2345 USD if USD is the home
598
+ * currency).
599
+ */
600
+ exchangeRate?: number;
601
+ /**
602
+ * Body param: A globally unique identifier (GUID) you, the developer, can provide
603
+ * for tracking this object in your external system. This field is immutable and
604
+ * can only be set during object creation.
605
+ *
606
+ * **IMPORTANT**: This field must be formatted as a valid GUID; otherwise,
607
+ * QuickBooks will return an error.
608
+ */
609
+ externalId?: string;
610
+ /**
611
+ * Body param: A memo or note for this credit card refund.
612
+ */
613
+ memo?: string;
614
+ /**
615
+ * Body param: The credit card refund's payment method (e.g., cash, check, credit
616
+ * card).
617
+ *
618
+ * **NOTE**: If this credit card refund contains credit card transaction data
619
+ * supplied from QuickBooks Merchant Services (QBMS) transaction responses, you
620
+ * must specify a credit card payment method (e.g., "Visa", "MasterCard", etc.).
621
+ */
622
+ paymentMethodId?: string;
623
+ /**
624
+ * Body param: The Accounts-Receivable (A/R) account to which this credit card
625
+ * refund is assigned, used to track the amount owed. If not specified, QuickBooks
626
+ * Desktop will use its default A/R account.
627
+ *
628
+ * **IMPORTANT**: If this credit card refund is linked to other transactions, this
629
+ * A/R account must match the `receivablesAccount` used in all linked transactions.
630
+ * For example, when refunding a credit card payment, the A/R account must match
631
+ * the one used in each linked credit transaction being refunded.
632
+ */
633
+ receivablesAccountId?: string;
634
+ /**
635
+ * Body param: The case-sensitive user-defined reference number for this credit
636
+ * card refund, which can be used to identify the transaction in QuickBooks. This
637
+ * value is not required to be unique and can be arbitrarily changed by the
638
+ * QuickBooks user. When left blank in this create request, this field will be left
639
+ * blank in QuickBooks (i.e., it does _not_ auto-increment).
640
+ */
641
+ refNumber?: string;
642
+ /**
643
+ * Body param: The account providing funds for this credit card refund. This is
644
+ * typically the Undeposited Funds account used to hold customer payments. If
645
+ * omitted, QuickBooks Desktop will use the default Undeposited Funds account.
646
+ */
647
+ refundFromAccountId?: string;
648
+ }
649
+ export declare namespace CreditCardRefundCreateParams {
650
+ interface RefundAppliedToTransaction {
651
+ /**
652
+ * The monetary amount to refund from the linked credit transaction within this
653
+ * credit transaction, represented as a decimal string.
654
+ */
655
+ refundAmount: string;
656
+ /**
657
+ * The ID of the credit transaction being refunded by this credit card refund.
658
+ */
659
+ transactionId: string;
660
+ }
661
+ /**
662
+ * The address that is printed on the credit card refund.
663
+ */
664
+ interface Address {
665
+ /**
666
+ * The city, district, suburb, town, or village name of the address.
667
+ *
668
+ * Maximum length: 31 characters.
669
+ */
670
+ city?: string;
671
+ /**
672
+ * The country name of the address.
673
+ */
674
+ country?: string;
675
+ /**
676
+ * The first line of the address (e.g., street, PO Box, or company name).
677
+ *
678
+ * Maximum length: 41 characters.
679
+ */
680
+ line1?: string;
681
+ /**
682
+ * The second line of the address, if needed (e.g., apartment, suite, unit, or
683
+ * building).
684
+ *
685
+ * Maximum length: 41 characters.
686
+ */
687
+ line2?: string;
688
+ /**
689
+ * The third line of the address, if needed.
690
+ *
691
+ * Maximum length: 41 characters.
692
+ */
693
+ line3?: string;
694
+ /**
695
+ * The fourth line of the address, if needed.
696
+ *
697
+ * Maximum length: 41 characters.
698
+ */
699
+ line4?: string;
700
+ /**
701
+ * The fifth line of the address, if needed.
702
+ *
703
+ * Maximum length: 41 characters.
704
+ */
705
+ line5?: string;
706
+ /**
707
+ * A note written at the bottom of the address in the form in which it appears,
708
+ * such as the invoice form.
709
+ */
710
+ note?: string;
711
+ /**
712
+ * The postal code or ZIP code of the address.
713
+ *
714
+ * Maximum length: 13 characters.
715
+ */
716
+ postalCode?: string;
717
+ /**
718
+ * The state, county, province, or region name of the address.
719
+ *
720
+ * Maximum length: 21 characters.
721
+ */
722
+ state?: string;
723
+ }
724
+ /**
725
+ * The credit card transaction data for this credit card refund's payment when
726
+ * using QuickBooks Merchant Services (QBMS). If specifying this field, you must
727
+ * also specify the `paymentMethod` field.
728
+ */
729
+ interface CreditCardTransaction {
730
+ /**
731
+ * The transaction request data originally supplied for this credit card
732
+ * transaction when using QuickBooks Merchant Services (QBMS).
733
+ */
734
+ request?: CreditCardTransaction.Request;
735
+ /**
736
+ * The transaction response data for this credit card transaction when using
737
+ * QuickBooks Merchant Services (QBMS).
738
+ */
739
+ response?: CreditCardTransaction.Response;
740
+ }
741
+ namespace CreditCardTransaction {
742
+ /**
743
+ * The transaction request data originally supplied for this credit card
744
+ * transaction when using QuickBooks Merchant Services (QBMS).
745
+ */
746
+ interface Request {
747
+ /**
748
+ * The month when the credit card expires.
749
+ */
750
+ expirationMonth: number;
751
+ /**
752
+ * The year when the credit card expires.
753
+ */
754
+ expirationYear: number;
755
+ /**
756
+ * The cardholder's name on the card.
757
+ */
758
+ name: string;
759
+ /**
760
+ * The credit card number. Must be masked with lower case "x" and no dashes.
761
+ */
762
+ number: string;
763
+ /**
764
+ * The card's billing address.
765
+ */
766
+ address?: string;
767
+ /**
768
+ * The commercial card code identifies the type of business credit card being used
769
+ * (purchase, corporate, or business) for Visa and Mastercard transactions only.
770
+ * When provided, this code may qualify the transaction for lower processing fees
771
+ * compared to the standard rates that apply when no code is specified.
772
+ */
773
+ commercialCardCode?: string;
774
+ /**
775
+ * The card's billing address ZIP or postal code.
776
+ */
777
+ postalCode?: string;
778
+ /**
779
+ * Indicates whether this credit card transaction came from a card swipe
780
+ * (`card_present`) or not (`card_not_present`).
781
+ */
782
+ transactionMode?: 'card_not_present' | 'card_present';
783
+ /**
784
+ * The QBMS transaction type from which the current transaction data originated.
785
+ */
786
+ transactionType?: 'authorization' | 'capture' | 'charge' | 'refund' | 'voice_authorization';
787
+ }
788
+ /**
789
+ * The transaction response data for this credit card transaction when using
790
+ * QuickBooks Merchant Services (QBMS).
791
+ */
792
+ interface Response {
793
+ /**
794
+ * The ID returned from the credit card processor for this credit card transaction.
795
+ */
796
+ creditCardTransactionId: string;
797
+ /**
798
+ * The QBMS account number of the merchant who is running this transaction using
799
+ * the customer's credit card.
800
+ */
801
+ merchantAccountNumber: string;
802
+ /**
803
+ * Indicates whether this credit card transaction is known to have been
804
+ * successfully processed by the card issuer.
805
+ */
806
+ paymentStatus: 'completed' | 'unknown';
807
+ /**
808
+ * The status code returned in the original QBMS transaction response for this
809
+ * credit card transaction.
810
+ */
811
+ statusCode: number;
812
+ /**
813
+ * The status message returned in the original QBMS transaction response for this
814
+ * credit card transaction.
815
+ */
816
+ statusMessage: string;
817
+ /**
818
+ * The date and time when the credit card processor authorized this credit card
819
+ * transaction.
820
+ */
821
+ transactionAuthorizedAt: string;
822
+ /**
823
+ * The authorization code returned from the credit card processor to indicate that
824
+ * this charge will be paid by the card issuer.
825
+ */
826
+ authorizationCode?: string;
827
+ /**
828
+ * Indicates whether the street address supplied in the transaction request matches
829
+ * the customer's address on file at the card issuer.
830
+ */
831
+ avsStreetStatus?: 'fail' | 'not_available' | 'pass';
832
+ /**
833
+ * Indicates whether the customer postal ZIP code supplied in the transaction
834
+ * request matches the customer's postal code recognized at the card issuer.
835
+ */
836
+ avsZipStatus?: 'fail' | 'not_available' | 'pass';
837
+ /**
838
+ * Indicates whether the card security code supplied in the transaction request
839
+ * matches the card security code recognized for that credit card number at the
840
+ * card issuer.
841
+ */
842
+ cardSecurityCodeMatch?: 'fail' | 'not_available' | 'pass';
843
+ /**
844
+ * A value returned from QBMS transactions for future use by the QuickBooks
845
+ * Reconciliation feature.
846
+ */
847
+ clientTransactionId?: string;
848
+ /**
849
+ * An internal code returned by QuickBooks Merchant Services (QBMS) from the
850
+ * transaction request, needed for the QuickBooks reconciliation feature.
851
+ */
852
+ paymentGroupingCode?: number;
853
+ /**
854
+ * An internal ID returned by QuickBooks Merchant Services (QBMS) from the
855
+ * transaction request, needed for the QuickBooks reconciliation feature.
856
+ */
857
+ reconBatchId?: string;
858
+ /**
859
+ * An internal value for this credit card transaction, needed for the QuickBooks
860
+ * reconciliation feature.
861
+ */
862
+ transactionAuthorizationStamp?: number;
863
+ }
864
+ }
865
+ }
866
+ export interface CreditCardRefundRetrieveParams {
867
+ /**
868
+ * The ID of the EndUser to receive this request (e.g.,
869
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
870
+ */
871
+ conductorEndUserId: string;
872
+ }
873
+ export interface CreditCardRefundListParams extends CursorPageParams {
874
+ /**
875
+ * Header param: The ID of the EndUser to receive this request (e.g.,
876
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
877
+ */
878
+ conductorEndUserId: string;
879
+ /**
880
+ * Query param: Filter for credit card refunds associated with these accounts.
881
+ */
882
+ accountIds?: Array<string>;
883
+ /**
884
+ * Query param: Filter for credit card refunds in these currencies.
885
+ */
886
+ currencyIds?: Array<string>;
887
+ /**
888
+ * Query param: Filter for credit card refunds refunded to these customers.
889
+ */
890
+ customerIds?: Array<string>;
891
+ /**
892
+ * Query param: Filter for specific credit card refunds by their
893
+ * QuickBooks-assigned unique identifier(s).
894
+ *
895
+ * **IMPORTANT**: If you include this parameter, QuickBooks will ignore all other
896
+ * query parameters for this request.
897
+ *
898
+ * **NOTE**: If any of the values you specify in this parameter are not found, the
899
+ * request will return an error.
900
+ */
901
+ ids?: Array<string>;
902
+ /**
903
+ * Query param: Whether to include line items in the response. Defaults to `true`.
904
+ */
905
+ includeLineItems?: boolean;
906
+ /**
907
+ * Query param: Filter for credit card refunds whose `refNumber` contains this
908
+ * substring.
909
+ *
910
+ * **NOTE**: If you use this parameter, you cannot also use `refNumberStartsWith`
911
+ * or `refNumberEndsWith`.
912
+ */
913
+ refNumberContains?: string;
914
+ /**
915
+ * Query param: Filter for credit card refunds whose `refNumber` ends with this
916
+ * substring.
917
+ *
918
+ * **NOTE**: If you use this parameter, you cannot also use `refNumberContains` or
919
+ * `refNumberStartsWith`.
920
+ */
921
+ refNumberEndsWith?: string;
922
+ /**
923
+ * Query param: Filter for credit card refunds whose `refNumber` is greater than or
924
+ * equal to this value. If omitted, the range will begin with the first number of
925
+ * the list. Uses a numerical comparison for values that contain only digits;
926
+ * otherwise, uses a lexicographical comparison.
927
+ */
928
+ refNumberFrom?: string;
929
+ /**
930
+ * Query param: Filter for specific credit card refunds by their ref-number(s),
931
+ * case-sensitive. In QuickBooks, ref-numbers are not required to be unique and can
932
+ * be arbitrarily changed by the QuickBooks user.
933
+ *
934
+ * **IMPORTANT**: If you include this parameter, QuickBooks will ignore all other
935
+ * query parameters for this request.
936
+ *
937
+ * **NOTE**: If any of the values you specify in this parameter are not found, the
938
+ * request will return an error.
939
+ */
940
+ refNumbers?: Array<string>;
941
+ /**
942
+ * Query param: Filter for credit card refunds whose `refNumber` starts with this
943
+ * substring.
944
+ *
945
+ * **NOTE**: If you use this parameter, you cannot also use `refNumberContains` or
946
+ * `refNumberEndsWith`.
947
+ */
948
+ refNumberStartsWith?: string;
949
+ /**
950
+ * Query param: Filter for credit card refunds whose `refNumber` is less than or
951
+ * equal to this value. If omitted, the range will end with the last number of the
952
+ * list. Uses a numerical comparison for values that contain only digits;
953
+ * otherwise, uses a lexicographical comparison.
954
+ */
955
+ refNumberTo?: string;
956
+ /**
957
+ * Query param: Filter for credit card refunds whose `date` field is on or after
958
+ * this date, in ISO 8601 format (YYYY-MM-DD).
959
+ *
960
+ * **NOTE:** QuickBooks Desktop interprets this date as the **start of the
961
+ * specified day** in the local timezone of the end-user's computer (e.g.,
962
+ * `2025-01-01` → `2025-01-01T00:00:00`).
963
+ */
964
+ transactionDateFrom?: string;
965
+ /**
966
+ * Query param: Filter for credit card refunds whose `date` field is on or before
967
+ * this date, in ISO 8601 format (YYYY-MM-DD).
968
+ *
969
+ * **NOTE:** QuickBooks Desktop interprets this date as the **end of the specified
970
+ * day** in the local timezone of the end-user's computer (e.g., `2025-01-01` →
971
+ * `2025-01-01T23:59:59`).
972
+ */
973
+ transactionDateTo?: string;
974
+ /**
975
+ * Query param: Filter for credit card refunds updated on or after this date/time.
976
+ * Accepts the following ISO 8601 formats:
977
+ *
978
+ * - **date-only** (YYYY-MM-DD) - QuickBooks Desktop interprets the date as the
979
+ * **start of the specified day** in the local timezone of the end-user's
980
+ * computer (e.g., `2025-01-01` → `2025-01-01T00:00:00`).
981
+ * - **datetime without timezone** (YYYY-MM-DDTHH:mm:ss) - QuickBooks Desktop
982
+ * interprets the timestamp in the local timezone of the end-user's computer.
983
+ * - **datetime with timezone** (YYYY-MM-DDTHH:mm:ss±HH:mm) - QuickBooks Desktop
984
+ * interprets the timestamp using the specified timezone.
985
+ */
986
+ updatedAfter?: string;
987
+ /**
988
+ * Query param: Filter for credit card refunds updated on or before this date/time.
989
+ * Accepts the following ISO 8601 formats:
990
+ *
991
+ * - **date-only** (YYYY-MM-DD) - QuickBooks Desktop interprets the date as the
992
+ * **end of the specified day** in the local timezone of the end-user's computer
993
+ * (e.g., `2025-01-01` → `2025-01-01T23:59:59`).
994
+ * - **datetime without timezone** (YYYY-MM-DDTHH:mm:ss) - QuickBooks Desktop
995
+ * interprets the timestamp in the local timezone of the end-user's computer.
996
+ * - **datetime with timezone** (YYYY-MM-DDTHH:mm:ss±HH:mm) - QuickBooks Desktop
997
+ * interprets the timestamp using the specified timezone.
998
+ */
999
+ updatedBefore?: string;
1000
+ }
1001
+ export interface CreditCardRefundDeleteParams {
1002
+ /**
1003
+ * The ID of the EndUser to receive this request (e.g.,
1004
+ * `"Conductor-End-User-Id: {{END_USER_ID}}"`).
1005
+ */
1006
+ conductorEndUserId: string;
1007
+ }
1008
+ export declare namespace CreditCardRefunds {
1009
+ export { type CreditCardRefund as CreditCardRefund, type CreditCardRefundDeleteResponse as CreditCardRefundDeleteResponse, CreditCardRefundsCursorPage as CreditCardRefundsCursorPage, type CreditCardRefundCreateParams as CreditCardRefundCreateParams, type CreditCardRefundRetrieveParams as CreditCardRefundRetrieveParams, type CreditCardRefundListParams as CreditCardRefundListParams, type CreditCardRefundDeleteParams as CreditCardRefundDeleteParams, };
1010
+ }
1011
+ //# sourceMappingURL=credit-card-refunds.d.ts.map