@gofynd/fdk-client-javascript 1.2.0 → 1.3.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/README.md +44 -7
  2. package/package.json +1 -2
  3. package/sdk/application/ApplicationAPIClient.d.ts +3 -3
  4. package/sdk/application/ApplicationAPIClient.js +6 -4
  5. package/sdk/application/ApplicationClient.d.ts +2 -3
  6. package/sdk/application/ApplicationClient.js +1 -45
  7. package/sdk/application/ApplicationConfig.d.ts +46 -6
  8. package/sdk/application/ApplicationConfig.js +15 -16
  9. package/sdk/application/Cart/CartApplicationClient.d.ts +61 -33
  10. package/sdk/application/Cart/CartApplicationClient.js +225 -134
  11. package/sdk/application/Cart/CartApplicationModel.d.ts +6 -4
  12. package/sdk/application/Cart/CartApplicationModel.js +6 -4
  13. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +61 -30
  14. package/sdk/application/Catalog/CatalogApplicationClient.js +234 -146
  15. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +115 -13
  16. package/sdk/application/Catalog/CatalogApplicationModel.js +77 -12
  17. package/sdk/application/Common/CommonApplicationClient.d.ts +5 -3
  18. package/sdk/application/Common/CommonApplicationClient.js +13 -11
  19. package/sdk/application/Common/CommonApplicationModel.d.ts +3 -83
  20. package/sdk/application/Common/CommonApplicationModel.js +2 -58
  21. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +9 -3
  22. package/sdk/application/Communication/CommunicationApplicationClient.js +25 -13
  23. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +1 -34
  24. package/sdk/application/Communication/CommunicationApplicationModel.js +0 -36
  25. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +46 -16
  26. package/sdk/application/Configuration/ConfigurationApplicationClient.js +144 -68
  27. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1 -219
  28. package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -226
  29. package/sdk/application/Content/ContentApplicationClient.d.ts +49 -21
  30. package/sdk/application/Content/ContentApplicationClient.js +159 -80
  31. package/sdk/application/Content/ContentApplicationModel.d.ts +5 -622
  32. package/sdk/application/Content/ContentApplicationModel.js +11 -763
  33. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -3
  34. package/sdk/application/FileStorage/FileStorageApplicationClient.js +20 -14
  35. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +1 -152
  36. package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -180
  37. package/sdk/application/Lead/LeadApplicationClient.d.ts +14 -7
  38. package/sdk/application/Lead/LeadApplicationClient.js +50 -31
  39. package/sdk/application/Lead/LeadApplicationModel.d.ts +22 -741
  40. package/sdk/application/Lead/LeadApplicationModel.js +21 -481
  41. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +11 -5
  42. package/sdk/application/Logistic/LogisticApplicationClient.js +41 -20
  43. package/sdk/application/Order/OrderApplicationClient.d.ts +24 -12
  44. package/sdk/application/Order/OrderApplicationClient.js +88 -56
  45. package/sdk/application/Payment/PaymentApplicationClient.d.ts +91 -42
  46. package/sdk/application/Payment/PaymentApplicationClient.js +293 -194
  47. package/sdk/application/Payment/PaymentApplicationModel.d.ts +36 -36
  48. package/sdk/application/Payment/PaymentApplicationModel.js +36 -36
  49. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +59 -32
  50. package/sdk/application/PosCart/PosCartApplicationClient.js +214 -130
  51. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +2 -2
  52. package/sdk/application/PosCart/PosCartApplicationModel.js +2 -2
  53. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +16 -7
  54. package/sdk/application/Rewards/RewardsApplicationClient.js +56 -29
  55. package/sdk/application/Share/ShareApplicationClient.d.ts +15 -7
  56. package/sdk/application/Share/ShareApplicationClient.js +51 -31
  57. package/sdk/application/Share/ShareApplicationModel.d.ts +1 -33
  58. package/sdk/application/Share/ShareApplicationModel.js +0 -38
  59. package/sdk/application/Theme/ThemeApplicationClient.d.ts +9 -4
  60. package/sdk/application/Theme/ThemeApplicationClient.js +35 -18
  61. package/sdk/application/Theme/ThemeApplicationModel.d.ts +982 -312
  62. package/sdk/application/Theme/ThemeApplicationModel.js +621 -284
  63. package/sdk/application/User/UserApplicationClient.d.ts +74 -35
  64. package/sdk/application/User/UserApplicationClient.js +252 -161
  65. package/sdk/application/User/UserApplicationModel.d.ts +3 -401
  66. package/sdk/application/User/UserApplicationModel.js +2 -490
  67. package/sdk/common/AxiosHelper.js +1 -2
  68. package/sdk/common/FDKError.d.ts +3 -0
  69. package/sdk/common/FDKError.js +8 -0
  70. package/sdk/common/utils.d.ts +3 -0
  71. package/sdk/common/utils.js +29 -0
  72. package/sdk/partner/PartnerAPIClient.d.ts +5 -4
  73. package/sdk/partner/PartnerAPIClient.js +7 -4
  74. package/sdk/partner/PartnerClient.d.ts +2 -0
  75. package/sdk/partner/PartnerClient.js +3 -0
  76. package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
  77. package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
  78. package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
  79. package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
  80. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
  81. package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
  82. package/sdk/partner/index.d.ts +3 -1
  83. package/sdk/partner/index.js +3 -1
  84. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +8 -4
  85. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +38 -16
  86. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +1 -13
  87. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +0 -12
  88. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +10 -0
  89. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +4 -0
  90. package/sdk/platform/Billing/BillingPlatformClient.d.ts +59 -14
  91. package/sdk/platform/Billing/BillingPlatformClient.js +315 -64
  92. package/sdk/platform/Billing/BillingPlatformModel.d.ts +56 -196
  93. package/sdk/platform/Billing/BillingPlatformModel.js +63 -217
  94. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +23 -1
  95. package/sdk/platform/Billing/BillingPlatformValidator.js +31 -0
  96. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +124 -63
  97. package/sdk/platform/Cart/CartPlatformApplicationClient.js +431 -265
  98. package/sdk/platform/Cart/CartPlatformModel.d.ts +253 -53
  99. package/sdk/platform/Cart/CartPlatformModel.js +104 -54
  100. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +120 -53
  101. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +398 -247
  102. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +155 -78
  103. package/sdk/platform/Catalog/CatalogPlatformClient.js +561 -355
  104. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +10 -12
  105. package/sdk/platform/Catalog/CatalogPlatformModel.js +10 -12
  106. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +30 -0
  107. package/sdk/platform/Catalog/CatalogPlatformValidator.js +13 -0
  108. package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -3
  109. package/sdk/platform/Common/CommonPlatformClient.js +13 -11
  110. package/sdk/platform/Common/CommonPlatformModel.d.ts +39 -64
  111. package/sdk/platform/Common/CommonPlatformModel.js +23 -57
  112. package/sdk/platform/Common/CommonPlatformValidator.d.ts +5 -10
  113. package/sdk/platform/Common/CommonPlatformValidator.js +3 -4
  114. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +370 -120
  115. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +2328 -888
  116. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +143 -24
  117. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +179 -15
  118. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
  119. package/sdk/platform/Communication/CommunicationPlatformClient.js +6 -5
  120. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +386 -308
  121. package/sdk/platform/Communication/CommunicationPlatformModel.js +415 -355
  122. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +38 -13
  123. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +171 -57
  124. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +53 -1
  125. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +54 -0
  126. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +5 -1
  127. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +7 -0
  128. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +96 -29
  129. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +311 -126
  130. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +5 -1
  131. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +7 -0
  132. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +36 -18
  133. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +121 -86
  134. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +13 -180
  135. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +5 -113
  136. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +162 -70
  137. package/sdk/platform/Content/ContentPlatformApplicationClient.js +528 -309
  138. package/sdk/platform/Content/ContentPlatformModel.d.ts +9 -198
  139. package/sdk/platform/Content/ContentPlatformModel.js +8 -231
  140. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +48 -11
  141. package/sdk/platform/Discount/DiscountPlatformClient.js +142 -48
  142. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +40 -1
  143. package/sdk/platform/Discount/DiscountPlatformModel.js +27 -0
  144. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +84 -18
  145. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +486 -53
  146. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +71 -7
  147. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +81 -5
  148. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +13 -18
  149. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +58 -65
  150. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +198 -71
  151. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +212 -64
  152. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +18 -10
  153. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -6
  154. package/sdk/platform/Finance/FinancePlatformClient.d.ts +177 -40
  155. package/sdk/platform/Finance/FinancePlatformClient.js +1028 -132
  156. package/sdk/platform/Finance/FinancePlatformModel.d.ts +670 -22
  157. package/sdk/platform/Finance/FinancePlatformModel.js +809 -23
  158. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +111 -1
  159. package/sdk/platform/Finance/FinancePlatformValidator.js +134 -0
  160. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +24 -12
  161. package/sdk/platform/Inventory/InventoryPlatformClient.js +94 -52
  162. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +27 -13
  163. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +101 -55
  164. package/sdk/platform/Lead/LeadPlatformClient.d.ts +50 -39
  165. package/sdk/platform/Lead/LeadPlatformClient.js +171 -112
  166. package/sdk/platform/Lead/LeadPlatformModel.d.ts +32 -390
  167. package/sdk/platform/Lead/LeadPlatformModel.js +31 -214
  168. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +33 -33
  169. package/sdk/platform/Lead/LeadPlatformValidator.js +23 -23
  170. package/sdk/platform/OAuthClient.js +6 -2
  171. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +4 -2
  172. package/sdk/platform/Order/OrderPlatformApplicationClient.js +12 -10
  173. package/sdk/platform/Order/OrderPlatformClient.d.ts +165 -71
  174. package/sdk/platform/Order/OrderPlatformClient.js +738 -205
  175. package/sdk/platform/Order/OrderPlatformModel.d.ts +261 -3
  176. package/sdk/platform/Order/OrderPlatformModel.js +225 -2
  177. package/sdk/platform/Order/OrderPlatformValidator.d.ts +104 -3
  178. package/sdk/platform/Order/OrderPlatformValidator.js +85 -2
  179. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -22
  180. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +12 -159
  181. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +1 -30
  182. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +0 -26
  183. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -690
  184. package/sdk/platform/Partner/PartnerPlatformModel.js +0 -809
  185. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +167 -32
  186. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +793 -145
  187. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +91 -1
  188. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +91 -0
  189. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -10
  190. package/sdk/platform/Payment/PaymentPlatformClient.js +68 -47
  191. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +549 -7
  192. package/sdk/platform/Payment/PaymentPlatformModel.js +305 -6
  193. package/sdk/platform/PlatformAPIClient.d.ts +3 -3
  194. package/sdk/platform/PlatformAPIClient.js +2 -2
  195. package/sdk/platform/PlatformClient.d.ts +2 -2
  196. package/sdk/platform/PlatformClient.js +4 -4
  197. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +28 -12
  198. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +90 -53
  199. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +1 -12
  200. package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -14
  201. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +62 -26
  202. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +210 -93
  203. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +20 -11
  204. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +23 -11
  205. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +36 -18
  206. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +142 -78
  207. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +12 -3
  208. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +14 -2
  209. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -26
  210. package/sdk/platform/Share/SharePlatformApplicationClient.js +36 -67
  211. package/sdk/platform/Share/SharePlatformModel.d.ts +4 -4
  212. package/sdk/platform/Share/SharePlatformModel.js +4 -4
  213. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +127 -57
  214. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +564 -189
  215. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +63 -26
  216. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +62 -22
  217. package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
  218. package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
  219. package/sdk/platform/Theme/ThemePlatformModel.d.ts +1167 -261
  220. package/sdk/platform/Theme/ThemePlatformModel.js +801 -244
  221. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
  222. package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
  223. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +35 -17
  224. package/sdk/platform/User/UserPlatformApplicationClient.js +132 -73
  225. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +7 -0
  226. package/sdk/platform/User/UserPlatformApplicationValidator.js +3 -0
  227. package/sdk/platform/User/UserPlatformModel.d.ts +1 -738
  228. package/sdk/platform/User/UserPlatformModel.js +3 -899
  229. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +120 -7
  230. package/sdk/platform/Webhook/WebhookPlatformClient.js +799 -41
  231. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +476 -86
  232. package/sdk/platform/Webhook/WebhookPlatformModel.js +388 -89
  233. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +90 -7
  234. package/sdk/platform/Webhook/WebhookPlatformValidator.js +113 -3
  235. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -3
  236. package/sdk/public/Configuration/ConfigurationPublicClient.js +13 -11
  237. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +3 -106
  238. package/sdk/public/Configuration/ConfigurationPublicModel.js +2 -59
  239. package/sdk/public/Inventory/InventoryPublicClient.d.ts +12 -6
  240. package/sdk/public/Inventory/InventoryPublicClient.js +42 -27
  241. package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
  242. package/sdk/public/Partner/PartnerPublicClient.js +110 -0
  243. package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
  244. package/sdk/public/Partner/PartnerPublicModel.js +280 -0
  245. package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
  246. package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
  247. package/sdk/public/PublicAPIClient.d.ts +14 -1
  248. package/sdk/public/PublicAPIClient.js +7 -1
  249. package/sdk/public/PublicClient.d.ts +2 -0
  250. package/sdk/public/PublicClient.js +4 -0
  251. package/sdk/public/Webhook/WebhookPublicClient.d.ts +5 -2
  252. package/sdk/public/Webhook/WebhookPublicClient.js +15 -9
  253. package/sdk/public/Webhook/WebhookPublicModel.d.ts +1 -191
  254. package/sdk/public/Webhook/WebhookPublicModel.js +0 -229
  255. package/sdk/public/index.d.ts +1 -0
  256. package/sdk/public/index.js +2 -0
  257. package/sdk/application/ApplicationModels.d.ts +0 -48
  258. package/sdk/application/ApplicationModels.js +0 -38
  259. package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -106
  260. package/sdk/platform/Partner/PartnerPlatformClient.js +0 -878
  261. package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -208
  262. package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -169
