@gofynd/fdk-client-javascript 1.1.6 → 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 (348) hide show
  1. package/README.md +52 -3
  2. package/index.js +0 -3
  3. package/package.json +1 -2
  4. package/sdk/application/ApplicationAPIClient.d.ts +15 -1
  5. package/sdk/application/ApplicationAPIClient.js +12 -3
  6. package/sdk/application/ApplicationClient.d.ts +36 -6
  7. package/sdk/application/ApplicationClient.js +30 -43
  8. package/sdk/application/ApplicationConfig.d.ts +92 -12
  9. package/sdk/application/ApplicationConfig.js +48 -14
  10. package/sdk/application/Cart/CartApplicationClient.d.ts +200 -357
  11. package/sdk/application/Cart/CartApplicationClient.js +711 -483
  12. package/sdk/application/Cart/CartApplicationModel.d.ts +2054 -96
  13. package/sdk/application/Cart/CartApplicationModel.js +1224 -93
  14. package/sdk/application/Cart/CartApplicationValidator.d.ts +508 -30
  15. package/sdk/application/Cart/CartApplicationValidator.js +270 -15
  16. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +274 -422
  17. package/sdk/application/Catalog/CatalogApplicationClient.js +865 -630
  18. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +2320 -117
  19. package/sdk/application/Catalog/CatalogApplicationModel.js +1566 -172
  20. package/sdk/application/Catalog/CatalogApplicationValidator.d.ts +798 -31
  21. package/sdk/application/Catalog/CatalogApplicationValidator.js +318 -3
  22. package/sdk/application/Common/CommonApplicationClient.d.ts +16 -21
  23. package/sdk/application/Common/CommonApplicationClient.js +52 -33
  24. package/sdk/application/Common/CommonApplicationModel.d.ts +368 -19
  25. package/sdk/application/Common/CommonApplicationModel.js +192 -40
  26. package/sdk/application/Common/CommonApplicationValidator.d.ts +42 -4
  27. package/sdk/application/Common/CommonApplicationValidator.js +21 -3
  28. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +31 -18
  29. package/sdk/application/Communication/CommunicationApplicationClient.js +86 -47
  30. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +157 -14
  31. package/sdk/application/Communication/CommunicationApplicationModel.js +104 -23
  32. package/sdk/application/Communication/CommunicationApplicationValidator.d.ts +27 -4
  33. package/sdk/application/Communication/CommunicationApplicationValidator.js +21 -5
  34. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +149 -118
  35. package/sdk/application/Configuration/ConfigurationApplicationClient.js +457 -260
  36. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +2235 -110
  37. package/sdk/application/Configuration/ConfigurationApplicationModel.js +1113 -193
  38. package/sdk/application/Configuration/ConfigurationApplicationValidator.d.ts +160 -8
  39. package/sdk/application/Configuration/ConfigurationApplicationValidator.js +88 -4
  40. package/sdk/application/Content/ContentApplicationClient.d.ts +149 -139
  41. package/sdk/application/Content/ContentApplicationClient.js +489 -278
  42. package/sdk/application/Content/ContentApplicationModel.d.ts +1010 -105
  43. package/sdk/application/Content/ContentApplicationModel.js +737 -396
  44. package/sdk/application/Content/ContentApplicationValidator.d.ts +214 -12
  45. package/sdk/application/Content/ContentApplicationValidator.js +113 -3
  46. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +23 -29
  47. package/sdk/application/FileStorage/FileStorageApplicationClient.js +74 -47
  48. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +148 -20
  49. package/sdk/application/FileStorage/FileStorageApplicationModel.js +100 -87
  50. package/sdk/application/FileStorage/FileStorageApplicationValidator.d.ts +55 -5
  51. package/sdk/application/FileStorage/FileStorageApplicationValidator.js +33 -6
  52. package/sdk/application/Lead/LeadApplicationClient.d.ts +57 -53
  53. package/sdk/application/Lead/LeadApplicationClient.js +188 -103
  54. package/sdk/application/Lead/LeadApplicationModel.d.ts +686 -54
  55. package/sdk/application/Lead/LeadApplicationModel.js +330 -244
  56. package/sdk/application/Lead/LeadApplicationValidator.d.ts +91 -9
  57. package/sdk/application/Lead/LeadApplicationValidator.js +51 -6
  58. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +40 -33
  59. package/sdk/application/Logistic/LogisticApplicationClient.js +131 -73
  60. package/sdk/application/Logistic/LogisticApplicationModel.d.ts +399 -28
  61. package/sdk/application/Logistic/LogisticApplicationModel.js +293 -24
  62. package/sdk/application/Logistic/LogisticApplicationValidator.d.ts +48 -6
  63. package/sdk/application/Logistic/LogisticApplicationValidator.js +34 -6
  64. package/sdk/application/Order/OrderApplicationClient.d.ts +93 -133
  65. package/sdk/application/Order/OrderApplicationClient.js +329 -217
  66. package/sdk/application/Order/OrderApplicationModel.d.ts +1101 -66
  67. package/sdk/application/Order/OrderApplicationModel.js +776 -57
  68. package/sdk/application/Order/OrderApplicationValidator.d.ts +249 -14
  69. package/sdk/application/Order/OrderApplicationValidator.js +114 -5
  70. package/sdk/application/Payment/PaymentApplicationClient.d.ts +400 -366
  71. package/sdk/application/Payment/PaymentApplicationClient.js +1176 -703
  72. package/sdk/application/Payment/PaymentApplicationModel.d.ts +3125 -99
  73. package/sdk/application/Payment/PaymentApplicationModel.js +1158 -62
  74. package/sdk/application/Payment/PaymentApplicationValidator.d.ts +494 -41
  75. package/sdk/application/Payment/PaymentApplicationValidator.js +297 -25
  76. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +205 -350
  77. package/sdk/application/PosCart/PosCartApplicationClient.js +720 -491
  78. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +1823 -89
  79. package/sdk/application/PosCart/PosCartApplicationModel.js +1117 -85
  80. package/sdk/application/PosCart/PosCartApplicationValidator.d.ts +480 -29
  81. package/sdk/application/PosCart/PosCartApplicationValidator.js +262 -15
  82. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +58 -47
  83. package/sdk/application/Rewards/RewardsApplicationClient.js +187 -102
  84. package/sdk/application/Rewards/RewardsApplicationModel.d.ts +343 -22
  85. package/sdk/application/Rewards/RewardsApplicationModel.js +230 -15
  86. package/sdk/application/Rewards/RewardsApplicationValidator.d.ts +70 -7
  87. package/sdk/application/Rewards/RewardsApplicationValidator.js +45 -6
  88. package/sdk/application/Share/ShareApplicationClient.d.ts +52 -50
  89. package/sdk/application/Share/ShareApplicationClient.js +185 -97
  90. package/sdk/application/Share/ShareApplicationModel.d.ts +198 -15
  91. package/sdk/application/Share/ShareApplicationModel.js +131 -31
  92. package/sdk/application/Share/ShareApplicationValidator.d.ts +86 -8
  93. package/sdk/application/Share/ShareApplicationValidator.js +48 -4
  94. package/sdk/application/Theme/ThemeApplicationClient.d.ts +30 -27
  95. package/sdk/application/Theme/ThemeApplicationClient.js +102 -56
  96. package/sdk/application/Theme/ThemeApplicationModel.d.ts +1291 -48
  97. package/sdk/application/Theme/ThemeApplicationModel.js +895 -134
  98. package/sdk/application/Theme/ThemeApplicationValidator.d.ts +49 -5
  99. package/sdk/application/Theme/ThemeApplicationValidator.js +26 -3
  100. package/sdk/application/User/UserApplicationClient.d.ts +260 -305
  101. package/sdk/application/User/UserApplicationClient.js +910 -522
  102. package/sdk/application/User/UserApplicationModel.d.ts +992 -101
  103. package/sdk/application/User/UserApplicationModel.js +699 -248
  104. package/sdk/application/User/UserApplicationValidator.d.ts +457 -33
  105. package/sdk/application/User/UserApplicationValidator.js +265 -31
  106. package/sdk/common/AxiosHelper.js +7 -2
  107. package/sdk/common/FDKError.d.ts +3 -0
  108. package/sdk/common/FDKError.js +8 -0
  109. package/sdk/common/Paginator.d.ts +27 -12
  110. package/sdk/common/Paginator.js +15 -0
  111. package/sdk/common/RequestSigner.js +0 -1
  112. package/sdk/common/utils.d.ts +3 -0
  113. package/sdk/common/utils.js +29 -0
  114. package/sdk/partner/PartnerAPIClient.d.ts +16 -1
  115. package/sdk/partner/PartnerAPIClient.js +12 -2
  116. package/sdk/partner/PartnerClient.d.ts +22 -3
  117. package/sdk/partner/PartnerClient.js +20 -0
  118. package/sdk/partner/PartnerConfig.d.ts +40 -14
  119. package/sdk/partner/PartnerConfig.js +31 -6
  120. package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
  121. package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
  122. package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
  123. package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
  124. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
  125. package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
  126. package/sdk/partner/index.d.ts +3 -1
  127. package/sdk/partner/index.js +3 -1
  128. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +30 -25
  129. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +104 -53
  130. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +190 -17
  131. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +132 -15
  132. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +52 -5
  133. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +30 -4
  134. package/sdk/platform/Billing/BillingPlatformClient.d.ts +133 -97
  135. package/sdk/platform/Billing/BillingPlatformClient.js +561 -191
  136. package/sdk/platform/Billing/BillingPlatformModel.d.ts +1071 -68
  137. package/sdk/platform/Billing/BillingPlatformModel.js +762 -151
  138. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +175 -12
  139. package/sdk/platform/Billing/BillingPlatformValidator.js +118 -8
  140. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +454 -635
  141. package/sdk/platform/Cart/CartPlatformApplicationClient.js +1646 -957
  142. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +827 -57
  143. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +492 -34
  144. package/sdk/platform/Cart/CartPlatformModel.d.ts +3839 -175
  145. package/sdk/platform/Cart/CartPlatformModel.js +2423 -217
  146. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +528 -638
  147. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1600 -984
  148. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +1081 -49
  149. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +482 -23
  150. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +652 -826
  151. package/sdk/platform/Catalog/CatalogPlatformClient.js +1979 -1264
  152. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +6869 -326
  153. package/sdk/platform/Catalog/CatalogPlatformModel.js +4215 -351
  154. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +1361 -71
  155. package/sdk/platform/Catalog/CatalogPlatformValidator.js +624 -30
  156. package/sdk/platform/Common/CommonPlatformClient.d.ts +16 -21
  157. package/sdk/platform/Common/CommonPlatformClient.js +50 -33
  158. package/sdk/platform/Common/CommonPlatformModel.d.ts +423 -19
  159. package/sdk/platform/Common/CommonPlatformModel.js +214 -40
  160. package/sdk/platform/Common/CommonPlatformValidator.d.ts +37 -4
  161. package/sdk/platform/Common/CommonPlatformValidator.js +20 -3
  162. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +731 -303
  163. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +3095 -785
  164. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +699 -41
  165. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +463 -27
  166. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +19 -5
  167. package/sdk/platform/Communication/CommunicationPlatformClient.js +59 -19
  168. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +1708 -102
  169. package/sdk/platform/Communication/CommunicationPlatformModel.js +1360 -235
  170. package/sdk/platform/Communication/CommunicationPlatformValidator.d.ts +16 -3
  171. package/sdk/platform/Communication/CommunicationPlatformValidator.js +11 -3
  172. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +127 -111
  173. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +435 -225
  174. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +882 -43
  175. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +666 -78
  176. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +184 -13
  177. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +105 -10
  178. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +327 -240
  179. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +922 -438
  180. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +297 -22
  181. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +191 -17
  182. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +184 -178
  183. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +555 -311
  184. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +4337 -188
  185. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +2178 -248
  186. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +332 -19
  187. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +153 -10
  188. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +605 -578
  189. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1996 -987
  190. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +872 -62
  191. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +487 -35
  192. package/sdk/platform/Content/ContentPlatformModel.d.ts +1472 -108
  193. package/sdk/platform/Content/ContentPlatformModel.js +1085 -204
  194. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +85 -82
  195. package/sdk/platform/Discount/DiscountPlatformClient.js +333 -175
  196. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +281 -15
  197. package/sdk/platform/Discount/DiscountPlatformModel.js +189 -10
  198. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +185 -13
  199. package/sdk/platform/Discount/DiscountPlatformValidator.js +88 -8
  200. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +109 -52
  201. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +570 -105
  202. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +141 -6
  203. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +118 -7
  204. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +43 -63
  205. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +153 -135
  206. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +426 -20
  207. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +379 -40
  208. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +106 -8
  209. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +60 -8
  210. package/sdk/platform/Finance/FinancePlatformClient.d.ts +260 -129
  211. package/sdk/platform/Finance/FinancePlatformClient.js +1182 -194
  212. package/sdk/platform/Finance/FinancePlatformModel.d.ts +1267 -50
  213. package/sdk/platform/Finance/FinancePlatformModel.js +1252 -38
  214. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +233 -15
  215. package/sdk/platform/Finance/FinancePlatformValidator.js +229 -16
  216. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +111 -97
  217. package/sdk/platform/Inventory/InventoryPlatformClient.js +330 -199
  218. package/sdk/platform/Inventory/InventoryPlatformModel.d.ts +1354 -61
  219. package/sdk/platform/Inventory/InventoryPlatformModel.js +916 -83
  220. package/sdk/platform/Inventory/InventoryPlatformValidator.d.ts +168 -12
  221. package/sdk/platform/Inventory/InventoryPlatformValidator.js +82 -6
  222. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +100 -106
  223. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +372 -186
  224. package/sdk/platform/Lead/LeadPlatformApplicationValidator.d.ts +180 -14
  225. package/sdk/platform/Lead/LeadPlatformApplicationValidator.js +94 -9
  226. package/sdk/platform/Lead/LeadPlatformClient.d.ts +89 -104
  227. package/sdk/platform/Lead/LeadPlatformClient.js +305 -180
  228. package/sdk/platform/Lead/LeadPlatformModel.d.ts +1045 -54
  229. package/sdk/platform/Lead/LeadPlatformModel.js +504 -142
  230. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +173 -12
  231. package/sdk/platform/Lead/LeadPlatformValidator.js +92 -15
  232. package/sdk/platform/OAuthClient.js +6 -2
  233. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +20 -14
  234. package/sdk/platform/Order/OrderPlatformApplicationClient.js +58 -29
  235. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +26 -4
  236. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +16 -3
  237. package/sdk/platform/Order/OrderPlatformClient.d.ts +437 -556
  238. package/sdk/platform/Order/OrderPlatformClient.js +1500 -760
  239. package/sdk/platform/Order/OrderPlatformModel.d.ts +5225 -247
  240. package/sdk/platform/Order/OrderPlatformModel.js +3473 -260
  241. package/sdk/platform/Order/OrderPlatformValidator.d.ts +859 -37
  242. package/sdk/platform/Order/OrderPlatformValidator.js +435 -23
  243. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +16 -42
  244. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +52 -155
  245. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +37 -6
  246. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +19 -17
  247. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +78 -45
  248. package/sdk/platform/Partner/PartnerPlatformModel.js +43 -369
  249. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +418 -288
  250. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +1509 -505
  251. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +438 -30
  252. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +312 -19
  253. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +83 -73
  254. package/sdk/platform/Payment/PaymentPlatformClient.js +259 -154
  255. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +3200 -93
  256. package/sdk/platform/Payment/PaymentPlatformModel.js +1334 -36
  257. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +111 -11
  258. package/sdk/platform/Payment/PaymentPlatformValidator.js +68 -7
  259. package/sdk/platform/PlatformAPIClient.d.ts +16 -1
  260. package/sdk/platform/PlatformAPIClient.js +9 -1
  261. package/sdk/platform/PlatformApplicationClient.d.ts +22 -1798
  262. package/sdk/platform/PlatformApplicationClient.js +17 -1899
  263. package/sdk/platform/PlatformClient.d.ts +31 -12581
  264. package/sdk/platform/PlatformClient.js +30 -15089
  265. package/sdk/platform/PlatformConfig.d.ts +37 -11
  266. package/sdk/platform/PlatformConfig.js +32 -6
  267. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +96 -92
  268. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +344 -177
  269. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +149 -12
  270. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +82 -8
  271. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +360 -23
  272. package/sdk/platform/Rewards/RewardsPlatformModel.js +238 -22
  273. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +159 -92
  274. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +473 -208
  275. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +138 -13
  276. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +100 -14
  277. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +166 -178
  278. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +518 -329
  279. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +1408 -96
  280. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +1034 -71
  281. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +280 -18
  282. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +134 -11
  283. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +41 -66
  284. package/sdk/platform/Share/SharePlatformApplicationClient.js +149 -116
  285. package/sdk/platform/Share/SharePlatformApplicationValidator.d.ts +87 -7
  286. package/sdk/platform/Share/SharePlatformApplicationValidator.js +42 -5
  287. package/sdk/platform/Share/SharePlatformModel.d.ts +250 -16
  288. package/sdk/platform/Share/SharePlatformModel.js +167 -19
  289. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +229 -193
  290. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +976 -352
  291. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +345 -24
  292. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +206 -14
  293. package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
  294. package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
  295. package/sdk/platform/Theme/ThemePlatformModel.d.ts +1527 -48
  296. package/sdk/platform/Theme/ThemePlatformModel.js +1099 -118
  297. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
  298. package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
  299. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +138 -152
  300. package/sdk/platform/User/UserPlatformApplicationClient.js +470 -244
  301. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +242 -18
  302. package/sdk/platform/User/UserPlatformApplicationValidator.js +129 -12
  303. package/sdk/platform/User/UserPlatformModel.d.ts +653 -101
  304. package/sdk/platform/User/UserPlatformModel.js +467 -424
  305. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +153 -49
  306. package/sdk/platform/Webhook/WebhookPlatformClient.js +896 -88
  307. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +632 -16
  308. package/sdk/platform/Webhook/WebhookPlatformModel.js +502 -54
  309. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +170 -7
  310. package/sdk/platform/Webhook/WebhookPlatformValidator.js +157 -7
  311. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +16 -21
  312. package/sdk/public/Configuration/ConfigurationPublicClient.js +48 -33
  313. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +370 -19
  314. package/sdk/public/Configuration/ConfigurationPublicModel.js +191 -40
  315. package/sdk/public/Configuration/ConfigurationPublicValidator.d.ts +42 -4
  316. package/sdk/public/Configuration/ConfigurationPublicValidator.js +21 -3
  317. package/sdk/public/Inventory/InventoryPublicClient.d.ts +54 -48
  318. package/sdk/public/Inventory/InventoryPublicClient.js +161 -98
  319. package/sdk/public/Inventory/InventoryPublicModel.d.ts +392 -21
  320. package/sdk/public/Inventory/InventoryPublicModel.js +267 -27
  321. package/sdk/public/Inventory/InventoryPublicValidator.d.ts +90 -8
  322. package/sdk/public/Inventory/InventoryPublicValidator.js +44 -4
  323. package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
  324. package/sdk/public/Partner/PartnerPublicClient.js +110 -0
  325. package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
  326. package/sdk/public/Partner/PartnerPublicModel.js +280 -0
  327. package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
  328. package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
  329. package/sdk/public/PublicAPIClient.d.ts +14 -1
  330. package/sdk/public/PublicAPIClient.js +7 -1
  331. package/sdk/public/PublicClient.d.ts +21 -3
  332. package/sdk/public/PublicClient.js +20 -0
  333. package/sdk/public/PublicConfig.d.ts +27 -6
  334. package/sdk/public/PublicConfig.js +17 -1
  335. package/sdk/public/Webhook/WebhookPublicClient.d.ts +16 -11
  336. package/sdk/public/Webhook/WebhookPublicClient.js +48 -27
  337. package/sdk/public/Webhook/WebhookPublicModel.d.ts +52 -16
  338. package/sdk/public/Webhook/WebhookPublicModel.js +33 -113
  339. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +18 -3
  340. package/sdk/public/Webhook/WebhookPublicValidator.js +14 -4
  341. package/sdk/public/index.d.ts +1 -0
  342. package/sdk/public/index.js +2 -0
  343. package/sdk/application/ApplicationModels.d.ts +0 -3
  344. package/sdk/application/ApplicationModels.js +0 -20
  345. package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -145
  346. package/sdk/platform/Partner/PartnerPlatformClient.js +0 -799
  347. package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -14
  348. package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -87
