-
Notifications
You must be signed in to change notification settings - Fork 41
/
Repudiations.js
33 lines (27 loc) · 1.04 KB
/
Repudiations.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/**
* @module Repudiations
* @desc [MangoPay Repudiations API Reference](https://docs.mangopay.com/endpoints/v2.01/repudiations)
*/
var Service = require('../service');
var Refund = require('../models/Refund');
var 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;