@gofynd/fdk-client-javascript 1.4.15-beta.3 → 1.4.15-beta.5

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 (241) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/sdk/application/ApplicationClient.d.ts +0 -2
  4. package/sdk/application/ApplicationClient.js +0 -2
  5. package/sdk/application/Cart/CartApplicationClient.d.ts +48 -68
  6. package/sdk/application/Cart/CartApplicationClient.js +304 -114
  7. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +58 -59
  8. package/sdk/application/Catalog/CatalogApplicationClient.js +437 -30
  9. package/sdk/application/Common/CommonApplicationClient.d.ts +2 -2
  10. package/sdk/application/Common/CommonApplicationClient.js +22 -1
  11. package/sdk/application/Communication/CommunicationApplicationClient.js +29 -0
  12. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +20 -20
  13. package/sdk/application/Configuration/ConfigurationApplicationClient.js +157 -10
  14. package/sdk/application/Content/ContentApplicationClient.d.ts +30 -19
  15. package/sdk/application/Content/ContentApplicationClient.js +297 -28
  16. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +8 -8
  17. package/sdk/application/FileStorage/FileStorageApplicationClient.js +50 -7
  18. package/sdk/application/Lead/LeadApplicationClient.d.ts +2 -2
  19. package/sdk/application/Lead/LeadApplicationClient.js +74 -1
  20. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +15 -35
  21. package/sdk/application/Logistic/LogisticApplicationClient.js +159 -87
  22. package/sdk/application/Order/OrderApplicationClient.d.ts +12 -22
  23. package/sdk/application/Order/OrderApplicationClient.js +195 -47
  24. package/sdk/application/Payment/PaymentApplicationClient.d.ts +87 -87
  25. package/sdk/application/Payment/PaymentApplicationClient.js +473 -46
  26. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +13 -13
  27. package/sdk/application/Rewards/RewardsApplicationClient.js +75 -7
  28. package/sdk/application/Share/ShareApplicationClient.js +96 -0
  29. package/sdk/application/Theme/ThemeApplicationClient.d.ts +2 -2
  30. package/sdk/application/Theme/ThemeApplicationClient.js +66 -4
  31. package/sdk/application/User/UserApplicationClient.d.ts +10 -10
  32. package/sdk/application/User/UserApplicationClient.js +418 -6
  33. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +4 -4
  34. package/sdk/application/Webhook/WebhookApplicationClient.js +16 -3
  35. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +12 -86
  36. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +24 -582
  37. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +19 -116
  38. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +14 -121
  39. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +1 -8
  40. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +4 -51
  41. package/sdk/partner/Lead/LeadPartnerClient.d.ts +2 -2
  42. package/sdk/partner/Lead/LeadPartnerClient.js +2 -2
  43. package/sdk/partner/Lead/LeadPartnerModel.d.ts +5 -5
  44. package/sdk/partner/Lead/LeadPartnerModel.js +15 -15
  45. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +20 -126
  46. package/sdk/partner/Logistics/LogisticsPartnerClient.js +20 -970
  47. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +167 -1200
  48. package/sdk/partner/Logistics/LogisticsPartnerModel.js +160 -571
  49. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +0 -10
  50. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +7 -121
  51. package/sdk/partner/OAuthClient.js +1 -0
  52. package/sdk/partner/Theme/ThemePartnerClient.d.ts +10 -8
  53. package/sdk/partner/Theme/ThemePartnerClient.js +16 -14
  54. package/sdk/partner/Theme/ThemePartnerModel.d.ts +39 -135
  55. package/sdk/partner/Theme/ThemePartnerModel.js +38 -114
  56. package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
  57. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +18 -28
  58. package/sdk/partner/Webhook/WebhookPartnerClient.js +18 -103
  59. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +179 -612
  60. package/sdk/partner/Webhook/WebhookPartnerModel.js +150 -253
  61. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +0 -1
  62. package/sdk/partner/Webhook/WebhookPartnerValidator.js +3 -11
  63. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +4 -5
  64. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +8 -14
  65. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +9 -59
  66. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +4 -40
  67. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +32 -2
  68. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +243 -3
  69. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +130 -11
  70. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +152 -12
  71. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +39 -1
  72. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +35 -0
  73. package/sdk/platform/Billing/BillingPlatformClient.d.ts +12 -12
  74. package/sdk/platform/Billing/BillingPlatformClient.js +15 -15
  75. package/sdk/platform/Billing/BillingPlatformModel.d.ts +388 -443
  76. package/sdk/platform/Billing/BillingPlatformModel.js +263 -280
  77. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +18 -16
  78. package/sdk/platform/Billing/BillingPlatformValidator.js +9 -8
  79. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +103 -134
  80. package/sdk/platform/Cart/CartPlatformApplicationClient.js +115 -419
  81. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +65 -118
  82. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +44 -109
  83. package/sdk/platform/Cart/CartPlatformModel.d.ts +1298 -5037
  84. package/sdk/platform/Cart/CartPlatformModel.js +1217 -1976
  85. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +183 -209
  86. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +400 -457
  87. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +142 -185
  88. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +78 -96
  89. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +117 -154
  90. package/sdk/platform/Catalog/CatalogPlatformClient.js +172 -292
  91. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +1647 -6385
  92. package/sdk/platform/Catalog/CatalogPlatformModel.js +1680 -3217
  93. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +31 -72
  94. package/sdk/platform/Catalog/CatalogPlatformValidator.js +24 -50
  95. package/sdk/platform/Common/CommonPlatformClient.d.ts +2 -3
  96. package/sdk/platform/Common/CommonPlatformClient.js +2 -3
  97. package/sdk/platform/Common/CommonPlatformModel.d.ts +9 -9
  98. package/sdk/platform/Common/CommonPlatformModel.js +6 -6
  99. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +17 -16
  100. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +17 -16
  101. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +8 -8
  102. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +8 -8
  103. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +33 -43
  104. package/sdk/platform/Communication/CommunicationPlatformModel.js +34 -38
  105. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +42 -46
  106. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +43 -47
  107. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +223 -223
  108. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +212 -210
  109. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
  110. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
  111. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +33 -46
  112. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +54 -67
  113. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +18 -18
  114. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +18 -18
  115. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +24 -45
  116. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +30 -134
  117. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +131 -283
  118. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +97 -219
  119. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +9 -37
  120. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +8 -27
  121. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +141 -124
  122. package/sdk/platform/Content/ContentPlatformApplicationClient.js +422 -449
  123. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +141 -179
  124. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +130 -168
  125. package/sdk/platform/Content/ContentPlatformClient.d.ts +106 -142
  126. package/sdk/platform/Content/ContentPlatformClient.js +336 -523
  127. package/sdk/platform/Content/ContentPlatformModel.d.ts +395 -1241
  128. package/sdk/platform/Content/ContentPlatformModel.js +390 -521
  129. package/sdk/platform/Content/ContentPlatformValidator.d.ts +117 -168
  130. package/sdk/platform/Content/ContentPlatformValidator.js +108 -162
  131. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +12 -14
  132. package/sdk/platform/Discount/DiscountPlatformClient.js +12 -14
  133. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +13 -13
  134. package/sdk/platform/Discount/DiscountPlatformModel.js +12 -12
  135. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +2 -2
  136. package/sdk/platform/Discount/DiscountPlatformValidator.js +2 -2
  137. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +36 -94
  138. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +60 -462
  139. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +15 -62
  140. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +13 -75
  141. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +19 -19
  142. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +21 -21
  143. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +101 -370
  144. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +84 -313
  145. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
  146. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
  147. package/sdk/platform/Finance/FinancePlatformClient.d.ts +320 -0
  148. package/sdk/platform/Finance/FinancePlatformClient.js +2333 -0
  149. package/sdk/platform/Finance/FinancePlatformModel.d.ts +2890 -0
  150. package/sdk/platform/Finance/FinancePlatformModel.js +2148 -0
  151. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +284 -0
  152. package/sdk/platform/Finance/FinancePlatformValidator.js +354 -0
  153. package/sdk/platform/Lead/LeadPlatformClient.d.ts +2 -2
  154. package/sdk/platform/Lead/LeadPlatformClient.js +2 -2
  155. package/sdk/platform/Lead/LeadPlatformModel.d.ts +5 -5
  156. package/sdk/platform/Lead/LeadPlatformModel.js +16 -16
  157. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +6 -17
  158. package/sdk/platform/Order/OrderPlatformApplicationClient.js +7 -85
  159. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +24 -95
  160. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +19 -39
  161. package/sdk/platform/Order/OrderPlatformClient.d.ts +96 -153
  162. package/sdk/platform/Order/OrderPlatformClient.js +198 -416
  163. package/sdk/platform/Order/OrderPlatformModel.d.ts +1286 -7619
  164. package/sdk/platform/Order/OrderPlatformModel.js +1265 -3922
  165. package/sdk/platform/Order/OrderPlatformValidator.d.ts +109 -270
  166. package/sdk/platform/Order/OrderPlatformValidator.js +77 -135
  167. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -6
  168. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +7 -9
  169. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +9 -9
  170. package/sdk/platform/Partner/PartnerPlatformModel.js +8 -8
  171. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +105 -93
  172. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +141 -129
  173. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +48 -48
  174. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +48 -48
  175. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -20
  176. package/sdk/platform/Payment/PaymentPlatformClient.js +20 -20
  177. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +319 -333
  178. package/sdk/platform/Payment/PaymentPlatformModel.js +278 -288
  179. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
  180. package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
  181. package/sdk/platform/PlatformClient.d.ts +2 -0
  182. package/sdk/platform/PlatformClient.js +4 -0
  183. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +2 -2
  184. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +2 -2
  185. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +2 -2
  186. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +2 -2
  187. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +9 -9
  188. package/sdk/platform/Rewards/RewardsPlatformModel.js +8 -8
  189. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +36 -46
  190. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +41 -132
  191. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +17 -46
  192. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +14 -34
  193. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +46 -40
  194. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +64 -58
  195. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +612 -1845
  196. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +554 -886
  197. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +46 -42
  198. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +28 -26
  199. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +2 -2
  200. package/sdk/platform/Share/SharePlatformApplicationClient.js +2 -2
  201. package/sdk/platform/Share/SharePlatformModel.d.ts +5 -36
  202. package/sdk/platform/Share/SharePlatformModel.js +4 -27
  203. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +3 -3
  204. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +4 -8
  205. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +0 -5
  206. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +0 -2
  207. package/sdk/platform/Theme/ThemePlatformModel.d.ts +13 -76
  208. package/sdk/platform/Theme/ThemePlatformModel.js +17 -57
  209. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +12 -12
  210. package/sdk/platform/User/UserPlatformApplicationClient.js +12 -12
  211. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +2 -2
  212. package/sdk/platform/User/UserPlatformApplicationValidator.js +2 -2
  213. package/sdk/platform/User/UserPlatformModel.d.ts +21 -21
  214. package/sdk/platform/User/UserPlatformModel.js +23 -23
  215. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +78 -25
  216. package/sdk/platform/Webhook/WebhookPlatformClient.js +470 -75
  217. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +427 -720
  218. package/sdk/platform/Webhook/WebhookPlatformModel.js +386 -410
  219. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +55 -10
  220. package/sdk/platform/Webhook/WebhookPlatformValidator.js +72 -12
  221. package/sdk/platform/index.d.ts +1 -0
  222. package/sdk/platform/index.js +2 -0
  223. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +2 -3
  224. package/sdk/public/Configuration/ConfigurationPublicClient.js +21 -6
  225. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +9 -9
  226. package/sdk/public/Configuration/ConfigurationPublicModel.js +6 -6
  227. package/sdk/public/Content/ContentPublicClient.d.ts +2 -112
  228. package/sdk/public/Content/ContentPublicClient.js +20 -791
  229. package/sdk/public/Content/ContentPublicModel.d.ts +3 -549
  230. package/sdk/public/Content/ContentPublicModel.js +3 -649
  231. package/sdk/public/Content/ContentPublicValidator.d.ts +3 -69
  232. package/sdk/public/Content/ContentPublicValidator.js +2 -88
  233. package/sdk/public/Partner/PartnerPublicClient.js +15 -0
  234. package/sdk/public/Webhook/WebhookPublicClient.d.ts +8 -8
  235. package/sdk/public/Webhook/WebhookPublicClient.js +48 -8
  236. package/sdk/public/Webhook/WebhookPublicModel.d.ts +21 -21
  237. package/sdk/public/Webhook/WebhookPublicModel.js +15 -15
  238. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
  239. package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
  240. package/sdk/application/Finance/FinanceApplicationClient.d.ts +0 -29
  241. package/sdk/application/Finance/FinanceApplicationClient.js +0 -105
