@channelpayments/node-sdk 1.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/src/apis/ChannelPaymentsApi.d.ts +281 -0
- package/dist/cjs/src/apis/ChannelPaymentsApi.js +1184 -0
- package/dist/cjs/src/apis/index.d.ts +1 -0
- package/dist/cjs/src/apis/index.js +19 -0
- package/dist/cjs/src/index.d.ts +3 -0
- package/dist/cjs/src/index.js +21 -0
- package/dist/cjs/src/models/AddressDto.d.ts +62 -0
- package/dist/cjs/src/models/AddressDto.js +63 -0
- package/dist/cjs/src/models/AddressEntity.d.ts +62 -0
- package/dist/cjs/src/models/AddressEntity.js +63 -0
- package/dist/cjs/src/models/BuyerAddressEntity.d.ts +62 -0
- package/dist/cjs/src/models/BuyerAddressEntity.js +58 -0
- package/dist/cjs/src/models/BuyerEntity.d.ts +81 -0
- package/dist/cjs/src/models/BuyerEntity.js +71 -0
- package/dist/cjs/src/models/BuyerEntity1.d.ts +69 -0
- package/dist/cjs/src/models/BuyerEntity1.js +67 -0
- package/dist/cjs/src/models/BuyerEntityAddress.d.ts +62 -0
- package/dist/cjs/src/models/BuyerEntityAddress.js +63 -0
- package/dist/cjs/src/models/BuyersSearchEntity.d.ts +51 -0
- package/dist/cjs/src/models/BuyersSearchEntity.js +58 -0
- package/dist/cjs/src/models/CFeeDto.d.ts +40 -0
- package/dist/cjs/src/models/CFeeDto.js +57 -0
- package/dist/cjs/src/models/CFeeEntity.d.ts +40 -0
- package/dist/cjs/src/models/CFeeEntity.js +57 -0
- package/dist/cjs/src/models/CaptureTransactionDto.d.ts +32 -0
- package/dist/cjs/src/models/CaptureTransactionDto.js +50 -0
- package/dist/cjs/src/models/CardDetails.d.ts +59 -0
- package/dist/cjs/src/models/CardDetails.js +67 -0
- package/dist/cjs/src/models/CreateBuyerDto.d.ts +57 -0
- package/dist/cjs/src/models/CreateBuyerDto.js +61 -0
- package/dist/cjs/src/models/CreateBuyerDtoAddress.d.ts +62 -0
- package/dist/cjs/src/models/CreateBuyerDtoAddress.js +63 -0
- package/dist/cjs/src/models/CreateMerchantAccountDto.d.ts +120 -0
- package/dist/cjs/src/models/CreateMerchantAccountDto.js +99 -0
- package/dist/cjs/src/models/CreateMerchantAccountDtoCfee.d.ts +40 -0
- package/dist/cjs/src/models/CreateMerchantAccountDtoCfee.js +57 -0
- package/dist/cjs/src/models/CreateMerchantAccountDtoGateways.d.ts +41 -0
- package/dist/cjs/src/models/CreateMerchantAccountDtoGateways.js +58 -0
- package/dist/cjs/src/models/CreateMerchantAccountsDto.d.ts +114 -0
- package/dist/cjs/src/models/CreateMerchantAccountsDto.js +96 -0
- package/dist/cjs/src/models/CreateMerchantAddressDto.d.ts +68 -0
- package/dist/cjs/src/models/CreateMerchantAddressDto.js +65 -0
- package/dist/cjs/src/models/CreateMerchantCredentialsDto.d.ts +32 -0
- package/dist/cjs/src/models/CreateMerchantCredentialsDto.js +50 -0
- package/dist/cjs/src/models/CreateMerchantDto.d.ts +70 -0
- package/dist/cjs/src/models/CreateMerchantDto.js +66 -0
- package/dist/cjs/src/models/CreateMerchantDtoAddress.d.ts +68 -0
- package/dist/cjs/src/models/CreateMerchantDtoAddress.js +65 -0
- package/dist/cjs/src/models/CreateMerchantGateway.d.ts +41 -0
- package/dist/cjs/src/models/CreateMerchantGateway.js +58 -0
- package/dist/cjs/src/models/CreatePaymentMethodDto.d.ts +63 -0
- package/dist/cjs/src/models/CreatePaymentMethodDto.js +65 -0
- package/dist/cjs/src/models/CreateTransactionDto.d.ts +80 -0
- package/dist/cjs/src/models/CreateTransactionDto.js +77 -0
- package/dist/cjs/src/models/CreateTransactionDtoPaymentMethod.d.ts +76 -0
- package/dist/cjs/src/models/CreateTransactionDtoPaymentMethod.js +68 -0
- package/dist/cjs/src/models/ErrorEntity.d.ts +56 -0
- package/dist/cjs/src/models/ErrorEntity.js +56 -0
- package/dist/cjs/src/models/MerchantAccountEntity.d.ts +108 -0
- package/dist/cjs/src/models/MerchantAccountEntity.js +97 -0
- package/dist/cjs/src/models/MerchantAccountEntityCfee.d.ts +40 -0
- package/dist/cjs/src/models/MerchantAccountEntityCfee.js +57 -0
- package/dist/cjs/src/models/MerchantAddressEntity.d.ts +68 -0
- package/dist/cjs/src/models/MerchantAddressEntity.js +65 -0
- package/dist/cjs/src/models/MerchantCredentialsEntity.d.ts +74 -0
- package/dist/cjs/src/models/MerchantCredentialsEntity.js +70 -0
- package/dist/cjs/src/models/MerchantEntity.d.ts +88 -0
- package/dist/cjs/src/models/MerchantEntity.js +75 -0
- package/dist/cjs/src/models/MerchantEntityAddress.d.ts +68 -0
- package/dist/cjs/src/models/MerchantEntityAddress.js +65 -0
- package/dist/cjs/src/models/MerchantGatewayEntity.d.ts +59 -0
- package/dist/cjs/src/models/MerchantGatewayEntity.js +67 -0
- package/dist/cjs/src/models/PaymentMethodDto.d.ts +76 -0
- package/dist/cjs/src/models/PaymentMethodDto.js +68 -0
- package/dist/cjs/src/models/PaymentMethodEntity.d.ts +124 -0
- package/dist/cjs/src/models/PaymentMethodEntity.js +97 -0
- package/dist/cjs/src/models/PaymentMethodEntity1.d.ts +89 -0
- package/dist/cjs/src/models/PaymentMethodEntity1.js +74 -0
- package/dist/cjs/src/models/PaymentMethodEntityBuyer.d.ts +69 -0
- package/dist/cjs/src/models/PaymentMethodEntityBuyer.js +67 -0
- package/dist/cjs/src/models/PaymentMethodEntityDetails.d.ts +59 -0
- package/dist/cjs/src/models/PaymentMethodEntityDetails.js +67 -0
- package/dist/cjs/src/models/PaymentMethodsSearchEntity.d.ts +51 -0
- package/dist/cjs/src/models/PaymentMethodsSearchEntity.js +58 -0
- package/dist/cjs/src/models/PaymentsBuyerEntity.d.ts +69 -0
- package/dist/cjs/src/models/PaymentsBuyerEntity.js +62 -0
- package/dist/cjs/src/models/RefundTransactionDto.d.ts +32 -0
- package/dist/cjs/src/models/RefundTransactionDto.js +50 -0
- package/dist/cjs/src/models/TransactionEntity.d.ts +198 -0
- package/dist/cjs/src/models/TransactionEntity.js +128 -0
- package/dist/cjs/src/models/TransactionRefundEntity.d.ts +85 -0
- package/dist/cjs/src/models/TransactionRefundEntity.js +80 -0
- package/dist/cjs/src/models/TransactionRefundsSearchEntity.d.ts +51 -0
- package/dist/cjs/src/models/TransactionRefundsSearchEntity.js +58 -0
- package/dist/cjs/src/models/TransactionsSearchEntity.d.ts +51 -0
- package/dist/cjs/src/models/TransactionsSearchEntity.js +58 -0
- package/dist/cjs/src/models/UpdateAddressDto.d.ts +62 -0
- package/dist/cjs/src/models/UpdateAddressDto.js +58 -0
- package/dist/cjs/src/models/UpdateBuyerDto.d.ts +63 -0
- package/dist/cjs/src/models/UpdateBuyerDto.js +60 -0
- package/dist/cjs/src/models/UpdateBuyerDtoAddress.d.ts +62 -0
- package/dist/cjs/src/models/UpdateBuyerDtoAddress.js +58 -0
- package/dist/cjs/src/models/UpdateCFeeDto.d.ts +40 -0
- package/dist/cjs/src/models/UpdateCFeeDto.js +55 -0
- package/dist/cjs/src/models/UpdateMerchantAccountDto.d.ts +107 -0
- package/dist/cjs/src/models/UpdateMerchantAccountDto.js +89 -0
- package/dist/cjs/src/models/UpdateMerchantAccountDtoCfee.d.ts +40 -0
- package/dist/cjs/src/models/UpdateMerchantAccountDtoCfee.js +55 -0
- package/dist/cjs/src/models/UpdateMerchantAddressDto.d.ts +68 -0
- package/dist/cjs/src/models/UpdateMerchantAddressDto.js +60 -0
- package/dist/cjs/src/models/UpdateMerchantCredentialsDto.d.ts +32 -0
- package/dist/cjs/src/models/UpdateMerchantCredentialsDto.js +49 -0
- package/dist/cjs/src/models/UpdateMerchantDto.d.ts +81 -0
- package/dist/cjs/src/models/UpdateMerchantDto.js +66 -0
- package/dist/cjs/src/models/UpdateMerchantDtoAddress.d.ts +68 -0
- package/dist/cjs/src/models/UpdateMerchantDtoAddress.js +60 -0
- package/dist/cjs/src/models/ValidateMerchantCredentialsDto.d.ts +26 -0
- package/dist/cjs/src/models/ValidateMerchantCredentialsDto.js +47 -0
- package/dist/cjs/src/models/index.d.ts +56 -0
- package/dist/cjs/src/models/index.js +74 -0
- package/dist/cjs/src/runtime.d.ts +118 -0
- package/dist/cjs/src/runtime.js +262 -0
- package/dist/cjs/test.d.ts +1 -0
- package/dist/cjs/test.js +81 -0
- package/dist/mjs/package.json +3 -0
- package/dist/mjs/src/apis/ChannelPaymentsApi.d.ts +281 -0
- package/dist/mjs/src/apis/ChannelPaymentsApi.js +1110 -0
- package/dist/mjs/src/apis/index.d.ts +1 -0
- package/dist/mjs/src/apis/index.js +3 -0
- package/dist/mjs/src/index.d.ts +3 -0
- package/dist/mjs/src/index.js +5 -0
- package/dist/mjs/src/models/AddressDto.d.ts +62 -0
- package/dist/mjs/src/models/AddressDto.js +56 -0
- package/dist/mjs/src/models/AddressEntity.d.ts +62 -0
- package/dist/mjs/src/models/AddressEntity.js +56 -0
- package/dist/mjs/src/models/BuyerAddressEntity.d.ts +62 -0
- package/dist/mjs/src/models/BuyerAddressEntity.js +51 -0
- package/dist/mjs/src/models/BuyerEntity.d.ts +81 -0
- package/dist/mjs/src/models/BuyerEntity.js +64 -0
- package/dist/mjs/src/models/BuyerEntity1.d.ts +69 -0
- package/dist/mjs/src/models/BuyerEntity1.js +60 -0
- package/dist/mjs/src/models/BuyerEntityAddress.d.ts +62 -0
- package/dist/mjs/src/models/BuyerEntityAddress.js +56 -0
- package/dist/mjs/src/models/BuyersSearchEntity.d.ts +51 -0
- package/dist/mjs/src/models/BuyersSearchEntity.js +51 -0
- package/dist/mjs/src/models/CFeeDto.d.ts +40 -0
- package/dist/mjs/src/models/CFeeDto.js +50 -0
- package/dist/mjs/src/models/CFeeEntity.d.ts +40 -0
- package/dist/mjs/src/models/CFeeEntity.js +50 -0
- package/dist/mjs/src/models/CaptureTransactionDto.d.ts +32 -0
- package/dist/mjs/src/models/CaptureTransactionDto.js +43 -0
- package/dist/mjs/src/models/CardDetails.d.ts +59 -0
- package/dist/mjs/src/models/CardDetails.js +60 -0
- package/dist/mjs/src/models/CreateBuyerDto.d.ts +57 -0
- package/dist/mjs/src/models/CreateBuyerDto.js +54 -0
- package/dist/mjs/src/models/CreateBuyerDtoAddress.d.ts +62 -0
- package/dist/mjs/src/models/CreateBuyerDtoAddress.js +56 -0
- package/dist/mjs/src/models/CreateMerchantAccountDto.d.ts +120 -0
- package/dist/mjs/src/models/CreateMerchantAccountDto.js +92 -0
- package/dist/mjs/src/models/CreateMerchantAccountDtoCfee.d.ts +40 -0
- package/dist/mjs/src/models/CreateMerchantAccountDtoCfee.js +50 -0
- package/dist/mjs/src/models/CreateMerchantAccountDtoGateways.d.ts +41 -0
- package/dist/mjs/src/models/CreateMerchantAccountDtoGateways.js +51 -0
- package/dist/mjs/src/models/CreateMerchantAccountsDto.d.ts +114 -0
- package/dist/mjs/src/models/CreateMerchantAccountsDto.js +89 -0
- package/dist/mjs/src/models/CreateMerchantAddressDto.d.ts +68 -0
- package/dist/mjs/src/models/CreateMerchantAddressDto.js +58 -0
- package/dist/mjs/src/models/CreateMerchantCredentialsDto.d.ts +32 -0
- package/dist/mjs/src/models/CreateMerchantCredentialsDto.js +43 -0
- package/dist/mjs/src/models/CreateMerchantDto.d.ts +70 -0
- package/dist/mjs/src/models/CreateMerchantDto.js +59 -0
- package/dist/mjs/src/models/CreateMerchantDtoAddress.d.ts +68 -0
- package/dist/mjs/src/models/CreateMerchantDtoAddress.js +58 -0
- package/dist/mjs/src/models/CreateMerchantGateway.d.ts +41 -0
- package/dist/mjs/src/models/CreateMerchantGateway.js +51 -0
- package/dist/mjs/src/models/CreatePaymentMethodDto.d.ts +63 -0
- package/dist/mjs/src/models/CreatePaymentMethodDto.js +58 -0
- package/dist/mjs/src/models/CreateTransactionDto.d.ts +80 -0
- package/dist/mjs/src/models/CreateTransactionDto.js +70 -0
- package/dist/mjs/src/models/CreateTransactionDtoPaymentMethod.d.ts +76 -0
- package/dist/mjs/src/models/CreateTransactionDtoPaymentMethod.js +61 -0
- package/dist/mjs/src/models/ErrorEntity.d.ts +56 -0
- package/dist/mjs/src/models/ErrorEntity.js +49 -0
- package/dist/mjs/src/models/MerchantAccountEntity.d.ts +108 -0
- package/dist/mjs/src/models/MerchantAccountEntity.js +90 -0
- package/dist/mjs/src/models/MerchantAccountEntityCfee.d.ts +40 -0
- package/dist/mjs/src/models/MerchantAccountEntityCfee.js +50 -0
- package/dist/mjs/src/models/MerchantAddressEntity.d.ts +68 -0
- package/dist/mjs/src/models/MerchantAddressEntity.js +58 -0
- package/dist/mjs/src/models/MerchantCredentialsEntity.d.ts +74 -0
- package/dist/mjs/src/models/MerchantCredentialsEntity.js +63 -0
- package/dist/mjs/src/models/MerchantEntity.d.ts +88 -0
- package/dist/mjs/src/models/MerchantEntity.js +68 -0
- package/dist/mjs/src/models/MerchantEntityAddress.d.ts +68 -0
- package/dist/mjs/src/models/MerchantEntityAddress.js +58 -0
- package/dist/mjs/src/models/MerchantGatewayEntity.d.ts +59 -0
- package/dist/mjs/src/models/MerchantGatewayEntity.js +60 -0
- package/dist/mjs/src/models/PaymentMethodDto.d.ts +76 -0
- package/dist/mjs/src/models/PaymentMethodDto.js +61 -0
- package/dist/mjs/src/models/PaymentMethodEntity.d.ts +124 -0
- package/dist/mjs/src/models/PaymentMethodEntity.js +90 -0
- package/dist/mjs/src/models/PaymentMethodEntity1.d.ts +89 -0
- package/dist/mjs/src/models/PaymentMethodEntity1.js +67 -0
- package/dist/mjs/src/models/PaymentMethodEntityBuyer.d.ts +69 -0
- package/dist/mjs/src/models/PaymentMethodEntityBuyer.js +60 -0
- package/dist/mjs/src/models/PaymentMethodEntityDetails.d.ts +59 -0
- package/dist/mjs/src/models/PaymentMethodEntityDetails.js +60 -0
- package/dist/mjs/src/models/PaymentMethodsSearchEntity.d.ts +51 -0
- package/dist/mjs/src/models/PaymentMethodsSearchEntity.js +51 -0
- package/dist/mjs/src/models/PaymentsBuyerEntity.d.ts +69 -0
- package/dist/mjs/src/models/PaymentsBuyerEntity.js +55 -0
- package/dist/mjs/src/models/RefundTransactionDto.d.ts +32 -0
- package/dist/mjs/src/models/RefundTransactionDto.js +43 -0
- package/dist/mjs/src/models/TransactionEntity.d.ts +198 -0
- package/dist/mjs/src/models/TransactionEntity.js +121 -0
- package/dist/mjs/src/models/TransactionRefundEntity.d.ts +85 -0
- package/dist/mjs/src/models/TransactionRefundEntity.js +73 -0
- package/dist/mjs/src/models/TransactionRefundsSearchEntity.d.ts +51 -0
- package/dist/mjs/src/models/TransactionRefundsSearchEntity.js +51 -0
- package/dist/mjs/src/models/TransactionsSearchEntity.d.ts +51 -0
- package/dist/mjs/src/models/TransactionsSearchEntity.js +51 -0
- package/dist/mjs/src/models/UpdateAddressDto.d.ts +62 -0
- package/dist/mjs/src/models/UpdateAddressDto.js +51 -0
- package/dist/mjs/src/models/UpdateBuyerDto.d.ts +63 -0
- package/dist/mjs/src/models/UpdateBuyerDto.js +53 -0
- package/dist/mjs/src/models/UpdateBuyerDtoAddress.d.ts +62 -0
- package/dist/mjs/src/models/UpdateBuyerDtoAddress.js +51 -0
- package/dist/mjs/src/models/UpdateCFeeDto.d.ts +40 -0
- package/dist/mjs/src/models/UpdateCFeeDto.js +48 -0
- package/dist/mjs/src/models/UpdateMerchantAccountDto.d.ts +107 -0
- package/dist/mjs/src/models/UpdateMerchantAccountDto.js +82 -0
- package/dist/mjs/src/models/UpdateMerchantAccountDtoCfee.d.ts +40 -0
- package/dist/mjs/src/models/UpdateMerchantAccountDtoCfee.js +48 -0
- package/dist/mjs/src/models/UpdateMerchantAddressDto.d.ts +68 -0
- package/dist/mjs/src/models/UpdateMerchantAddressDto.js +53 -0
- package/dist/mjs/src/models/UpdateMerchantCredentialsDto.d.ts +32 -0
- package/dist/mjs/src/models/UpdateMerchantCredentialsDto.js +42 -0
- package/dist/mjs/src/models/UpdateMerchantDto.d.ts +81 -0
- package/dist/mjs/src/models/UpdateMerchantDto.js +59 -0
- package/dist/mjs/src/models/UpdateMerchantDtoAddress.d.ts +68 -0
- package/dist/mjs/src/models/UpdateMerchantDtoAddress.js +53 -0
- package/dist/mjs/src/models/ValidateMerchantCredentialsDto.d.ts +26 -0
- package/dist/mjs/src/models/ValidateMerchantCredentialsDto.js +40 -0
- package/dist/mjs/src/models/index.d.ts +56 -0
- package/dist/mjs/src/models/index.js +58 -0
- package/dist/mjs/src/runtime.d.ts +118 -0
- package/dist/mjs/src/runtime.js +234 -0
- package/dist/mjs/test.d.ts +1 -0
- package/dist/mjs/test.js +47 -0
- package/package.json +32 -0
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Channel Payments API
|
|
6
|
+
*
|
|
7
|
+
* NOTE: This class is auto generated. Do not edit the class manually.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
11
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
12
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
13
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
14
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
15
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
16
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
20
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
21
|
+
};
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.TextApiResponse = exports.BlobApiResponse = exports.VoidApiResponse = exports.JSONApiResponse = exports.canConsumeForm = exports.mapValues = exports.querystring = exports.removeNullUndefined = exports.exists = exports.COLLECTION_FORMATS = exports.RequiredError = exports.FetchError = exports.ResponseError = exports.BaseAPI = void 0;
|
|
24
|
+
const ENVIRONMENT_URLS = {
|
|
25
|
+
prod: 'https://channelpayments-api.com',
|
|
26
|
+
sandbox: 'https://sandbox.channelpayments-api.com',
|
|
27
|
+
};
|
|
28
|
+
const cross_fetch_1 = __importDefault(require("cross-fetch"));
|
|
29
|
+
const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
|
|
30
|
+
const ulidx_1 = require("ulidx");
|
|
31
|
+
/**
|
|
32
|
+
* This is the base class for all generated API classes.
|
|
33
|
+
*/
|
|
34
|
+
class BaseAPI {
|
|
35
|
+
constructor(apiConfig) {
|
|
36
|
+
this.apiConfig = apiConfig;
|
|
37
|
+
this.fetchApi = (url, init) => __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
let fetchParams = { url, init };
|
|
39
|
+
let response = undefined;
|
|
40
|
+
try {
|
|
41
|
+
response = yield (0, cross_fetch_1.default)(fetchParams.url, fetchParams.init);
|
|
42
|
+
}
|
|
43
|
+
catch (e) {
|
|
44
|
+
if (response === undefined) {
|
|
45
|
+
if (e instanceof Error) {
|
|
46
|
+
throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response');
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
throw e;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return response;
|
|
54
|
+
});
|
|
55
|
+
this.keyId = apiConfig.keyId;
|
|
56
|
+
this.privateKey = apiConfig.privateKey;
|
|
57
|
+
if (apiConfig.url && apiConfig.environment) {
|
|
58
|
+
throw new Error("you must specify either 'url' or 'environment', not both");
|
|
59
|
+
}
|
|
60
|
+
if (apiConfig.url) {
|
|
61
|
+
this.url = apiConfig.url;
|
|
62
|
+
}
|
|
63
|
+
else if (apiConfig.environment) {
|
|
64
|
+
if (!ENVIRONMENT_URLS[apiConfig.environment]) {
|
|
65
|
+
throw new Error(`Unsupported environment '${apiConfig.environment}'. Valid values: 'prod | sandbox'`);
|
|
66
|
+
}
|
|
67
|
+
this.url = ENVIRONMENT_URLS[apiConfig.environment];
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
throw new Error("Expected one of 'environment' or 'url' to be specified");
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Check if the given MIME is a JSON MIME.
|
|
75
|
+
* JSON MIME examples:
|
|
76
|
+
* application/json
|
|
77
|
+
* application/json; charset=UTF8
|
|
78
|
+
* APPLICATION/JSON
|
|
79
|
+
* application/vnd.company+json
|
|
80
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
81
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
82
|
+
*/
|
|
83
|
+
isJsonMime(mime) {
|
|
84
|
+
if (!mime) {
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
return BaseAPI.jsonRegex.test(mime);
|
|
88
|
+
}
|
|
89
|
+
request(context) {
|
|
90
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
91
|
+
const { url, requestInit } = yield this.createFetchParams(context);
|
|
92
|
+
return yield this.fetchApi(url, requestInit);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
createFetchParams(context) {
|
|
96
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
+
Object.keys(context.headers).forEach(key => context.headers[key] === undefined ? delete context.headers[key] : {});
|
|
98
|
+
const header = {
|
|
99
|
+
typ: 'JWT',
|
|
100
|
+
alg: 'ES512',
|
|
101
|
+
kid: this.keyId,
|
|
102
|
+
};
|
|
103
|
+
const currentTime = Math.floor(Date.now() / 1000);
|
|
104
|
+
const expirationTime = currentTime + 30; // 30 seconds from now
|
|
105
|
+
const claims = {
|
|
106
|
+
iss: 'channelpayments/node-sdk',
|
|
107
|
+
iat: currentTime,
|
|
108
|
+
exp: expirationTime,
|
|
109
|
+
jti: (0, ulidx_1.ulid)(),
|
|
110
|
+
scopes: ['*.read', '*.write'],
|
|
111
|
+
};
|
|
112
|
+
const token = jsonwebtoken_1.default.sign(claims, this.privateKey, { algorithm: 'ES512', header });
|
|
113
|
+
context.headers['Authorization'] = `Bearer ${token}`;
|
|
114
|
+
let url = this.url + context.path;
|
|
115
|
+
if (context.query !== undefined && Object.keys(context.query).length !== 0) {
|
|
116
|
+
url += '?' + querystring(context.query);
|
|
117
|
+
}
|
|
118
|
+
const requestInit = {
|
|
119
|
+
method: context.method,
|
|
120
|
+
headers: context.headers,
|
|
121
|
+
body: isFormData(context.body) ||
|
|
122
|
+
context.body instanceof URLSearchParams ||
|
|
123
|
+
isBlob(context.body)
|
|
124
|
+
? context.body
|
|
125
|
+
: JSON.stringify(context.body),
|
|
126
|
+
};
|
|
127
|
+
return { url, requestInit };
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
exports.BaseAPI = BaseAPI;
|
|
132
|
+
BaseAPI.jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i');
|
|
133
|
+
;
|
|
134
|
+
function isBlob(value) {
|
|
135
|
+
return typeof Blob !== 'undefined' && value instanceof Blob;
|
|
136
|
+
}
|
|
137
|
+
function isFormData(value) {
|
|
138
|
+
return typeof FormData !== "undefined" && value instanceof FormData;
|
|
139
|
+
}
|
|
140
|
+
class ResponseError extends Error {
|
|
141
|
+
constructor(response, msg) {
|
|
142
|
+
super(msg);
|
|
143
|
+
this.response = response;
|
|
144
|
+
this.name = "ResponseError";
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
exports.ResponseError = ResponseError;
|
|
148
|
+
class FetchError extends Error {
|
|
149
|
+
constructor(cause, msg) {
|
|
150
|
+
super(msg);
|
|
151
|
+
this.cause = cause;
|
|
152
|
+
this.name = "FetchError";
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
exports.FetchError = FetchError;
|
|
156
|
+
class RequiredError extends Error {
|
|
157
|
+
constructor(field, msg) {
|
|
158
|
+
super(msg);
|
|
159
|
+
this.field = field;
|
|
160
|
+
this.name = "RequiredError";
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
exports.RequiredError = RequiredError;
|
|
164
|
+
exports.COLLECTION_FORMATS = {
|
|
165
|
+
csv: ",",
|
|
166
|
+
ssv: " ",
|
|
167
|
+
tsv: "\t",
|
|
168
|
+
pipes: "|",
|
|
169
|
+
};
|
|
170
|
+
function exists(json, key) {
|
|
171
|
+
const value = json[key];
|
|
172
|
+
return value !== null && value !== undefined;
|
|
173
|
+
}
|
|
174
|
+
exports.exists = exists;
|
|
175
|
+
const removeNullUndefined = (obj) => Object.fromEntries(Object.entries(obj).filter(([_, v]) => v != null));
|
|
176
|
+
exports.removeNullUndefined = removeNullUndefined;
|
|
177
|
+
function querystring(params, prefix = '') {
|
|
178
|
+
return Object.keys(params)
|
|
179
|
+
.map(key => querystringSingleKey(key, params[key], prefix))
|
|
180
|
+
.filter(part => part.length > 0)
|
|
181
|
+
.join('&');
|
|
182
|
+
}
|
|
183
|
+
exports.querystring = querystring;
|
|
184
|
+
function querystringSingleKey(key, value, keyPrefix = '') {
|
|
185
|
+
const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
|
|
186
|
+
if (value instanceof Array) {
|
|
187
|
+
const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue)))
|
|
188
|
+
.join(`&${encodeURIComponent(fullKey)}=`);
|
|
189
|
+
return `${encodeURIComponent(fullKey)}=${multiValue}`;
|
|
190
|
+
}
|
|
191
|
+
if (value instanceof Set) {
|
|
192
|
+
const valueAsArray = Array.from(value);
|
|
193
|
+
return querystringSingleKey(key, valueAsArray, keyPrefix);
|
|
194
|
+
}
|
|
195
|
+
if (value instanceof Date) {
|
|
196
|
+
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
|
|
197
|
+
}
|
|
198
|
+
if (value instanceof Object) {
|
|
199
|
+
return querystring(value, fullKey);
|
|
200
|
+
}
|
|
201
|
+
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
|
202
|
+
}
|
|
203
|
+
function mapValues(data, fn) {
|
|
204
|
+
return Object.keys(data).reduce((acc, key) => (Object.assign(Object.assign({}, acc), { [key]: fn(data[key]) })), {});
|
|
205
|
+
}
|
|
206
|
+
exports.mapValues = mapValues;
|
|
207
|
+
function canConsumeForm(consumes) {
|
|
208
|
+
for (const consume of consumes) {
|
|
209
|
+
if ('multipart/form-data' === consume.contentType) {
|
|
210
|
+
return true;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
return false;
|
|
214
|
+
}
|
|
215
|
+
exports.canConsumeForm = canConsumeForm;
|
|
216
|
+
class JSONApiResponse {
|
|
217
|
+
constructor(raw, transformer = (jsonValue) => jsonValue) {
|
|
218
|
+
this.raw = raw;
|
|
219
|
+
this.transformer = transformer;
|
|
220
|
+
}
|
|
221
|
+
value() {
|
|
222
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
223
|
+
return this.transformer(yield this.raw.json());
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
exports.JSONApiResponse = JSONApiResponse;
|
|
228
|
+
class VoidApiResponse {
|
|
229
|
+
constructor(raw) {
|
|
230
|
+
this.raw = raw;
|
|
231
|
+
}
|
|
232
|
+
value() {
|
|
233
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
234
|
+
return undefined;
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
exports.VoidApiResponse = VoidApiResponse;
|
|
239
|
+
class BlobApiResponse {
|
|
240
|
+
constructor(raw) {
|
|
241
|
+
this.raw = raw;
|
|
242
|
+
}
|
|
243
|
+
value() {
|
|
244
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
245
|
+
return yield this.raw.blob();
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
;
|
|
249
|
+
}
|
|
250
|
+
exports.BlobApiResponse = BlobApiResponse;
|
|
251
|
+
class TextApiResponse {
|
|
252
|
+
constructor(raw) {
|
|
253
|
+
this.raw = raw;
|
|
254
|
+
}
|
|
255
|
+
value() {
|
|
256
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
257
|
+
return yield this.raw.text();
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
;
|
|
261
|
+
}
|
|
262
|
+
exports.TextApiResponse = TextApiResponse;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/cjs/test.js
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
const fs = __importStar(require("fs"));
|
|
36
|
+
const apis_1 = require("./src/apis");
|
|
37
|
+
const channelPaymentsApi = new apis_1.ChannelPaymentsApi({
|
|
38
|
+
keyId: 'i6OtWffwR6A4ungdsRVSKYu5KT/NkC74gWibR5SfZuo',
|
|
39
|
+
privateKey: fs.readFileSync('/Users/andy/Downloads/sandbox-integ.pem', 'utf8'),
|
|
40
|
+
// environment: 'sandbox'
|
|
41
|
+
url: 'http://localhost:3000'
|
|
42
|
+
});
|
|
43
|
+
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
44
|
+
try {
|
|
45
|
+
// const merchant = await channelPaymentsApi.findMerchant();
|
|
46
|
+
// console.log(merchant);
|
|
47
|
+
// const createBuyerResponse = await channelPaymentsApi.createBuyer({
|
|
48
|
+
// givenName: 'Test',
|
|
49
|
+
// familyName: 'Test last name',
|
|
50
|
+
// email: 'foo@bar.com',
|
|
51
|
+
// address: {
|
|
52
|
+
// city: 'city',
|
|
53
|
+
// countryCode: 'US',
|
|
54
|
+
// postalCode: '12345',
|
|
55
|
+
// subdivision: 'AZ',
|
|
56
|
+
// streetAddress: 'street',
|
|
57
|
+
// }
|
|
58
|
+
// });
|
|
59
|
+
// console.log(createBuyerResponse);
|
|
60
|
+
const searchBuyersResponse = yield channelPaymentsApi.searchBuyers({
|
|
61
|
+
merchantId: ''
|
|
62
|
+
});
|
|
63
|
+
// const captureResponse = await channelPaymentsApi.createTransaction({
|
|
64
|
+
// amount: 1000,
|
|
65
|
+
// currency: 'USD',
|
|
66
|
+
// paymentMethod: {
|
|
67
|
+
// method: 'CARD',
|
|
68
|
+
// number: '4111111111111111',
|
|
69
|
+
// expirationDate: '12/29',
|
|
70
|
+
// securityCode: '123'
|
|
71
|
+
// }
|
|
72
|
+
// });
|
|
73
|
+
// console.log(captureResponse)
|
|
74
|
+
}
|
|
75
|
+
catch (_error) {
|
|
76
|
+
const error = _error;
|
|
77
|
+
console.error(`Error: ${error.message}`, error);
|
|
78
|
+
}
|
|
79
|
+
}))();
|
|
80
|
+
// const requestId = rawResponse.headers.get('requestId');
|
|
81
|
+
// error.requestId = requestId
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Channel Payments API
|
|
3
|
+
*
|
|
4
|
+
* NOTE: This class is auto generated. Do not edit the class manually.
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
import * as runtime from '../runtime';
|
|
8
|
+
import type { BuyerEntity, BuyersSearchEntity, CaptureTransactionDto, CreateBuyerDto, CreatePaymentMethodDto, CreateTransactionDto, MerchantEntity, PaymentMethodEntity, PaymentMethodsSearchEntity, RefundTransactionDto, TransactionEntity, TransactionRefundEntity, TransactionRefundsSearchEntity, TransactionsSearchEntity, UpdateBuyerDto } from '../models';
|
|
9
|
+
export interface DeleteBuyerRequest {
|
|
10
|
+
buyerId: string;
|
|
11
|
+
}
|
|
12
|
+
export interface DeletePaymentMethodRequest {
|
|
13
|
+
paymentMethodId: any;
|
|
14
|
+
}
|
|
15
|
+
export interface GetBuyerRequest {
|
|
16
|
+
buyerId: string;
|
|
17
|
+
}
|
|
18
|
+
export interface GetPaymentMethodRequest {
|
|
19
|
+
paymentMethodId: any;
|
|
20
|
+
}
|
|
21
|
+
export interface GetRefundRequest {
|
|
22
|
+
refundId: string;
|
|
23
|
+
}
|
|
24
|
+
export interface GetTransactionRequest {
|
|
25
|
+
transactionId: string;
|
|
26
|
+
}
|
|
27
|
+
export interface SearchBuyersRequest {
|
|
28
|
+
merchantId?: string;
|
|
29
|
+
buyerId?: string;
|
|
30
|
+
externalBuyerId?: string;
|
|
31
|
+
startDate?: Date;
|
|
32
|
+
endDate?: Date;
|
|
33
|
+
givenName?: string;
|
|
34
|
+
familyName?: string;
|
|
35
|
+
email?: string;
|
|
36
|
+
cursor?: string;
|
|
37
|
+
limit?: string;
|
|
38
|
+
order?: SearchBuyersOrderEnum;
|
|
39
|
+
}
|
|
40
|
+
export interface SearchPaymentMethodsRequest {
|
|
41
|
+
merchantId: string;
|
|
42
|
+
paymentMethodId?: string;
|
|
43
|
+
buyerId?: string;
|
|
44
|
+
externalBuyerId?: string;
|
|
45
|
+
startDate?: Date;
|
|
46
|
+
endDate?: Date;
|
|
47
|
+
method?: SearchPaymentMethodsMethodEnum;
|
|
48
|
+
currency?: SearchPaymentMethodsCurrencyEnum;
|
|
49
|
+
cursor?: string;
|
|
50
|
+
limit?: string;
|
|
51
|
+
order?: SearchPaymentMethodsOrderEnum;
|
|
52
|
+
}
|
|
53
|
+
export interface SearchRefundsRequest {
|
|
54
|
+
merchantId: string;
|
|
55
|
+
transactionId?: string;
|
|
56
|
+
status?: Array<SearchRefundsStatusEnum>;
|
|
57
|
+
startDate?: Date;
|
|
58
|
+
endDate?: Date;
|
|
59
|
+
currency?: SearchRefundsCurrencyEnum;
|
|
60
|
+
cursor?: string;
|
|
61
|
+
limit?: string;
|
|
62
|
+
order?: SearchRefundsOrderEnum;
|
|
63
|
+
}
|
|
64
|
+
export interface SearchTransactionsRequest {
|
|
65
|
+
merchantId: string;
|
|
66
|
+
status?: Array<SearchTransactionsStatusEnum>;
|
|
67
|
+
intent?: SearchTransactionsIntentEnum;
|
|
68
|
+
buyerId?: string;
|
|
69
|
+
externalBuyerId?: string;
|
|
70
|
+
startDate?: Date;
|
|
71
|
+
endDate?: Date;
|
|
72
|
+
currency?: SearchTransactionsCurrencyEnum;
|
|
73
|
+
hasRefunds?: string;
|
|
74
|
+
capturedAt?: Date;
|
|
75
|
+
authorizedAt?: Date;
|
|
76
|
+
voidedAt?: Date;
|
|
77
|
+
cursor?: string;
|
|
78
|
+
limit?: string;
|
|
79
|
+
order?: SearchTransactionsOrderEnum;
|
|
80
|
+
}
|
|
81
|
+
export interface VoidTransactionRequest {
|
|
82
|
+
transactionId: string;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
*/
|
|
87
|
+
export declare class ChannelPaymentsApi extends runtime.BaseAPI {
|
|
88
|
+
/**
|
|
89
|
+
* Attempts to capture an authorized transaction
|
|
90
|
+
* Capture transaction
|
|
91
|
+
*/
|
|
92
|
+
captureTransaction(requestParameters: CaptureTransactionDto): Promise<TransactionEntity>;
|
|
93
|
+
/**
|
|
94
|
+
* Creates a new buyer.
|
|
95
|
+
* Create buyer.
|
|
96
|
+
*/
|
|
97
|
+
createBuyer(requestParameters: CreateBuyerDto): Promise<BuyerEntity>;
|
|
98
|
+
/**
|
|
99
|
+
* Attempts to create a new transaction by specified intent for a given payment method
|
|
100
|
+
* Create transaction
|
|
101
|
+
*/
|
|
102
|
+
createTransaction(requestParameters: CreateTransactionDto): Promise<TransactionEntity>;
|
|
103
|
+
/**
|
|
104
|
+
* Removes a buyer ID.
|
|
105
|
+
* Remove buyer.
|
|
106
|
+
*/
|
|
107
|
+
deleteBuyer(requestParameters: DeleteBuyerRequest): Promise<BuyerEntity>;
|
|
108
|
+
/**
|
|
109
|
+
* Delete payment method by paymentMethodId
|
|
110
|
+
* Delete payment method
|
|
111
|
+
*/
|
|
112
|
+
deletePaymentMethod(requestParameters: DeletePaymentMethodRequest): Promise<PaymentMethodEntity>;
|
|
113
|
+
/**
|
|
114
|
+
* Find a buyer by buyer ID.
|
|
115
|
+
* Find buyer.
|
|
116
|
+
*/
|
|
117
|
+
getBuyer(requestParameters: GetBuyerRequest): Promise<BuyerEntity>;
|
|
118
|
+
/**
|
|
119
|
+
* Retrieve all child merchants of the merchant associated with the user making the request.
|
|
120
|
+
* Find child merchants
|
|
121
|
+
*/
|
|
122
|
+
getChildMerchants(): Promise<MerchantEntity>;
|
|
123
|
+
/**
|
|
124
|
+
* Retrieve the merchant associated with the user making the request.
|
|
125
|
+
* Find merchant
|
|
126
|
+
*/
|
|
127
|
+
getMerchant(): Promise<MerchantEntity>;
|
|
128
|
+
/**
|
|
129
|
+
* Find payment method by paymentMethodId
|
|
130
|
+
* Find by payment method
|
|
131
|
+
*/
|
|
132
|
+
getPaymentMethod(requestParameters: GetPaymentMethodRequest): Promise<PaymentMethodEntity>;
|
|
133
|
+
/**
|
|
134
|
+
* Attempts to find refund by transaction ID and refund ID
|
|
135
|
+
* Find refund
|
|
136
|
+
*/
|
|
137
|
+
getRefund(requestParameters: GetRefundRequest): Promise<TransactionRefundEntity>;
|
|
138
|
+
/**
|
|
139
|
+
* Attempts to find a transaction by ID
|
|
140
|
+
* Find transaction
|
|
141
|
+
*/
|
|
142
|
+
getTransaction(requestParameters: GetTransactionRequest): Promise<TransactionEntity>;
|
|
143
|
+
/**
|
|
144
|
+
* Attempts to refund a captured transaction
|
|
145
|
+
* Refund a transaction
|
|
146
|
+
*/
|
|
147
|
+
refundTransaction(requestParameters: RefundTransactionDto): Promise<TransactionRefundEntity>;
|
|
148
|
+
/**
|
|
149
|
+
* Search a buyer by query param
|
|
150
|
+
* Search a buyer
|
|
151
|
+
*/
|
|
152
|
+
searchBuyers(requestParameters: SearchBuyersRequest): Promise<BuyersSearchEntity>;
|
|
153
|
+
/**
|
|
154
|
+
* Search a payment methods by query params
|
|
155
|
+
* Search payment methods
|
|
156
|
+
*/
|
|
157
|
+
searchPaymentMethods(requestParameters: SearchPaymentMethodsRequest): Promise<PaymentMethodsSearchEntity>;
|
|
158
|
+
/**
|
|
159
|
+
* Attempts to search refunds by query parameters
|
|
160
|
+
* Search refunds
|
|
161
|
+
*/
|
|
162
|
+
searchRefunds(requestParameters: SearchRefundsRequest): Promise<TransactionRefundsSearchEntity>;
|
|
163
|
+
/**
|
|
164
|
+
* Search a transactions by query params
|
|
165
|
+
* Search transactions
|
|
166
|
+
*/
|
|
167
|
+
searchTransactions(requestParameters: SearchTransactionsRequest): Promise<TransactionsSearchEntity>;
|
|
168
|
+
/**
|
|
169
|
+
* Store a card payment method
|
|
170
|
+
* Store payment method
|
|
171
|
+
*/
|
|
172
|
+
storePaymentMethod(requestParameters: CreatePaymentMethodDto): Promise<PaymentMethodEntity>;
|
|
173
|
+
/**
|
|
174
|
+
* Updates an existing buyer.
|
|
175
|
+
* Update buyer.
|
|
176
|
+
*/
|
|
177
|
+
updateBuyer(requestParameters: UpdateBuyerDto): Promise<BuyerEntity>;
|
|
178
|
+
/**
|
|
179
|
+
* Attempts to void an authorized transaction
|
|
180
|
+
* Void a transaction
|
|
181
|
+
*/
|
|
182
|
+
voidTransaction(requestParameters: VoidTransactionRequest): Promise<TransactionEntity>;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* @export
|
|
186
|
+
*/
|
|
187
|
+
export declare const SearchBuyersOrderEnum: {
|
|
188
|
+
readonly Asc: "asc";
|
|
189
|
+
readonly Desc: "desc";
|
|
190
|
+
};
|
|
191
|
+
export type SearchBuyersOrderEnum = typeof SearchBuyersOrderEnum[keyof typeof SearchBuyersOrderEnum];
|
|
192
|
+
/**
|
|
193
|
+
* @export
|
|
194
|
+
*/
|
|
195
|
+
export declare const SearchPaymentMethodsMethodEnum: {
|
|
196
|
+
readonly Card: "card";
|
|
197
|
+
};
|
|
198
|
+
export type SearchPaymentMethodsMethodEnum = typeof SearchPaymentMethodsMethodEnum[keyof typeof SearchPaymentMethodsMethodEnum];
|
|
199
|
+
/**
|
|
200
|
+
* @export
|
|
201
|
+
*/
|
|
202
|
+
export declare const SearchPaymentMethodsCurrencyEnum: {
|
|
203
|
+
readonly Usd: "USD";
|
|
204
|
+
};
|
|
205
|
+
export type SearchPaymentMethodsCurrencyEnum = typeof SearchPaymentMethodsCurrencyEnum[keyof typeof SearchPaymentMethodsCurrencyEnum];
|
|
206
|
+
/**
|
|
207
|
+
* @export
|
|
208
|
+
*/
|
|
209
|
+
export declare const SearchPaymentMethodsOrderEnum: {
|
|
210
|
+
readonly Asc: "asc";
|
|
211
|
+
readonly Desc: "desc";
|
|
212
|
+
};
|
|
213
|
+
export type SearchPaymentMethodsOrderEnum = typeof SearchPaymentMethodsOrderEnum[keyof typeof SearchPaymentMethodsOrderEnum];
|
|
214
|
+
/**
|
|
215
|
+
* @export
|
|
216
|
+
*/
|
|
217
|
+
export declare const SearchRefundsStatusEnum: {
|
|
218
|
+
readonly Processing: "processing";
|
|
219
|
+
readonly Succeeded: "succeeded";
|
|
220
|
+
readonly Declined: "declined";
|
|
221
|
+
readonly Failed: "failed";
|
|
222
|
+
readonly Voided: "voided";
|
|
223
|
+
};
|
|
224
|
+
export type SearchRefundsStatusEnum = typeof SearchRefundsStatusEnum[keyof typeof SearchRefundsStatusEnum];
|
|
225
|
+
/**
|
|
226
|
+
* @export
|
|
227
|
+
*/
|
|
228
|
+
export declare const SearchRefundsCurrencyEnum: {
|
|
229
|
+
readonly Usd: "USD";
|
|
230
|
+
readonly Cad: "CAD";
|
|
231
|
+
readonly Aud: "AUD";
|
|
232
|
+
};
|
|
233
|
+
export type SearchRefundsCurrencyEnum = typeof SearchRefundsCurrencyEnum[keyof typeof SearchRefundsCurrencyEnum];
|
|
234
|
+
/**
|
|
235
|
+
* @export
|
|
236
|
+
*/
|
|
237
|
+
export declare const SearchRefundsOrderEnum: {
|
|
238
|
+
readonly Asc: "asc";
|
|
239
|
+
readonly Desc: "desc";
|
|
240
|
+
};
|
|
241
|
+
export type SearchRefundsOrderEnum = typeof SearchRefundsOrderEnum[keyof typeof SearchRefundsOrderEnum];
|
|
242
|
+
/**
|
|
243
|
+
* @export
|
|
244
|
+
*/
|
|
245
|
+
export declare const SearchTransactionsStatusEnum: {
|
|
246
|
+
readonly Processing: "processing";
|
|
247
|
+
readonly BuyerApprovalPending: "buyerApprovalPending";
|
|
248
|
+
readonly Authorized: "authorized";
|
|
249
|
+
readonly AuthorizationFailed: "authorizationFailed";
|
|
250
|
+
readonly Declined: "declined";
|
|
251
|
+
readonly CapturePending: "capturePending";
|
|
252
|
+
readonly Captured: "captured";
|
|
253
|
+
readonly VoidPending: "voidPending";
|
|
254
|
+
readonly Voided: "voided";
|
|
255
|
+
};
|
|
256
|
+
export type SearchTransactionsStatusEnum = typeof SearchTransactionsStatusEnum[keyof typeof SearchTransactionsStatusEnum];
|
|
257
|
+
/**
|
|
258
|
+
* @export
|
|
259
|
+
*/
|
|
260
|
+
export declare const SearchTransactionsIntentEnum: {
|
|
261
|
+
readonly Capture: "capture";
|
|
262
|
+
readonly Authorize: "authorize";
|
|
263
|
+
};
|
|
264
|
+
export type SearchTransactionsIntentEnum = typeof SearchTransactionsIntentEnum[keyof typeof SearchTransactionsIntentEnum];
|
|
265
|
+
/**
|
|
266
|
+
* @export
|
|
267
|
+
*/
|
|
268
|
+
export declare const SearchTransactionsCurrencyEnum: {
|
|
269
|
+
readonly Usd: "USD";
|
|
270
|
+
readonly Cad: "CAD";
|
|
271
|
+
readonly Aud: "AUD";
|
|
272
|
+
};
|
|
273
|
+
export type SearchTransactionsCurrencyEnum = typeof SearchTransactionsCurrencyEnum[keyof typeof SearchTransactionsCurrencyEnum];
|
|
274
|
+
/**
|
|
275
|
+
* @export
|
|
276
|
+
*/
|
|
277
|
+
export declare const SearchTransactionsOrderEnum: {
|
|
278
|
+
readonly Asc: "asc";
|
|
279
|
+
readonly Desc: "desc";
|
|
280
|
+
};
|
|
281
|
+
export type SearchTransactionsOrderEnum = typeof SearchTransactionsOrderEnum[keyof typeof SearchTransactionsOrderEnum];
|