diff --git a/lib/mercadopago.js b/lib/mercadopago.js index 5af1bb84..e4e6715d 100644 --- a/lib/mercadopago.js +++ b/lib/mercadopago.js @@ -2,6 +2,7 @@ var configurations = require('./configurations'); var backwardSupport = require('./mercadopago-support')(); var utilsModule = require('./utils'); var paymentModule = require('./resources/payment'); +var paymentMethodsModule = require('./resources/paymentMethods'); var preferencesModule = require('./resources/preferences'); var preapprovalModule = require('./resources/preapproval'); var merchantOrdersModule = require('./resources/merchantOrders'); @@ -64,6 +65,7 @@ resources = { utils: utilsModule, configurations: configurations, payment: paymentModule, + payment_methods: paymentMethodsModule, preferences: preferencesModule, preapproval: preapprovalModule, merchant_orders: merchantOrdersModule, diff --git a/lib/resources/paymentMethods.js b/lib/resources/paymentMethods.js new file mode 100644 index 00000000..e8cd2b33 --- /dev/null +++ b/lib/resources/paymentMethods.js @@ -0,0 +1,14 @@ +var requestManager = require('../request-manager'); + +var paymentMethods = module.exports = {} + +/** + * Get payment methods + * [Click here for more infos]{@link https://www.mercadopago.com.br/developers/en/reference/payment_methods/_payment_methods/get/} + * @function listAll + * @memberof paymentMethods + */ +paymentMethods.listAll = requestManager.describe({ + path: '/v1/payment_methods', + method: 'GET' +}); \ No newline at end of file