liqpay-nestjs 0.3.17 → 0.3.18
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.
|
@@ -3,5 +3,11 @@ import { UtilsClient } from './utils.client';
|
|
|
3
3
|
export declare class RefundsClient {
|
|
4
4
|
private readonly utils;
|
|
5
5
|
constructor(utils: UtilsClient);
|
|
6
|
-
refund(payload: RefundInput):
|
|
6
|
+
refund(payload: RefundInput): Promise<import("../..").Result<Partial<{
|
|
7
|
+
waitAmount: boolean | undefined;
|
|
8
|
+
paymentId: string | undefined;
|
|
9
|
+
result?: "error" | "ok" | undefined;
|
|
10
|
+
action?: "pay" | "hold" | "subscribe" | "paydonate" | undefined;
|
|
11
|
+
status?: "error" | "failure" | "reversed" | "success" | undefined;
|
|
12
|
+
}>>>;
|
|
7
13
|
}
|
|
@@ -7,14 +7,14 @@ class RefundsClient {
|
|
|
7
7
|
constructor(utils) {
|
|
8
8
|
this.utils = utils;
|
|
9
9
|
}
|
|
10
|
-
refund(payload) {
|
|
10
|
+
async refund(payload) {
|
|
11
11
|
const request = {
|
|
12
12
|
...payload,
|
|
13
13
|
version: 7,
|
|
14
14
|
publicKey: this.utils.publicKey,
|
|
15
15
|
action: 'refund',
|
|
16
16
|
};
|
|
17
|
-
this.utils.call(request, refund_1.RawRefundRequestSchema, refund_1.RefundResponseSchema);
|
|
17
|
+
return await this.utils.call(request, refund_1.RawRefundRequestSchema, refund_1.RefundResponseSchema);
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
exports.RefundsClient = RefundsClient;
|
|
@@ -3,5 +3,11 @@ import { RefundInput } from '../../core/types/refund';
|
|
|
3
3
|
export declare class RefundsService {
|
|
4
4
|
private readonly client;
|
|
5
5
|
constructor(client: LiqPayClient);
|
|
6
|
-
refund(payload: RefundInput): Promise<
|
|
6
|
+
refund(payload: RefundInput): Promise<import("../..").Result<Partial<{
|
|
7
|
+
waitAmount: boolean | undefined;
|
|
8
|
+
paymentId: string | undefined;
|
|
9
|
+
result?: "error" | "ok" | undefined;
|
|
10
|
+
action?: "pay" | "hold" | "subscribe" | "paydonate" | undefined;
|
|
11
|
+
status?: "error" | "failure" | "reversed" | "success" | undefined;
|
|
12
|
+
}>>>;
|
|
7
13
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "liqpay-nestjs",
|
|
3
3
|
"description": "LiqPay integration module for NestJS with support for payments, callbacks, and configuration via DI.",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.18",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"main": "dist/index.js",
|