@payabli/sdk-node 0.0.109 → 0.0.110
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/README.md +5 -1
- package/dist/cjs/Client.d.ts +2 -2
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/bill/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/boarding/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/chargeBacks/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/chargeBacks/client/requests/ResponseChargeBack.d.ts +1 -2
- package/dist/cjs/api/resources/checkCapture/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/cloud/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/customer/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/export/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/hostedPaymentPages/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/import/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/invoice/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/lineItem/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/moneyIn/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/moneyIn/errors/CaptureError.js +1 -1
- package/dist/cjs/api/resources/moneyOut/client/Client.d.ts +8 -10
- package/dist/cjs/api/resources/moneyOut/client/Client.js +6 -8
- package/dist/cjs/api/resources/moneyOut/client/requests/MoneyOutTypesRequestOutAuthorize.d.ts +6 -8
- package/dist/cjs/api/resources/moneyOutTypes/types/AuthorizePaymentMethod.d.ts +30 -0
- package/dist/cjs/api/resources/moneyOutTypes/types/AuthorizePaymentMethod.js +5 -0
- package/dist/cjs/api/resources/moneyOutTypes/types/AuthorizePayoutBody.d.ts +3 -10
- package/dist/cjs/api/resources/moneyOutTypes/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/moneyOutTypes/types/index.js +1 -0
- package/dist/cjs/api/resources/notification/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/ocr/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/organization/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/organization/client/requests/AddOrganizationRequest.d.ts +1 -2
- package/dist/cjs/api/resources/paymentLink/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/paymentMethodDomain/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/paypoint/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/query/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/query/client/requests/ListTransfersRequest.d.ts +3 -0
- package/dist/cjs/api/resources/query/client/requests/ListVcardsOrgRequest.d.ts +0 -2
- package/dist/cjs/api/resources/query/client/requests/ListVcardsRequest.d.ts +0 -2
- package/dist/cjs/api/resources/queryTypes/types/ListOrganizationsResponse.d.ts +2 -2
- package/dist/cjs/api/resources/queryTypes/types/QueryBatchesDetailResponse.d.ts +7 -7
- package/dist/cjs/api/resources/queryTypes/types/QueryBatchesResponse.d.ts +10 -10
- package/dist/cjs/api/resources/queryTypes/types/QueryTransferDetailResponse.d.ts +72 -72
- package/dist/cjs/api/resources/queryTypes/types/QueryTransferResponse.d.ts +2 -2
- package/dist/cjs/api/resources/queryTypes/types/QueryTransferSummary.d.ts +23 -18
- package/dist/cjs/api/resources/statistic/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/subscription/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/templates/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/tokenStorage/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/user/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/vendor/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/wallet/client/Client.d.ts +2 -2
- package/dist/cjs/api/types/AdditionalData.d.ts +1 -1
- package/dist/cjs/api/types/IdempotencyKey.d.ts +1 -1
- package/dist/cjs/api/types/Transfer.d.ts +18 -6
- package/dist/cjs/api/types/TransferQueryResponse.d.ts +10 -6
- package/dist/cjs/core/fetcher/Fetcher.d.ts +1 -1
- package/dist/cjs/core/fetcher/requestWithRetries.js +34 -2
- package/dist/cjs/core/headers.d.ts +2 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +2 -2
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/bill/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/boarding/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/chargeBacks/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/chargeBacks/client/requests/ResponseChargeBack.d.mts +1 -2
- package/dist/esm/api/resources/checkCapture/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/cloud/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/customer/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/export/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/hostedPaymentPages/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/import/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/invoice/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/lineItem/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/moneyIn/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/moneyIn/errors/CaptureError.mjs +1 -1
- package/dist/esm/api/resources/moneyOut/client/Client.d.mts +8 -10
- package/dist/esm/api/resources/moneyOut/client/Client.mjs +6 -8
- package/dist/esm/api/resources/moneyOut/client/requests/MoneyOutTypesRequestOutAuthorize.d.mts +6 -8
- package/dist/esm/api/resources/moneyOutTypes/types/AuthorizePaymentMethod.d.mts +30 -0
- package/dist/esm/api/resources/moneyOutTypes/types/AuthorizePaymentMethod.mjs +4 -0
- package/dist/esm/api/resources/moneyOutTypes/types/AuthorizePayoutBody.d.mts +3 -10
- package/dist/esm/api/resources/moneyOutTypes/types/index.d.mts +1 -0
- package/dist/esm/api/resources/moneyOutTypes/types/index.mjs +1 -0
- package/dist/esm/api/resources/notification/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/ocr/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/organization/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/organization/client/requests/AddOrganizationRequest.d.mts +1 -2
- package/dist/esm/api/resources/paymentLink/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/paymentMethodDomain/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/paypoint/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/query/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/query/client/requests/ListTransfersRequest.d.mts +3 -0
- package/dist/esm/api/resources/query/client/requests/ListVcardsOrgRequest.d.mts +0 -2
- package/dist/esm/api/resources/query/client/requests/ListVcardsRequest.d.mts +0 -2
- package/dist/esm/api/resources/queryTypes/types/ListOrganizationsResponse.d.mts +2 -2
- package/dist/esm/api/resources/queryTypes/types/QueryBatchesDetailResponse.d.mts +7 -7
- package/dist/esm/api/resources/queryTypes/types/QueryBatchesResponse.d.mts +10 -10
- package/dist/esm/api/resources/queryTypes/types/QueryTransferDetailResponse.d.mts +72 -72
- package/dist/esm/api/resources/queryTypes/types/QueryTransferResponse.d.mts +2 -2
- package/dist/esm/api/resources/queryTypes/types/QueryTransferSummary.d.mts +23 -18
- package/dist/esm/api/resources/statistic/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/subscription/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/templates/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/tokenStorage/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/user/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/vendor/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/wallet/client/Client.d.mts +2 -2
- package/dist/esm/api/types/AdditionalData.d.mts +1 -1
- package/dist/esm/api/types/IdempotencyKey.d.mts +1 -1
- package/dist/esm/api/types/Transfer.d.mts +18 -6
- package/dist/esm/api/types/TransferQueryResponse.d.mts +10 -6
- package/dist/esm/core/fetcher/Fetcher.d.mts +1 -1
- package/dist/esm/core/fetcher/requestWithRetries.mjs +34 -2
- package/dist/esm/core/headers.d.mts +2 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
|
@@ -13,10 +13,14 @@ import * as Payabli from "../index.js";
|
|
|
13
13
|
* batchRecords: 1,
|
|
14
14
|
* transferIdentifier: "bbcbfed7-e535-45fe-8d62-000000",
|
|
15
15
|
* batchId: 111430,
|
|
16
|
-
* paypointEntryName: "
|
|
17
|
-
* paypointLegalName: "
|
|
18
|
-
* paypointDbaName: "
|
|
16
|
+
* paypointEntryName: "47ae3de37",
|
|
17
|
+
* paypointLegalName: "Gruzya Outdoor Outfitters LLC",
|
|
18
|
+
* paypointDbaName: "Gruzya Outdoor Outfitters",
|
|
19
19
|
* paypointLogo: "https://example.com/logo.png",
|
|
20
|
+
* parentOrgName: "Pilgrim Planner",
|
|
21
|
+
* parentOrgId: 12345,
|
|
22
|
+
* parentOrgLogo: "https://example.com/parent-logo.png",
|
|
23
|
+
* externalPaypointId: "ext-12345",
|
|
20
24
|
* bankAccount: {
|
|
21
25
|
* accountNumber: "****1234",
|
|
22
26
|
* routingNumber: "123456789"
|
|
@@ -24,15 +28,15 @@ import * as Payabli from "../index.js";
|
|
|
24
28
|
* transferDate: "2024-11-17T08:20:07.288+00:00",
|
|
25
29
|
* processor: "gp",
|
|
26
30
|
* transferStatus: 2,
|
|
27
|
-
* grossAmount:
|
|
28
|
-
* chargeBackAmount:
|
|
31
|
+
* grossAmount: 1029,
|
|
32
|
+
* chargeBackAmount: 25,
|
|
29
33
|
* returnedAmount: 0,
|
|
30
34
|
* holdAmount: 0,
|
|
31
35
|
* releasedAmount: 0,
|
|
32
36
|
* billingFeesAmount: 0,
|
|
33
37
|
* thirdPartyPaidAmount: 0,
|
|
34
38
|
* adjustmentsAmount: 0,
|
|
35
|
-
* netTransferAmount:
|
|
39
|
+
* netTransferAmount: 1004,
|
|
36
40
|
* eventsData: [{
|
|
37
41
|
* description: "Transfer Created",
|
|
38
42
|
* eventTime: "2024-11-16T08:15:33.4364067Z",
|
|
@@ -6,7 +6,7 @@ export declare namespace Fetcher {
|
|
|
6
6
|
url: string;
|
|
7
7
|
method: string;
|
|
8
8
|
contentType?: string;
|
|
9
|
-
headers?: Record<string, string | Supplier<string | undefined> | undefined>;
|
|
9
|
+
headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
|
|
10
10
|
queryParameters?: Record<string, unknown>;
|
|
11
11
|
body?: unknown;
|
|
12
12
|
timeoutMs?: number;
|
|
@@ -19,13 +19,45 @@ function addJitter(delay) {
|
|
|
19
19
|
const jitterMultiplier = 1 + (Math.random() * 2 - 1) * JITTER_FACTOR;
|
|
20
20
|
return delay * jitterMultiplier;
|
|
21
21
|
}
|
|
22
|
+
function getRetryDelayFromHeaders(response, retryAttempt) {
|
|
23
|
+
// Check for Retry-After header first (RFC 7231)
|
|
24
|
+
const retryAfter = response.headers.get("Retry-After");
|
|
25
|
+
if (retryAfter) {
|
|
26
|
+
// Parse as number of seconds...
|
|
27
|
+
const retryAfterSeconds = parseInt(retryAfter, 10);
|
|
28
|
+
if (!isNaN(retryAfterSeconds)) {
|
|
29
|
+
// Convert seconds to milliseconds and cap at MAX_RETRY_DELAY
|
|
30
|
+
return Math.min(retryAfterSeconds * 1000, MAX_RETRY_DELAY);
|
|
31
|
+
}
|
|
32
|
+
// ...or as an HTTP date; both are valid
|
|
33
|
+
const retryAfterDate = new Date(retryAfter);
|
|
34
|
+
if (!isNaN(retryAfterDate.getTime())) {
|
|
35
|
+
const delay = retryAfterDate.getTime() - Date.now();
|
|
36
|
+
return Math.min(Math.max(delay, 0), MAX_RETRY_DELAY);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
// Then check for industry-standard X-RateLimit-Reset header
|
|
40
|
+
const rateLimitReset = response.headers.get("X-RateLimit-Reset");
|
|
41
|
+
if (rateLimitReset) {
|
|
42
|
+
const resetTime = parseInt(rateLimitReset, 10);
|
|
43
|
+
if (!isNaN(resetTime)) {
|
|
44
|
+
// Assume Unix timestamp in epoch seconds
|
|
45
|
+
const delay = resetTime * 1000 - Date.now();
|
|
46
|
+
if (delay > 0) {
|
|
47
|
+
return Math.min(delay, MAX_RETRY_DELAY);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
// Fall back to exponential backoff
|
|
52
|
+
return Math.min(INITIAL_RETRY_DELAY * Math.pow(2, retryAttempt), MAX_RETRY_DELAY);
|
|
53
|
+
}
|
|
22
54
|
function requestWithRetries(requestFn_1) {
|
|
23
55
|
return __awaiter(this, arguments, void 0, function* (requestFn, maxRetries = DEFAULT_MAX_RETRIES) {
|
|
24
56
|
let response = yield requestFn();
|
|
25
57
|
for (let i = 0; i < maxRetries; ++i) {
|
|
26
58
|
if ([408, 429].includes(response.status) || response.status >= 500) {
|
|
27
|
-
//
|
|
28
|
-
const baseDelay =
|
|
59
|
+
// Get delay from headers or fall back to exponential backoff
|
|
60
|
+
const baseDelay = getRetryDelayFromHeaders(response, i);
|
|
29
61
|
// Add jitter to the delay
|
|
30
62
|
const delayWithJitter = addJitter(baseDelay);
|
|
31
63
|
yield new Promise((resolve) => setTimeout(resolve, delayWithJitter));
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as core from "./index.js";
|
|
2
|
-
export declare function mergeHeaders(...headersArray: (Record<string, string | core.Supplier<string | undefined> | undefined> | undefined)[]): Record<string, string | core.Supplier<string | undefined>>;
|
|
3
|
-
export declare function mergeOnlyDefinedHeaders(...headersArray: (Record<string, string | core.Supplier<string | undefined> | undefined> | undefined)[]): Record<string, string | core.Supplier<string | undefined>>;
|
|
2
|
+
export declare function mergeHeaders(...headersArray: (Record<string, string | core.Supplier<string | null | undefined> | null | undefined> | null | undefined)[]): Record<string, string | core.Supplier<string | null | undefined>>;
|
|
3
|
+
export declare function mergeOnlyDefinedHeaders(...headersArray: (Record<string, string | core.Supplier<string | null | undefined> | null | undefined> | null | undefined)[]): Record<string, string | core.Supplier<string | null | undefined>>;
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.110";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.d.mts
CHANGED
|
@@ -37,7 +37,7 @@ export declare namespace PayabliClient {
|
|
|
37
37
|
baseUrl?: core.Supplier<string>;
|
|
38
38
|
apiKey?: core.Supplier<string | undefined>;
|
|
39
39
|
/** Additional headers to include in requests. */
|
|
40
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
40
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
41
41
|
}
|
|
42
42
|
interface RequestOptions {
|
|
43
43
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -49,7 +49,7 @@ export declare namespace PayabliClient {
|
|
|
49
49
|
/** Additional query string parameters to include in the request. */
|
|
50
50
|
queryParams?: Record<string, unknown>;
|
|
51
51
|
/** Additional headers to include in the request. */
|
|
52
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
52
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
export declare class PayabliClient {
|
package/dist/esm/Client.mjs
CHANGED
|
@@ -35,8 +35,8 @@ export class PayabliClient {
|
|
|
35
35
|
this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
|
|
36
36
|
"X-Fern-Language": "JavaScript",
|
|
37
37
|
"X-Fern-SDK-Name": "@payabli/sdk-node",
|
|
38
|
-
"X-Fern-SDK-Version": "0.0.
|
|
39
|
-
"User-Agent": "@payabli/sdk-node/0.0.
|
|
38
|
+
"X-Fern-SDK-Version": "0.0.110",
|
|
39
|
+
"User-Agent": "@payabli/sdk-node/0.0.110",
|
|
40
40
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
41
41
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
42
42
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -11,7 +11,7 @@ export declare namespace Bill {
|
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
16
16
|
interface RequestOptions {
|
|
17
17
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -23,7 +23,7 @@ export declare namespace Bill {
|
|
|
23
23
|
/** Additional query string parameters to include in the request. */
|
|
24
24
|
queryParams?: Record<string, unknown>;
|
|
25
25
|
/** Additional headers to include in the request. */
|
|
26
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
26
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export declare class Bill {
|
|
@@ -11,7 +11,7 @@ export declare namespace Boarding {
|
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
16
16
|
interface RequestOptions {
|
|
17
17
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -23,7 +23,7 @@ export declare namespace Boarding {
|
|
|
23
23
|
/** Additional query string parameters to include in the request. */
|
|
24
24
|
queryParams?: Record<string, unknown>;
|
|
25
25
|
/** Additional headers to include in the request. */
|
|
26
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
26
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export declare class Boarding {
|
|
@@ -11,7 +11,7 @@ export declare namespace ChargeBacks {
|
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
16
16
|
interface RequestOptions {
|
|
17
17
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -23,7 +23,7 @@ export declare namespace ChargeBacks {
|
|
|
23
23
|
/** Additional query string parameters to include in the request. */
|
|
24
24
|
queryParams?: Record<string, unknown>;
|
|
25
25
|
/** Additional headers to include in the request. */
|
|
26
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
26
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export declare class ChargeBacks {
|
|
@@ -9,8 +9,7 @@ import * as Payabli from "../../../../index.mjs";
|
|
|
9
9
|
* }
|
|
10
10
|
*/
|
|
11
11
|
export interface ResponseChargeBack {
|
|
12
|
-
|
|
13
|
-
idempotencyKey?: string;
|
|
12
|
+
idempotencyKey?: Payabli.IdempotencyKey;
|
|
14
13
|
/** Array of attached files to response. */
|
|
15
14
|
attachments?: Payabli.Attachments | undefined;
|
|
16
15
|
/** Email of response submitter. */
|
|
@@ -11,7 +11,7 @@ export declare namespace CheckCapture {
|
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
16
16
|
interface RequestOptions {
|
|
17
17
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -23,7 +23,7 @@ export declare namespace CheckCapture {
|
|
|
23
23
|
/** Additional query string parameters to include in the request. */
|
|
24
24
|
queryParams?: Record<string, unknown>;
|
|
25
25
|
/** Additional headers to include in the request. */
|
|
26
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
26
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export declare class CheckCapture {
|
|
@@ -11,7 +11,7 @@ export declare namespace Cloud {
|
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
16
16
|
interface RequestOptions {
|
|
17
17
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -23,7 +23,7 @@ export declare namespace Cloud {
|
|
|
23
23
|
/** Additional query string parameters to include in the request. */
|
|
24
24
|
queryParams?: Record<string, unknown>;
|
|
25
25
|
/** Additional headers to include in the request. */
|
|
26
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
26
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export declare class Cloud {
|
|
@@ -11,7 +11,7 @@ export declare namespace Customer {
|
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
16
16
|
interface RequestOptions {
|
|
17
17
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -23,7 +23,7 @@ export declare namespace Customer {
|
|
|
23
23
|
/** Additional query string parameters to include in the request. */
|
|
24
24
|
queryParams?: Record<string, unknown>;
|
|
25
25
|
/** Additional headers to include in the request. */
|
|
26
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
26
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export declare class Customer {
|
|
@@ -11,7 +11,7 @@ export declare namespace Export {
|
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
16
16
|
interface RequestOptions {
|
|
17
17
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -23,7 +23,7 @@ export declare namespace Export {
|
|
|
23
23
|
/** Additional query string parameters to include in the request. */
|
|
24
24
|
queryParams?: Record<string, unknown>;
|
|
25
25
|
/** Additional headers to include in the request. */
|
|
26
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
26
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export declare class Export {
|
|
@@ -11,7 +11,7 @@ export declare namespace HostedPaymentPages {
|
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
16
16
|
interface RequestOptions {
|
|
17
17
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -23,7 +23,7 @@ export declare namespace HostedPaymentPages {
|
|
|
23
23
|
/** Additional query string parameters to include in the request. */
|
|
24
24
|
queryParams?: Record<string, unknown>;
|
|
25
25
|
/** Additional headers to include in the request. */
|
|
26
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
26
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export declare class HostedPaymentPages {
|
|
@@ -11,7 +11,7 @@ export declare namespace Import {
|
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
16
16
|
interface RequestOptions {
|
|
17
17
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -23,7 +23,7 @@ export declare namespace Import {
|
|
|
23
23
|
/** Additional query string parameters to include in the request. */
|
|
24
24
|
queryParams?: Record<string, unknown>;
|
|
25
25
|
/** Additional headers to include in the request. */
|
|
26
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
26
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export declare class Import {
|
|
@@ -11,7 +11,7 @@ export declare namespace Invoice {
|
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
16
16
|
interface RequestOptions {
|
|
17
17
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -23,7 +23,7 @@ export declare namespace Invoice {
|
|
|
23
23
|
/** Additional query string parameters to include in the request. */
|
|
24
24
|
queryParams?: Record<string, unknown>;
|
|
25
25
|
/** Additional headers to include in the request. */
|
|
26
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
26
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export declare class Invoice {
|
|
@@ -11,7 +11,7 @@ export declare namespace LineItem {
|
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
16
16
|
interface RequestOptions {
|
|
17
17
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -23,7 +23,7 @@ export declare namespace LineItem {
|
|
|
23
23
|
/** Additional query string parameters to include in the request. */
|
|
24
24
|
queryParams?: Record<string, unknown>;
|
|
25
25
|
/** Additional headers to include in the request. */
|
|
26
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
26
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export declare class LineItem {
|
|
@@ -11,7 +11,7 @@ export declare namespace MoneyIn {
|
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
16
16
|
interface RequestOptions {
|
|
17
17
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -23,7 +23,7 @@ export declare namespace MoneyIn {
|
|
|
23
23
|
/** Additional query string parameters to include in the request. */
|
|
24
24
|
queryParams?: Record<string, unknown>;
|
|
25
25
|
/** Additional headers to include in the request. */
|
|
26
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
26
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export declare class MoneyIn {
|
|
@@ -11,7 +11,7 @@ export declare namespace MoneyOut {
|
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
16
16
|
interface RequestOptions {
|
|
17
17
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -23,7 +23,7 @@ export declare namespace MoneyOut {
|
|
|
23
23
|
/** Additional query string parameters to include in the request. */
|
|
24
24
|
queryParams?: Record<string, unknown>;
|
|
25
25
|
/** Additional headers to include in the request. */
|
|
26
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
26
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export declare class MoneyOut {
|
|
@@ -112,7 +112,12 @@ export declare class MoneyOut {
|
|
|
112
112
|
* body: {
|
|
113
113
|
* entryPoint: "47ced57b",
|
|
114
114
|
* paymentMethod: {
|
|
115
|
-
* method: "ach"
|
|
115
|
+
* method: "ach",
|
|
116
|
+
* achHolder: "John Doe",
|
|
117
|
+
* achRouting: "011401533",
|
|
118
|
+
* achAccount: "123456789",
|
|
119
|
+
* achAccountType: "checking",
|
|
120
|
+
* achHolderType: "business"
|
|
116
121
|
* },
|
|
117
122
|
* paymentDetails: {
|
|
118
123
|
* totalAmount: 978.32
|
|
@@ -136,13 +141,6 @@ export declare class MoneyOut {
|
|
|
136
141
|
* contactEmail: "Mandy65@heritagepro.com",
|
|
137
142
|
* contactPhone: "996-325-5420 x31028"
|
|
138
143
|
* }],
|
|
139
|
-
* billingData: {
|
|
140
|
-
* bankName: "Chase",
|
|
141
|
-
* routingAccount: "011401533",
|
|
142
|
-
* accountNumber: "1237658922",
|
|
143
|
-
* typeAccount: "Savings",
|
|
144
|
-
* bankAccountHolderName: "Payabli"
|
|
145
|
-
* },
|
|
146
144
|
* vendorStatus: 1,
|
|
147
145
|
* remitAddress1: "727 Terrell Streets",
|
|
148
146
|
* remitAddress2: "Apt. 773",
|
|
@@ -102,7 +102,12 @@ export class MoneyOut {
|
|
|
102
102
|
* body: {
|
|
103
103
|
* entryPoint: "47ced57b",
|
|
104
104
|
* paymentMethod: {
|
|
105
|
-
* method: "ach"
|
|
105
|
+
* method: "ach",
|
|
106
|
+
* achHolder: "John Doe",
|
|
107
|
+
* achRouting: "011401533",
|
|
108
|
+
* achAccount: "123456789",
|
|
109
|
+
* achAccountType: "checking",
|
|
110
|
+
* achHolderType: "business"
|
|
106
111
|
* },
|
|
107
112
|
* paymentDetails: {
|
|
108
113
|
* totalAmount: 978.32
|
|
@@ -126,13 +131,6 @@ export class MoneyOut {
|
|
|
126
131
|
* contactEmail: "Mandy65@heritagepro.com",
|
|
127
132
|
* contactPhone: "996-325-5420 x31028"
|
|
128
133
|
* }],
|
|
129
|
-
* billingData: {
|
|
130
|
-
* bankName: "Chase",
|
|
131
|
-
* routingAccount: "011401533",
|
|
132
|
-
* accountNumber: "1237658922",
|
|
133
|
-
* typeAccount: "Savings",
|
|
134
|
-
* bankAccountHolderName: "Payabli"
|
|
135
|
-
* },
|
|
136
134
|
* vendorStatus: 1,
|
|
137
135
|
* remitAddress1: "727 Terrell Streets",
|
|
138
136
|
* remitAddress2: "Apt. 773",
|
package/dist/esm/api/resources/moneyOut/client/requests/MoneyOutTypesRequestOutAuthorize.d.mts
CHANGED
|
@@ -75,7 +75,12 @@ import * as Payabli from "../../../../index.mjs";
|
|
|
75
75
|
* body: {
|
|
76
76
|
* entryPoint: "47ced57b",
|
|
77
77
|
* paymentMethod: {
|
|
78
|
-
* method: "ach"
|
|
78
|
+
* method: "ach",
|
|
79
|
+
* achHolder: "John Doe",
|
|
80
|
+
* achRouting: "011401533",
|
|
81
|
+
* achAccount: "123456789",
|
|
82
|
+
* achAccountType: "checking",
|
|
83
|
+
* achHolderType: "business"
|
|
79
84
|
* },
|
|
80
85
|
* paymentDetails: {
|
|
81
86
|
* totalAmount: 978.32
|
|
@@ -99,13 +104,6 @@ import * as Payabli from "../../../../index.mjs";
|
|
|
99
104
|
* contactEmail: "Mandy65@heritagepro.com",
|
|
100
105
|
* contactPhone: "996-325-5420 x31028"
|
|
101
106
|
* }],
|
|
102
|
-
* billingData: {
|
|
103
|
-
* bankName: "Chase",
|
|
104
|
-
* routingAccount: "011401533",
|
|
105
|
-
* accountNumber: "1237658922",
|
|
106
|
-
* typeAccount: "Savings",
|
|
107
|
-
* bankAccountHolderName: "Payabli"
|
|
108
|
-
* },
|
|
109
107
|
* vendorStatus: 1,
|
|
110
108
|
* remitAddress1: "727 Terrell Streets",
|
|
111
109
|
* remitAddress2: "Apt. 773",
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Payabli from "../../../index.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Payment method object for vendor payouts.
|
|
7
|
+
* - `{ method: "managed" }` - Managed payment method
|
|
8
|
+
* - `{ method: "vcard" }` - Virtual card payment method
|
|
9
|
+
* - `{ method: "check" }` - Check payment method
|
|
10
|
+
* - `{ method: "ach", achHolder: "...", achRouting: "...", achAccount: "...", achAccountType: "..." }` - ACH payment method with bank details
|
|
11
|
+
* - `{ method: "ach", storedMethodId: "..." }` - ACH payment method using stored method ID
|
|
12
|
+
*/
|
|
13
|
+
export interface AuthorizePaymentMethod {
|
|
14
|
+
/** Payment method type - "managed", "vcard", "check", or "ach" */
|
|
15
|
+
method: string;
|
|
16
|
+
/** Account holder name for ACH payments. Required when method is "ach" and not using `storedMethodId`. */
|
|
17
|
+
achHolder?: string;
|
|
18
|
+
/** Bank routing number for ACH payments. Required when method is "ach" and not using `storedMethodId`. */
|
|
19
|
+
achRouting?: string;
|
|
20
|
+
/** Bank account number for ACH payments. Required when method is "ach" and not using `storedMethodId`. */
|
|
21
|
+
achAccount?: string;
|
|
22
|
+
/** Account type for ACH payments ("checking" or "savings"). Required when method is "ach" and not using `storedMethodId`. */
|
|
23
|
+
achAccountType?: string;
|
|
24
|
+
achCode?: Payabli.AchSecCode;
|
|
25
|
+
achHolderType?: Payabli.AchHolderType;
|
|
26
|
+
/** ID of the stored ACH payment method. Only applicable when method is `ach`. Use this to reference a previously saved ACH method instead of providing bank details directly. */
|
|
27
|
+
storedMethodId?: string;
|
|
28
|
+
initiator?: Payabli.Initiator;
|
|
29
|
+
storedMethodUsageType?: Payabli.StoredMethodUsageType;
|
|
30
|
+
}
|
|
@@ -7,17 +7,10 @@ export interface AuthorizePayoutBody {
|
|
|
7
7
|
source?: Payabli.Source;
|
|
8
8
|
orderId?: Payabli.OrderId;
|
|
9
9
|
orderDescription?: Payabli.Orderdescription;
|
|
10
|
-
paymentMethod: Payabli.
|
|
10
|
+
paymentMethod: Payabli.AuthorizePaymentMethod;
|
|
11
11
|
/** Object containing payment details. */
|
|
12
12
|
paymentDetails: AuthorizePayoutBody.PaymentDetails;
|
|
13
|
-
/**
|
|
14
|
-
* Object containing vendor data.
|
|
15
|
-
* <Note>
|
|
16
|
-
* When creating a new vendor in a payout authorization, the system first checks `billingData` for the vendor's billing information.
|
|
17
|
-
* If `billingData` is empty, it falls back to the `paymentMethod` object information.
|
|
18
|
-
* For existing vendors, `paymentMethod` is ignored unless a `storedMethodId` is provided.
|
|
19
|
-
* </Note>
|
|
20
|
-
*/
|
|
13
|
+
/** Object containing vendor data. */
|
|
21
14
|
vendorData: AuthorizePayoutBody.VendorData;
|
|
22
15
|
/** Array of bills associated to the transaction */
|
|
23
16
|
invoiceData: AuthorizePayoutBody.InvoiceData.Item[];
|
|
@@ -77,7 +70,7 @@ export declare namespace AuthorizePayoutBody {
|
|
|
77
70
|
}
|
|
78
71
|
namespace VendorData {
|
|
79
72
|
/**
|
|
80
|
-
* Object containing vendor's bank information.
|
|
73
|
+
* Object containing vendor's bank information. This object is deprecated for this endpoint. Use the `paymentMethod` object in payout authorize requests instead.
|
|
81
74
|
*/
|
|
82
75
|
interface BillingData {
|
|
83
76
|
bankName?: Payabli.BankName;
|
|
@@ -11,7 +11,7 @@ export declare namespace Notification {
|
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
16
16
|
interface RequestOptions {
|
|
17
17
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -23,7 +23,7 @@ export declare namespace Notification {
|
|
|
23
23
|
/** Additional query string parameters to include in the request. */
|
|
24
24
|
queryParams?: Record<string, unknown>;
|
|
25
25
|
/** Additional headers to include in the request. */
|
|
26
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
26
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export declare class Notification {
|
|
@@ -11,7 +11,7 @@ export declare namespace Ocr {
|
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
12
|
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
/** Additional headers to include in requests. */
|
|
14
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
15
|
}
|
|
16
16
|
interface RequestOptions {
|
|
17
17
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -23,7 +23,7 @@ export declare namespace Ocr {
|
|
|
23
23
|
/** Additional query string parameters to include in the request. */
|
|
24
24
|
queryParams?: Record<string, unknown>;
|
|
25
25
|
/** Additional headers to include in the request. */
|
|
26
|
-
headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
|
|
26
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
export declare class Ocr {
|