@@ -1,8 +1,8 @@
1
1
  const PlatformAPIClient = require("../PlatformAPIClient");
2
2
  const { FDKClientValidationError } = require("../../common/FDKError");
3
3
  const Paginator = require("../../common/Paginator");
4
- const FinanceValidator = require("./FinancePlatformValidator");
5
- const FinanceModel = require("./FinancePlatformModel");
4
+ const FinancePlatformValidator = require("./FinancePlatformValidator");
5
+ const FinancePlatformModel = require("./FinancePlatformModel");
6
6
  const { Logger } = require("./../../common/Logger");
7
7
  const Joi = require("joi");
8
8
 
@@ -12,14 +12,640 @@ class Finance {
12
12
  }
13
13
 
14
14
  /**
15
- * @param {Object} arg - Arg object.
16
- * @param {CreditlineDataPlatformRequest} arg.body
17
- * @returns {Promise<CreditlineDataPlatformResponse>} - Success response
18
- * @summary:
19
- * @description:
15
+ * @param {FinancePlatformValidator.ChannelDisplayNameParam} arg - Arg object
16
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
17
+ * @param {import("../PlatformAPIClient").Options} - Options
18
+ * @returns {Promise<FinancePlatformModel.ChannelDisplayNameResponse>} -
19
+ * Success response
20
+ * @name channelDisplayName
21
+ * @summary: Provide channel display name dict.
22
+ * @description: Provide channel display name dict. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/channelDisplayName/).
20
23
  */
