@gofynd/fdk-client-javascript 1.6.4 → 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 (146) 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 +20 -20
  6. package/sdk/application/Catalog/CatalogApplicationClient.js +98 -347
  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 +24 -2
  10. package/sdk/application/Configuration/ConfigurationApplicationClient.js +58 -137
  11. package/sdk/application/Content/ContentApplicationClient.d.ts +47 -7
  12. package/sdk/application/Content/ContentApplicationClient.js +222 -191
  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 +16 -56
  19. package/sdk/application/Logistic/LogisticApplicationClient.js +57 -332
  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 +2 -12
  23. package/sdk/application/Payment/PaymentApplicationClient.js +7 -487
  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/partner/FileStorage/FileStoragePartnerClient.d.ts +1 -55
  37. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +1 -408
  38. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +0 -5
  39. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +0 -37
  40. package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -0
  41. package/sdk/partner/Lead/LeadPartnerModel.js +2 -0
  42. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +29 -25
  43. package/sdk/partner/Logistics/LogisticsPartnerClient.js +65 -42
  44. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +1008 -794
  45. package/sdk/partner/Logistics/LogisticsPartnerModel.js +573 -460
  46. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +10 -5
  47. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +5 -0
  48. package/sdk/partner/Webhook/WebhookPartnerModel.js +2 -0
  49. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +5 -0
  50. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +2 -0
  51. package/sdk/platform/Cart/CartPlatformModel.d.ts +67 -9
  52. package/sdk/platform/Cart/CartPlatformModel.js +38 -5
  53. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1 -1
  54. package/sdk/platform/Catalog/CatalogPlatformClient.js +4 -4
  55. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +47 -13
  56. package/sdk/platform/Catalog/CatalogPlatformModel.js +29 -7
  57. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +2 -2
  58. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +7 -4
  59. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +71 -7
  60. package/sdk/platform/Communication/CommunicationPlatformModel.js +70 -6
  61. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +0 -27
  62. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +8 -60
  63. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +31 -20
  64. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +18 -18
  65. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +1 -1
  66. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +3 -3
  67. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +13 -0
  68. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +30 -1
  69. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +68 -11
  70. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +49 -7
  71. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +169 -0
  72. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1279 -132
  73. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +156 -1
  74. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +180 -0
  75. package/sdk/platform/Content/ContentPlatformClient.d.ts +162 -0
  76. package/sdk/platform/Content/ContentPlatformClient.js +1697 -497
  77. package/sdk/platform/Content/ContentPlatformModel.d.ts +1053 -35
  78. package/sdk/platform/Content/ContentPlatformModel.js +717 -34
  79. package/sdk/platform/Content/ContentPlatformValidator.d.ts +127 -1
  80. package/sdk/platform/Content/ContentPlatformValidator.js +171 -0
  81. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +34 -0
  82. package/sdk/platform/Discount/DiscountPlatformClient.js +59 -0
  83. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +365 -93
  84. package/sdk/platform/Discount/DiscountPlatformModel.js +98 -93
  85. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +54 -34
  86. package/sdk/platform/Discount/DiscountPlatformValidator.js +27 -17
  87. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +0 -156
  88. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +0 -1072
  89. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +1 -137
  90. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +0 -173
  91. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +1 -1105
  92. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +0 -1125
  93. package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -0
  94. package/sdk/platform/Lead/LeadPlatformModel.js +2 -0
  95. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +0 -10
  96. package/sdk/platform/Order/OrderPlatformApplicationClient.js +0 -92
  97. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +1 -28
  98. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +0 -18
  99. package/sdk/platform/Order/OrderPlatformClient.d.ts +212 -0
  100. package/sdk/platform/Order/OrderPlatformClient.js +397 -0
  101. package/sdk/platform/Order/OrderPlatformModel.d.ts +41 -9
  102. package/sdk/platform/Order/OrderPlatformModel.js +20 -7
  103. package/sdk/platform/Order/OrderPlatformValidator.d.ts +33 -1
  104. package/sdk/platform/Order/OrderPlatformValidator.js +20 -0
  105. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +58 -10
  106. package/sdk/platform/Partner/PartnerPlatformModel.js +19 -10
  107. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +12 -2
  108. package/sdk/platform/Payment/PaymentPlatformModel.js +8 -2
  109. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +5 -0
  110. package/sdk/platform/Rewards/RewardsPlatformModel.js +2 -0
  111. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +240 -24
  112. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +1753 -277
  113. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +320 -22
  114. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +269 -19
  115. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +53 -104
  116. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +201 -629
  117. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +5720 -2891
  118. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +3414 -2181
  119. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +138 -216
  120. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +81 -148
  121. package/sdk/platform/Share/SharePlatformModel.d.ts +5 -0
  122. package/sdk/platform/Share/SharePlatformModel.js +2 -0
  123. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +10 -0
  124. package/sdk/platform/User/UserPlatformApplicationClient.js +79 -0
  125. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +13 -1
  126. package/sdk/platform/User/UserPlatformApplicationValidator.js +12 -0
  127. package/sdk/platform/User/UserPlatformModel.d.ts +52 -1
  128. package/sdk/platform/User/UserPlatformModel.js +36 -0
  129. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +5 -0
  130. package/sdk/platform/Webhook/WebhookPlatformModel.js +2 -0
  131. package/sdk/public/Catalog/CatalogPublicClient.d.ts +1 -1
  132. package/sdk/public/Catalog/CatalogPublicClient.js +6 -11
  133. package/sdk/public/Configuration/ConfigurationPublicClient.js +1 -16
  134. package/sdk/public/Content/ContentPublicClient.d.ts +36 -3
  135. package/sdk/public/Content/ContentPublicClient.js +261 -104
  136. package/sdk/public/Content/ContentPublicModel.d.ts +155 -1
  137. package/sdk/public/Content/ContentPublicModel.js +102 -0
  138. package/sdk/public/Content/ContentPublicValidator.d.ts +18 -1
  139. package/sdk/public/Content/ContentPublicValidator.js +26 -0
  140. package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
  141. package/sdk/public/Partner/PartnerPublicClient.js +6 -11
  142. package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
  143. package/sdk/public/Partner/PartnerPublicModel.js +81 -71
  144. package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
  145. package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
  146. 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) {
@@ -61,8 +62,6 @@ class Payment {
61
62
  "/service/application/payment/v1.0/payment/request/link/",
62
63
  linkWallet:
63
64
  "/service/application/payment/v1.0/payment/options/wallet/verify",
64
- outstandingOrderDetails:
65
- "/service/application/payment/v1.0/payment/outstanding-orders/",
66
65
  paidOrderDetails:
67
66
  "/service/application/payment/v1.0/payment/paid-orders/",
68
67
  pollingPaymentLink:
@@ -119,14 +118,6 @@ class Payment {
119
118
  { body, requestHeaders } = { requestHeaders: {} },
120
119
  { responseHeaders } = { responseHeaders: false }
121
120
  ) {
122
- let invalidInput = [];
123
- if (invalidInput.length) {
124
- const error = new Error();
125
- error.message = "Missing required field";
126
- error.details = invalidInput;
127
- return Promise.reject(new FDKClientValidationError(error));
128
- }
129
-
130
121
  const query_params = {};
131
122
 
132
123
  const xHeaders = {};
@@ -164,14 +155,6 @@ class Payment {
164
155
  { body, requestHeaders } = { requestHeaders: {} },
165
156
  { responseHeaders } = { responseHeaders: false }
166
157
  ) {
167
- let invalidInput = [];
168
- if (invalidInput.length) {
169
- const error = new Error();
170
- error.message = "Missing required field";
171
- error.details = invalidInput;
172
- return Promise.reject(new FDKClientValidationError(error));
173
- }
174
-
175
158
  const query_params = {};
176
159
 
177
160
  const xHeaders = {};
@@ -209,14 +192,6 @@ class Payment {
209
192
  { body, requestHeaders } = { requestHeaders: {} },
210
193
  { responseHeaders } = { responseHeaders: false }
211
194
  ) {
212
- let invalidInput = [];
213
- if (invalidInput.length) {
214
- const error = new Error();
215
- error.message = "Missing required field";
216
- error.details = invalidInput;
217
- return Promise.reject(new FDKClientValidationError(error));
218
- }
219
-
220
195
  const query_params = {};
221
196
 
222
197
  const xHeaders = {};
@@ -254,14 +229,6 @@ class Payment {
254
229
  { body, requestHeaders } = { requestHeaders: {} },
255
230
  { responseHeaders } = { responseHeaders: false }
256
231
  ) {
257
- let invalidInput = [];
258
- if (invalidInput.length) {
259
- const error = new Error();
260
- error.message = "Missing required field";
261
- error.details = invalidInput;
262
- return Promise.reject(new FDKClientValidationError(error));
263
- }
264
-
265
232
  const query_params = {};
266
233
 
267
234
  const xHeaders = {};
@@ -299,18 +266,12 @@ class Payment {
299
266
  { cardInfo, aggregator, requestHeaders } = { requestHeaders: {} },
300
267
  { responseHeaders } = { responseHeaders: false }
301
268
  ) {
302
- let invalidInput = [];
303
-
304
- if (!cardInfo) {
305
- invalidInput.push({
306
- message: `The 'cardInfo' field is required.`,
307
- 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,
308
274
  });
309
- }
310
- if (invalidInput.length) {
311
- const error = new Error();
312
- error.message = "Missing required field";
313
- error.details = invalidInput;
314
275
  return Promise.reject(new FDKClientValidationError(error));
315
276
  }
316
277
 
@@ -352,14 +313,6 @@ class Payment {
352
313
  { body, requestHeaders } = { requestHeaders: {} },
353
314
  { responseHeaders } = { responseHeaders: false }
354
315
  ) {
355
- let invalidInput = [];
356
- if (invalidInput.length) {
357
- const error = new Error();
358
- error.message = "Missing required field";
359
- error.details = invalidInput;
360
- return Promise.reject(new FDKClientValidationError(error));
361
- }
362
-
363
316
  const query_params = {};
364
317
 
365
318
  const xHeaders = {};
@@ -397,14 +350,6 @@ class Payment {
397
350
  { body, requestHeaders } = { requestHeaders: {} },
398
351
  { responseHeaders } = { responseHeaders: false }
399
352
  ) {
400
- let invalidInput = [];
401
- if (invalidInput.length) {
402
- const error = new Error();
403
- error.message = "Missing required field";
404
- error.details = invalidInput;
405
- return Promise.reject(new FDKClientValidationError(error));
406
- }
407
-
408
353
  const query_params = {};
409
354
 
410
355
  const xHeaders = {};
@@ -442,14 +387,6 @@ class Payment {
442
387
  { aggregator, requestHeaders } = { requestHeaders: {} },
443
388
  { responseHeaders } = { responseHeaders: false }
444
389
  ) {
445
- let invalidInput = [];
446
- if (invalidInput.length) {
447
- const error = new Error();
448
- error.message = "Missing required field";
449
- error.details = invalidInput;
450
- return Promise.reject(new FDKClientValidationError(error));
451
- }
452
-
453
390
  const query_params = {};
454
391
  query_params["aggregator"] = aggregator;
455
392
 
@@ -488,14 +425,6 @@ class Payment {
488
425
  { body, requestHeaders } = { requestHeaders: {} },
489
426
  { responseHeaders } = { responseHeaders: false }
490
427
  ) {
491
- let invalidInput = [];
492
- if (invalidInput.length) {
493
- const error = new Error();
494
- error.message = "Missing required field";
495
- error.details = invalidInput;
496
- return Promise.reject(new FDKClientValidationError(error));
497
- }
498
-
499
428
  const query_params = {};
500
429
 
501
430
  const xHeaders = {};
@@ -533,14 +462,6 @@ class Payment {
533
462
  { body, requestHeaders } = { requestHeaders: {} },
534
463
  { responseHeaders } = { responseHeaders: false }
535
464
  ) {
536
- let invalidInput = [];
537
- if (invalidInput.length) {
538
- const error = new Error();
539
- error.message = "Missing required field";
540
- error.details = invalidInput;
541
- return Promise.reject(new FDKClientValidationError(error));
542
- }
543
-
544
465
  const query_params = {};
545
466
 
546
467
  const xHeaders = {};
@@ -578,14 +499,6 @@ class Payment {
578
499
  { body, requestHeaders } = { requestHeaders: {} },
579
500
  { responseHeaders } = { responseHeaders: false }
580
501
  ) {
581
- let invalidInput = [];
582
- if (invalidInput.length) {
583
- const error = new Error();
584
- error.message = "Missing required field";
585
- error.details = invalidInput;
586
- return Promise.reject(new FDKClientValidationError(error));
587
- }
588
-
589
502
  const query_params = {};
590
503
 
591
504
  const xHeaders = {};
@@ -623,14 +536,6 @@ class Payment {
623
536
  { aggregator, requestHeaders } = { requestHeaders: {} },
624
537
  { responseHeaders } = { responseHeaders: false }
625
538
  ) {
626
- let invalidInput = [];
627
- if (invalidInput.length) {
628
- const error = new Error();
629
- error.message = "Missing required field";
630
- error.details = invalidInput;
631
- return Promise.reject(new FDKClientValidationError(error));
632
- }
633
-
634
539
  const query_params = {};
635
540
  query_params["aggregator"] = aggregator;
636
541
 
@@ -669,14 +574,6 @@ class Payment {
669
574
  { body, requestHeaders } = { requestHeaders: {} },
670
575
  { responseHeaders } = { responseHeaders: false }
671
576
  ) {
672
- let invalidInput = [];
673
- if (invalidInput.length) {
674
- const error = new Error();
675
- error.message = "Missing required field";
676
- error.details = invalidInput;
677
- return Promise.reject(new FDKClientValidationError(error));
678
- }
679
-
680
577
  const query_params = {};
681
578
 
682
579
  const xHeaders = {};
@@ -714,14 +611,6 @@ class Payment {
714
611
  { body, requestHeaders } = { requestHeaders: {} },
715
612
  { responseHeaders } = { responseHeaders: false }
716
613
  ) {
717
- let invalidInput = [];
718
- if (invalidInput.length) {
719
- const error = new Error();
720
- error.message = "Missing required field";
721
- error.details = invalidInput;
722
- return Promise.reject(new FDKClientValidationError(error));
723
- }
724
-
725
614
  const query_params = {};
726
615
 
727
616
  const xHeaders = {};
@@ -759,14 +648,6 @@ class Payment {
759
648
  { body, requestHeaders } = { requestHeaders: {} },
760
649
  { responseHeaders } = { responseHeaders: false }
761
650
  ) {
762
- let invalidInput = [];
763
- if (invalidInput.length) {
764
- const error = new Error();
765
- error.message = "Missing required field";
766
- error.details = invalidInput;
767
- return Promise.reject(new FDKClientValidationError(error));
768
- }
769
-
770
651
  const query_params = {};
771
652
 
772
653
  const xHeaders = {};
@@ -804,14 +685,6 @@ class Payment {
804
685
  { body, requestHeaders } = { requestHeaders: {} },
805
686
  { responseHeaders } = { responseHeaders: false }
806
687
  ) {
807
- let invalidInput = [];
808
- if (invalidInput.length) {
809
- const error = new Error();
810
- error.message = "Missing required field";
811
- error.details = invalidInput;
812
- return Promise.reject(new FDKClientValidationError(error));
813
- }
814
-
815
688
  const query_params = {};
816
689
 
817
690
  const xHeaders = {};
@@ -849,14 +722,6 @@ class Payment {
849
722
  { refresh, requestHeaders } = { requestHeaders: {} },
850
723
  { responseHeaders } = { responseHeaders: false }
851
724
  ) {
852
- let invalidInput = [];
853
- if (invalidInput.length) {
854
- const error = new Error();
855
- error.message = "Missing required field";
856
- error.details = invalidInput;
857
- return Promise.reject(new FDKClientValidationError(error));
858
- }
859
-
860
725
  const query_params = {};
861
726
  query_params["refresh"] = refresh;
862
727
 
@@ -895,14 +760,6 @@ class Payment {
895
760
  { requestHeaders } = { requestHeaders: {} },
896
761
  { responseHeaders } = { responseHeaders: false }
897
762
  ) {
898
- let invalidInput = [];
899
- if (invalidInput.length) {
900
- const error = new Error();
901
- error.message = "Missing required field";
902
- error.details = invalidInput;
903
- return Promise.reject(new FDKClientValidationError(error));
904
- }
905
-
906
763
  const query_params = {};
907
764
 
908
765
  const xHeaders = {};
@@ -940,14 +797,6 @@ class Payment {
940
797
  { forceRefresh, requestHeaders } = { requestHeaders: {} },
941
798
  { responseHeaders } = { responseHeaders: false }
942
799
  ) {
943
- let invalidInput = [];
944
- if (invalidInput.length) {
945
- const error = new Error();
946
- error.message = "Missing required field";
947
- error.details = invalidInput;
948
- return Promise.reject(new FDKClientValidationError(error));
949
- }
950
-
951
800
  const query_params = {};
952
801
  query_params["force_refresh"] = forceRefresh;
953
802
 
@@ -983,22 +832,13 @@ class Payment {
983
832
  * @description: Get aggregator secret key of all payment gateways utilized for payments when using the SDK for the payment gateway. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getAggregatorsConfig/).
984
833
  */
985
834
  async getAggregatorsConfig(
986
- { xApiToken, refresh, requestHeaders } = { requestHeaders: {} },
835
+ { refresh, requestHeaders } = { requestHeaders: {} },
987
836
  { responseHeaders } = { responseHeaders: false }
988
837
  ) {
989
- let invalidInput = [];
990
- if (invalidInput.length) {
991
- const error = new Error();
992
- error.message = "Missing required field";
993
- error.details = invalidInput;
994
- return Promise.reject(new FDKClientValidationError(error));
995
- }
996
-
997
838
  const query_params = {};
998
839
  query_params["refresh"] = refresh;
999
840
 
1000
841
  const xHeaders = {};
1001
- xHeaders["x-api-token"] = xApiToken;
1002
842
 
1003
843
  const response = await ApplicationAPIClient.execute(
1004
844
  this._conf,
@@ -1033,14 +873,6 @@ class Payment {
1033
873
  { requestHeaders } = { requestHeaders: {} },
1034
874
  { responseHeaders } = { responseHeaders: false }
1035
875
  ) {
1036
- let invalidInput = [];
1037
- if (invalidInput.length) {
1038
- const error = new Error();
1039
- error.message = "Missing required field";
1040
- error.details = invalidInput;
1041
- return Promise.reject(new FDKClientValidationError(error));
1042
- }
1043
-
1044
876
  const query_params = {};
1045
877
 
1046
878
  const xHeaders = {};
@@ -1078,21 +910,6 @@ class Payment {
1078
910
  { orderId, requestHeaders } = { requestHeaders: {} },
1079
911
  { responseHeaders } = { responseHeaders: false }
1080
912
  ) {
1081
- let invalidInput = [];
1082
-
1083
- if (!orderId) {
1084
- invalidInput.push({
1085
- message: `The 'orderId' field is required.`,
1086
- path: ["orderId"],
1087
- });
1088
- }
1089
- if (invalidInput.length) {
1090
- const error = new Error();
1091
- error.message = "Missing required field";
1092
- error.details = invalidInput;
1093
- return Promise.reject(new FDKClientValidationError(error));
1094
- }
1095
-
1096
913
  const query_params = {};
1097
914
  query_params["order_id"] = orderId;
1098
915
 
@@ -1131,14 +948,6 @@ class Payment {
1131
948
  { paymentLinkId, requestHeaders } = { requestHeaders: {} },
1132
949
  { responseHeaders } = { responseHeaders: false }
1133
950
  ) {
1134
- let invalidInput = [];
1135
- if (invalidInput.length) {
1136
- const error = new Error();
1137
- error.message = "Missing required field";
1138
- error.details = invalidInput;
1139
- return Promise.reject(new FDKClientValidationError(error));
1140
- }
1141
-
1142
951
  const query_params = {};
1143
952
  query_params["payment_link_id"] = paymentLinkId;
1144
953
 
@@ -1189,27 +998,6 @@ class Payment {
1189
998
  } = { requestHeaders: {} },
1190
999
  { responseHeaders } = { responseHeaders: false }
1191
1000
  ) {
1192
- let invalidInput = [];
1193
-
1194
- if (!amount) {
1195
- invalidInput.push({
1196
- message: `The 'amount' field is required.`,
1197
- path: ["amount"],
1198
- });
1199
- }
1200
- if (!cartId) {
1201
- invalidInput.push({
1202
- message: `The 'cartId' field is required.`,
1203
- path: ["cartId"],
1204
- });
1205
- }
1206
- if (invalidInput.length) {
1207
- const error = new Error();
1208
- error.message = "Missing required field";
1209
- error.details = invalidInput;
1210
- return Promise.reject(new FDKClientValidationError(error));
1211
- }
1212
-
1213
1001
  const query_params = {};
1214
1002
  query_params["amount"] = amount;
1215
1003
  query_params["cart_id"] = cartId;
@@ -1257,21 +1045,6 @@ class Payment {
1257
1045
  { paymentLinkId, requestHeaders } = { requestHeaders: {} },
1258
1046
  { responseHeaders } = { responseHeaders: false }
1259
1047
  ) {
1260
- let invalidInput = [];
1261
-
1262
- if (!paymentLinkId) {
1263
- invalidInput.push({
1264
- message: `The 'paymentLinkId' field is required.`,
1265
- path: ["paymentLinkId"],
1266
- });
1267
- }
1268
- if (invalidInput.length) {
1269
- const error = new Error();
1270
- error.message = "Missing required field";
1271
- error.details = invalidInput;
1272
- return Promise.reject(new FDKClientValidationError(error));
1273
- }
1274
-
1275
1048
  const query_params = {};
1276
1049
  query_params["payment_link_id"] = paymentLinkId;
1277
1050
 
@@ -1320,39 +1093,6 @@ class Payment {
1320
1093
  } = { requestHeaders: {} },
1321
1094
  { responseHeaders } = { responseHeaders: false }
1322
1095
  ) {
1323
- let invalidInput = [];
1324
-
1325
- if (!amount) {
1326
- invalidInput.push({
1327
- message: `The 'amount' field is required.`,
1328
- path: ["amount"],
1329
- });
1330
- }
1331
- if (!cartId) {
1332
- invalidInput.push({
1333
- message: `The 'cartId' field is required.`,
1334
- path: ["cartId"],
1335
- });
1336
- }
1337
- if (!pincode) {
1338
- invalidInput.push({
1339
- message: `The 'pincode' field is required.`,
1340
- path: ["pincode"],
1341
- });
1342
- }
1343
- if (!orderType) {
1344
- invalidInput.push({
1345
- message: `The 'orderType' field is required.`,
1346
- path: ["orderType"],
1347
- });
1348
- }
1349
- if (invalidInput.length) {
1350
- const error = new Error();
1351
- error.message = "Missing required field";
1352
- error.details = invalidInput;
1353
- return Promise.reject(new FDKClientValidationError(error));
1354
- }
1355
-
1356
1096
  const query_params = {};
1357
1097
  query_params["amount"] = amount;
1358
1098
  query_params["cart_id"] = cartId;
@@ -1398,14 +1138,6 @@ class Payment {
1398
1138
  { requestHeaders } = { requestHeaders: {} },
1399
1139
  { responseHeaders } = { responseHeaders: false }
1400
1140
  ) {
1401
- let invalidInput = [];
1402
- if (invalidInput.length) {
1403
- const error = new Error();
1404
- error.message = "Missing required field";
1405
- error.details = invalidInput;
1406
- return Promise.reject(new FDKClientValidationError(error));
1407
- }
1408
-
1409
1141
  const query_params = {};
1410
1142
 
1411
1143
  const xHeaders = {};
@@ -1443,21 +1175,6 @@ class Payment {
1443
1175
  { orderId, requestHeaders } = { requestHeaders: {} },
1444
1176
  { responseHeaders } = { responseHeaders: false }
1445
1177
  ) {
1446
- let invalidInput = [];
1447
-
1448
- if (!orderId) {
1449
- invalidInput.push({
1450
- message: `The 'orderId' field is required.`,
1451
- path: ["orderId"],
1452
- });
1453
- }
1454
- if (invalidInput.length) {
1455
- const error = new Error();
1456
- error.message = "Missing required field";
1457
- error.details = invalidInput;
1458
- return Promise.reject(new FDKClientValidationError(error));
1459
- }
1460
-
1461
1178
  const query_params = {};
1462
1179
  query_params["order_id"] = orderId;
1463
1180
 
@@ -1496,14 +1213,6 @@ class Payment {
1496
1213
  { body, requestHeaders } = { requestHeaders: {} },
1497
1214
  { responseHeaders } = { responseHeaders: false }
1498
1215
  ) {
1499
- let invalidInput = [];
1500
- if (invalidInput.length) {
1501
- const error = new Error();
1502
- error.message = "Missing required field";
1503
- error.details = invalidInput;
1504
- return Promise.reject(new FDKClientValidationError(error));
1505
- }
1506
-
1507
1216
  const query_params = {};
1508
1217
 
1509
1218
  const xHeaders = {};
@@ -1541,14 +1250,6 @@ class Payment {
1541
1250
  { body, requestHeaders } = { requestHeaders: {} },
1542
1251
  { responseHeaders } = { responseHeaders: false }
1543
1252
  ) {
1544
- let invalidInput = [];
1545
- if (invalidInput.length) {
1546
- const error = new Error();
1547
- error.message = "Missing required field";
1548
- error.details = invalidInput;
1549
- return Promise.reject(new FDKClientValidationError(error));
1550
- }
1551
-
1552
1253
  const query_params = {};
1553
1254
 
1554
1255
  const xHeaders = {};
@@ -1586,14 +1287,6 @@ class Payment {
1586
1287
  { body, requestHeaders } = { requestHeaders: {} },
1587
1288
  { responseHeaders } = { responseHeaders: false }
1588
1289
  ) {
1589
- let invalidInput = [];
1590
- if (invalidInput.length) {
1591
- const error = new Error();
1592
- error.message = "Missing required field";
1593
- error.details = invalidInput;
1594
- return Promise.reject(new FDKClientValidationError(error));
1595
- }
1596
-
1597
1290
  const query_params = {};
1598
1291
 
1599
1292
  const xHeaders = {};
@@ -1619,52 +1312,6 @@ class Payment {
1619
1312
  return response;
1620
1313
  }
1621
1314
 
1622
- /**
1623
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1624
- * @param {import("../ApplicationAPIClient").Options} - Options
1625
- * @returns {Promise<OutstandingOrderDetails>} - Success response
1626
- * @name outstandingOrderDetails
1627
- * @summary: Outstanding orders
1628
- * @description: Get details of orders with outstanding payments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/outstandingOrderDetails/).
1629
- */
1630
- async outstandingOrderDetails(
1631
- { aggregator, requestHeaders } = { requestHeaders: {} },
1632
- { responseHeaders } = { responseHeaders: false }
1633
- ) {
1634
- let invalidInput = [];
1635
- if (invalidInput.length) {
1636
- const error = new Error();
1637
- error.message = "Missing required field";
1638
- error.details = invalidInput;
1639
- return Promise.reject(new FDKClientValidationError(error));
1640
- }
1641
-
1642
- const query_params = {};
1643
- query_params["aggregator"] = aggregator;
1644
-
1645
- const xHeaders = {};
1646
-
1647
- const response = await ApplicationAPIClient.execute(
1648
- this._conf,
1649
- "get",
1650
- constructUrl({
1651
- url: this._urls["outstandingOrderDetails"],
1652
- params: {},
1653
- }),
1654
- query_params,
1655
- undefined,
1656
- { ...xHeaders, ...requestHeaders },
1657
- { responseHeaders }
1658
- );
1659
-
1660
- let responseData = response;
1661
- if (responseHeaders) {
1662
- responseData = response[0];
1663
- }
1664
-
1665
- return response;
1666
- }
1667
-
1668
1315
  /**
1669
1316
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1670
1317
  * @param {import("../ApplicationAPIClient").Options} - Options
@@ -1677,14 +1324,6 @@ class Payment {
1677
1324
  { aggregator, requestHeaders } = { requestHeaders: {} },
1678
1325
  { responseHeaders } = { responseHeaders: false }
1679
1326
  ) {
1680
- let invalidInput = [];
1681
- if (invalidInput.length) {
1682
- const error = new Error();
1683
- error.message = "Missing required field";
1684
- error.details = invalidInput;
1685
- return Promise.reject(new FDKClientValidationError(error));
1686
- }
1687
-
1688
1327
  const query_params = {};
1689
1328
  query_params["aggregator"] = aggregator;
1690
1329
 
@@ -1723,14 +1362,6 @@ class Payment {
1723
1362
  { paymentLinkId, requestHeaders } = { requestHeaders: {} },
1724
1363
  { responseHeaders } = { responseHeaders: false }
1725
1364
  ) {
1726
- let invalidInput = [];
1727
- if (invalidInput.length) {
1728
- const error = new Error();
1729
- error.message = "Missing required field";
1730
- error.details = invalidInput;
1731
- return Promise.reject(new FDKClientValidationError(error));
1732
- }
1733
-
1734
1365
  const query_params = {};
1735
1366
  query_params["payment_link_id"] = paymentLinkId;
1736
1367
 
@@ -1769,21 +1400,6 @@ class Payment {
1769
1400
  { aggregator, source, requestHeaders } = { requestHeaders: {} },
1770
1401
  { responseHeaders } = { responseHeaders: false }
1771
1402
  ) {
1772
- let invalidInput = [];
1773
-
1774
- if (!aggregator) {
1775
- invalidInput.push({
1776
- message: `The 'aggregator' field is required.`,
1777
- path: ["aggregator"],
1778
- });
1779
- }
1780
- if (invalidInput.length) {
1781
- const error = new Error();
1782
- error.message = "Missing required field";
1783
- error.details = invalidInput;
1784
- return Promise.reject(new FDKClientValidationError(error));
1785
- }
1786
-
1787
1403
  const query_params = {};
1788
1404
  query_params["source"] = source;
1789
1405
  query_params["aggregator"] = aggregator;
@@ -1823,14 +1439,6 @@ class Payment {
1823
1439
  { body, requestHeaders } = { requestHeaders: {} },
1824
1440
  { responseHeaders } = { responseHeaders: false }
1825
1441
  ) {
1826
- let invalidInput = [];
1827
- if (invalidInput.length) {
1828
- const error = new Error();
1829
- error.message = "Missing required field";
1830
- error.details = invalidInput;
1831
- return Promise.reject(new FDKClientValidationError(error));
1832
- }
1833
-
1834
1442
  const query_params = {};
1835
1443
 
1836
1444
  const xHeaders = {};
@@ -1868,14 +1476,6 @@ class Payment {
1868
1476
  { body, requestHeaders } = { requestHeaders: {} },
1869
1477
  { responseHeaders } = { responseHeaders: false }
1870
1478
  ) {
1871
- let invalidInput = [];
1872
- if (invalidInput.length) {
1873
- const error = new Error();
1874
- error.message = "Missing required field";
1875
- error.details = invalidInput;
1876
- return Promise.reject(new FDKClientValidationError(error));
1877
- }
1878
-
1879
1479
  const query_params = {};
1880
1480
 
1881
1481
  const xHeaders = {};
@@ -1913,14 +1513,6 @@ class Payment {
1913
1513
  { body, requestHeaders } = { requestHeaders: {} },
1914
1514
  { responseHeaders } = { responseHeaders: false }
1915
1515
  ) {
1916
- let invalidInput = [];
1917
- if (invalidInput.length) {
1918
- const error = new Error();
1919
- error.message = "Missing required field";
1920
- error.details = invalidInput;
1921
- return Promise.reject(new FDKClientValidationError(error));
1922
- }
1923
-
1924
1516
  const query_params = {};
1925
1517
 
1926
1518
  const xHeaders = {};
@@ -1958,14 +1550,6 @@ class Payment {
1958
1550
  { body, requestHeaders } = { requestHeaders: {} },
1959
1551
  { responseHeaders } = { responseHeaders: false }
1960
1552
  ) {
1961
- let invalidInput = [];
1962
- if (invalidInput.length) {
1963
- const error = new Error();
1964
- error.message = "Missing required field";
1965
- error.details = invalidInput;
1966
- return Promise.reject(new FDKClientValidationError(error));
1967
- }
1968
-
1969
1553
  const query_params = {};
1970
1554
 
1971
1555
  const xHeaders = {};
@@ -2003,14 +1587,6 @@ class Payment {
2003
1587
  { body, requestHeaders } = { requestHeaders: {} },
2004
1588
  { responseHeaders } = { responseHeaders: false }
2005
1589
  ) {
2006
- let invalidInput = [];
2007
- if (invalidInput.length) {
2008
- const error = new Error();
2009
- error.message = "Missing required field";
2010
- error.details = invalidInput;
2011
- return Promise.reject(new FDKClientValidationError(error));
2012
- }
2013
-
2014
1590
  const query_params = {};
2015
1591
 
2016
1592
  const xHeaders = {};
@@ -2048,14 +1624,6 @@ class Payment {
2048
1624
  { body, requestHeaders } = { requestHeaders: {} },
2049
1625
  { responseHeaders } = { responseHeaders: false }
2050
1626
  ) {
2051
- let invalidInput = [];
2052
- if (invalidInput.length) {
2053
- const error = new Error();
2054
- error.message = "Missing required field";
2055
- error.details = invalidInput;
2056
- return Promise.reject(new FDKClientValidationError(error));
2057
- }
2058
-
2059
1627
  const query_params = {};
2060
1628
 
2061
1629
  const xHeaders = {};
@@ -2093,14 +1661,6 @@ class Payment {
2093
1661
  { body, requestHeaders } = { requestHeaders: {} },
2094
1662
  { responseHeaders } = { responseHeaders: false }
2095
1663
  ) {
2096
- let invalidInput = [];
2097
- if (invalidInput.length) {
2098
- const error = new Error();
2099
- error.message = "Missing required field";
2100
- error.details = invalidInput;
2101
- return Promise.reject(new FDKClientValidationError(error));
2102
- }
2103
-
2104
1664
  const query_params = {};
2105
1665
 
2106
1666
  const xHeaders = {};
@@ -2138,14 +1698,6 @@ class Payment {
2138
1698
  { body, requestHeaders } = { requestHeaders: {} },
2139
1699
  { responseHeaders } = { responseHeaders: false }
2140
1700
  ) {
2141
- let invalidInput = [];
2142
- if (invalidInput.length) {
2143
- const error = new Error();
2144
- error.message = "Missing required field";
2145
- error.details = invalidInput;
2146
- return Promise.reject(new FDKClientValidationError(error));
2147
- }
2148
-
2149
1701
  const query_params = {};
2150
1702
 
2151
1703
  const xHeaders = {};
@@ -2183,14 +1735,6 @@ class Payment {
2183
1735
  { ifscCode, requestHeaders } = { requestHeaders: {} },
2184
1736
  { responseHeaders } = { responseHeaders: false }
2185
1737
  ) {
2186
- let invalidInput = [];
2187
- if (invalidInput.length) {
2188
- const error = new Error();
2189
- error.message = "Missing required field";
2190
- error.details = invalidInput;
2191
- return Promise.reject(new FDKClientValidationError(error));
2192
- }
2193
-
2194
1738
  const query_params = {};
2195
1739
  query_params["ifsc_code"] = ifscCode;
2196
1740
 
@@ -2229,14 +1773,6 @@ class Payment {
2229
1773
  { body, requestHeaders } = { requestHeaders: {} },
2230
1774
  { responseHeaders } = { responseHeaders: false }
2231
1775
  ) {
2232
- let invalidInput = [];
2233
- if (invalidInput.length) {
2234
- const error = new Error();
2235
- error.message = "Missing required field";
2236
- error.details = invalidInput;
2237
- return Promise.reject(new FDKClientValidationError(error));
2238
- }
2239
-
2240
1776
  const query_params = {};
2241
1777
 
2242
1778
  const xHeaders = {};
@@ -2274,14 +1810,6 @@ class Payment {
2274
1810
  { body, requestHeaders } = { requestHeaders: {} },
2275
1811
  { responseHeaders } = { responseHeaders: false }
2276
1812
  ) {
2277
- let invalidInput = [];
2278
- if (invalidInput.length) {
2279
- const error = new Error();
2280
- error.message = "Missing required field";
2281
- error.details = invalidInput;
2282
- return Promise.reject(new FDKClientValidationError(error));
2283
- }
2284
-
2285
1813
  const query_params = {};
2286
1814
 
2287
1815
  const xHeaders = {};
@@ -2319,14 +1847,6 @@ class Payment {
2319
1847
  { body, requestHeaders } = { requestHeaders: {} },
2320
1848
  { responseHeaders } = { responseHeaders: false }
2321
1849
  ) {
2322
- let invalidInput = [];
2323
- if (invalidInput.length) {
2324
- const error = new Error();
2325
- error.message = "Missing required field";
2326
- error.details = invalidInput;
2327
- return Promise.reject(new FDKClientValidationError(error));
2328
- }
2329
-
2330
1850
  const query_params = {};
2331
1851
 
2332
1852
  const xHeaders = {};