@gofynd/fdk-client-javascript 1.2.0 → 1.3.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 (262) hide show
  1. package/README.md +44 -7
  2. package/package.json +1 -2
  3. package/sdk/application/ApplicationAPIClient.d.ts +3 -3
  4. package/sdk/application/ApplicationAPIClient.js +6 -4
  5. package/sdk/application/ApplicationClient.d.ts +2 -3
  6. package/sdk/application/ApplicationClient.js +1 -45
  7. package/sdk/application/ApplicationConfig.d.ts +46 -6
  8. package/sdk/application/ApplicationConfig.js +15 -16
  9. package/sdk/application/Cart/CartApplicationClient.d.ts +61 -33
  10. package/sdk/application/Cart/CartApplicationClient.js +225 -134
  11. package/sdk/application/Cart/CartApplicationModel.d.ts +4 -4
  12. package/sdk/application/Cart/CartApplicationModel.js +4 -4
  13. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +61 -30
  14. package/sdk/application/Catalog/CatalogApplicationClient.js +234 -146
  15. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +115 -13
  16. package/sdk/application/Catalog/CatalogApplicationModel.js +77 -12
  17. package/sdk/application/Common/CommonApplicationClient.d.ts +5 -3
  18. package/sdk/application/Common/CommonApplicationClient.js +13 -11
  19. package/sdk/application/Common/CommonApplicationModel.d.ts +3 -83
  20. package/sdk/application/Common/CommonApplicationModel.js +2 -58
  21. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +9 -3
  22. package/sdk/application/Communication/CommunicationApplicationClient.js +25 -13
  23. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +1 -34
  24. package/sdk/application/Communication/CommunicationApplicationModel.js +0 -36
  25. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +46 -16
  26. package/sdk/application/Configuration/ConfigurationApplicationClient.js +144 -68
  27. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1 -219
  28. package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -226
  29. package/sdk/application/Content/ContentApplicationClient.d.ts +49 -21
  30. package/sdk/application/Content/ContentApplicationClient.js +159 -80
  31. package/sdk/application/Content/ContentApplicationModel.d.ts +5 -622
  32. package/sdk/application/Content/ContentApplicationModel.js +11 -763
  33. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -3
  34. package/sdk/application/FileStorage/FileStorageApplicationClient.js +20 -14
  35. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +1 -152
  36. package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -180
  37. package/sdk/application/Lead/LeadApplicationClient.d.ts +14 -7
  38. package/sdk/application/Lead/LeadApplicationClient.js +50 -31
  39. package/sdk/application/Lead/LeadApplicationModel.d.ts +22 -741
  40. package/sdk/application/Lead/LeadApplicationModel.js +21 -481
  41. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +11 -5
  42. package/sdk/application/Logistic/LogisticApplicationClient.js +41 -20
  43. package/sdk/application/Order/OrderApplicationClient.d.ts +24 -12
  44. package/sdk/application/Order/OrderApplicationClient.js +88 -56
  45. package/sdk/application/Payment/PaymentApplicationClient.d.ts +91 -42
  46. package/sdk/application/Payment/PaymentApplicationClient.js +293 -194
  47. package/sdk/application/Payment/PaymentApplicationModel.d.ts +36 -36
  48. package/sdk/application/Payment/PaymentApplicationModel.js +36 -36
  49. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +59 -32
  50. package/sdk/application/PosCart/PosCartApplicationClient.js +214 -130
  51. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +2 -2
  52. package/sdk/application/PosCart/PosCartApplicationModel.js +2 -2
  53. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +16 -7
  54. package/sdk/application/Rewards/RewardsApplicationClient.js +56 -29
  55. package/sdk/application/Share/ShareApplicationClient.d.ts +15 -7
  56. package/sdk/application/Share/ShareApplicationClient.js +51 -31
  57. package/sdk/application/Share/ShareApplicationModel.d.ts +1 -33
  58. package/sdk/application/Share/ShareApplicationModel.js +0 -38
  59. package/sdk/application/Theme/ThemeApplicationClient.d.ts +9 -4
  60. package/sdk/application/Theme/ThemeApplicationClient.js +35 -18
  61. package/sdk/application/Theme/ThemeApplicationModel.d.ts +982 -312
  62. package/sdk/application/Theme/ThemeApplicationModel.js +621 -284
  63. package/sdk/application/User/UserApplicationClient.d.ts +74 -35
  64. package/sdk/application/User/UserApplicationClient.js +252 -161
  65. package/sdk/application/User/UserApplicationModel.d.ts +3 -401
  66. package/sdk/application/User/UserApplicationModel.js +2 -490
  67. package/sdk/common/AxiosHelper.js +1 -2
  68. package/sdk/common/FDKError.d.ts +3 -0
  69. package/sdk/common/FDKError.js +8 -0
  70. package/sdk/common/utils.d.ts +3 -0
  71. package/sdk/common/utils.js +29 -0
  72. package/sdk/partner/PartnerAPIClient.d.ts +5 -4
  73. package/sdk/partner/PartnerAPIClient.js +7 -4
  74. package/sdk/partner/PartnerClient.d.ts +2 -0
  75. package/sdk/partner/PartnerClient.js +3 -0
  76. package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
  77. package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
  78. package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
  79. package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
  80. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
  81. package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
  82. package/sdk/partner/index.d.ts +3 -1
  83. package/sdk/partner/index.js +3 -1
  84. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +8 -4
  85. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +38 -16
  86. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +1 -13
  87. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +0 -12
  88. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +10 -0
  89. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +4 -0
  90. package/sdk/platform/Billing/BillingPlatformClient.d.ts +59 -14
  91. package/sdk/platform/Billing/BillingPlatformClient.js +315 -64
  92. package/sdk/platform/Billing/BillingPlatformModel.d.ts +56 -196
  93. package/sdk/platform/Billing/BillingPlatformModel.js +63 -217
  94. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +23 -1
  95. package/sdk/platform/Billing/BillingPlatformValidator.js +31 -0
  96. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +124 -63
  97. package/sdk/platform/Cart/CartPlatformApplicationClient.js +431 -265
  98. package/sdk/platform/Cart/CartPlatformModel.d.ts +253 -53
  99. package/sdk/platform/Cart/CartPlatformModel.js +104 -54
  100. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +120 -53
  101. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +398 -247
  102. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +155 -78
  103. package/sdk/platform/Catalog/CatalogPlatformClient.js +561 -355
  104. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +10 -12
  105. package/sdk/platform/Catalog/CatalogPlatformModel.js +10 -12
  106. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +30 -0
  107. package/sdk/platform/Catalog/CatalogPlatformValidator.js +13 -0
  108. package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -3
  109. package/sdk/platform/Common/CommonPlatformClient.js +13 -11
  110. package/sdk/platform/Common/CommonPlatformModel.d.ts +39 -64
  111. package/sdk/platform/Common/CommonPlatformModel.js +23 -57
  112. package/sdk/platform/Common/CommonPlatformValidator.d.ts +5 -10
  113. package/sdk/platform/Common/CommonPlatformValidator.js +3 -4
  114. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +370 -120
  115. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +2328 -888
  116. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +143 -24
  117. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +179 -15
  118. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
  119. package/sdk/platform/Communication/CommunicationPlatformClient.js +6 -5
  120. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +386 -308
  121. package/sdk/platform/Communication/CommunicationPlatformModel.js +415 -355
  122. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +38 -13
  123. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +171 -57
  124. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +53 -1
  125. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +54 -0
  126. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +5 -1
  127. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +7 -0
  128. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +96 -29
  129. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +311 -126
  130. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +5 -1
  131. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +7 -0
  132. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +36 -18
  133. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +121 -86
  134. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +13 -180
  135. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +5 -113
  136. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +162 -70
  137. package/sdk/platform/Content/ContentPlatformApplicationClient.js +528 -309
  138. package/sdk/platform/Content/ContentPlatformModel.d.ts +9 -198
  139. package/sdk/platform/Content/ContentPlatformModel.js +8 -231
  140. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +48 -11
  141. package/sdk/platform/Discount/DiscountPlatformClient.js +142 -48
  142. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +40 -1
  143. package/sdk/platform/Discount/DiscountPlatformModel.js +27 -0
  144. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +84 -18
  145. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +486 -53
  146. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +71 -7
  147. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +81 -5
  148. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +13 -18
  149. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +58 -65
  150. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +198 -71
  151. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +212 -64
  152. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +18 -10
  153. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -6
  154. package/sdk/platform/Finance/FinancePlatformClient.d.ts +177 -40
  155. package/sdk/platform/Finance/FinancePlatformClient.js +1028 -132
  156. package/sdk/platform/Finance/FinancePlatformModel.d.ts +670 -22
  157. package/sdk/platform/Finance/FinancePlatformModel.js +809 -23
  158. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +111 -1
  159. package/sdk/platform/Finance/FinancePlatformValidator.js +134 -0
  160. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +24 -12
  161. package/sdk/platform/Inventory/InventoryPlatformClient.js +94 -52
  162. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +27 -13
  163. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +101 -55
  164. package/sdk/platform/Lead/LeadPlatformClient.d.ts +50 -39
  165. package/sdk/platform/Lead/LeadPlatformClient.js +171 -112
  166. package/sdk/platform/Lead/LeadPlatformModel.d.ts +32 -390
  167. package/sdk/platform/Lead/LeadPlatformModel.js +31 -214
  168. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +33 -33
  169. package/sdk/platform/Lead/LeadPlatformValidator.js +23 -23
  170. package/sdk/platform/OAuthClient.js +6 -2
  171. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +4 -2
  172. package/sdk/platform/Order/OrderPlatformApplicationClient.js +12 -10
  173. package/sdk/platform/Order/OrderPlatformClient.d.ts +165 -71
  174. package/sdk/platform/Order/OrderPlatformClient.js +738 -205
  175. package/sdk/platform/Order/OrderPlatformModel.d.ts +261 -3
  176. package/sdk/platform/Order/OrderPlatformModel.js +225 -2
  177. package/sdk/platform/Order/OrderPlatformValidator.d.ts +104 -3
  178. package/sdk/platform/Order/OrderPlatformValidator.js +85 -2
  179. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -22
  180. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +12 -159
  181. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +1 -30
  182. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +0 -26
  183. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -690
  184. package/sdk/platform/Partner/PartnerPlatformModel.js +0 -809
  185. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +167 -32
  186. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +793 -145
  187. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +91 -1
  188. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +91 -0
  189. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -10
  190. package/sdk/platform/Payment/PaymentPlatformClient.js +68 -47
  191. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +549 -7
  192. package/sdk/platform/Payment/PaymentPlatformModel.js +305 -6
  193. package/sdk/platform/PlatformAPIClient.d.ts +3 -3
  194. package/sdk/platform/PlatformAPIClient.js +2 -2
  195. package/sdk/platform/PlatformClient.d.ts +2 -2
  196. package/sdk/platform/PlatformClient.js +4 -4
  197. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +28 -12
  198. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +90 -53
  199. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +1 -12
  200. package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -14
  201. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +62 -26
  202. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +210 -93
  203. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +20 -11
  204. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +23 -11
  205. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +36 -18
  206. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +142 -78
  207. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +12 -3
  208. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +14 -2
  209. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -26
  210. package/sdk/platform/Share/SharePlatformApplicationClient.js +36 -67
  211. package/sdk/platform/Share/SharePlatformModel.d.ts +4 -4
  212. package/sdk/platform/Share/SharePlatformModel.js +4 -4
  213. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +127 -57
  214. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +564 -189
  215. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +63 -26
  216. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +62 -22
  217. package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
  218. package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
  219. package/sdk/platform/Theme/ThemePlatformModel.d.ts +1167 -261
  220. package/sdk/platform/Theme/ThemePlatformModel.js +801 -244
  221. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
  222. package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
  223. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +35 -17
  224. package/sdk/platform/User/UserPlatformApplicationClient.js +132 -73
  225. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +7 -0
  226. package/sdk/platform/User/UserPlatformApplicationValidator.js +3 -0
  227. package/sdk/platform/User/UserPlatformModel.d.ts +1 -738
  228. package/sdk/platform/User/UserPlatformModel.js +3 -899
  229. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +120 -7
  230. package/sdk/platform/Webhook/WebhookPlatformClient.js +799 -41
  231. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +476 -86
  232. package/sdk/platform/Webhook/WebhookPlatformModel.js +388 -89
  233. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +96 -9
  234. package/sdk/platform/Webhook/WebhookPlatformValidator.js +117 -5
  235. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -3
  236. package/sdk/public/Configuration/ConfigurationPublicClient.js +13 -11
  237. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +3 -106
  238. package/sdk/public/Configuration/ConfigurationPublicModel.js +2 -59
  239. package/sdk/public/Inventory/InventoryPublicClient.d.ts +12 -6
  240. package/sdk/public/Inventory/InventoryPublicClient.js +42 -27
  241. package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
  242. package/sdk/public/Partner/PartnerPublicClient.js +110 -0
  243. package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
  244. package/sdk/public/Partner/PartnerPublicModel.js +280 -0
  245. package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
  246. package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
  247. package/sdk/public/PublicAPIClient.d.ts +14 -1
  248. package/sdk/public/PublicAPIClient.js +7 -1
  249. package/sdk/public/PublicClient.d.ts +2 -0
  250. package/sdk/public/PublicClient.js +4 -0
  251. package/sdk/public/Webhook/WebhookPublicClient.d.ts +5 -2
  252. package/sdk/public/Webhook/WebhookPublicClient.js +15 -9
  253. package/sdk/public/Webhook/WebhookPublicModel.d.ts +1 -191
  254. package/sdk/public/Webhook/WebhookPublicModel.js +0 -229
  255. package/sdk/public/index.d.ts +1 -0
  256. package/sdk/public/index.js +2 -0
  257. package/sdk/application/ApplicationModels.d.ts +0 -48
  258. package/sdk/application/ApplicationModels.js +0 -38
  259. package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -106
  260. package/sdk/platform/Partner/PartnerPlatformClient.js +0 -878
  261. package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -208
  262. package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -169
