UNPKG

ggez-banking-sdk

Version:

A Node.js package to handle GGEZ Banking API endpoints, Simplify the process of managing CRUD operations with this efficient and easy-to-use package.

35 lines (34 loc) 1.59 kB
import { fillCreateBlockchainTransactionData, fillCreateGatewayCryptoTransactionData, fillCreateSystemTransactionData, fillTransactionInquiryData, fillCreateBlockchainTransferTransactionData, } from "../data"; import { TransactionService } from "../service/transactionService"; import { BaseProxy } from "./baseProxy"; class TransactionProxy extends BaseProxy { transactionService; constructor(data) { super(data); this.transactionService = new TransactionService(data); } // #region "GET" inquiryTransaction = async (params) => { const transactionInquiry = fillTransactionInquiryData(params); return this.transactionService.inquiry(transactionInquiry); }; // #endregion // #region "POST" createSystemTransaction = async (data) => { const transactionData = fillCreateSystemTransactionData(data); return this.transactionService.create(transactionData); }; createBlockchainTransaction = async (data) => { const transactionData = fillCreateBlockchainTransactionData(data); return this.transactionService.create(transactionData); }; createBlockchainTransferTransaction = async (data) => { const transactionData = fillCreateBlockchainTransferTransactionData(data); return this.transactionService.create(transactionData); }; createGatewayCryptoTransaction = async (data) => { const transactionData = fillCreateGatewayCryptoTransactionData(data); return this.transactionService.create(transactionData); }; } export { TransactionProxy };