@payabli/sdk-node 0.0.117 → 0.0.123

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 (117) hide show
  1. package/README.md +25 -13
  2. package/dist/cjs/BaseClient.d.ts +7 -7
  3. package/dist/cjs/BaseClient.js +3 -1
  4. package/dist/cjs/Client.d.ts +1 -2
  5. package/dist/cjs/api/errors/BadRequestError.js +5 -1
  6. package/dist/cjs/api/errors/ConflictError.js +5 -1
  7. package/dist/cjs/api/errors/ForbiddenError.js +5 -1
  8. package/dist/cjs/api/errors/InternalServerError.js +5 -1
  9. package/dist/cjs/api/errors/ServiceUnavailableError.js +5 -1
  10. package/dist/cjs/api/errors/UnauthorizedError.js +5 -1
  11. package/dist/cjs/api/resources/bill/client/Client.d.ts +1 -2
  12. package/dist/cjs/api/resources/boarding/client/Client.d.ts +1 -2
  13. package/dist/cjs/api/resources/chargeBacks/client/Client.d.ts +1 -2
  14. package/dist/cjs/api/resources/checkCapture/client/Client.d.ts +1 -2
  15. package/dist/cjs/api/resources/cloud/client/Client.d.ts +1 -2
  16. package/dist/cjs/api/resources/customer/client/Client.d.ts +1 -2
  17. package/dist/cjs/api/resources/export/client/Client.d.ts +1 -2
  18. package/dist/cjs/api/resources/hostedPaymentPages/client/Client.d.ts +1 -2
  19. package/dist/cjs/api/resources/import/client/Client.d.ts +1 -2
  20. package/dist/cjs/api/resources/invoice/client/Client.d.ts +6 -5
  21. package/dist/cjs/api/resources/invoice/client/Client.js +5 -3
  22. package/dist/cjs/api/resources/invoice/client/requests/AddInvoiceRequest.d.ts +5 -3
  23. package/dist/cjs/api/resources/lineItem/client/Client.d.ts +1 -2
  24. package/dist/cjs/api/resources/moneyIn/client/Client.d.ts +1 -2
  25. package/dist/cjs/api/resources/moneyIn/errors/CaptureError.js +5 -1
  26. package/dist/cjs/api/resources/moneyIn/errors/InvalidTransStatusError.js +5 -1
  27. package/dist/cjs/api/resources/moneyOut/client/Client.d.ts +1 -2
  28. package/dist/cjs/api/resources/notification/client/Client.d.ts +14 -2
  29. package/dist/cjs/api/resources/notification/client/Client.js +13 -0
  30. package/dist/cjs/api/resources/notificationlogs/client/Client.d.ts +1 -2
  31. package/dist/cjs/api/resources/ocr/client/Client.d.ts +1 -2
  32. package/dist/cjs/api/resources/organization/client/Client.d.ts +1 -2
  33. package/dist/cjs/api/resources/paymentLink/client/Client.d.ts +4 -5
  34. package/dist/cjs/api/resources/paymentLink/client/Client.js +3 -3
  35. package/dist/cjs/api/resources/paymentLink/client/requests/PayLinkDataBill.d.ts +1 -1
  36. package/dist/cjs/api/resources/paymentLink/client/requests/PayLinkDataInvoice.d.ts +1 -1
  37. package/dist/cjs/api/resources/paymentLink/client/requests/PayLinkDataOut.d.ts +1 -1
  38. package/dist/cjs/api/resources/paymentLink/types/PaymentPageRequestBody.d.ts +2 -2
  39. package/dist/cjs/api/resources/paymentMethodDomain/client/Client.d.ts +1 -2
  40. package/dist/cjs/api/resources/paypoint/client/Client.d.ts +1 -2
  41. package/dist/cjs/api/resources/query/client/Client.d.ts +1 -2
  42. package/dist/cjs/api/resources/statistic/client/Client.d.ts +1 -2
  43. package/dist/cjs/api/resources/subscription/client/Client.d.ts +1 -2
  44. package/dist/cjs/api/resources/templates/client/Client.d.ts +1 -2
  45. package/dist/cjs/api/resources/tokenStorage/client/Client.d.ts +1 -2
  46. package/dist/cjs/api/resources/tokenStorage/types/GetMethodResponse.d.ts +1 -1
  47. package/dist/cjs/api/resources/user/client/Client.d.ts +1 -2
  48. package/dist/cjs/api/resources/vendor/client/Client.d.ts +1 -2
  49. package/dist/cjs/api/resources/wallet/client/Client.d.ts +1 -2
  50. package/dist/cjs/api/types/Frequency.d.ts +1 -1
  51. package/dist/cjs/api/types/Frequency.js +1 -1
  52. package/dist/cjs/api/types/FrequencyList.d.ts +1 -1
  53. package/dist/cjs/api/types/PayorDataResponse.d.ts +1 -1
  54. package/dist/cjs/auth/HeaderAuthProvider.d.ts +4 -2
  55. package/dist/cjs/errors/PayabliError.js +5 -1
  56. package/dist/cjs/errors/PayabliTimeoutError.js +5 -1
  57. package/dist/cjs/version.d.ts +1 -0
  58. package/dist/cjs/version.js +4 -0
  59. package/dist/esm/BaseClient.d.mts +7 -7
  60. package/dist/esm/BaseClient.mjs +3 -1
  61. package/dist/esm/Client.d.mts +1 -2
  62. package/dist/esm/api/errors/BadRequestError.mjs +5 -1
  63. package/dist/esm/api/errors/ConflictError.mjs +5 -1
  64. package/dist/esm/api/errors/ForbiddenError.mjs +5 -1
  65. package/dist/esm/api/errors/InternalServerError.mjs +5 -1
  66. package/dist/esm/api/errors/ServiceUnavailableError.mjs +5 -1
  67. package/dist/esm/api/errors/UnauthorizedError.mjs +5 -1
  68. package/dist/esm/api/resources/bill/client/Client.d.mts +1 -2
  69. package/dist/esm/api/resources/boarding/client/Client.d.mts +1 -2
  70. package/dist/esm/api/resources/chargeBacks/client/Client.d.mts +1 -2
  71. package/dist/esm/api/resources/checkCapture/client/Client.d.mts +1 -2
  72. package/dist/esm/api/resources/cloud/client/Client.d.mts +1 -2
  73. package/dist/esm/api/resources/customer/client/Client.d.mts +1 -2
  74. package/dist/esm/api/resources/export/client/Client.d.mts +1 -2
  75. package/dist/esm/api/resources/hostedPaymentPages/client/Client.d.mts +1 -2
  76. package/dist/esm/api/resources/import/client/Client.d.mts +1 -2
  77. package/dist/esm/api/resources/invoice/client/Client.d.mts +6 -5
  78. package/dist/esm/api/resources/invoice/client/Client.mjs +5 -3
  79. package/dist/esm/api/resources/invoice/client/requests/AddInvoiceRequest.d.mts +5 -3
  80. package/dist/esm/api/resources/lineItem/client/Client.d.mts +1 -2
  81. package/dist/esm/api/resources/moneyIn/client/Client.d.mts +1 -2
  82. package/dist/esm/api/resources/moneyIn/errors/CaptureError.mjs +5 -1
  83. package/dist/esm/api/resources/moneyIn/errors/InvalidTransStatusError.mjs +5 -1
  84. package/dist/esm/api/resources/moneyOut/client/Client.d.mts +1 -2
  85. package/dist/esm/api/resources/notification/client/Client.d.mts +14 -2
  86. package/dist/esm/api/resources/notification/client/Client.mjs +13 -0
  87. package/dist/esm/api/resources/notificationlogs/client/Client.d.mts +1 -2
  88. package/dist/esm/api/resources/ocr/client/Client.d.mts +1 -2
  89. package/dist/esm/api/resources/organization/client/Client.d.mts +1 -2
  90. package/dist/esm/api/resources/paymentLink/client/Client.d.mts +4 -5
  91. package/dist/esm/api/resources/paymentLink/client/Client.mjs +3 -3
  92. package/dist/esm/api/resources/paymentLink/client/requests/PayLinkDataBill.d.mts +1 -1
  93. package/dist/esm/api/resources/paymentLink/client/requests/PayLinkDataInvoice.d.mts +1 -1
  94. package/dist/esm/api/resources/paymentLink/client/requests/PayLinkDataOut.d.mts +1 -1
  95. package/dist/esm/api/resources/paymentLink/types/PaymentPageRequestBody.d.mts +2 -2
  96. package/dist/esm/api/resources/paymentMethodDomain/client/Client.d.mts +1 -2
  97. package/dist/esm/api/resources/paypoint/client/Client.d.mts +1 -2
  98. package/dist/esm/api/resources/query/client/Client.d.mts +1 -2
  99. package/dist/esm/api/resources/statistic/client/Client.d.mts +1 -2
  100. package/dist/esm/api/resources/subscription/client/Client.d.mts +1 -2
  101. package/dist/esm/api/resources/templates/client/Client.d.mts +1 -2
  102. package/dist/esm/api/resources/tokenStorage/client/Client.d.mts +1 -2
  103. package/dist/esm/api/resources/tokenStorage/types/GetMethodResponse.d.mts +1 -1
  104. package/dist/esm/api/resources/user/client/Client.d.mts +1 -2
  105. package/dist/esm/api/resources/vendor/client/Client.d.mts +1 -2
  106. package/dist/esm/api/resources/wallet/client/Client.d.mts +1 -2
  107. package/dist/esm/api/types/Frequency.d.mts +1 -1
  108. package/dist/esm/api/types/Frequency.mjs +1 -1
  109. package/dist/esm/api/types/FrequencyList.d.mts +1 -1
  110. package/dist/esm/api/types/PayorDataResponse.d.mts +1 -1
  111. package/dist/esm/auth/HeaderAuthProvider.d.mts +4 -2
  112. package/dist/esm/errors/PayabliError.mjs +5 -1
  113. package/dist/esm/errors/PayabliTimeoutError.mjs +5 -1
  114. package/dist/esm/version.d.mts +1 -0
  115. package/dist/esm/version.mjs +1 -0
  116. package/package.json +7 -4
  117. package/reference.md +8 -6
