MDL-69166 core_payment: Add paymentarea to the payment subsystem
[moodle.git] / payment / amd / build / repository.min.js.map
CommitLineData
7d10f352 1{"version":3,"sources":["../src/repository.js"],"names":["getGatewaysSupportingCurrency","component","paymentArea","componentId","Ajax","call","methodname","args","paymentarea","componentid"],"mappings":"6KAwBA,uDAUO,GAAMA,CAAAA,CAA6B,CAAG,SAACC,CAAD,CAAYC,CAAZ,CAAyBC,CAAzB,CAAyC,CASlF,MAAOC,WAAKC,IAAL,CAAU,CARD,CACZC,UAAU,CAAE,wCADA,CAEZC,IAAI,CAAE,CACFN,SAAS,CAATA,CADE,CAEFO,WAAW,CAAEN,CAFX,CAGFO,WAAW,CAAEN,CAHX,CAFM,CAQC,CAAV,EAAqB,CAArB,CACV,CAVM,C","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Repository for payment subsystem.\n *\n * @module core_payment/repository\n * @package core_payment\n * @copyright 2020 Shamim Rezaie <shamim@moodle.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\nimport Ajax from 'core/ajax';\n\n/**\n * Returns the list of gateways that can process payments in the given currency.\n *\n * @param {string} component\n * @param {string} paymentArea\n * @param {number} componentId\n * @returns {Promise<{shortname: string, name: string, description: String}[]>}\n */\nexport const getGatewaysSupportingCurrency = (component, paymentArea, componentId) => {\n const request = {\n methodname: 'core_payment_get_gateways_for_currency',\n args: {\n component,\n paymentarea: paymentArea,\n componentid: componentId,\n }\n };\n return Ajax.call([request])[0];\n};\n"],"file":"repository.min.js"}