@longvansoftware/service-js-client 1.11.6 → 1.11.8
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.
@@ -1,3 +1,4 @@
|
|
1
1
|
export declare const PAYMENTS_BY_ORDERS: import("graphql").DocumentNode;
|
2
2
|
export declare const GET_TRANSFER_INFO: import("graphql").DocumentNode;
|
3
3
|
export declare const GET_PAYMENT_METHOD_TYPES: import("graphql").DocumentNode;
|
4
|
+
export declare const PAYMENT_METHODS: import("graphql").DocumentNode;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.GET_PAYMENT_METHOD_TYPES = exports.GET_TRANSFER_INFO = exports.PAYMENTS_BY_ORDERS = void 0;
|
3
|
+
exports.PAYMENT_METHODS = exports.GET_PAYMENT_METHOD_TYPES = exports.GET_TRANSFER_INFO = exports.PAYMENTS_BY_ORDERS = void 0;
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
5
5
|
exports.PAYMENTS_BY_ORDERS = (0, graphql_tag_1.gql) `
|
6
6
|
query PaymentsByOrders($orderIds: [String!]!) {
|
@@ -70,3 +70,14 @@ exports.GET_PAYMENT_METHOD_TYPES = (0, graphql_tag_1.gql) `
|
|
70
70
|
}
|
71
71
|
}
|
72
72
|
`;
|
73
|
+
exports.PAYMENT_METHODS = (0, graphql_tag_1.gql) `
|
74
|
+
query PaymentMethods($partnerCode: String!) {
|
75
|
+
paymentMethods(partnerCode: $partnerCode) {
|
76
|
+
id
|
77
|
+
code
|
78
|
+
name
|
79
|
+
description
|
80
|
+
image
|
81
|
+
}
|
82
|
+
}
|
83
|
+
`;
|
@@ -8,4 +8,5 @@ export declare class PaymentLVService extends Service {
|
|
8
8
|
cancelPayment(paymentId: string, reason: string, createBy: string): Promise<any>;
|
9
9
|
confirmPaidManual(paymentId: string, confirmBy: string): Promise<any>;
|
10
10
|
getPaymentMethodTypes(store: string): Promise<any>;
|
11
|
+
paymentMethods(): Promise<any>;
|
11
12
|
}
|
@@ -112,5 +112,21 @@ class PaymentLVService extends serviceSDK_1.Service {
|
|
112
112
|
}
|
113
113
|
});
|
114
114
|
}
|
115
|
+
paymentMethods() {
|
116
|
+
return __awaiter(this, void 0, void 0, function* () {
|
117
|
+
const query = queries_1.PAYMENT_METHODS;
|
118
|
+
const variables = {
|
119
|
+
partnerCode: this.orgId,
|
120
|
+
};
|
121
|
+
try {
|
122
|
+
const response = yield this.graphqlQueryCustomHeader(query, variables);
|
123
|
+
return response.paymentMethods;
|
124
|
+
}
|
125
|
+
catch (error) {
|
126
|
+
console.log(`Error fetching get paymentMethods method: ${error}`);
|
127
|
+
throw error;
|
128
|
+
}
|
129
|
+
});
|
130
|
+
}
|
115
131
|
}
|
116
132
|
exports.PaymentLVService = PaymentLVService;
|