@@ -11,19 +11,254 @@ class Finance {
11
11
  this.config = config;
12
12
  }
13
13
 
14
+ /**
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/).
23
+ */
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
+
14
248
  /**
15
249
  * @param {FinancePlatformValidator.CreditlineDataplatformParam} arg - Arg object
250
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
16
251
  * @param {import("../PlatformAPIClient").Options} - Options
17
252
  * @returns {Promise<FinancePlatformModel.CreditlineDataPlatformResponse>}
18
253
  * - Success response
19
254
  *
20
255
  * @name creditlineDataplatform
21
- * @summary:
22
- * @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/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/).
23
258
  */
24
259
  async creditlineDataplatform(
25
- { body } = {},
26
- { headers } = { headers: false }
260
+ { body, requestHeaders } = { requestHeaders: {} },
261
+ { responseHeaders } = { responseHeaders: false }
27
262
  ) {
28
263
  const {
29
264
  error,
@@ -40,7 +275,390 @@ class Finance {
40
275
  // Showing warrnings if extra unknown parameters are found
41
276
  const {
42
277
  error: warrning,
43
- } = FinancePlatformValidator.creditlineDataplatform().validate(
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(
649
+ {
650
+ body,
651
+ },
652
+ { abortEarly: false, allowUnknown: true }
653
+ );
654
+ if (error) {
655
+ return Promise.reject(new FDKClientValidationError(error));
656
+ }
657
+
658
+ // Showing warrnings if extra unknown parameters are found
659
+ const {
660
+ error: warrning,
661
+ } = FinancePlatformValidator.generateReport().validate(
44
662
  {
45
663
  body,
46
664
  },
@@ -49,7 +667,7 @@ class Finance {
49
667
  if (warrning) {
50
668
  Logger({
51
669
  level: "WARN",
52
- message: `Parameter Validation warrnings for platform > Finance > creditlineDataplatform \n ${warrning}`,
670
+ message: `Parameter Validation warrnings for platform > Finance > generateReport \n ${warrning}`,
53
671
  });
54
672
  }
55
673
 
@@ -60,29 +678,29 @@ class Finance {
60
678
  const response = await PlatformAPIClient.execute(
61
679
  this.config,
62
680
  "post",
63
- `/service/platform/finance/v1.0/company/${this.config.companyId}/credit-line-data`,
681
+ `/service/platform/finance/v1.0/company/${this.config.companyId}/generate-report`,
64
682
  query_params,
65
683
  body,
66
- xHeaders,
67
- { headers }
684
+ { ...xHeaders, ...requestHeaders },
685
+ { responseHeaders }
68
686
  );
69
687
 
70
688
  let responseData = response;
71
- if (headers) {
689
+ if (responseHeaders) {
72
690
  responseData = response[0];
73
691
  }
74
692
 
75
693
  const {
76
694
  error: res_error,
77
- } = FinancePlatformModel.CreditlineDataPlatformResponse().validate(
78
- responseData,
79
- { abortEarly: false, allowUnknown: false }
80
- );
695
+ } = FinancePlatformModel.GenerateReportJson().validate(responseData, {
696
+ abortEarly: false,
697
+ allowUnknown: false,
698
+ });
81
699
 
82
700
  if (res_error) {
83
701
  Logger({
84
702
  level: "WARN",
85
- message: `Response Validation Warnnings for platform > Finance > creditlineDataplatform \n ${res_error}`,
703
+ message: `Response Validation Warnnings for platform > Finance > generateReport \n ${res_error}`,
86
704
  });
87
705
  }
88
706
 
@@ -90,22 +708,23 @@ class Finance {
90
708
  }
91
709
 
92
710
  /**
93
- * @param {FinancePlatformValidator.DownloadCreditDebitNoteParam} arg - Arg object
711
+ * @param {FinancePlatformValidator.GenerateReportCustomerCnParam} arg - Arg object
712
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
94
713
  * @param {import("../PlatformAPIClient").Options} - Options
95
- * @returns {Promise<FinancePlatformModel.DownloadCreditDebitNoteResponse>}
714
+ * @returns {Promise<FinancePlatformModel.GenerateReportCustomerCnResponse>}
96
715
  * - Success response
97
716
  *
98
- * @name downloadCreditDebitNote
99
- * @summary:
100
- * @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/downloadCreditDebitNote/).
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/).
101
720
  */
102
- async downloadCreditDebitNote(
103
- { body } = {},
104
- { headers } = { headers: false }
721
+ async generateReportCustomerCn(
722
+ { body, requestHeaders } = { requestHeaders: {} },
723
+ { responseHeaders } = { responseHeaders: false }
105
724
  ) {
106
725
  const {
107
726
  error,
108
- } = FinancePlatformValidator.downloadCreditDebitNote().validate(
727
+ } = FinancePlatformValidator.generateReportCustomerCn().validate(
109
728
  {
110
729
  body,
111
730
  },
@@ -118,7 +737,7 @@ class Finance {
118
737
  // Showing warrnings if extra unknown parameters are found
119
738
  const {
120
739
  error: warrning,
121
- } = FinancePlatformValidator.downloadCreditDebitNote().validate(
740
+ } = FinancePlatformValidator.generateReportCustomerCn().validate(
122
741
  {
123
742
  body,
124
743
  },
@@ -127,7 +746,7 @@ class Finance {
127
746
  if (warrning) {
128
747
  Logger({
129
748
  level: "WARN",
130
- message: `Parameter Validation warrnings for platform > Finance > downloadCreditDebitNote \n ${warrning}`,
749
+ message: `Parameter Validation warrnings for platform > Finance > generateReportCustomerCn \n ${warrning}`,
131
750
  });
132
751
  }
133
752
 
@@ -138,21 +757,21 @@ class Finance {
138
757
  const response = await PlatformAPIClient.execute(
139
758
  this.config,
140
759
  "post",
141
- `/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`,
142
761
  query_params,
143
762
  body,
144
- xHeaders,
145
- { headers }
763
+ { ...xHeaders, ...requestHeaders },
764
+ { responseHeaders }
146
765
  );
147
766
 
148
767
  let responseData = response;
149
- if (headers) {
768
+ if (responseHeaders) {
150
769
  responseData = response[0];
151
770
  }
152
771
 
153
772
  const {
154
773
  error: res_error,
155
- } = FinancePlatformModel.DownloadCreditDebitNoteResponse().validate(
774
+ } = FinancePlatformModel.GenerateReportCustomerCnResponse().validate(
156
775
  responseData,
157
776
  { abortEarly: false, allowUnknown: false }
158
777
  );
@@ -160,7 +779,7 @@ class Finance {
160
779
  if (res_error) {
161
780
  Logger({
162
781
  level: "WARN",
163
- message: `Response Validation Warnnings for platform > Finance > downloadCreditDebitNote \n ${res_error}`,
782
+ message: `Response Validation Warnnings for platform > Finance > generateReportCustomerCn \n ${res_error}`,
164
783
  });
165
784
  }
166
785
 
@@ -168,15 +787,19 @@ class Finance {
168
787
  }
169
788
 
170
789
  /**
171
- * @param {FinancePlatformValidator.DownloadReportParam} arg - Arg object
790
+ * @param {FinancePlatformValidator.GetAffiliateParam} arg - Arg object
791
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
172
792
  * @param {import("../PlatformAPIClient").Options} - Options
173
- * @returns {Promise<FinancePlatformModel.DownloadReportList>} - Success response
174
- * @name downloadReport
175
- * @summary:
176
- * @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/downloadReport/).
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/).
177
797
  */
178
- async downloadReport({ body } = {}, { headers } = { headers: false }) {
179
- const { error } = FinancePlatformValidator.downloadReport().validate(
798
+ async getAffiliate(
799
+ { body, requestHeaders } = { requestHeaders: {} },
800
+ { responseHeaders } = { responseHeaders: false }
801
+ ) {
802
+ const { error } = FinancePlatformValidator.getAffiliate().validate(
180
803
  {
181
804
  body,
182
805
  },
@@ -189,7 +812,7 @@ class Finance {
189
812
  // Showing warrnings if extra unknown parameters are found
190
813
  const {
191
814
  error: warrning,
192
- } = FinancePlatformValidator.downloadReport().validate(
815
+ } = FinancePlatformValidator.getAffiliate().validate(
193
816
  {
194
817
  body,
195
818
  },
@@ -198,7 +821,7 @@ class Finance {
198
821
  if (warrning) {
199
822
  Logger({
200
823
  level: "WARN",
201
- message: `Parameter Validation warrnings for platform > Finance > downloadReport \n ${warrning}`,
824
+ message: `Parameter Validation warrnings for platform > Finance > getAffiliate \n ${warrning}`,
202
825
  });
203
826
  }
204
827
 
@@ -209,21 +832,21 @@ class Finance {
209
832
  const response = await PlatformAPIClient.execute(
210
833
  this.config,
211
834
  "post",
212
- `/service/platform/finance/v1.0/company/${this.config.companyId}/download-report`,
835
+ `/service/platform/finance/v1.0/company/${this.config.companyId}/get-affiliate-list`,
213
836
  query_params,
214
837
  body,
215
- xHeaders,
216
- { headers }
838
+ { ...xHeaders, ...requestHeaders },
839
+ { responseHeaders }
217
840
  );
218
841
 
219
842
  let responseData = response;
220
- if (headers) {
843
+ if (responseHeaders) {
221
844
  responseData = response[0];
222
845
  }
223
846
 
224
847
  const {
225
848
  error: res_error,
226
- } = FinancePlatformModel.DownloadReportList().validate(responseData, {
849
+ } = FinancePlatformModel.GetAffiliateResponse().validate(responseData, {
227
850
  abortEarly: false,
228
851
  allowUnknown: false,
229
852
  });
@@ -231,7 +854,7 @@ class Finance {
231
854
  if (res_error) {
232
855
  Logger({
233
856
  level: "WARN",
234
- message: `Response Validation Warnnings for platform > Finance > downloadReport \n ${res_error}`,
857
+ message: `Response Validation Warnnings for platform > Finance > getAffiliate \n ${res_error}`,
235
858
  });
236
859
  }
237
860
 
@@ -239,15 +862,19 @@ class Finance {
239
862
  }
240
863
 
241
864
  /**
242
- * @param {FinancePlatformValidator.GenerateReportParam} arg - Arg object
865
+ * @param {FinancePlatformValidator.GetCnConfigParam} arg - Arg object
866
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
243
867
  * @param {import("../PlatformAPIClient").Options} - Options
244
- * @returns {Promise<FinancePlatformModel.GenerateReportJson>} - Success response
245
- * @name generateReport
246
- * @summary:
247
- * @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/generateReport/).
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/).
248
872
  */
249
- async generateReport({ body } = {}, { headers } = { headers: false }) {
250
- const { error } = FinancePlatformValidator.generateReport().validate(
873
+ async getCnConfig(
874
+ { body, requestHeaders } = { requestHeaders: {} },
875
+ { responseHeaders } = { responseHeaders: false }
876
+ ) {
877
+ const { error } = FinancePlatformValidator.getCnConfig().validate(
251
878
  {
252
879
  body,
253
880
  },
@@ -258,9 +885,7 @@ class Finance {
258
885
  }
259
886
 
260
887
  // Showing warrnings if extra unknown parameters are found
261
- const {
262
- error: warrning,
263
- } = FinancePlatformValidator.generateReport().validate(
888
+ const { error: warrning } = FinancePlatformValidator.getCnConfig().validate(
264
889
  {
265
890
  body,
266
891
  },
@@ -269,7 +894,7 @@ class Finance {
269
894
  if (warrning) {
270
895
  Logger({
271
896
  level: "WARN",
272
- message: `Parameter Validation warrnings for platform > Finance > generateReport \n ${warrning}`,
897
+ message: `Parameter Validation warrnings for platform > Finance > getCnConfig \n ${warrning}`,
273
898
  });
274
899
  }
275
900
 
@@ -280,21 +905,21 @@ class Finance {
280
905
  const response = await PlatformAPIClient.execute(
281
906
  this.config,
282
907
  "post",
283
- `/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`,
284
909
  query_params,
285
910
  body,
286
- xHeaders,
287
- { headers }
911
+ { ...xHeaders, ...requestHeaders },
912
+ { responseHeaders }
288
913
  );
289
914
 
290
915
  let responseData = response;
291
- if (headers) {
916
+ if (responseHeaders) {
292
917
  responseData = response[0];
293
918
  }
294
919
 
295
920
  const {
296
921
  error: res_error,
297
- } = FinancePlatformModel.GenerateReportJson().validate(responseData, {
922
+ } = FinancePlatformModel.GetCnConfigResponse().validate(responseData, {
298
923
  abortEarly: false,
299
924
  allowUnknown: false,
300
925
  });
@@ -302,7 +927,7 @@ class Finance {
302
927
  if (res_error) {
303
928
  Logger({
304
929
  level: "WARN",
305
- message: `Response Validation Warnnings for platform > Finance > generateReport \n ${res_error}`,
930
+ message: `Response Validation Warnnings for platform > Finance > getCnConfig \n ${res_error}`,
306
931
  });
307
932
  }
308
933
 
@@ -310,15 +935,23 @@ class Finance {
310
935
  }
311
936
 
312
937
  /**
313
- * @param {FinancePlatformValidator.GetAffiliateParam} arg - Arg object
938
+ * @param {FinancePlatformValidator.GetCustomerCreditBalanceParam} arg - Arg object
939
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
314
940
  * @param {import("../PlatformAPIClient").Options} - Options
315
- * @returns {Promise<FinancePlatformModel.GetAffiliateResponse>} - Success response
316
- * @name getAffiliate
317
- * @summary:
318
- * @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/getAffiliate/).
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/).
319
947
  */
320
- async getAffiliate({ body } = {}, { headers } = { headers: false }) {
321
- const { error } = FinancePlatformValidator.getAffiliate().validate(
948
+ async getCustomerCreditBalance(
949
+ { body, requestHeaders } = { requestHeaders: {} },
950
+ { responseHeaders } = { responseHeaders: false }
951
+ ) {
952
+ const {
953
+ error,
954
+ } = FinancePlatformValidator.getCustomerCreditBalance().validate(
322
955
  {
323
956
  body,
324
957
  },
@@ -331,7 +964,7 @@ class Finance {
331
964
  // Showing warrnings if extra unknown parameters are found
332
965
  const {
333
966
  error: warrning,
334
- } = FinancePlatformValidator.getAffiliate().validate(
967
+ } = FinancePlatformValidator.getCustomerCreditBalance().validate(
335
968
  {
336
969
  body,
337
970
  },
@@ -340,7 +973,7 @@ class Finance {
340
973
  if (warrning) {
341
974
  Logger({
342
975
  level: "WARN",
343
- message: `Parameter Validation warrnings for platform > Finance > getAffiliate \n ${warrning}`,
976
+ message: `Parameter Validation warrnings for platform > Finance > getCustomerCreditBalance \n ${warrning}`,
344
977
  });
345
978
  }
346
979
 
@@ -351,29 +984,29 @@ class Finance {
351
984
  const response = await PlatformAPIClient.execute(
352
985
  this.config,
353
986
  "post",
354
- `/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`,
355
988
  query_params,
356
989
  body,
357
- xHeaders,
358
- { headers }
990
+ { ...xHeaders, ...requestHeaders },
991
+ { responseHeaders }
359
992
  );
360
993
 
361
994
  let responseData = response;
362
- if (headers) {
995
+ if (responseHeaders) {
363
996
  responseData = response[0];
364
997
  }
365
998
 
366
999
  const {
367
1000
  error: res_error,
368
- } = FinancePlatformModel.GetAffiliateResponse().validate(responseData, {
369
- abortEarly: false,
370
- allowUnknown: false,
371
- });
1001
+ } = FinancePlatformModel.GetCustomerCreditBalanceResponse().validate(
1002
+ responseData,
1003
+ { abortEarly: false, allowUnknown: false }
1004
+ );
372
1005
 
373
1006
  if (res_error) {
374
1007
  Logger({
375
1008
  level: "WARN",
376
- message: `Response Validation Warnnings for platform > Finance > getAffiliate \n ${res_error}`,
1009
+ message: `Response Validation Warnnings for platform > Finance > getCustomerCreditBalance \n ${res_error}`,
377
1010
  });
378
1011
  }
379
1012
 
@@ -382,13 +1015,17 @@ class Finance {
382
1015
 
383
1016
  /**
384
1017
  * @param {FinancePlatformValidator.GetDataParam} arg - Arg object
1018
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
385
1019
  * @param {import("../PlatformAPIClient").Options} - Options
386
1020
  * @returns {Promise<FinancePlatformModel.GetEngineResponse>} - Success response
387
1021
  * @name getData
388
- * @summary:
389
- * @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/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/).
390
1024
  */
391
- async getData({ body } = {}, { headers } = { headers: false }) {
1025
+ async getData(
1026
+ { body, requestHeaders } = { requestHeaders: {} },
1027
+ { responseHeaders } = { responseHeaders: false }
1028
+ ) {
392
1029
  const { error } = FinancePlatformValidator.getData().validate(
393
1030
  {
394
1031
  body,
@@ -423,12 +1060,12 @@ class Finance {
423
1060
  `/service/platform/finance/v1.0/company/${this.config.companyId}/get-data`,
424
1061
  query_params,
425
1062
  body,
426
- xHeaders,
427
- { headers }
1063
+ { ...xHeaders, ...requestHeaders },
1064
+ { responseHeaders }
428
1065
  );
429
1066
 
430
1067
  let responseData = response;
431
- if (headers) {
1068
+ if (responseHeaders) {
432
1069
  responseData = response[0];
433
1070
  }
434
1071
 
@@ -449,15 +1086,94 @@ class Finance {
449
1086
  return response;
450
1087
  }
451
1088
 
1089
+ /**
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/).
1097
+ */
1098
+ async getPdfUrlView(
1099
+ { body, requestHeaders } = { requestHeaders: {} },
1100
+ { responseHeaders } = { responseHeaders: false }
1101
+ ) {
1102
+ const { error } = FinancePlatformValidator.getPdfUrlView().validate(
1103
+ {
1104
+ body,
1105
+ },
1106
+ { abortEarly: false, allowUnknown: true }
1107
+ );
1108
+ if (error) {
1109
+ return Promise.reject(new FDKClientValidationError(error));
1110
+ }
1111
+
1112
+ // Showing warrnings if extra unknown parameters are found
1113
+ const {
1114
+ error: warrning,
1115
+ } = FinancePlatformValidator.getPdfUrlView().validate(
1116
+ {
1117
+ body,
1118
+ },
1119
+ { abortEarly: false, allowUnknown: false }
1120
+ );
1121
+ if (warrning) {
1122
+ Logger({
1123
+ level: "WARN",
1124
+ message: `Parameter Validation warrnings for platform > Finance > getPdfUrlView \n ${warrning}`,
1125
+ });
1126
+ }
1127
+
1128
+ const query_params = {};
1129
+
1130
+ const xHeaders = {};
1131
+
1132
+ const response = await PlatformAPIClient.execute(
1133
+ this.config,
1134
+ "post",
1135
+ `/service/platform/finance/v1.0/company/${this.config.companyId}/get-cn-pdf-link`,
1136
+ query_params,
1137
+ body,
1138
+ { ...xHeaders, ...requestHeaders },
1139
+ { responseHeaders }
1140
+ );
1141
+
1142
+ let responseData = response;
1143
+ if (responseHeaders) {
1144
+ responseData = response[0];
1145
+ }
1146
+
1147
+ const {
1148
+ error: res_error,
1149
+ } = FinancePlatformModel.GetPdfUrlViewResponse().validate(responseData, {
1150
+ abortEarly: false,
1151
+ allowUnknown: false,
1152
+ });
1153
+
1154
+ if (res_error) {
1155
+ Logger({
1156
+ level: "WARN",
1157
+ message: `Response Validation Warnnings for platform > Finance > getPdfUrlView \n ${res_error}`,
1158
+ });
1159
+ }
1160
+
1161
+ return response;
1162
+ }
1163
+
452
1164
  /**
453
1165
  * @param {FinancePlatformValidator.GetReasonParam} arg - Arg object
1166
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
454
1167
  * @param {import("../PlatformAPIClient").Options} - Options
455
1168
  * @returns {Promise<FinancePlatformModel.GetReasonResponse>} - Success response
456
1169
  * @name getReason
457
- * @summary:
458
- * @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/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/).
459
1172
  */
460
- async getReason({ body } = {}, { headers } = { headers: false }) {
1173
+ async getReason(
1174
+ { body, requestHeaders } = { requestHeaders: {} },
1175
+ { responseHeaders } = { responseHeaders: false }
1176
+ ) {
461
1177
  const { error } = FinancePlatformValidator.getReason().validate(
462
1178
  {
463
1179
  body,
@@ -492,12 +1208,12 @@ class Finance {
492
1208
  `/service/platform/finance/v1.0/company/${this.config.companyId}/get-reason`,
493
1209
  query_params,
494
1210
  body,
495
- xHeaders,
496
- { headers }
1211
+ { ...xHeaders, ...requestHeaders },
1212
+ { responseHeaders }
497
1213
  );
498
1214
 
499
1215
  let responseData = response;
500
- if (headers) {
1216
+ if (responseHeaders) {
501
1217
  responseData = response[0];
502
1218
  }
503
1219
 
@@ -520,13 +1236,17 @@ class Finance {
520
1236
 
521
1237
  /**
522
1238
  * @param {FinancePlatformValidator.GetReportListParam} arg - Arg object
1239
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
523
1240
  * @param {import("../PlatformAPIClient").Options} - Options
524
- * @returns {Promise<FinancePlatformModel.GetEngineResponse>} - Success response
1241
+ * @returns {Promise<FinancePlatformModel.GetReportListResponse>} - Success response
525
1242
  * @name getReportList
526
- * @summary:
527
- * @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/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/).
528
1245
  */
529
- async getReportList({ body } = {}, { headers } = { headers: false }) {
1246
+ async getReportList(
1247
+ { body, requestHeaders } = { requestHeaders: {} },
1248
+ { responseHeaders } = { responseHeaders: false }
1249
+ ) {
530
1250
  const { error } = FinancePlatformValidator.getReportList().validate(
531
1251
  {
532
1252
  body,
@@ -563,18 +1283,18 @@ class Finance {
563
1283
  `/service/platform/finance/v1.0/company/${this.config.companyId}/get-report-list`,
564
1284
  query_params,
565
1285
  body,
566
- xHeaders,
567
- { headers }
1286
+ { ...xHeaders, ...requestHeaders },
1287
+ { responseHeaders }
568
1288
  );
569
1289
 
570
1290
  let responseData = response;
571
- if (headers) {
1291
+ if (responseHeaders) {
572
1292
  responseData = response[0];
573
1293
  }
574
1294
 
575
1295
  const {
576
1296
  error: res_error,
577
- } = FinancePlatformModel.GetEngineResponse().validate(responseData, {
1297
+ } = FinancePlatformModel.GetReportListResponse().validate(responseData, {
578
1298
  abortEarly: false,
579
1299
  allowUnknown: false,
580
1300
  });
@@ -589,15 +1309,99 @@ class Finance {
589
1309
  return response;
590
1310
  }
591
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}`,
1386
+ });
1387
+ }
1388
+
1389
+ return response;
1390
+ }
1391
+
592
1392
  /**
593
1393
  * @param {FinancePlatformValidator.InvoiceListingParam} arg - Arg object
1394
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
594
1395
  * @param {import("../PlatformAPIClient").Options} - Options
595
1396
  * @returns {Promise<FinancePlatformModel.InvoiceListingResponse>} - Success response
596
1397
  * @name invoiceListing
597
- * @summary:
598
- * @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/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/).
599
1400
  */
600
- async invoiceListing({ body } = {}, { headers } = { headers: false }) {
1401
+ async invoiceListing(
1402
+ { body, requestHeaders } = { requestHeaders: {} },
1403
+ { responseHeaders } = { responseHeaders: false }
1404
+ ) {
601
1405
  const { error } = FinancePlatformValidator.invoiceListing().validate(
602
1406
  {
603
1407
  body,
@@ -634,12 +1438,12 @@ class Finance {
634
1438
  `/service/platform/finance/v1.0/company/${this.config.companyId}/invoice/listing`,
635
1439
  query_params,
636
1440
  body,
637
- xHeaders,
638
- { headers }
1441
+ { ...xHeaders, ...requestHeaders },
1442
+ { responseHeaders }
639
1443
  );
640
1444
 
641
1445
  let responseData = response;
642
- if (headers) {
1446
+ if (responseHeaders) {
643
1447
  responseData = response[0];
644
1448
  }
645
1449
 
@@ -662,13 +1466,17 @@ class Finance {
662
1466
 
663
1467
  /**
664
1468
  * @param {FinancePlatformValidator.InvoicePDFParam} arg - Arg object
1469
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
665
1470
  * @param {import("../PlatformAPIClient").Options} - Options
666
1471
  * @returns {Promise<FinancePlatformModel.InvoicePdfResponse>} - Success response
667
1472
  * @name invoicePDF
668
- * @summary:
669
- * @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/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/).
670
1475
  */
671
- async invoicePDF({ body } = {}, { headers } = { headers: false }) {
1476
+ async invoicePDF(
1477
+ { body, requestHeaders } = { requestHeaders: {} },
1478
+ { responseHeaders } = { responseHeaders: false }
1479
+ ) {
672
1480
  const { error } = FinancePlatformValidator.invoicePDF().validate(
673
1481
  {
674
1482
  body,
@@ -703,12 +1511,12 @@ class Finance {
703
1511
  `/service/platform/finance/v1.0/company/${this.config.companyId}/invoice/pdf-view`,
704
1512
  query_params,
705
1513
  body,
706
- xHeaders,
707
- { headers }
1514
+ { ...xHeaders, ...requestHeaders },
1515
+ { responseHeaders }
708
1516
  );
709
1517
 
710
1518
  let responseData = response;
711
- if (headers) {
1519
+ if (responseHeaders) {
712
1520
  responseData = response[0];
713
1521
  }
714
1522
 
@@ -731,13 +1539,17 @@ class Finance {
731
1539
 
732
1540
  /**
733
1541
  * @param {FinancePlatformValidator.InvoiceTypeParam} arg - Arg object
1542
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
734
1543
  * @param {import("../PlatformAPIClient").Options} - Options
735
1544
  * @returns {Promise<FinancePlatformModel.InvoiceTypeResponse>} - Success response
736
1545
  * @name invoiceType
737
- * @summary:
738
- * @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/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/).
739
1548
  */
740
- async invoiceType({ body } = {}, { headers } = { headers: false }) {
1549
+ async invoiceType(
1550
+ { body, requestHeaders } = { requestHeaders: {} },
1551
+ { responseHeaders } = { responseHeaders: false }
1552
+ ) {
741
1553
  const { error } = FinancePlatformValidator.invoiceType().validate(
742
1554
  {
743
1555
  body,
@@ -772,12 +1584,12 @@ class Finance {
772
1584
  `/service/platform/finance/v1.0/company/${this.config.companyId}/invoice-type`,
773
1585
  query_params,
774
1586
  body,
775
- xHeaders,
776
- { headers }
1587
+ { ...xHeaders, ...requestHeaders },
1588
+ { responseHeaders }
777
1589
  );
778
1590
 
779
1591
  let responseData = response;
780
- if (headers) {
1592
+ if (responseHeaders) {
781
1593
  responseData = response[0];
782
1594
  }
783
1595
 
@@ -798,16 +1610,96 @@ class Finance {
798
1610
  return response;
799
1611
  }
800
1612
 
1613
+ /**
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/).
1622
+ */
1623
+ async isCnRefundMethod(
1624
+ { body, requestHeaders } = { requestHeaders: {} },
1625
+ { responseHeaders } = { responseHeaders: false }
1626
+ ) {
1627
+ const { error } = FinancePlatformValidator.isCnRefundMethod().validate(
1628
+ {
1629
+ body,
1630
+ },
1631
+ { abortEarly: false, allowUnknown: true }
1632
+ );
1633
+ if (error) {
1634
+ return Promise.reject(new FDKClientValidationError(error));
1635
+ }
1636
+
1637
+ // Showing warrnings if extra unknown parameters are found
1638
+ const {
1639
+ error: warrning,
1640
+ } = FinancePlatformValidator.isCnRefundMethod().validate(
1641
+ {
1642
+ body,
1643
+ },
1644
+ { abortEarly: false, allowUnknown: false }
1645
+ );
1646
+ if (warrning) {
1647
+ Logger({
1648
+ level: "WARN",
1649
+ message: `Parameter Validation warrnings for platform > Finance > isCnRefundMethod \n ${warrning}`,
1650
+ });
1651
+ }
1652
+
1653
+ const query_params = {};
1654
+
1655
+ const xHeaders = {};
1656
+
1657
+ const response = await PlatformAPIClient.execute(
1658
+ this.config,
1659
+ "post",
1660
+ `/service/platform/finance/v1.0/company/${this.config.companyId}/cn-as-refund-method`,
1661
+ query_params,
1662
+ body,
1663
+ { ...xHeaders, ...requestHeaders },
1664
+ { responseHeaders }
1665
+ );
1666
+
1667
+ let responseData = response;
1668
+ if (responseHeaders) {
1669
+ responseData = response[0];
1670
+ }
1671
+
1672
+ const {
1673
+ error: res_error,
1674
+ } = FinancePlatformModel.IsCnRefundMethodResponse().validate(responseData, {
1675
+ abortEarly: false,
1676
+ allowUnknown: false,
1677
+ });
1678
+
1679
+ if (res_error) {
1680
+ Logger({
1681
+ level: "WARN",
1682
+ message: `Response Validation Warnnings for platform > Finance > isCnRefundMethod \n ${res_error}`,
1683
+ });
1684
+ }
1685
+
1686
+ return response;
1687
+ }
1688
+
801
1689
  /**
802
1690
  * @param {FinancePlatformValidator.IsCreditlinePlatformParam} arg - Arg object
1691
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
803
1692
  * @param {import("../PlatformAPIClient").Options} - Options
804
1693
  * @returns {Promise<FinancePlatformModel.IsCreditlinePlatformResponse>} -
805
1694
  * Success response
806
1695
  * @name isCreditlinePlatform
807
- * @summary:
808
- * @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/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/).
809
1698
  */
810
- async isCreditlinePlatform({ body } = {}, { headers } = { headers: false }) {
1699
+ async isCreditlinePlatform(
1700
+ { body, requestHeaders } = { requestHeaders: {} },
1701
+ { responseHeaders } = { responseHeaders: false }
1702
+ ) {
811
1703
  const { error } = FinancePlatformValidator.isCreditlinePlatform().validate(
812
1704
  {
813
1705
  body,
@@ -844,12 +1736,12 @@ class Finance {
844
1736
  `/service/platform/finance/v1.0/company/${this.config.companyId}/creditline-opted`,
845
1737
  query_params,
846
1738
  body,
847
- xHeaders,
848
- { headers }
1739
+ { ...xHeaders, ...requestHeaders },
1740
+ { responseHeaders }
849
1741
  );
850
1742
 
851
1743
  let responseData = response;
852
- if (headers) {
1744
+ if (responseHeaders) {
853
1745
  responseData = response[0];
854
1746
  }
855
1747
 
@@ -872,13 +1764,17 @@ class Finance {
872
1764
 
873
1765
  /**
874
1766
  * @param {FinancePlatformValidator.PaymentProcessParam} arg - Arg object
1767
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
875
1768
  * @param {import("../PlatformAPIClient").Options} - Options
876
1769
  * @returns {Promise<FinancePlatformModel.PaymentProcessResponse>} - Success response
877
1770
  * @name paymentProcess
878
- * @summary:
879
- * @description: - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/finance/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/).
880
1773
  */
881
- async paymentProcess({ body } = {}, { headers } = { headers: false }) {
1774
+ async paymentProcess(
1775
+ { body, requestHeaders } = { requestHeaders: {} },
1776
+ { responseHeaders } = { responseHeaders: false }
1777
+ ) {
882
1778
  const { error } = FinancePlatformValidator.paymentProcess().validate(
883
1779
  {
884
1780
  body,
@@ -915,12 +1811,12 @@ class Finance {
915
1811
  `/service/platform/finance/v1.0/company/${this.config.companyId}/payment-process`,
916
1812
  query_params,
917
1813
  body,
918
- xHeaders,
919
- { headers }
1814
+ { ...xHeaders, ...requestHeaders },
1815
+ { responseHeaders }
920
1816
  );
921
1817
 
922
1818
  let responseData = response;
923
- if (headers) {
1819
+ if (responseHeaders) {
924
1820
  responseData = response[0];
925
1821
  }
926
1822