@@ -63,7 +63,7 @@ import type * as Payabli from "../../../../index.js";
63
63
  * name: "fullName",
64
64
  * order: 0,
65
65
  * required: true,
66
- * validation: "^[a-zA-Z ]+$",
66
+ * validation: "alpha",
67
67
  * value: "",
68
68
  * width: 0
69
69
  * }],
@@ -84,7 +84,7 @@ import type * as Payabli from "../../../../index.js";
84
84
  * name: "fullName",
85
85
  * order: 0,
86
86
  * required: true,
87
- * validation: "^[a-zA-Z ]+$",
87
+ * validation: "alpha",
88
88
  * value: "",
89
89
  * width: 0
90
90
  * }],
@@ -66,7 +66,7 @@ import type * as Payabli from "../../../../index.js";
66
66
  * name: "fullName",
67
67
  * order: 0,
68
68
  * required: true,
69
- * validation: "^[a-zA-Z ]+$",
69
+ * validation: "alpha",
70
70
  * value: "",
71
71
  * width: 0
72
72
  * }],
@@ -82,7 +82,7 @@ import type * as Payabli from "../../../index.js";
82
82
  * name: "fullName",
83
83
  * order: 0,
84
84
  * required: true,
85
- * validation: "^[a-zA-Z ]+$",
85
+ * validation: "alpha",
86
86
  * value: "",
