UNPKG

mangopay4-nodejs-sdk

Version:

Mangopay Node.js SDK

34 lines (27 loc) • 1.07 kB
/** * @module Repudiations * @desc [MangoPay Repudiations API Reference](https://docs.mangopay.com/endpoints/v2.01/repudiations) */ const Service = require('../service'); const Refund = require('../models/Refund'); const Repudiations = Service.extend({ /** * Gets list of Refunds of a Repudiation * @param {number} repudiationId Repudiation identifier * @param {function} callback Callback function * @param {Object} options Request options * @return {Object} Request promise */ getRefunds: function(repudiationId, callback, options) { if (options && !options.hasOwnProperty('parameters')) Object.assign(options, {parameters: {...options}}); options = this._api._getOptions(callback, options, { path: { id: repudiationId }, dataClass: Refund }); return this._api.method("refunds_get_for_repudiation", callback, options); } }); module.exports = Repudiations;