@payabli/sdk-node 0.0.116 → 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.
- package/README.md +31 -2
- package/dist/cjs/BaseClient.d.ts +13 -4
- package/dist/cjs/BaseClient.js +59 -0
- package/dist/cjs/Client.d.ts +88 -88
- package/dist/cjs/Client.js +31 -72
- package/dist/cjs/api/errors/BadRequestError.js +5 -1
- package/dist/cjs/api/errors/ConflictError.js +5 -1
- package/dist/cjs/api/errors/ForbiddenError.js +5 -1
- package/dist/cjs/api/errors/InternalServerError.js +5 -1
- package/dist/cjs/api/errors/ServiceUnavailableError.js +5 -1
- package/dist/cjs/api/errors/UnauthorizedError.js +5 -1
- package/dist/cjs/api/resources/bill/client/Client.d.ts +34 -35
- package/dist/cjs/api/resources/bill/client/Client.js +69 -216
- package/dist/cjs/api/resources/boarding/client/Client.d.ts +28 -29
- package/dist/cjs/api/resources/boarding/client/Client.js +51 -198
- package/dist/cjs/api/resources/chargeBacks/client/Client.d.ts +18 -17
- package/dist/cjs/api/resources/chargeBacks/client/Client.js +38 -79
- package/dist/cjs/api/resources/checkCapture/client/Client.d.ts +8 -9
- package/dist/cjs/api/resources/checkCapture/client/Client.js +11 -28
- package/dist/cjs/api/resources/cloud/client/Client.d.ts +18 -19
- package/dist/cjs/api/resources/cloud/client/Client.js +33 -89
- package/dist/cjs/api/resources/customer/client/Client.d.ts +18 -19
- package/dist/cjs/api/resources/customer/client/Client.js +31 -113
- package/dist/cjs/api/resources/export/client/Client.d.ts +94 -91
- package/dist/cjs/api/resources/export/client/Client.js +205 -582
- package/dist/cjs/api/resources/hostedPaymentPages/client/Client.d.ts +12 -13
- package/dist/cjs/api/resources/hostedPaymentPages/client/Client.js +19 -62
- package/dist/cjs/api/resources/import/client/Client.d.ts +12 -13
- package/dist/cjs/api/resources/import/client/Client.js +19 -62
- package/dist/cjs/api/resources/invoice/client/Client.d.ts +37 -36
- package/dist/cjs/api/resources/invoice/client/Client.js +67 -212
- package/dist/cjs/api/resources/invoice/client/requests/AddInvoiceRequest.d.ts +5 -3
- package/dist/cjs/api/resources/lineItem/client/Client.d.ts +16 -17
- package/dist/cjs/api/resources/lineItem/client/Client.js +27 -96
- package/dist/cjs/api/resources/moneyIn/client/Client.d.ts +40 -41
- package/dist/cjs/api/resources/moneyIn/client/Client.js +79 -249
- package/dist/cjs/api/resources/moneyIn/errors/CaptureError.js +5 -1
- package/dist/cjs/api/resources/moneyIn/errors/InvalidTransStatusError.js +5 -1
- package/dist/cjs/api/resources/moneyOut/client/Client.d.ts +44 -28
- package/dist/cjs/api/resources/moneyOut/client/Client.js +105 -168
- package/dist/cjs/api/resources/moneyOut/client/requests/MoneyOutTypesRequestOutAuthorize.d.ts +2 -1
- package/dist/cjs/api/resources/moneyOutTypes/types/AuthorizePayoutBody.d.ts +3 -1
- package/dist/cjs/api/resources/notification/client/Client.d.ts +30 -18
- package/dist/cjs/api/resources/notification/client/Client.js +45 -101
- package/dist/cjs/api/resources/notificationlogs/client/Client.d.ts +14 -15
- package/dist/cjs/api/resources/notificationlogs/client/Client.js +23 -79
- package/dist/cjs/api/resources/ocr/client/Client.d.ts +14 -11
- package/dist/cjs/api/resources/ocr/client/Client.js +19 -45
- package/dist/cjs/api/resources/organization/client/Client.d.ts +20 -21
- package/dist/cjs/api/resources/organization/client/Client.js +35 -130
- package/dist/cjs/api/resources/paymentLink/client/Client.d.ts +27 -28
- package/dist/cjs/api/resources/paymentLink/client/Client.js +46 -167
- package/dist/cjs/api/resources/paymentLink/client/requests/PayLinkDataBill.d.ts +1 -1
- package/dist/cjs/api/resources/paymentLink/client/requests/PayLinkDataInvoice.d.ts +1 -1
- package/dist/cjs/api/resources/paymentLink/client/requests/PayLinkDataOut.d.ts +1 -1
- package/dist/cjs/api/resources/paymentLink/types/PaymentPageRequestBody.d.ts +2 -2
- package/dist/cjs/api/resources/paymentMethodDomain/client/Client.d.ts +20 -21
- package/dist/cjs/api/resources/paymentMethodDomain/client/Client.js +35 -130
- package/dist/cjs/api/resources/paypoint/client/Client.d.ts +23 -24
- package/dist/cjs/api/resources/paypoint/client/Client.js +44 -152
- package/dist/cjs/api/resources/query/client/Client.d.ts +72 -73
- package/dist/cjs/api/resources/query/client/Client.js +137 -572
- package/dist/cjs/api/resources/query/client/requests/ListPayoutOrgRequest.d.ts +1 -0
- package/dist/cjs/api/resources/query/client/requests/ListPayoutRequest.d.ts +1 -0
- package/dist/cjs/api/resources/query/client/requests/ListTransactionsRequest.d.ts +1 -0
- package/dist/cjs/api/resources/statistic/client/Client.d.ts +51 -52
- package/dist/cjs/api/resources/statistic/client/Client.js +80 -133
- package/dist/cjs/api/resources/statistic/client/requests/BasicStatsRequest.d.ts +2 -2
- package/dist/cjs/api/resources/statistic/types/StatBasicExtendedQueryRecord.d.ts +76 -0
- package/dist/cjs/api/resources/statistic/types/StatBasicExtendedQueryRecord.js +3 -0
- package/dist/cjs/api/resources/statistic/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/statistic/types/index.js +1 -0
- package/dist/cjs/api/resources/subscription/client/Client.d.ts +14 -15
- package/dist/cjs/api/resources/subscription/client/Client.js +23 -79
- package/dist/cjs/api/resources/templates/client/Client.d.ts +16 -17
- package/dist/cjs/api/resources/templates/client/Client.js +28 -84
- package/dist/cjs/api/resources/tokenStorage/client/Client.d.ts +14 -15
- package/dist/cjs/api/resources/tokenStorage/client/Client.js +23 -79
- package/dist/cjs/api/resources/tokenStorage/types/GetMethodResponse.d.ts +1 -1
- package/dist/cjs/api/resources/user/client/Client.d.ts +55 -34
- package/dist/cjs/api/resources/user/client/Client.js +84 -222
- package/dist/cjs/api/resources/vendor/client/Client.d.ts +14 -15
- package/dist/cjs/api/resources/vendor/client/Client.js +23 -79
- package/dist/cjs/api/resources/wallet/client/Client.d.ts +14 -15
- package/dist/cjs/api/resources/wallet/client/Client.js +23 -79
- package/dist/cjs/api/types/ApplicationDetailsRecord.d.ts +2 -2
- package/dist/cjs/api/types/Frequency.d.ts +1 -1
- package/dist/cjs/api/types/Frequency.js +1 -1
- package/dist/cjs/api/types/FrequencyList.d.ts +1 -1
- package/dist/cjs/api/types/NotificationContent.d.ts +1 -0
- package/dist/cjs/api/types/NotificationContent.js +1 -0
- package/dist/cjs/api/types/NotificationStandardRequest.d.ts +1 -0
- package/dist/cjs/api/types/NotificationStandardRequest.js +1 -0
- package/dist/cjs/api/types/PayorDataResponse.d.ts +1 -1
- package/dist/cjs/api/types/QueryResponseSettlements.d.ts +1 -1
- package/dist/cjs/auth/HeaderAuthProvider.d.ts +16 -0
- package/dist/cjs/auth/HeaderAuthProvider.js +71 -0
- package/dist/cjs/auth/index.d.ts +1 -0
- package/dist/cjs/auth/index.js +5 -0
- package/dist/cjs/core/auth/AuthProvider.d.ts +7 -0
- package/dist/cjs/core/auth/AuthProvider.js +2 -0
- package/dist/cjs/core/auth/AuthRequest.d.ts +9 -0
- package/dist/cjs/core/auth/AuthRequest.js +2 -0
- package/dist/cjs/core/auth/BasicAuth.d.ts +8 -0
- package/dist/cjs/core/auth/BasicAuth.js +27 -0
- package/dist/cjs/core/auth/BearerToken.d.ts +7 -0
- package/dist/cjs/core/auth/BearerToken.js +16 -0
- package/dist/cjs/core/auth/NoOpAuthProvider.d.ts +5 -0
- package/dist/cjs/core/auth/NoOpAuthProvider.js +9 -0
- package/dist/cjs/core/auth/index.d.ts +5 -0
- package/dist/cjs/core/auth/index.js +9 -0
- package/dist/cjs/core/base64.d.ts +2 -0
- package/dist/cjs/core/base64.js +26 -0
- package/dist/cjs/core/fetcher/BinaryResponse.d.ts +6 -7
- package/dist/cjs/core/fetcher/Fetcher.d.ts +5 -1
- package/dist/cjs/core/fetcher/Fetcher.js +42 -24
- package/dist/cjs/core/fetcher/getResponseBody.js +18 -4
- package/dist/cjs/core/fetcher/makeRequest.d.ts +1 -1
- package/dist/cjs/core/fetcher/makeRequest.js +0 -2
- package/dist/cjs/core/fetcher/requestWithRetries.js +0 -9
- package/dist/cjs/core/fetcher/signals.d.ts +1 -7
- package/dist/cjs/core/fetcher/signals.js +0 -12
- package/dist/cjs/core/index.d.ts +2 -0
- package/dist/cjs/core/index.js +2 -0
- package/dist/cjs/core/logging/logger.js +1 -1
- package/dist/cjs/core/runtime/runtime.js +11 -10
- package/dist/cjs/core/url/join.js +0 -1
- package/dist/cjs/errors/PayabliError.js +5 -1
- package/dist/cjs/errors/PayabliTimeoutError.js +5 -1
- package/dist/cjs/errors/handleNonStatusCodeError.d.ts +2 -0
- package/dist/cjs/errors/handleNonStatusCodeError.js +65 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +13 -4
- package/dist/esm/BaseClient.mjs +24 -1
- package/dist/esm/Client.d.mts +88 -88
- package/dist/esm/Client.mjs +59 -67
- package/dist/esm/api/errors/BadRequestError.mjs +5 -1
- package/dist/esm/api/errors/ConflictError.mjs +5 -1
- package/dist/esm/api/errors/ForbiddenError.mjs +5 -1
- package/dist/esm/api/errors/InternalServerError.mjs +5 -1
- package/dist/esm/api/errors/ServiceUnavailableError.mjs +5 -1
- package/dist/esm/api/errors/UnauthorizedError.mjs +5 -1
- package/dist/esm/api/resources/bill/client/Client.d.mts +34 -35
- package/dist/esm/api/resources/bill/client/Client.mjs +67 -214
- package/dist/esm/api/resources/boarding/client/Client.d.mts +28 -29
- package/dist/esm/api/resources/boarding/client/Client.mjs +50 -197
- package/dist/esm/api/resources/chargeBacks/client/Client.d.mts +18 -17
- package/dist/esm/api/resources/chargeBacks/client/Client.mjs +36 -77
- package/dist/esm/api/resources/checkCapture/client/Client.d.mts +8 -9
- package/dist/esm/api/resources/checkCapture/client/Client.mjs +10 -27
- package/dist/esm/api/resources/cloud/client/Client.d.mts +18 -19
- package/dist/esm/api/resources/cloud/client/Client.mjs +31 -87
- package/dist/esm/api/resources/customer/client/Client.d.mts +18 -19
- package/dist/esm/api/resources/customer/client/Client.mjs +29 -111
- package/dist/esm/api/resources/export/client/Client.d.mts +94 -91
- package/dist/esm/api/resources/export/client/Client.mjs +204 -581
- package/dist/esm/api/resources/hostedPaymentPages/client/Client.d.mts +12 -13
- package/dist/esm/api/resources/hostedPaymentPages/client/Client.mjs +17 -60
- package/dist/esm/api/resources/import/client/Client.d.mts +12 -13
- package/dist/esm/api/resources/import/client/Client.mjs +17 -60
- package/dist/esm/api/resources/invoice/client/Client.d.mts +37 -36
- package/dist/esm/api/resources/invoice/client/Client.mjs +65 -210
- package/dist/esm/api/resources/invoice/client/requests/AddInvoiceRequest.d.mts +5 -3
- package/dist/esm/api/resources/lineItem/client/Client.d.mts +16 -17
- package/dist/esm/api/resources/lineItem/client/Client.mjs +25 -94
- package/dist/esm/api/resources/moneyIn/client/Client.d.mts +40 -41
- package/dist/esm/api/resources/moneyIn/client/Client.mjs +77 -247
- package/dist/esm/api/resources/moneyIn/errors/CaptureError.mjs +5 -1
- package/dist/esm/api/resources/moneyIn/errors/InvalidTransStatusError.mjs +5 -1
- package/dist/esm/api/resources/moneyOut/client/Client.d.mts +44 -28
- package/dist/esm/api/resources/moneyOut/client/Client.mjs +103 -166
- package/dist/esm/api/resources/moneyOut/client/requests/MoneyOutTypesRequestOutAuthorize.d.mts +2 -1
- package/dist/esm/api/resources/moneyOutTypes/types/AuthorizePayoutBody.d.mts +3 -1
- package/dist/esm/api/resources/notification/client/Client.d.mts +30 -18
- package/dist/esm/api/resources/notification/client/Client.mjs +44 -100
- package/dist/esm/api/resources/notificationlogs/client/Client.d.mts +14 -15
- package/dist/esm/api/resources/notificationlogs/client/Client.mjs +22 -78
- package/dist/esm/api/resources/ocr/client/Client.d.mts +14 -11
- package/dist/esm/api/resources/ocr/client/Client.mjs +18 -44
- package/dist/esm/api/resources/organization/client/Client.d.mts +20 -21
- package/dist/esm/api/resources/organization/client/Client.mjs +33 -128
- package/dist/esm/api/resources/paymentLink/client/Client.d.mts +27 -28
- package/dist/esm/api/resources/paymentLink/client/Client.mjs +44 -165
- package/dist/esm/api/resources/paymentLink/client/requests/PayLinkDataBill.d.mts +1 -1
- package/dist/esm/api/resources/paymentLink/client/requests/PayLinkDataInvoice.d.mts +1 -1
- package/dist/esm/api/resources/paymentLink/client/requests/PayLinkDataOut.d.mts +1 -1
- package/dist/esm/api/resources/paymentLink/types/PaymentPageRequestBody.d.mts +2 -2
- package/dist/esm/api/resources/paymentMethodDomain/client/Client.d.mts +20 -21
- package/dist/esm/api/resources/paymentMethodDomain/client/Client.mjs +34 -129
- package/dist/esm/api/resources/paypoint/client/Client.d.mts +23 -24
- package/dist/esm/api/resources/paypoint/client/Client.mjs +43 -151
- package/dist/esm/api/resources/query/client/Client.d.mts +72 -73
- package/dist/esm/api/resources/query/client/Client.mjs +136 -571
- package/dist/esm/api/resources/query/client/requests/ListPayoutOrgRequest.d.mts +1 -0
- package/dist/esm/api/resources/query/client/requests/ListPayoutRequest.d.mts +1 -0
- package/dist/esm/api/resources/query/client/requests/ListTransactionsRequest.d.mts +1 -0
- package/dist/esm/api/resources/statistic/client/Client.d.mts +51 -52
- package/dist/esm/api/resources/statistic/client/Client.mjs +79 -132
- package/dist/esm/api/resources/statistic/client/requests/BasicStatsRequest.d.mts +2 -2
- package/dist/esm/api/resources/statistic/types/StatBasicExtendedQueryRecord.d.mts +76 -0
- package/dist/esm/api/resources/statistic/types/StatBasicExtendedQueryRecord.mjs +2 -0
- package/dist/esm/api/resources/statistic/types/index.d.mts +1 -0
- package/dist/esm/api/resources/statistic/types/index.mjs +1 -0
- package/dist/esm/api/resources/subscription/client/Client.d.mts +14 -15
- package/dist/esm/api/resources/subscription/client/Client.mjs +21 -77
- package/dist/esm/api/resources/templates/client/Client.d.mts +16 -17
- package/dist/esm/api/resources/templates/client/Client.mjs +27 -83
- package/dist/esm/api/resources/tokenStorage/client/Client.d.mts +14 -15
- package/dist/esm/api/resources/tokenStorage/client/Client.mjs +21 -77
- package/dist/esm/api/resources/tokenStorage/types/GetMethodResponse.d.mts +1 -1
- package/dist/esm/api/resources/user/client/Client.d.mts +55 -34
- package/dist/esm/api/resources/user/client/Client.mjs +83 -221
- package/dist/esm/api/resources/vendor/client/Client.d.mts +14 -15
- package/dist/esm/api/resources/vendor/client/Client.mjs +22 -78
- package/dist/esm/api/resources/wallet/client/Client.d.mts +14 -15
- package/dist/esm/api/resources/wallet/client/Client.mjs +22 -78
- package/dist/esm/api/types/ApplicationDetailsRecord.d.mts +2 -2
- package/dist/esm/api/types/Frequency.d.mts +1 -1
- package/dist/esm/api/types/Frequency.mjs +1 -1
- package/dist/esm/api/types/FrequencyList.d.mts +1 -1
- package/dist/esm/api/types/NotificationContent.d.mts +1 -0
- package/dist/esm/api/types/NotificationContent.mjs +1 -0
- package/dist/esm/api/types/NotificationStandardRequest.d.mts +1 -0
- package/dist/esm/api/types/NotificationStandardRequest.mjs +1 -0
- package/dist/esm/api/types/PayorDataResponse.d.mts +1 -1
- package/dist/esm/api/types/QueryResponseSettlements.d.mts +1 -1
- package/dist/esm/auth/HeaderAuthProvider.d.mts +16 -0
- package/dist/esm/auth/HeaderAuthProvider.mjs +34 -0
- package/dist/esm/auth/index.d.mts +1 -0
- package/dist/esm/auth/index.mjs +1 -0
- package/dist/esm/core/auth/AuthProvider.d.mts +7 -0
- package/dist/esm/core/auth/AuthProvider.mjs +1 -0
- package/dist/esm/core/auth/AuthRequest.d.mts +9 -0
- package/dist/esm/core/auth/AuthRequest.mjs +1 -0
- package/dist/esm/core/auth/BasicAuth.d.mts +8 -0
- package/dist/esm/core/auth/BasicAuth.mjs +24 -0
- package/dist/esm/core/auth/BearerToken.d.mts +7 -0
- package/dist/esm/core/auth/BearerToken.mjs +13 -0
- package/dist/esm/core/auth/NoOpAuthProvider.d.mts +5 -0
- package/dist/esm/core/auth/NoOpAuthProvider.mjs +5 -0
- package/dist/esm/core/auth/index.d.mts +5 -0
- package/dist/esm/core/auth/index.mjs +3 -0
- package/dist/esm/core/base64.d.mts +2 -0
- package/dist/esm/core/base64.mjs +22 -0
- package/dist/esm/core/fetcher/BinaryResponse.d.mts +6 -7
- package/dist/esm/core/fetcher/Fetcher.d.mts +5 -1
- package/dist/esm/core/fetcher/Fetcher.mjs +42 -24
- package/dist/esm/core/fetcher/getResponseBody.mjs +18 -4
- package/dist/esm/core/fetcher/makeRequest.d.mts +1 -1
- package/dist/esm/core/fetcher/makeRequest.mjs +0 -2
- package/dist/esm/core/fetcher/requestWithRetries.mjs +0 -9
- package/dist/esm/core/fetcher/signals.d.mts +1 -7
- package/dist/esm/core/fetcher/signals.mjs +0 -12
- package/dist/esm/core/index.d.mts +2 -0
- package/dist/esm/core/index.mjs +2 -0
- package/dist/esm/core/logging/logger.mjs +1 -1
- package/dist/esm/core/runtime/runtime.mjs +11 -10
- package/dist/esm/core/url/join.mjs +0 -1
- package/dist/esm/errors/PayabliError.mjs +5 -1
- package/dist/esm/errors/PayabliTimeoutError.mjs +5 -1
- package/dist/esm/errors/handleNonStatusCodeError.d.mts +2 -0
- package/dist/esm/errors/handleNonStatusCodeError.mjs +29 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +5 -2
- package/reference.md +768 -478
- package/dist/cjs/core/fetcher/ResponseWithBody.d.ts +0 -4
- package/dist/cjs/core/fetcher/ResponseWithBody.js +0 -6
- package/dist/esm/core/fetcher/ResponseWithBody.d.mts +0 -4
- package/dist/esm/core/fetcher/ResponseWithBody.mjs +0 -3
|
@@ -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: "
|
|
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: "
|
|
173
|
+
* validation: "alpha",
|
|
174
174
|
* value: "",
|
|
175
175
|
* width: 0
|
|
176
176
|
* }],
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
2
3
|
import * as core from "../../../../core/index.js";
|
|
3
4
|
import * as Payabli from "../../../index.js";
|
|
4
|
-
export declare namespace
|
|
5
|
-
|
|
6
|
-
}
|
|
5
|
+
export declare namespace PaymentMethodDomainClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
7
|
interface RequestOptions extends BaseRequestOptions {
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
export declare class
|
|
11
|
-
protected readonly _options:
|
|
12
|
-
constructor(
|
|
10
|
+
export declare class PaymentMethodDomainClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<PaymentMethodDomainClient.Options>;
|
|
12
|
+
constructor(options?: PaymentMethodDomainClient.Options);
|
|
13
13
|
/**
|
|
14
14
|
* Add a payment method domain to an organization or paypoint.
|
|
15
15
|
*
|
|
16
16
|
* @param {Payabli.AddPaymentMethodDomainRequest} request
|
|
17
|
-
* @param {
|
|
17
|
+
* @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
18
|
*
|
|
19
19
|
* @throws {@link Payabli.BadRequestError}
|
|
20
20
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -34,13 +34,13 @@ export declare class PaymentMethodDomain {
|
|
|
34
34
|
* }
|
|
35
35
|
* })
|
|
36
36
|
*/
|
|
37
|
-
addPaymentMethodDomain(request?: Payabli.AddPaymentMethodDomainRequest, requestOptions?:
|
|
37
|
+
addPaymentMethodDomain(request?: Payabli.AddPaymentMethodDomainRequest, requestOptions?: PaymentMethodDomainClient.RequestOptions): core.HttpResponsePromise<Payabli.AddPaymentMethodDomainApiResponse>;
|
|
38
38
|
private __addPaymentMethodDomain;
|
|
39
39
|
/**
|
|
40
40
|
* Cascades a payment method domain to all child entities. All paypoints and suborganization under this parent will inherit this domain and its settings.
|
|
41
41
|
*
|
|
42
42
|
* @param {string} domainId - The payment method domain's ID in Payabli.
|
|
43
|
-
* @param {
|
|
43
|
+
* @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
44
44
|
*
|
|
45
45
|
* @throws {@link Payabli.BadRequestError}
|
|
46
46
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -50,13 +50,13 @@ export declare class PaymentMethodDomain {
|
|
|
50
50
|
* @example
|
|
51
51
|
* await client.paymentMethodDomain.cascadePaymentMethodDomain("pmd_b8237fa45c964d8a9ef27160cd42b8c5")
|
|
52
52
|
*/
|
|
53
|
-
cascadePaymentMethodDomain(domainId: string, requestOptions?:
|
|
53
|
+
cascadePaymentMethodDomain(domainId: string, requestOptions?: PaymentMethodDomainClient.RequestOptions): core.HttpResponsePromise<Payabli.PaymentMethodDomainGeneralResponse>;
|
|
54
54
|
private __cascadePaymentMethodDomain;
|
|
55
55
|
/**
|
|
56
56
|
* Delete a payment method domain. You can't delete an inherited domain, you must delete a domain at the organization level.
|
|
57
57
|
*
|
|
58
58
|
* @param {string} domainId - The payment method domain's ID in Payabli.
|
|
59
|
-
* @param {
|
|
59
|
+
* @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
60
60
|
*
|
|
61
61
|
* @throws {@link Payabli.BadRequestError}
|
|
62
62
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -66,13 +66,13 @@ export declare class PaymentMethodDomain {
|
|
|
66
66
|
* @example
|
|
67
67
|
* await client.paymentMethodDomain.deletePaymentMethodDomain("pmd_b8237fa45c964d8a9ef27160cd42b8c5")
|
|
68
68
|
*/
|
|
69
|
-
deletePaymentMethodDomain(domainId: string, requestOptions?:
|
|
69
|
+
deletePaymentMethodDomain(domainId: string, requestOptions?: PaymentMethodDomainClient.RequestOptions): core.HttpResponsePromise<Payabli.DeletePaymentMethodDomainResponse>;
|
|
70
70
|
private __deletePaymentMethodDomain;
|
|
71
71
|
/**
|
|
72
72
|
* Get the details for a payment method domain.
|
|
73
73
|
*
|
|
74
74
|
* @param {string} domainId - The payment method domain's ID in Payabli.
|
|
75
|
-
* @param {
|
|
75
|
+
* @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
76
76
|
*
|
|
77
77
|
* @throws {@link Payabli.BadRequestError}
|
|
78
78
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -82,13 +82,13 @@ export declare class PaymentMethodDomain {
|
|
|
82
82
|
* @example
|
|
83
83
|
* await client.paymentMethodDomain.getPaymentMethodDomain("pmd_b8237fa45c964d8a9ef27160cd42b8c5")
|
|
84
84
|
*/
|
|
85
|
-
getPaymentMethodDomain(domainId: string, requestOptions?:
|
|
85
|
+
getPaymentMethodDomain(domainId: string, requestOptions?: PaymentMethodDomainClient.RequestOptions): core.HttpResponsePromise<Payabli.PaymentMethodDomainApiResponse>;
|
|
86
86
|
private __getPaymentMethodDomain;
|
|
87
87
|
/**
|
|
88
88
|
* Get a list of payment method domains that belong to a PSP, organization, or paypoint.
|
|
89
89
|
*
|
|
90
90
|
* @param {Payabli.ListPaymentMethodDomainsRequest} request
|
|
91
|
-
* @param {
|
|
91
|
+
* @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
92
92
|
*
|
|
93
93
|
* @throws {@link Payabli.BadRequestError}
|
|
94
94
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -107,14 +107,14 @@ export declare class PaymentMethodDomain {
|
|
|
107
107
|
* entityType: "organization"
|
|
108
108
|
* })
|
|
109
109
|
*/
|
|
110
|
-
listPaymentMethodDomains(request?: Payabli.ListPaymentMethodDomainsRequest, requestOptions?:
|
|
110
|
+
listPaymentMethodDomains(request?: Payabli.ListPaymentMethodDomainsRequest, requestOptions?: PaymentMethodDomainClient.RequestOptions): core.HttpResponsePromise<Payabli.ListPaymentMethodDomainsResponse>;
|
|
111
111
|
private __listPaymentMethodDomains;
|
|
112
112
|
/**
|
|
113
113
|
* Update a payment method domain's configuration values.
|
|
114
114
|
*
|
|
115
115
|
* @param {string} domainId - The payment method domain's ID in Payabli.
|
|
116
116
|
* @param {Payabli.UpdatePaymentMethodDomainRequest} request
|
|
117
|
-
* @param {
|
|
117
|
+
* @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
118
118
|
*
|
|
119
119
|
* @throws {@link Payabli.BadRequestError}
|
|
120
120
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -131,13 +131,13 @@ export declare class PaymentMethodDomain {
|
|
|
131
131
|
* }
|
|
132
132
|
* })
|
|
133
133
|
*/
|
|
134
|
-
updatePaymentMethodDomain(domainId: string, request?: Payabli.UpdatePaymentMethodDomainRequest, requestOptions?:
|
|
134
|
+
updatePaymentMethodDomain(domainId: string, request?: Payabli.UpdatePaymentMethodDomainRequest, requestOptions?: PaymentMethodDomainClient.RequestOptions): core.HttpResponsePromise<Payabli.PaymentMethodDomainGeneralResponse>;
|
|
135
135
|
private __updatePaymentMethodDomain;
|
|
136
136
|
/**
|
|
137
137
|
* Verify a new payment method domain. If verification is successful, Apple Pay is automatically activated for the domain.
|
|
138
138
|
*
|
|
139
139
|
* @param {string} domainId - The payment method domain's ID in Payabli.
|
|
140
|
-
* @param {
|
|
140
|
+
* @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
141
141
|
*
|
|
142
142
|
* @throws {@link Payabli.BadRequestError}
|
|
143
143
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -147,7 +147,6 @@ export declare class PaymentMethodDomain {
|
|
|
147
147
|
* @example
|
|
148
148
|
* await client.paymentMethodDomain.verifyPaymentMethodDomain("pmd_b8237fa45c964d8a9ef27160cd42b8c5")
|
|
149
149
|
*/
|
|
150
|
-
verifyPaymentMethodDomain(domainId: string, requestOptions?:
|
|
150
|
+
verifyPaymentMethodDomain(domainId: string, requestOptions?: PaymentMethodDomainClient.RequestOptions): core.HttpResponsePromise<Payabli.PaymentMethodDomainGeneralResponse>;
|
|
151
151
|
private __verifyPaymentMethodDomain;
|
|
152
|
-
protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | undefined>>;
|
|
153
152
|
}
|
|
@@ -43,21 +43,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
-
exports.
|
|
46
|
+
exports.PaymentMethodDomainClient = void 0;
|
|
47
|
+
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
47
48
|
const headers_js_1 = require("../../../../core/headers.js");
|
|
48
49
|
const core = __importStar(require("../../../../core/index.js"));
|
|
49
50
|
const environments = __importStar(require("../../../../environments.js"));
|
|
51
|
+
const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
|
|
50
52
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
51
53
|
const Payabli = __importStar(require("../../../index.js"));
|
|
52
|
-
class
|
|
53
|
-
constructor(
|
|
54
|
-
this._options =
|
|
54
|
+
class PaymentMethodDomainClient {
|
|
55
|
+
constructor(options = {}) {
|
|
56
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
55
57
|
}
|
|
56
58
|
/**
|
|
57
59
|
* Add a payment method domain to an organization or paypoint.
|
|
58
60
|
*
|
|
59
61
|
* @param {Payabli.AddPaymentMethodDomainRequest} request
|
|
60
|
-
* @param {
|
|
62
|
+
* @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
63
|
*
|
|
62
64
|
* @throws {@link Payabli.BadRequestError}
|
|
63
65
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -83,7 +85,8 @@ class PaymentMethodDomain {
|
|
|
83
85
|
__addPaymentMethodDomain() {
|
|
84
86
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
85
87
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
86
|
-
const
|
|
88
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
89
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
87
90
|
const _response = yield core.fetcher({
|
|
88
91
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, "PaymentMethodDomain"),
|
|
89
92
|
method: "POST",
|
|
@@ -122,28 +125,14 @@ class PaymentMethodDomain {
|
|
|
122
125
|
});
|
|
123
126
|
}
|
|
124
127
|
}
|
|
125
|
-
|
|
126
|
-
case "non-json":
|
|
127
|
-
throw new errors.PayabliError({
|
|
128
|
-
statusCode: _response.error.statusCode,
|
|
129
|
-
body: _response.error.rawBody,
|
|
130
|
-
rawResponse: _response.rawResponse,
|
|
131
|
-
});
|
|
132
|
-
case "timeout":
|
|
133
|
-
throw new errors.PayabliTimeoutError("Timeout exceeded when calling POST /PaymentMethodDomain.");
|
|
134
|
-
case "unknown":
|
|
135
|
-
throw new errors.PayabliError({
|
|
136
|
-
message: _response.error.errorMessage,
|
|
137
|
-
rawResponse: _response.rawResponse,
|
|
138
|
-
});
|
|
139
|
-
}
|
|
128
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/PaymentMethodDomain");
|
|
140
129
|
});
|
|
141
130
|
}
|
|
142
131
|
/**
|
|
143
132
|
* Cascades a payment method domain to all child entities. All paypoints and suborganization under this parent will inherit this domain and its settings.
|
|
144
133
|
*
|
|
145
134
|
* @param {string} domainId - The payment method domain's ID in Payabli.
|
|
146
|
-
* @param {
|
|
135
|
+
* @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
147
136
|
*
|
|
148
137
|
* @throws {@link Payabli.BadRequestError}
|
|
149
138
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -159,7 +148,8 @@ class PaymentMethodDomain {
|
|
|
159
148
|
__cascadePaymentMethodDomain(domainId, requestOptions) {
|
|
160
149
|
return __awaiter(this, void 0, void 0, function* () {
|
|
161
150
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
162
|
-
const
|
|
151
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
152
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
163
153
|
const _response = yield core.fetcher({
|
|
164
154
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, `PaymentMethodDomain/${core.url.encodePathParam(domainId)}/cascade`),
|
|
165
155
|
method: "POST",
|
|
@@ -195,28 +185,14 @@ class PaymentMethodDomain {
|
|
|
195
185
|
});
|
|
196
186
|
}
|
|
197
187
|
}
|
|
198
|
-
|
|
199
|
-
case "non-json":
|
|
200
|
-
throw new errors.PayabliError({
|
|
201
|
-
statusCode: _response.error.statusCode,
|
|
202
|
-
body: _response.error.rawBody,
|
|
203
|
-
rawResponse: _response.rawResponse,
|
|
204
|
-
});
|
|
205
|
-
case "timeout":
|
|
206
|
-
throw new errors.PayabliTimeoutError("Timeout exceeded when calling POST /PaymentMethodDomain/{domainId}/cascade.");
|
|
207
|
-
case "unknown":
|
|
208
|
-
throw new errors.PayabliError({
|
|
209
|
-
message: _response.error.errorMessage,
|
|
210
|
-
rawResponse: _response.rawResponse,
|
|
211
|
-
});
|
|
212
|
-
}
|
|
188
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/PaymentMethodDomain/{domainId}/cascade");
|
|
213
189
|
});
|
|
214
190
|
}
|
|
215
191
|
/**
|
|
216
192
|
* Delete a payment method domain. You can't delete an inherited domain, you must delete a domain at the organization level.
|
|
217
193
|
*
|
|
218
194
|
* @param {string} domainId - The payment method domain's ID in Payabli.
|
|
219
|
-
* @param {
|
|
195
|
+
* @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
220
196
|
*
|
|
221
197
|
* @throws {@link Payabli.BadRequestError}
|
|
222
198
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -232,7 +208,8 @@ class PaymentMethodDomain {
|
|
|
232
208
|
__deletePaymentMethodDomain(domainId, requestOptions) {
|
|
233
209
|
return __awaiter(this, void 0, void 0, function* () {
|
|
234
210
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
235
|
-
const
|
|
211
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
212
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
236
213
|
const _response = yield core.fetcher({
|
|
237
214
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, `PaymentMethodDomain/${core.url.encodePathParam(domainId)}`),
|
|
238
215
|
method: "DELETE",
|
|
@@ -268,28 +245,14 @@ class PaymentMethodDomain {
|
|
|
268
245
|
});
|
|
269
246
|
}
|
|
270
247
|
}
|
|
271
|
-
|
|
272
|
-
case "non-json":
|
|
273
|
-
throw new errors.PayabliError({
|
|
274
|
-
statusCode: _response.error.statusCode,
|
|
275
|
-
body: _response.error.rawBody,
|
|
276
|
-
rawResponse: _response.rawResponse,
|
|
277
|
-
});
|
|
278
|
-
case "timeout":
|
|
279
|
-
throw new errors.PayabliTimeoutError("Timeout exceeded when calling DELETE /PaymentMethodDomain/{domainId}.");
|
|
280
|
-
case "unknown":
|
|
281
|
-
throw new errors.PayabliError({
|
|
282
|
-
message: _response.error.errorMessage,
|
|
283
|
-
rawResponse: _response.rawResponse,
|
|
284
|
-
});
|
|
285
|
-
}
|
|
248
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/PaymentMethodDomain/{domainId}");
|
|
286
249
|
});
|
|
287
250
|
}
|
|
288
251
|
/**
|
|
289
252
|
* Get the details for a payment method domain.
|
|
290
253
|
*
|
|
291
254
|
* @param {string} domainId - The payment method domain's ID in Payabli.
|
|
292
|
-
* @param {
|
|
255
|
+
* @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
293
256
|
*
|
|
294
257
|
* @throws {@link Payabli.BadRequestError}
|
|
295
258
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -305,7 +268,8 @@ class PaymentMethodDomain {
|
|
|
305
268
|
__getPaymentMethodDomain(domainId, requestOptions) {
|
|
306
269
|
return __awaiter(this, void 0, void 0, function* () {
|
|
307
270
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
308
|
-
const
|
|
271
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
272
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
309
273
|
const _response = yield core.fetcher({
|
|
310
274
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, `PaymentMethodDomain/${core.url.encodePathParam(domainId)}`),
|
|
311
275
|
method: "GET",
|
|
@@ -341,28 +305,14 @@ class PaymentMethodDomain {
|
|
|
341
305
|
});
|
|
342
306
|
}
|
|
343
307
|
}
|
|
344
|
-
|
|
345
|
-
case "non-json":
|
|
346
|
-
throw new errors.PayabliError({
|
|
347
|
-
statusCode: _response.error.statusCode,
|
|
348
|
-
body: _response.error.rawBody,
|
|
349
|
-
rawResponse: _response.rawResponse,
|
|
350
|
-
});
|
|
351
|
-
case "timeout":
|
|
352
|
-
throw new errors.PayabliTimeoutError("Timeout exceeded when calling GET /PaymentMethodDomain/{domainId}.");
|
|
353
|
-
case "unknown":
|
|
354
|
-
throw new errors.PayabliError({
|
|
355
|
-
message: _response.error.errorMessage,
|
|
356
|
-
rawResponse: _response.rawResponse,
|
|
357
|
-
});
|
|
358
|
-
}
|
|
308
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/PaymentMethodDomain/{domainId}");
|
|
359
309
|
});
|
|
360
310
|
}
|
|
361
311
|
/**
|
|
362
312
|
* Get a list of payment method domains that belong to a PSP, organization, or paypoint.
|
|
363
313
|
*
|
|
364
314
|
* @param {Payabli.ListPaymentMethodDomainsRequest} request
|
|
365
|
-
* @param {
|
|
315
|
+
* @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
366
316
|
*
|
|
367
317
|
* @throws {@link Payabli.BadRequestError}
|
|
368
318
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -401,7 +351,8 @@ class PaymentMethodDomain {
|
|
|
401
351
|
if (limitRecord != null) {
|
|
402
352
|
_queryParams.limitRecord = limitRecord.toString();
|
|
403
353
|
}
|
|
404
|
-
const
|
|
354
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
355
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
405
356
|
const _response = yield core.fetcher({
|
|
406
357
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, "PaymentMethodDomain/list"),
|
|
407
358
|
method: "GET",
|
|
@@ -437,21 +388,7 @@ class PaymentMethodDomain {
|
|
|
437
388
|
});
|
|
438
389
|
}
|
|
439
390
|
}
|
|
440
|
-
|
|
441
|
-
case "non-json":
|
|
442
|
-
throw new errors.PayabliError({
|
|
443
|
-
statusCode: _response.error.statusCode,
|
|
444
|
-
body: _response.error.rawBody,
|
|
445
|
-
rawResponse: _response.rawResponse,
|
|
446
|
-
});
|
|
447
|
-
case "timeout":
|
|
448
|
-
throw new errors.PayabliTimeoutError("Timeout exceeded when calling GET /PaymentMethodDomain/list.");
|
|
449
|
-
case "unknown":
|
|
450
|
-
throw new errors.PayabliError({
|
|
451
|
-
message: _response.error.errorMessage,
|
|
452
|
-
rawResponse: _response.rawResponse,
|
|
453
|
-
});
|
|
454
|
-
}
|
|
391
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/PaymentMethodDomain/list");
|
|
455
392
|
});
|
|
456
393
|
}
|
|
457
394
|
/**
|
|
@@ -459,7 +396,7 @@ class PaymentMethodDomain {
|
|
|
459
396
|
*
|
|
460
397
|
* @param {string} domainId - The payment method domain's ID in Payabli.
|
|
461
398
|
* @param {Payabli.UpdatePaymentMethodDomainRequest} request
|
|
462
|
-
* @param {
|
|
399
|
+
* @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
463
400
|
*
|
|
464
401
|
* @throws {@link Payabli.BadRequestError}
|
|
465
402
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -482,7 +419,8 @@ class PaymentMethodDomain {
|
|
|
482
419
|
__updatePaymentMethodDomain(domainId_1) {
|
|
483
420
|
return __awaiter(this, arguments, void 0, function* (domainId, request = {}, requestOptions) {
|
|
484
421
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
485
|
-
const
|
|
422
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
423
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
486
424
|
const _response = yield core.fetcher({
|
|
487
425
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, `PaymentMethodDomain/${core.url.encodePathParam(domainId)}`),
|
|
488
426
|
method: "PATCH",
|
|
@@ -521,28 +459,14 @@ class PaymentMethodDomain {
|
|
|
521
459
|
});
|
|
522
460
|
}
|
|
523
461
|
}
|
|
524
|
-
|
|
525
|
-
case "non-json":
|
|
526
|
-
throw new errors.PayabliError({
|
|
527
|
-
statusCode: _response.error.statusCode,
|
|
528
|
-
body: _response.error.rawBody,
|
|
529
|
-
rawResponse: _response.rawResponse,
|
|
530
|
-
});
|
|
531
|
-
case "timeout":
|
|
532
|
-
throw new errors.PayabliTimeoutError("Timeout exceeded when calling PATCH /PaymentMethodDomain/{domainId}.");
|
|
533
|
-
case "unknown":
|
|
534
|
-
throw new errors.PayabliError({
|
|
535
|
-
message: _response.error.errorMessage,
|
|
536
|
-
rawResponse: _response.rawResponse,
|
|
537
|
-
});
|
|
538
|
-
}
|
|
462
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/PaymentMethodDomain/{domainId}");
|
|
539
463
|
});
|
|
540
464
|
}
|
|
541
465
|
/**
|
|
542
466
|
* Verify a new payment method domain. If verification is successful, Apple Pay is automatically activated for the domain.
|
|
543
467
|
*
|
|
544
468
|
* @param {string} domainId - The payment method domain's ID in Payabli.
|
|
545
|
-
* @param {
|
|
469
|
+
* @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
546
470
|
*
|
|
547
471
|
* @throws {@link Payabli.BadRequestError}
|
|
548
472
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -558,7 +482,8 @@ class PaymentMethodDomain {
|
|
|
558
482
|
__verifyPaymentMethodDomain(domainId, requestOptions) {
|
|
559
483
|
return __awaiter(this, void 0, void 0, function* () {
|
|
560
484
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
561
|
-
const
|
|
485
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
486
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
562
487
|
const _response = yield core.fetcher({
|
|
563
488
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PayabliEnvironment.Sandbox, `PaymentMethodDomain/${core.url.encodePathParam(domainId)}/verify`),
|
|
564
489
|
method: "POST",
|
|
@@ -594,28 +519,8 @@ class PaymentMethodDomain {
|
|
|
594
519
|
});
|
|
595
520
|
}
|
|
596
521
|
}
|
|
597
|
-
|
|
598
|
-
case "non-json":
|
|
599
|
-
throw new errors.PayabliError({
|
|
600
|
-
statusCode: _response.error.statusCode,
|
|
601
|
-
body: _response.error.rawBody,
|
|
602
|
-
rawResponse: _response.rawResponse,
|
|
603
|
-
});
|
|
604
|
-
case "timeout":
|
|
605
|
-
throw new errors.PayabliTimeoutError("Timeout exceeded when calling POST /PaymentMethodDomain/{domainId}/verify.");
|
|
606
|
-
case "unknown":
|
|
607
|
-
throw new errors.PayabliError({
|
|
608
|
-
message: _response.error.errorMessage,
|
|
609
|
-
rawResponse: _response.rawResponse,
|
|
610
|
-
});
|
|
611
|
-
}
|
|
612
|
-
});
|
|
613
|
-
}
|
|
614
|
-
_getCustomAuthorizationHeaders() {
|
|
615
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
616
|
-
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
617
|
-
return { requestToken: apiKeyValue };
|
|
522
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/PaymentMethodDomain/{domainId}/verify");
|
|
618
523
|
});
|
|
619
524
|
}
|
|
620
525
|
}
|
|
621
|
-
exports.
|
|
526
|
+
exports.PaymentMethodDomainClient = PaymentMethodDomainClient;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
2
3
|
import * as core from "../../../../core/index.js";
|
|
3
4
|
import * as Payabli from "../../../index.js";
|
|
4
|
-
export declare namespace
|
|
5
|
-
|
|
6
|
-
}
|
|
5
|
+
export declare namespace PaypointClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
7
|
interface RequestOptions extends BaseRequestOptions {
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
export declare class
|
|
11
|
-
protected readonly _options:
|
|
12
|
-
constructor(
|
|
10
|
+
export declare class PaypointClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<PaypointClient.Options>;
|
|
12
|
+
constructor(options?: PaypointClient.Options);
|
|
13
13
|
/**
|
|
14
14
|
* Gets the basic details for a paypoint.
|
|
15
15
|
*
|
|
16
16
|
* @param {string} entry - The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)
|
|
17
|
-
* @param {
|
|
17
|
+
* @param {PaypointClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
18
18
|
*
|
|
19
19
|
* @throws {@link Payabli.BadRequestError}
|
|
20
20
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -24,13 +24,13 @@ export declare class Paypoint {
|
|
|
24
24
|
* @example
|
|
25
25
|
* await client.paypoint.getBasicEntry("8cfec329267")
|
|
26
26
|
*/
|
|
27
|
-
getBasicEntry(entry: string, requestOptions?:
|
|
27
|
+
getBasicEntry(entry: string, requestOptions?: PaypointClient.RequestOptions): core.HttpResponsePromise<Payabli.GetBasicEntryResponse>;
|
|
28
28
|
private __getBasicEntry;
|
|
29
29
|
/**
|
|
30
30
|
* Retrieves the basic details for a paypoint by ID.
|
|
31
31
|
*
|
|
32
|
-
* @param {string}
|
|
33
|
-
* @param {
|
|
32
|
+
* @param {string} IdPaypoint - Paypoint ID. You can find this value by querying `/api/Query/paypoints/{orgId}`
|
|
33
|
+
* @param {PaypointClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
34
34
|
*
|
|
35
35
|
* @throws {@link Payabli.BadRequestError}
|
|
36
36
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -40,14 +40,14 @@ export declare class Paypoint {
|
|
|
40
40
|
* @example
|
|
41
41
|
* await client.paypoint.getBasicEntryById("198")
|
|
42
42
|
*/
|
|
43
|
-
getBasicEntryById(
|
|
43
|
+
getBasicEntryById(IdPaypoint: string, requestOptions?: PaypointClient.RequestOptions): core.HttpResponsePromise<Payabli.GetBasicEntryByIdResponse>;
|
|
44
44
|
private __getBasicEntryById;
|
|
45
45
|
/**
|
|
46
46
|
* Gets the details for a single paypoint.
|
|
47
47
|
*
|
|
48
48
|
* @param {string} entry - The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)
|
|
49
49
|
* @param {Payabli.GetEntryConfigRequest} request
|
|
50
|
-
* @param {
|
|
50
|
+
* @param {PaypointClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
51
51
|
*
|
|
52
52
|
* @throws {@link Payabli.BadRequestError}
|
|
53
53
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -57,14 +57,14 @@ export declare class Paypoint {
|
|
|
57
57
|
* @example
|
|
58
58
|
* await client.paypoint.getEntryConfig("8cfec329267")
|
|
59
59
|
*/
|
|
60
|
-
getEntryConfig(entry: string, request?: Payabli.GetEntryConfigRequest, requestOptions?:
|
|
60
|
+
getEntryConfig(entry: string, request?: Payabli.GetEntryConfigRequest, requestOptions?: PaypointClient.RequestOptions): core.HttpResponsePromise<Payabli.GetEntryConfigResponse>;
|
|
61
61
|
private __getEntryConfig;
|
|
62
62
|
/**
|
|
63
63
|
* Gets the details for single payment page for a paypoint.
|
|
64
64
|
*
|
|
65
65
|
* @param {string} entry - The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)
|
|
66
66
|
* @param {string} subdomain - Payment page identifier. The subdomain value is the last portion of the payment page URL. For example, in`https://paypages-sandbox.payabli.com/513823dc10/pay-your-fees-1`, the subdomain is `pay-your-fees-1`.
|
|
67
|
-
* @param {
|
|
67
|
+
* @param {PaypointClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
68
68
|
*
|
|
69
69
|
* @throws {@link Payabli.BadRequestError}
|
|
70
70
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -74,14 +74,14 @@ export declare class Paypoint {
|
|
|
74
74
|
* @example
|
|
75
75
|
* await client.paypoint.getPage("8cfec329267", "pay-your-fees-1")
|
|
76
76
|
*/
|
|
77
|
-
getPage(entry: string, subdomain: string, requestOptions?:
|
|
77
|
+
getPage(entry: string, subdomain: string, requestOptions?: PaypointClient.RequestOptions): core.HttpResponsePromise<Payabli.PayabliPages>;
|
|
78
78
|
private __getPage;
|
|
79
79
|
/**
|
|
80
80
|
* Deletes a payment page in a paypoint.
|
|
81
81
|
*
|
|
82
82
|
* @param {string} entry - The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)
|
|
83
83
|
* @param {string} subdomain - Payment page identifier. The subdomain value is the last portion of the payment page URL. For example, in`https://paypages-sandbox.payabli.com/513823dc10/pay-your-fees-1`, the subdomain is `pay-your-fees-1`.
|
|
84
|
-
* @param {
|
|
84
|
+
* @param {PaypointClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
85
85
|
*
|
|
86
86
|
* @throws {@link Payabli.BadRequestError}
|
|
87
87
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -91,14 +91,14 @@ export declare class Paypoint {
|
|
|
91
91
|
* @example
|
|
92
92
|
* await client.paypoint.removePage("8cfec329267", "pay-your-fees-1")
|
|
93
93
|
*/
|
|
94
|
-
removePage(entry: string, subdomain: string, requestOptions?:
|
|
94
|
+
removePage(entry: string, subdomain: string, requestOptions?: PaypointClient.RequestOptions): core.HttpResponsePromise<Payabli.PayabliApiResponseGeneric2Part>;
|
|
95
95
|
private __removePage;
|
|
96
96
|
/**
|
|
97
97
|
* Updates a paypoint logo.
|
|
98
98
|
*
|
|
99
99
|
* @param {string} entry - The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)
|
|
100
100
|
* @param {Payabli.FileContent} request
|
|
101
|
-
* @param {
|
|
101
|
+
* @param {PaypointClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
102
102
|
*
|
|
103
103
|
* @throws {@link Payabli.BadRequestError}
|
|
104
104
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -108,13 +108,13 @@ export declare class Paypoint {
|
|
|
108
108
|
* @example
|
|
109
109
|
* await client.paypoint.saveLogo("8cfec329267", {})
|
|
110
110
|
*/
|
|
111
|
-
saveLogo(entry: string, request: Payabli.FileContent, requestOptions?:
|
|
111
|
+
saveLogo(entry: string, request: Payabli.FileContent, requestOptions?: PaypointClient.RequestOptions): core.HttpResponsePromise<Payabli.PayabliApiResponse00Responsedatanonobject>;
|
|
112
112
|
private __saveLogo;
|
|
113
113
|
/**
|
|
114
114
|
* Retrieves an paypoint's basic settings like custom fields, identifiers, and invoicing settings.
|
|
115
115
|
*
|
|
116
116
|
* @param {string} entry - The paypoint's entrypoint identifier. [Learn more](/api-reference/api-overview#entrypoint-vs-entry)
|
|
117
|
-
* @param {
|
|
117
|
+
* @param {PaypointClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
118
118
|
*
|
|
119
119
|
* @throws {@link Payabli.BadRequestError}
|
|
120
120
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -124,13 +124,13 @@ export declare class Paypoint {
|
|
|
124
124
|
* @example
|
|
125
125
|
* await client.paypoint.settingsPage("8cfec329267")
|
|
126
126
|
*/
|
|
127
|
-
settingsPage(entry: string, requestOptions?:
|
|
127
|
+
settingsPage(entry: string, requestOptions?: PaypointClient.RequestOptions): core.HttpResponsePromise<Payabli.SettingsQueryRecord>;
|
|
128
128
|
private __settingsPage;
|
|
129
129
|
/**
|
|
130
130
|
* Migrates a paypoint to a new parent organization.
|
|
131
131
|
*
|
|
132
132
|
* @param {Payabli.PaypointMoveRequest} request
|
|
133
|
-
* @param {
|
|
133
|
+
* @param {PaypointClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
134
134
|
*
|
|
135
135
|
* @throws {@link Payabli.BadRequestError}
|
|
136
136
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -150,7 +150,6 @@ export declare class Paypoint {
|
|
|
150
150
|
* }
|
|
151
151
|
* })
|
|
152
152
|
*/
|
|
153
|
-
migrate(request: Payabli.PaypointMoveRequest, requestOptions?:
|
|
153
|
+
migrate(request: Payabli.PaypointMoveRequest, requestOptions?: PaypointClient.RequestOptions): core.HttpResponsePromise<Payabli.MigratePaypointResponse>;
|
|
154
154
|
private __migrate;
|
|
155
|
-
protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | undefined>>;
|
|
156
155
|
}
|