87
87
  * width: 0
88
88
  * }],
@@ -170,7 +170,7 @@ import type * as Payabli from "../../../index.js";
170
170
  * name: "fullName",
171
171
  * order: 0,
172
172
  * required: true,
173
- * validation: "^[a-zA-Z ]+$",
173
+ * validation: "alpha",
174
174
  * value: "",
175
175
  * width: 0
176
176
  * }],
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as Payabli from "../../../index.js";
5
5
  export declare namespace PaymentMethodDomainClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as Payabli from "../../../index.js";
5
5
  export declare namespace PaypointClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as Payabli from "../../../index.js";
5
5
  export declare namespace QueryClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as Payabli from "../../../index.js";
5
5
  export declare namespace StatisticClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as Payabli from "../../../index.js";
5
5
  export declare namespace SubscriptionClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as Payabli from "../../../index.js";
5
5
  export declare namespace TemplatesClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as Payabli from "../../../index.js";
5
5
  export declare namespace TokenStorageClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -22,7 +22,7 @@ export declare namespace GetMethodResponse {
22
22
  /** The stored payment method's identifier in Payabli */
23
23
  idPmethod?: string;
24
24
  /** Timestamp for last update of stored method, in UTC */
25
- lastUpdated?: Payabli.LastModified | undefined;
25
+ lastUpdated?: string;
26
26
  maskedAccount?: Payabli.Maskedaccount;
27
27
  /** The saved method's type: `card` or `ach`. */
28
28
  method?: string;
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as Payabli from "../../../index.js";
5
5
  export declare namespace UserClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as Payabli from "../../../index.js";
5
5
  export declare namespace VendorClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as Payabli from "../../../index.js";
5
5
  export declare namespace WalletClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -1,6 +1,6 @@
1
1
  /** Frequency for operation. */
2
2
  export declare const Frequency: {
3
- readonly OneTime: "one-time";
3
+ readonly OneTime: "onetime";
4
4
  readonly Weekly: "weekly";
5
5
  readonly Every2Weeks: "every2weeks";
6
6
  readonly Every6Months: "every6months";
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.Frequency = void 0;
5
5
  /** Frequency for operation. */
6
6
  exports.Frequency = {
7
- OneTime: "one-time",
7
+ OneTime: "onetime",
8
8
  Weekly: "weekly",
9
9
  Every2Weeks: "every2weeks",
10
10
  Every6Months: "every6months",
@@ -10,7 +10,7 @@ export interface FrequencyList {
10
10
  /** Enable or disable frequency */
11
11
  monthly?: boolean;
12
12
  /** Enable or disable frequency */
13
- "one-time"?: boolean;
13
+ onetime?: boolean;
14
14
  /** Enable or disable frequency */
15
15
  weekly?: boolean;
16
16
  }
@@ -3,7 +3,7 @@ import type * as Payabli from "../index.js";
3
3
  * Customer information.
4
4
  */
5
5
  export interface PayorDataResponse {
6
- AdditionalData: Payabli.AdditionalData | null;
6
+ AdditionalData: Payabli.AdditionalDataMap | null;
7
7
  BillingAddress1: Payabli.BillingAddressNullable | null;
8
8
  BillingAddress2: Payabli.BillingAddressAddtlNullable | null;
9
9
  BillingCity: Payabli.BillingCityNullable | null;
@@ -1,7 +1,9 @@
1
1
  import * as core from "../core/index.js";
2
2
  export declare namespace HeaderAuthProvider {
3
- interface Options {
4
- apiKey?: core.Supplier<string | undefined>;
3
+ interface AuthOptions {
4
+ apiKey?: core.Supplier<string>;
5
+ }
6
+ interface Options extends AuthOptions {
5
7
  }
6
8
  }
7
9
  export declare class HeaderAuthProvider implements core.AuthProvider {
@@ -6,7 +6,11 @@ const json_js_1 = require("../core/json.js");
6
6
  class PayabliError extends Error {
7
7
  constructor({ message, statusCode, body, rawResponse, }) {
8
8
  super(buildMessage({ message, statusCode, body }));
9
- Object.setPrototypeOf(this, PayabliError.prototype);
9
+ Object.setPrototypeOf(this, new.target.prototype);
10
+ if (Error.captureStackTrace) {
11
+ Error.captureStackTrace(this, this.constructor);
12
+ }
13
+ this.name = this.constructor.name;
10
14
  this.statusCode = statusCode;
11
15
  this.body = body;
12
16
  this.rawResponse = rawResponse;
@@ -5,7 +5,11 @@ exports.PayabliTimeoutError = void 0;
5
5
  class PayabliTimeoutError extends Error {
6
6
  constructor(message) {
7
7
  super(message);
8
- Object.setPrototypeOf(this, PayabliTimeoutError.prototype);
8
+ Object.setPrototypeOf(this, new.target.prototype);
9
+ if (Error.captureStackTrace) {
10
+ Error.captureStackTrace(this, this.constructor);
11
+ }
12
+ this.name = this.constructor.name;
9
13
  }
10
14
  }
11
15
  exports.PayabliTimeoutError = PayabliTimeoutError;
@@ -0,0 +1 @@
1
+ export declare const SDK_VERSION = "0.0.123";
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SDK_VERSION = void 0;
4
+ exports.SDK_VERSION = "0.0.123";
@@ -1,10 +1,10 @@
1
+ import { HeaderAuthProvider } from "./auth/HeaderAuthProvider.mjs";
1
2
  import * as core from "./core/index.mjs";
2
3
  import type * as environments from "./environments.mjs";
3
- export interface BaseClientOptions {
4
+ export type BaseClientOptions = {
4
5
  environment?: core.Supplier<environments.PayabliEnvironment | string>;
5
6
  /** Specify a custom URL to connect the client to. */
6
7
  baseUrl?: core.Supplier<string>;
7
- apiKey?: core.Supplier<string | undefined>;
8
8
  /** Additional headers to include in requests. */
9
9
  headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
10
10
  /** The default maximum time to wait for a response in seconds. */
@@ -15,7 +15,7 @@ export interface BaseClientOptions {
15
15
  fetch?: typeof fetch;
16
16
  /** Configure logging for the client. */
17
17
  logging?: core.logging.LogConfig | core.logging.Logger;
18
- }
18
+ } & HeaderAuthProvider.AuthOptions;
19
19
  export interface BaseRequestOptions {
20
20
  /** The maximum time to wait for a response in seconds. */
21
21
  timeoutInSeconds?: number;
@@ -28,12 +28,12 @@ export interface BaseRequestOptions {
28
28
  /** Additional headers to include in the request. */
29
29
  headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
30
30
  }
31
- export type NormalizedClientOptions<T extends BaseClientOptions> = T & {
31
+ export type NormalizedClientOptions<T extends BaseClientOptions = BaseClientOptions> = T & {
32
32
  logging: core.logging.Logger;
33
33
  authProvider?: core.AuthProvider;
34
34
  };
35
- export type NormalizedClientOptionsWithAuth<T extends BaseClientOptions> = NormalizedClientOptions<T> & {
35
+ export type NormalizedClientOptionsWithAuth<T extends BaseClientOptions = BaseClientOptions> = NormalizedClientOptions<T> & {
36
36
  authProvider: core.AuthProvider;
37
37
  };
38
- export declare function normalizeClientOptions<T extends BaseClientOptions>(options: T): NormalizedClientOptions<T>;
39
- export declare function normalizeClientOptionsWithAuth<T extends BaseClientOptions>(options: T): NormalizedClientOptionsWithAuth<T>;
38
+ export declare function normalizeClientOptions<T extends BaseClientOptions = BaseClientOptions>(options: T): NormalizedClientOptions<T>;
39
+ export declare function normalizeClientOptionsWithAuth<T extends BaseClientOptions = BaseClientOptions>(options: T): NormalizedClientOptionsWithAuth<T>;
@@ -5,7 +5,9 @@ import * as core from "./core/index.mjs";
5
5
  export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
- "User-Agent": "@payabli/sdk-node/0.0.120",
8
+ "X-Fern-SDK-Name": "@payabli/sdk-node",
9
+ "X-Fern-SDK-Version": "0.0.123",
10
+ "User-Agent": "@payabli/sdk-node/0.0.123",
9
11
  "X-Fern-Runtime": core.RUNTIME.type,
10
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
11
13
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -29,8 +29,7 @@ import { WalletClient } from "./api/resources/wallet/client/Client.mjs";
29
29
  import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.mjs";
30
30
  import { type NormalizedClientOptionsWithAuth } from "./BaseClient.mjs";
31
31
  export declare namespace PayabliClient {
32
- interface Options extends BaseClientOptions {
33
- }
32
+ type Options = BaseClientOptions;
34
33
  interface RequestOptions extends BaseRequestOptions {
35
34
  }
36
35
  }
@@ -8,6 +8,10 @@ export class BadRequestError extends errors.PayabliError {
8
8
  body: body,
9
9
  rawResponse: rawResponse,
10
10
  });
11
- Object.setPrototypeOf(this, BadRequestError.prototype);
11
+ Object.setPrototypeOf(this, new.target.prototype);
12
+ if (Error.captureStackTrace) {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ this.name = this.constructor.name;
12
16
  }
13
17
  }
@@ -8,6 +8,10 @@ export class ConflictError extends errors.PayabliError {
8
8
  body: body,
9
9
  rawResponse: rawResponse,
10
10
  });
11
- Object.setPrototypeOf(this, ConflictError.prototype);
11
+ Object.setPrototypeOf(this, new.target.prototype);
12
+ if (Error.captureStackTrace) {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ this.name = this.constructor.name;
12
16
  }
13
17
  }
@@ -8,6 +8,10 @@ export class ForbiddenError extends errors.PayabliError {
8
8
  body: body,
9
9
  rawResponse: rawResponse,
10
10
  });
11
- Object.setPrototypeOf(this, ForbiddenError.prototype);
11
+ Object.setPrototypeOf(this, new.target.prototype);
12
+ if (Error.captureStackTrace) {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ this.name = this.constructor.name;
12
16
  }
13
17
  }
@@ -8,6 +8,10 @@ export class InternalServerError extends errors.PayabliError {
8
8
  body: body,
9
9
  rawResponse: rawResponse,
10
10
  });
11
- Object.setPrototypeOf(this, InternalServerError.prototype);
11
+ Object.setPrototypeOf(this, new.target.prototype);
12
+ if (Error.captureStackTrace) {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ this.name = this.constructor.name;
12
16
  }
13
17
  }
@@ -8,6 +8,10 @@ export class ServiceUnavailableError extends errors.PayabliError {
8
8
  body: body,
9
9
  rawResponse: rawResponse,
10
10
  });
11
- Object.setPrototypeOf(this, ServiceUnavailableError.prototype);
11
+ Object.setPrototypeOf(this, new.target.prototype);
12
+ if (Error.captureStackTrace) {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ this.name = this.constructor.name;
12
16
  }
13
17
  }
@@ -8,6 +8,10 @@ export class UnauthorizedError extends errors.PayabliError {
8
8
  body: body,
9
9
  rawResponse: rawResponse,
10
10
  });
11
- Object.setPrototypeOf(this, UnauthorizedError.prototype);
11
+ Object.setPrototypeOf(this, new.target.prototype);
12
+ if (Error.captureStackTrace) {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ this.name = this.constructor.name;
12
16
  }
13
17
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs
3
3
  import * as core from "../../../../core/index.mjs";
4
4
  import * as Payabli from "../../../index.mjs";
5
5
  export declare namespace BillClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs
3
3
  import * as core from "../../../../core/index.mjs";
4
4
  import * as Payabli from "../../../index.mjs";
5
5
  export declare namespace BoardingClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs
3
3
  import * as core from "../../../../core/index.mjs";
4
4
  import * as Payabli from "../../../index.mjs";
5
5
  export declare namespace ChargeBacksClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs
3
3
  import * as core from "../../../../core/index.mjs";
4
4
  import * as Payabli from "../../../index.mjs";
5
5
  export declare namespace CheckCaptureClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs
3
3
  import * as core from "../../../../core/index.mjs";
4
4
  import * as Payabli from "../../../index.mjs";
5
5
  export declare namespace CloudClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs
3
3
  import * as core from "../../../../core/index.mjs";
4
4
  import * as Payabli from "../../../index.mjs";
5
5
  export declare namespace CustomerClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs
3
3
  import * as core from "../../../../core/index.mjs";
4
4
  import * as Payabli from "../../../index.mjs";
5
5
  export declare namespace ExportClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs
3
3
  import * as core from "../../../../core/index.mjs";
4
4
  import * as Payabli from "../../../index.mjs";
5
5
  export declare namespace HostedPaymentPagesClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs
3
3
  import * as core from "../../../../core/index.mjs";
4
4
  import * as Payabli from "../../../index.mjs";
5
5
  export declare namespace ImportClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs
3
3
  import * as core from "../../../../core/index.mjs";
4
4
  import * as Payabli from "../../../index.mjs";
5
5
  export declare namespace InvoiceClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -37,17 +36,19 @@ export declare class InvoiceClient {
37
36
  * itemDescription: "Consultation for Georgian tours",
38
37
  * itemCost: 100,
39
38
  * itemQty: 1,
40
- * itemMode: 1
39
+ * itemMode: 1,
40
+ * itemTotalAmount: 1
41
41
  * }, {
42
42
  * itemProductName: "Deposit ",
43
43
  * itemDescription: "Deposit for trip planning",
44
44
  * itemCost: 882.37,
45
- * itemQty: 1
45
+ * itemQty: 1,
46
+ * itemTotalAmount: 1
46
47
  * }],
