@gofynd/fdk-client-javascript 1.4.16-beta.1 → 1.4.16-beta.2

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 (73) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/Cart/CartApplicationClient.d.ts +5 -5
  4. package/sdk/application/Cart/CartApplicationClient.js +26 -268
  5. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +16 -16
  6. package/sdk/application/Catalog/CatalogApplicationClient.js +90 -339
  7. package/sdk/application/Common/CommonApplicationClient.js +1 -16
  8. package/sdk/application/Communication/CommunicationApplicationClient.js +1 -24
  9. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +2 -2
  10. package/sdk/application/Configuration/ConfigurationApplicationClient.js +11 -134
  11. package/sdk/application/Content/ContentApplicationClient.d.ts +40 -8
  12. package/sdk/application/Content/ContentApplicationClient.js +174 -211
  13. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +2 -2
  14. package/sdk/application/FileStorage/FileStorageApplicationClient.js +11 -30
  15. package/sdk/application/Finance/FinanceApplicationClient.js +1 -16
  16. package/sdk/application/Lead/LeadApplicationClient.d.ts +4 -4
  17. package/sdk/application/Lead/LeadApplicationClient.js +21 -52
  18. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +6 -6
  19. package/sdk/application/Logistic/LogisticApplicationClient.js +40 -153
  20. package/sdk/application/Order/OrderApplicationClient.d.ts +11 -11
  21. package/sdk/application/Order/OrderApplicationClient.js +68 -153
  22. package/sdk/application/Payment/PaymentApplicationClient.d.ts +1 -1
  23. package/sdk/application/Payment/PaymentApplicationClient.js +6 -437
  24. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +1 -1
  25. package/sdk/application/Rewards/RewardsApplicationClient.js +6 -59
  26. package/sdk/application/Share/ShareApplicationClient.d.ts +4 -4
  27. package/sdk/application/Share/ShareApplicationClient.js +21 -75
  28. package/sdk/application/Theme/ThemeApplicationClient.d.ts +3 -3
  29. package/sdk/application/Theme/ThemeApplicationClient.js +19 -47
  30. package/sdk/application/User/UserApplicationClient.js +1 -407
  31. package/sdk/application/Webhook/WebhookApplicationClient.js +1 -8
  32. package/sdk/common/Utility.d.ts +1 -1
  33. package/sdk/common/Utility.js +4 -4
  34. package/sdk/common/Validator.d.ts +1 -0
  35. package/sdk/common/Validator.js +20 -0
  36. package/sdk/platform/Cart/CartPlatformModel.d.ts +35 -0
  37. package/sdk/platform/Cart/CartPlatformModel.js +16 -0
  38. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +4 -0
  39. package/sdk/platform/Catalog/CatalogPlatformModel.js +4 -0
  40. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +80 -0
  41. package/sdk/platform/Content/ContentPlatformApplicationClient.js +571 -0
  42. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +75 -1
  43. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +88 -0
  44. package/sdk/platform/Content/ContentPlatformModel.d.ts +131 -5
  45. package/sdk/platform/Content/ContentPlatformModel.js +110 -4
  46. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +0 -10
  47. package/sdk/platform/Order/OrderPlatformApplicationClient.js +0 -92
  48. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -28
  49. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -18
  50. package/sdk/platform/Order/OrderPlatformClient.d.ts +10 -0
  51. package/sdk/platform/Order/OrderPlatformClient.js +99 -0
  52. package/sdk/platform/Order/OrderPlatformValidator.d.ts +33 -1
  53. package/sdk/platform/Order/OrderPlatformValidator.js +20 -0
  54. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +0 -10
  55. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +0 -118
  56. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +1 -53
  57. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +0 -29
  58. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +10 -0
  59. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +119 -0
  60. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +58 -1
  61. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +30 -0
  62. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +3 -3
  63. package/sdk/platform/Share/SharePlatformApplicationClient.js +7 -7
  64. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +3 -6
  65. package/sdk/platform/Share/SharePlatformApplicationValidator.js +2 -2
  66. package/sdk/platform/Share/SharePlatformModel.d.ts +10 -2
  67. package/sdk/platform/Share/SharePlatformModel.js +4 -2
  68. package/sdk/public/Configuration/ConfigurationPublicClient.js +1 -16
  69. package/sdk/public/Content/ContentPublicClient.d.ts +3 -3
  70. package/sdk/public/Content/ContentPublicClient.js +16 -104
  71. package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
  72. package/sdk/public/Partner/PartnerPublicClient.js +6 -11
  73. package/sdk/public/Webhook/WebhookPublicClient.js +1 -40
