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.
Files changed (51) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +0 -6
  3. package/docs/templates/class.mustache +0 -0
  4. package/docs/templates/file.mustache +0 -0
  5. package/docs/templates/function.mustache +0 -0
  6. package/docs/templates/index.mustache +0 -0
  7. package/docs/templates/overview.mustache +0 -0
  8. package/lib/models/CardPreAuthorization.js +2 -2
  9. package/package.json +16 -24
  10. package/.github/workflows/node.js.yml +0 -32
  11. package/.github/workflows/npm-publish.yml +0 -26
  12. package/.jshintrc +0 -16
  13. package/test/TestKycPageFile.png +0 -0
  14. package/test/helpers.js +0 -1537
  15. package/test/main.js +0 -10
  16. package/test/mocha.opts +0 -3
  17. package/test/services/Acquiring.js +0 -338
  18. package/test/services/BankAccounts.js +0 -46
  19. package/test/services/BankingAliases.js +0 -89
  20. package/test/services/CardPreAuthorizations.js +0 -70
  21. package/test/services/CardRegistrations.js +0 -239
  22. package/test/services/Cards.js +0 -56
  23. package/test/services/Clients.js +0 -235
  24. package/test/services/Conversions.js +0 -319
  25. package/test/services/Deposits.js +0 -148
  26. package/test/services/Disputes.js +0 -542
  27. package/test/services/EMoney.js +0 -54
  28. package/test/services/Events.js +0 -147
  29. package/test/services/Hooks.js +0 -109
  30. package/test/services/Idempotency.js +0 -41
  31. package/test/services/IdentityVerifications.js +0 -68
  32. package/test/services/KycDocuments.js +0 -73
  33. package/test/services/Mandates.js +0 -256
  34. package/test/services/PayIns.js +0 -2632
  35. package/test/services/PayOuts.js +0 -119
  36. package/test/services/RateLimit.js +0 -43
  37. package/test/services/Recipients.js +0 -234
  38. package/test/services/Refunds.js +0 -123
  39. package/test/services/Regulatory.js +0 -45
  40. package/test/services/Reports.js +0 -114
  41. package/test/services/ReportsV2.js +0 -306
  42. package/test/services/Repudiations.js +0 -22
  43. package/test/services/Settlements.js +0 -127
  44. package/test/services/Tokens.js +0 -55
  45. package/test/services/Transfers.js +0 -137
  46. package/test/services/UboDeclarations.js +0 -130
  47. package/test/services/Users.js +0 -1322
  48. package/test/services/VirtualAccounts.js +0 -105
  49. package/test/services/Wallets.js +0 -132
  50. package/test/settlement_sample.csv +0 -8
  51. 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
- });