mangopay4-nodejs-sdk 1.68.0 → 2.1.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 +68 -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 +6 -1
  9. package/lib/models/CardPreAuthorization.js +2 -2
  10. package/lib/models/Hook.js +2 -1
  11. package/lib/models/PayInRecurringRegistration.js +2 -1
  12. package/lib/models/PayPalDepositPreauthorization.js +21 -0
  13. package/lib/models/ReportV2.js +2 -1
  14. package/lib/services/Deposits.js +13 -0
  15. package/lib/services/PayIns.js +94 -1
  16. package/package.json +16 -24
  17. package/typings/enums.d.ts +3 -1
  18. package/typings/models/cardPreauthorization.d.ts +7 -1
  19. package/typings/models/deposit.d.ts +165 -0
  20. package/typings/models/hook.d.ts +7 -2
  21. package/typings/models/payIn.d.ts +1302 -135
  22. package/typings/models/reportV2.d.ts +2 -0
  23. package/typings/models/virtualAccount.d.ts +48 -0
  24. package/typings/services/Deposits.d.ts +2 -0
  25. package/typings/services/PayIns.d.ts +63 -6
  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/test/TestKycPageFile.png +0 -0
  30. package/test/helpers.js +0 -1537
  31. package/test/main.js +0 -10
  32. package/test/mocha.opts +0 -3
  33. package/test/services/Acquiring.js +0 -338
  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 -2632
  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
