mangopay4-nodejs-sdk 1.68.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/README.md +0 -6
- package/docs/templates/class.mustache +0 -0
- package/docs/templates/file.mustache +0 -0
- package/docs/templates/function.mustache +0 -0
- package/docs/templates/index.mustache +0 -0
- package/docs/templates/overview.mustache +0 -0
- package/lib/models/CardPreAuthorization.js +2 -2
- package/package.json +16 -24
- package/.github/workflows/node.js.yml +0 -32
- package/.github/workflows/npm-publish.yml +0 -26
- package/.jshintrc +0 -16
- package/test/TestKycPageFile.png +0 -0
- package/test/helpers.js +0 -1537
- package/test/main.js +0 -10
- package/test/mocha.opts +0 -3
- package/test/services/Acquiring.js +0 -338
- package/test/services/BankAccounts.js +0 -46
- package/test/services/BankingAliases.js +0 -89
- package/test/services/CardPreAuthorizations.js +0 -70
- package/test/services/CardRegistrations.js +0 -239
- package/test/services/Cards.js +0 -56
- package/test/services/Clients.js +0 -235
- package/test/services/Conversions.js +0 -319
- package/test/services/Deposits.js +0 -148
- package/test/services/Disputes.js +0 -542
- package/test/services/EMoney.js +0 -54
- package/test/services/Events.js +0 -147
- package/test/services/Hooks.js +0 -109
- package/test/services/Idempotency.js +0 -41
- package/test/services/IdentityVerifications.js +0 -68
- package/test/services/KycDocuments.js +0 -73
- package/test/services/Mandates.js +0 -256
- package/test/services/PayIns.js +0 -2632
- package/test/services/PayOuts.js +0 -119
- package/test/services/RateLimit.js +0 -43
- package/test/services/Recipients.js +0 -234
- package/test/services/Refunds.js +0 -123
- package/test/services/Regulatory.js +0 -45
- package/test/services/Reports.js +0 -114
- package/test/services/ReportsV2.js +0 -306
- package/test/services/Repudiations.js +0 -22
- package/test/services/Settlements.js +0 -127
- package/test/services/Tokens.js +0 -55
- package/test/services/Transfers.js +0 -137
- package/test/services/UboDeclarations.js +0 -130
- package/test/services/Users.js +0 -1322
- package/test/services/VirtualAccounts.js +0 -105
- package/test/services/Wallets.js +0 -132
- package/test/settlement_sample.csv +0 -8
- package/test/settlement_sample_bad.csv +0 -8
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
var expect = require('chai').expect;
|
|
2
|
-
var helpers = require('../helpers');
|
|
3
|
-
|
|
4
|
-
var UboDeclaration = require('../../lib/models/UboDeclaration');
|
|
5
|
-
var Ubo = require('../../lib/models/Ubo');
|
|
6
|
-
var UboDeclarationStatus = require('../../lib/models/UboDeclarationStatus');
|
|
7
|
-
var UserNatural = require('../../lib/models/UserNatural');
|
|
8
|
-
var UserLegal = require('../../lib/models/UserLegal');
|
|
9
|
-
var api = require('../main');
|
|
10
|
-
|
|
11
|
-
describe('UBO Declarations', function () {
|
|
12
|
-
var user = new UserLegal(helpers.data.getUserLegal());
|
|
13
|
-
var uboDeclaration;
|
|
14
|
-
var ubo = new Ubo(helpers.data.getUbo());
|
|
15
|
-
|
|
16
|
-
before(function (done) {
|
|
17
|
-
api.Users.create(user, function (data, response) {
|
|
18
|
-
user = data;
|
|
19
|
-
api.UboDeclarations.create(user.Id, function (data, response) {
|
|
20
|
-
uboDeclaration = data;
|
|
21
|
-
api.UboDeclarations.createUbo(user.Id, uboDeclaration.Id, ubo, function (data, response) {
|
|
22
|
-
ubo = data;
|
|
23
|
-
done();
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
describe('Get', function () {
|
|
30
|
-
var getDeclaration;
|
|
31
|
-
|
|
32
|
-
before(function (done) {
|
|
33
|
-
api.UboDeclarations.get(user.Id, uboDeclaration.Id, function (data, response) {
|
|
34
|
-
getDeclaration = data;
|
|
35
|
-
done();
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
it('should be retrieved', function () {
|
|
40
|
-
expect(getDeclaration).not.to.be.null;
|
|
41
|
-
expect(getDeclaration.Id).to.equal(uboDeclaration.Id);
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
describe('GetById', function () {
|
|
46
|
-
var getDeclaration;
|
|
47
|
-
|
|
48
|
-
before(function (done) {
|
|
49
|
-
api.UboDeclarations.getById(uboDeclaration.Id, function (data, response) {
|
|
50
|
-
getDeclaration = data;
|
|
51
|
-
done();
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
it('should be retrieved', function () {
|
|
56
|
-
expect(getDeclaration).not.to.be.null;
|
|
57
|
-
expect(getDeclaration.Id).to.equal(uboDeclaration.Id);
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
describe('GetAll', function () {
|
|
62
|
-
var getDeclarations;
|
|
63
|
-
|
|
64
|
-
before(function (done) {
|
|
65
|
-
api.UboDeclarations.get(user.Id, uboDeclaration.Id, function (data, response) {
|
|
66
|
-
getDeclarations = data;
|
|
67
|
-
done();
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
it('should be retrieved', function () {
|
|
72
|
-
expect(getDeclarations).not.to.be.null;
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
describe('GetUBO', function () {
|
|
77
|
-
var uboResponse;
|
|
78
|
-
before(function (done) {
|
|
79
|
-
api.UboDeclarations.getUbo(user.Id, uboDeclaration.Id, ubo.Id, function (data, response) {
|
|
80
|
-
uboResponse = data;
|
|
81
|
-
done();
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
it('should be retrieved', function () {
|
|
85
|
-
expect(uboResponse).not.to.be.null;
|
|
86
|
-
expect(uboResponse.Id).to.equal(ubo.Id);
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
describe('UpdateUBO', function () {
|
|
92
|
-
var uboResponse;
|
|
93
|
-
before(function (done) {
|
|
94
|
-
|
|
95
|
-
uboResponse = new Ubo(ubo);
|
|
96
|
-
uboResponse.FirstName = 'John NodejsSDK';
|
|
97
|
-
uboResponse.LastName = 'Michael_NodejsSDK';
|
|
98
|
-
|
|
99
|
-
api.UboDeclarations.updateUbo(user.Id, uboDeclaration.Id, uboResponse, function (data, response) {
|
|
100
|
-
uboResponse = data;
|
|
101
|
-
done();
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
it('should be updated', function () {
|
|
105
|
-
expect(uboResponse).not.to.be.null;
|
|
106
|
-
expect(uboResponse.Id).to.equal(ubo.Id);
|
|
107
|
-
expect(uboResponse.FirstName).to.equal('John NodejsSDK');
|
|
108
|
-
expect(uboResponse.LastName).to.equal('Michael_NodejsSDK');
|
|
109
|
-
});
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
describe('Update', function () {
|
|
113
|
-
var updatedDeclaration;
|
|
114
|
-
|
|
115
|
-
before(function (done) {
|
|
116
|
-
uboDeclaration.Status = UboDeclarationStatus.ValidationAsked;
|
|
117
|
-
|
|
118
|
-
api.UboDeclarations.update(user.Id, uboDeclaration, function (data, response) {
|
|
119
|
-
updatedDeclaration = data;
|
|
120
|
-
done();
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
it('should be updated', function () {
|
|
125
|
-
expect(updatedDeclaration).not.to.be.null;
|
|
126
|
-
expect(updatedDeclaration.Status).to.equal(UboDeclarationStatus.ValidationAsked);
|
|
127
|
-
});
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
});
|