47
48
  * invoiceDate: "2025-10-19",
48
49
  * invoiceType: 0,
49
50
  * invoiceStatus: 1,
50
- * frequency: "one-time",
51
+ * frequency: "onetime",
51
52
  * invoiceAmount: 982.37,
52
53
  * discount: 10,
53
54
  * invoiceNumber: "INV-3"
@@ -46,17 +46,19 @@ export class InvoiceClient {
46
46
  * itemDescription: "Consultation for Georgian tours",
47
47
  * itemCost: 100,
48
48
  * itemQty: 1,
49
- * itemMode: 1
49
+ * itemMode: 1,
50
+ * itemTotalAmount: 1
50
51
  * }, {
51
52
  * itemProductName: "Deposit ",
52
53
  * itemDescription: "Deposit for trip planning",
53
54
  * itemCost: 882.37,
54
- * itemQty: 1
55
+ * itemQty: 1,
56
+ * itemTotalAmount: 1
55
57
  * }],
56
58
  * invoiceDate: "2025-10-19",
57
59
  * invoiceType: 0,
58
60
  * invoiceStatus: 1,
59
- * frequency: "one-time",
61
+ * frequency: "onetime",
60
62
  * invoiceAmount: 982.37,
61
63
  * discount: 10,
62
64
  * invoiceNumber: "INV-3"