@@ -18,6 +18,11 @@ export namespace deposit {
18
18
  import _3DSVersion = payIn._3DSVersion;
19
19
  import CardInfoData = card.CardInfoData;
20
20
  import AuthenticationResult = payIn.AuthenticationResult;
21
+ import FlowDescriptor = payIn.FlowDescriptor;
22
+ import ShippingPreference = payIn.ShippingPreference;
23
+ import PayPalWebTrackingData = payIn.PayPalWebTrackingData;
24
+ import LineItemData = payIn.LineItemData;
25
+ import CreateLineItem = payIn.CreateLineItem;
21
26
 
22
27
  type DepositStatus = ValueOf<enums.IDepositStatus>;
23
28
 
@@ -74,6 +79,86 @@ export namespace deposit {
74
79
  * Authentication result
75
80
  */
76
81
  AuthenticationResult?: AuthenticationResult;
82
+
83
+ /**
84
+ * Information about the payment flow and its Beneficiaries.
85
+ */
86
+ FlowDescriptor?: FlowDescriptor;
87
+
88
+ /**
89
+ * The unique identifier of the buyer's PayPal account, provided by PayPal.
90
+ */
91
+ PaypalPayerID?: string;
92
+
93
+ /**
94
+ * The unique identifier of the order on the PayPal side.
95
+ */
96
+ PaypalOrderID?: string;
97
+
98
+ /**
99
+ * The first name of the buyer, returned by PayPal.
100
+ */
101
+ BuyerFirstname?: string;
102
+
103
+ /**
104
+ * The last name of the buyer, returned by PayPal.
105
+ */
106
+ BuyerLastname?: string;
107
+
108
+ /**
109
+ * The phone number of the buyer, returned by PayPal.
110
+ */
111
+ BuyerPhone?: string;
112
+
113
+ /**
114
+ * The country of the buyer, returned by PayPal.
115
+ */
116
+ BuyerCountry?: CountryISO;
117
+
118
+ /**
119
+ * The email address of the buyer's PayPal account.
120
+ */
121
+ PaypalBuyerAccountEmail?: string;
122
+
123
+ /**
124
+ * The URL to which the user is returned after canceling the payment.
125
+ */
126
+ CancelURL?: string;
127
+
128
+ /**
129
+ * Information about the shipment trackings.
130
+ */
131
+ Trackings?: PayPalWebTrackingData[];
132
+
133
+ /**
134
+ * The shipping preference used for the PayPal payment.
135
+ */
136
+ ShippingPreference?: ShippingPreference;
137
+
138
+ /**
139
+ * The platform’s order reference for the transaction.
140
+ */
141
+ Reference?: string;
142
+
143
+ /**
144
+ * Information about the items bought by the buyer.
145
+ */
146
+ LineItems?: LineItemData[];
147
+
148
+ /**
149
+ * The URL to which the user is redirected to complete the payment.
150
+ */
151
+ RedirectURL?: string;
152
+
153
+ /**
154
+ * The URL to which the user is returned after the payment, whether successful or not.
155
+ */
156
+ ReturnURL?: string;
157
+
158
+ /**
159
+ * The unique identifier of the Data Collection object containing the data PayPal needs to process the pay-in.
160
+ */
161
+ DataCollectionId?: string;
77
162
  }
78
163
 
79
164
  interface CreateDeposit {
@@ -96,6 +181,86 @@ export namespace deposit {
96
181
  Billing?: CompleteBillingData;
97
182
 
98
183
  Shipping?: ShippingData;
184
+
185
+ /**
186
+ * Information about the payment flow and its Beneficiaries.
187
+ */
188
+ FlowDescriptor?: FlowDescriptor;
189
+ }
190
+
191
+ interface CreatePayPalDepositPreauthorization {
192
+ /**
193
+ * The unique identifier of the user at the source of the transaction.
194
+ */
195
+ AuthorId: string;
196
+
197
+ /**
198
+ * Information about the preauthorized funds.
199
+ */
200
+ DebitedFunds: MoneyData;
201
+
202
+ /**
203
+ * The URL to which the user is returned after the payment, whether the transaction is successful or not.
204
+ */
205
+ ReturnURL: string;
206
+
207
+ /**
208
+ * The URL to which the user is returned after canceling the payment.
209
+ * If not provided, the user is returned to the ReturnURL.
210
+ */
211
+ CancelURL?: string;
212
+
213
+ /**
214
+ * The unique identifier of the Data Collection object containing the data PayPal needs to process the pay-in.
215
+ */
216
+ DataCollectionId?: string;
217
+
218
+ /**
219
+ * The shipping preference for the payment.
220
+ * One of SET_PROVIDED_ADDRESS, GET_FROM_FILE, or NO_SHIPPING.
221
+ */
222
+ ShippingPreference?: ShippingPreference;
223
+
224
+ /**
225
+ * Information about the end user’s shipping address.
226
+ * Required if ShippingPreference is SET_PROVIDED_ADDRESS.
227
+ */
228
+ Shipping?: ShippingData;
229
+
230
+ /**
231
+ * The platform’s order reference for the transaction (max. 127 characters).
232
+ */
233
+ Reference?: string;
234
+
235
+ /**
236
+ * Custom data that you can add to this object (max. 255 characters).
237
+ */
238
+ Tag?: string;
239
+
240
+ /**
241
+ * Custom description to appear on the user’s bank statement (max. 10 characters, alphanumeric and spaces).
242
+ */
243
+ StatementDescriptor?: string;
244
+
245
+ /**
246
+ * The language in which the PayPal payment page is to be displayed, in ISO 639-1 format.
247
+ */
248
+ Culture?: CountryISO;
249
+
250
+ /**
251
+ * The reference to the profiling session used for fraud prevention.
252
+ */
253
+ ProfilingAttemptReference?: string;
254
+
255
+ /**
256
+ * Information about the items bought by the buyer.
257
+ */
258
+ LineItems?: CreateLineItem[];
259
+
260
+ /**
261
+ * Information about the payment flow and its Beneficiaries.
262
+ */
263
+ FlowDescriptor?: FlowDescriptor;
99
264
  }
100
265
 
101
266
  interface PayinsLinkedData {
@@ -27,13 +27,18 @@ export namespace hook {
27
27
  * The event type
28
28
  */
29
29
  EventType: event.EventType;
30
+
31
+ /**
32
+ * Email
33
+ */
34
+ Email: string;
30
35
  }
31
36
 
32
- interface CreateHook extends PickPartialRequired<HookData, "Tag", "EventType" | "Url"> {
37
+ interface CreateHook extends PickPartialRequired<HookData, "Tag" | "Email", "EventType" | "Url"> {
33
38
  }
34
39
 
35
40
  interface UpdateHook extends PickPartialRequired<HookData,
36
- "EventType" | "Url" | "Tag" | "Status",
41
+ "EventType" | "Url" | "Tag" | "Status" | "Email",
37
42
  "Id"> {
38
43
  }
39
44
  }