@@ -6,6 +6,7 @@ const {
6
6
  const ApplicationAPIClient = require("../ApplicationAPIClient");
7
7
  const constructUrl = require("../constructUrl");
8
8
  const Paginator = require("../../common/Paginator");
9
+ const { validateRequiredParams } = require("../../common/Validator");
9
10
 
10
11
  class Payment {
11
12
  constructor(_conf) {
@@ -117,14 +118,6 @@ class Payment {
117
118
  { body, requestHeaders } = { requestHeaders: {} },
118
119
  { responseHeaders } = { responseHeaders: false }
119
120
  ) {
120
- let invalidInput = [];
121
- if (invalidInput.length) {
122
- const error = new Error();
123
- error.message = "Missing required field";
124
- error.details = invalidInput;
125
- return Promise.reject(new FDKClientValidationError(error));
126
- }
127
-
128
121
  const query_params = {};
129
122
 
130
123
  const xHeaders = {};
@@ -162,14 +155,6 @@ class Payment {
162
155
  { body, requestHeaders } = { requestHeaders: {} },
163
156
  { responseHeaders } = { responseHeaders: false }
164
157
  ) {
165
- let invalidInput = [];
166
- if (invalidInput.length) {
167
- const error = new Error();
168
- error.message = "Missing required field";
169
- error.details = invalidInput;
170
- return Promise.reject(new FDKClientValidationError(error));
171
- }
172
-
173
158
  const query_params = {};
174
159
 
175
160
  const xHeaders = {};
@@ -207,14 +192,6 @@ class Payment {
207
192
  { body, requestHeaders } = { requestHeaders: {} },
208
193
  { responseHeaders } = { responseHeaders: false }
209
194
  ) {
210
- let invalidInput = [];
211
- if (invalidInput.length) {
212
- const error = new Error();
213
- error.message = "Missing required field";
214
- error.details = invalidInput;
215
- return Promise.reject(new FDKClientValidationError(error));
216
- }
217
-
218
195
  const query_params = {};
219
196
 
220
197
  const xHeaders = {};
@@ -252,14 +229,6 @@ class Payment {
252
229
  { body, requestHeaders } = { requestHeaders: {} },
253
230
  { responseHeaders } = { responseHeaders: false }
254
231
  ) {
255
- let invalidInput = [];
256
- if (invalidInput.length) {
257
- const error = new Error();
258
- error.message = "Missing required field";
259
- error.details = invalidInput;
260
- return Promise.reject(new FDKClientValidationError(error));
261
- }
262
-
263
232
  const query_params = {};
264
233
 
265
234
  const xHeaders = {};
@@ -297,18 +266,12 @@ class Payment {
297
266
  { cardInfo, aggregator, requestHeaders } = { requestHeaders: {} },
298
267
  { responseHeaders } = { responseHeaders: false }
299
268
  ) {
300
- let invalidInput = [];
301
-
302
- if (!cardInfo) {
303
- invalidInput.push({
304
- message: `The 'cardInfo' field is required.`,
305
- path: ["cardInfo"],
269
+ const errors = validateRequiredParams(arguments[0], ["cardInfo"]);
270
+ if (errors.length > 0) {
271
+ const error = new FDKClientValidationError({
272
+ message: "Missing required field",
273
+ details: errors,
306
274
  });
307
- }
308
- if (invalidInput.length) {
309
- const error = new Error();
310
- error.message = "Missing required field";
311
- error.details = invalidInput;
312
275
  return Promise.reject(new FDKClientValidationError(error));
313
276
  }
314
277
 
@@ -350,14 +313,6 @@ class Payment {
350
313
  { body, requestHeaders } = { requestHeaders: {} },
351
314
  { responseHeaders } = { responseHeaders: false }
352
315
  ) {
353
- let invalidInput = [];
354
- if (invalidInput.length) {
355
- const error = new Error();
356
- error.message = "Missing required field";
357
- error.details = invalidInput;
358
- return Promise.reject(new FDKClientValidationError(error));
359
- }
360
-
361
316
  const query_params = {};
362
317
 
363
318
  const xHeaders = {};
@@ -395,14 +350,6 @@ class Payment {
395
350
  { body, requestHeaders } = { requestHeaders: {} },
396
351
  { responseHeaders } = { responseHeaders: false }
397
352
  ) {
398
- let invalidInput = [];
399
- if (invalidInput.length) {
400
- const error = new Error();
401
- error.message = "Missing required field";
402
- error.details = invalidInput;
403
- return Promise.reject(new FDKClientValidationError(error));
404
- }
405
-
406
353
  const query_params = {};
407
354
 
408
355
  const xHeaders = {};
@@ -440,14 +387,6 @@ class Payment {
440
387
  { aggregator, requestHeaders } = { requestHeaders: {} },
441
388
  { responseHeaders } = { responseHeaders: false }
442
389
  ) {
443
- let invalidInput = [];
444
- if (invalidInput.length) {
445
- const error = new Error();
446
- error.message = "Missing required field";
447
- error.details = invalidInput;
448
- return Promise.reject(new FDKClientValidationError(error));
449
- }
450
-
451
390
  const query_params = {};
452
391
  query_params["aggregator"] = aggregator;
453
392
 
@@ -486,14 +425,6 @@ class Payment {
486
425
  { body, requestHeaders } = { requestHeaders: {} },
487
426
  { responseHeaders } = { responseHeaders: false }
488
427
  ) {
489
- let invalidInput = [];
490
- if (invalidInput.length) {
491
- const error = new Error();
492
- error.message = "Missing required field";
493
- error.details = invalidInput;
494
- return Promise.reject(new FDKClientValidationError(error));
495
- }
496
-
497
428
  const query_params = {};
498
429
 
499
430
  const xHeaders = {};
@@ -531,14 +462,6 @@ class Payment {
531
462
  { body, requestHeaders } = { requestHeaders: {} },
532
463
  { responseHeaders } = { responseHeaders: false }
533
464
  ) {
534
- let invalidInput = [];
535
- if (invalidInput.length) {
536
- const error = new Error();
537
- error.message = "Missing required field";
538
- error.details = invalidInput;
539
- return Promise.reject(new FDKClientValidationError(error));
540
- }
541
-
542
465
  const query_params = {};
543
466
 
544
467
  const xHeaders = {};
@@ -576,14 +499,6 @@ class Payment {
576
499
  { body, requestHeaders } = { requestHeaders: {} },
577
500
  { responseHeaders } = { responseHeaders: false }
578
501
  ) {
579
- let invalidInput = [];
580
- if (invalidInput.length) {
581
- const error = new Error();
582
- error.message = "Missing required field";
583
- error.details = invalidInput;
584
- return Promise.reject(new FDKClientValidationError(error));
585
- }
586
-
587
502
  const query_params = {};
588
503
 
589
504
  const xHeaders = {};
@@ -621,14 +536,6 @@ class Payment {
621
536
  { aggregator, requestHeaders } = { requestHeaders: {} },
622
537
  { responseHeaders } = { responseHeaders: false }
623
538
  ) {
624
- let invalidInput = [];
625
- if (invalidInput.length) {
626
- const error = new Error();
627
- error.message = "Missing required field";
628
- error.details = invalidInput;
629
- return Promise.reject(new FDKClientValidationError(error));
630
- }
631
-
632
539
  const query_params = {};
633
540
  query_params["aggregator"] = aggregator;
634
541
 
@@ -667,14 +574,6 @@ class Payment {
667
574
  { body, requestHeaders } = { requestHeaders: {} },
668
575
  { responseHeaders } = { responseHeaders: false }
669
576
  ) {
670
- let invalidInput = [];
671
- if (invalidInput.length) {
672
- const error = new Error();
673
- error.message = "Missing required field";
674
- error.details = invalidInput;
675
- return Promise.reject(new FDKClientValidationError(error));
676
- }
677
-
678
577
  const query_params = {};
679
578
 
680
579
  const xHeaders = {};
@@ -712,14 +611,6 @@ class Payment {
712
611
  { body, requestHeaders } = { requestHeaders: {} },
713
612
  { responseHeaders } = { responseHeaders: false }
714
613
  ) {
715
- let invalidInput = [];
716
- if (invalidInput.length) {
717
- const error = new Error();
718
- error.message = "Missing required field";
719
- error.details = invalidInput;
720
- return Promise.reject(new FDKClientValidationError(error));
721
- }
722
-
723
614
  const query_params = {};
724
615
 
725
616
  const xHeaders = {};
@@ -757,14 +648,6 @@ class Payment {
757
648
  { body, requestHeaders } = { requestHeaders: {} },
758
649
  { responseHeaders } = { responseHeaders: false }
759
650
  ) {
760
- let invalidInput = [];
761
- if (invalidInput.length) {
762
- const error = new Error();
763
- error.message = "Missing required field";
764
- error.details = invalidInput;
765
- return Promise.reject(new FDKClientValidationError(error));
766
- }
767
-
768
651
  const query_params = {};
769
652
 
770
653
  const xHeaders = {};
@@ -802,14 +685,6 @@ class Payment {
802
685
  { body, requestHeaders } = { requestHeaders: {} },
803
686
  { responseHeaders } = { responseHeaders: false }
804
687
  ) {
805
- let invalidInput = [];
806
- if (invalidInput.length) {
807
- const error = new Error();
808
- error.message = "Missing required field";
809
- error.details = invalidInput;
810
- return Promise.reject(new FDKClientValidationError(error));
811
- }
812
-
813
688
  const query_params = {};
814
689
 
815
690
  const xHeaders = {};
@@ -847,14 +722,6 @@ class Payment {
847
722
  { refresh, requestHeaders } = { requestHeaders: {} },
848
723
  { responseHeaders } = { responseHeaders: false }
849
724
  ) {
850
- let invalidInput = [];
851
- if (invalidInput.length) {
852
- const error = new Error();
853
- error.message = "Missing required field";
854
- error.details = invalidInput;
855
- return Promise.reject(new FDKClientValidationError(error));
856
- }
857
-
858
725
  const query_params = {};
859
726
  query_params["refresh"] = refresh;
860
727
 
@@ -893,14 +760,6 @@ class Payment {
893
760
  { requestHeaders } = { requestHeaders: {} },
894
761
  { responseHeaders } = { responseHeaders: false }
895
762
  ) {
896
- let invalidInput = [];
897
- if (invalidInput.length) {
898
- const error = new Error();
899
- error.message = "Missing required field";
900
- error.details = invalidInput;
901
- return Promise.reject(new FDKClientValidationError(error));
902
- }
903
-
904
763
  const query_params = {};
905
764
 
906
765
  const xHeaders = {};
@@ -938,14 +797,6 @@ class Payment {
938
797
  { forceRefresh, requestHeaders } = { requestHeaders: {} },
939
798
  { responseHeaders } = { responseHeaders: false }
940
799
  ) {
941
- let invalidInput = [];
942
- if (invalidInput.length) {
943
- const error = new Error();
944
- error.message = "Missing required field";
945
- error.details = invalidInput;
946
- return Promise.reject(new FDKClientValidationError(error));
947
- }
948
-
949
800
  const query_params = {};
950
801
  query_params["force_refresh"] = forceRefresh;
951
802
 
@@ -984,14 +835,6 @@ class Payment {
984
835
  { xApiToken, refresh, requestHeaders } = { requestHeaders: {} },
985
836
  { responseHeaders } = { responseHeaders: false }
986
837
  ) {
987
- let invalidInput = [];
988
- if (invalidInput.length) {
989
- const error = new Error();
990
- error.message = "Missing required field";
991
- error.details = invalidInput;
992
- return Promise.reject(new FDKClientValidationError(error));
993
- }
994
-
995
838
  const query_params = {};
996
839
  query_params["refresh"] = refresh;
997
840
 
@@ -1031,14 +874,6 @@ class Payment {
1031
874
  { requestHeaders } = { requestHeaders: {} },
1032
875
  { responseHeaders } = { responseHeaders: false }
1033
876
  ) {
1034
- let invalidInput = [];
1035
- if (invalidInput.length) {
1036
- const error = new Error();
1037
- error.message = "Missing required field";
1038
- error.details = invalidInput;
1039
- return Promise.reject(new FDKClientValidationError(error));
1040
- }
1041
-
1042
877
  const query_params = {};
1043
878
 
1044
879
  const xHeaders = {};
@@ -1076,21 +911,6 @@ class Payment {
1076
911
  { orderId, requestHeaders } = { requestHeaders: {} },
1077
912
  { responseHeaders } = { responseHeaders: false }
1078
913
  ) {
1079
- let invalidInput = [];
1080
-
1081
- if (!orderId) {
1082
- invalidInput.push({
1083
- message: `The 'orderId' field is required.`,
1084
- path: ["orderId"],
1085
- });
1086
- }
1087
- if (invalidInput.length) {
1088
- const error = new Error();
1089
- error.message = "Missing required field";
1090
- error.details = invalidInput;
1091
- return Promise.reject(new FDKClientValidationError(error));
1092
- }
1093
-
1094
914
  const query_params = {};
1095
915
  query_params["order_id"] = orderId;
1096
916
 
@@ -1129,14 +949,6 @@ class Payment {
1129
949
  { paymentLinkId, requestHeaders } = { requestHeaders: {} },
1130
950
  { responseHeaders } = { responseHeaders: false }
1131
951
  ) {
1132
- let invalidInput = [];
1133
- if (invalidInput.length) {
1134
- const error = new Error();
1135
- error.message = "Missing required field";
1136
- error.details = invalidInput;
1137
- return Promise.reject(new FDKClientValidationError(error));
1138
- }
1139
-
1140
952
  const query_params = {};
1141
953
  query_params["payment_link_id"] = paymentLinkId;
1142
954
 
@@ -1187,27 +999,6 @@ class Payment {
1187
999
  } = { requestHeaders: {} },
1188
1000
  { responseHeaders } = { responseHeaders: false }
1189
1001
  ) {
1190
- let invalidInput = [];
1191
-
1192
- if (!amount) {
1193
- invalidInput.push({
1194
- message: `The 'amount' field is required.`,
1195
- path: ["amount"],
1196
- });
1197
- }
1198
- if (!cartId) {
1199
- invalidInput.push({
1200
- message: `The 'cartId' field is required.`,
1201
- path: ["cartId"],
1202
- });
1203
- }
1204
- if (invalidInput.length) {
1205
- const error = new Error();
1206
- error.message = "Missing required field";
1207
- error.details = invalidInput;
1208
- return Promise.reject(new FDKClientValidationError(error));
1209
- }
1210
-
1211
1002
  const query_params = {};
1212
1003
  query_params["amount"] = amount;
1213
1004
  query_params["cart_id"] = cartId;
@@ -1255,21 +1046,6 @@ class Payment {
1255
1046
  { paymentLinkId, requestHeaders } = { requestHeaders: {} },
1256
1047
  { responseHeaders } = { responseHeaders: false }
1257
1048
  ) {
1258
- let invalidInput = [];
1259
-
1260
- if (!paymentLinkId) {
1261
- invalidInput.push({
1262
- message: `The 'paymentLinkId' field is required.`,
1263
- path: ["paymentLinkId"],
1264
- });
1265
- }
1266
- if (invalidInput.length) {
1267
- const error = new Error();
1268
- error.message = "Missing required field";
1269
- error.details = invalidInput;
1270
- return Promise.reject(new FDKClientValidationError(error));
1271
- }
1272
-
1273
1049
  const query_params = {};
1274
1050
  query_params["payment_link_id"] = paymentLinkId;
1275
1051
 
@@ -1318,39 +1094,6 @@ class Payment {
1318
1094
  } = { requestHeaders: {} },
1319
1095
  { responseHeaders } = { responseHeaders: false }
1320
1096
  ) {
1321
- let invalidInput = [];
1322
-
1323
- if (!amount) {
1324
- invalidInput.push({
1325
- message: `The 'amount' field is required.`,
1326
- path: ["amount"],
1327
- });
1328
- }
1329
- if (!cartId) {
1330
- invalidInput.push({
1331
- message: `The 'cartId' field is required.`,
1332
- path: ["cartId"],
1333
- });
1334
- }
1335
- if (!pincode) {
1336
- invalidInput.push({
1337
- message: `The 'pincode' field is required.`,
1338
- path: ["pincode"],
1339
- });
1340
- }
1341
- if (!orderType) {
1342
- invalidInput.push({
1343
- message: `The 'orderType' field is required.`,
1344
- path: ["orderType"],
1345
- });
1346
- }
1347
- if (invalidInput.length) {
1348
- const error = new Error();
1349
- error.message = "Missing required field";
1350
- error.details = invalidInput;
1351
- return Promise.reject(new FDKClientValidationError(error));
1352
- }
1353
-
1354
1097
  const query_params = {};
1355
1098
  query_params["amount"] = amount;
1356
1099
  query_params["cart_id"] = cartId;
@@ -1396,14 +1139,6 @@ class Payment {
1396
1139
  { requestHeaders } = { requestHeaders: {} },
1397
1140
  { responseHeaders } = { responseHeaders: false }
1398
1141
  ) {
1399
- let invalidInput = [];
1400
- if (invalidInput.length) {
1401
- const error = new Error();
1402
- error.message = "Missing required field";
1403
- error.details = invalidInput;
1404
- return Promise.reject(new FDKClientValidationError(error));
1405
- }
1406
-
1407
1142
  const query_params = {};
1408
1143
 
1409
1144
  const xHeaders = {};
@@ -1441,21 +1176,6 @@ class Payment {
1441
1176
  { orderId, requestHeaders } = { requestHeaders: {} },
1442
1177
  { responseHeaders } = { responseHeaders: false }
1443
1178
  ) {
1444
- let invalidInput = [];
1445
-
1446
- if (!orderId) {
1447
- invalidInput.push({
1448
- message: `The 'orderId' field is required.`,
1449
- path: ["orderId"],
1450
- });
1451
- }
1452
- if (invalidInput.length) {
1453
- const error = new Error();
1454
- error.message = "Missing required field";
1455
- error.details = invalidInput;
1456
- return Promise.reject(new FDKClientValidationError(error));
1457
- }
1458
-
1459
1179
  const query_params = {};
1460
1180
  query_params["order_id"] = orderId;
1461
1181
 
@@ -1494,14 +1214,6 @@ class Payment {
1494
1214
  { body, requestHeaders } = { requestHeaders: {} },
1495
1215
  { responseHeaders } = { responseHeaders: false }
1496
1216
  ) {
1497
- let invalidInput = [];
1498
- if (invalidInput.length) {
1499
- const error = new Error();
1500
- error.message = "Missing required field";
1501
- error.details = invalidInput;
1502
- return Promise.reject(new FDKClientValidationError(error));
1503
- }
1504
-
1505
1217
  const query_params = {};
1506
1218
 
1507
1219
  const xHeaders = {};
@@ -1539,14 +1251,6 @@ class Payment {
1539
1251
  { body, requestHeaders } = { requestHeaders: {} },
1540
1252
  { responseHeaders } = { responseHeaders: false }
1541
1253
  ) {
1542
- let invalidInput = [];
1543
- if (invalidInput.length) {
1544
- const error = new Error();
1545
- error.message = "Missing required field";
1546
- error.details = invalidInput;
1547
- return Promise.reject(new FDKClientValidationError(error));
1548
- }
1549
-
1550
1254
  const query_params = {};
1551
1255
 
1552
1256
  const xHeaders = {};
@@ -1584,14 +1288,6 @@ class Payment {
1584
1288
  { body, requestHeaders } = { requestHeaders: {} },
1585
1289
  { responseHeaders } = { responseHeaders: false }
1586
1290
  ) {
1587
- let invalidInput = [];
1588
- if (invalidInput.length) {
1589
- const error = new Error();
1590
- error.message = "Missing required field";
1591
- error.details = invalidInput;
1592
- return Promise.reject(new FDKClientValidationError(error));
1593
- }
1594
-
1595
1291
  const query_params = {};
1596
1292
 
1597
1293
  const xHeaders = {};
@@ -1629,14 +1325,6 @@ class Payment {
1629
1325
  { aggregator, requestHeaders } = { requestHeaders: {} },
1630
1326
  { responseHeaders } = { responseHeaders: false }
1631
1327
  ) {
1632
- let invalidInput = [];
1633
- if (invalidInput.length) {
1634
- const error = new Error();
1635
- error.message = "Missing required field";
1636
- error.details = invalidInput;
1637
- return Promise.reject(new FDKClientValidationError(error));
1638
- }
1639
-
1640
1328
  const query_params = {};
1641
1329
  query_params["aggregator"] = aggregator;
1642
1330
 
@@ -1675,14 +1363,6 @@ class Payment {
1675
1363
  { aggregator, requestHeaders } = { requestHeaders: {} },
1676
1364
  { responseHeaders } = { responseHeaders: false }
1677
1365
  ) {
1678
- let invalidInput = [];
1679
- if (invalidInput.length) {
1680
- const error = new Error();
1681
- error.message = "Missing required field";
1682
- error.details = invalidInput;
1683
- return Promise.reject(new FDKClientValidationError(error));
1684
- }
1685
-
1686
1366
  const query_params = {};
1687
1367
  query_params["aggregator"] = aggregator;
1688
1368
 
@@ -1721,14 +1401,6 @@ class Payment {
1721
1401
  { paymentLinkId, requestHeaders } = { requestHeaders: {} },
1722
1402
  { responseHeaders } = { responseHeaders: false }
1723
1403
  ) {
1724
- let invalidInput = [];
1725
- if (invalidInput.length) {
1726
- const error = new Error();
1727
- error.message = "Missing required field";
1728
- error.details = invalidInput;
1729
- return Promise.reject(new FDKClientValidationError(error));
1730
- }
1731
-
1732
1404
  const query_params = {};
1733
1405
  query_params["payment_link_id"] = paymentLinkId;
1734
1406
 
@@ -1767,21 +1439,6 @@ class Payment {
1767
1439
  { aggregator, source, requestHeaders } = { requestHeaders: {} },
1768
1440
  { responseHeaders } = { responseHeaders: false }
1769
1441
  ) {
1770
- let invalidInput = [];
1771
-
1772
- if (!aggregator) {
1773
- invalidInput.push({
1774
- message: `The 'aggregator' field is required.`,
1775
- path: ["aggregator"],
1776
- });
1777
- }
1778
- if (invalidInput.length) {
1779
- const error = new Error();
1780
- error.message = "Missing required field";
1781
- error.details = invalidInput;
1782
- return Promise.reject(new FDKClientValidationError(error));
1783
- }
1784
-
1785
1442
  const query_params = {};
1786
1443
  query_params["source"] = source;
1787
1444
  query_params["aggregator"] = aggregator;
@@ -1821,14 +1478,6 @@ class Payment {
1821
1478
  { body, requestHeaders } = { requestHeaders: {} },
1822
1479
  { responseHeaders } = { responseHeaders: false }
1823
1480
  ) {
1824
- let invalidInput = [];
1825
- if (invalidInput.length) {
1826
- const error = new Error();
1827
- error.message = "Missing required field";
1828
- error.details = invalidInput;
1829
- return Promise.reject(new FDKClientValidationError(error));
1830
- }
1831
-
1832
1481
  const query_params = {};
1833
1482
 
1834
1483
  const xHeaders = {};
@@ -1866,14 +1515,6 @@ class Payment {
1866
1515
  { body, requestHeaders } = { requestHeaders: {} },
1867
1516
  { responseHeaders } = { responseHeaders: false }
1868
1517
  ) {
1869
- let invalidInput = [];
1870
- if (invalidInput.length) {
1871
- const error = new Error();
1872
- error.message = "Missing required field";
1873
- error.details = invalidInput;
1874
- return Promise.reject(new FDKClientValidationError(error));
1875
- }
1876
-
1877
1518
  const query_params = {};
1878
1519
 
1879
1520
  const xHeaders = {};
@@ -1911,14 +1552,6 @@ class Payment {
1911
1552
  { body, requestHeaders } = { requestHeaders: {} },
1912
1553
  { responseHeaders } = { responseHeaders: false }
1913
1554
  ) {
1914
- let invalidInput = [];
1915
- if (invalidInput.length) {
1916
- const error = new Error();
1917
- error.message = "Missing required field";
1918
- error.details = invalidInput;
1919
- return Promise.reject(new FDKClientValidationError(error));
1920
- }
1921
-
1922
1555
  const query_params = {};
1923
1556
 
1924
1557
  const xHeaders = {};
@@ -1956,14 +1589,6 @@ class Payment {
1956
1589
  { body, requestHeaders } = { requestHeaders: {} },
1957
1590
  { responseHeaders } = { responseHeaders: false }
1958
1591
  ) {
1959
- let invalidInput = [];
1960
- if (invalidInput.length) {
1961
- const error = new Error();
1962
- error.message = "Missing required field";
1963
- error.details = invalidInput;
1964
- return Promise.reject(new FDKClientValidationError(error));
1965
- }
1966
-
1967
1592
  const query_params = {};
1968
1593
 
1969
1594
  const xHeaders = {};
@@ -2001,14 +1626,6 @@ class Payment {
2001
1626
  { body, requestHeaders } = { requestHeaders: {} },
2002
1627
  { responseHeaders } = { responseHeaders: false }
2003
1628
  ) {
2004
- let invalidInput = [];
2005
- if (invalidInput.length) {
2006
- const error = new Error();
2007
- error.message = "Missing required field";
2008
- error.details = invalidInput;
2009
- return Promise.reject(new FDKClientValidationError(error));
2010
- }
2011
-
2012
1629
  const query_params = {};
2013
1630
 
2014
1631
  const xHeaders = {};
@@ -2046,14 +1663,6 @@ class Payment {
2046
1663
  { body, requestHeaders } = { requestHeaders: {} },
2047
1664
  { responseHeaders } = { responseHeaders: false }
2048
1665
  ) {
2049
- let invalidInput = [];
2050
- if (invalidInput.length) {
2051
- const error = new Error();
2052
- error.message = "Missing required field";
2053
- error.details = invalidInput;
2054
- return Promise.reject(new FDKClientValidationError(error));
2055
- }
2056
-
2057
1666
  const query_params = {};
2058
1667
 
2059
1668
  const xHeaders = {};
@@ -2091,14 +1700,6 @@ class Payment {
2091
1700
  { body, requestHeaders } = { requestHeaders: {} },
2092
1701
  { responseHeaders } = { responseHeaders: false }
2093
1702
  ) {
2094
- let invalidInput = [];
2095
- if (invalidInput.length) {
2096
- const error = new Error();
2097
- error.message = "Missing required field";
2098
- error.details = invalidInput;
2099
- return Promise.reject(new FDKClientValidationError(error));
2100
- }
2101
-
2102
1703
  const query_params = {};
2103
1704
 
2104
1705
  const xHeaders = {};
@@ -2136,14 +1737,6 @@ class Payment {
2136
1737
  { ifscCode, requestHeaders } = { requestHeaders: {} },
2137
1738
  { responseHeaders } = { responseHeaders: false }
2138
1739
  ) {
2139
- let invalidInput = [];
2140
- if (invalidInput.length) {
2141
- const error = new Error();
2142
- error.message = "Missing required field";
2143
- error.details = invalidInput;
2144
- return Promise.reject(new FDKClientValidationError(error));
2145
- }
2146
-
2147
1740
  const query_params = {};
2148
1741
  query_params["ifsc_code"] = ifscCode;
2149
1742
 
@@ -2182,14 +1775,6 @@ class Payment {
2182
1775
  { body, requestHeaders } = { requestHeaders: {} },
2183
1776
  { responseHeaders } = { responseHeaders: false }
2184
1777
  ) {
2185
- let invalidInput = [];
2186
- if (invalidInput.length) {
2187
- const error = new Error();
2188
- error.message = "Missing required field";
2189
- error.details = invalidInput;
2190
- return Promise.reject(new FDKClientValidationError(error));
2191
- }
2192
-
2193
1778
  const query_params = {};
2194
1779
 
2195
1780
  const xHeaders = {};
@@ -2227,14 +1812,6 @@ class Payment {
2227
1812
  { body, requestHeaders } = { requestHeaders: {} },
2228
1813
  { responseHeaders } = { responseHeaders: false }
2229
1814
  ) {
2230
- let invalidInput = [];
2231
- if (invalidInput.length) {
2232
- const error = new Error();
2233
- error.message = "Missing required field";
2234
- error.details = invalidInput;
2235
- return Promise.reject(new FDKClientValidationError(error));
2236
- }
2237
-
2238
1815
  const query_params = {};
2239
1816
 
2240
1817
  const xHeaders = {};
@@ -2272,14 +1849,6 @@ class Payment {
2272
1849
  { body, requestHeaders } = { requestHeaders: {} },
2273
1850
  { responseHeaders } = { responseHeaders: false }
2274
1851
  ) {
2275
- let invalidInput = [];
2276
- if (invalidInput.length) {
2277
- const error = new Error();
2278
- error.message = "Missing required field";
2279
- error.details = invalidInput;
2280
- return Promise.reject(new FDKClientValidationError(error));
2281
- }
2282
-
2283
1852
  const query_params = {};
2284
1853
 
2285
1854
  const xHeaders = {};