mangopay4-nodejs-sdk 1.67.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 (67) hide show
  1. package/CHANGELOG.md +39 -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/apiMethods.js +10 -3
  9. package/lib/models/CardPreAuthorization.js +2 -2
  10. package/lib/models/PayInPaymentType.js +0 -1
  11. package/lib/models/ReportFilterV2.js +2 -1
  12. package/lib/services/Acquiring.js +152 -0
  13. package/lib/services/PayIns.js +0 -18
  14. package/lib/services/index.js +2 -1
  15. package/package.json +16 -24
  16. package/typings/enums.d.ts +0 -1
  17. package/typings/index.d.ts +5 -5
  18. package/typings/index.test-d.ts +0 -15
  19. package/typings/models/acquiring.d.ts +763 -0
  20. package/typings/models/payIn.d.ts +20 -80
  21. package/typings/models/refund.d.ts +1 -0
  22. package/typings/models/reportV2.d.ts +2 -0
  23. package/typings/services/Acquiring.d.ts +44 -0
  24. package/typings/services/PayIns.d.ts +0 -8
  25. package/typings/types.d.ts +0 -2
  26. package/.github/workflows/node.js.yml +0 -32
  27. package/.github/workflows/npm-publish.yml +0 -26
  28. package/.jshintrc +0 -16
  29. package/lib/models/PayInPaymentDetailsPayconiq.js +0 -23
  30. package/test/TestKycPageFile.png +0 -0
  31. package/test/helpers.js +0 -1536
  32. package/test/main.js +0 -10
  33. package/test/mocha.opts +0 -3
  34. package/test/services/BankAccounts.js +0 -46
  35. package/test/services/BankingAliases.js +0 -89
  36. package/test/services/CardPreAuthorizations.js +0 -70
  37. package/test/services/CardRegistrations.js +0 -239
  38. package/test/services/Cards.js +0 -56
  39. package/test/services/Clients.js +0 -235
  40. package/test/services/Conversions.js +0 -319
  41. package/test/services/Deposits.js +0 -148
  42. package/test/services/Disputes.js +0 -542
  43. package/test/services/EMoney.js +0 -54
  44. package/test/services/Events.js +0 -147
  45. package/test/services/Hooks.js +0 -109
  46. package/test/services/Idempotency.js +0 -41
  47. package/test/services/IdentityVerifications.js +0 -68
  48. package/test/services/KycDocuments.js +0 -73
  49. package/test/services/Mandates.js +0 -256
  50. package/test/services/PayIns.js +0 -2748
  51. package/test/services/PayOuts.js +0 -119
  52. package/test/services/RateLimit.js +0 -43
  53. package/test/services/Recipients.js +0 -234
  54. package/test/services/Refunds.js +0 -123
  55. package/test/services/Regulatory.js +0 -45
  56. package/test/services/Reports.js +0 -114
  57. package/test/services/ReportsV2.js +0 -306
  58. package/test/services/Repudiations.js +0 -22
  59. package/test/services/Settlements.js +0 -127
  60. package/test/services/Tokens.js +0 -55
  61. package/test/services/Transfers.js +0 -137
  62. package/test/services/UboDeclarations.js +0 -130
  63. package/test/services/Users.js +0 -1322
  64. package/test/services/VirtualAccounts.js +0 -105
  65. package/test/services/Wallets.js +0 -132
  66. package/test/settlement_sample.csv +0 -8
  67. 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
- });