@@ -100,6 +100,7 @@ class Payment {
100
100
 
101
101
  /**
102
102
  * @param {PaymentApplicationValidator.AddBeneficiaryDetailsParam} arg - Arg object.
103
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
103
104
  * @param {import("../ApplicationAPIClient").Options} - Options
104
105
  * @returns {Promise<PaymentApplicationModel.RefundAccountResponse>} -
105
106
  * Success response
@@ -107,7 +108,10 @@ class Payment {
107
108
  * @summary: Save bank details for cancelled/returned order
108
109
  * @description: Use this API to save the bank details for a returned or cancelled order to refund the amount. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/addBeneficiaryDetails/).
109
110
  */
110
- async addBeneficiaryDetails({ body } = {}, { headers } = { headers: false }) {
111
+ async addBeneficiaryDetails(
112
+ { body, requestHeaders } = { requestHeaders: {} },
113
+ { responseHeaders } = { responseHeaders: false }
114
+ ) {
111
115
  const {
112
116
  error,
113
117
  } = PaymentApplicationValidator.addBeneficiaryDetails().validate(
@@ -145,12 +149,12 @@ class Payment {
145
149
  }),
146
150
  query_params,
147
151
  body,
148
- xHeaders,
149
- { headers }
152
+ { ...xHeaders, ...requestHeaders },
153
+ { responseHeaders }
150
154
  );
151
155
 
152
156
  let responseData = response;
153
- if (headers) {
157
+ if (responseHeaders) {
154
158
  responseData = response[0];
155
159
  }
156
160
 
@@ -175,6 +179,7 @@ class Payment {
175
179
  * @param {PaymentApplicationValidator.AddRefundBankAccountUsingOTPParam} arg
176
180
  * - Arg object.
177
181
  *
182
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
178
183
  * @param {import("../ApplicationAPIClient").Options} - Options
179
184
  * @returns {Promise<PaymentApplicationModel.RefundAccountResponse>} -
180
185
  * Success response
@@ -183,8 +188,8 @@ class Payment {
183
188
  * @description: Use this API to save bank details for returned/cancelled order to refund amount in his account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/addRefundBankAccountUsingOTP/).
184
189
  */
185
190
  async addRefundBankAccountUsingOTP(
186
- { body } = {},
187
- { headers } = { headers: false }
191
+ { body, requestHeaders } = { requestHeaders: {} },
192
+ { responseHeaders } = { responseHeaders: false }
188
193
  ) {
189
194
  const {
190
195
  error,
@@ -223,12 +228,12 @@ class Payment {
223
228
  }),
224
229
  query_params,
225
230
  body,
226
- xHeaders,
227
- { headers }
231
+ { ...xHeaders, ...requestHeaders },
232
+ { responseHeaders }
228
233
  );
229
234
 
230
235
  let responseData = response;
231
- if (headers) {
236
+ if (responseHeaders) {
232
237
  responseData = response[0];
233
238
  }
234
239
 
@@ -251,13 +256,17 @@ class Payment {
251
256
 
252
257
  /**
253
258
  * @param {PaymentApplicationValidator.AttachCardToCustomerParam} arg - Arg object.
259
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
254
260
  * @param {import("../ApplicationAPIClient").Options} - Options
255
261
  * @returns {Promise<PaymentApplicationModel.AttachCardsResponse>} - Success response
256
262
  * @name attachCardToCustomer
257
263
  * @summary: Attach a saved card to customer.
258
264
  * @description: Use this API to attach a customer's saved card at the payment gateway, such as Stripe, Juspay. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/attachCardToCustomer/).
259
265
  */
260
- async attachCardToCustomer({ body } = {}, { headers } = { headers: false }) {
266
+ async attachCardToCustomer(
267
+ { body, requestHeaders } = { requestHeaders: {} },
268
+ { responseHeaders } = { responseHeaders: false }
269
+ ) {
261
270
  const {
262
271
  error,
263
272
  } = PaymentApplicationValidator.attachCardToCustomer().validate(
@@ -295,12 +304,12 @@ class Payment {
295
304
  }),
296
305
  query_params,
297
306
  body,
298
- xHeaders,
299
- { headers }
307
+ { ...xHeaders, ...requestHeaders },
308
+ { responseHeaders }
300
309
  );
301
310
 
302
311
  let responseData = response;
303
- if (headers) {
312
+ if (responseHeaders) {
304
313
  responseData = response[0];
305
314
  }
306
315
 
@@ -323,6 +332,7 @@ class Payment {
323
332
 
324
333
  /**
325
334
  * @param {PaymentApplicationValidator.CancelPaymentLinkParam} arg - Arg object.
335
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
326
336
  * @param {import("../ApplicationAPIClient").Options} - Options
327
337
  * @returns {Promise<PaymentApplicationModel.CancelPaymentLinkResponse>} -
328
338
  * Success response
@@ -330,7 +340,10 @@ class Payment {
330
340
  * @summary: Cancel payment link
331
341
  * @description: Use this API to cancel a payment link for the customer - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/cancelPaymentLink/).
332
342
  */
333
- async cancelPaymentLink({ body } = {}, { headers } = { headers: false }) {
343
+ async cancelPaymentLink(
344
+ { body, requestHeaders } = { requestHeaders: {} },
345
+ { responseHeaders } = { responseHeaders: false }
346
+ ) {
334
347
  const { error } = PaymentApplicationValidator.cancelPaymentLink().validate(
335
348
  { body },
336
349
  { abortEarly: false, allowUnknown: true }
@@ -366,12 +379,12 @@ class Payment {
366
379
  }),
367
380
  query_params,
368
381
  body,
369
- xHeaders,
370
- { headers }
382
+ { ...xHeaders, ...requestHeaders },
383
+ { responseHeaders }
371
384
  );
372
385
 
373
386
  let responseData = response;
374
- if (headers) {
387
+ if (responseHeaders) {
375
388
  responseData = response[0];
376
389
  }
377
390
 
@@ -394,6 +407,7 @@ class Payment {
394
407
 
395
408
  /**
396
409
  * @param {PaymentApplicationValidator.CardDetailsParam} arg - Arg object.
410
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
397
411
  * @param {import("../ApplicationAPIClient").Options} - Options
398
412
  * @returns {Promise<PaymentApplicationModel.CardDetailsResponse>} - Success response
399
413
  * @name cardDetails
@@ -401,8 +415,8 @@ class Payment {
401
415
  * @description: API to get Card info from PG - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/cardDetails/).
402
416
  */
403
417
  async cardDetails(
404
- { cardInfo, aggregator } = {},
405
- { headers } = { headers: false }
418
+ { cardInfo, aggregator, requestHeaders } = { requestHeaders: {} },
419
+ { responseHeaders } = { responseHeaders: false }
406
420
  ) {
407
421
  const { error } = PaymentApplicationValidator.cardDetails().validate(
408
422
  { cardInfo, aggregator },
@@ -440,12 +454,12 @@ class Payment {
440
454
  }),
441
455
  query_params,
442
456
  undefined,
443
- xHeaders,
444
- { headers }
457
+ { ...xHeaders, ...requestHeaders },
458
+ { responseHeaders }
445
459
  );
446
460
 
447
461
  let responseData = response;
448
- if (headers) {
462
+ if (responseHeaders) {
449
463
  responseData = response[0];
450
464
  }
451
465
 
@@ -470,6 +484,7 @@ class Payment {
470
484
  * @param {PaymentApplicationValidator.CheckAndUpdatePaymentStatusParam} arg
471
485
  * - Arg object.
472
486
  *
487
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
473
488
  * @param {import("../ApplicationAPIClient").Options} - Options
474
489
  * @returns {Promise<PaymentApplicationModel.PaymentStatusUpdateResponse>}
475
490
  * - Success response
@@ -479,8 +494,8 @@ class Payment {
479
494
  * @description: Use this API to perform continuous polling at intervals to check the status of payment until timeout. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/checkAndUpdatePaymentStatus/).
480
495
  */
481
496
  async checkAndUpdatePaymentStatus(
482
- { body } = {},
483
- { headers } = { headers: false }
497
+ { body, requestHeaders } = { requestHeaders: {} },
498
+ { responseHeaders } = { responseHeaders: false }
484
499
  ) {
485
500
  const {
486
501
  error,
@@ -519,12 +534,12 @@ class Payment {
519
534
  }),
520
535
  query_params,
521
536
  body,
522
- xHeaders,
523
- { headers }
537
+ { ...xHeaders, ...requestHeaders },
538
+ { responseHeaders }
524
539
  );
525
540
 
526
541
  let responseData = response;
527
- if (headers) {
542
+ if (responseHeaders) {
528
543
  responseData = response[0];
529
544
  }
530
545
 
@@ -549,6 +564,7 @@ class Payment {
549
564
  * @param {PaymentApplicationValidator.CheckAndUpdatePaymentStatusPaymentLinkParam} arg
550
565
  * - Arg object.
551
566
  *
567
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
552
568
  * @param {import("../ApplicationAPIClient").Options} - Options
553
569
  * @returns {Promise<PaymentApplicationModel.PaymentStatusUpdateResponse>}
554
570
  * - Success response
@@ -558,8 +574,8 @@ class Payment {
558
574
  * @description: Use this API to perform continuous polling at intervals to check the status of payment until timeout. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/checkAndUpdatePaymentStatusPaymentLink/).
559
575
  */
560
576
  async checkAndUpdatePaymentStatusPaymentLink(
561
- { body } = {},
562
- { headers } = { headers: false }
577
+ { body, requestHeaders } = { requestHeaders: {} },
578
+ { responseHeaders } = { responseHeaders: false }
563
579
  ) {
564
580
  const {
565
581
  error,
@@ -598,12 +614,12 @@ class Payment {
598
614
  }),
599
615
  query_params,
600
616
  body,
601
- xHeaders,
602
- { headers }
617
+ { ...xHeaders, ...requestHeaders },
618
+ { responseHeaders }
603
619
  );
604
620
 
605
621
  let responseData = response;
606
- if (headers) {
622
+ if (responseHeaders) {
607
623
  responseData = response[0];
608
624
  }
609
625
 
@@ -626,13 +642,17 @@ class Payment {
626
642
 
627
643
  /**
628
644
  * @param {PaymentApplicationValidator.CheckCreditParam} arg - Arg object.
645
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
629
646
  * @param {import("../ApplicationAPIClient").Options} - Options
630
647
  * @returns {Promise<PaymentApplicationModel.CheckCreditResponse>} - Success response
631
648
  * @name checkCredit
632
649
  * @summary: API to fetch the customer credit summary
633
650
  * @description: Use this API to fetch the customer credit summary. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/checkCredit/).
634
651
  */
635
- async checkCredit({ aggregator } = {}, { headers } = { headers: false }) {
652
+ async checkCredit(
653
+ { aggregator, requestHeaders } = { requestHeaders: {} },
654
+ { responseHeaders } = { responseHeaders: false }
655
+ ) {
636
656
  const { error } = PaymentApplicationValidator.checkCredit().validate(
637
657
  { aggregator },
638
658
  { abortEarly: false, allowUnknown: true }
@@ -669,12 +689,12 @@ class Payment {
669
689
  }),
670
690
  query_params,
671
691
  undefined,
672
- xHeaders,
673
- { headers }
692
+ { ...xHeaders, ...requestHeaders },
693
+ { responseHeaders }
674
694
  );
675
695
 
676
696
  let responseData = response;
677
- if (headers) {
697
+ if (responseHeaders) {
678
698
  responseData = response[0];
679
699
  }
680
700
 
@@ -699,6 +719,7 @@ class Payment {
699
719
  * @param {PaymentApplicationValidator.CreateOrderHandlerPaymentLinkParam} arg
700
720
  * - Arg object.
701
721
  *
722
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
702
723
  * @param {import("../ApplicationAPIClient").Options} - Options
703
724
  * @returns {Promise<PaymentApplicationModel.CreateOrderUserResponse>} -
704
725
  * Success response
@@ -707,8 +728,8 @@ class Payment {
707
728
  * @description: Use this API to create a order and payment on aggregator side - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/createOrderHandlerPaymentLink/).
708
729
  */
709
730
  async createOrderHandlerPaymentLink(
710
- { body } = {},
711
- { headers } = { headers: false }
731
+ { body, requestHeaders } = { requestHeaders: {} },
732
+ { responseHeaders } = { responseHeaders: false }
712
733
  ) {
713
734
  const {
714
735
  error,
@@ -747,12 +768,12 @@ class Payment {
747
768
  }),
748
769
  query_params,
749
770
  body,
750
- xHeaders,
751
- { headers }
771
+ { ...xHeaders, ...requestHeaders },
772
+ { responseHeaders }
752
773
  );
753
774
 
754
775
  let responseData = response;
755
- if (headers) {
776
+ if (responseHeaders) {
756
777
  responseData = response[0];
757
778
  }
758
779
 
@@ -775,6 +796,7 @@ class Payment {
775
796
 
776
797
  /**
777
798
  * @param {PaymentApplicationValidator.CreatePaymentLinkParam} arg - Arg object.
799
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
778
800
  * @param {import("../ApplicationAPIClient").Options} - Options
779
801
  * @returns {Promise<PaymentApplicationModel.CreatePaymentLinkResponse>} -
780
802
  * Success response
@@ -782,7 +804,10 @@ class Payment {
782
804
  * @summary: Create payment link
783
805
  * @description: Use this API to create a payment link for the customer - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/createPaymentLink/).
784
806
  */
785
- async createPaymentLink({ body } = {}, { headers } = { headers: false }) {
807
+ async createPaymentLink(
808
+ { body, requestHeaders } = { requestHeaders: {} },
809
+ { responseHeaders } = { responseHeaders: false }
810
+ ) {
786
811
  const { error } = PaymentApplicationValidator.createPaymentLink().validate(
787
812
  { body },
788
813
  { abortEarly: false, allowUnknown: true }
@@ -818,12 +843,12 @@ class Payment {
818
843
  }),
819
844
  query_params,
820
845
  body,
821
- xHeaders,
822
- { headers }
846
+ { ...xHeaders, ...requestHeaders },
847
+ { responseHeaders }
823
848
  );
824
849
 
825
850
  let responseData = response;
826
- if (headers) {
851
+ if (responseHeaders) {
827
852
  responseData = response[0];
828
853
  }
829
854
 
@@ -846,6 +871,7 @@ class Payment {
846
871
 
847
872
  /**
848
873
  * @param {PaymentApplicationValidator.CustomerCreditSummaryParam} arg - Arg object.
874
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
849
875
  * @param {import("../ApplicationAPIClient").Options} - Options
850
876
  * @returns {Promise<PaymentApplicationModel.CustomerCreditSummaryResponse>}
851
877
  * - Success response
@@ -855,8 +881,8 @@ class Payment {
855
881
  * @description: Use this API to fetch the customer credit summary. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/customerCreditSummary/).
856
882
  */
857
883
  async customerCreditSummary(
858
- { aggregator } = {},
859
- { headers } = { headers: false }
884
+ { aggregator, requestHeaders } = { requestHeaders: {} },
885
+ { responseHeaders } = { responseHeaders: false }
860
886
  ) {
861
887
  const {
862
888
  error,
@@ -896,12 +922,12 @@ class Payment {
896
922
  }),
897
923
  query_params,
898
924
  undefined,
899
- xHeaders,
900
- { headers }
925
+ { ...xHeaders, ...requestHeaders },
926
+ { responseHeaders }
901
927
  );
902
928
 
903
929
  let responseData = response;
904
- if (headers) {
930
+ if (responseHeaders) {
905
931
  responseData = response[0];
906
932
  }
907
933
 
@@ -924,6 +950,7 @@ class Payment {
924
950
 
925
951
  /**
926
952
  * @param {PaymentApplicationValidator.CustomerOnboardParam} arg - Arg object.
953
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
927
954
  * @param {import("../ApplicationAPIClient").Options} - Options
928
955
  * @returns {Promise<PaymentApplicationModel.CustomerOnboardingResponse>} -
929
956
  * Success response
@@ -931,7 +958,10 @@ class Payment {
931
958
  * @summary: API to fetch the customer credit summary
932
959
  * @description: Use this API to fetch the customer credit summary. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/customerOnboard/).
933
960
  */
934
- async customerOnboard({ body } = {}, { headers } = { headers: false }) {
961
+ async customerOnboard(
962
+ { body, requestHeaders } = { requestHeaders: {} },
963
+ { responseHeaders } = { responseHeaders: false }
964
+ ) {
935
965
  const { error } = PaymentApplicationValidator.customerOnboard().validate(
936
966
  { body },
937
967
  { abortEarly: false, allowUnknown: true }
@@ -967,12 +997,12 @@ class Payment {
967
997
  }),
968
998
  query_params,
969
999
  body,
970
- xHeaders,
971
- { headers }
1000
+ { ...xHeaders, ...requestHeaders },
1001
+ { responseHeaders }
972
1002
  );
973
1003
 
974
1004
  let responseData = response;
975
- if (headers) {
1005
+ if (responseHeaders) {
976
1006
  responseData = response[0];
977
1007
  }
978
1008
 
@@ -995,13 +1025,17 @@ class Payment {
995
1025
 
996
1026
  /**
997
1027
  * @param {PaymentApplicationValidator.DeleteUserCardParam} arg - Arg object.
1028
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
998
1029
  * @param {import("../ApplicationAPIClient").Options} - Options
999
1030
  * @returns {Promise<PaymentApplicationModel.DeleteCardsResponse>} - Success response
1000
1031
  * @name deleteUserCard
1001
1032
  * @summary: Delete a card
1002
1033
  * @description: Use this API to delete a card added by a user on the payment gateway and clear the cache. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/deleteUserCard/).
1003
1034
  */
1004
- async deleteUserCard({ body } = {}, { headers } = { headers: false }) {
1035
+ async deleteUserCard(
1036
+ { body, requestHeaders } = { requestHeaders: {} },
1037
+ { responseHeaders } = { responseHeaders: false }
1038
+ ) {
1005
1039
  const { error } = PaymentApplicationValidator.deleteUserCard().validate(
1006
1040
  { body },
1007
1041
  { abortEarly: false, allowUnknown: true }
@@ -1037,12 +1071,12 @@ class Payment {
1037
1071
  }),
1038
1072
  query_params,
1039
1073
  body,
1040
- xHeaders,
1041
- { headers }
1074
+ { ...xHeaders, ...requestHeaders },
1075
+ { responseHeaders }
1042
1076
  );
1043
1077
 
1044
1078
  let responseData = response;
1045
- if (headers) {
1079
+ if (responseHeaders) {
1046
1080
  responseData = response[0];
1047
1081
  }
1048
1082
 
@@ -1067,6 +1101,7 @@ class Payment {
1067
1101
  * @param {PaymentApplicationValidator.EnableOrDisableRefundTransferModeParam} arg
1068
1102
  * - Arg object.
1069
1103
  *
1104
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1070
1105
  * @param {import("../ApplicationAPIClient").Options} - Options
1071
1106
  * @returns {Promise<PaymentApplicationModel.UpdateRefundTransferModeResponse>}
1072
1107
  * - Success response
@@ -1076,8 +1111,8 @@ class Payment {
1076
1111
  * @description: Activate or Deactivate Transfer Mode to collect Beneficiary Details for Refund - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/enableOrDisableRefundTransferMode/).
1077
1112
  */
1078
1113
  async enableOrDisableRefundTransferMode(
1079
- { body } = {},
1080
- { headers } = { headers: false }
1114
+ { body, requestHeaders } = { requestHeaders: {} },
1115
+ { responseHeaders } = { responseHeaders: false }
1081
1116
  ) {
1082
1117
  const {
1083
1118
  error,
@@ -1116,12 +1151,12 @@ class Payment {
1116
1151
  }),
1117
1152
  query_params,
1118
1153
  body,
1119
- xHeaders,
1120
- { headers }
1154
+ { ...xHeaders, ...requestHeaders },
1155
+ { responseHeaders }
1121
1156
  );
1122
1157
 
1123
1158
  let responseData = response;
1124
- if (headers) {
1159
+ if (responseHeaders) {
1125
1160
  responseData = response[0];
1126
1161
  }
1127
1162
 
@@ -1144,6 +1179,7 @@ class Payment {
1144
1179
 
1145
1180
  /**
1146
1181
  * @param {PaymentApplicationValidator.GetActiveCardAggregatorParam} arg - Arg object.
1182
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1147
1183
  * @param {import("../ApplicationAPIClient").Options} - Options
1148
1184
  * @returns {Promise<PaymentApplicationModel.ActiveCardPaymentGatewayResponse>}
1149
1185
  * - Success response
@@ -1153,8 +1189,8 @@ class Payment {
1153
1189
  * @description: Use this API to retrieve an active payment aggregator along with the Customer ID. This is applicable for cards payments only. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getActiveCardAggregator/).
1154
1190
  */
1155
1191
  async getActiveCardAggregator(
1156
- { refresh } = {},
1157
- { headers } = { headers: false }
1192
+ { refresh, requestHeaders } = { requestHeaders: {} },
1193
+ { responseHeaders } = { responseHeaders: false }
1158
1194
  ) {
1159
1195
  const {
1160
1196
  error,
@@ -1194,12 +1230,12 @@ class Payment {
1194
1230
  }),
1195
1231
  query_params,
1196
1232
  undefined,
1197
- xHeaders,
1198
- { headers }
1233
+ { ...xHeaders, ...requestHeaders },
1234
+ { responseHeaders }
1199
1235
  );
1200
1236
 
1201
1237
  let responseData = response;
1202
- if (headers) {
1238
+ if (responseHeaders) {
1203
1239
  responseData = response[0];
1204
1240
  }
1205
1241
 
@@ -1221,13 +1257,20 @@ class Payment {
1221
1257
  }
1222
1258
 
1223
1259
  /**
1260
+ * @param {PaymentApplicationValidator.GetActiveRefundTransferModesParam} arg
1261
+ * - Arg object.
1262
+ *
1263
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1224
1264
  * @param {import("../ApplicationAPIClient").Options} - Options
1225
1265
  * @returns {Promise<PaymentApplicationModel.TransferModeResponse>} - Success response
1226
1266
  * @name getActiveRefundTransferModes
1227
1267
  * @summary: Lists the mode of refund
1228
1268
  * @description: Use this API to retrieve eligible refund modes (such as Netbanking) and add the beneficiary details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getActiveRefundTransferModes/).
1229
1269
  */
1230
- async getActiveRefundTransferModes({ headers } = { headers: false }) {
1270
+ async getActiveRefundTransferModes(
1271
+ { requestHeaders } = { requestHeaders: {} },
1272
+ { responseHeaders } = { responseHeaders: false }
1273
+ ) {
1231
1274
  const {
1232
1275
  error,
1233
1276
  } = PaymentApplicationValidator.getActiveRefundTransferModes().validate(
@@ -1265,12 +1308,12 @@ class Payment {
1265
1308
  }),
1266
1309
  query_params,
1267
1310
  undefined,
1268
- xHeaders,
1269
- { headers }
1311
+ { ...xHeaders, ...requestHeaders },
1312
+ { responseHeaders }
1270
1313
  );
1271
1314
 
1272
1315
  let responseData = response;
1273
- if (headers) {
1316
+ if (responseHeaders) {
1274
1317
  responseData = response[0];
1275
1318
  }
1276
1319
 
@@ -1293,6 +1336,7 @@ class Payment {
1293
1336
 
1294
1337
  /**
1295
1338
  * @param {PaymentApplicationValidator.GetActiveUserCardsParam} arg - Arg object.
1339
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1296
1340
  * @param {import("../ApplicationAPIClient").Options} - Options
1297
1341
  * @returns {Promise<PaymentApplicationModel.ListCardsResponse>} - Success response
1298
1342
  * @name getActiveUserCards
@@ -1300,8 +1344,8 @@ class Payment {
1300
1344
  * @description: Use this API to retrieve a list of cards stored by user from an active payment gateway. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getActiveUserCards/).
1301
1345
  */
1302
1346
  async getActiveUserCards(
1303
- { forceRefresh } = {},
1304
- { headers } = { headers: false }
1347
+ { forceRefresh, requestHeaders } = { requestHeaders: {} },
1348
+ { responseHeaders } = { responseHeaders: false }
1305
1349
  ) {
1306
1350
  const { error } = PaymentApplicationValidator.getActiveUserCards().validate(
1307
1351
  { forceRefresh },
@@ -1339,12 +1383,12 @@ class Payment {
1339
1383
  }),
1340
1384
  query_params,
1341
1385
  undefined,
1342
- xHeaders,
1343
- { headers }
1386
+ { ...xHeaders, ...requestHeaders },
1387
+ { responseHeaders }
1344
1388
  );
1345
1389
 
1346
1390
  let responseData = response;
1347
- if (headers) {
1391
+ if (responseHeaders) {
1348
1392
  responseData = response[0];
1349
1393
  }
1350
1394
 
@@ -1367,6 +1411,7 @@ class Payment {
1367
1411
 
1368
1412
  /**
1369
1413
  * @param {PaymentApplicationValidator.GetAggregatorsConfigParam} arg - Arg object.
1414
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1370
1415
  * @param {import("../ApplicationAPIClient").Options} - Options
1371
1416
  * @returns {Promise<PaymentApplicationModel.AggregatorsConfigDetailResponse>}
1372
1417
  * - Success response
@@ -1376,8 +1421,8 @@ class Payment {
1376
1421
  * @description: Use this API to retrieve the payment gateway key, secrets, merchant, SDK/API details to complete a payment at front-end. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getAggregatorsConfig/).
1377
1422
  */
1378
1423
  async getAggregatorsConfig(
1379
- { xApiToken, refresh } = {},
1380
- { headers } = { headers: false }
1424
+ { xApiToken, refresh, requestHeaders } = { requestHeaders: {} },
1425
+ { responseHeaders } = { responseHeaders: false }
1381
1426
  ) {
1382
1427
  const {
1383
1428
  error,
@@ -1418,12 +1463,12 @@ class Payment {
1418
1463
  }),
1419
1464
  query_params,
1420
1465
  undefined,
1421
- xHeaders,
1422
- { headers }
1466
+ { ...xHeaders, ...requestHeaders },
1467
+ { responseHeaders }
1423
1468
  );
1424
1469
 
1425
1470
  let responseData = response;
1426
- if (headers) {
1471
+ if (responseHeaders) {
1427
1472
  responseData = response[0];
1428
1473
  }
1429
1474
 
@@ -1445,6 +1490,10 @@ class Payment {
1445
1490
  }
1446
1491
 
1447
1492
  /**
1493
+ * @param {PaymentApplicationValidator.GetEpaylaterBannerDetailsParam} arg
1494
+ * - Arg object.
1495
+ *
1496
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1448
1497
  * @param {import("../ApplicationAPIClient").Options} - Options
1449
1498
  * @returns {Promise<PaymentApplicationModel.EpaylaterBannerResponse>} -
1450
1499
  * Success response
@@ -1452,7 +1501,10 @@ class Payment {
1452
1501
  * @summary: Get Epaylater Enabled
1453
1502
  * @description: Get Epaylater Enabled if user is tentatively approved by epaylater - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getEpaylaterBannerDetails/).
1454
1503
  */
1455
- async getEpaylaterBannerDetails({ headers } = { headers: false }) {
1504
+ async getEpaylaterBannerDetails(
1505
+ { requestHeaders } = { requestHeaders: {} },
1506
+ { responseHeaders } = { responseHeaders: false }
1507
+ ) {
1456
1508
  const {
1457
1509
  error,
1458
1510
  } = PaymentApplicationValidator.getEpaylaterBannerDetails().validate(
@@ -1490,12 +1542,12 @@ class Payment {
1490
1542
  }),
1491
1543
  query_params,
1492
1544
  undefined,
1493
- xHeaders,
1494
- { headers }
1545
+ { ...xHeaders, ...requestHeaders },
1546
+ { responseHeaders }
1495
1547
  );
1496
1548
 
1497
1549
  let responseData = response;
1498
- if (headers) {
1550
+ if (responseHeaders) {
1499
1551
  responseData = response[0];
1500
1552
  }
1501
1553
 
@@ -1520,6 +1572,7 @@ class Payment {
1520
1572
  * @param {PaymentApplicationValidator.GetOrderBeneficiariesDetailParam} arg
1521
1573
  * - Arg object.
1522
1574
  *
1575
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1523
1576
  * @param {import("../ApplicationAPIClient").Options} - Options
1524
1577
  * @returns {Promise<PaymentApplicationModel.OrderBeneficiaryResponse>} -
1525
1578
  * Success response
@@ -1528,8 +1581,8 @@ class Payment {
1528
1581
  * @description: Use this API to get the details of all active beneficiary added by a user for refund. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getOrderBeneficiariesDetail/).
1529
1582
  */
1530
1583
  async getOrderBeneficiariesDetail(
1531
- { orderId } = {},
1532
- { headers } = { headers: false }
1584
+ { orderId, requestHeaders } = { requestHeaders: {} },
1585
+ { responseHeaders } = { responseHeaders: false }
1533
1586
  ) {
1534
1587
  const {
1535
1588
  error,
@@ -1569,12 +1622,12 @@ class Payment {
1569
1622
  }),
1570
1623
  query_params,
1571
1624
  undefined,
1572
- xHeaders,
1573
- { headers }
1625
+ { ...xHeaders, ...requestHeaders },
1626
+ { responseHeaders }
1574
1627
  );
1575
1628
 
1576
1629
  let responseData = response;
1577
- if (headers) {
1630
+ if (responseHeaders) {
1578
1631
  responseData = response[0];
1579
1632
  }
1580
1633
 
@@ -1597,6 +1650,7 @@ class Payment {
1597
1650
 
1598
1651
  /**
1599
1652
  * @param {PaymentApplicationValidator.GetPaymentLinkParam} arg - Arg object.
1653
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1600
1654
  * @param {import("../ApplicationAPIClient").Options} - Options
1601
1655
  * @returns {Promise<PaymentApplicationModel.GetPaymentLinkResponse>} -
1602
1656
  * Success response
@@ -1605,8 +1659,8 @@ class Payment {
1605
1659
  * @description: Use this API to get a payment link - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getPaymentLink/).
1606
1660
  */
1607
1661
  async getPaymentLink(
1608
- { paymentLinkId } = {},
1609
- { headers } = { headers: false }
1662
+ { paymentLinkId, requestHeaders } = { requestHeaders: {} },
1663
+ { responseHeaders } = { responseHeaders: false }
1610
1664
  ) {
1611
1665
  const { error } = PaymentApplicationValidator.getPaymentLink().validate(
1612
1666
  { paymentLinkId },
@@ -1644,12 +1698,12 @@ class Payment {
1644
1698
  }),
1645
1699
  query_params,
1646
1700
  undefined,
1647
- xHeaders,
1648
- { headers }
1701
+ { ...xHeaders, ...requestHeaders },
1702
+ { responseHeaders }
1649
1703
  );
1650
1704
 
1651
1705
  let responseData = response;
1652
- if (headers) {
1706
+ if (responseHeaders) {
1653
1707
  responseData = response[0];
1654
1708
  }
1655
1709
 
@@ -1672,6 +1726,7 @@ class Payment {
1672
1726
 
1673
1727
  /**
1674
1728
  * @param {PaymentApplicationValidator.GetPaymentModeRoutesParam} arg - Arg object.
1729
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1675
1730
  * @param {import("../ApplicationAPIClient").Options} - Options
1676
1731
  * @returns {Promise<PaymentApplicationModel.PaymentModeRouteResponse>} -
1677
1732
  * Success response
@@ -1688,8 +1743,9 @@ class Payment {
1688
1743
  refresh,
1689
1744
  cardReference,
1690
1745
  userDetails,
1691
- } = {},
1692
- { headers } = { headers: false }
1746
+ requestHeaders,
1747
+ } = { requestHeaders: {} },
1748
+ { responseHeaders } = { responseHeaders: false }
1693
1749
  ) {
1694
1750
  const {
1695
1751
  error,
@@ -1751,12 +1807,12 @@ class Payment {
1751
1807
  }),
1752
1808
  query_params,
1753
1809
  undefined,
1754
- xHeaders,
1755
- { headers }
1810
+ { ...xHeaders, ...requestHeaders },
1811
+ { responseHeaders }
1756
1812
  );
1757
1813
 
1758
1814
  let responseData = response;
1759
- if (headers) {
1815
+ if (responseHeaders) {
1760
1816
  responseData = response[0];
1761
1817
  }
1762
1818
 
@@ -1781,6 +1837,7 @@ class Payment {
1781
1837
  * @param {PaymentApplicationValidator.GetPaymentModeRoutesPaymentLinkParam} arg
1782
1838
  * - Arg object.
1783
1839
  *
1840
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1784
1841
  * @param {import("../ApplicationAPIClient").Options} - Options
1785
1842
  * @returns {Promise<PaymentApplicationModel.PaymentModeRouteResponse>} -
1786
1843
  * Success response
@@ -1789,8 +1846,8 @@ class Payment {
1789
1846
  * @description: Use this API to get all valid payment options for doing a payment through payment link - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getPaymentModeRoutesPaymentLink/).
1790
1847
  */
1791
1848
  async getPaymentModeRoutesPaymentLink(
1792
- { paymentLinkId } = {},
1793
- { headers } = { headers: false }
1849
+ { paymentLinkId, requestHeaders } = { requestHeaders: {} },
1850
+ { responseHeaders } = { responseHeaders: false }
1794
1851
  ) {
1795
1852
  const {
1796
1853
  error,
@@ -1830,12 +1887,12 @@ class Payment {
1830
1887
  }),
1831
1888
  query_params,
1832
1889
  undefined,
1833
- xHeaders,
1834
- { headers }
1890
+ { ...xHeaders, ...requestHeaders },
1891
+ { responseHeaders }
1835
1892
  );
1836
1893
 
1837
1894
  let responseData = response;
1838
- if (headers) {
1895
+ if (responseHeaders) {
1839
1896
  responseData = response[0];
1840
1897
  }
1841
1898
 
@@ -1858,6 +1915,7 @@ class Payment {
1858
1915
 
1859
1916
  /**
1860
1917
  * @param {PaymentApplicationValidator.GetPosPaymentModeRoutesParam} arg - Arg object.
1918
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1861
1919
  * @param {import("../ApplicationAPIClient").Options} - Options
1862
1920
  * @returns {Promise<PaymentApplicationModel.PaymentModeRouteResponse>} -
1863
1921
  * Success response
@@ -1875,8 +1933,9 @@ class Payment {
1875
1933
  refresh,
1876
1934
  cardReference,
1877
1935
  userDetails,
1878
- } = {},
1879
- { headers } = { headers: false }
1936
+ requestHeaders,
1937
+ } = { requestHeaders: {} },
1938
+ { responseHeaders } = { responseHeaders: false }
1880
1939
  ) {
1881
1940
  const {
1882
1941
  error,
@@ -1941,12 +2000,12 @@ class Payment {
1941
2000
  }),
1942
2001
  query_params,
1943
2002
  undefined,
1944
- xHeaders,
1945
- { headers }
2003
+ { ...xHeaders, ...requestHeaders },
2004
+ { responseHeaders }
1946
2005
  );
1947
2006
 
1948
2007
  let responseData = response;
1949
- if (headers) {
2008
+ if (responseHeaders) {
1950
2009
  responseData = response[0];
1951
2010
  }
1952
2011
 
@@ -1968,13 +2027,18 @@ class Payment {
1968
2027
  }
1969
2028
 
1970
2029
  /**
2030
+ * @param {PaymentApplicationValidator.GetRupifiBannerDetailsParam} arg - Arg object.
2031
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1971
2032
  * @param {import("../ApplicationAPIClient").Options} - Options
1972
2033
  * @returns {Promise<PaymentApplicationModel.RupifiBannerResponse>} - Success response
1973
2034
  * @name getRupifiBannerDetails
1974
2035
  * @summary: Get CreditLine Offer
1975
2036
  * @description: Get CreditLine Offer if user is tentatively approved by rupifi - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getRupifiBannerDetails/).
1976
2037
  */
1977
- async getRupifiBannerDetails({ headers } = { headers: false }) {
2038
+ async getRupifiBannerDetails(
2039
+ { requestHeaders } = { requestHeaders: {} },
2040
+ { responseHeaders } = { responseHeaders: false }
2041
+ ) {
1978
2042
  const {
1979
2043
  error,
1980
2044
  } = PaymentApplicationValidator.getRupifiBannerDetails().validate(
@@ -2012,12 +2076,12 @@ class Payment {
2012
2076
  }),
2013
2077
  query_params,
2014
2078
  undefined,
2015
- xHeaders,
2016
- { headers }
2079
+ { ...xHeaders, ...requestHeaders },
2080
+ { responseHeaders }
2017
2081
  );
2018
2082
 
2019
2083
  let responseData = response;
2020
- if (headers) {
2084
+ if (responseHeaders) {
2021
2085
  responseData = response[0];
2022
2086
  }
2023
2087
 
@@ -2042,6 +2106,7 @@ class Payment {
2042
2106
  * @param {PaymentApplicationValidator.GetUserBeneficiariesDetailParam} arg
2043
2107
  * - Arg object.
2044
2108
  *
2109
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2045
2110
  * @param {import("../ApplicationAPIClient").Options} - Options
2046
2111
  * @returns {Promise<PaymentApplicationModel.OrderBeneficiaryResponse>} -
2047
2112
  * Success response
@@ -2050,8 +2115,8 @@ class Payment {
2050
2115
  * @description: Use this API to get the details of all active beneficiary added by a user for refund. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/getUserBeneficiariesDetail/).
2051
2116
  */
2052
2117
  async getUserBeneficiariesDetail(
2053
- { orderId } = {},
2054
- { headers } = { headers: false }
2118
+ { orderId, requestHeaders } = { requestHeaders: {} },
2119
+ { responseHeaders } = { responseHeaders: false }
2055
2120
  ) {
2056
2121
  const {
2057
2122
  error,
@@ -2091,12 +2156,12 @@ class Payment {
2091
2156
  }),
2092
2157
  query_params,
2093
2158
  undefined,
2094
- xHeaders,
2095
- { headers }
2159
+ { ...xHeaders, ...requestHeaders },
2160
+ { responseHeaders }
2096
2161
  );
2097
2162
 
2098
2163
  let responseData = response;
2099
- if (headers) {
2164
+ if (responseHeaders) {
2100
2165
  responseData = response[0];
2101
2166
  }
2102
2167
 
@@ -2119,6 +2184,7 @@ class Payment {
2119
2184
 
2120
2185
  /**
2121
2186
  * @param {PaymentApplicationValidator.InitialisePaymentParam} arg - Arg object.
2187
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2122
2188
  * @param {import("../ApplicationAPIClient").Options} - Options
2123
2189
  * @returns {Promise<PaymentApplicationModel.PaymentInitializationResponse>}
2124
2190
  * - Success response
@@ -2127,7 +2193,10 @@ class Payment {
2127
2193
  * @summary: Initialize a payment (server-to-server) for UPI and BharatQR
2128
2194
  * @description: PUse this API to inititate payment using UPI, BharatQR, wherein the UPI requests are send to the app and QR code is displayed on the screen. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/initialisePayment/).
2129
2195
  */
2130
- async initialisePayment({ body } = {}, { headers } = { headers: false }) {
2196
+ async initialisePayment(
2197
+ { body, requestHeaders } = { requestHeaders: {} },
2198
+ { responseHeaders } = { responseHeaders: false }
2199
+ ) {
2131
2200
  const { error } = PaymentApplicationValidator.initialisePayment().validate(
2132
2201
  { body },
2133
2202
  { abortEarly: false, allowUnknown: true }
@@ -2163,12 +2232,12 @@ class Payment {
2163
2232
  }),
2164
2233
  query_params,
2165
2234
  body,
2166
- xHeaders,
2167
- { headers }
2235
+ { ...xHeaders, ...requestHeaders },
2236
+ { responseHeaders }
2168
2237
  );
2169
2238
 
2170
2239
  let responseData = response;
2171
- if (headers) {
2240
+ if (responseHeaders) {
2172
2241
  responseData = response[0];
2173
2242
  }
2174
2243
 
@@ -2193,6 +2262,7 @@ class Payment {
2193
2262
  * @param {PaymentApplicationValidator.InitialisePaymentPaymentLinkParam} arg
2194
2263
  * - Arg object.
2195
2264
  *
2265
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2196
2266
  * @param {import("../ApplicationAPIClient").Options} - Options
2197
2267
  * @returns {Promise<PaymentApplicationModel.PaymentInitializationResponse>}
2198
2268
  * - Success response
@@ -2202,8 +2272,8 @@ class Payment {
2202
2272
  * @description: Use this API to inititate payment using UPI, BharatQR, wherein the UPI requests are send to the app and QR code is displayed on the screen. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/initialisePaymentPaymentLink/).
2203
2273
  */
2204
2274
  async initialisePaymentPaymentLink(
2205
- { body } = {},
2206
- { headers } = { headers: false }
2275
+ { body, requestHeaders } = { requestHeaders: {} },
2276
+ { responseHeaders } = { responseHeaders: false }
2207
2277
  ) {
2208
2278
  const {
2209
2279
  error,
@@ -2242,12 +2312,12 @@ class Payment {
2242
2312
  }),
2243
2313
  query_params,
2244
2314
  body,
2245
- xHeaders,
2246
- { headers }
2315
+ { ...xHeaders, ...requestHeaders },
2316
+ { responseHeaders }
2247
2317
  );
2248
2318
 
2249
2319
  let responseData = response;
2250
- if (headers) {
2320
+ if (responseHeaders) {
2251
2321
  responseData = response[0];
2252
2322
  }
2253
2323
 
@@ -2270,6 +2340,7 @@ class Payment {
2270
2340
 
2271
2341
  /**
2272
2342
  * @param {PaymentApplicationValidator.OutstandingOrderDetailsParam} arg - Arg object.
2343
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2273
2344
  * @param {import("../ApplicationAPIClient").Options} - Options
2274
2345
  * @returns {Promise<PaymentApplicationModel.OutstandingOrderDetailsResponse>}
2275
2346
  * - Success response
@@ -2279,8 +2350,8 @@ class Payment {
2279
2350
  * @description: Use this API to fetch the outstanding order details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/outstandingOrderDetails/).
2280
2351
  */
2281
2352
  async outstandingOrderDetails(
2282
- { aggregator } = {},
2283
- { headers } = { headers: false }
2353
+ { aggregator, requestHeaders } = { requestHeaders: {} },
2354
+ { responseHeaders } = { responseHeaders: false }
2284
2355
  ) {
2285
2356
  const {
2286
2357
  error,
@@ -2320,12 +2391,12 @@ class Payment {
2320
2391
  }),
2321
2392
  query_params,
2322
2393
  undefined,
2323
- xHeaders,
2324
- { headers }
2394
+ { ...xHeaders, ...requestHeaders },
2395
+ { responseHeaders }
2325
2396
  );
2326
2397
 
2327
2398
  let responseData = response;
2328
- if (headers) {
2399
+ if (responseHeaders) {
2329
2400
  responseData = response[0];
2330
2401
  }
2331
2402
 
@@ -2348,6 +2419,7 @@ class Payment {
2348
2419
 
2349
2420
  /**
2350
2421
  * @param {PaymentApplicationValidator.PaidOrderDetailsParam} arg - Arg object.
2422
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2351
2423
  * @param {import("../ApplicationAPIClient").Options} - Options
2352
2424
  * @returns {Promise<PaymentApplicationModel.PaidOrderDetailsResponse>} -
2353
2425
  * Success response
@@ -2356,8 +2428,8 @@ class Payment {
2356
2428
  * @description: Use this API to fetch the paid order details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/paidOrderDetails/).
2357
2429
  */
2358
2430
  async paidOrderDetails(
2359
- { aggregator } = {},
2360
- { headers } = { headers: false }
2431
+ { aggregator, requestHeaders } = { requestHeaders: {} },
2432
+ { responseHeaders } = { responseHeaders: false }
2361
2433
  ) {
2362
2434
  const { error } = PaymentApplicationValidator.paidOrderDetails().validate(
2363
2435
  { aggregator },
@@ -2395,12 +2467,12 @@ class Payment {
2395
2467
  }),
2396
2468
  query_params,
2397
2469
  undefined,
2398
- xHeaders,
2399
- { headers }
2470
+ { ...xHeaders, ...requestHeaders },
2471
+ { responseHeaders }
2400
2472
  );
2401
2473
 
2402
2474
  let responseData = response;
2403
- if (headers) {
2475
+ if (responseHeaders) {
2404
2476
  responseData = response[0];
2405
2477
  }
2406
2478
 
@@ -2423,6 +2495,7 @@ class Payment {
2423
2495
 
2424
2496
  /**
2425
2497
  * @param {PaymentApplicationValidator.PollingPaymentLinkParam} arg - Arg object.
2498
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2426
2499
  * @param {import("../ApplicationAPIClient").Options} - Options
2427
2500
  * @returns {Promise<PaymentApplicationModel.PollingPaymentLinkResponse>} -
2428
2501
  * Success response
@@ -2431,8 +2504,8 @@ class Payment {
2431
2504
  * @description: Use this API to poll if payment through payment was successful or not - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/pollingPaymentLink/).
2432
2505
  */
2433
2506
  async pollingPaymentLink(
2434
- { paymentLinkId } = {},
2435
- { headers } = { headers: false }
2507
+ { paymentLinkId, requestHeaders } = { requestHeaders: {} },
2508
+ { responseHeaders } = { responseHeaders: false }
2436
2509
  ) {
2437
2510
  const { error } = PaymentApplicationValidator.pollingPaymentLink().validate(
2438
2511
  { paymentLinkId },
@@ -2470,12 +2543,12 @@ class Payment {
2470
2543
  }),
2471
2544
  query_params,
2472
2545
  undefined,
2473
- xHeaders,
2474
- { headers }
2546
+ { ...xHeaders, ...requestHeaders },
2547
+ { responseHeaders }
2475
2548
  );
2476
2549
 
2477
2550
  let responseData = response;
2478
- if (headers) {
2551
+ if (responseHeaders) {
2479
2552
  responseData = response[0];
2480
2553
  }
2481
2554
 
@@ -2498,6 +2571,7 @@ class Payment {
2498
2571
 
2499
2572
  /**
2500
2573
  * @param {PaymentApplicationValidator.RedirectToAggregatorParam} arg - Arg object.
2574
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2501
2575
  * @param {import("../ApplicationAPIClient").Options} - Options
2502
2576
  * @returns {Promise<PaymentApplicationModel.RedirectToAggregatorResponse>}
2503
2577
  * - Success response
@@ -2507,8 +2581,8 @@ class Payment {
2507
2581
  * @description: Use this API to get the redirect url to redirect the user to aggregator's page - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/redirectToAggregator/).
2508
2582
  */
2509
2583
  async redirectToAggregator(
2510
- { source, aggregator } = {},
2511
- { headers } = { headers: false }
2584
+ { source, aggregator, requestHeaders } = { requestHeaders: {} },
2585
+ { responseHeaders } = { responseHeaders: false }
2512
2586
  ) {
2513
2587
  const {
2514
2588
  error,
@@ -2549,12 +2623,12 @@ class Payment {
2549
2623
  }),
2550
2624
  query_params,
2551
2625
  undefined,
2552
- xHeaders,
2553
- { headers }
2626
+ { ...xHeaders, ...requestHeaders },
2627
+ { responseHeaders }
2554
2628
  );
2555
2629
 
2556
2630
  let responseData = response;
2557
- if (headers) {
2631
+ if (responseHeaders) {
2558
2632
  responseData = response[0];
2559
2633
  }
2560
2634
 
@@ -2577,13 +2651,17 @@ class Payment {
2577
2651
 
2578
2652
  /**
2579
2653
  * @param {PaymentApplicationValidator.RenderHTMLParam} arg - Arg object.
2654
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2580
2655
  * @param {import("../ApplicationAPIClient").Options} - Options
2581
2656
  * @returns {Promise<PaymentApplicationModel.renderHTMLResponse>} - Success response
2582
2657
  * @name renderHTML
2583
2658
  * @summary: Convert base64 string to HTML form
2584
2659
  * @description: Use this API to decode base64 html form to plain HTML string. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/renderHTML/).
2585
2660
  */
2586
- async renderHTML({ body } = {}, { headers } = { headers: false }) {
2661
+ async renderHTML(
2662
+ { body, requestHeaders } = { requestHeaders: {} },
2663
+ { responseHeaders } = { responseHeaders: false }
2664
+ ) {
2587
2665
  const { error } = PaymentApplicationValidator.renderHTML().validate(
2588
2666
  { body },
2589
2667
  { abortEarly: false, allowUnknown: true }
@@ -2619,12 +2697,12 @@ class Payment {
2619
2697
  }),
2620
2698
  query_params,
2621
2699
  body,
2622
- xHeaders,
2623
- { headers }
2700
+ { ...xHeaders, ...requestHeaders },
2701
+ { responseHeaders }
2624
2702
  );
2625
2703
 
2626
2704
  let responseData = response;
2627
- if (headers) {
2705
+ if (responseHeaders) {
2628
2706
  responseData = response[0];
2629
2707
  }
2630
2708
 
@@ -2647,6 +2725,7 @@ class Payment {
2647
2725
 
2648
2726
  /**
2649
2727
  * @param {PaymentApplicationValidator.ResendOrCancelPaymentParam} arg - Arg object.
2728
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2650
2729
  * @param {import("../ApplicationAPIClient").Options} - Options
2651
2730
  * @returns {Promise<PaymentApplicationModel.ResendOrCancelPaymentResponse>}
2652
2731
  * - Success response
@@ -2655,7 +2734,10 @@ class Payment {
2655
2734
  * @summary: API to resend and cancel a payment link which was already generated.
2656
2735
  * @description: Use this API to perform resend or cancel a payment link based on request payload. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/resendOrCancelPayment/).
2657
2736
  */
2658
- async resendOrCancelPayment({ body } = {}, { headers } = { headers: false }) {
2737
+ async resendOrCancelPayment(
2738
+ { body, requestHeaders } = { requestHeaders: {} },
2739
+ { responseHeaders } = { responseHeaders: false }
2740
+ ) {
2659
2741
  const {
2660
2742
  error,
2661
2743
  } = PaymentApplicationValidator.resendOrCancelPayment().validate(
@@ -2693,12 +2775,12 @@ class Payment {
2693
2775
  }),
2694
2776
  query_params,
2695
2777
  body,
2696
- xHeaders,
2697
- { headers }
2778
+ { ...xHeaders, ...requestHeaders },
2779
+ { responseHeaders }
2698
2780
  );
2699
2781
 
2700
2782
  let responseData = response;
2701
- if (headers) {
2783
+ if (responseHeaders) {
2702
2784
  responseData = response[0];
2703
2785
  }
2704
2786
 
@@ -2721,6 +2803,7 @@ class Payment {
2721
2803
 
2722
2804
  /**
2723
2805
  * @param {PaymentApplicationValidator.ResendPaymentLinkParam} arg - Arg object.
2806
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2724
2807
  * @param {import("../ApplicationAPIClient").Options} - Options
2725
2808
  * @returns {Promise<PaymentApplicationModel.ResendPaymentLinkResponse>} -
2726
2809
  * Success response
@@ -2728,7 +2811,10 @@ class Payment {
2728
2811
  * @summary: Resend payment link
2729
2812
  * @description: Use this API to resend a payment link for the customer - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/resendPaymentLink/).
2730
2813
  */
2731
- async resendPaymentLink({ body } = {}, { headers } = { headers: false }) {
2814
+ async resendPaymentLink(
2815
+ { body, requestHeaders } = { requestHeaders: {} },
2816
+ { responseHeaders } = { responseHeaders: false }
2817
+ ) {
2732
2818
  const { error } = PaymentApplicationValidator.resendPaymentLink().validate(
2733
2819
  { body },
2734
2820
  { abortEarly: false, allowUnknown: true }
@@ -2764,12 +2850,12 @@ class Payment {
2764
2850
  }),
2765
2851
  query_params,
2766
2852
  body,
2767
- xHeaders,
2768
- { headers }
2853
+ { ...xHeaders, ...requestHeaders },
2854
+ { responseHeaders }
2769
2855
  );
2770
2856
 
2771
2857
  let responseData = response;
2772
- if (headers) {
2858
+ if (responseHeaders) {
2773
2859
  responseData = response[0];
2774
2860
  }
2775
2861
 
@@ -2793,6 +2879,7 @@ class Payment {
2793
2879
  /**
2794
2880
  * @param {PaymentApplicationValidator.UpdateDefaultBeneficiaryParam} arg -
2795
2881
  * Arg object.
2882
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2796
2883
  * @param {import("../ApplicationAPIClient").Options} - Options
2797
2884
  * @returns {Promise<PaymentApplicationModel.SetDefaultBeneficiaryResponse>}
2798
2885
  * - Success response
@@ -2802,8 +2889,8 @@ class Payment {
2802
2889
  * @description: Use this API to set a default beneficiary for getting a refund. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/updateDefaultBeneficiary/).
2803
2890
  */
2804
2891
  async updateDefaultBeneficiary(
2805
- { body } = {},
2806
- { headers } = { headers: false }
2892
+ { body, requestHeaders } = { requestHeaders: {} },
2893
+ { responseHeaders } = { responseHeaders: false }
2807
2894
  ) {
2808
2895
  const {
2809
2896
  error,
@@ -2842,12 +2929,12 @@ class Payment {
2842
2929
  }),
2843
2930
  query_params,
2844
2931
  body,
2845
- xHeaders,
2846
- { headers }
2932
+ { ...xHeaders, ...requestHeaders },
2933
+ { responseHeaders }
2847
2934
  );
2848
2935
 
2849
2936
  let responseData = response;
2850
- if (headers) {
2937
+ if (responseHeaders) {
2851
2938
  responseData = response[0];
2852
2939
  }
2853
2940
 
@@ -2870,13 +2957,17 @@ class Payment {
2870
2957
 
2871
2958
  /**
2872
2959
  * @param {PaymentApplicationValidator.ValidateVPAParam} arg - Arg object.
2960
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2873
2961
  * @param {import("../ApplicationAPIClient").Options} - Options
2874
2962
  * @returns {Promise<PaymentApplicationModel.ValidateVPAResponse>} - Success response
2875
2963
  * @name validateVPA
2876
2964
  * @summary: API to Validate UPI ID
2877
2965
  * @description: API to Validate UPI ID - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/validateVPA/).
2878
2966
  */
2879
- async validateVPA({ body } = {}, { headers } = { headers: false }) {
2967
+ async validateVPA(
2968
+ { body, requestHeaders } = { requestHeaders: {} },
2969
+ { responseHeaders } = { responseHeaders: false }
2970
+ ) {
2880
2971
  const { error } = PaymentApplicationValidator.validateVPA().validate(
2881
2972
  { body },
2882
2973
  { abortEarly: false, allowUnknown: true }
@@ -2912,12 +3003,12 @@ class Payment {
2912
3003
  }),
2913
3004
  query_params,
2914
3005
  body,
2915
- xHeaders,
2916
- { headers }
3006
+ { ...xHeaders, ...requestHeaders },
3007
+ { responseHeaders }
2917
3008
  );
2918
3009
 
2919
3010
  let responseData = response;
2920
- if (headers) {
3011
+ if (responseHeaders) {
2921
3012
  responseData = response[0];
2922
3013
  }
2923
3014
 
@@ -2940,6 +3031,7 @@ class Payment {
2940
3031
 
2941
3032
  /**
2942
3033
  * @param {PaymentApplicationValidator.VerifyAndChargePaymentParam} arg - Arg object.
3034
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2943
3035
  * @param {import("../ApplicationAPIClient").Options} - Options
2944
3036
  * @returns {Promise<PaymentApplicationModel.ChargeCustomerResponse>} -
2945
3037
  * Success response
@@ -2948,8 +3040,8 @@ class Payment {
2948
3040
  * @description: Use this API to verify and check the status of a payment transaction (server-to-server) made through aggregators like Simpl and Mswipe. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyAndChargePayment/).
2949
3041
  */
2950
3042
  async verifyAndChargePayment(
2951
- { body } = {},
2952
- { headers } = { headers: false }
3043
+ { body, requestHeaders } = { requestHeaders: {} },
3044
+ { responseHeaders } = { responseHeaders: false }
2953
3045
  ) {
2954
3046
  const {
2955
3047
  error,
@@ -2988,12 +3080,12 @@ class Payment {
2988
3080
  }),
2989
3081
  query_params,
2990
3082
  body,
2991
- xHeaders,
2992
- { headers }
3083
+ { ...xHeaders, ...requestHeaders },
3084
+ { responseHeaders }
2993
3085
  );
2994
3086
 
2995
3087
  let responseData = response;
2996
- if (headers) {
3088
+ if (responseHeaders) {
2997
3089
  responseData = response[0];
2998
3090
  }
2999
3091
 
@@ -3017,6 +3109,7 @@ class Payment {
3017
3109
  /**
3018
3110
  * @param {PaymentApplicationValidator.VerifyCustomerForPaymentParam} arg -
3019
3111
  * Arg object.
3112
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3020
3113
  * @param {import("../ApplicationAPIClient").Options} - Options
3021
3114
  * @returns {Promise<PaymentApplicationModel.ValidateCustomerResponse>} -
3022
3115
  * Success response
@@ -3025,8 +3118,8 @@ class Payment {
3025
3118
  * @description: Use this API to check if the customer is eligible to use credit-line facilities such as Simpl Pay Later and Rupifi. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyCustomerForPayment/).
3026
3119
  */
3027
3120
  async verifyCustomerForPayment(
3028
- { body } = {},
3029
- { headers } = { headers: false }
3121
+ { body, requestHeaders } = { requestHeaders: {} },
3122
+ { responseHeaders } = { responseHeaders: false }
3030
3123
  ) {
3031
3124
  const {
3032
3125
  error,
@@ -3065,12 +3158,12 @@ class Payment {
3065
3158
  }),
3066
3159
  query_params,
3067
3160
  body,
3068
- xHeaders,
3069
- { headers }
3161
+ { ...xHeaders, ...requestHeaders },
3162
+ { responseHeaders }
3070
3163
  );
3071
3164
 
3072
3165
  let responseData = response;
3073
- if (headers) {
3166
+ if (responseHeaders) {
3074
3167
  responseData = response[0];
3075
3168
  }
3076
3169
 
@@ -3093,13 +3186,17 @@ class Payment {
3093
3186
 
3094
3187
  /**
3095
3188
  * @param {PaymentApplicationValidator.VerifyIfscCodeParam} arg - Arg object.
3189
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3096
3190
  * @param {import("../ApplicationAPIClient").Options} - Options
3097
3191
  * @returns {Promise<PaymentApplicationModel.IfscCodeResponse>} - Success response
3098
3192
  * @name verifyIfscCode
3099
3193
  * @summary: Verify IFSC Code
3100
3194
  * @description: Use this API to check whether the 11-digit IFSC code is valid and to fetch the bank details for refund. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyIfscCode/).
3101
3195
  */
3102
- async verifyIfscCode({ ifscCode } = {}, { headers } = { headers: false }) {
3196
+ async verifyIfscCode(
3197
+ { ifscCode, requestHeaders } = { requestHeaders: {} },
3198
+ { responseHeaders } = { responseHeaders: false }
3199
+ ) {
3103
3200
  const { error } = PaymentApplicationValidator.verifyIfscCode().validate(
3104
3201
  { ifscCode },
3105
3202
  { abortEarly: false, allowUnknown: true }
@@ -3136,12 +3233,12 @@ class Payment {
3136
3233
  }),
3137
3234
  query_params,
3138
3235
  undefined,
3139
- xHeaders,
3140
- { headers }
3236
+ { ...xHeaders, ...requestHeaders },
3237
+ { responseHeaders }
3141
3238
  );
3142
3239
 
3143
3240
  let responseData = response;
3144
- if (headers) {
3241
+ if (responseHeaders) {
3145
3242
  responseData = response[0];
3146
3243
  }
3147
3244
 
@@ -3166,6 +3263,7 @@ class Payment {
3166
3263
  * @param {PaymentApplicationValidator.VerifyOtpAndAddBeneficiaryForBankParam} arg
3167
3264
  * - Arg object.
3168
3265
  *
3266
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3169
3267
  * @param {import("../ApplicationAPIClient").Options} - Options
3170
3268
  * @returns {Promise<PaymentApplicationModel.AddBeneficiaryViaOtpVerificationResponse>}
3171
3269
  * - Success response
@@ -3175,8 +3273,8 @@ class Payment {
3175
3273
  * @description: Use this API to perform an OTP validation before saving the beneficiary details added for a refund. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyOtpAndAddBeneficiaryForBank/).
3176
3274
  */
3177
3275
  async verifyOtpAndAddBeneficiaryForBank(
3178
- { body } = {},
3179
- { headers } = { headers: false }
3276
+ { body, requestHeaders } = { requestHeaders: {} },
3277
+ { responseHeaders } = { responseHeaders: false }
3180
3278
  ) {
3181
3279
  const {
3182
3280
  error,
@@ -3215,12 +3313,12 @@ class Payment {
3215
3313
  }),
3216
3314
  query_params,
3217
3315
  body,
3218
- xHeaders,
3219
- { headers }
3316
+ { ...xHeaders, ...requestHeaders },
3317
+ { responseHeaders }
3220
3318
  );
3221
3319
 
3222
3320
  let responseData = response;
3223
- if (headers) {
3321
+ if (responseHeaders) {
3224
3322
  responseData = response[0];
3225
3323
  }
3226
3324
 
@@ -3245,6 +3343,7 @@ class Payment {
3245
3343
  * @param {PaymentApplicationValidator.VerifyOtpAndAddBeneficiaryForWalletParam} arg
3246
3344
  * - Arg object.
3247
3345
  *
3346
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3248
3347
  * @param {import("../ApplicationAPIClient").Options} - Options
3249
3348
  * @returns {Promise<PaymentApplicationModel.WalletOtpResponse>} - Success response
3250
3349
  * @name verifyOtpAndAddBeneficiaryForWallet
@@ -3252,8 +3351,8 @@ class Payment {
3252
3351
  * @description: Use this API to send an OTP while adding a wallet beneficiary by mobile no. verification. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/application/payment/verifyOtpAndAddBeneficiaryForWallet/).
3253
3352
  */
3254
3353
  async verifyOtpAndAddBeneficiaryForWallet(
3255
- { body } = {},
3256
- { headers } = { headers: false }
3354
+ { body, requestHeaders } = { requestHeaders: {} },
3355
+ { responseHeaders } = { responseHeaders: false }
3257
3356
  ) {
3258
3357
  const {
3259
3358
  error,
@@ -3292,12 +3391,12 @@ class Payment {
3292
3391
  }),
3293
3392
  query_params,
3294
3393
  body,
3295
- xHeaders,
3296
- { headers }
3394
+ { ...xHeaders, ...requestHeaders },
3395
+ { responseHeaders }
3297
3396
  );
3298
3397
 
3299
3398
  let responseData = response;
3300
- if (headers) {
3399
+ if (responseHeaders) {
3301
3400
  responseData = response[0];
3302
3401
  }
3303
3402