btrz-api-client 5.13.0 → 5.16.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/lib/client-standalone-min.js +1 -1
- package/lib/client.js +2 -0
- package/lib/endpoints/accounts/network.js +31 -0
- package/lib/endpoints/btrzpay/cardpointe.js +89 -0
- package/lib/endpoints/operations/transactions.js +19 -6
- package/package.json +1 -1
- package/src/client.js +2 -0
- package/src/endpoints/accounts/network.js +21 -0
- package/src/endpoints/btrzpay/cardpointe.js +61 -0
- package/src/endpoints/operations/transactions.js +8 -0
- package/test/endpoints/accounts/network.test.js +33 -0
- package/test/endpoints/btrzpay/carpointe.tests.js +77 -0
- package/test/endpoints/operations/transactions.test.js +9 -0
- package/types/client.d.ts +52 -0
- package/types/endpoints/accounts/network.d.ts +14 -0
- package/types/endpoints/btrzpay/cardpointe.d.ts +39 -0
- package/types/endpoints/operations/transactions.d.ts +6 -0
- package/types/initializedClient.d.ts +52 -0
package/lib/client.js
CHANGED
|
@@ -169,6 +169,7 @@ function createAccounts(_ref4) {
|
|
|
169
169
|
exchangeRates: require("./endpoints/accounts/exchange-rates")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
|
|
170
170
|
interline: require("./endpoints/accounts/interline")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
|
|
171
171
|
lexicons: require("./endpoints/accounts/lexicons")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
|
|
172
|
+
network: require("./endpoints/accounts/network")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
|
|
172
173
|
printers: require("./endpoints/accounts/printers")({
|
|
173
174
|
client: client, internalAuthTokenProvider: internalAuthTokenProvider
|
|
174
175
|
}),
|
|
@@ -388,6 +389,7 @@ function createBtrzPay(_ref13) {
|
|
|
388
389
|
|
|
389
390
|
return {
|
|
390
391
|
docs: require("./endpoints/btrzpay/docs.js")({ client: client }),
|
|
392
|
+
cardpointeTerminals: require("./endpoints/btrzpay/cardpointe.js").cardpointeTerminalsFactory({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
|
|
391
393
|
paymentMethods: require("./endpoints/btrzpay/payment-methods.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
|
|
392
394
|
referenceNumbers: require("./endpoints/btrzpay/reference-numbers.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
|
|
393
395
|
payments: require("./endpoints/btrzpay/payments.js")({ client: client, internalAuthTokenProvider: internalAuthTokenProvider }),
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _require = require("../endpoints_helpers.js"),
|
|
4
|
+
authorizationHeaders = _require.authorizationHeaders;
|
|
5
|
+
|
|
6
|
+
function networkFactory(_ref) {
|
|
7
|
+
var client = _ref.client,
|
|
8
|
+
internalAuthTokenProvider = _ref.internalAuthTokenProvider;
|
|
9
|
+
|
|
10
|
+
var agencies = {
|
|
11
|
+
all: function all(_ref2) {
|
|
12
|
+
var token = _ref2.token,
|
|
13
|
+
jwtToken = _ref2.jwtToken,
|
|
14
|
+
_ref2$query = _ref2.query,
|
|
15
|
+
query = _ref2$query === undefined ? {} : _ref2$query,
|
|
16
|
+
headers = _ref2.headers;
|
|
17
|
+
|
|
18
|
+
return client({
|
|
19
|
+
url: "/network/agencies",
|
|
20
|
+
params: query,
|
|
21
|
+
headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
return {
|
|
27
|
+
agencies: agencies
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
module.exports = networkFactory;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _require = require("../endpoints_helpers"),
|
|
4
|
+
authorizationHeaders = _require.authorizationHeaders;
|
|
5
|
+
|
|
6
|
+
function cardpointeTerminalsFactory(_ref) {
|
|
7
|
+
var client = _ref.client,
|
|
8
|
+
internalAuthTokenProvider = _ref.internalAuthTokenProvider;
|
|
9
|
+
|
|
10
|
+
function all(_ref2) {
|
|
11
|
+
var token = _ref2.token,
|
|
12
|
+
jwtToken = _ref2.jwtToken,
|
|
13
|
+
headers = _ref2.headers;
|
|
14
|
+
|
|
15
|
+
return client.get("/cardpointe-terminals", {
|
|
16
|
+
params: {},
|
|
17
|
+
headers: authorizationHeaders({
|
|
18
|
+
token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers
|
|
19
|
+
})
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function remove(_ref3) {
|
|
24
|
+
var token = _ref3.token,
|
|
25
|
+
jwtToken = _ref3.jwtToken,
|
|
26
|
+
merchantId = _ref3.merchantId,
|
|
27
|
+
terminalId = _ref3.terminalId,
|
|
28
|
+
headers = _ref3.headers;
|
|
29
|
+
|
|
30
|
+
return client({
|
|
31
|
+
url: "/cardpointe-terminals/" + merchantId + "/" + terminalId,
|
|
32
|
+
method: "delete",
|
|
33
|
+
headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
var readCard = {
|
|
38
|
+
get: function get(_ref4) {
|
|
39
|
+
var token = _ref4.token,
|
|
40
|
+
jwtToken = _ref4.jwtToken,
|
|
41
|
+
readCardResultId = _ref4.readCardResultId,
|
|
42
|
+
headers = _ref4.headers;
|
|
43
|
+
|
|
44
|
+
return client.get("/cardpointe-terminals/read-card/" + readCardResultId, {
|
|
45
|
+
params: {},
|
|
46
|
+
headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
|
|
47
|
+
});
|
|
48
|
+
},
|
|
49
|
+
create: function create(_ref5) {
|
|
50
|
+
var token = _ref5.token,
|
|
51
|
+
jwtToken = _ref5.jwtToken,
|
|
52
|
+
readCard = _ref5.readCard,
|
|
53
|
+
headers = _ref5.headers;
|
|
54
|
+
|
|
55
|
+
return client({
|
|
56
|
+
url: "/cardpointe-terminals/read-card",
|
|
57
|
+
method: "post",
|
|
58
|
+
headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers }),
|
|
59
|
+
data: { readCard: readCard }
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
var ping = {
|
|
65
|
+
create: function create(_ref6) {
|
|
66
|
+
var token = _ref6.token,
|
|
67
|
+
jwtToken = _ref6.jwtToken,
|
|
68
|
+
ping = _ref6.ping,
|
|
69
|
+
headers = _ref6.headers;
|
|
70
|
+
|
|
71
|
+
return client({
|
|
72
|
+
url: "/cardpointe-terminals/ping",
|
|
73
|
+
method: "post",
|
|
74
|
+
headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers }),
|
|
75
|
+
data: { ping: ping }
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
return {
|
|
81
|
+
all: all,
|
|
82
|
+
remove: remove,
|
|
83
|
+
readCard: readCard,
|
|
84
|
+
ping: ping
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
module.exports = {
|
|
88
|
+
cardpointeTerminalsFactory: cardpointeTerminalsFactory
|
|
89
|
+
};
|
|
@@ -97,13 +97,25 @@ function transactionsFactory(_ref) {
|
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
function cancellableItems(_ref8) {
|
|
101
|
+
var token = _ref8.token,
|
|
102
|
+
jwtToken = _ref8.jwtToken,
|
|
103
|
+
transactionId = _ref8.transactionId,
|
|
104
|
+
headers = _ref8.headers;
|
|
105
|
+
|
|
106
|
+
return client({
|
|
107
|
+
url: "/transactions/" + transactionId + "/cancellable-items",
|
|
108
|
+
headers: authorizationHeaders({ token: token, jwtToken: jwtToken, internalAuthTokenProvider: internalAuthTokenProvider, headers: headers })
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
|
|
100
112
|
var payments = {
|
|
101
|
-
update: function update(
|
|
102
|
-
var token =
|
|
103
|
-
jwtToken =
|
|
104
|
-
trxId =
|
|
105
|
-
paymentResult =
|
|
106
|
-
headers =
|
|
113
|
+
update: function update(_ref9) {
|
|
114
|
+
var token = _ref9.token,
|
|
115
|
+
jwtToken = _ref9.jwtToken,
|
|
116
|
+
trxId = _ref9.trxId,
|
|
117
|
+
paymentResult = _ref9.paymentResult,
|
|
118
|
+
headers = _ref9.headers;
|
|
107
119
|
|
|
108
120
|
return client({
|
|
109
121
|
url: "/transactions/" + trxId + "/payments",
|
|
@@ -125,6 +137,7 @@ function transactionsFactory(_ref) {
|
|
|
125
137
|
appliedInsurance: appliedInsurance,
|
|
126
138
|
companionTickets: companionTickets,
|
|
127
139
|
expireAll: expireAll,
|
|
140
|
+
cancellableItems: cancellableItems,
|
|
128
141
|
payments: payments
|
|
129
142
|
};
|
|
130
143
|
}
|
package/package.json
CHANGED
package/src/client.js
CHANGED
|
@@ -135,6 +135,7 @@ function createAccounts({baseURL, headers, timeout, overrideFn, internalAuthToke
|
|
|
135
135
|
exchangeRates: require("./endpoints/accounts/exchange-rates")({client, internalAuthTokenProvider}),
|
|
136
136
|
interline: require("./endpoints/accounts/interline")({client, internalAuthTokenProvider}),
|
|
137
137
|
lexicons: require("./endpoints/accounts/lexicons")({client, internalAuthTokenProvider}),
|
|
138
|
+
network: require("./endpoints/accounts/network")({ client, internalAuthTokenProvider }),
|
|
138
139
|
printers: require("./endpoints/accounts/printers")({
|
|
139
140
|
client, internalAuthTokenProvider
|
|
140
141
|
}),
|
|
@@ -291,6 +292,7 @@ function createBtrzPay({baseURL, headers, timeout, overrideFn, internalAuthToken
|
|
|
291
292
|
|
|
292
293
|
return {
|
|
293
294
|
docs: require("./endpoints/btrzpay/docs.js")({client}),
|
|
295
|
+
cardpointeTerminals: require("./endpoints/btrzpay/cardpointe.js").cardpointeTerminalsFactory({client, internalAuthTokenProvider}),
|
|
294
296
|
paymentMethods: require("./endpoints/btrzpay/payment-methods.js")({client, internalAuthTokenProvider}),
|
|
295
297
|
referenceNumbers: require("./endpoints/btrzpay/reference-numbers.js")({client, internalAuthTokenProvider}),
|
|
296
298
|
payments: require("./endpoints/btrzpay/payments.js")({client, internalAuthTokenProvider}),
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const {
|
|
2
|
+
authorizationHeaders
|
|
3
|
+
} = require("../endpoints_helpers.js");
|
|
4
|
+
|
|
5
|
+
function networkFactory({client, internalAuthTokenProvider}) {
|
|
6
|
+
const agencies = {
|
|
7
|
+
all({token, jwtToken, query = {}, headers}) {
|
|
8
|
+
return client({
|
|
9
|
+
url: "/network/agencies",
|
|
10
|
+
params: query,
|
|
11
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
return {
|
|
17
|
+
agencies
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
module.exports = networkFactory;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
const {
|
|
2
|
+
authorizationHeaders
|
|
3
|
+
} = require("../endpoints_helpers");
|
|
4
|
+
|
|
5
|
+
function cardpointeTerminalsFactory({client, internalAuthTokenProvider}) {
|
|
6
|
+
function all({token, jwtToken, headers}) {
|
|
7
|
+
return client.get("/cardpointe-terminals", {
|
|
8
|
+
params: {},
|
|
9
|
+
headers: authorizationHeaders({
|
|
10
|
+
token, jwtToken, internalAuthTokenProvider, headers
|
|
11
|
+
})
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function remove({token, jwtToken, merchantId, terminalId, headers}) {
|
|
16
|
+
return client({
|
|
17
|
+
url: `/cardpointe-terminals/${merchantId}/${terminalId}`,
|
|
18
|
+
method: "delete",
|
|
19
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const readCard = {
|
|
24
|
+
get({token, jwtToken, readCardResultId, headers}) {
|
|
25
|
+
return client.get(`/cardpointe-terminals/read-card/${readCardResultId}`, {
|
|
26
|
+
params: {},
|
|
27
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
create({token, jwtToken, readCard, headers}) {
|
|
31
|
+
return client({
|
|
32
|
+
url: "/cardpointe-terminals/read-card",
|
|
33
|
+
method: "post",
|
|
34
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
35
|
+
data: {readCard}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const ping = {
|
|
41
|
+
create({token, jwtToken, ping, headers}) {
|
|
42
|
+
return client({
|
|
43
|
+
url: "/cardpointe-terminals/ping",
|
|
44
|
+
method: "post",
|
|
45
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers}),
|
|
46
|
+
data: {ping}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
return {
|
|
53
|
+
all,
|
|
54
|
+
remove,
|
|
55
|
+
readCard,
|
|
56
|
+
ping
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
module.exports = {
|
|
60
|
+
cardpointeTerminalsFactory
|
|
61
|
+
};
|
|
@@ -57,6 +57,13 @@ function transactionsFactory({client, internalAuthTokenProvider}) {
|
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
function cancellableItems({token, jwtToken, transactionId, headers}) {
|
|
61
|
+
return client({
|
|
62
|
+
url: `/transactions/${transactionId}/cancellable-items`,
|
|
63
|
+
headers: authorizationHeaders({token, jwtToken, internalAuthTokenProvider, headers})
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
60
67
|
const payments = {
|
|
61
68
|
update({token, jwtToken, trxId, paymentResult, headers}) {
|
|
62
69
|
return client({
|
|
@@ -79,6 +86,7 @@ function transactionsFactory({client, internalAuthTokenProvider}) {
|
|
|
79
86
|
appliedInsurance,
|
|
80
87
|
companionTickets,
|
|
81
88
|
expireAll,
|
|
89
|
+
cancellableItems,
|
|
82
90
|
payments
|
|
83
91
|
};
|
|
84
92
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const {
|
|
2
|
+
expect
|
|
3
|
+
} = require("chai");
|
|
4
|
+
const {
|
|
5
|
+
axiosMock,
|
|
6
|
+
expectRequest
|
|
7
|
+
} = require("./../../test-helpers.js");
|
|
8
|
+
const api = require("./../../../src/client.js").createApiClient({baseURL: "http://test.com"});
|
|
9
|
+
|
|
10
|
+
describe("accounts/interline", () => {
|
|
11
|
+
const token = "I owe you a token";
|
|
12
|
+
const jwtToken = "I owe you a JWT token";
|
|
13
|
+
|
|
14
|
+
afterEach(() => {
|
|
15
|
+
axiosMock.reset();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it("should GET a list of agencies", () => {
|
|
19
|
+
axiosMock.onGet("/network/agencies").reply(expectRequest({
|
|
20
|
+
statusCode: 200,
|
|
21
|
+
token,
|
|
22
|
+
jwtToken
|
|
23
|
+
}));
|
|
24
|
+
return api.accounts.network.agencies.all({
|
|
25
|
+
token,
|
|
26
|
+
jwtToken
|
|
27
|
+
}).then((httpResponse) => {
|
|
28
|
+
expect(httpResponse.status).eql(200);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
});
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
const {
|
|
2
|
+
axiosMock, expectRequest
|
|
3
|
+
} = require("../../test-helpers");
|
|
4
|
+
const api = require("../../../src/client").createApiClient({
|
|
5
|
+
baseURL: "http://test.com"
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
describe("btrzpay/cardpointe-terminals", () => {
|
|
9
|
+
const token = "token";
|
|
10
|
+
const jwtToken = "I owe you a JWT token";
|
|
11
|
+
|
|
12
|
+
afterEach(() => {
|
|
13
|
+
axiosMock.reset();
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it("should get the carpointe terminals", () => {
|
|
17
|
+
axiosMock.onGet("/cardpointe-terminals").reply(expectRequest({
|
|
18
|
+
statusCode: 200, token, jwtToken
|
|
19
|
+
}));
|
|
20
|
+
return api.btrzpay.cardpointeTerminals.all({
|
|
21
|
+
token,
|
|
22
|
+
jwtToken
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it("should readCard statud", () => {
|
|
27
|
+
axiosMock.onGet("/cardpointe-terminals/read-card/1").reply(expectRequest({
|
|
28
|
+
statusCode: 200, token, jwtToken
|
|
29
|
+
}));
|
|
30
|
+
return api.btrzpay.cardpointeTerminals.readCard.get({
|
|
31
|
+
token,
|
|
32
|
+
jwtToken,
|
|
33
|
+
readCardResultId: 1
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it("should start the readCard process", () => {
|
|
38
|
+
axiosMock.onPost("/cardpointe-terminals/read-card").reply(expectRequest({
|
|
39
|
+
statusCode: 200, token, jwtToken
|
|
40
|
+
}));
|
|
41
|
+
return api.btrzpay.cardpointeTerminals.readCard.create({
|
|
42
|
+
token,
|
|
43
|
+
jwtToken,
|
|
44
|
+
readCard: {
|
|
45
|
+
terminalId: "1",
|
|
46
|
+
merchantId: "2",
|
|
47
|
+
amount: "12.45"
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
it("should call DELETE to reset a connection", () => {
|
|
53
|
+
axiosMock.onDelete("/cardpointe-terminals/1/2").reply(expectRequest({
|
|
54
|
+
statusCode: 200, token, jwtToken
|
|
55
|
+
}));
|
|
56
|
+
return api.btrzpay.cardpointeTerminals.remove({
|
|
57
|
+
token,
|
|
58
|
+
jwtToken,
|
|
59
|
+
merchantId: 1,
|
|
60
|
+
terminalId: 2
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it("should ping a terminal", () => {
|
|
65
|
+
axiosMock.onPost("/cardpointe-terminals/ping").reply(expectRequest({
|
|
66
|
+
statusCode: 200, token, jwtToken
|
|
67
|
+
}));
|
|
68
|
+
return api.btrzpay.cardpointeTerminals.ping.create({
|
|
69
|
+
token,
|
|
70
|
+
jwtToken,
|
|
71
|
+
ping: {
|
|
72
|
+
merchantId: 1,
|
|
73
|
+
terminalId: 2
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
});
|
|
@@ -87,6 +87,15 @@ describe("operations/transactions", function () {
|
|
|
87
87
|
});
|
|
88
88
|
});
|
|
89
89
|
|
|
90
|
+
it("should return an object with arrays of cancellable items on a given transaction", function () {
|
|
91
|
+
const transactionId = "transactionId2";
|
|
92
|
+
axiosMock.onGet(`/transactions/${transactionId}/cancellable-items`).reply(expectRequest({statusCode: 200, token, jwtToken}));
|
|
93
|
+
return api.operations.transactions.cancellableItems({jwtToken, token, transactionId})
|
|
94
|
+
.then((response) => {
|
|
95
|
+
expect(response.status).to.equals(200);
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
|
|
90
99
|
|
|
91
100
|
it("should update transaction payments", function () {
|
|
92
101
|
const transactionId = "transactionId2";
|
package/types/client.d.ts
CHANGED
|
@@ -1303,6 +1303,16 @@ export function createApiClient(options: {
|
|
|
1303
1303
|
headers: any;
|
|
1304
1304
|
}) => any;
|
|
1305
1305
|
};
|
|
1306
|
+
network: {
|
|
1307
|
+
agencies: {
|
|
1308
|
+
all({ token, jwtToken, query, headers }: {
|
|
1309
|
+
token: any;
|
|
1310
|
+
jwtToken: any;
|
|
1311
|
+
query?: {};
|
|
1312
|
+
headers: any;
|
|
1313
|
+
}): any;
|
|
1314
|
+
};
|
|
1315
|
+
};
|
|
1306
1316
|
printers: {
|
|
1307
1317
|
all: ({ token, query, headers }: {
|
|
1308
1318
|
token: any;
|
|
@@ -1679,6 +1689,12 @@ export function createApiClient(options: {
|
|
|
1679
1689
|
token: any;
|
|
1680
1690
|
headers: any;
|
|
1681
1691
|
}) => any;
|
|
1692
|
+
cancellableItems: ({ token, jwtToken, transactionId, headers }: {
|
|
1693
|
+
token: any;
|
|
1694
|
+
jwtToken: any;
|
|
1695
|
+
transactionId: any;
|
|
1696
|
+
headers: any;
|
|
1697
|
+
}) => any;
|
|
1682
1698
|
payments: {
|
|
1683
1699
|
update({ token, jwtToken, trxId, paymentResult, headers }: {
|
|
1684
1700
|
token: any;
|
|
@@ -2294,6 +2310,42 @@ export function createApiClient(options: {
|
|
|
2294
2310
|
docs: {
|
|
2295
2311
|
get: () => any;
|
|
2296
2312
|
};
|
|
2313
|
+
cardpointeTerminals: {
|
|
2314
|
+
all: ({ token, jwtToken, headers }: {
|
|
2315
|
+
token: any;
|
|
2316
|
+
jwtToken: any;
|
|
2317
|
+
headers: any;
|
|
2318
|
+
}) => any;
|
|
2319
|
+
remove: ({ token, jwtToken, merchantId, terminalId, headers }: {
|
|
2320
|
+
token: any;
|
|
2321
|
+
jwtToken: any;
|
|
2322
|
+
merchantId: any;
|
|
2323
|
+
terminalId: any;
|
|
2324
|
+
headers: any;
|
|
2325
|
+
}) => any;
|
|
2326
|
+
readCard: {
|
|
2327
|
+
get({ token, jwtToken, readCardResultId, headers }: {
|
|
2328
|
+
token: any;
|
|
2329
|
+
jwtToken: any;
|
|
2330
|
+
readCardResultId: any;
|
|
2331
|
+
headers: any;
|
|
2332
|
+
}): any;
|
|
2333
|
+
create({ token, jwtToken, readCard, headers }: {
|
|
2334
|
+
token: any;
|
|
2335
|
+
jwtToken: any;
|
|
2336
|
+
readCard: any;
|
|
2337
|
+
headers: any;
|
|
2338
|
+
}): any;
|
|
2339
|
+
};
|
|
2340
|
+
ping: {
|
|
2341
|
+
create({ token, jwtToken, ping, headers }: {
|
|
2342
|
+
token: any;
|
|
2343
|
+
jwtToken: any;
|
|
2344
|
+
ping: any;
|
|
2345
|
+
headers: any;
|
|
2346
|
+
}): any;
|
|
2347
|
+
};
|
|
2348
|
+
};
|
|
2297
2349
|
paymentMethods: {
|
|
2298
2350
|
all: ({ token, jwtToken, query, headers }: {
|
|
2299
2351
|
token: any;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export = networkFactory;
|
|
2
|
+
declare function networkFactory({ client, internalAuthTokenProvider }: {
|
|
3
|
+
client: any;
|
|
4
|
+
internalAuthTokenProvider: any;
|
|
5
|
+
}): {
|
|
6
|
+
agencies: {
|
|
7
|
+
all({ token, jwtToken, query, headers }: {
|
|
8
|
+
token: any;
|
|
9
|
+
jwtToken: any;
|
|
10
|
+
query?: {};
|
|
11
|
+
headers: any;
|
|
12
|
+
}): any;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export function cardpointeTerminalsFactory({ client, internalAuthTokenProvider }: {
|
|
2
|
+
client: any;
|
|
3
|
+
internalAuthTokenProvider: any;
|
|
4
|
+
}): {
|
|
5
|
+
all: ({ token, jwtToken, headers }: {
|
|
6
|
+
token: any;
|
|
7
|
+
jwtToken: any;
|
|
8
|
+
headers: any;
|
|
9
|
+
}) => any;
|
|
10
|
+
remove: ({ token, jwtToken, merchantId, terminalId, headers }: {
|
|
11
|
+
token: any;
|
|
12
|
+
jwtToken: any;
|
|
13
|
+
merchantId: any;
|
|
14
|
+
terminalId: any;
|
|
15
|
+
headers: any;
|
|
16
|
+
}) => any;
|
|
17
|
+
readCard: {
|
|
18
|
+
get({ token, jwtToken, readCardResultId, headers }: {
|
|
19
|
+
token: any;
|
|
20
|
+
jwtToken: any;
|
|
21
|
+
readCardResultId: any;
|
|
22
|
+
headers: any;
|
|
23
|
+
}): any;
|
|
24
|
+
create({ token, jwtToken, readCard, headers }: {
|
|
25
|
+
token: any;
|
|
26
|
+
jwtToken: any;
|
|
27
|
+
readCard: any;
|
|
28
|
+
headers: any;
|
|
29
|
+
}): any;
|
|
30
|
+
};
|
|
31
|
+
ping: {
|
|
32
|
+
create({ token, jwtToken, ping, headers }: {
|
|
33
|
+
token: any;
|
|
34
|
+
jwtToken: any;
|
|
35
|
+
ping: any;
|
|
36
|
+
headers: any;
|
|
37
|
+
}): any;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
@@ -43,6 +43,12 @@ declare function transactionsFactory({ client, internalAuthTokenProvider }: {
|
|
|
43
43
|
token: any;
|
|
44
44
|
headers: any;
|
|
45
45
|
}) => any;
|
|
46
|
+
cancellableItems: ({ token, jwtToken, transactionId, headers }: {
|
|
47
|
+
token: any;
|
|
48
|
+
jwtToken: any;
|
|
49
|
+
transactionId: any;
|
|
50
|
+
headers: any;
|
|
51
|
+
}) => any;
|
|
46
52
|
payments: {
|
|
47
53
|
update({ token, jwtToken, trxId, paymentResult, headers }: {
|
|
48
54
|
token: any;
|
|
@@ -1257,6 +1257,16 @@ declare const _exports: {
|
|
|
1257
1257
|
headers: any;
|
|
1258
1258
|
}) => any;
|
|
1259
1259
|
};
|
|
1260
|
+
network: {
|
|
1261
|
+
agencies: {
|
|
1262
|
+
all({ token, jwtToken, query, headers }: {
|
|
1263
|
+
token: any;
|
|
1264
|
+
jwtToken: any;
|
|
1265
|
+
query?: {};
|
|
1266
|
+
headers: any;
|
|
1267
|
+
}): any;
|
|
1268
|
+
};
|
|
1269
|
+
};
|
|
1260
1270
|
printers: {
|
|
1261
1271
|
all: ({ token, query, headers }: {
|
|
1262
1272
|
token: any;
|
|
@@ -1633,6 +1643,12 @@ declare const _exports: {
|
|
|
1633
1643
|
token: any;
|
|
1634
1644
|
headers: any;
|
|
1635
1645
|
}) => any;
|
|
1646
|
+
cancellableItems: ({ token, jwtToken, transactionId, headers }: {
|
|
1647
|
+
token: any;
|
|
1648
|
+
jwtToken: any;
|
|
1649
|
+
transactionId: any;
|
|
1650
|
+
headers: any;
|
|
1651
|
+
}) => any;
|
|
1636
1652
|
payments: {
|
|
1637
1653
|
update({ token, jwtToken, trxId, paymentResult, headers }: {
|
|
1638
1654
|
token: any;
|
|
@@ -2248,6 +2264,42 @@ declare const _exports: {
|
|
|
2248
2264
|
docs: {
|
|
2249
2265
|
get: () => any;
|
|
2250
2266
|
};
|
|
2267
|
+
cardpointeTerminals: {
|
|
2268
|
+
all: ({ token, jwtToken, headers }: {
|
|
2269
|
+
token: any;
|
|
2270
|
+
jwtToken: any;
|
|
2271
|
+
headers: any;
|
|
2272
|
+
}) => any;
|
|
2273
|
+
remove: ({ token, jwtToken, merchantId, terminalId, headers }: {
|
|
2274
|
+
token: any;
|
|
2275
|
+
jwtToken: any;
|
|
2276
|
+
merchantId: any;
|
|
2277
|
+
terminalId: any;
|
|
2278
|
+
headers: any;
|
|
2279
|
+
}) => any;
|
|
2280
|
+
readCard: {
|
|
2281
|
+
get({ token, jwtToken, readCardResultId, headers }: {
|
|
2282
|
+
token: any;
|
|
2283
|
+
jwtToken: any;
|
|
2284
|
+
readCardResultId: any;
|
|
2285
|
+
headers: any;
|
|
2286
|
+
}): any;
|
|
2287
|
+
create({ token, jwtToken, readCard, headers }: {
|
|
2288
|
+
token: any;
|
|
2289
|
+
jwtToken: any;
|
|
2290
|
+
readCard: any;
|
|
2291
|
+
headers: any;
|
|
2292
|
+
}): any;
|
|
2293
|
+
};
|
|
2294
|
+
ping: {
|
|
2295
|
+
create({ token, jwtToken, ping, headers }: {
|
|
2296
|
+
token: any;
|
|
2297
|
+
jwtToken: any;
|
|
2298
|
+
ping: any;
|
|
2299
|
+
headers: any;
|
|
2300
|
+
}): any;
|
|
2301
|
+
};
|
|
2302
|
+
};
|
|
2251
2303
|
paymentMethods: {
|
|
2252
2304
|
all: ({ token, jwtToken, query, headers }: {
|
|
2253
2305
|
token: any;
|