Skip to content

Commit

Permalink
Added paymentMethods resource and listAll method (#214)
Browse files Browse the repository at this point in the history
* Added paymentMethods resource and listAll method

* Resource case adjustment
  • Loading branch information
rhames07 authored Dec 23, 2021
1 parent b5a2314 commit 27bbc6d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/mercadopago.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -64,6 +65,7 @@ resources = {
utils: utilsModule,
configurations: configurations,
payment: paymentModule,
payment_methods: paymentMethodsModule,
preferences: preferencesModule,
preapproval: preapprovalModule,
merchant_orders: merchantOrdersModule,
Expand Down
14 changes: 14 additions & 0 deletions lib/resources/paymentMethods.js
Original file line number Diff line number Diff line change
@@ -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'
});

0 comments on commit 27bbc6d

Please sign in to comment.