@@ -1,3 +1,8 @@
1
+ const {
2
+ FDKClientValidationError,
3
+ FDKResponseValidationError,
4
+ } = require("../../common/FDKError");
5
+
1
6
  const ApplicationAPIClient = require("../ApplicationAPIClient");
2
7
  const constructUrl = require("../constructUrl");
3
8
  const Paginator = require("../../common/Paginator");
@@ -103,7 +108,7 @@ class Payment {
103
108
  /**
104
109
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
105
110
  * @param {import("../ApplicationAPIClient").Options} - Options
106
- * @returns {Promise<RefundAccountDetails>} - Success response
111
+ * @returns {Promise<RefundAccountResponse>} - Success response
107
112
  * @name addBeneficiaryDetails
108
113
  * @summary: Add beneficiary for refund
109
114
  * @description: Add beneficiary details specifically for refund transactions, including account holder name, account number and bank details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/addBeneficiaryDetails/).
@@ -112,6 +117,14 @@ class Payment {
112
117
  { body, requestHeaders } = { requestHeaders: {} },
113
118
  { responseHeaders } = { responseHeaders: false }
114
119
  ) {
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
+
115
128
  const query_params = {};
116
129
 
117
130
  const xHeaders = {};
@@ -140,7 +153,7 @@ class Payment {
140
153
  /**
141
154
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
142
155
  * @param {import("../ApplicationAPIClient").Options} - Options
143
- * @returns {Promise<RefundAccountDetails>} - Success response
156
+ * @returns {Promise<RefundAccountResponse>} - Success response
144
157
  * @name addRefundBankAccountUsingOTP
145
158
  * @summary: Add refund account using OTP verification
146
159
  * @description: Add bank account specifically for refunds, employing OTP verification for security. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/addRefundBankAccountUsingOTP/).
@@ -149,6 +162,14 @@ class Payment {
149
162
  { body, requestHeaders } = { requestHeaders: {} },
150
163
  { responseHeaders } = { responseHeaders: false }
151
164
  ) {
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
+
152
173
  const query_params = {};
153
174
 
154
175
  const xHeaders = {};
@@ -177,7 +198,7 @@ class Payment {
177
198
  /**
178
199
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
179
200
  * @param {import("../ApplicationAPIClient").Options} - Options
180
- * @returns {Promise<AttachCardsDetails>} - Success response
201
+ * @returns {Promise<AttachCardsResponse>} - Success response
181
202
  * @name attachCardToCustomer
182
203
  * @summary: Link payment card to customer
183
204
  * @description: Link payment card to a user account for seamless transactions. Upon successful linking, the card becomes associated with the user's profile, enabling secure and convenient payments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/attachCardToCustomer/).
@@ -186,6 +207,14 @@ class Payment {
186
207
  { body, requestHeaders } = { requestHeaders: {} },
187
208
  { responseHeaders } = { responseHeaders: false }
188
209
  ) {
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
+
189
218
  const query_params = {};
190
219
 
191
220
  const xHeaders = {};
@@ -214,7 +243,7 @@ class Payment {
214
243
  /**
215
244
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
216
245
  * @param {import("../ApplicationAPIClient").Options} - Options
217
- * @returns {Promise<CancelPaymentLinkDetails>} - Success response
246
+ * @returns {Promise<CancelPaymentLinkResponse>} - Success response
218
247
  * @name cancelPaymentLink
219
248
  * @summary: Cancel payment link
220
249
  * @description: Cancel previously generated payment link. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/cancelPaymentLink/).
@@ -223,6 +252,14 @@ class Payment {
223
252
  { body, requestHeaders } = { requestHeaders: {} },
224
253
  { responseHeaders } = { responseHeaders: false }
225
254
  ) {
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
+
226
263
  const query_params = {};
227
264
 
228
265
  const xHeaders = {};
@@ -251,7 +288,7 @@ class Payment {
251
288
  /**
252
289
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
253
290
  * @param {import("../ApplicationAPIClient").Options} - Options
254
- * @returns {Promise<CardDetailsFetchedDetails>} - Success response
291
+ * @returns {Promise<CardDetailsResponse>} - Success response
255
292
  * @name cardDetails
256
293
  * @summary: Get card details
257
294
  * @description: Get details of a specified payment card, including information such as the card type, brand, country, and expiration date. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/cardDetails/).
@@ -260,6 +297,21 @@ class Payment {
260
297
  { cardInfo, aggregator, requestHeaders } = { requestHeaders: {} },
261
298
  { responseHeaders } = { responseHeaders: false }
262
299
  ) {
300
+ let invalidInput = [];
301
+
302
+ if (!cardInfo) {
303
+ invalidInput.push({
304
+ message: `The 'cardInfo' field is required.`,
305
+ path: ["cardInfo"],
306
+ });
307
+ }
308
+ if (invalidInput.length) {
309
+ const error = new Error();
310
+ error.message = "Missing required field";
311
+ error.details = invalidInput;
312
+ return Promise.reject(new FDKClientValidationError(error));
313
+ }
314
+
263
315
  const query_params = {};
264
316
  query_params["aggregator"] = aggregator;
265
317
 
@@ -289,7 +341,7 @@ class Payment {
289
341
  /**
290
342
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
291
343
  * @param {import("../ApplicationAPIClient").Options} - Options
292
- * @returns {Promise<PaymentStatusUpdateDetails>} - Success response
344
+ * @returns {Promise<PaymentStatusUpdateResponse>} - Success response
293
345
  * @name checkAndUpdatePaymentStatus
294
346
  * @summary: Update payment status
295
347
  * @description: Polling process to confirm the payment status. It periodically checks and updates the current status of a payment, ensuring timely and accurate confirmation of payment transactions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/checkAndUpdatePaymentStatus/).
@@ -298,6 +350,14 @@ class Payment {
298
350
  { body, requestHeaders } = { requestHeaders: {} },
299
351
  { responseHeaders } = { responseHeaders: false }
300
352
  ) {
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
+
301
361
  const query_params = {};
302
362
 
303
363
  const xHeaders = {};
@@ -326,7 +386,7 @@ class Payment {
326
386
  /**
327
387
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
328
388
  * @param {import("../ApplicationAPIClient").Options} - Options
329
- * @returns {Promise<PaymentStatusUpdateDetails>} - Success response
389
+ * @returns {Promise<PaymentStatusUpdateResponse>} - Success response
330
390
  * @name checkAndUpdatePaymentStatusPaymentLink
331
391
  * @summary: Update payment link status
332
392
  * @description: Verify and update status of a payment made through a link.Upon successful verification and update, the response includes details about the aggregator name, payment status, and whether retrying the process is required. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/checkAndUpdatePaymentStatusPaymentLink/).
@@ -335,6 +395,14 @@ class Payment {
335
395
  { body, requestHeaders } = { requestHeaders: {} },
336
396
  { responseHeaders } = { responseHeaders: false }
337
397
  ) {
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
+
338
406
  const query_params = {};
339
407
 
340
408
  const xHeaders = {};
@@ -363,7 +431,7 @@ class Payment {
363
431
  /**
364
432
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
365
433
  * @param {import("../ApplicationAPIClient").Options} - Options
366
- * @returns {Promise<CheckCreditDetails>} - Success response
434
+ * @returns {Promise<CheckCreditResponse>} - Success response
367
435
  * @name checkCredit
368
436
  * @summary: Verify credit availability and status
369
437
  * @description: Check the availability and status of customer credit, providing the status of payment along with registration information and signup URL if the customer is not registered. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/checkCredit/).
@@ -372,6 +440,14 @@ class Payment {
372
440
  { aggregator, requestHeaders } = { requestHeaders: {} },
373
441
  { responseHeaders } = { responseHeaders: false }
374
442
  ) {
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
+
375
451
  const query_params = {};
376
452
  query_params["aggregator"] = aggregator;
377
453
 
@@ -401,7 +477,7 @@ class Payment {
401
477
  /**
402
478
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
403
479
  * @param {import("../ApplicationAPIClient").Options} - Options
404
- * @returns {Promise<CreateOrderUserDetails>} - Success response
480
+ * @returns {Promise<CreateOrderUserResponse>} - Success response
405
481
  * @name createOrderHandlerPaymentLink
406
482
  * @summary: Create order for payment via link
407
483
  * @description: Initiate the creation of an order handler for processing payments through a link. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/createOrderHandlerPaymentLink/).
@@ -410,6 +486,14 @@ class Payment {
410
486
  { body, requestHeaders } = { requestHeaders: {} },
411
487
  { responseHeaders } = { responseHeaders: false }
412
488
  ) {
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
+
413
497
  const query_params = {};
414
498
 
415
499
  const xHeaders = {};
@@ -438,7 +522,7 @@ class Payment {
438
522
  /**
439
523
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
440
524
  * @param {import("../ApplicationAPIClient").Options} - Options
441
- * @returns {Promise<CreatePaymentLinkDetails>} - Success response
525
+ * @returns {Promise<CreatePaymentLinkResponse>} - Success response
442
526
  * @name createPaymentLink
443
527
  * @summary: Create payment link
444
528
  * @description: Create new payment link for transactions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/createPaymentLink/).
@@ -447,6 +531,14 @@ class Payment {
447
531
  { body, requestHeaders } = { requestHeaders: {} },
448
532
  { responseHeaders } = { responseHeaders: false }
449
533
  ) {
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
+
450
542
  const query_params = {};
451
543
 
452
544
  const xHeaders = {};
@@ -475,7 +567,7 @@ class Payment {
475
567
  /**
476
568
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
477
569
  * @param {import("../ApplicationAPIClient").Options} - Options
478
- * @returns {Promise<PaymentOrderDetails>} - Success response
570
+ * @returns {Promise<PaymentOrderResponse>} - Success response
479
571
  * @name createPaymentOrder
480
572
  * @summary: Create Order
481
573
  * @description: Create an order and payment on the aggregator side. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/createPaymentOrder/).
@@ -484,6 +576,14 @@ class Payment {
484
576
  { body, requestHeaders } = { requestHeaders: {} },
485
577
  { responseHeaders } = { responseHeaders: false }
486
578
  ) {
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
+
487
587
  const query_params = {};
488
588
 
489
589
  const xHeaders = {};
@@ -512,7 +612,7 @@ class Payment {
512
612
  /**
513
613
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
514
614
  * @param {import("../ApplicationAPIClient").Options} - Options
515
- * @returns {Promise<CustomerCreditSummaryDetails>} - Success response
615
+ * @returns {Promise<CustomerCreditSummaryResponse>} - Success response
516
616
  * @name customerCreditSummary
517
617
  * @summary: Credit summary
518
618
  * @description: Get summary of the customer's credit information, including details such as merchant customer reference ID, status, balance, limit, due amount, used amount, due date, days overdue, total due amount, and a repayment URL. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/customerCreditSummary/).
@@ -521,6 +621,14 @@ class Payment {
521
621
  { aggregator, requestHeaders } = { requestHeaders: {} },
522
622
  { responseHeaders } = { responseHeaders: false }
523
623
  ) {
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
+
524
632
  const query_params = {};
525
633
  query_params["aggregator"] = aggregator;
526
634
 
@@ -550,7 +658,7 @@ class Payment {
550
658
  /**
551
659
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
552
660
  * @param {import("../ApplicationAPIClient").Options} - Options
553
- * @returns {Promise<CustomerOnboardingDetails>} - Success response
661
+ * @returns {Promise<CustomerOnboardingResponse>} - Success response
554
662
  * @name customerOnboard
555
663
  * @summary: Onboard customer for payment
556
664
  * @description: Initiate the onboarding process for payment services, providing personal, business, and device information, along with marketplace details, to enable customer registration and credit availability. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/customerOnboard/).
@@ -559,6 +667,14 @@ class Payment {
559
667
  { body, requestHeaders } = { requestHeaders: {} },
560
668
  { responseHeaders } = { responseHeaders: false }
561
669
  ) {
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
+
562
678
  const query_params = {};
563
679
 
564
680
  const xHeaders = {};
@@ -587,7 +703,7 @@ class Payment {
587
703
  /**
588
704
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
589
705
  * @param {import("../ApplicationAPIClient").Options} - Options
590
- * @returns {Promise<DeleteCardsDetails>} - Success response
706
+ * @returns {Promise<DeleteCardsResponse>} - Success response
591
707
  * @name deleteUserCard
592
708
  * @summary: Delete customer card
593
709
  * @description: Delete payment card from the user's account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/deleteUserCard/).
@@ -596,6 +712,14 @@ class Payment {
596
712
  { body, requestHeaders } = { requestHeaders: {} },
597
713
  { responseHeaders } = { responseHeaders: false }
598
714
  ) {
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
+
599
723
  const query_params = {};
600
724
 
601
725
  const xHeaders = {};
@@ -633,6 +757,14 @@ class Payment {
633
757
  { body, requestHeaders } = { requestHeaders: {} },
634
758
  { responseHeaders } = { responseHeaders: false }
635
759
  ) {
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
+
636
768
  const query_params = {};
637
769
 
638
770
  const xHeaders = {};
@@ -661,7 +793,7 @@ class Payment {
661
793
  /**
662
794
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
663
795
  * @param {import("../ApplicationAPIClient").Options} - Options
664
- * @returns {Promise<RefundTransferModeUpdateDetails>} - Success response
796
+ * @returns {Promise<UpdateRefundTransferModeResponse>} - Success response
665
797
  * @name enableOrDisableRefundTransferMode
666
798
  * @summary: Toggle refund mode
667
799
  * @description: Enable/Disable a particular refund transfer mode based on the request body parameters, indicating whether the mode should be enabled or disabled. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/enableOrDisableRefundTransferMode/).
@@ -670,6 +802,14 @@ class Payment {
670
802
  { body, requestHeaders } = { requestHeaders: {} },
671
803
  { responseHeaders } = { responseHeaders: false }
672
804
  ) {
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
+
673
813
  const query_params = {};
674
814
 
675
815
  const xHeaders = {};
@@ -698,7 +838,7 @@ class Payment {
698
838
  /**
699
839
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
700
840
  * @param {import("../ApplicationAPIClient").Options} - Options
701
- * @returns {Promise<ActiveCardPaymentGatewayDetails>} - Success response
841
+ * @returns {Promise<ActiveCardPaymentGatewayResponse>} - Success response
702
842
  * @name getActiveCardAggregator
703
843
  * @summary: Retrieve active card aggregator
704
844
  * @description: Get details about the active card aggregator used by the user, including the aggregator name.You can refresh the data by setting the 'refresh' parameter to true if needed. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getActiveCardAggregator/).
@@ -707,6 +847,14 @@ class Payment {
707
847
  { refresh, requestHeaders } = { requestHeaders: {} },
708
848
  { responseHeaders } = { responseHeaders: false }
709
849
  ) {
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
+
710
858
  const query_params = {};
711
859
  query_params["refresh"] = refresh;
712
860
 
@@ -736,7 +884,7 @@ class Payment {
736
884
  /**
737
885
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
738
886
  * @param {import("../ApplicationAPIClient").Options} - Options
739
- * @returns {Promise<TransferModeFetchDetails>} - Success response
887
+ * @returns {Promise<TransferModeResponse>} - Success response
740
888
  * @name getActiveRefundTransferModes
741
889
  * @summary: Get refund transfer modes
742
890
  * @description: Lists available refund modes, such as UPI, providing details like display name, logo, and ID for each mode. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getActiveRefundTransferModes/).
@@ -745,6 +893,14 @@ class Payment {
745
893
  { requestHeaders } = { requestHeaders: {} },
746
894
  { responseHeaders } = { responseHeaders: false }
747
895
  ) {
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
+
748
904
  const query_params = {};
749
905
 
750
906
  const xHeaders = {};
@@ -773,7 +929,7 @@ class Payment {
773
929
  /**
774
930
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
775
931
  * @param {import("../ApplicationAPIClient").Options} - Options
776
- * @returns {Promise<ListCardsDetails>} - Success response
932
+ * @returns {Promise<ListCardsResponse>} - Success response
777
933
  * @name getActiveUserCards
778
934
  * @summary: Get customer cards
779
935
  * @description: List all active cards saved by the user.Includes details such as the card's aggregator name, card ID, token, reference, number, expiration date, type, issuer, brand, nickname, and whether it has expired. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getActiveUserCards/).
@@ -782,6 +938,14 @@ class Payment {
782
938
  { forceRefresh, requestHeaders } = { requestHeaders: {} },
783
939
  { responseHeaders } = { responseHeaders: false }
784
940
  ) {
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
+
785
949
  const query_params = {};
786
950
  query_params["force_refresh"] = forceRefresh;
787
951
 
@@ -811,7 +975,7 @@ class Payment {
811
975
  /**
812
976
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
813
977
  * @param {import("../ApplicationAPIClient").Options} - Options
814
- * @returns {Promise<AggregatorsConfigDetail>} - Success response
978
+ * @returns {Promise<AggregatorsConfigDetailResponse>} - Success response
815
979
  * @name getAggregatorsConfig
816
980
  * @summary: Get payment aggregators
817
981
  * @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/).
@@ -820,6 +984,14 @@ class Payment {
820
984
  { xApiToken, refresh, requestHeaders } = { requestHeaders: {} },
821
985
  { responseHeaders } = { responseHeaders: false }
822
986
  ) {
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
+
823
995
  const query_params = {};
824
996
  query_params["refresh"] = refresh;
825
997
 
@@ -850,7 +1022,7 @@ class Payment {
850
1022
  /**
851
1023
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
852
1024
  * @param {import("../ApplicationAPIClient").Options} - Options
853
- * @returns {Promise<EpaylaterBannerDetails>} - Success response
1025
+ * @returns {Promise<EpaylaterBannerResponse>} - Success response
854
1026
  * @name getEpaylaterBannerDetails
855
1027
  * @summary: Epaylater banner info
856
1028
  * @description: Get Epaylater payment banner details. It provides information about the banner's display status, along with relevant messages and the user's registration status. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getEpaylaterBannerDetails/).
@@ -859,6 +1031,14 @@ class Payment {
859
1031
  { requestHeaders } = { requestHeaders: {} },
860
1032
  { responseHeaders } = { responseHeaders: false }
861
1033
  ) {
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
+
862
1042
  const query_params = {};
863
1043
 
864
1044
  const xHeaders = {};
@@ -887,7 +1067,7 @@ class Payment {
887
1067
  /**
888
1068
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
889
1069
  * @param {import("../ApplicationAPIClient").Options} - Options
890
- * @returns {Promise<OrderBeneficiaryFetchDetails>} - Success response
1070
+ * @returns {Promise<OrderBeneficiaryResponse>} - Success response
891
1071
  * @name getOrderBeneficiariesDetail
892
1072
  * @summary: Retrieve beneficiary details
893
1073
  * @description: Get beneficiary details like bank name , ifsc code , branch name associated with a specific order for refund processing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getOrderBeneficiariesDetail/).
@@ -896,6 +1076,21 @@ class Payment {
896
1076
  { orderId, requestHeaders } = { requestHeaders: {} },
897
1077
  { responseHeaders } = { responseHeaders: false }
898
1078
  ) {
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
+
899
1094
  const query_params = {};
900
1095
  query_params["order_id"] = orderId;
901
1096
 
@@ -925,7 +1120,7 @@ class Payment {
925
1120
  /**
926
1121
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
927
1122
  * @param {import("../ApplicationAPIClient").Options} - Options
928
- * @returns {Promise<GetPaymentLinkDetails>} - Success response
1123
+ * @returns {Promise<GetPaymentLinkResponse>} - Success response
929
1124
  * @name getPaymentLink
930
1125
  * @summary: Get payment link
931
1126
  * @description: Get a generated payment link. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getPaymentLink/).
@@ -934,6 +1129,14 @@ class Payment {
934
1129
  { paymentLinkId, requestHeaders } = { requestHeaders: {} },
935
1130
  { responseHeaders } = { responseHeaders: false }
936
1131
  ) {
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
+
937
1140
  const query_params = {};
938
1141
  query_params["payment_link_id"] = paymentLinkId;
939
1142
 
@@ -963,7 +1166,7 @@ class Payment {
963
1166
  /**
964
1167
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
965
1168
  * @param {import("../ApplicationAPIClient").Options} - Options
966
- * @returns {Promise<PaymentModeRouteDetails>} - Success response
1169
+ * @returns {Promise<PaymentModeRouteResponse>} - Success response
967
1170
  * @name getPaymentModeRoutes
968
1171
  * @summary: Get payment modes
969
1172
  * @description: Get available payment methods on the payment page, specifying the aggregator for each option, such as 'Netbanking powered by Juspay' and 'Card powered by Razorpay'. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getPaymentModeRoutes/).
@@ -984,6 +1187,21 @@ class Payment {
984
1187
  } = { requestHeaders: {} },
985
1188
  { responseHeaders } = { responseHeaders: false }
986
1189
  ) {
1190
+ let invalidInput = [];
1191
+
1192
+ if (!amount) {
1193
+ invalidInput.push({
1194
+ message: `The 'amount' field is required.`,
1195
+ path: ["amount"],
1196
+ });
1197
+ }
1198
+ if (invalidInput.length) {
1199
+ const error = new Error();
1200
+ error.message = "Missing required field";
1201
+ error.details = invalidInput;
1202
+ return Promise.reject(new FDKClientValidationError(error));
1203
+ }
1204
+
987
1205
  const query_params = {};
988
1206
  query_params["amount"] = amount;
989
1207
  query_params["cart_id"] = cartId;
@@ -1022,7 +1240,7 @@ class Payment {
1022
1240
  /**
1023
1241
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1024
1242
  * @param {import("../ApplicationAPIClient").Options} - Options
1025
- * @returns {Promise<PaymentModeRouteDetails>} - Success response
1243
+ * @returns {Promise<PaymentModeRouteResponse>} - Success response
1026
1244
  * @name getPaymentModeRoutesPaymentLink
1027
1245
  * @summary: Payment modes for payment link
1028
1246
  * @description: List payment modes available for a given payment link. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getPaymentModeRoutesPaymentLink/).
@@ -1031,6 +1249,21 @@ class Payment {
1031
1249
  { paymentLinkId, requestHeaders } = { requestHeaders: {} },
1032
1250
  { responseHeaders } = { responseHeaders: false }
1033
1251
  ) {
1252
+ let invalidInput = [];
1253
+
1254
+ if (!paymentLinkId) {
1255
+ invalidInput.push({
1256
+ message: `The 'paymentLinkId' field is required.`,
1257
+ path: ["paymentLinkId"],
1258
+ });
1259
+ }
1260
+ if (invalidInput.length) {
1261
+ const error = new Error();
1262
+ error.message = "Missing required field";
1263
+ error.details = invalidInput;
1264
+ return Promise.reject(new FDKClientValidationError(error));
1265
+ }
1266
+
1034
1267
  const query_params = {};
1035
1268
  query_params["payment_link_id"] = paymentLinkId;
1036
1269
 
@@ -1060,7 +1293,7 @@ class Payment {
1060
1293
  /**
1061
1294
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1062
1295
  * @param {import("../ApplicationAPIClient").Options} - Options
1063
- * @returns {Promise<PaymentModeRouteDetails>} - Success response
1296
+ * @returns {Promise<PaymentModeRouteResponse>} - Success response
1064
1297
  * @name getPosPaymentModeRoutes
1065
1298
  * @summary: POS payment modes
1066
1299
  * @description: Get available payment methods on the payment page for POS, specifying the aggregator for each option, such as 'CARD powered by Juspay' and 'QR powered by Razorpay'. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getPosPaymentModeRoutes/).
@@ -1068,9 +1301,9 @@ class Payment {
1068
1301
  async getPosPaymentModeRoutes(
1069
1302
  {
1070
1303
  amount,
1071
- cartId,
1072
1304
  pincode,
1073
1305
  orderType,
1306
+ cartId,
1074
1307
  checkoutMode,
1075
1308
  refresh,
1076
1309
  cardReference,
@@ -1079,6 +1312,33 @@ class Payment {
1079
1312
  } = { requestHeaders: {} },
1080
1313
  { responseHeaders } = { responseHeaders: false }
1081
1314
  ) {
1315
+ let invalidInput = [];
1316
+
1317
+ if (!amount) {
1318
+ invalidInput.push({
1319
+ message: `The 'amount' field is required.`,
1320
+ path: ["amount"],
1321
+ });
1322
+ }
1323
+ if (!pincode) {
1324
+ invalidInput.push({
1325
+ message: `The 'pincode' field is required.`,
1326
+ path: ["pincode"],
1327
+ });
1328
+ }
1329
+ if (!orderType) {
1330
+ invalidInput.push({
1331
+ message: `The 'orderType' field is required.`,
1332
+ path: ["orderType"],
1333
+ });
1334
+ }
1335
+ if (invalidInput.length) {
1336
+ const error = new Error();
1337
+ error.message = "Missing required field";
1338
+ error.details = invalidInput;
1339
+ return Promise.reject(new FDKClientValidationError(error));
1340
+ }
1341
+
1082
1342
  const query_params = {};
1083
1343
  query_params["amount"] = amount;
1084
1344
  query_params["cart_id"] = cartId;
@@ -1115,7 +1375,7 @@ class Payment {
1115
1375
  /**
1116
1376
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1117
1377
  * @param {import("../ApplicationAPIClient").Options} - Options
1118
- * @returns {Promise<RupifiBannerDetails>} - Success response
1378
+ * @returns {Promise<RupifiBannerResponse>} - Success response
1119
1379
  * @name getRupifiBannerDetails
1120
1380
  * @summary: Rupifi banner info
1121
1381
  * @description: Get Rupifi payment banner details. It provides information such as the KYC URL and the current status of the Rupifi payment banner. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getRupifiBannerDetails/).
@@ -1124,6 +1384,14 @@ class Payment {
1124
1384
  { requestHeaders } = { requestHeaders: {} },
1125
1385
  { responseHeaders } = { responseHeaders: false }
1126
1386
  ) {
1387
+ let invalidInput = [];
1388
+ if (invalidInput.length) {
1389
+ const error = new Error();
1390
+ error.message = "Missing required field";
1391
+ error.details = invalidInput;
1392
+ return Promise.reject(new FDKClientValidationError(error));
1393
+ }
1394
+
1127
1395
  const query_params = {};
1128
1396
 
1129
1397
  const xHeaders = {};
@@ -1152,7 +1420,7 @@ class Payment {
1152
1420
  /**
1153
1421
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1154
1422
  * @param {import("../ApplicationAPIClient").Options} - Options
1155
- * @returns {Promise<OrderBeneficiaryFetchDetails>} - Success response
1423
+ * @returns {Promise<OrderBeneficiaryResponse>} - Success response
1156
1424
  * @name getUserBeneficiariesDetail
1157
1425
  * @summary: Retrieve beneficiary details
1158
1426
  * @description: Get beneficiaries associated with the user for processing refunds, based on the provided order ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getUserBeneficiariesDetail/).
@@ -1161,6 +1429,21 @@ class Payment {
1161
1429
  { orderId, requestHeaders } = { requestHeaders: {} },
1162
1430
  { responseHeaders } = { responseHeaders: false }
1163
1431
  ) {
1432
+ let invalidInput = [];
1433
+
1434
+ if (!orderId) {
1435
+ invalidInput.push({
1436
+ message: `The 'orderId' field is required.`,
1437
+ path: ["orderId"],
1438
+ });
1439
+ }
1440
+ if (invalidInput.length) {
1441
+ const error = new Error();
1442
+ error.message = "Missing required field";
1443
+ error.details = invalidInput;
1444
+ return Promise.reject(new FDKClientValidationError(error));
1445
+ }
1446
+
1164
1447
  const query_params = {};
1165
1448
  query_params["order_id"] = orderId;
1166
1449
 
@@ -1190,7 +1473,7 @@ class Payment {
1190
1473
  /**
1191
1474
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1192
1475
  * @param {import("../ApplicationAPIClient").Options} - Options
1193
- * @returns {Promise<PaymentInitializationDetails>} - Success response
1476
+ * @returns {Promise<PaymentInitializationResponse>} - Success response
1194
1477
  * @name initialisePayment
1195
1478
  * @summary: Start payment process
1196
1479
  * @description: Initiate the payment procedure for an order. Upon successful initiation, it returns a details including the success status, aggregator information, payment method, status, merchant order ID aggregator order , polling URL, timeout, virtual ID, Razorpay payment ID, customer ID, and device ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/initialisePayment/).
@@ -1199,6 +1482,14 @@ class Payment {
1199
1482
  { body, requestHeaders } = { requestHeaders: {} },
1200
1483
  { responseHeaders } = { responseHeaders: false }
1201
1484
  ) {
1485
+ let invalidInput = [];
1486
+ if (invalidInput.length) {
1487
+ const error = new Error();
1488
+ error.message = "Missing required field";
1489
+ error.details = invalidInput;
1490
+ return Promise.reject(new FDKClientValidationError(error));
1491
+ }
1492
+
1202
1493
  const query_params = {};
1203
1494
 
1204
1495
  const xHeaders = {};
@@ -1227,7 +1518,7 @@ class Payment {
1227
1518
  /**
1228
1519
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1229
1520
  * @param {import("../ApplicationAPIClient").Options} - Options
1230
- * @returns {Promise<PaymentInitializationDetails>} - Success response
1521
+ * @returns {Promise<PaymentInitializationResponse>} - Success response
1231
1522
  * @name initialisePaymentPaymentLink
1232
1523
  * @summary: Initialize payment link
1233
1524
  * @description: Begin payment process for an order by initializing it through a payment link.Upon successful initialization, the response includes details about the payment status, aggregator details, order IDs, polling URL for status updates, and other relevant information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/initialisePaymentPaymentLink/).
@@ -1236,6 +1527,14 @@ class Payment {
1236
1527
  { body, requestHeaders } = { requestHeaders: {} },
1237
1528
  { responseHeaders } = { responseHeaders: false }
1238
1529
  ) {
1530
+ let invalidInput = [];
1531
+ if (invalidInput.length) {
1532
+ const error = new Error();
1533
+ error.message = "Missing required field";
1534
+ error.details = invalidInput;
1535
+ return Promise.reject(new FDKClientValidationError(error));
1536
+ }
1537
+
1239
1538
  const query_params = {};
1240
1539
 
1241
1540
  const xHeaders = {};
@@ -1273,6 +1572,14 @@ class Payment {
1273
1572
  { body, requestHeaders } = { requestHeaders: {} },
1274
1573
  { responseHeaders } = { responseHeaders: false }
1275
1574
  ) {
1575
+ let invalidInput = [];
1576
+ if (invalidInput.length) {
1577
+ const error = new Error();
1578
+ error.message = "Missing required field";
1579
+ error.details = invalidInput;
1580
+ return Promise.reject(new FDKClientValidationError(error));
1581
+ }
1582
+
1276
1583
  const query_params = {};
1277
1584
 
1278
1585
  const xHeaders = {};
@@ -1301,7 +1608,7 @@ class Payment {
1301
1608
  /**
1302
1609
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1303
1610
  * @param {import("../ApplicationAPIClient").Options} - Options
1304
- * @returns {Promise<OutstandingOrderDetails>} - Success response
1611
+ * @returns {Promise<OutstandingOrderDetailsResponse>} - Success response
1305
1612
  * @name outstandingOrderDetails
1306
1613
  * @summary: Outstanding orders
1307
1614
  * @description: Get details of orders with outstanding payments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/outstandingOrderDetails/).
@@ -1310,6 +1617,14 @@ class Payment {
1310
1617
  { aggregator, requestHeaders } = { requestHeaders: {} },
1311
1618
  { responseHeaders } = { responseHeaders: false }
1312
1619
  ) {
1620
+ let invalidInput = [];
1621
+ if (invalidInput.length) {
1622
+ const error = new Error();
1623
+ error.message = "Missing required field";
1624
+ error.details = invalidInput;
1625
+ return Promise.reject(new FDKClientValidationError(error));
1626
+ }
1627
+
1313
1628
  const query_params = {};
1314
1629
  query_params["aggregator"] = aggregator;
1315
1630
 
@@ -1339,7 +1654,7 @@ class Payment {
1339
1654
  /**
1340
1655
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1341
1656
  * @param {import("../ApplicationAPIClient").Options} - Options
1342
- * @returns {Promise<PaidOrderDetails>} - Success response
1657
+ * @returns {Promise<PaidOrderDetailsResponse>} - Success response
1343
1658
  * @name paidOrderDetails
1344
1659
  * @summary: Retrieve details of paid orders
1345
1660
  * @description: Get details of orders that have been paid for, including shipment ID, order ID, due date, payment date, amount, and transaction ID, based on the aggregator merchant user ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/paidOrderDetails/).
@@ -1348,6 +1663,14 @@ class Payment {
1348
1663
  { aggregator, requestHeaders } = { requestHeaders: {} },
1349
1664
  { responseHeaders } = { responseHeaders: false }
1350
1665
  ) {
1666
+ let invalidInput = [];
1667
+ if (invalidInput.length) {
1668
+ const error = new Error();
1669
+ error.message = "Missing required field";
1670
+ error.details = invalidInput;
1671
+ return Promise.reject(new FDKClientValidationError(error));
1672
+ }
1673
+
1351
1674
  const query_params = {};
1352
1675
  query_params["aggregator"] = aggregator;
1353
1676
 
@@ -1377,7 +1700,7 @@ class Payment {
1377
1700
  /**
1378
1701
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1379
1702
  * @param {import("../ApplicationAPIClient").Options} - Options
1380
- * @returns {Promise<PollingPaymentLinkDetails>} - Success response
1703
+ * @returns {Promise<PollingPaymentLinkResponse>} - Success response
1381
1704
  * @name pollingPaymentLink
1382
1705
  * @summary: Poll status of payment link
1383
1706
  * @description: Get real-time information about the payment link's current status, such as whether it has been processed, cancelled, or expired. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/pollingPaymentLink/).
@@ -1386,6 +1709,14 @@ class Payment {
1386
1709
  { paymentLinkId, requestHeaders } = { requestHeaders: {} },
1387
1710
  { responseHeaders } = { responseHeaders: false }
1388
1711
  ) {
1712
+ let invalidInput = [];
1713
+ if (invalidInput.length) {
1714
+ const error = new Error();
1715
+ error.message = "Missing required field";
1716
+ error.details = invalidInput;
1717
+ return Promise.reject(new FDKClientValidationError(error));
1718
+ }
1719
+
1389
1720
  const query_params = {};
1390
1721
  query_params["payment_link_id"] = paymentLinkId;
1391
1722
 
@@ -1415,15 +1746,23 @@ class Payment {
1415
1746
  /**
1416
1747
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1417
1748
  * @param {import("../ApplicationAPIClient").Options} - Options
1418
- * @returns {Promise<RedirectToAggregatorDetails>} - Success response
1749
+ * @returns {Promise<RedirectToAggregatorResponse>} - Success response
1419
1750
  * @name redirectToAggregator
1420
1751
  * @summary: Redirects users to the payment aggregator's interface
1421
- * @description: This endpoint is used to redirect users to the payment aggregator's platform where they can complete the payment process. The request may include necessary details for initiating the payment on the aggregator’s side, and the user is transferred seamlessly to their interface. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/redirectToAggregator/).
1752
+ * @description: Get details about the active card aggregator used by the user, including the aggregator's name. You can refresh the data by setting the 'refresh' parameter to true if needed. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/redirectToAggregator/).
1422
1753
  */
1423
1754
  async redirectToAggregator(
1424
- { aggregator, source, requestHeaders } = { requestHeaders: {} },
1755
+ { source, aggregator, requestHeaders } = { requestHeaders: {} },
1425
1756
  { responseHeaders } = { responseHeaders: false }
1426
1757
  ) {
1758
+ let invalidInput = [];
1759
+ if (invalidInput.length) {
1760
+ const error = new Error();
1761
+ error.message = "Missing required field";
1762
+ error.details = invalidInput;
1763
+ return Promise.reject(new FDKClientValidationError(error));
1764
+ }
1765
+
1427
1766
  const query_params = {};
1428
1767
  query_params["source"] = source;
1429
1768
  query_params["aggregator"] = aggregator;
@@ -1454,7 +1793,7 @@ class Payment {
1454
1793
  /**
1455
1794
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1456
1795
  * @param {import("../ApplicationAPIClient").Options} - Options
1457
- * @returns {Promise<RenderHTMLDetails>} - Success response
1796
+ * @returns {Promise<renderHTMLResponse>} - Success response
1458
1797
  * @name renderHTML
1459
1798
  * @summary: Render HTML
1460
1799
  * @description: Render HTML for a payment aggregator page. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/renderHTML/).
@@ -1463,6 +1802,14 @@ class Payment {
1463
1802
  { body, requestHeaders } = { requestHeaders: {} },
1464
1803
  { responseHeaders } = { responseHeaders: false }
1465
1804
  ) {
1805
+ let invalidInput = [];
1806
+ if (invalidInput.length) {
1807
+ const error = new Error();
1808
+ error.message = "Missing required field";
1809
+ error.details = invalidInput;
1810
+ return Promise.reject(new FDKClientValidationError(error));
1811
+ }
1812
+
1466
1813
  const query_params = {};
1467
1814
 
1468
1815
  const xHeaders = {};
@@ -1491,7 +1838,7 @@ class Payment {
1491
1838
  /**
1492
1839
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1493
1840
  * @param {import("../ApplicationAPIClient").Options} - Options
1494
- * @returns {Promise<ResendOrCancelPaymentDetails>} - Success response
1841
+ * @returns {Promise<ResendOrCancelPaymentResponse>} - Success response
1495
1842
  * @name resendOrCancelPayment
1496
1843
  * @summary: Resend or cancel a pending payment transaction
1497
1844
  * @description: Resend or cancel payment link that have been initiated but may require modification or cancellation for various reasons, ensuring flexibility and control in payment processing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/resendOrCancelPayment/).
@@ -1500,6 +1847,14 @@ class Payment {
1500
1847
  { body, requestHeaders } = { requestHeaders: {} },
1501
1848
  { responseHeaders } = { responseHeaders: false }
1502
1849
  ) {
1850
+ let invalidInput = [];
1851
+ if (invalidInput.length) {
1852
+ const error = new Error();
1853
+ error.message = "Missing required field";
1854
+ error.details = invalidInput;
1855
+ return Promise.reject(new FDKClientValidationError(error));
1856
+ }
1857
+
1503
1858
  const query_params = {};
1504
1859
 
1505
1860
  const xHeaders = {};
@@ -1528,7 +1883,7 @@ class Payment {
1528
1883
  /**
1529
1884
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1530
1885
  * @param {import("../ApplicationAPIClient").Options} - Options
1531
- * @returns {Promise<ResendPaymentLinkDetails>} - Success response
1886
+ * @returns {Promise<ResendPaymentLinkResponse>} - Success response
1532
1887
  * @name resendPaymentLink
1533
1888
  * @summary: Resend payment link
1534
1889
  * @description: Resend an existing payment link to the user to complete the payment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/resendPaymentLink/).
@@ -1537,6 +1892,14 @@ class Payment {
1537
1892
  { body, requestHeaders } = { requestHeaders: {} },
1538
1893
  { responseHeaders } = { responseHeaders: false }
1539
1894
  ) {
1895
+ let invalidInput = [];
1896
+ if (invalidInput.length) {
1897
+ const error = new Error();
1898
+ error.message = "Missing required field";
1899
+ error.details = invalidInput;
1900
+ return Promise.reject(new FDKClientValidationError(error));
1901
+ }
1902
+
1540
1903
  const query_params = {};
1541
1904
 
1542
1905
  const xHeaders = {};
@@ -1565,7 +1928,7 @@ class Payment {
1565
1928
  /**
1566
1929
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1567
1930
  * @param {import("../ApplicationAPIClient").Options} - Options
1568
- * @returns {Promise<SetDefaultBeneficiaryDetails>} - Success response
1931
+ * @returns {Promise<SetDefaultBeneficiaryResponse>} - Success response
1569
1932
  * @name updateDefaultBeneficiary
1570
1933
  * @summary: Set default beneficiary for refund
1571
1934
  * @description: Update default beneficiary for the order refund of the user. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/updateDefaultBeneficiary/).
@@ -1574,6 +1937,14 @@ class Payment {
1574
1937
  { body, requestHeaders } = { requestHeaders: {} },
1575
1938
  { responseHeaders } = { responseHeaders: false }
1576
1939
  ) {
1940
+ let invalidInput = [];
1941
+ if (invalidInput.length) {
1942
+ const error = new Error();
1943
+ error.message = "Missing required field";
1944
+ error.details = invalidInput;
1945
+ return Promise.reject(new FDKClientValidationError(error));
1946
+ }
1947
+
1577
1948
  const query_params = {};
1578
1949
 
1579
1950
  const xHeaders = {};
@@ -1602,7 +1973,7 @@ class Payment {
1602
1973
  /**
1603
1974
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1604
1975
  * @param {import("../ApplicationAPIClient").Options} - Options
1605
- * @returns {Promise<ValidateVPADetails>} - Success response
1976
+ * @returns {Promise<ValidateVPAResponse>} - Success response
1606
1977
  * @name validateVPA
1607
1978
  * @summary: Validate VPA
1608
1979
  * @description: Validate if a Virtual Payment Address (VPA) is valid for processing payments and returns the validation result.is_valid boolean value indicating whether the VPA is valid for payments. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/validateVPA/).
@@ -1611,6 +1982,14 @@ class Payment {
1611
1982
  { body, requestHeaders } = { requestHeaders: {} },
1612
1983
  { responseHeaders } = { responseHeaders: false }
1613
1984
  ) {
1985
+ let invalidInput = [];
1986
+ if (invalidInput.length) {
1987
+ const error = new Error();
1988
+ error.message = "Missing required field";
1989
+ error.details = invalidInput;
1990
+ return Promise.reject(new FDKClientValidationError(error));
1991
+ }
1992
+
1614
1993
  const query_params = {};
1615
1994
 
1616
1995
  const xHeaders = {};
@@ -1639,7 +2018,7 @@ class Payment {
1639
2018
  /**
1640
2019
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1641
2020
  * @param {import("../ApplicationAPIClient").Options} - Options
1642
- * @returns {Promise<ChargeCustomerDetails>} - Success response
2021
+ * @returns {Promise<ChargeCustomerResponse>} - Success response
1643
2022
  * @name verifyAndChargePayment
1644
2023
  * @summary: Verify order confirmation and charge
1645
2024
  * @description: Verify the payment status and charge from the customer's BNPL (Buy Now, Pay Later) account after order confirmation. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyAndChargePayment/).
@@ -1648,6 +2027,14 @@ class Payment {
1648
2027
  { body, requestHeaders } = { requestHeaders: {} },
1649
2028
  { responseHeaders } = { responseHeaders: false }
1650
2029
  ) {
2030
+ let invalidInput = [];
2031
+ if (invalidInput.length) {
2032
+ const error = new Error();
2033
+ error.message = "Missing required field";
2034
+ error.details = invalidInput;
2035
+ return Promise.reject(new FDKClientValidationError(error));
2036
+ }
2037
+
1651
2038
  const query_params = {};
1652
2039
 
1653
2040
  const xHeaders = {};
@@ -1676,7 +2063,7 @@ class Payment {
1676
2063
  /**
1677
2064
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1678
2065
  * @param {import("../ApplicationAPIClient").Options} - Options
1679
- * @returns {Promise<ValidateCustomerDetails>} - Success response
2066
+ * @returns {Promise<ValidateCustomerResponse>} - Success response
1680
2067
  * @name verifyCustomerForPayment
1681
2068
  * @summary: Verify payment customer
1682
2069
  * @description: Verify if the user is eligible for pay-later payment from the payment aggregator side using the customer's phone number. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyCustomerForPayment/).
@@ -1685,6 +2072,14 @@ class Payment {
1685
2072
  { body, requestHeaders } = { requestHeaders: {} },
1686
2073
  { responseHeaders } = { responseHeaders: false }
1687
2074
  ) {
2075
+ let invalidInput = [];
2076
+ if (invalidInput.length) {
2077
+ const error = new Error();
2078
+ error.message = "Missing required field";
2079
+ error.details = invalidInput;
2080
+ return Promise.reject(new FDKClientValidationError(error));
2081
+ }
2082
+
1688
2083
  const query_params = {};
1689
2084
 
1690
2085
  const xHeaders = {};
@@ -1713,7 +2108,7 @@ class Payment {
1713
2108
  /**
1714
2109
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1715
2110
  * @param {import("../ApplicationAPIClient").Options} - Options
1716
- * @returns {Promise<IfscCodeDetails>} - Success response
2111
+ * @returns {Promise<IfscCodeResponse>} - Success response
1717
2112
  * @name verifyIfscCode
1718
2113
  * @summary: Verify IFSC
1719
2114
  * @description: Validate IFSC code and returns bank details if valid. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyIfscCode/).
@@ -1722,6 +2117,14 @@ class Payment {
1722
2117
  { ifscCode, requestHeaders } = { requestHeaders: {} },
1723
2118
  { responseHeaders } = { responseHeaders: false }
1724
2119
  ) {
2120
+ let invalidInput = [];
2121
+ if (invalidInput.length) {
2122
+ const error = new Error();
2123
+ error.message = "Missing required field";
2124
+ error.details = invalidInput;
2125
+ return Promise.reject(new FDKClientValidationError(error));
2126
+ }
2127
+
1725
2128
  const query_params = {};
1726
2129
  query_params["ifsc_code"] = ifscCode;
1727
2130
 
@@ -1751,7 +2154,7 @@ class Payment {
1751
2154
  /**
1752
2155
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1753
2156
  * @param {import("../ApplicationAPIClient").Options} - Options
1754
- * @returns {Promise<AddBeneficiaryViaOtpVerificationDetails>} - Success response
2157
+ * @returns {Promise<AddBeneficiaryViaOtpVerificationResponse>} - Success response
1755
2158
  * @name verifyOtpAndAddBeneficiaryForBank
1756
2159
  * @summary: Verify OTP for bank and add beneficiary
1757
2160
  * @description: Verify the OTP provided by the user and adds a bank beneficiary for refund processing. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyOtpAndAddBeneficiaryForBank/).
@@ -1760,6 +2163,14 @@ class Payment {
1760
2163
  { body, requestHeaders } = { requestHeaders: {} },
1761
2164
  { responseHeaders } = { responseHeaders: false }
1762
2165
  ) {
2166
+ let invalidInput = [];
2167
+ if (invalidInput.length) {
2168
+ const error = new Error();
2169
+ error.message = "Missing required field";
2170
+ error.details = invalidInput;
2171
+ return Promise.reject(new FDKClientValidationError(error));
2172
+ }
2173
+
1763
2174
  const query_params = {};
1764
2175
 
1765
2176
  const xHeaders = {};
@@ -1788,7 +2199,7 @@ class Payment {
1788
2199
  /**
1789
2200
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1790
2201
  * @param {import("../ApplicationAPIClient").Options} - Options
1791
- * @returns {Promise<WalletOtpDetails>} - Success response
2202
+ * @returns {Promise<WalletOtpResponse>} - Success response
1792
2203
  * @name verifyOtpAndAddBeneficiaryForWallet
1793
2204
  * @summary: Verify OTP for wallet
1794
2205
  * @description: Verify OTP provided by the user and adds a wallet beneficiary. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyOtpAndAddBeneficiaryForWallet/).
@@ -1797,6 +2208,14 @@ class Payment {
1797
2208
  { body, requestHeaders } = { requestHeaders: {} },
1798
2209
  { responseHeaders } = { responseHeaders: false }
1799
2210
  ) {
2211
+ let invalidInput = [];
2212
+ if (invalidInput.length) {
2213
+ const error = new Error();
2214
+ error.message = "Missing required field";
2215
+ error.details = invalidInput;
2216
+ return Promise.reject(new FDKClientValidationError(error));
2217
+ }
2218
+
1800
2219
  const query_params = {};
1801
2220
 
1802
2221
  const xHeaders = {};
@@ -1834,6 +2253,14 @@ class Payment {
1834
2253
  { body, requestHeaders } = { requestHeaders: {} },
1835
2254
  { responseHeaders } = { responseHeaders: false }
1836
2255
  ) {
2256
+ let invalidInput = [];
2257
+ if (invalidInput.length) {
2258
+ const error = new Error();
2259
+ error.message = "Missing required field";
2260
+ error.details = invalidInput;
2261
+ return Promise.reject(new FDKClientValidationError(error));
2262
+ }
2263
+
1837
2264
  const query_params = {};
1838
2265
 
1839
2266
  const xHeaders = {};