@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
@@ -14,6 +14,7 @@ class Payment {
14
14
 
15
15
  /**
16
16
  * @param {PaymentPlatformApplicationValidator.AddEdcDeviceParam} arg - Arg object
17
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
17
18
  * @param {import("../PlatformAPIClient").Options} - Options
18
19
  * @returns {Promise<PaymentPlatformModel.EdcDeviceUpdateResponse>} - Success response
19
20
  * @name addEdcDevice
@@ -21,8 +22,8 @@ class Payment {
21
22
  * @description: Use this API to Update store id and device tag of edc device - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/addEdcDevice/).
22
23
  */
23
24
  async addEdcDevice(
24
- { terminalUniqueIdentifier, body } = {},
25
- { headers } = { headers: false }
25
+ { terminalUniqueIdentifier, body, requestHeaders } = { requestHeaders: {} },
26
+ { responseHeaders } = { responseHeaders: false }
26
27
  ) {
27
28
  const {
28
29
  error,
@@ -62,12 +63,12 @@ class Payment {
62
63
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/edc-device/${terminalUniqueIdentifier}`,
63
64
  query_params,
64
65
  body,
65
- undefined,
66
- { headers }
66
+ requestHeaders,
67
+ { responseHeaders }
67
68
  );
68
69
 
69
70
  let responseData = response;
70
- if (headers) {
71
+ if (responseHeaders) {
71
72
  responseData = response[0];
72
73
  }
73
74
 
@@ -92,6 +93,7 @@ class Payment {
92
93
  * @param {PaymentPlatformApplicationValidator.AddRefundBankAccountUsingOTPParam} arg
93
94
  * - Arg object
94
95
  *
96
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
95
97
  * @param {import("../PlatformAPIClient").Options} - Options
96
98
  * @returns {Promise<PaymentPlatformModel.RefundAccountResponse>} - Success response
97
99
  * @name addRefundBankAccountUsingOTP
@@ -99,8 +101,8 @@ class Payment {
99
101
  * @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/platform/payment/addRefundBankAccountUsingOTP/).
100
102
  */
101
103
  async addRefundBankAccountUsingOTP(
102
- { body } = {},
103
- { headers } = { headers: false }
104
+ { body, requestHeaders } = { requestHeaders: {} },
105
+ { responseHeaders } = { responseHeaders: false }
104
106
  ) {
105
107
  const {
106
108
  error,
@@ -138,12 +140,12 @@ class Payment {
138
140
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/refund/account`,
139
141
  query_params,
140
142
  body,
141
- undefined,
142
- { headers }
143
+ requestHeaders,
144
+ { responseHeaders }
143
145
  );
144
146
 
145
147
  let responseData = response;
146
- if (headers) {
148
+ if (responseHeaders) {
147
149
  responseData = response[0];
148
150
  }
149
151
 
@@ -168,6 +170,7 @@ class Payment {
168
170
  * @param {PaymentPlatformApplicationValidator.CancelPaymentLinkParam} arg
169
171
  * - Arg object
170
172
  *
173
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
171
174
  * @param {import("../PlatformAPIClient").Options} - Options
172
175
  * @returns {Promise<PaymentPlatformModel.CancelPaymentLinkResponse>} -
173
176
  * Success response
@@ -175,7 +178,10 @@ class Payment {
175
178
  * @summary: Cancel payment link
176
179
  * @description: Use this API to cancel a payment link for the customer - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/cancelPaymentLink/).
177
180
  */
178
- async cancelPaymentLink({ body } = {}, { headers } = { headers: false }) {
181
+ async cancelPaymentLink(
182
+ { body, requestHeaders } = { requestHeaders: {} },
183
+ { responseHeaders } = { responseHeaders: false }
184
+ ) {
179
185
  const {
180
186
  error,
181
187
  } = PaymentPlatformApplicationValidator.cancelPaymentLink().validate(
@@ -212,12 +218,12 @@ class Payment {
212
218
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/cancel-payment-link/`,
213
219
  query_params,
214
220
  body,
215
- undefined,
216
- { headers }
221
+ requestHeaders,
222
+ { responseHeaders }
217
223
  );
218
224
 
219
225
  let responseData = response;
220
- if (headers) {
226
+ if (responseHeaders) {
221
227
  responseData = response[0];
222
228
  }
223
229
 
@@ -242,6 +248,7 @@ class Payment {
242
248
  * @param {PaymentPlatformApplicationValidator.CheckAndUpdatePaymentStatusParam} arg
243
249
  * - Arg object
244
250
  *
251
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
245
252
  * @param {import("../PlatformAPIClient").Options} - Options
246
253
  * @returns {Promise<PaymentPlatformModel.PaymentStatusUpdateResponse>} -
247
254
  * Success response
@@ -250,8 +257,8 @@ class Payment {
250
257
  * @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/platform/payment/checkAndUpdatePaymentStatus/).
251
258
  */
252
259
  async checkAndUpdatePaymentStatus(
253
- { body } = {},
254
- { headers } = { headers: false }
260
+ { body, requestHeaders } = { requestHeaders: {} },
261
+ { responseHeaders } = { responseHeaders: false }
255
262
  ) {
256
263
  const {
257
264
  error,
@@ -289,12 +296,12 @@ class Payment {
289
296
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/confirm/polling`,
290
297
  query_params,
291
298
  body,
292
- undefined,
293
- { headers }
299
+ requestHeaders,
300
+ { responseHeaders }
294
301
  );
295
302
 
296
303
  let responseData = response;
297
- if (headers) {
304
+ if (responseHeaders) {
298
305
  responseData = response[0];
299
306
  }
300
307
 
@@ -317,6 +324,7 @@ class Payment {
317
324
 
318
325
  /**
319
326
  * @param {PaymentPlatformApplicationValidator.ConfirmPaymentParam} arg - Arg object
327
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
320
328
  * @param {import("../PlatformAPIClient").Options} - Options
321
329
  * @returns {Promise<PaymentPlatformModel.PaymentConfirmationResponse>} -
322
330
  * Success response
@@ -324,7 +332,10 @@ class Payment {
324
332
  * @summary: Confirm payment after successful payment from payment gateway
325
333
  * @description: Use this API to confirm payment after payment gateway accepted payment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/confirmPayment/).
326
334
  */
327
- async confirmPayment({ body } = {}, { headers } = { headers: false }) {
335
+ async confirmPayment(
336
+ { body, requestHeaders } = { requestHeaders: {} },
337
+ { responseHeaders } = { responseHeaders: false }
338
+ ) {
328
339
  const {
329
340
  error,
330
341
  } = PaymentPlatformApplicationValidator.confirmPayment().validate(
@@ -361,12 +372,12 @@ class Payment {
361
372
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/confirm`,
362
373
  query_params,
363
374
  body,
364
- undefined,
365
- { headers }
375
+ requestHeaders,
376
+ { responseHeaders }
366
377
  );
367
378
 
368
379
  let responseData = response;
369
- if (headers) {
380
+ if (responseHeaders) {
370
381
  responseData = response[0];
371
382
  }
372
383
 
@@ -391,6 +402,7 @@ class Payment {
391
402
  * @param {PaymentPlatformApplicationValidator.CreatePaymentLinkParam} arg
392
403
  * - Arg object
393
404
  *
405
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
394
406
  * @param {import("../PlatformAPIClient").Options} - Options
395
407
  * @returns {Promise<PaymentPlatformModel.CreatePaymentLinkResponse>} -
396
408
  * Success response
@@ -398,7 +410,10 @@ class Payment {
398
410
  * @summary: Create payment link
399
411
  * @description: Use this API to create a payment link for the customer - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/createPaymentLink/).
400
412
  */
401
- async createPaymentLink({ body } = {}, { headers } = { headers: false }) {
413
+ async createPaymentLink(
414
+ { body, requestHeaders } = { requestHeaders: {} },
415
+ { responseHeaders } = { responseHeaders: false }
416
+ ) {
402
417
  const {
403
418
  error,
404
419
  } = PaymentPlatformApplicationValidator.createPaymentLink().validate(
@@ -435,12 +450,12 @@ class Payment {
435
450
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/create-payment-link/`,
436
451
  query_params,
437
452
  body,
438
- undefined,
439
- { headers }
453
+ requestHeaders,
454
+ { responseHeaders }
440
455
  );
441
456
 
442
457
  let responseData = response;
443
- if (headers) {
458
+ if (responseHeaders) {
444
459
  responseData = response[0];
445
460
  }
446
461
 
@@ -462,6 +477,10 @@ class Payment {
462
477
  }
463
478
 
464
479
  /**
480
+ * @param {PaymentPlatformApplicationValidator.EdcAggregatorsAndModelListParam} arg
481
+ * - Arg object
482
+ *
483
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
465
484
  * @param {import("../PlatformAPIClient").Options} - Options
466
485
  * @returns {Promise<PaymentPlatformModel.EdcAggregatorAndModelListResponse>}
467
486
  * - Success response
@@ -470,7 +489,10 @@ class Payment {
470
489
  * @summary: get some information about the store and edc device
471
490
  * @description: Use this API to get info of devices linked to a particular app. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/edcAggregatorsAndModelList/).
472
491
  */
473
- async edcAggregatorsAndModelList({ headers } = { headers: false }) {
492
+ async edcAggregatorsAndModelList(
493
+ { requestHeaders } = { requestHeaders: {} },
494
+ { responseHeaders } = { responseHeaders: false }
495
+ ) {
474
496
  const {
475
497
  error,
476
498
  } = PaymentPlatformApplicationValidator.edcAggregatorsAndModelList().validate(
@@ -503,12 +525,12 @@ class Payment {
503
525
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/edc-aggregator-list`,
504
526
  query_params,
505
527
  undefined,
506
- undefined,
507
- { headers }
528
+ requestHeaders,
529
+ { responseHeaders }
508
530
  );
509
531
 
510
532
  let responseData = response;
511
- if (headers) {
533
+ if (responseHeaders) {
512
534
  responseData = response[0];
513
535
  }
514
536
 
@@ -531,6 +553,7 @@ class Payment {
531
553
 
532
554
  /**
533
555
  * @param {PaymentPlatformApplicationValidator.EdcDeviceListParam} arg - Arg object
556
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
534
557
  * @param {import("../PlatformAPIClient").Options} - Options
535
558
  * @returns {Promise<PaymentPlatformModel.EdcDeviceListResponse>} - Success response
536
559
  * @name edcDeviceList
@@ -538,8 +561,10 @@ class Payment {
538
561
  * @description: Use this API to get all devices linked to a particular app. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/edcDeviceList/).
539
562
  */
540
563
  async edcDeviceList(
541
- { pageNo, pageSize, isActive, storeId, deviceTag } = {},
542
- { headers } = { headers: false }
564
+ { pageNo, pageSize, isActive, storeId, deviceTag, requestHeaders } = {
565
+ requestHeaders: {},
566
+ },
567
+ { responseHeaders } = { responseHeaders: false }
543
568
  ) {
544
569
  const {
545
570
  error,
@@ -590,12 +615,12 @@ class Payment {
590
615
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/edc-device-list`,
591
616
  query_params,
592
617
  undefined,
593
- undefined,
594
- { headers }
618
+ requestHeaders,
619
+ { responseHeaders }
595
620
  );
596
621
 
597
622
  let responseData = response;
598
- if (headers) {
623
+ if (responseHeaders) {
599
624
  responseData = response[0];
600
625
  }
601
626
 
@@ -617,13 +642,18 @@ class Payment {
617
642
  }
618
643
 
619
644
  /**
645
+ * @param {PaymentPlatformApplicationValidator.EdcDeviceStatsParam} arg - Arg object
646
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
620
647
  * @param {import("../PlatformAPIClient").Options} - Options
621
648
  * @returns {Promise<PaymentPlatformModel.EdcDeviceStatsResponse>} - Success response
622
649
  * @name edcDeviceStats
623
650
  * @summary: get some information about the store and edc device
624
651
  * @description: Use this API to get info of devices linked to a particular app. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/edcDeviceStats/).
625
652
  */
626
- async edcDeviceStats({ headers } = { headers: false }) {
653
+ async edcDeviceStats(
654
+ { requestHeaders } = { requestHeaders: {} },
655
+ { responseHeaders } = { responseHeaders: false }
656
+ ) {
627
657
  const {
628
658
  error,
629
659
  } = PaymentPlatformApplicationValidator.edcDeviceStats().validate(
@@ -656,12 +686,12 @@ class Payment {
656
686
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/edc-device-stats`,
657
687
  query_params,
658
688
  undefined,
659
- undefined,
660
- { headers }
689
+ requestHeaders,
690
+ { responseHeaders }
661
691
  );
662
692
 
663
693
  let responseData = response;
664
- if (headers) {
694
+ if (responseHeaders) {
665
695
  responseData = response[0];
666
696
  }
667
697
 
@@ -686,6 +716,7 @@ class Payment {
686
716
  * @param {PaymentPlatformApplicationValidator.GetBankAccountDetailsOpenAPIParam} arg
687
717
  * - Arg object
688
718
  *
719
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
689
720
  * @param {import("../PlatformAPIClient").Options} - Options
690
721
  * @returns {Promise<PaymentPlatformModel.RefundAccountResponse>} - Success response
691
722
  * @name getBankAccountDetailsOpenAPI
@@ -693,8 +724,8 @@ class Payment {
693
724
  * @description: Use this API to get saved bank details for returned/cancelled order using order id. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getBankAccountDetailsOpenAPI/).
694
725
  */
695
726
  async getBankAccountDetailsOpenAPI(
696
- { orderId, requestHash } = {},
697
- { headers } = { headers: false }
727
+ { orderId, requestHash, requestHeaders } = { requestHeaders: {} },
728
+ { responseHeaders } = { responseHeaders: false }
698
729
  ) {
699
730
  const {
700
731
  error,
@@ -738,12 +769,12 @@ class Payment {
738
769
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/refund/account`,
739
770
  query_params,
740
771
  undefined,
741
- undefined,
742
- { headers }
772
+ requestHeaders,
773
+ { responseHeaders }
743
774
  );
744
775
 
745
776
  let responseData = response;
746
- if (headers) {
777
+ if (responseHeaders) {
747
778
  responseData = response[0];
748
779
  }
749
780
 
@@ -765,6 +796,10 @@ class Payment {
765
796
  }
766
797
 
767
798
  /**
799
+ * @param {PaymentPlatformApplicationValidator.GetBrandPaymentGatewayConfigParam} arg
800
+ * - Arg object
801
+ *
802
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
768
803
  * @param {import("../PlatformAPIClient").Options} - Options
769
804
  * @returns {Promise<PaymentPlatformModel.PaymentGatewayConfigResponse>} -
770
805
  * Success response
@@ -772,7 +807,10 @@ class Payment {
772
807
  * @summary: Get All Brand Payment Gateway Config Secret
773
808
  * @description: Get All Brand Payment Gateway Config Secret - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getBrandPaymentGatewayConfig/).
774
809
  */
775
- async getBrandPaymentGatewayConfig({ headers } = { headers: false }) {
810
+ async getBrandPaymentGatewayConfig(
811
+ { requestHeaders } = { requestHeaders: {} },
812
+ { responseHeaders } = { responseHeaders: false }
813
+ ) {
776
814
  const {
777
815
  error,
778
816
  } = PaymentPlatformApplicationValidator.getBrandPaymentGatewayConfig().validate(
@@ -805,12 +843,12 @@ class Payment {
805
843
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/aggregator/request`,
806
844
  query_params,
807
845
  undefined,
808
- undefined,
809
- { headers }
846
+ requestHeaders,
847
+ { responseHeaders }
810
848
  );
811
849
 
812
850
  let responseData = response;
813
- if (headers) {
851
+ if (responseHeaders) {
814
852
  responseData = response[0];
815
853
  }
816
854
 
@@ -833,6 +871,7 @@ class Payment {
833
871
 
834
872
  /**
835
873
  * @param {PaymentPlatformApplicationValidator.GetEdcDeviceParam} arg - Arg object
874
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
836
875
  * @param {import("../PlatformAPIClient").Options} - Options
837
876
  * @returns {Promise<PaymentPlatformModel.EdcDeviceDetailsResponse>} -
838
877
  * Success response
@@ -841,8 +880,8 @@ class Payment {
841
880
  * @description: Use this API to get details of a single edc device - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getEdcDevice/).
842
881
  */
843
882
  async getEdcDevice(
844
- { terminalUniqueIdentifier } = {},
845
- { headers } = { headers: false }
883
+ { terminalUniqueIdentifier, requestHeaders } = { requestHeaders: {} },
884
+ { responseHeaders } = { responseHeaders: false }
846
885
  ) {
847
886
  const {
848
887
  error,
@@ -880,12 +919,12 @@ class Payment {
880
919
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/edc-device/${terminalUniqueIdentifier}`,
881
920
  query_params,
882
921
  undefined,
883
- undefined,
884
- { headers }
922
+ requestHeaders,
923
+ { responseHeaders }
885
924
  );
886
925
 
887
926
  let responseData = response;
888
- if (headers) {
927
+ if (responseHeaders) {
889
928
  responseData = response[0];
890
929
  }
891
930
 
@@ -907,13 +946,254 @@ class Payment {
907
946
  }
908
947
 
909
948
  /**
949
+ * @param {PaymentPlatformApplicationValidator.GetMerchantAggregatorPaymentModeDetailsParam} arg
950
+ * - Arg object
951
+ *
952
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
953
+ * @param {import("../PlatformAPIClient").Options} - Options
954
+ * @returns {Promise<PaymentPlatformModel.MerchnatPaymentModeResponse>} -
955
+ * Success response
956
+ * @name getMerchantAggregatorPaymentModeDetails
957
+ * @summary: Get Aggregator, payment mode and sub payment mode.
958
+ * @description: Get Aggregator, payment mode and sub payment mode details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getMerchantAggregatorPaymentModeDetails/).
959
+ */
960
+ async getMerchantAggregatorPaymentModeDetails(
961
+ { aggregatorId, businessUnit, device, requestHeaders } = {
962
+ requestHeaders: {},
963
+ },
964
+ { responseHeaders } = { responseHeaders: false }
965
+ ) {
966
+ const {
967
+ error,
968
+ } = PaymentPlatformApplicationValidator.getMerchantAggregatorPaymentModeDetails().validate(
969
+ {
970
+ aggregatorId,
971
+ businessUnit,
972
+ device,
973
+ },
974
+ { abortEarly: false, allowUnknown: true }
975
+ );
976
+ if (error) {
977
+ return Promise.reject(new FDKClientValidationError(error));
978
+ }
979
+
980
+ // Showing warrnings if extra unknown parameters are found
981
+ const {
982
+ error: warrning,
983
+ } = PaymentPlatformApplicationValidator.getMerchantAggregatorPaymentModeDetails().validate(
984
+ {
985
+ aggregatorId,
986
+ businessUnit,
987
+ device,
988
+ },
989
+ { abortEarly: false, allowUnknown: false }
990
+ );
991
+ if (warrning) {
992
+ Logger({
993
+ level: "WARN",
994
+ message: `Parameter Validation warrnings for platform > Payment > getMerchantAggregatorPaymentModeDetails \n ${warrning}`,
995
+ });
996
+ }
997
+
998
+ const query_params = {};
999
+ query_params["business_unit"] = businessUnit;
1000
+ query_params["device"] = device;
1001
+
1002
+ const response = await PlatformAPIClient.execute(
1003
+ this.config,
1004
+ "get",
1005
+ `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/options/aggregators/${aggregatorId}`,
1006
+ query_params,
1007
+ undefined,
1008
+ requestHeaders,
1009
+ { responseHeaders }
1010
+ );
1011
+
1012
+ let responseData = response;
1013
+ if (responseHeaders) {
1014
+ responseData = response[0];
1015
+ }
1016
+
1017
+ const {
1018
+ error: res_error,
1019
+ } = PaymentPlatformModel.MerchnatPaymentModeResponse().validate(
1020
+ responseData,
1021
+ { abortEarly: false, allowUnknown: false }
1022
+ );
1023
+
1024
+ if (res_error) {
1025
+ Logger({
1026
+ level: "WARN",
1027
+ message: `Response Validation Warnnings for platform > Payment > getMerchantAggregatorPaymentModeDetails \n ${res_error}`,
1028
+ });
1029
+ }
1030
+
1031
+ return response;
1032
+ }
1033
+
1034
+ /**
1035
+ * @param {PaymentPlatformApplicationValidator.GetMerchantPaymentOptionParam} arg
1036
+ * - Arg object
1037
+ *
1038
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1039
+ * @param {import("../PlatformAPIClient").Options} - Options
1040
+ * @returns {Promise<PaymentPlatformModel.MerchnatPaymentModeResponse>} -
1041
+ * Success response
1042
+ * @name getMerchantPaymentOption
1043
+ * @summary: Get Payment modes and COD details.
1044
+ * @description: This api fetches all the available PGs for merchant and its offline payment mode details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getMerchantPaymentOption/).
1045
+ */
1046
+ async getMerchantPaymentOption(
1047
+ { requestHeaders } = { requestHeaders: {} },
1048
+ { responseHeaders } = { responseHeaders: false }
1049
+ ) {
1050
+ const {
1051
+ error,
1052
+ } = PaymentPlatformApplicationValidator.getMerchantPaymentOption().validate(
1053
+ {},
1054
+ { abortEarly: false, allowUnknown: true }
1055
+ );
1056
+ if (error) {
1057
+ return Promise.reject(new FDKClientValidationError(error));
1058
+ }
1059
+
1060
+ // Showing warrnings if extra unknown parameters are found
1061
+ const {
1062
+ error: warrning,
1063
+ } = PaymentPlatformApplicationValidator.getMerchantPaymentOption().validate(
1064
+ {},
1065
+ { abortEarly: false, allowUnknown: false }
1066
+ );
1067
+ if (warrning) {
1068
+ Logger({
1069
+ level: "WARN",
1070
+ message: `Parameter Validation warrnings for platform > Payment > getMerchantPaymentOption \n ${warrning}`,
1071
+ });
1072
+ }
1073
+
1074
+ const query_params = {};
1075
+
1076
+ const response = await PlatformAPIClient.execute(
1077
+ this.config,
1078
+ "get",
1079
+ `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/options/configuration`,
1080
+ query_params,
1081
+ undefined,
1082
+ requestHeaders,
1083
+ { responseHeaders }
1084
+ );
1085
+
1086
+ let responseData = response;
1087
+ if (responseHeaders) {
1088
+ responseData = response[0];
1089
+ }
1090
+
1091
+ const {
1092
+ error: res_error,
1093
+ } = PaymentPlatformModel.MerchnatPaymentModeResponse().validate(
1094
+ responseData,
1095
+ { abortEarly: false, allowUnknown: false }
1096
+ );
1097
+
1098
+ if (res_error) {
1099
+ Logger({
1100
+ level: "WARN",
1101
+ message: `Response Validation Warnnings for platform > Payment > getMerchantPaymentOption \n ${res_error}`,
1102
+ });
1103
+ }
1104
+
1105
+ return response;
1106
+ }
1107
+
1108
+ /**
1109
+ * @param {PaymentPlatformApplicationValidator.GetPGConfigAggregatorsParam} arg
1110
+ * - Arg object
1111
+ *
1112
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1113
+ * @param {import("../PlatformAPIClient").Options} - Options
1114
+ * @returns {Promise<PaymentPlatformModel.MerchnatPaymentModeResponse>} -
1115
+ * Success response
1116
+ * @name getPGConfigAggregators
1117
+ * @summary: Get Aggregators available to be added as PG.
1118
+ * @description: Get Aggregators available to be added as PG. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPGConfigAggregators/).
1119
+ */
1120
+ async getPGConfigAggregators(
1121
+ { requestHeaders } = { requestHeaders: {} },
1122
+ { responseHeaders } = { responseHeaders: false }
1123
+ ) {
1124
+ const {
1125
+ error,
1126
+ } = PaymentPlatformApplicationValidator.getPGConfigAggregators().validate(
1127
+ {},
1128
+ { abortEarly: false, allowUnknown: true }
1129
+ );
1130
+ if (error) {
1131
+ return Promise.reject(new FDKClientValidationError(error));
1132
+ }
1133
+
1134
+ // Showing warrnings if extra unknown parameters are found
1135
+ const {
1136
+ error: warrning,
1137
+ } = PaymentPlatformApplicationValidator.getPGConfigAggregators().validate(
1138
+ {},
1139
+ { abortEarly: false, allowUnknown: false }
1140
+ );
1141
+ if (warrning) {
1142
+ Logger({
1143
+ level: "WARN",
1144
+ message: `Parameter Validation warrnings for platform > Payment > getPGConfigAggregators \n ${warrning}`,
1145
+ });
1146
+ }
1147
+
1148
+ const query_params = {};
1149
+
1150
+ const response = await PlatformAPIClient.execute(
1151
+ this.config,
1152
+ "get",
1153
+ `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/options/configuration/aggregator`,
1154
+ query_params,
1155
+ undefined,
1156
+ requestHeaders,
1157
+ { responseHeaders }
1158
+ );
1159
+
1160
+ let responseData = response;
1161
+ if (responseHeaders) {
1162
+ responseData = response[0];
1163
+ }
1164
+
1165
+ const {
1166
+ error: res_error,
1167
+ } = PaymentPlatformModel.MerchnatPaymentModeResponse().validate(
1168
+ responseData,
1169
+ { abortEarly: false, allowUnknown: false }
1170
+ );
1171
+
1172
+ if (res_error) {
1173
+ Logger({
1174
+ level: "WARN",
1175
+ message: `Response Validation Warnnings for platform > Payment > getPGConfigAggregators \n ${res_error}`,
1176
+ });
1177
+ }
1178
+
1179
+ return response;
1180
+ }
1181
+
1182
+ /**
1183
+ * @param {PaymentPlatformApplicationValidator.GetPaymentCodeOptionParam} arg
1184
+ * - Arg object
1185
+ *
1186
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
910
1187
  * @param {import("../PlatformAPIClient").Options} - Options
911
1188
  * @returns {Promise<PaymentPlatformModel.GetPaymentCodeResponse>} - Success response
912
1189
  * @name getPaymentCodeOption
913
1190
  * @summary: List Payment Options Method Codes
914
1191
  * @description: Get all active List Payment Options Method Codes - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPaymentCodeOption/).
915
1192
  */
916
- async getPaymentCodeOption({ headers } = { headers: false }) {
1193
+ async getPaymentCodeOption(
1194
+ { requestHeaders } = { requestHeaders: {} },
1195
+ { responseHeaders } = { responseHeaders: false }
1196
+ ) {
917
1197
  const {
918
1198
  error,
919
1199
  } = PaymentPlatformApplicationValidator.getPaymentCodeOption().validate(
@@ -946,12 +1226,12 @@ class Payment {
946
1226
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/codes`,
947
1227
  query_params,
948
1228
  undefined,
949
- undefined,
950
- { headers }
1229
+ requestHeaders,
1230
+ { responseHeaders }
951
1231
  );
952
1232
 
953
1233
  let responseData = response;
954
- if (headers) {
1234
+ if (responseHeaders) {
955
1235
  responseData = response[0];
956
1236
  }
957
1237
 
@@ -974,6 +1254,7 @@ class Payment {
974
1254
 
975
1255
  /**
976
1256
  * @param {PaymentPlatformApplicationValidator.GetPaymentLinkParam} arg - Arg object
1257
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
977
1258
  * @param {import("../PlatformAPIClient").Options} - Options
978
1259
  * @returns {Promise<PaymentPlatformModel.GetPaymentLinkResponse>} - Success response
979
1260
  * @name getPaymentLink
@@ -981,8 +1262,8 @@ class Payment {
981
1262
  * @description: Use this API to get a payment link - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPaymentLink/).
982
1263
  */
983
1264
  async getPaymentLink(
984
- { paymentLinkId } = {},
985
- { headers } = { headers: false }
1265
+ { paymentLinkId, requestHeaders } = { requestHeaders: {} },
1266
+ { responseHeaders } = { responseHeaders: false }
986
1267
  ) {
987
1268
  const {
988
1269
  error,
@@ -1021,12 +1302,12 @@ class Payment {
1021
1302
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/create-payment-link/`,
1022
1303
  query_params,
1023
1304
  undefined,
1024
- undefined,
1025
- { headers }
1305
+ requestHeaders,
1306
+ { responseHeaders }
1026
1307
  );
1027
1308
 
1028
1309
  let responseData = response;
1029
- if (headers) {
1310
+ if (responseHeaders) {
1030
1311
  responseData = response[0];
1031
1312
  }
1032
1313
 
@@ -1051,6 +1332,7 @@ class Payment {
1051
1332
  * @param {PaymentPlatformApplicationValidator.GetPaymentModeRoutesParam} arg
1052
1333
  * - Arg object
1053
1334
  *
1335
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1054
1336
  * @param {import("../PlatformAPIClient").Options} - Options
1055
1337
  * @returns {Promise<PaymentPlatformModel.PaymentOptionsResponse>} - Success response
1056
1338
  * @name getPaymentModeRoutes
@@ -1058,8 +1340,8 @@ class Payment {
1058
1340
  * @description: Use this API to get Get All Valid Payment Options for making payment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getPaymentModeRoutes/).
1059
1341
  */
1060
1342
  async getPaymentModeRoutes(
1061
- { refresh, requestType } = {},
1062
- { headers } = { headers: false }
1343
+ { refresh, requestType, requestHeaders } = { requestHeaders: {} },
1344
+ { responseHeaders } = { responseHeaders: false }
1063
1345
  ) {
1064
1346
  const {
1065
1347
  error,
@@ -1101,12 +1383,12 @@ class Payment {
1101
1383
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/options`,
1102
1384
  query_params,
1103
1385
  undefined,
1104
- undefined,
1105
- { headers }
1386
+ requestHeaders,
1387
+ { responseHeaders }
1106
1388
  );
1107
1389
 
1108
1390
  let responseData = response;
1109
- if (headers) {
1391
+ if (responseHeaders) {
1110
1392
  responseData = response[0];
1111
1393
  }
1112
1394
 
@@ -1131,6 +1413,7 @@ class Payment {
1131
1413
  * @param {PaymentPlatformApplicationValidator.GetPosPaymentModeRoutesParam} arg
1132
1414
  * - Arg object
1133
1415
  *
1416
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1134
1417
  * @param {import("../PlatformAPIClient").Options} - Options
1135
1418
  * @returns {Promise<PaymentPlatformModel.PaymentOptionsResponse>} - Success response
1136
1419
  * @name getPosPaymentModeRoutes
@@ -1147,8 +1430,9 @@ class Payment {
1147
1430
  refresh,
1148
1431
  cardReference,
1149
1432
  userDetails,
1150
- } = {},
1151
- { headers } = { headers: false }
1433
+ requestHeaders,
1434
+ } = { requestHeaders: {} },
1435
+ { responseHeaders } = { responseHeaders: false }
1152
1436
  ) {
1153
1437
  const {
1154
1438
  error,
@@ -1208,12 +1492,12 @@ class Payment {
1208
1492
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/options/pos`,
1209
1493
  query_params,
1210
1494
  undefined,
1211
- undefined,
1212
- { headers }
1495
+ requestHeaders,
1496
+ { responseHeaders }
1213
1497
  );
1214
1498
 
1215
1499
  let responseData = response;
1216
- if (headers) {
1500
+ if (responseHeaders) {
1217
1501
  responseData = response[0];
1218
1502
  }
1219
1503
 
@@ -1238,6 +1522,7 @@ class Payment {
1238
1522
  * @param {PaymentPlatformApplicationValidator.GetUserBeneficiariesParam} arg
1239
1523
  * - Arg object
1240
1524
  *
1525
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1241
1526
  * @param {import("../PlatformAPIClient").Options} - Options
1242
1527
  * @returns {Promise<PaymentPlatformModel.OrderBeneficiaryResponse>} -
1243
1528
  * Success response
@@ -1246,8 +1531,8 @@ class Payment {
1246
1531
  * @description: Get all active beneficiary details added by the user for refund - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getUserBeneficiaries/).
1247
1532
  */
1248
1533
  async getUserBeneficiaries(
1249
- { orderId } = {},
1250
- { headers } = { headers: false }
1534
+ { orderId, requestHeaders } = { requestHeaders: {} },
1535
+ { responseHeaders } = { responseHeaders: false }
1251
1536
  ) {
1252
1537
  const {
1253
1538
  error,
@@ -1282,12 +1567,12 @@ class Payment {
1282
1567
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/refund/accounts/user`,
1283
1568
  query_params,
1284
1569
  undefined,
1285
- undefined,
1286
- { headers }
1570
+ requestHeaders,
1571
+ { responseHeaders }
1287
1572
  );
1288
1573
 
1289
1574
  let responseData = response;
1290
- if (headers) {
1575
+ if (responseHeaders) {
1291
1576
  responseData = response[0];
1292
1577
  }
1293
1578
 
@@ -1312,6 +1597,7 @@ class Payment {
1312
1597
  * @param {PaymentPlatformApplicationValidator.GetUserCODlimitRoutesParam} arg
1313
1598
  * - Arg object
1314
1599
  *
1600
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1315
1601
  * @param {import("../PlatformAPIClient").Options} - Options
1316
1602
  * @returns {Promise<PaymentPlatformModel.GetUserCODLimitResponse>} - Success response
1317
1603
  * @name getUserCODlimitRoutes
@@ -1319,8 +1605,8 @@ class Payment {
1319
1605
  * @description: Use this API to get user cod limit and reamining limit for the payment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getUserCODlimitRoutes/).
1320
1606
  */
1321
1607
  async getUserCODlimitRoutes(
1322
- { merchantUserId, mobileNo } = {},
1323
- { headers } = { headers: false }
1608
+ { merchantUserId, mobileNo, requestHeaders } = { requestHeaders: {} },
1609
+ { responseHeaders } = { responseHeaders: false }
1324
1610
  ) {
1325
1611
  const {
1326
1612
  error,
@@ -1362,12 +1648,12 @@ class Payment {
1362
1648
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/user-cod`,
1363
1649
  query_params,
1364
1650
  undefined,
1365
- undefined,
1366
- { headers }
1651
+ requestHeaders,
1652
+ { responseHeaders }
1367
1653
  );
1368
1654
 
1369
1655
  let responseData = response;
1370
- if (headers) {
1656
+ if (responseHeaders) {
1371
1657
  responseData = response[0];
1372
1658
  }
1373
1659
 
@@ -1392,6 +1678,7 @@ class Payment {
1392
1678
  * @param {PaymentPlatformApplicationValidator.GetUserOrderBeneficiariesParam} arg
1393
1679
  * - Arg object
1394
1680
  *
1681
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1395
1682
  * @param {import("../PlatformAPIClient").Options} - Options
1396
1683
  * @returns {Promise<PaymentPlatformModel.OrderBeneficiaryResponse>} -
1397
1684
  * Success response
@@ -1400,8 +1687,8 @@ class Payment {
1400
1687
  * @description: Get all active beneficiary details added by the user for refund - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/getUserOrderBeneficiaries/).
1401
1688
  */
1402
1689
  async getUserOrderBeneficiaries(
1403
- { orderId } = {},
1404
- { headers } = { headers: false }
1690
+ { orderId, requestHeaders } = { requestHeaders: {} },
1691
+ { responseHeaders } = { responseHeaders: false }
1405
1692
  ) {
1406
1693
  const {
1407
1694
  error,
@@ -1436,12 +1723,12 @@ class Payment {
1436
1723
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/refund/accounts/order`,
1437
1724
  query_params,
1438
1725
  undefined,
1439
- undefined,
1440
- { headers }
1726
+ requestHeaders,
1727
+ { responseHeaders }
1441
1728
  );
1442
1729
 
1443
1730
  let responseData = response;
1444
- if (headers) {
1731
+ if (responseHeaders) {
1445
1732
  responseData = response[0];
1446
1733
  }
1447
1734
 
@@ -1466,6 +1753,7 @@ class Payment {
1466
1753
  * @param {PaymentPlatformApplicationValidator.InitialisePaymentParam} arg
1467
1754
  * - Arg object
1468
1755
  *
1756
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1469
1757
  * @param {import("../PlatformAPIClient").Options} - Options
1470
1758
  * @returns {Promise<PaymentPlatformModel.PaymentInitializationResponse>} -
1471
1759
  * Success response
@@ -1473,7 +1761,10 @@ class Payment {
1473
1761
  * @summary: Initialize a payment (server-to-server) for UPI and BharatQR
1474
1762
  * @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/platform/payment/initialisePayment/).
1475
1763
  */
1476
- async initialisePayment({ body } = {}, { headers } = { headers: false }) {
1764
+ async initialisePayment(
1765
+ { body, requestHeaders } = { requestHeaders: {} },
1766
+ { responseHeaders } = { responseHeaders: false }
1767
+ ) {
1477
1768
  const {
1478
1769
  error,
1479
1770
  } = PaymentPlatformApplicationValidator.initialisePayment().validate(
@@ -1510,12 +1801,12 @@ class Payment {
1510
1801
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/request`,
1511
1802
  query_params,
1512
1803
  body,
1513
- undefined,
1514
- { headers }
1804
+ requestHeaders,
1805
+ { responseHeaders }
1515
1806
  );
1516
1807
 
1517
1808
  let responseData = response;
1518
- if (headers) {
1809
+ if (responseHeaders) {
1519
1810
  responseData = response[0];
1520
1811
  }
1521
1812
 
@@ -1540,6 +1831,7 @@ class Payment {
1540
1831
  * @param {PaymentPlatformApplicationValidator.MerchantOnBoardingParam} arg
1541
1832
  * - Arg object
1542
1833
  *
1834
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1543
1835
  * @param {import("../PlatformAPIClient").Options} - Options
1544
1836
  * @returns {Promise<PaymentPlatformModel.MerchantOnBoardingResponse>} -
1545
1837
  * Success response
@@ -1547,7 +1839,10 @@ class Payment {
1547
1839
  * @summary: API to push Ajiodhan merchant data to Gringotts system
1548
1840
  * @description: Use this API to push Ajiodhan merchant data to Gringotts system - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/merchantOnBoarding/).
1549
1841
  */
1550
- async merchantOnBoarding({ body } = {}, { headers } = { headers: false }) {
1842
+ async merchantOnBoarding(
1843
+ { body, requestHeaders } = { requestHeaders: {} },
1844
+ { responseHeaders } = { responseHeaders: false }
1845
+ ) {
1551
1846
  const {
1552
1847
  error,
1553
1848
  } = PaymentPlatformApplicationValidator.merchantOnBoarding().validate(
@@ -1584,12 +1879,12 @@ class Payment {
1584
1879
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/merchant-onboarding`,
1585
1880
  query_params,
1586
1881
  body,
1587
- undefined,
1588
- { headers }
1882
+ requestHeaders,
1883
+ { responseHeaders }
1589
1884
  );
1590
1885
 
1591
1886
  let responseData = response;
1592
- if (headers) {
1887
+ if (responseHeaders) {
1593
1888
  responseData = response[0];
1594
1889
  }
1595
1890
 
@@ -1612,6 +1907,7 @@ class Payment {
1612
1907
 
1613
1908
  /**
1614
1909
  * @param {PaymentPlatformApplicationValidator.OauthGetUrlParam} arg - Arg object
1910
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1615
1911
  * @param {import("../PlatformAPIClient").Options} - Options
1616
1912
  * @returns {Promise<PaymentPlatformModel.GetOauthUrlResponse>} - Success response
1617
1913
  * @name oauthGetUrl
@@ -1619,8 +1915,10 @@ class Payment {
1619
1915
  * @description: Use this API to Get the url to call for oauth. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/oauthGetUrl/).
1620
1916
  */
1621
1917
  async oauthGetUrl(
1622
- { aggregator, successRedirectUrl, failureRedirectUrl } = {},
1623
- { headers } = { headers: false }
1918
+ { aggregator, successRedirectUrl, failureRedirectUrl, requestHeaders } = {
1919
+ requestHeaders: {},
1920
+ },
1921
+ { responseHeaders } = { responseHeaders: false }
1624
1922
  ) {
1625
1923
  const {
1626
1924
  error,
@@ -1664,12 +1962,12 @@ class Payment {
1664
1962
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/onboard/${aggregator}/`,
1665
1963
  query_params,
1666
1964
  undefined,
1667
- undefined,
1668
- { headers }
1965
+ requestHeaders,
1966
+ { responseHeaders }
1669
1967
  );
1670
1968
 
1671
1969
  let responseData = response;
1672
- if (headers) {
1970
+ if (responseHeaders) {
1673
1971
  responseData = response[0];
1674
1972
  }
1675
1973
 
@@ -1690,10 +1988,169 @@ class Payment {
1690
1988
  return response;
1691
1989
  }
1692
1990
 
1991
+ /**
1992
+ * @param {PaymentPlatformApplicationValidator.PatchMerchantAggregatorPaymentModeDetailsParam} arg
1993
+ * - Arg object
1994
+ *
1995
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1996
+ * @param {import("../PlatformAPIClient").Options} - Options
1997
+ * @returns {Promise<PaymentPlatformModel.MerchnatPaymentModeResponse>} -
1998
+ * Success response
1999
+ * @name patchMerchantAggregatorPaymentModeDetails
2000
+ * @summary: Update Aggregator, payment mode and sub payment mode.
2001
+ * @description: Update Aggregator, payment mode and sub payment mode details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/patchMerchantAggregatorPaymentModeDetails/).
2002
+ */
2003
+ async patchMerchantAggregatorPaymentModeDetails(
2004
+ { aggregatorId, body, requestHeaders } = { requestHeaders: {} },
2005
+ { responseHeaders } = { responseHeaders: false }
2006
+ ) {
2007
+ const {
2008
+ error,
2009
+ } = PaymentPlatformApplicationValidator.patchMerchantAggregatorPaymentModeDetails().validate(
2010
+ {
2011
+ aggregatorId,
2012
+ body,
2013
+ },
2014
+ { abortEarly: false, allowUnknown: true }
2015
+ );
2016
+ if (error) {
2017
+ return Promise.reject(new FDKClientValidationError(error));
2018
+ }
2019
+
2020
+ // Showing warrnings if extra unknown parameters are found
2021
+ const {
2022
+ error: warrning,
2023
+ } = PaymentPlatformApplicationValidator.patchMerchantAggregatorPaymentModeDetails().validate(
2024
+ {
2025
+ aggregatorId,
2026
+ body,
2027
+ },
2028
+ { abortEarly: false, allowUnknown: false }
2029
+ );
2030
+ if (warrning) {
2031
+ Logger({
2032
+ level: "WARN",
2033
+ message: `Parameter Validation warrnings for platform > Payment > patchMerchantAggregatorPaymentModeDetails \n ${warrning}`,
2034
+ });
2035
+ }
2036
+
2037
+ const query_params = {};
2038
+
2039
+ const response = await PlatformAPIClient.execute(
2040
+ this.config,
2041
+ "patch",
2042
+ `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/options/aggregators/${aggregatorId}`,
2043
+ query_params,
2044
+ body,
2045
+ requestHeaders,
2046
+ { responseHeaders }
2047
+ );
2048
+
2049
+ let responseData = response;
2050
+ if (responseHeaders) {
2051
+ responseData = response[0];
2052
+ }
2053
+
2054
+ const {
2055
+ error: res_error,
2056
+ } = PaymentPlatformModel.MerchnatPaymentModeResponse().validate(
2057
+ responseData,
2058
+ { abortEarly: false, allowUnknown: false }
2059
+ );
2060
+
2061
+ if (res_error) {
2062
+ Logger({
2063
+ level: "WARN",
2064
+ message: `Response Validation Warnnings for platform > Payment > patchMerchantAggregatorPaymentModeDetails \n ${res_error}`,
2065
+ });
2066
+ }
2067
+
2068
+ return response;
2069
+ }
2070
+
2071
+ /**
2072
+ * @param {PaymentPlatformApplicationValidator.PatchMerchantPaymentOptionParam} arg
2073
+ * - Arg object
2074
+ *
2075
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2076
+ * @param {import("../PlatformAPIClient").Options} - Options
2077
+ * @returns {Promise<PaymentPlatformModel.MerchnatPaymentModeResponse>} -
2078
+ * Success response
2079
+ * @name patchMerchantPaymentOption
2080
+ * @summary: Update Payment modes and COD details.
2081
+ * @description: To updated online payment as active/inactive or offline payment configuration like cod charges, anonymous cod allowed flags. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/patchMerchantPaymentOption/).
2082
+ */
2083
+ async patchMerchantPaymentOption(
2084
+ { body, requestHeaders } = { requestHeaders: {} },
2085
+ { responseHeaders } = { responseHeaders: false }
2086
+ ) {
2087
+ const {
2088
+ error,
2089
+ } = PaymentPlatformApplicationValidator.patchMerchantPaymentOption().validate(
2090
+ {
2091
+ body,
2092
+ },
2093
+ { abortEarly: false, allowUnknown: true }
2094
+ );
2095
+ if (error) {
2096
+ return Promise.reject(new FDKClientValidationError(error));
2097
+ }
2098
+
2099
+ // Showing warrnings if extra unknown parameters are found
2100
+ const {
2101
+ error: warrning,
2102
+ } = PaymentPlatformApplicationValidator.patchMerchantPaymentOption().validate(
2103
+ {
2104
+ body,
2105
+ },
2106
+ { abortEarly: false, allowUnknown: false }
2107
+ );
2108
+ if (warrning) {
2109
+ Logger({
2110
+ level: "WARN",
2111
+ message: `Parameter Validation warrnings for platform > Payment > patchMerchantPaymentOption \n ${warrning}`,
2112
+ });
2113
+ }
2114
+
2115
+ const query_params = {};
2116
+
2117
+ const response = await PlatformAPIClient.execute(
2118
+ this.config,
2119
+ "patch",
2120
+ `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/options/configuration`,
2121
+ query_params,
2122
+ body,
2123
+ requestHeaders,
2124
+ { responseHeaders }
2125
+ );
2126
+
2127
+ let responseData = response;
2128
+ if (responseHeaders) {
2129
+ responseData = response[0];
2130
+ }
2131
+
2132
+ const {
2133
+ error: res_error,
2134
+ } = PaymentPlatformModel.MerchnatPaymentModeResponse().validate(
2135
+ responseData,
2136
+ { abortEarly: false, allowUnknown: false }
2137
+ );
2138
+
2139
+ if (res_error) {
2140
+ Logger({
2141
+ level: "WARN",
2142
+ message: `Response Validation Warnnings for platform > Payment > patchMerchantPaymentOption \n ${res_error}`,
2143
+ });
2144
+ }
2145
+
2146
+ return response;
2147
+ }
2148
+
1693
2149
  /**
1694
2150
  * @param {PaymentPlatformApplicationValidator.PaymentStatusBulkParam} arg
1695
2151
  * - Arg object
1696
2152
  *
2153
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1697
2154
  * @param {import("../PlatformAPIClient").Options} - Options
1698
2155
  * @returns {Promise<PaymentPlatformModel.PaymentStatusBulkHandlerResponse>}
1699
2156
  * - Success response
@@ -1702,7 +2159,10 @@ class Payment {
1702
2159
  * @summary: Get Payment status and information for a list of order_ids
1703
2160
  * @description: Use this API to get Payment status and information for a list of order_ids - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/paymentStatusBulk/).
1704
2161
  */
1705
- async paymentStatusBulk({ body } = {}, { headers } = { headers: false }) {
2162
+ async paymentStatusBulk(
2163
+ { body, requestHeaders } = { requestHeaders: {} },
2164
+ { responseHeaders } = { responseHeaders: false }
2165
+ ) {
1706
2166
  const {
1707
2167
  error,
1708
2168
  } = PaymentPlatformApplicationValidator.paymentStatusBulk().validate(
@@ -1739,12 +2199,12 @@ class Payment {
1739
2199
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/payment-status-bulk/`,
1740
2200
  query_params,
1741
2201
  body,
1742
- undefined,
1743
- { headers }
2202
+ requestHeaders,
2203
+ { responseHeaders }
1744
2204
  );
1745
2205
 
1746
2206
  let responseData = response;
1747
- if (headers) {
2207
+ if (responseHeaders) {
1748
2208
  responseData = response[0];
1749
2209
  }
1750
2210
 
@@ -1769,6 +2229,7 @@ class Payment {
1769
2229
  * @param {PaymentPlatformApplicationValidator.PollingPaymentLinkParam} arg
1770
2230
  * - Arg object
1771
2231
  *
2232
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1772
2233
  * @param {import("../PlatformAPIClient").Options} - Options
1773
2234
  * @returns {Promise<PaymentPlatformModel.PollingPaymentLinkResponse>} -
1774
2235
  * Success response
@@ -1777,8 +2238,8 @@ class Payment {
1777
2238
  * @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/platform/payment/pollingPaymentLink/).
1778
2239
  */
1779
2240
  async pollingPaymentLink(
1780
- { paymentLinkId } = {},
1781
- { headers } = { headers: false }
2241
+ { paymentLinkId, requestHeaders } = { requestHeaders: {} },
2242
+ { responseHeaders } = { responseHeaders: false }
1782
2243
  ) {
1783
2244
  const {
1784
2245
  error,
@@ -1817,12 +2278,12 @@ class Payment {
1817
2278
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/polling-payment-link/`,
1818
2279
  query_params,
1819
2280
  undefined,
1820
- undefined,
1821
- { headers }
2281
+ requestHeaders,
2282
+ { responseHeaders }
1822
2283
  );
1823
2284
 
1824
2285
  let responseData = response;
1825
- if (headers) {
2286
+ if (responseHeaders) {
1826
2287
  responseData = response[0];
1827
2288
  }
1828
2289
 
@@ -1845,13 +2306,17 @@ class Payment {
1845
2306
 
1846
2307
  /**
1847
2308
  * @param {PaymentPlatformApplicationValidator.RepaymentDetailsParam} arg - Arg object
2309
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1848
2310
  * @param {import("../PlatformAPIClient").Options} - Options
1849
2311
  * @returns {Promise<PaymentPlatformModel.RepaymentResponse>} - Success response
1850
2312
  * @name repaymentDetails
1851
2313
  * @summary: API to register repayment details
1852
2314
  * @description: Use this API to register any repayment record in the db and notify the aggrgator - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/repaymentDetails/).
1853
2315
  */
1854
- async repaymentDetails({ body } = {}, { headers } = { headers: false }) {
2316
+ async repaymentDetails(
2317
+ { body, requestHeaders } = { requestHeaders: {} },
2318
+ { responseHeaders } = { responseHeaders: false }
2319
+ ) {
1855
2320
  const {
1856
2321
  error,
1857
2322
  } = PaymentPlatformApplicationValidator.repaymentDetails().validate(
@@ -1888,12 +2353,12 @@ class Payment {
1888
2353
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/repayment-details`,
1889
2354
  query_params,
1890
2355
  body,
1891
- undefined,
1892
- { headers }
2356
+ requestHeaders,
2357
+ { responseHeaders }
1893
2358
  );
1894
2359
 
1895
2360
  let responseData = response;
1896
- if (headers) {
2361
+ if (responseHeaders) {
1897
2362
  responseData = response[0];
1898
2363
  }
1899
2364
 
@@ -1918,6 +2383,7 @@ class Payment {
1918
2383
  * @param {PaymentPlatformApplicationValidator.ResendOrCancelPaymentParam} arg
1919
2384
  * - Arg object
1920
2385
  *
2386
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1921
2387
  * @param {import("../PlatformAPIClient").Options} - Options
1922
2388
  * @returns {Promise<PaymentPlatformModel.ResendOrCancelPaymentResponse>} -
1923
2389
  * Success response
@@ -1925,7 +2391,10 @@ class Payment {
1925
2391
  * @summary: API to resend and cancel a payment link which was already generated.
1926
2392
  * @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/platform/payment/resendOrCancelPayment/).
1927
2393
  */
1928
- async resendOrCancelPayment({ body } = {}, { headers } = { headers: false }) {
2394
+ async resendOrCancelPayment(
2395
+ { body, requestHeaders } = { requestHeaders: {} },
2396
+ { responseHeaders } = { responseHeaders: false }
2397
+ ) {
1929
2398
  const {
1930
2399
  error,
1931
2400
  } = PaymentPlatformApplicationValidator.resendOrCancelPayment().validate(
@@ -1962,12 +2431,12 @@ class Payment {
1962
2431
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/cancel`,
1963
2432
  query_params,
1964
2433
  body,
1965
- undefined,
1966
- { headers }
2434
+ requestHeaders,
2435
+ { responseHeaders }
1967
2436
  );
1968
2437
 
1969
2438
  let responseData = response;
1970
- if (headers) {
2439
+ if (responseHeaders) {
1971
2440
  responseData = response[0];
1972
2441
  }
1973
2442
 
@@ -1992,6 +2461,7 @@ class Payment {
1992
2461
  * @param {PaymentPlatformApplicationValidator.ResendPaymentLinkParam} arg
1993
2462
  * - Arg object
1994
2463
  *
2464
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1995
2465
  * @param {import("../PlatformAPIClient").Options} - Options
1996
2466
  * @returns {Promise<PaymentPlatformModel.ResendPaymentLinkResponse>} -
1997
2467
  * Success response
@@ -1999,7 +2469,10 @@ class Payment {
1999
2469
  * @summary: Resend payment link
2000
2470
  * @description: Use this API to resend a payment link for the customer - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/resendPaymentLink/).
2001
2471
  */
2002
- async resendPaymentLink({ body } = {}, { headers } = { headers: false }) {
2472
+ async resendPaymentLink(
2473
+ { body, requestHeaders } = { requestHeaders: {} },
2474
+ { responseHeaders } = { responseHeaders: false }
2475
+ ) {
2003
2476
  const {
2004
2477
  error,
2005
2478
  } = PaymentPlatformApplicationValidator.resendPaymentLink().validate(
@@ -2036,12 +2509,12 @@ class Payment {
2036
2509
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/resend-payment-link/`,
2037
2510
  query_params,
2038
2511
  body,
2039
- undefined,
2040
- { headers }
2512
+ requestHeaders,
2513
+ { responseHeaders }
2041
2514
  );
2042
2515
 
2043
2516
  let responseData = response;
2044
- if (headers) {
2517
+ if (responseHeaders) {
2045
2518
  responseData = response[0];
2046
2519
  }
2047
2520
 
@@ -2064,6 +2537,7 @@ class Payment {
2064
2537
 
2065
2538
  /**
2066
2539
  * @param {PaymentPlatformApplicationValidator.RevokeOauthTokenParam} arg - Arg object
2540
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2067
2541
  * @param {import("../PlatformAPIClient").Options} - Options
2068
2542
  * @returns {Promise<PaymentPlatformModel.RevokeOAuthToken>} - Success response
2069
2543
  * @name revokeOauthToken
@@ -2071,8 +2545,8 @@ class Payment {
2071
2545
  * @description: Use this API to Revoke oauth for razorpay partnership - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/revokeOauthToken/).
2072
2546
  */
2073
2547
  async revokeOauthToken(
2074
- { aggregator } = {},
2075
- { headers } = { headers: false }
2548
+ { aggregator, requestHeaders } = { requestHeaders: {} },
2549
+ { responseHeaders } = { responseHeaders: false }
2076
2550
  ) {
2077
2551
  const {
2078
2552
  error,
@@ -2110,12 +2584,12 @@ class Payment {
2110
2584
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/revoke/${aggregator}/`,
2111
2585
  query_params,
2112
2586
  undefined,
2113
- undefined,
2114
- { headers }
2587
+ requestHeaders,
2588
+ { responseHeaders }
2115
2589
  );
2116
2590
 
2117
2591
  let responseData = response;
2118
- if (headers) {
2592
+ if (responseHeaders) {
2119
2593
  responseData = response[0];
2120
2594
  }
2121
2595
 
@@ -2140,6 +2614,7 @@ class Payment {
2140
2614
  * @param {PaymentPlatformApplicationValidator.SaveBrandPaymentGatewayConfigParam} arg
2141
2615
  * - Arg object
2142
2616
  *
2617
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2143
2618
  * @param {import("../PlatformAPIClient").Options} - Options
2144
2619
  * @returns {Promise<PaymentPlatformModel.PaymentGatewayToBeReviewed>} -
2145
2620
  * Success response
@@ -2148,8 +2623,8 @@ class Payment {
2148
2623
  * @description: Save Config Secret For Brand Payment Gateway - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/saveBrandPaymentGatewayConfig/).
2149
2624
  */
2150
2625
  async saveBrandPaymentGatewayConfig(
2151
- { body } = {},
2152
- { headers } = { headers: false }
2626
+ { body, requestHeaders } = { requestHeaders: {} },
2627
+ { responseHeaders } = { responseHeaders: false }
2153
2628
  ) {
2154
2629
  const {
2155
2630
  error,
@@ -2187,12 +2662,12 @@ class Payment {
2187
2662
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/aggregator/request`,
2188
2663
  query_params,
2189
2664
  body,
2190
- undefined,
2191
- { headers }
2665
+ requestHeaders,
2666
+ { responseHeaders }
2192
2667
  );
2193
2668
 
2194
2669
  let responseData = response;
2195
- if (headers) {
2670
+ if (responseHeaders) {
2196
2671
  responseData = response[0];
2197
2672
  }
2198
2673
 
@@ -2217,13 +2692,17 @@ class Payment {
2217
2692
  * @param {PaymentPlatformApplicationValidator.SetUserCODlimitRoutesParam} arg
2218
2693
  * - Arg object
2219
2694
  *
2695
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2220
2696
  * @param {import("../PlatformAPIClient").Options} - Options
2221
2697
  * @returns {Promise<PaymentPlatformModel.SetCODOptionResponse>} - Success response
2222
2698
  * @name setUserCODlimitRoutes
2223
2699
  * @summary: Set COD option for user for payment
2224
2700
  * @description: Use this API to set cod option as true or false for the payment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/setUserCODlimitRoutes/).
2225
2701
  */
2226
- async setUserCODlimitRoutes({ body } = {}, { headers } = { headers: false }) {
2702
+ async setUserCODlimitRoutes(
2703
+ { body, requestHeaders } = { requestHeaders: {} },
2704
+ { responseHeaders } = { responseHeaders: false }
2705
+ ) {
2227
2706
  const {
2228
2707
  error,
2229
2708
  } = PaymentPlatformApplicationValidator.setUserCODlimitRoutes().validate(
@@ -2260,12 +2739,12 @@ class Payment {
2260
2739
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/user-cod`,
2261
2740
  query_params,
2262
2741
  body,
2263
- undefined,
2264
- { headers }
2742
+ requestHeaders,
2743
+ { responseHeaders }
2265
2744
  );
2266
2745
 
2267
2746
  let responseData = response;
2268
- if (headers) {
2747
+ if (responseHeaders) {
2269
2748
  responseData = response[0];
2270
2749
  }
2271
2750
 
@@ -2288,13 +2767,17 @@ class Payment {
2288
2767
 
2289
2768
  /**
2290
2769
  * @param {PaymentPlatformApplicationValidator.UpdateEdcDeviceParam} arg - Arg object
2770
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2291
2771
  * @param {import("../PlatformAPIClient").Options} - Options
2292
2772
  * @returns {Promise<PaymentPlatformModel.EdcDeviceAddResponse>} - Success response
2293
2773
  * @name updateEdcDevice
2294
2774
  * @summary: map new edc device to the terminal
2295
2775
  * @description: Use this API to map new edc device to the terminal - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/updateEdcDevice/).
2296
2776
  */
2297
- async updateEdcDevice({ body } = {}, { headers } = { headers: false }) {
2777
+ async updateEdcDevice(
2778
+ { body, requestHeaders } = { requestHeaders: {} },
2779
+ { responseHeaders } = { responseHeaders: false }
2780
+ ) {
2298
2781
  const {
2299
2782
  error,
2300
2783
  } = PaymentPlatformApplicationValidator.updateEdcDevice().validate(
@@ -2331,12 +2814,12 @@ class Payment {
2331
2814
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/edc-device`,
2332
2815
  query_params,
2333
2816
  body,
2334
- undefined,
2335
- { headers }
2817
+ requestHeaders,
2818
+ { responseHeaders }
2336
2819
  );
2337
2820
 
2338
2821
  let responseData = response;
2339
- if (headers) {
2822
+ if (responseHeaders) {
2340
2823
  responseData = response[0];
2341
2824
  }
2342
2825
 
@@ -2357,10 +2840,175 @@ class Payment {
2357
2840
  return response;
2358
2841
  }
2359
2842
 
2843
+ /**
2844
+ * @param {PaymentPlatformApplicationValidator.UpdatePaymentSessionParam} arg
2845
+ * - Arg object
2846
+ *
2847
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2848
+ * @param {import("../PlatformAPIClient").Options} - Options
2849
+ * @returns {Promise<PaymentPlatformModel.PaymentSessionResponseSerializer>}
2850
+ * - Success response
2851
+ *
2852
+ * @name updatePaymentSession
2853
+ * @summary: API to update status of a payment.
2854
+ * @description: A payment_session is initiated against a global identifier (gid) which is identifies the entity payment is initiated against. e.g. order_id, cart_id. This endpoint is to update the status of the said payment_session. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/updatePaymentSession/).
2855
+ */
2856
+ async updatePaymentSession(
2857
+ { gid, body, requestHeaders } = { requestHeaders: {} },
2858
+ { responseHeaders } = { responseHeaders: false }
2859
+ ) {
2860
+ const {
2861
+ error,
2862
+ } = PaymentPlatformApplicationValidator.updatePaymentSession().validate(
2863
+ {
2864
+ gid,
2865
+ body,
2866
+ },
2867
+ { abortEarly: false, allowUnknown: true }
2868
+ );
2869
+ if (error) {
2870
+ return Promise.reject(new FDKClientValidationError(error));
2871
+ }
2872
+
2873
+ // Showing warrnings if extra unknown parameters are found
2874
+ const {
2875
+ error: warrning,
2876
+ } = PaymentPlatformApplicationValidator.updatePaymentSession().validate(
2877
+ {
2878
+ gid,
2879
+ body,
2880
+ },
2881
+ { abortEarly: false, allowUnknown: false }
2882
+ );
2883
+ if (warrning) {
2884
+ Logger({
2885
+ level: "WARN",
2886
+ message: `Parameter Validation warrnings for platform > Payment > updatePaymentSession \n ${warrning}`,
2887
+ });
2888
+ }
2889
+
2890
+ const query_params = {};
2891
+
2892
+ const response = await PlatformAPIClient.execute(
2893
+ this.config,
2894
+ "put",
2895
+ `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/session/${gid}`,
2896
+ query_params,
2897
+ body,
2898
+ requestHeaders,
2899
+ { responseHeaders }
2900
+ );
2901
+
2902
+ let responseData = response;
2903
+ if (responseHeaders) {
2904
+ responseData = response[0];
2905
+ }
2906
+
2907
+ const {
2908
+ error: res_error,
2909
+ } = PaymentPlatformModel.PaymentSessionResponseSerializer().validate(
2910
+ responseData,
2911
+ { abortEarly: false, allowUnknown: false }
2912
+ );
2913
+
2914
+ if (res_error) {
2915
+ Logger({
2916
+ level: "WARN",
2917
+ message: `Response Validation Warnnings for platform > Payment > updatePaymentSession \n ${res_error}`,
2918
+ });
2919
+ }
2920
+
2921
+ return response;
2922
+ }
2923
+
2924
+ /**
2925
+ * @param {PaymentPlatformApplicationValidator.UpdateRefundSessionParam} arg
2926
+ * - Arg object
2927
+ *
2928
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2929
+ * @param {import("../PlatformAPIClient").Options} - Options
2930
+ * @returns {Promise<PaymentPlatformModel.RefundSessionResponseSerializer>}
2931
+ * - Success response
2932
+ *
2933
+ * @name updateRefundSession
2934
+ * @summary: API to update the status of a refund
2935
+ * @description: A refund_session is initiated against a refund request, and this endpoint is to update the status against the refund request_id. A gid is unique indentifier of the entity against which payment was received e.g. an order. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/payment/updateRefundSession/).
2936
+ */
2937
+ async updateRefundSession(
2938
+ { gid, requestId, body, requestHeaders } = { requestHeaders: {} },
2939
+ { responseHeaders } = { responseHeaders: false }
2940
+ ) {
2941
+ const {
2942
+ error,
2943
+ } = PaymentPlatformApplicationValidator.updateRefundSession().validate(
2944
+ {
2945
+ gid,
2946
+ requestId,
2947
+ body,
2948
+ },
2949
+ { abortEarly: false, allowUnknown: true }
2950
+ );
2951
+ if (error) {
2952
+ return Promise.reject(new FDKClientValidationError(error));
2953
+ }
2954
+
2955
+ // Showing warrnings if extra unknown parameters are found
2956
+ const {
2957
+ error: warrning,
2958
+ } = PaymentPlatformApplicationValidator.updateRefundSession().validate(
2959
+ {
2960
+ gid,
2961
+ requestId,
2962
+ body,
2963
+ },
2964
+ { abortEarly: false, allowUnknown: false }
2965
+ );
2966
+ if (warrning) {
2967
+ Logger({
2968
+ level: "WARN",
2969
+ message: `Parameter Validation warrnings for platform > Payment > updateRefundSession \n ${warrning}`,
2970
+ });
2971
+ }
2972
+
2973
+ const query_params = {};
2974
+
2975
+ const response = await PlatformAPIClient.execute(
2976
+ this.config,
2977
+ "put",
2978
+ `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/${gid}/refund/session/${requestId}`,
2979
+ query_params,
2980
+ body,
2981
+ requestHeaders,
2982
+ { responseHeaders }
2983
+ );
2984
+
2985
+ let responseData = response;
2986
+ if (responseHeaders) {
2987
+ responseData = response[0];
2988
+ }
2989
+
2990
+ const {
2991
+ error: res_error,
2992
+ } = PaymentPlatformModel.RefundSessionResponseSerializer().validate(
2993
+ responseData,
2994
+ { abortEarly: false, allowUnknown: false }
2995
+ );
2996
+
2997
+ if (res_error) {
2998
+ Logger({
2999
+ level: "WARN",
3000
+ message: `Response Validation Warnnings for platform > Payment > updateRefundSession \n ${res_error}`,
3001
+ });
3002
+ }
3003
+
3004
+ return response;
3005
+ }
3006
+
2360
3007
  /**
2361
3008
  * @param {PaymentPlatformApplicationValidator.VerifyCustomerForPaymentParam} arg
2362
3009
  * - Arg object
2363
3010
  *
3011
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2364
3012
  * @param {import("../PlatformAPIClient").Options} - Options
2365
3013
  * @returns {Promise<PaymentPlatformModel.ValidateCustomerResponse>} -
2366
3014
  * Success response
@@ -2369,8 +3017,8 @@ class Payment {
2369
3017
  * @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/platform/payment/verifyCustomerForPayment/).
2370
3018
  */
2371
3019
  async verifyCustomerForPayment(
2372
- { body } = {},
2373
- { headers } = { headers: false }
3020
+ { body, requestHeaders } = { requestHeaders: {} },
3021
+ { responseHeaders } = { responseHeaders: false }
2374
3022
  ) {
2375
3023
  const {
2376
3024
  error,
@@ -2408,12 +3056,12 @@ class Payment {
2408
3056
  `/service/platform/payment/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/customer/validation`,
2409
3057
  query_params,
2410
3058
  body,
2411
- undefined,
2412
- { headers }
3059
+ requestHeaders,
3060
+ { responseHeaders }
2413
3061
  );
2414
3062
 
2415
3063
  let responseData = response;
2416
- if (headers) {
3064
+ if (responseHeaders) {
2417
3065
  responseData = response[0];
2418
3066
  }
2419
3067