@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.mjs";
|
|
|
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.mjs";
|
|
|
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.mjs";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
2
3
|
import * as core from "../../../../core/index.mjs";
|
|
3
4
|
import * as Payabli from "../../../index.mjs";
|
|
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
|
}
|
|
@@ -8,20 +8,22 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
import {
|
|
11
|
+
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
12
|
+
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
12
13
|
import * as core from "../../../../core/index.mjs";
|
|
13
14
|
import * as environments from "../../../../environments.mjs";
|
|
15
|
+
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
14
16
|
import * as errors from "../../../../errors/index.mjs";
|
|
15
17
|
import * as Payabli from "../../../index.mjs";
|
|
16
|
-
export class
|
|
17
|
-
constructor(
|
|
18
|
-
this._options =
|
|
18
|
+
export class PaymentMethodDomainClient {
|
|
19
|
+
constructor(options = {}) {
|
|
20
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
19
21
|
}
|
|
20
22
|
/**
|
|
21
23
|
* Add a payment method domain to an organization or paypoint.
|
|
22
24
|
*
|
|
23
25
|
* @param {Payabli.AddPaymentMethodDomainRequest} request
|
|
24
|
-
* @param {
|
|
26
|
+
* @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
25
27
|
*
|
|
26
28
|
* @throws {@link Payabli.BadRequestError}
|
|
27
29
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -47,7 +49,8 @@ export class PaymentMethodDomain {
|
|
|
47
49
|
__addPaymentMethodDomain() {
|
|
48
50
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
49
51
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
50
|
-
const
|
|
52
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
53
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
51
54
|
const _response = yield core.fetcher({
|
|
52
55
|
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"),
|
|
53
56
|
method: "POST",
|
|
@@ -86,28 +89,14 @@ export class PaymentMethodDomain {
|
|
|
86
89
|
});
|
|
87
90
|
}
|
|
88
91
|
}
|
|
89
|
-
|
|
90
|
-
case "non-json":
|
|
91
|
-
throw new errors.PayabliError({
|
|
92
|
-
statusCode: _response.error.statusCode,
|
|
93
|
-
body: _response.error.rawBody,
|
|
94
|
-
rawResponse: _response.rawResponse,
|
|
95
|
-
});
|
|
96
|
-
case "timeout":
|
|
97
|
-
throw new errors.PayabliTimeoutError("Timeout exceeded when calling POST /PaymentMethodDomain.");
|
|
98
|
-
case "unknown":
|
|
99
|
-
throw new errors.PayabliError({
|
|
100
|
-
message: _response.error.errorMessage,
|
|
101
|
-
rawResponse: _response.rawResponse,
|
|
102
|
-
});
|
|
103
|
-
}
|
|
92
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/PaymentMethodDomain");
|
|
104
93
|
});
|
|
105
94
|
}
|
|
106
95
|
/**
|
|
107
96
|
* Cascades a payment method domain to all child entities. All paypoints and suborganization under this parent will inherit this domain and its settings.
|
|
108
97
|
*
|
|
109
98
|
* @param {string} domainId - The payment method domain's ID in Payabli.
|
|
110
|
-
* @param {
|
|
99
|
+
* @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
111
100
|
*
|
|
112
101
|
* @throws {@link Payabli.BadRequestError}
|
|
113
102
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -123,7 +112,8 @@ export class PaymentMethodDomain {
|
|
|
123
112
|
__cascadePaymentMethodDomain(domainId, requestOptions) {
|
|
124
113
|
return __awaiter(this, void 0, void 0, function* () {
|
|
125
114
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
126
|
-
const
|
|
115
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
116
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
127
117
|
const _response = yield core.fetcher({
|
|
128
118
|
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`),
|
|
129
119
|
method: "POST",
|
|
@@ -159,28 +149,14 @@ export class PaymentMethodDomain {
|
|
|
159
149
|
});
|
|
160
150
|
}
|
|
161
151
|
}
|
|
162
|
-
|
|
163
|
-
case "non-json":
|
|
164
|
-
throw new errors.PayabliError({
|
|
165
|
-
statusCode: _response.error.statusCode,
|
|
166
|
-
body: _response.error.rawBody,
|
|
167
|
-
rawResponse: _response.rawResponse,
|
|
168
|
-
});
|
|
169
|
-
case "timeout":
|
|
170
|
-
throw new errors.PayabliTimeoutError("Timeout exceeded when calling POST /PaymentMethodDomain/{domainId}/cascade.");
|
|
171
|
-
case "unknown":
|
|
172
|
-
throw new errors.PayabliError({
|
|
173
|
-
message: _response.error.errorMessage,
|
|
174
|
-
rawResponse: _response.rawResponse,
|
|
175
|
-
});
|
|
176
|
-
}
|
|
152
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/PaymentMethodDomain/{domainId}/cascade");
|
|
177
153
|
});
|
|
178
154
|
}
|
|
179
155
|
/**
|
|
180
156
|
* Delete a payment method domain. You can't delete an inherited domain, you must delete a domain at the organization level.
|
|
181
157
|
*
|
|
182
158
|
* @param {string} domainId - The payment method domain's ID in Payabli.
|
|
183
|
-
* @param {
|
|
159
|
+
* @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
184
160
|
*
|
|
185
161
|
* @throws {@link Payabli.BadRequestError}
|
|
186
162
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -196,7 +172,8 @@ export class PaymentMethodDomain {
|
|
|
196
172
|
__deletePaymentMethodDomain(domainId, requestOptions) {
|
|
197
173
|
return __awaiter(this, void 0, void 0, function* () {
|
|
198
174
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
199
|
-
const
|
|
175
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
176
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
200
177
|
const _response = yield core.fetcher({
|
|
201
178
|
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)}`),
|
|
202
179
|
method: "DELETE",
|
|
@@ -232,28 +209,14 @@ export class PaymentMethodDomain {
|
|
|
232
209
|
});
|
|
233
210
|
}
|
|
234
211
|
}
|
|
235
|
-
|
|
236
|
-
case "non-json":
|
|
237
|
-
throw new errors.PayabliError({
|
|
238
|
-
statusCode: _response.error.statusCode,
|
|
239
|
-
body: _response.error.rawBody,
|
|
240
|
-
rawResponse: _response.rawResponse,
|
|
241
|
-
});
|
|
242
|
-
case "timeout":
|
|
243
|
-
throw new errors.PayabliTimeoutError("Timeout exceeded when calling DELETE /PaymentMethodDomain/{domainId}.");
|
|
244
|
-
case "unknown":
|
|
245
|
-
throw new errors.PayabliError({
|
|
246
|
-
message: _response.error.errorMessage,
|
|
247
|
-
rawResponse: _response.rawResponse,
|
|
248
|
-
});
|
|
249
|
-
}
|
|
212
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/PaymentMethodDomain/{domainId}");
|
|
250
213
|
});
|
|
251
214
|
}
|
|
252
215
|
/**
|
|
253
216
|
* Get the details for a payment method domain.
|
|
254
217
|
*
|
|
255
218
|
* @param {string} domainId - The payment method domain's ID in Payabli.
|
|
256
|
-
* @param {
|
|
219
|
+
* @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
257
220
|
*
|
|
258
221
|
* @throws {@link Payabli.BadRequestError}
|
|
259
222
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -269,7 +232,8 @@ export class PaymentMethodDomain {
|
|
|
269
232
|
__getPaymentMethodDomain(domainId, requestOptions) {
|
|
270
233
|
return __awaiter(this, void 0, void 0, function* () {
|
|
271
234
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
272
|
-
const
|
|
235
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
236
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
273
237
|
const _response = yield core.fetcher({
|
|
274
238
|
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)}`),
|
|
275
239
|
method: "GET",
|
|
@@ -305,28 +269,14 @@ export class PaymentMethodDomain {
|
|
|
305
269
|
});
|
|
306
270
|
}
|
|
307
271
|
}
|
|
308
|
-
|
|
309
|
-
case "non-json":
|
|
310
|
-
throw new errors.PayabliError({
|
|
311
|
-
statusCode: _response.error.statusCode,
|
|
312
|
-
body: _response.error.rawBody,
|
|
313
|
-
rawResponse: _response.rawResponse,
|
|
314
|
-
});
|
|
315
|
-
case "timeout":
|
|
316
|
-
throw new errors.PayabliTimeoutError("Timeout exceeded when calling GET /PaymentMethodDomain/{domainId}.");
|
|
317
|
-
case "unknown":
|
|
318
|
-
throw new errors.PayabliError({
|
|
319
|
-
message: _response.error.errorMessage,
|
|
320
|
-
rawResponse: _response.rawResponse,
|
|
321
|
-
});
|
|
322
|
-
}
|
|
272
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/PaymentMethodDomain/{domainId}");
|
|
323
273
|
});
|
|
324
274
|
}
|
|
325
275
|
/**
|
|
326
276
|
* Get a list of payment method domains that belong to a PSP, organization, or paypoint.
|
|
327
277
|
*
|
|
328
278
|
* @param {Payabli.ListPaymentMethodDomainsRequest} request
|
|
329
|
-
* @param {
|
|
279
|
+
* @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
330
280
|
*
|
|
331
281
|
* @throws {@link Payabli.BadRequestError}
|
|
332
282
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -365,7 +315,8 @@ export class PaymentMethodDomain {
|
|
|
365
315
|
if (limitRecord != null) {
|
|
366
316
|
_queryParams.limitRecord = limitRecord.toString();
|
|
367
317
|
}
|
|
368
|
-
const
|
|
318
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
319
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
369
320
|
const _response = yield core.fetcher({
|
|
370
321
|
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"),
|
|
371
322
|
method: "GET",
|
|
@@ -401,21 +352,7 @@ export class PaymentMethodDomain {
|
|
|
401
352
|
});
|
|
402
353
|
}
|
|
403
354
|
}
|
|
404
|
-
|
|
405
|
-
case "non-json":
|
|
406
|
-
throw new errors.PayabliError({
|
|
407
|
-
statusCode: _response.error.statusCode,
|
|
408
|
-
body: _response.error.rawBody,
|
|
409
|
-
rawResponse: _response.rawResponse,
|
|
410
|
-
});
|
|
411
|
-
case "timeout":
|
|
412
|
-
throw new errors.PayabliTimeoutError("Timeout exceeded when calling GET /PaymentMethodDomain/list.");
|
|
413
|
-
case "unknown":
|
|
414
|
-
throw new errors.PayabliError({
|
|
415
|
-
message: _response.error.errorMessage,
|
|
416
|
-
rawResponse: _response.rawResponse,
|
|
417
|
-
});
|
|
418
|
-
}
|
|
355
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/PaymentMethodDomain/list");
|
|
419
356
|
});
|
|
420
357
|
}
|
|
421
358
|
/**
|
|
@@ -423,7 +360,7 @@ export class PaymentMethodDomain {
|
|
|
423
360
|
*
|
|
424
361
|
* @param {string} domainId - The payment method domain's ID in Payabli.
|
|
425
362
|
* @param {Payabli.UpdatePaymentMethodDomainRequest} request
|
|
426
|
-
* @param {
|
|
363
|
+
* @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
427
364
|
*
|
|
428
365
|
* @throws {@link Payabli.BadRequestError}
|
|
429
366
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -446,7 +383,8 @@ export class PaymentMethodDomain {
|
|
|
446
383
|
__updatePaymentMethodDomain(domainId_1) {
|
|
447
384
|
return __awaiter(this, arguments, void 0, function* (domainId, request = {}, requestOptions) {
|
|
448
385
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
449
|
-
const
|
|
386
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
387
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
450
388
|
const _response = yield core.fetcher({
|
|
451
389
|
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)}`),
|
|
452
390
|
method: "PATCH",
|
|
@@ -485,28 +423,14 @@ export class PaymentMethodDomain {
|
|
|
485
423
|
});
|
|
486
424
|
}
|
|
487
425
|
}
|
|
488
|
-
|
|
489
|
-
case "non-json":
|
|
490
|
-
throw new errors.PayabliError({
|
|
491
|
-
statusCode: _response.error.statusCode,
|
|
492
|
-
body: _response.error.rawBody,
|
|
493
|
-
rawResponse: _response.rawResponse,
|
|
494
|
-
});
|
|
495
|
-
case "timeout":
|
|
496
|
-
throw new errors.PayabliTimeoutError("Timeout exceeded when calling PATCH /PaymentMethodDomain/{domainId}.");
|
|
497
|
-
case "unknown":
|
|
498
|
-
throw new errors.PayabliError({
|
|
499
|
-
message: _response.error.errorMessage,
|
|
500
|
-
rawResponse: _response.rawResponse,
|
|
501
|
-
});
|
|
502
|
-
}
|
|
426
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/PaymentMethodDomain/{domainId}");
|
|
503
427
|
});
|
|
504
428
|
}
|
|
505
429
|
/**
|
|
506
430
|
* Verify a new payment method domain. If verification is successful, Apple Pay is automatically activated for the domain.
|
|
507
431
|
*
|
|
508
432
|
* @param {string} domainId - The payment method domain's ID in Payabli.
|
|
509
|
-
* @param {
|
|
433
|
+
* @param {PaymentMethodDomainClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
510
434
|
*
|
|
511
435
|
* @throws {@link Payabli.BadRequestError}
|
|
512
436
|
* @throws {@link Payabli.UnauthorizedError}
|
|
@@ -522,7 +446,8 @@ export class PaymentMethodDomain {
|
|
|
522
446
|
__verifyPaymentMethodDomain(domainId, requestOptions) {
|
|
523
447
|
return __awaiter(this, void 0, void 0, function* () {
|
|
524
448
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
525
|
-
const
|
|
449
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
450
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
526
451
|
const _response = yield core.fetcher({
|
|
527
452
|
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`),
|
|
528
453
|
method: "POST",
|
|
@@ -558,27 +483,7 @@ export class PaymentMethodDomain {
|
|
|
558
483
|
});
|
|
559
484
|
}
|
|
560
485
|
}
|
|
561
|
-
|
|
562
|
-
case "non-json":
|
|
563
|
-
throw new errors.PayabliError({
|
|
564
|
-
statusCode: _response.error.statusCode,
|
|
565
|
-
body: _response.error.rawBody,
|
|
566
|
-
rawResponse: _response.rawResponse,
|
|
567
|
-
});
|
|
568
|
-
case "timeout":
|
|
569
|
-
throw new errors.PayabliTimeoutError("Timeout exceeded when calling POST /PaymentMethodDomain/{domainId}/verify.");
|
|
570
|
-
case "unknown":
|
|
571
|
-
throw new errors.PayabliError({
|
|
572
|
-
message: _response.error.errorMessage,
|
|
573
|
-
rawResponse: _response.rawResponse,
|
|
574
|
-
});
|
|
575
|
-
}
|
|
576
|
-
});
|
|
577
|
-
}
|
|
578
|
-
_getCustomAuthorizationHeaders() {
|
|
579
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
580
|
-
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
581
|
-
return { requestToken: apiKeyValue };
|
|
486
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/PaymentMethodDomain/{domainId}/verify");
|
|
582
487
|
});
|
|
583
488
|
}
|
|
584
489
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
2
3
|
import * as core from "../../../../core/index.mjs";
|
|
3
4
|
import * as Payabli from "../../../index.mjs";
|
|
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
|
}
|