21
- async creditlineDataplatform({ body } = {}) {
22
- const { error } = FinanceValidator.creditlineDataplatform().validate(
24
+ async channelDisplayName(
25
+ { filterKey, requestHeaders } = { requestHeaders: {} },
26
+ { responseHeaders } = { responseHeaders: false }
27
+ ) {
28
+ const { error } = FinancePlatformValidator.channelDisplayName().validate(
29
+ {
30
+ filterKey,
31
+ },
32
+ { abortEarly: false, allowUnknown: true }
33
+ );
34
+ if (error) {
35
+ return Promise.reject(new FDKClientValidationError(error));
36
+ }
37
+
38
+ // Showing warrnings if extra unknown parameters are found
39
+ const {
40
+ error: warrning,
41
+ } = FinancePlatformValidator.channelDisplayName().validate(
42
+ {
43
+ filterKey,
44
+ },
45
+ { abortEarly: false, allowUnknown: false }
46
+ );
47
+ if (warrning) {
48
+ Logger({
49
+ level: "WARN",
50
+ message: `Parameter Validation warrnings for platform > Finance > channelDisplayName \n ${warrning}`,
51
+ });
52
+ }
53
+
54
+ const query_params = {};
55
+ query_params["filter_key"] = filterKey;
56
+
57
+ const xHeaders = {};
58
+
59
+ const response = await PlatformAPIClient.execute(
60
+ this.config,
61
+ "get",
62
+ `/service/platform/finance/v1.0/company/${this.config.companyId}/channel-display-names`,
63
+ query_params,
64
+ undefined,
65
+ { ...xHeaders, ...requestHeaders },
66
+ { responseHeaders }
67
+ );
68
+
69
+ let responseData = response;
70
+ if (responseHeaders) {
71
+ responseData = response[0];
72
+ }
73
+
74
+ const {
75
+ error: res_error,
76
+ } = FinancePlatformModel.ChannelDisplayNameResponse().validate(
77
+ responseData,
78
+ { abortEarly: false, allowUnknown: false }
79
+ );
80
+
81
+ if (res_error) {
82
+ Logger({
83
+ level: "WARN",
84
+ message: `Response Validation Warnnings for platform > Finance > channelDisplayName \n ${res_error}`,
85
+ });
86
+ }
87
+
88
+ return response;
89
+ }
90
+
91
+ /**
92
+ * @param {FinancePlatformValidator.CreateSellerCreditNoteConfigParam} arg
93
+ * - Arg object
94
+ *
95
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
96
+ * @param {import("../PlatformAPIClient").Options} - Options
97
+ * @returns {Promise<FinancePlatformModel.CreateSellerCreditNoteConfigResponse>}
98
+ * - Success response
99
+ *
100
+ * @name createSellerCreditNoteConfig
101
+ * @summary: Creates credit note config.
102
+ * @description: Creates credit note config. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/createSellerCreditNoteConfig/).
103
+ */
104
+ async createSellerCreditNoteConfig(
105
+ { body, requestHeaders } = { requestHeaders: {} },
106
+ { responseHeaders } = { responseHeaders: false }
107
+ ) {
108
+ const {
109
+ error,
110
+ } = FinancePlatformValidator.createSellerCreditNoteConfig().validate(
111
+ {
112
+ body,
113
+ },
114
+ { abortEarly: false, allowUnknown: true }
115
+ );
116
+ if (error) {
117
+ return Promise.reject(new FDKClientValidationError(error));
118
+ }
119
+
120
+ // Showing warrnings if extra unknown parameters are found
121
+ const {
122
+ error: warrning,
123
+ } = FinancePlatformValidator.createSellerCreditNoteConfig().validate(
124
+ {
125
+ body,
126
+ },
127
+ { abortEarly: false, allowUnknown: false }
128
+ );
129
+ if (warrning) {
130
+ Logger({
131
+ level: "WARN",
132
+ message: `Parameter Validation warrnings for platform > Finance > createSellerCreditNoteConfig \n ${warrning}`,
133
+ });
134
+ }
135
+
136
+ const query_params = {};
137
+
138
+ const xHeaders = {};
139
+
140
+ const response = await PlatformAPIClient.execute(
141
+ this.config,
142
+ "post",
143
+ `/service/platform/finance/v1.0/company/${this.config.companyId}/create-update-credit-note-config`,
144
+ query_params,
145
+ body,
146
+ { ...xHeaders, ...requestHeaders },
147
+ { responseHeaders }
148
+ );
149
+
150
+ let responseData = response;
151
+ if (responseHeaders) {
152
+ responseData = response[0];
153
+ }
154
+
155
+ const {
156
+ error: res_error,
157
+ } = FinancePlatformModel.CreateSellerCreditNoteConfigResponse().validate(
158
+ responseData,
159
+ { abortEarly: false, allowUnknown: false }
160
+ );
161
+
162
+ if (res_error) {
163
+ Logger({
164
+ level: "WARN",
165
+ message: `Response Validation Warnnings for platform > Finance > createSellerCreditNoteConfig \n ${res_error}`,
166
+ });
167
+ }
168
+
169
+ return response;
170
+ }
171
+
172
+ /**
173
+ * @param {FinancePlatformValidator.CreditNoteDetailsParam} arg - Arg object
174
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
175
+ * @param {import("../PlatformAPIClient").Options} - Options
176
+ * @returns {Promise<FinancePlatformModel.CreditNoteDetailsResponse>} -
177
+ * Success response
178
+ * @name creditNoteDetails
179
+ * @summary: Gives credit note details.
180
+ * @description: Gives credit note details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/creditNoteDetails/).
181
+ */
182
+ async creditNoteDetails(
183
+ { body, requestHeaders } = { requestHeaders: {} },
184
+ { responseHeaders } = { responseHeaders: false }
185
+ ) {
186
+ const { error } = FinancePlatformValidator.creditNoteDetails().validate(
187
+ {
188
+ body,
189
+ },
190
+ { abortEarly: false, allowUnknown: true }
191
+ );
192
+ if (error) {
193
+ return Promise.reject(new FDKClientValidationError(error));
194
+ }
195
+
196
+ // Showing warrnings if extra unknown parameters are found
197
+ const {
198
+ error: warrning,
199
+ } = FinancePlatformValidator.creditNoteDetails().validate(
200
+ {
201
+ body,
202
+ },
203
+ { abortEarly: false, allowUnknown: false }
204
+ );
205
+ if (warrning) {
206
+ Logger({
207
+ level: "WARN",
208
+ message: `Parameter Validation warrnings for platform > Finance > creditNoteDetails \n ${warrning}`,
209
+ });
210
+ }
211
+
212
+ const query_params = {};
213
+
214
+ const xHeaders = {};
215
+
216
+ const response = await PlatformAPIClient.execute(
217
+ this.config,
218
+ "post",
219
+ `/service/platform/finance/v1.0/company/${this.config.companyId}/credit-note-details`,
220
+ query_params,
221
+ body,
222
+ { ...xHeaders, ...requestHeaders },
223
+ { responseHeaders }
224
+ );
225
+
226
+ let responseData = response;
227
+ if (responseHeaders) {
228
+ responseData = response[0];
229
+ }
230
+
231
+ const {
232
+ error: res_error,
233
+ } = FinancePlatformModel.CreditNoteDetailsResponse().validate(
234
+ responseData,
235
+ { abortEarly: false, allowUnknown: false }
236
+ );
237
+
238
+ if (res_error) {
239
+ Logger({
240
+ level: "WARN",
241
+ message: `Response Validation Warnnings for platform > Finance > creditNoteDetails \n ${res_error}`,
242
+ });
243
+ }
244
+
245
+ return response;
246
+ }
247
+
248
+ /**
249
+ * @param {FinancePlatformValidator.CreditlineDataplatformParam} arg - Arg object
250
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
251
+ * @param {import("../PlatformAPIClient").Options} - Options
252
+ * @returns {Promise<FinancePlatformModel.CreditlineDataPlatformResponse>}
253
+ * - Success response
254
+ *
255
+ * @name creditlineDataplatform
256
+ * @summary: Used to fetch creditline data.
257
+ * @description: Used to fetch creditline data. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/creditlineDataplatform/).
258
+ */
259
+ async creditlineDataplatform(
260
+ { body, requestHeaders } = { requestHeaders: {} },
261
+ { responseHeaders } = { responseHeaders: false }
262
+ ) {
263
+ const {
264
+ error,
265
+ } = FinancePlatformValidator.creditlineDataplatform().validate(
266
+ {
267
+ body,
268
+ },
269
+ { abortEarly: false, allowUnknown: true }
270
+ );
271
+ if (error) {
272
+ return Promise.reject(new FDKClientValidationError(error));
273
+ }
274
+
275
+ // Showing warrnings if extra unknown parameters are found
276
+ const {
277
+ error: warrning,
278
+ } = FinancePlatformValidator.creditlineDataplatform().validate(
279
+ {
280
+ body,
281
+ },
282
+ { abortEarly: false, allowUnknown: false }
283
+ );
284
+ if (warrning) {
285
+ Logger({
286
+ level: "WARN",
287
+ message: `Parameter Validation warrnings for platform > Finance > creditlineDataplatform \n ${warrning}`,
288
+ });
289
+ }
290
+
291
+ const query_params = {};
292
+
293
+ const xHeaders = {};
294
+
295
+ const response = await PlatformAPIClient.execute(
296
+ this.config,
297
+ "post",
298
+ `/service/platform/finance/v1.0/company/${this.config.companyId}/credit-line-data`,
299
+ query_params,
300
+ body,
301
+ { ...xHeaders, ...requestHeaders },
302
+ { responseHeaders }
303
+ );
304
+
305
+ let responseData = response;
306
+ if (responseHeaders) {
307
+ responseData = response[0];
308
+ }
309
+
310
+ const {
311
+ error: res_error,
312
+ } = FinancePlatformModel.CreditlineDataPlatformResponse().validate(
313
+ responseData,
314
+ { abortEarly: false, allowUnknown: false }
315
+ );
316
+
317
+ if (res_error) {
318
+ Logger({
319
+ level: "WARN",
320
+ message: `Response Validation Warnnings for platform > Finance > creditlineDataplatform \n ${res_error}`,
321
+ });
322
+ }
323
+
324
+ return response;
325
+ }
326
+
327
+ /**
328
+ * @param {FinancePlatformValidator.DeleteConfigParam} arg - Arg object
329
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
330
+ * @param {import("../PlatformAPIClient").Options} - Options
331
+ * @returns {Promise<FinancePlatformModel.DeleteConfigResponse>} - Success response
332
+ * @name deleteConfig
333
+ * @summary: Deletes credit note config.
334
+ * @description: Deletes credit note config. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/deleteConfig/).
335
+ */
336
+ async deleteConfig(
337
+ { body, requestHeaders } = { requestHeaders: {} },
338
+ { responseHeaders } = { responseHeaders: false }
339
+ ) {
340
+ const { error } = FinancePlatformValidator.deleteConfig().validate(
341
+ {
342
+ body,
343
+ },
344
+ { abortEarly: false, allowUnknown: true }
345
+ );
346
+ if (error) {
347
+ return Promise.reject(new FDKClientValidationError(error));
348
+ }
349
+
350
+ // Showing warrnings if extra unknown parameters are found
351
+ const {
352
+ error: warrning,
353
+ } = FinancePlatformValidator.deleteConfig().validate(
354
+ {
355
+ body,
356
+ },
357
+ { abortEarly: false, allowUnknown: false }
358
+ );
359
+ if (warrning) {
360
+ Logger({
361
+ level: "WARN",
362
+ message: `Parameter Validation warrnings for platform > Finance > deleteConfig \n ${warrning}`,
363
+ });
364
+ }
365
+
366
+ const query_params = {};
367
+
368
+ const xHeaders = {};
369
+
370
+ const response = await PlatformAPIClient.execute(
371
+ this.config,
372
+ "post",
373
+ `/service/platform/finance/v1.0/company/${this.config.companyId}/delete-seller-config`,
374
+ query_params,
375
+ body,
376
+ { ...xHeaders, ...requestHeaders },
377
+ { responseHeaders }
378
+ );
379
+
380
+ let responseData = response;
381
+ if (responseHeaders) {
382
+ responseData = response[0];
383
+ }
384
+
385
+ const {
386
+ error: res_error,
387
+ } = FinancePlatformModel.DeleteConfigResponse().validate(responseData, {
388
+ abortEarly: false,
389
+ allowUnknown: false,
390
+ });
391
+
392
+ if (res_error) {
393
+ Logger({
394
+ level: "WARN",
395
+ message: `Response Validation Warnnings for platform > Finance > deleteConfig \n ${res_error}`,
396
+ });
397
+ }
398
+
399
+ return response;
400
+ }
401
+
402
+ /**
403
+ * @param {FinancePlatformValidator.DownloadCreditDebitNoteParam} arg - Arg object
404
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
405
+ * @param {import("../PlatformAPIClient").Options} - Options
406
+ * @returns {Promise<FinancePlatformModel.DownloadCreditDebitNoteResponse>}
407
+ * - Success response
408
+ *
409
+ * @name downloadCreditDebitNote
410
+ * @summary: Download credit debit note pdf.
411
+ * @description: Download credit debit note pdf. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/downloadCreditDebitNote/).
412
+ */
413
+ async downloadCreditDebitNote(
414
+ { body, requestHeaders } = { requestHeaders: {} },
415
+ { responseHeaders } = { responseHeaders: false }
416
+ ) {
417
+ const {
418
+ error,
419
+ } = FinancePlatformValidator.downloadCreditDebitNote().validate(
420
+ {
421
+ body,
422
+ },
423
+ { abortEarly: false, allowUnknown: true }
424
+ );
425
+ if (error) {
426
+ return Promise.reject(new FDKClientValidationError(error));
427
+ }
428
+
429
+ // Showing warrnings if extra unknown parameters are found
430
+ const {
431
+ error: warrning,
432
+ } = FinancePlatformValidator.downloadCreditDebitNote().validate(
433
+ {
434
+ body,
435
+ },
436
+ { abortEarly: false, allowUnknown: false }
437
+ );
438
+ if (warrning) {
439
+ Logger({
440
+ level: "WARN",
441
+ message: `Parameter Validation warrnings for platform > Finance > downloadCreditDebitNote \n ${warrning}`,
442
+ });
443
+ }
444
+
445
+ const query_params = {};
446
+
447
+ const xHeaders = {};
448
+
449
+ const response = await PlatformAPIClient.execute(
450
+ this.config,
451
+ "post",
452
+ `/service/platform/finance/v1.0/company/${this.config.companyId}/download-credit-debit-note`,
453
+ query_params,
454
+ body,
455
+ { ...xHeaders, ...requestHeaders },
456
+ { responseHeaders }
457
+ );
458
+
459
+ let responseData = response;
460
+ if (responseHeaders) {
461
+ responseData = response[0];
462
+ }
463
+
464
+ const {
465
+ error: res_error,
466
+ } = FinancePlatformModel.DownloadCreditDebitNoteResponse().validate(
467
+ responseData,
468
+ { abortEarly: false, allowUnknown: false }
469
+ );
470
+
471
+ if (res_error) {
472
+ Logger({
473
+ level: "WARN",
474
+ message: `Response Validation Warnnings for platform > Finance > downloadCreditDebitNote \n ${res_error}`,
475
+ });
476
+ }
477
+
478
+ return response;
479
+ }
480
+
481
+ /**
482
+ * @param {FinancePlatformValidator.DownloadReportParam} arg - Arg object
483
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
484
+ * @param {import("../PlatformAPIClient").Options} - Options
485
+ * @returns {Promise<FinancePlatformModel.DownloadReportList>} - Success response
486
+ * @name downloadReport
487
+ * @summary: Gives list of all downloaded reports.
488
+ * @description: Gives list of all downloaded reports. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/downloadReport/).
489
+ */
490
+ async downloadReport(
491
+ { body, requestHeaders } = { requestHeaders: {} },
492
+ { responseHeaders } = { responseHeaders: false }
493
+ ) {
494
+ const { error } = FinancePlatformValidator.downloadReport().validate(
495
+ {
496
+ body,
497
+ },
498
+ { abortEarly: false, allowUnknown: true }
499
+ );
500
+ if (error) {
501
+ return Promise.reject(new FDKClientValidationError(error));
502
+ }
503
+
504
+ // Showing warrnings if extra unknown parameters are found
505
+ const {
506
+ error: warrning,
507
+ } = FinancePlatformValidator.downloadReport().validate(
508
+ {
509
+ body,
510
+ },
511
+ { abortEarly: false, allowUnknown: false }
512
+ );
513
+ if (warrning) {
514
+ Logger({
515
+ level: "WARN",
516
+ message: `Parameter Validation warrnings for platform > Finance > downloadReport \n ${warrning}`,
517
+ });
518
+ }
519
+
520
+ const query_params = {};
521
+
522
+ const xHeaders = {};
523
+
524
+ const response = await PlatformAPIClient.execute(
525
+ this.config,
526
+ "post",
527
+ `/service/platform/finance/v1.0/company/${this.config.companyId}/download-report`,
528
+ query_params,
529
+ body,
530
+ { ...xHeaders, ...requestHeaders },
531
+ { responseHeaders }
532
+ );
533
+
534
+ let responseData = response;
535
+ if (responseHeaders) {
536
+ responseData = response[0];
537
+ }
538
+
539
+ const {
540
+ error: res_error,
541
+ } = FinancePlatformModel.DownloadReportList().validate(responseData, {
542
+ abortEarly: false,
543
+ allowUnknown: false,
544
+ });
545
+
546
+ if (res_error) {
547
+ Logger({
548
+ level: "WARN",
549
+ message: `Response Validation Warnnings for platform > Finance > downloadReport \n ${res_error}`,
550
+ });
551
+ }
552
+
553
+ return response;
554
+ }
555
+
556
+ /**
557
+ * @param {FinancePlatformValidator.DownloadReportCustomerCnParam} arg - Arg object
558
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
559
+ * @param {import("../PlatformAPIClient").Options} - Options
560
+ * @returns {Promise<FinancePlatformModel.DownloadReportCustomerCnResponse>}
561
+ * - Success response
562
+ *
563
+ * @name downloadReportCustomerCn
564
+ * @summary: Gives list of downloaded reports.
565
+ * @description: Gives list of downloaded reports. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/downloadReportCustomerCn/).
566
+ */
567
+ async downloadReportCustomerCn(
568
+ { body, requestHeaders } = { requestHeaders: {} },
569
+ { responseHeaders } = { responseHeaders: false }
570
+ ) {
571
+ const {
572
+ error,
573
+ } = FinancePlatformValidator.downloadReportCustomerCn().validate(
574
+ {
575
+ body,
576
+ },
577
+ { abortEarly: false, allowUnknown: true }
578
+ );
579
+ if (error) {
580
+ return Promise.reject(new FDKClientValidationError(error));
581
+ }
582
+
583
+ // Showing warrnings if extra unknown parameters are found
584
+ const {
585
+ error: warrning,
586
+ } = FinancePlatformValidator.downloadReportCustomerCn().validate(
587
+ {
588
+ body,
589
+ },
590
+ { abortEarly: false, allowUnknown: false }
591
+ );
592
+ if (warrning) {
593
+ Logger({
594
+ level: "WARN",
595
+ message: `Parameter Validation warrnings for platform > Finance > downloadReportCustomerCn \n ${warrning}`,
596
+ });
597
+ }
598
+
599
+ const query_params = {};
600
+
601
+ const xHeaders = {};
602
+
603
+ const response = await PlatformAPIClient.execute(
604
+ this.config,
605
+ "post",
606
+ `/service/platform/finance/v1.0/company/${this.config.companyId}/download-report-customer-cn`,
607
+ query_params,
608
+ body,
609
+ { ...xHeaders, ...requestHeaders },
610
+ { responseHeaders }
611
+ );
612
+
613
+ let responseData = response;
614
+ if (responseHeaders) {
615
+ responseData = response[0];
616
+ }
617
+
618
+ const {
619
+ error: res_error,
620
+ } = FinancePlatformModel.DownloadReportCustomerCnResponse().validate(
621
+ responseData,
622
+ { abortEarly: false, allowUnknown: false }
623
+ );
624
+
625
+ if (res_error) {
626
+ Logger({
627
+ level: "WARN",
628
+ message: `Response Validation Warnnings for platform > Finance > downloadReportCustomerCn \n ${res_error}`,
629
+ });
630
+ }
631
+
632
+ return response;
633
+ }
634
+
635
+ /**
636
+ * @param {FinancePlatformValidator.GenerateReportParam} arg - Arg object
637
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
638
+ * @param {import("../PlatformAPIClient").Options} - Options
639
+ * @returns {Promise<FinancePlatformModel.GenerateReportJson>} - Success response
640
+ * @name generateReport
641
+ * @summary: Generate finance reports.
642
+ * @description: Generate finance reports. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/generateReport/).
643
+ */
644
+ async generateReport(
645
+ { body, requestHeaders } = { requestHeaders: {} },
646
+ { responseHeaders } = { responseHeaders: false }
647
+ ) {
648
+ const { error } = FinancePlatformValidator.generateReport().validate(
23
649
  {
24
650
  body,
25
651
  },
@@ -32,7 +658,7 @@ class Finance {
32
658
  // Showing warrnings if extra unknown parameters are found
33
659
  const {
34
660
  error: warrning,
35
- } = FinanceValidator.creditlineDataplatform().validate(
661
+ } = FinancePlatformValidator.generateReport().validate(
36
662
  {
37
663
  body,
38
664
  },
@@ -41,9 +667,8 @@ class Finance {
41
667
  if (warrning) {
42
668
  Logger({
43
669
  level: "WARN",
44
- message: "Parameter Validation warrnings for creditlineDataplatform",
670
+ message: `Parameter Validation warrnings for platform > Finance > generateReport \n ${warrning}`,
45
671
  });
46
- Logger({ level: "WARN", message: warrning });
47
672
  }
48
673
 
49
674
  const query_params = {};
@@ -53,15 +678,21 @@ class Finance {
53
678
  const response = await PlatformAPIClient.execute(
54
679
  this.config,
55
680
  "post",
56
- `/service/platform/finance/v1.0/company/${this.config.companyId}/credit-line-data`,
681
+ `/service/platform/finance/v1.0/company/${this.config.companyId}/generate-report`,
57
682
  query_params,
58
683
  body,
59
- xHeaders
684
+ { ...xHeaders, ...requestHeaders },
685
+ { responseHeaders }
60
686
  );
61
687
 
688
+ let responseData = response;
689
+ if (responseHeaders) {
690
+ responseData = response[0];
691
+ }
692
+
62
693
  const {
63
694
  error: res_error,
64
- } = FinanceModel.CreditlineDataPlatformResponse().validate(response, {
695
+ } = FinancePlatformModel.GenerateReportJson().validate(responseData, {
65
696
  abortEarly: false,
66
697
  allowUnknown: false,
67
698
  });
@@ -69,23 +700,31 @@ class Finance {
69
700
  if (res_error) {
70
701
  Logger({
71
702
  level: "WARN",
72
- message: "Response Validation Warnnings for creditlineDataplatform",
703
+ message: `Response Validation Warnnings for platform > Finance > generateReport \n ${res_error}`,
73
704
  });
74
- Logger({ level: "WARN", message: res_error });
75
705
  }
76
706
 
77
707
  return response;
78
708
  }
79
709
 
80
710
  /**
81
- * @param {Object} arg - Arg object.
82
- * @param {DownloadCreditDebitNoteRequest} arg.body
83
- * @returns {Promise<DownloadCreditDebitNoteResponse>} - Success response
84
- * @summary:
85
- * @description:
711
+ * @param {FinancePlatformValidator.GenerateReportCustomerCnParam} arg - Arg object
712
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
713
+ * @param {import("../PlatformAPIClient").Options} - Options
714
+ * @returns {Promise<FinancePlatformModel.GenerateReportCustomerCnResponse>}
715
+ * - Success response
716
+ *
717
+ * @name generateReportCustomerCn
718
+ * @summary: Generate Credit Note report and gives Note details.
719
+ * @description: Generate Credit Note report and gives Note details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/generateReportCustomerCn/).
86
720
  */
87
- async downloadCreditDebitNote({ body } = {}) {
88
- const { error } = FinanceValidator.downloadCreditDebitNote().validate(
721
+ async generateReportCustomerCn(
722
+ { body, requestHeaders } = { requestHeaders: {} },
723
+ { responseHeaders } = { responseHeaders: false }
724
+ ) {
725
+ const {
726
+ error,
727
+ } = FinancePlatformValidator.generateReportCustomerCn().validate(
89
728
  {
90
729
  body,
91
730
  },
@@ -98,7 +737,7 @@ class Finance {
98
737
  // Showing warrnings if extra unknown parameters are found
99
738
  const {
100
739
  error: warrning,
101
- } = FinanceValidator.downloadCreditDebitNote().validate(
740
+ } = FinancePlatformValidator.generateReportCustomerCn().validate(
102
741
  {
103
742
  body,
104
743
  },
@@ -107,9 +746,8 @@ class Finance {
107
746
  if (warrning) {
108
747
  Logger({
109
748
  level: "WARN",
110
- message: "Parameter Validation warrnings for downloadCreditDebitNote",
749
+ message: `Parameter Validation warrnings for platform > Finance > generateReportCustomerCn \n ${warrning}`,
111
750
  });
112
- Logger({ level: "WARN", message: warrning });
113
751
  }
114
752
 
115
753
  const query_params = {};
@@ -119,39 +757,49 @@ class Finance {
119
757
  const response = await PlatformAPIClient.execute(
120
758
  this.config,
121
759
  "post",
122
- `/service/platform/finance/v1.0/company/${this.config.companyId}/download-credit-debit-note`,
760
+ `/service/platform/finance/v1.0/company/${this.config.companyId}/generate-report-customer-cn`,
123
761
  query_params,
124
762
  body,
125
- xHeaders
763
+ { ...xHeaders, ...requestHeaders },
764
+ { responseHeaders }
126
765
  );
127
766
 
767
+ let responseData = response;
768
+ if (responseHeaders) {
769
+ responseData = response[0];
770
+ }
771
+
128
772
  const {
129
773
  error: res_error,
130
- } = FinanceModel.DownloadCreditDebitNoteResponse().validate(response, {
131
- abortEarly: false,
132
- allowUnknown: false,
133
- });
774
+ } = FinancePlatformModel.GenerateReportCustomerCnResponse().validate(
775
+ responseData,
776
+ { abortEarly: false, allowUnknown: false }
777
+ );
134
778
 
135
779
  if (res_error) {
136
780
  Logger({
137
781
  level: "WARN",
138
- message: "Response Validation Warnnings for downloadCreditDebitNote",
782
+ message: `Response Validation Warnnings for platform > Finance > generateReportCustomerCn \n ${res_error}`,
139
783
  });
140
- Logger({ level: "WARN", message: res_error });
141
784
  }
142
785
 
143
786
  return response;
144
787
  }
145
788
 
146
789
  /**
147
- * @param {Object} arg - Arg object.
148
- * @param {DownloadReport} arg.body
149
- * @returns {Promise<DownloadReportList>} - Success response
150
- * @summary:
151
- * @description:
790
+ * @param {FinancePlatformValidator.GetAffiliateParam} arg - Arg object
791
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
792
+ * @param {import("../PlatformAPIClient").Options} - Options
793
+ * @returns {Promise<FinancePlatformModel.GetAffiliateResponse>} - Success response
794
+ * @name getAffiliate
795
+ * @summary: Gives list of affiliates for company.
796
+ * @description: Gives list of affiliates for company. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/getAffiliate/).
152
797
  */
153
- async downloadReport({ body } = {}) {
154
- const { error } = FinanceValidator.downloadReport().validate(
798
+ async getAffiliate(
799
+ { body, requestHeaders } = { requestHeaders: {} },
800
+ { responseHeaders } = { responseHeaders: false }
801
+ ) {
802
+ const { error } = FinancePlatformValidator.getAffiliate().validate(
155
803
  {
156
804
  body,
157
805
  },
@@ -162,7 +810,9 @@ class Finance {
162
810
  }
163
811
 
164
812
  // Showing warrnings if extra unknown parameters are found
165
- const { error: warrning } = FinanceValidator.downloadReport().validate(
813
+ const {
814
+ error: warrning,
815
+ } = FinancePlatformValidator.getAffiliate().validate(
166
816
  {
167
817
  body,
168
818
  },
@@ -171,9 +821,8 @@ class Finance {
171
821
  if (warrning) {
172
822
  Logger({
173
823
  level: "WARN",
174
- message: "Parameter Validation warrnings for downloadReport",
824
+ message: `Parameter Validation warrnings for platform > Finance > getAffiliate \n ${warrning}`,
175
825
  });
176
- Logger({ level: "WARN", message: warrning });
177
826
  }
178
827
 
179
828
  const query_params = {};
@@ -183,15 +832,21 @@ class Finance {
183
832
  const response = await PlatformAPIClient.execute(
184
833
  this.config,
185
834
  "post",
186
- `/service/platform/finance/v1.0/company/${this.config.companyId}/download-report`,
835
+ `/service/platform/finance/v1.0/company/${this.config.companyId}/get-affiliate-list`,
187
836
  query_params,
188
837
  body,
189
- xHeaders
838
+ { ...xHeaders, ...requestHeaders },
839
+ { responseHeaders }
190
840
  );
191
841
 
842
+ let responseData = response;
843
+ if (responseHeaders) {
844
+ responseData = response[0];
845
+ }
846
+
192
847
  const {
193
848
  error: res_error,
194
- } = FinanceModel.DownloadReportList().validate(response, {
849
+ } = FinancePlatformModel.GetAffiliateResponse().validate(responseData, {
195
850
  abortEarly: false,
196
851
  allowUnknown: false,
197
852
  });
@@ -199,23 +854,27 @@ class Finance {
199
854
  if (res_error) {
200
855
  Logger({
201
856
  level: "WARN",
202
- message: "Response Validation Warnnings for downloadReport",
857
+ message: `Response Validation Warnnings for platform > Finance > getAffiliate \n ${res_error}`,
203
858
  });
204
- Logger({ level: "WARN", message: res_error });
205
859
  }
206
860
 
207
861
  return response;
208
862
  }
209
863
 
210
864
  /**
211
- * @param {Object} arg - Arg object.
212
- * @param {GenerateReportRequest} arg.body
213
- * @returns {Promise<GenerateReportJson>} - Success response
214
- * @summary:
215
- * @description:
865
+ * @param {FinancePlatformValidator.GetCnConfigParam} arg - Arg object
866
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
867
+ * @param {import("../PlatformAPIClient").Options} - Options
868
+ * @returns {Promise<FinancePlatformModel.GetCnConfigResponse>} - Success response
869
+ * @name getCnConfig
870
+ * @summary: Gives credit note config.
871
+ * @description: Gives credit note config. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/getCnConfig/).
216
872
  */
217
- async generateReport({ body } = {}) {
218
- const { error } = FinanceValidator.generateReport().validate(
873
+ async getCnConfig(
874
+ { body, requestHeaders } = { requestHeaders: {} },
875
+ { responseHeaders } = { responseHeaders: false }
876
+ ) {
877
+ const { error } = FinancePlatformValidator.getCnConfig().validate(
219
878
  {
220
879
  body,
221
880
  },
@@ -226,7 +885,7 @@ class Finance {
226
885
  }
227
886
 
228
887
  // Showing warrnings if extra unknown parameters are found
229
- const { error: warrning } = FinanceValidator.generateReport().validate(
888
+ const { error: warrning } = FinancePlatformValidator.getCnConfig().validate(
230
889
  {
231
890
  body,
232
891
  },
@@ -235,9 +894,8 @@ class Finance {
235
894
  if (warrning) {
236
895
  Logger({
237
896
  level: "WARN",
238
- message: "Parameter Validation warrnings for generateReport",
897
+ message: `Parameter Validation warrnings for platform > Finance > getCnConfig \n ${warrning}`,
239
898
  });
240
- Logger({ level: "WARN", message: warrning });
241
899
  }
242
900
 
243
901
  const query_params = {};
@@ -247,15 +905,21 @@ class Finance {
247
905
  const response = await PlatformAPIClient.execute(
248
906
  this.config,
249
907
  "post",
250
- `/service/platform/finance/v1.0/company/${this.config.companyId}/generate-report`,
908
+ `/service/platform/finance/v1.0/company/${this.config.companyId}/get-seller-cn-config`,
251
909
  query_params,
252
910
  body,
253
- xHeaders
911
+ { ...xHeaders, ...requestHeaders },
912
+ { responseHeaders }
254
913
  );
255
914
 
915
+ let responseData = response;
916
+ if (responseHeaders) {
917
+ responseData = response[0];
918
+ }
919
+
256
920
  const {
257
921
  error: res_error,
258
- } = FinanceModel.GenerateReportJson().validate(response, {
922
+ } = FinancePlatformModel.GetCnConfigResponse().validate(responseData, {
259
923
  abortEarly: false,
260
924
  allowUnknown: false,
261
925
  });
@@ -263,23 +927,31 @@ class Finance {
263
927
  if (res_error) {
264
928
  Logger({
265
929
  level: "WARN",
266
- message: "Response Validation Warnnings for generateReport",
930
+ message: `Response Validation Warnnings for platform > Finance > getCnConfig \n ${res_error}`,
267
931
  });
268
- Logger({ level: "WARN", message: res_error });
269
932
  }
270
933
 
271
934
  return response;
272
935
  }
273
936
 
274
937
  /**
275
- * @param {Object} arg - Arg object.
276
- * @param {GetAffiliate} arg.body
277
- * @returns {Promise<GetAffiliateResponse>} - Success response
278
- * @summary:
279
- * @description:
938
+ * @param {FinancePlatformValidator.GetCustomerCreditBalanceParam} arg - Arg object
939
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
940
+ * @param {import("../PlatformAPIClient").Options} - Options
941
+ * @returns {Promise<FinancePlatformModel.GetCustomerCreditBalanceResponse>}
942
+ * - Success response
943
+ *
944
+ * @name getCustomerCreditBalance
945
+ * @summary: Gives customer credit balance.
946
+ * @description: Gives customer credit balance. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/getCustomerCreditBalance/).
280
947
  */
281
- async getAffiliate({ body } = {}) {
282
- const { error } = FinanceValidator.getAffiliate().validate(
948
+ async getCustomerCreditBalance(
949
+ { body, requestHeaders } = { requestHeaders: {} },
950
+ { responseHeaders } = { responseHeaders: false }
951
+ ) {
952
+ const {
953
+ error,
954
+ } = FinancePlatformValidator.getCustomerCreditBalance().validate(
283
955
  {
284
956
  body,
285
957
  },
@@ -290,7 +962,9 @@ class Finance {
290
962
  }
291
963
 
292
964
  // Showing warrnings if extra unknown parameters are found
293
- const { error: warrning } = FinanceValidator.getAffiliate().validate(
965
+ const {
966
+ error: warrning,
967
+ } = FinancePlatformValidator.getCustomerCreditBalance().validate(
294
968
  {
295
969
  body,
296
970
  },
@@ -299,9 +973,8 @@ class Finance {
299
973
  if (warrning) {
300
974
  Logger({
301
975
  level: "WARN",
302
- message: "Parameter Validation warrnings for getAffiliate",
976
+ message: `Parameter Validation warrnings for platform > Finance > getCustomerCreditBalance \n ${warrning}`,
303
977
  });
304
- Logger({ level: "WARN", message: warrning });
305
978
  }
306
979
 
307
980
  const query_params = {};
@@ -311,15 +984,94 @@ class Finance {
311
984
  const response = await PlatformAPIClient.execute(
312
985
  this.config,
313
986
  "post",
314
- `/service/platform/finance/v1.0/company/${this.config.companyId}/get-affiliate-list`,
987
+ `/service/platform/finance/v1.0/company/${this.config.companyId}/customer-credit-balance`,
988
+ query_params,
989
+ body,
990
+ { ...xHeaders, ...requestHeaders },
991
+ { responseHeaders }
992
+ );
993
+
994
+ let responseData = response;
995
+ if (responseHeaders) {
996
+ responseData = response[0];
997
+ }
998
+
999
+ const {
1000
+ error: res_error,
1001
+ } = FinancePlatformModel.GetCustomerCreditBalanceResponse().validate(
1002
+ responseData,
1003
+ { abortEarly: false, allowUnknown: false }
1004
+ );
1005
+
1006
+ if (res_error) {
1007
+ Logger({
1008
+ level: "WARN",
1009
+ message: `Response Validation Warnnings for platform > Finance > getCustomerCreditBalance \n ${res_error}`,
1010
+ });
1011
+ }
1012
+
1013
+ return response;
1014
+ }
1015
+
1016
+ /**
1017
+ * @param {FinancePlatformValidator.GetDataParam} arg - Arg object
1018
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1019
+ * @param {import("../PlatformAPIClient").Options} - Options
1020
+ * @returns {Promise<FinancePlatformModel.GetEngineResponse>} - Success response
1021
+ * @name getData
1022
+ * @summary: Gives list of columns for table provided.
1023
+ * @description: Gives list of columns for table provided. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/getData/).
1024
+ */
1025
+ async getData(
1026
+ { body, requestHeaders } = { requestHeaders: {} },
1027
+ { responseHeaders } = { responseHeaders: false }
1028
+ ) {
1029
+ const { error } = FinancePlatformValidator.getData().validate(
1030
+ {
1031
+ body,
1032
+ },
1033
+ { abortEarly: false, allowUnknown: true }
1034
+ );
1035
+ if (error) {
1036
+ return Promise.reject(new FDKClientValidationError(error));
1037
+ }
1038
+
1039
+ // Showing warrnings if extra unknown parameters are found
1040
+ const { error: warrning } = FinancePlatformValidator.getData().validate(
1041
+ {
1042
+ body,
1043
+ },
1044
+ { abortEarly: false, allowUnknown: false }
1045
+ );
1046
+ if (warrning) {
1047
+ Logger({
1048
+ level: "WARN",
1049
+ message: `Parameter Validation warrnings for platform > Finance > getData \n ${warrning}`,
1050
+ });
1051
+ }
1052
+
1053
+ const query_params = {};
1054
+
1055
+ const xHeaders = {};
1056
+
1057
+ const response = await PlatformAPIClient.execute(
1058
+ this.config,
1059
+ "post",
1060
+ `/service/platform/finance/v1.0/company/${this.config.companyId}/get-data`,
315
1061
  query_params,
316
1062
  body,
317
- xHeaders
1063
+ { ...xHeaders, ...requestHeaders },
1064
+ { responseHeaders }
318
1065
  );
319
1066
 
1067
+ let responseData = response;
1068
+ if (responseHeaders) {
1069
+ responseData = response[0];
1070
+ }
1071
+
320
1072
  const {
321
1073
  error: res_error,
322
- } = FinanceModel.GetAffiliateResponse().validate(response, {
1074
+ } = FinancePlatformModel.GetEngineResponse().validate(responseData, {
323
1075
  abortEarly: false,
324
1076
  allowUnknown: false,
325
1077
  });
@@ -327,23 +1079,27 @@ class Finance {
327
1079
  if (res_error) {
328
1080
  Logger({
329
1081
  level: "WARN",
330
- message: "Response Validation Warnnings for getAffiliate",
1082
+ message: `Response Validation Warnnings for platform > Finance > getData \n ${res_error}`,
331
1083
  });
332
- Logger({ level: "WARN", message: res_error });
333
1084
  }
334
1085
 
335
1086
  return response;
336
1087
  }
337
1088
 
338
1089
  /**
339
- * @param {Object} arg - Arg object.
340
- * @param {GetEngineRequest} arg.body
341
- * @returns {Promise<GetEngineResponse>} - Success response
342
- * @summary:
343
- * @description:
1090
+ * @param {FinancePlatformValidator.GetPdfUrlViewParam} arg - Arg object
1091
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1092
+ * @param {import("../PlatformAPIClient").Options} - Options
1093
+ * @returns {Promise<FinancePlatformModel.GetPdfUrlViewResponse>} - Success response
1094
+ * @name getPdfUrlView
1095
+ * @summary: Gives cn pdf url.
1096
+ * @description: Gives cn pdf url. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/getPdfUrlView/).
344
1097
  */
345
- async getData({ body } = {}) {
346
- const { error } = FinanceValidator.getData().validate(
1098
+ async getPdfUrlView(
1099
+ { body, requestHeaders } = { requestHeaders: {} },
1100
+ { responseHeaders } = { responseHeaders: false }
1101
+ ) {
1102
+ const { error } = FinancePlatformValidator.getPdfUrlView().validate(
347
1103
  {
348
1104
  body,
349
1105
  },
@@ -354,7 +1110,9 @@ class Finance {
354
1110
  }
355
1111
 
356
1112
  // Showing warrnings if extra unknown parameters are found
357
- const { error: warrning } = FinanceValidator.getData().validate(
1113
+ const {
1114
+ error: warrning,
1115
+ } = FinancePlatformValidator.getPdfUrlView().validate(
358
1116
  {
359
1117
  body,
360
1118
  },
@@ -363,9 +1121,8 @@ class Finance {
363
1121
  if (warrning) {
364
1122
  Logger({
365
1123
  level: "WARN",
366
- message: "Parameter Validation warrnings for getData",
1124
+ message: `Parameter Validation warrnings for platform > Finance > getPdfUrlView \n ${warrning}`,
367
1125
  });
368
- Logger({ level: "WARN", message: warrning });
369
1126
  }
370
1127
 
371
1128
  const query_params = {};
@@ -375,15 +1132,21 @@ class Finance {
375
1132
  const response = await PlatformAPIClient.execute(
376
1133
  this.config,
377
1134
  "post",
378
- `/service/platform/finance/v1.0/company/${this.config.companyId}/get-data`,
1135
+ `/service/platform/finance/v1.0/company/${this.config.companyId}/get-cn-pdf-link`,
379
1136
  query_params,
380
1137
  body,
381
- xHeaders
1138
+ { ...xHeaders, ...requestHeaders },
1139
+ { responseHeaders }
382
1140
  );
383
1141
 
1142
+ let responseData = response;
1143
+ if (responseHeaders) {
1144
+ responseData = response[0];
1145
+ }
1146
+
384
1147
  const {
385
1148
  error: res_error,
386
- } = FinanceModel.GetEngineResponse().validate(response, {
1149
+ } = FinancePlatformModel.GetPdfUrlViewResponse().validate(responseData, {
387
1150
  abortEarly: false,
388
1151
  allowUnknown: false,
389
1152
  });
@@ -391,23 +1154,27 @@ class Finance {
391
1154
  if (res_error) {
392
1155
  Logger({
393
1156
  level: "WARN",
394
- message: "Response Validation Warnnings for getData",
1157
+ message: `Response Validation Warnnings for platform > Finance > getPdfUrlView \n ${res_error}`,
395
1158
  });
396
- Logger({ level: "WARN", message: res_error });
397
1159
  }
398
1160
 
399
1161
  return response;
400
1162
  }
401
1163
 
402
1164
  /**
403
- * @param {Object} arg - Arg object.
404
- * @param {GetReasonRequest} arg.body
405
- * @returns {Promise<GetReasonResponse>} - Success response
406
- * @summary:
407
- * @description:
1165
+ * @param {FinancePlatformValidator.GetReasonParam} arg - Arg object
1166
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1167
+ * @param {import("../PlatformAPIClient").Options} - Options
1168
+ * @returns {Promise<FinancePlatformModel.GetReasonResponse>} - Success response
1169
+ * @name getReason
1170
+ * @summary: Gives list of the reasons.
1171
+ * @description: Gives list of the reasons. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/getReason/).
408
1172
  */
409
- async getReason({ body } = {}) {
410
- const { error } = FinanceValidator.getReason().validate(
1173
+ async getReason(
1174
+ { body, requestHeaders } = { requestHeaders: {} },
1175
+ { responseHeaders } = { responseHeaders: false }
1176
+ ) {
1177
+ const { error } = FinancePlatformValidator.getReason().validate(
411
1178
  {
412
1179
  body,
413
1180
  },
@@ -418,7 +1185,7 @@ class Finance {
418
1185
  }
419
1186
 
420
1187
  // Showing warrnings if extra unknown parameters are found
421
- const { error: warrning } = FinanceValidator.getReason().validate(
1188
+ const { error: warrning } = FinancePlatformValidator.getReason().validate(
422
1189
  {
423
1190
  body,
424
1191
  },
@@ -427,9 +1194,8 @@ class Finance {
427
1194
  if (warrning) {
428
1195
  Logger({
429
1196
  level: "WARN",
430
- message: "Parameter Validation warrnings for getReason",
1197
+ message: `Parameter Validation warrnings for platform > Finance > getReason \n ${warrning}`,
431
1198
  });
432
- Logger({ level: "WARN", message: warrning });
433
1199
  }
434
1200
 
435
1201
  const query_params = {};
@@ -442,12 +1208,18 @@ class Finance {
442
1208
  `/service/platform/finance/v1.0/company/${this.config.companyId}/get-reason`,
443
1209
  query_params,
444
1210
  body,
445
- xHeaders
1211
+ { ...xHeaders, ...requestHeaders },
1212
+ { responseHeaders }
446
1213
  );
447
1214
 
1215
+ let responseData = response;
1216
+ if (responseHeaders) {
1217
+ responseData = response[0];
1218
+ }
1219
+
448
1220
  const {
449
1221
  error: res_error,
450
- } = FinanceModel.GetReasonResponse().validate(response, {
1222
+ } = FinancePlatformModel.GetReasonResponse().validate(responseData, {
451
1223
  abortEarly: false,
452
1224
  allowUnknown: false,
453
1225
  });
@@ -455,23 +1227,27 @@ class Finance {
455
1227
  if (res_error) {
456
1228
  Logger({
457
1229
  level: "WARN",
458
- message: "Response Validation Warnnings for getReason",
1230
+ message: `Response Validation Warnnings for platform > Finance > getReason \n ${res_error}`,
459
1231
  });
460
- Logger({ level: "WARN", message: res_error });
461
1232
  }
462
1233
 
463
1234
  return response;
464
1235
  }
465
1236
 
466
1237
  /**
467
- * @param {Object} arg - Arg object.
468
- * @param {GetReportListRequest} arg.body
469
- * @returns {Promise<GetEngineResponse>} - Success response
470
- * @summary:
471
- * @description:
1238
+ * @param {FinancePlatformValidator.GetReportListParam} arg - Arg object
1239
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1240
+ * @param {import("../PlatformAPIClient").Options} - Options
1241
+ * @returns {Promise<FinancePlatformModel.GetReportListResponse>} - Success response
1242
+ * @name getReportList
1243
+ * @summary: Get the list of available reports for a company.
1244
+ * @description: Gives list of reports. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/getReportList/).
472
1245
  */
473
- async getReportList({ body } = {}) {
474
- const { error } = FinanceValidator.getReportList().validate(
1246
+ async getReportList(
1247
+ { body, requestHeaders } = { requestHeaders: {} },
1248
+ { responseHeaders } = { responseHeaders: false }
1249
+ ) {
1250
+ const { error } = FinancePlatformValidator.getReportList().validate(
475
1251
  {
476
1252
  body,
477
1253
  },
@@ -482,7 +1258,9 @@ class Finance {
482
1258
  }
483
1259
 
484
1260
  // Showing warrnings if extra unknown parameters are found
485
- const { error: warrning } = FinanceValidator.getReportList().validate(
1261
+ const {
1262
+ error: warrning,
1263
+ } = FinancePlatformValidator.getReportList().validate(
486
1264
  {
487
1265
  body,
488
1266
  },
@@ -491,9 +1269,8 @@ class Finance {
491
1269
  if (warrning) {
492
1270
  Logger({
493
1271
  level: "WARN",
494
- message: "Parameter Validation warrnings for getReportList",
1272
+ message: `Parameter Validation warrnings for platform > Finance > getReportList \n ${warrning}`,
495
1273
  });
496
- Logger({ level: "WARN", message: warrning });
497
1274
  }
498
1275
 
499
1276
  const query_params = {};
@@ -506,12 +1283,18 @@ class Finance {
506
1283
  `/service/platform/finance/v1.0/company/${this.config.companyId}/get-report-list`,
507
1284
  query_params,
508
1285
  body,
509
- xHeaders
1286
+ { ...xHeaders, ...requestHeaders },
1287
+ { responseHeaders }
510
1288
  );
511
1289
 
1290
+ let responseData = response;
1291
+ if (responseHeaders) {
1292
+ responseData = response[0];
1293
+ }
1294
+
512
1295
  const {
513
1296
  error: res_error,
514
- } = FinanceModel.GetEngineResponse().validate(response, {
1297
+ } = FinancePlatformModel.GetReportListResponse().validate(responseData, {
515
1298
  abortEarly: false,
516
1299
  allowUnknown: false,
517
1300
  });
@@ -519,23 +1302,107 @@ class Finance {
519
1302
  if (res_error) {
520
1303
  Logger({
521
1304
  level: "WARN",
522
- message: "Response Validation Warnnings for getReportList",
1305
+ message: `Response Validation Warnnings for platform > Finance > getReportList \n ${res_error}`,
1306
+ });
1307
+ }
1308
+
1309
+ return response;
1310
+ }
1311
+
1312
+ /**
1313
+ * @param {FinancePlatformValidator.GetReportingFiltersParam} arg - Arg object
1314
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1315
+ * @param {import("../PlatformAPIClient").Options} - Options
1316
+ * @returns {Promise<FinancePlatformModel.GetReportingFiltersResponse>} -
1317
+ * Success response
1318
+ * @name getReportingFilters
1319
+ * @summary: Gets all customer Cn filters and search.
1320
+ * @description: Gets all customer Cn filters and search. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/getReportingFilters/).
1321
+ */
1322
+ async getReportingFilters(
1323
+ { filterKey, affiliateId, requestHeaders } = { requestHeaders: {} },
1324
+ { responseHeaders } = { responseHeaders: false }
1325
+ ) {
1326
+ const { error } = FinancePlatformValidator.getReportingFilters().validate(
1327
+ {
1328
+ filterKey,
1329
+ affiliateId,
1330
+ },
1331
+ { abortEarly: false, allowUnknown: true }
1332
+ );
1333
+ if (error) {
1334
+ return Promise.reject(new FDKClientValidationError(error));
1335
+ }
1336
+
1337
+ // Showing warrnings if extra unknown parameters are found
1338
+ const {
1339
+ error: warrning,
1340
+ } = FinancePlatformValidator.getReportingFilters().validate(
1341
+ {
1342
+ filterKey,
1343
+ affiliateId,
1344
+ },
1345
+ { abortEarly: false, allowUnknown: false }
1346
+ );
1347
+ if (warrning) {
1348
+ Logger({
1349
+ level: "WARN",
1350
+ message: `Parameter Validation warrnings for platform > Finance > getReportingFilters \n ${warrning}`,
1351
+ });
1352
+ }
1353
+
1354
+ const query_params = {};
1355
+ query_params["filter_key"] = filterKey;
1356
+ query_params["affiliate_id"] = affiliateId;
1357
+
1358
+ const xHeaders = {};
1359
+
1360
+ const response = await PlatformAPIClient.execute(
1361
+ this.config,
1362
+ "get",
1363
+ `/service/platform/finance/v1.0/company/${this.config.companyId}/reporting-filters`,
1364
+ query_params,
1365
+ undefined,
1366
+ { ...xHeaders, ...requestHeaders },
1367
+ { responseHeaders }
1368
+ );
1369
+
1370
+ let responseData = response;
1371
+ if (responseHeaders) {
1372
+ responseData = response[0];
1373
+ }
1374
+
1375
+ const {
1376
+ error: res_error,
1377
+ } = FinancePlatformModel.GetReportingFiltersResponse().validate(
1378
+ responseData,
1379
+ { abortEarly: false, allowUnknown: false }
1380
+ );
1381
+
1382
+ if (res_error) {
1383
+ Logger({
1384
+ level: "WARN",
1385
+ message: `Response Validation Warnnings for platform > Finance > getReportingFilters \n ${res_error}`,
523
1386
  });
524
- Logger({ level: "WARN", message: res_error });
525
1387
  }
526
1388
 
527
1389
  return response;
528
1390
  }
529
1391
 
530
1392
  /**
531
- * @param {Object} arg - Arg object.
532
- * @param {InvoiceListingRequest} arg.body
533
- * @returns {Promise<InvoiceListingResponse>} - Success response
534
- * @summary:
535
- * @description:
1393
+ * @param {FinancePlatformValidator.InvoiceListingParam} arg - Arg object
1394
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1395
+ * @param {import("../PlatformAPIClient").Options} - Options
1396
+ * @returns {Promise<FinancePlatformModel.InvoiceListingResponse>} - Success response
1397
+ * @name invoiceListing
1398
+ * @summary: Gives list of invoices.
1399
+ * @description: Gives list of invoices. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/invoiceListing/).
536
1400
  */
537
- async invoiceListing({ body } = {}) {
538
- const { error } = FinanceValidator.invoiceListing().validate(
1401
+ async invoiceListing(
1402
+ { body, requestHeaders } = { requestHeaders: {} },
1403
+ { responseHeaders } = { responseHeaders: false }
1404
+ ) {
1405
+ const { error } = FinancePlatformValidator.invoiceListing().validate(
539
1406
  {
540
1407
  body,
541
1408
  },
@@ -546,7 +1413,9 @@ class Finance {
546
1413
  }
547
1414
 
548
1415
  // Showing warrnings if extra unknown parameters are found
549
- const { error: warrning } = FinanceValidator.invoiceListing().validate(
1416
+ const {
1417
+ error: warrning,
1418
+ } = FinancePlatformValidator.invoiceListing().validate(
550
1419
  {
551
1420
  body,
552
1421
  },
@@ -555,9 +1424,8 @@ class Finance {
555
1424
  if (warrning) {
556
1425
  Logger({
557
1426
  level: "WARN",
558
- message: "Parameter Validation warrnings for invoiceListing",
1427
+ message: `Parameter Validation warrnings for platform > Finance > invoiceListing \n ${warrning}`,
559
1428
  });
560
- Logger({ level: "WARN", message: warrning });
561
1429
  }
562
1430
 
563
1431
  const query_params = {};
@@ -570,12 +1438,18 @@ class Finance {
570
1438
  `/service/platform/finance/v1.0/company/${this.config.companyId}/invoice/listing`,
571
1439
  query_params,
572
1440
  body,
573
- xHeaders
1441
+ { ...xHeaders, ...requestHeaders },
1442
+ { responseHeaders }
574
1443
  );
575
1444
 
1445
+ let responseData = response;
1446
+ if (responseHeaders) {
1447
+ responseData = response[0];
1448
+ }
1449
+
576
1450
  const {
577
1451
  error: res_error,
578
- } = FinanceModel.InvoiceListingResponse().validate(response, {
1452
+ } = FinancePlatformModel.InvoiceListingResponse().validate(responseData, {
579
1453
  abortEarly: false,
580
1454
  allowUnknown: false,
581
1455
  });
@@ -583,23 +1457,27 @@ class Finance {
583
1457
  if (res_error) {
584
1458
  Logger({
585
1459
  level: "WARN",
586
- message: "Response Validation Warnnings for invoiceListing",
1460
+ message: `Response Validation Warnnings for platform > Finance > invoiceListing \n ${res_error}`,
587
1461
  });
588
- Logger({ level: "WARN", message: res_error });
589
1462
  }
590
1463
 
591
1464
  return response;
592
1465
  }
593
1466
 
594
1467
  /**
595
- * @param {Object} arg - Arg object.
596
- * @param {InvoicePdfRequest} arg.body
597
- * @returns {Promise<InvoicePdfResponse>} - Success response
598
- * @summary:
599
- * @description:
1468
+ * @param {FinancePlatformValidator.InvoicePDFParam} arg - Arg object
1469
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1470
+ * @param {import("../PlatformAPIClient").Options} - Options
1471
+ * @returns {Promise<FinancePlatformModel.InvoicePdfResponse>} - Success response
1472
+ * @name invoicePDF
1473
+ * @summary: Gives pdf view of invoice.
1474
+ * @description: Gives pdf view of invoice. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/invoicePDF/).
600
1475
  */
601
- async invoicePDF({ body } = {}) {
602
- const { error } = FinanceValidator.invoicePDF().validate(
1476
+ async invoicePDF(
1477
+ { body, requestHeaders } = { requestHeaders: {} },
1478
+ { responseHeaders } = { responseHeaders: false }
1479
+ ) {
1480
+ const { error } = FinancePlatformValidator.invoicePDF().validate(
603
1481
  {
604
1482
  body,
605
1483
  },
@@ -610,7 +1488,7 @@ class Finance {
610
1488
  }
611
1489
 
612
1490
  // Showing warrnings if extra unknown parameters are found
613
- const { error: warrning } = FinanceValidator.invoicePDF().validate(
1491
+ const { error: warrning } = FinancePlatformValidator.invoicePDF().validate(
614
1492
  {
615
1493
  body,
616
1494
  },
@@ -619,9 +1497,8 @@ class Finance {
619
1497
  if (warrning) {
620
1498
  Logger({
621
1499
  level: "WARN",
622
- message: "Parameter Validation warrnings for invoicePDF",
1500
+ message: `Parameter Validation warrnings for platform > Finance > invoicePDF \n ${warrning}`,
623
1501
  });
624
- Logger({ level: "WARN", message: warrning });
625
1502
  }
626
1503
 
627
1504
  const query_params = {};
@@ -634,12 +1511,18 @@ class Finance {
634
1511
  `/service/platform/finance/v1.0/company/${this.config.companyId}/invoice/pdf-view`,
635
1512
  query_params,
636
1513
  body,
637
- xHeaders
1514
+ { ...xHeaders, ...requestHeaders },
1515
+ { responseHeaders }
638
1516
  );
639
1517
 
1518
+ let responseData = response;
1519
+ if (responseHeaders) {
1520
+ responseData = response[0];
1521
+ }
1522
+
640
1523
  const {
641
1524
  error: res_error,
642
- } = FinanceModel.InvoicePdfResponse().validate(response, {
1525
+ } = FinancePlatformModel.InvoicePdfResponse().validate(responseData, {
643
1526
  abortEarly: false,
644
1527
  allowUnknown: false,
645
1528
  });
@@ -647,23 +1530,27 @@ class Finance {
647
1530
  if (res_error) {
648
1531
  Logger({
649
1532
  level: "WARN",
650
- message: "Response Validation Warnnings for invoicePDF",
1533
+ message: `Response Validation Warnnings for platform > Finance > invoicePDF \n ${res_error}`,
651
1534
  });
652
- Logger({ level: "WARN", message: res_error });
653
1535
  }
654
1536
 
655
1537
  return response;
656
1538
  }
657
1539
 
658
1540
  /**
659
- * @param {Object} arg - Arg object.
660
- * @param {InvoiceTypeRequest} arg.body
661
- * @returns {Promise<InvoiceTypeResponse>} - Success response
662
- * @summary:
663
- * @description:
1541
+ * @param {FinancePlatformValidator.InvoiceTypeParam} arg - Arg object
1542
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1543
+ * @param {import("../PlatformAPIClient").Options} - Options
1544
+ * @returns {Promise<FinancePlatformModel.InvoiceTypeResponse>} - Success response
1545
+ * @name invoiceType
1546
+ * @summary: Gives list of active invoice type.
1547
+ * @description: Gives list of active invoice type. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/invoiceType/).
664
1548
  */
665
- async invoiceType({ body } = {}) {
666
- const { error } = FinanceValidator.invoiceType().validate(
1549
+ async invoiceType(
1550
+ { body, requestHeaders } = { requestHeaders: {} },
1551
+ { responseHeaders } = { responseHeaders: false }
1552
+ ) {
1553
+ const { error } = FinancePlatformValidator.invoiceType().validate(
667
1554
  {
668
1555
  body,
669
1556
  },
@@ -674,7 +1561,7 @@ class Finance {
674
1561
  }
675
1562
 
676
1563
  // Showing warrnings if extra unknown parameters are found
677
- const { error: warrning } = FinanceValidator.invoiceType().validate(
1564
+ const { error: warrning } = FinancePlatformValidator.invoiceType().validate(
678
1565
  {
679
1566
  body,
680
1567
  },
@@ -683,9 +1570,8 @@ class Finance {
683
1570
  if (warrning) {
684
1571
  Logger({
685
1572
  level: "WARN",
686
- message: "Parameter Validation warrnings for invoiceType",
1573
+ message: `Parameter Validation warrnings for platform > Finance > invoiceType \n ${warrning}`,
687
1574
  });
688
- Logger({ level: "WARN", message: warrning });
689
1575
  }
690
1576
 
691
1577
  const query_params = {};
@@ -698,12 +1584,18 @@ class Finance {
698
1584
  `/service/platform/finance/v1.0/company/${this.config.companyId}/invoice-type`,
699
1585
  query_params,
700
1586
  body,
701
- xHeaders
1587
+ { ...xHeaders, ...requestHeaders },
1588
+ { responseHeaders }
702
1589
  );
703
1590
 
1591
+ let responseData = response;
1592
+ if (responseHeaders) {
1593
+ responseData = response[0];
1594
+ }
1595
+
704
1596
  const {
705
1597
  error: res_error,
706
- } = FinanceModel.InvoiceTypeResponse().validate(response, {
1598
+ } = FinancePlatformModel.InvoiceTypeResponse().validate(responseData, {
707
1599
  abortEarly: false,
708
1600
  allowUnknown: false,
709
1601
  });
@@ -711,23 +1603,28 @@ class Finance {
711
1603
  if (res_error) {
712
1604
  Logger({
713
1605
  level: "WARN",
714
- message: "Response Validation Warnnings for invoiceType",
1606
+ message: `Response Validation Warnnings for platform > Finance > invoiceType \n ${res_error}`,
715
1607
  });
716
- Logger({ level: "WARN", message: res_error });
717
1608
  }
718
1609
 
719
1610
  return response;
720
1611
  }
721
1612
 
722
1613
  /**
723
- * @param {Object} arg - Arg object.
724
- * @param {IsCreditlinePlatformRequest} arg.body
725
- * @returns {Promise<IsCreditlinePlatformResponse>} - Success response
726
- * @summary:
727
- * @description:
1614
+ * @param {FinancePlatformValidator.IsCnRefundMethodParam} arg - Arg object
1615
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1616
+ * @param {import("../PlatformAPIClient").Options} - Options
1617
+ * @returns {Promise<FinancePlatformModel.IsCnRefundMethodResponse>} -
1618
+ * Success response
1619
+ * @name isCnRefundMethod
1620
+ * @summary: Checks if seller has obtained cn as refund method or not.
1621
+ * @description: Checks if seller has obtained cn as refund method or not. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/isCnRefundMethod/).
728
1622
  */
729
- async isCreditlinePlatform({ body } = {}) {
730
- const { error } = FinanceValidator.isCreditlinePlatform().validate(
1623
+ async isCnRefundMethod(
1624
+ { body, requestHeaders } = { requestHeaders: {} },
1625
+ { responseHeaders } = { responseHeaders: false }
1626
+ ) {
1627
+ const { error } = FinancePlatformValidator.isCnRefundMethod().validate(
731
1628
  {
732
1629
  body,
733
1630
  },
@@ -740,7 +1637,7 @@ class Finance {
740
1637
  // Showing warrnings if extra unknown parameters are found
741
1638
  const {
742
1639
  error: warrning,
743
- } = FinanceValidator.isCreditlinePlatform().validate(
1640
+ } = FinancePlatformValidator.isCnRefundMethod().validate(
744
1641
  {
745
1642
  body,
746
1643
  },
@@ -749,9 +1646,8 @@ class Finance {
749
1646
  if (warrning) {
750
1647
  Logger({
751
1648
  level: "WARN",
752
- message: "Parameter Validation warrnings for isCreditlinePlatform",
1649
+ message: `Parameter Validation warrnings for platform > Finance > isCnRefundMethod \n ${warrning}`,
753
1650
  });
754
- Logger({ level: "WARN", message: warrning });
755
1651
  }
756
1652
 
757
1653
  const query_params = {};
@@ -761,15 +1657,21 @@ class Finance {
761
1657
  const response = await PlatformAPIClient.execute(
762
1658
  this.config,
763
1659
  "post",
764
- `/service/platform/finance/v1.0/company/${this.config.companyId}/creditline-opted`,
1660
+ `/service/platform/finance/v1.0/company/${this.config.companyId}/cn-as-refund-method`,
765
1661
  query_params,
766
1662
  body,
767
- xHeaders
1663
+ { ...xHeaders, ...requestHeaders },
1664
+ { responseHeaders }
768
1665
  );
769
1666
 
1667
+ let responseData = response;
1668
+ if (responseHeaders) {
1669
+ responseData = response[0];
1670
+ }
1671
+
770
1672
  const {
771
1673
  error: res_error,
772
- } = FinanceModel.IsCreditlinePlatformResponse().validate(response, {
1674
+ } = FinancePlatformModel.IsCnRefundMethodResponse().validate(responseData, {
773
1675
  abortEarly: false,
774
1676
  allowUnknown: false,
775
1677
  });
@@ -777,23 +1679,103 @@ class Finance {
777
1679
  if (res_error) {
778
1680
  Logger({
779
1681
  level: "WARN",
780
- message: "Response Validation Warnnings for isCreditlinePlatform",
1682
+ message: `Response Validation Warnnings for platform > Finance > isCnRefundMethod \n ${res_error}`,
1683
+ });
1684
+ }
1685
+
1686
+ return response;
1687
+ }
1688
+
1689
+ /**
1690
+ * @param {FinancePlatformValidator.IsCreditlinePlatformParam} arg - Arg object
1691
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1692
+ * @param {import("../PlatformAPIClient").Options} - Options
1693
+ * @returns {Promise<FinancePlatformModel.IsCreditlinePlatformResponse>} -
1694
+ * Success response
1695
+ * @name isCreditlinePlatform
1696
+ * @summary: Checks if seller has opted for creditline or not.
1697
+ * @description: Checks if seller has opted for creditline or not. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/isCreditlinePlatform/).
1698
+ */
1699
+ async isCreditlinePlatform(
1700
+ { body, requestHeaders } = { requestHeaders: {} },
1701
+ { responseHeaders } = { responseHeaders: false }
1702
+ ) {
1703
+ const { error } = FinancePlatformValidator.isCreditlinePlatform().validate(
1704
+ {
1705
+ body,
1706
+ },
1707
+ { abortEarly: false, allowUnknown: true }
1708
+ );
1709
+ if (error) {
1710
+ return Promise.reject(new FDKClientValidationError(error));
1711
+ }
1712
+
1713
+ // Showing warrnings if extra unknown parameters are found
1714
+ const {
1715
+ error: warrning,
1716
+ } = FinancePlatformValidator.isCreditlinePlatform().validate(
1717
+ {
1718
+ body,
1719
+ },
1720
+ { abortEarly: false, allowUnknown: false }
1721
+ );
1722
+ if (warrning) {
1723
+ Logger({
1724
+ level: "WARN",
1725
+ message: `Parameter Validation warrnings for platform > Finance > isCreditlinePlatform \n ${warrning}`,
1726
+ });
1727
+ }
1728
+
1729
+ const query_params = {};
1730
+
1731
+ const xHeaders = {};
1732
+
1733
+ const response = await PlatformAPIClient.execute(
1734
+ this.config,
1735
+ "post",
1736
+ `/service/platform/finance/v1.0/company/${this.config.companyId}/creditline-opted`,
1737
+ query_params,
1738
+ body,
1739
+ { ...xHeaders, ...requestHeaders },
1740
+ { responseHeaders }
1741
+ );
1742
+
1743
+ let responseData = response;
1744
+ if (responseHeaders) {
1745
+ responseData = response[0];
1746
+ }
1747
+
1748
+ const {
1749
+ error: res_error,
1750
+ } = FinancePlatformModel.IsCreditlinePlatformResponse().validate(
1751
+ responseData,
1752
+ { abortEarly: false, allowUnknown: false }
1753
+ );
1754
+
1755
+ if (res_error) {
1756
+ Logger({
1757
+ level: "WARN",
1758
+ message: `Response Validation Warnnings for platform > Finance > isCreditlinePlatform \n ${res_error}`,
781
1759
  });
782
- Logger({ level: "WARN", message: res_error });
783
1760
  }
784
1761
 
785
1762
  return response;
786
1763
  }
787
1764
 
788
1765
  /**
789
- * @param {Object} arg - Arg object.
790
- * @param {PaymentProcessRequest} arg.body
791
- * @returns {Promise<PaymentProcessResponse>} - Success response
792
- * @summary:
793
- * @description:
1766
+ * @param {FinancePlatformValidator.PaymentProcessParam} arg - Arg object
1767
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1768
+ * @param {import("../PlatformAPIClient").Options} - Options
1769
+ * @returns {Promise<FinancePlatformModel.PaymentProcessResponse>} - Success response
1770
+ * @name paymentProcess
1771
+ * @summary: Payment Processing API.
1772
+ * @description: Payment Processing API. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/paymentProcess/).
794
1773
  */
795
- async paymentProcess({ body } = {}) {
796
- const { error } = FinanceValidator.paymentProcess().validate(
1774
+ async paymentProcess(
1775
+ { body, requestHeaders } = { requestHeaders: {} },
1776
+ { responseHeaders } = { responseHeaders: false }
1777
+ ) {
1778
+ const { error } = FinancePlatformValidator.paymentProcess().validate(
797
1779
  {
798
1780
  body,
799
1781
  },
@@ -804,7 +1786,9 @@ class Finance {
804
1786
  }
805
1787
 
806
1788
  // Showing warrnings if extra unknown parameters are found
807
- const { error: warrning } = FinanceValidator.paymentProcess().validate(
1789
+ const {
1790
+ error: warrning,
1791
+ } = FinancePlatformValidator.paymentProcess().validate(
808
1792
  {
809
1793
  body,
810
1794
  },
@@ -813,9 +1797,8 @@ class Finance {
813
1797
  if (warrning) {
814
1798
  Logger({
815
1799
  level: "WARN",
816
- message: "Parameter Validation warrnings for paymentProcess",
1800
+ message: `Parameter Validation warrnings for platform > Finance > paymentProcess \n ${warrning}`,
817
1801
  });
818
- Logger({ level: "WARN", message: warrning });
819
1802
  }
820
1803
 
821
1804
  const query_params = {};
@@ -828,12 +1811,18 @@ class Finance {
828
1811
  `/service/platform/finance/v1.0/company/${this.config.companyId}/payment-process`,
829
1812
  query_params,
830
1813
  body,
831
- xHeaders
1814
+ { ...xHeaders, ...requestHeaders },
1815
+ { responseHeaders }
832
1816
  );
833
1817
 
1818
+ let responseData = response;
1819
+ if (responseHeaders) {
1820
+ responseData = response[0];
1821
+ }
1822
+
834
1823
  const {
835
1824
  error: res_error,
836
- } = FinanceModel.PaymentProcessResponse().validate(response, {
1825
+ } = FinancePlatformModel.PaymentProcessResponse().validate(responseData, {
837
1826
  abortEarly: false,
838
1827
  allowUnknown: false,
839
1828
  });
@@ -841,9 +1830,8 @@ class Finance {
841
1830
  if (res_error) {
842
1831
  Logger({
843
1832
  level: "WARN",
844
- message: "Response Validation Warnnings for paymentProcess",
1833
+ message: `Response Validation Warnnings for platform > Finance > paymentProcess \n ${res_error}`,
845
1834
  });
846
- Logger({ level: "WARN", message: res_error });
847
1835
  }
848
1836
 
849
1837
  return response;