Skip to content
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.

Commit

Permalink
Remove deprecated recipients endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
PierrickP committed Oct 18, 2016
1 parent 2d642fc commit 2d7aa2a
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 98 deletions.
17 changes: 0 additions & 17 deletions lib/account.js
Expand Up @@ -70,14 +70,6 @@ const utils = require('./utils');
* @property {String} taxIDRequired
*/

/**
* @typedef recipients
*
* @property {String} iban
* @property {String} name
* @property {String} bic
*/

/**
* @typedef statuses
*
Expand Down Expand Up @@ -526,15 +518,6 @@ class Account {
return utils.callApi(this, 'getStatuses');
}

/**
* Get recipients
*
* @return {Promise<recipients[]>}
*/
recipients() {
return utils.callApi(this, 'getRecipients');
}

/**
* Get stats
*
Expand Down
11 changes: 0 additions & 11 deletions lib/api.js
Expand Up @@ -229,17 +229,6 @@ module.exports = {
.catch(errorHandler);
},

getRecipients(token) {
return request.get({
url: `${api}/api/transactions/recipients`,
json: true,
headers: {
Authorization: `Bearer ${token}`
}
})
.catch(errorHandler);
},

getStatement(token, options) {
return request.get({
url: `${api}/api/statements/${(options.pdf) ? '' : 'json/'}${options.id}`,
Expand Down
51 changes: 0 additions & 51 deletions tests/account/recipients.js

This file was deleted.

1 change: 0 additions & 1 deletion tests/index.js
Expand Up @@ -130,7 +130,6 @@ describe('account', () => {
require('./account/limits');
require('./account/me');
require('./account/memo');
require('./account/recipients');
require('./account/statement');
require('./account/statements');
require('./account/stats');
Expand Down
2 changes: 1 addition & 1 deletion tests/unmock/cards.js
Expand Up @@ -11,7 +11,7 @@ describe('Card', () => {
let limitOnline;

before(done => {
return global.n26.cards()
global.n26.cards()
.then(cards => {
card = cards.data[0];

Expand Down
17 changes: 0 additions & 17 deletions tests/unmock/index.js
Expand Up @@ -184,23 +184,6 @@ describe('Create instance', function () { // eslint-disable-line func-names
});
});

it('should get recipients', () => {
return global.n26.recipients()
.then(recipients => {
expect(recipients).to.be.an('array');

console.log(`\t${recipients.length} recipients`);

recipients.forEach(r => {
expect(r).to.have.property('iban');
expect(r).to.have.property('name');
expect(r).to.have.property('bic');

console.log(`\t- ${r.name} ${r.iban} ${r.bic}`);
});
});
});

it('should return statuses', () => {
return global.n26.statuses().then(statuses => {
statusesProperties.forEach(property => {
Expand Down

0 comments on commit 2d7aa2a

Please sign in to comment.