@@ -14,17 +14,19 @@ import type * as Payabli from "../../../../index.mjs";
14
14
  * itemDescription: "Consultation for Georgian tours",
15
15
  * itemCost: 100,
16
16
  * itemQty: 1,
17
- * itemMode: 1
17
+ * itemMode: 1,
18
+ * itemTotalAmount: 1
18
19
  * }, {
19
20
  * itemProductName: "Deposit ",
20
21
  * itemDescription: "Deposit for trip planning",
21
22
  * itemCost: 882.37,
22
- * itemQty: 1
23
+ * itemQty: 1,
24
+ * itemTotalAmount: 1
23
25
  * }],
24
26
  * invoiceDate: "2025-10-19",
25
27
  * invoiceType: 0,
26
28
  * invoiceStatus: 1,
27
- * frequency: "one-time",
29
+ * frequency: "onetime",
28
30
  * invoiceAmount: 982.37,
29
31
  * discount: 10,
30
32
  * invoiceNumber: "INV-3"
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs
3
3
  import * as core from "../../../../core/index.mjs";
4
4
  import * as Payabli from "../../../index.mjs";
5
5
  export declare namespace LineItemClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs
3
3
  import * as core from "../../../../core/index.mjs";
4
4
  import * as Payabli from "../../../index.mjs";
5
5
  export declare namespace MoneyInClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -8,6 +8,10 @@ export class CaptureError extends errors.PayabliError {
8
8
  body: body,
9
9
  rawResponse: rawResponse,
10
10
  });
11
- Object.setPrototypeOf(this, CaptureError.prototype);
11
+ Object.setPrototypeOf(this, new.target.prototype);
12
+ if (Error.captureStackTrace) {
13
+ Error.captureStackTrace(this, this.constructor);
14
+ }
15
+ this.name = this.constructor.name;
12
16
  }
13
17
  }