@gofynd/fdk-client-javascript 1.4.15-beta.13 → 1.4.15-beta.15

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 (278) hide show
  1. package/README.md +23 -26
  2. package/package.json +5 -1
  3. package/sdk/application/ApplicationClient.d.ts +5 -6
  4. package/sdk/application/ApplicationClient.js +24 -20
  5. package/sdk/application/Cart/CartApplicationClient.d.ts +133 -83
  6. package/sdk/application/Cart/CartApplicationClient.js +444 -76
  7. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +132 -114
  8. package/sdk/application/Catalog/CatalogApplicationClient.js +209 -126
  9. package/sdk/application/Common/CommonApplicationClient.d.ts +4 -4
  10. package/sdk/application/Common/CommonApplicationClient.js +4 -4
  11. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +3 -3
  12. package/sdk/application/Communication/CommunicationApplicationClient.js +3 -3
  13. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +58 -36
  14. package/sdk/application/Configuration/ConfigurationApplicationClient.js +73 -29
  15. package/sdk/application/Content/ContentApplicationClient.d.ts +95 -66
  16. package/sdk/application/Content/ContentApplicationClient.js +274 -111
  17. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +11 -11
  18. package/sdk/application/FileStorage/FileStorageApplicationClient.js +10 -10
  19. package/sdk/application/Finance/FinanceApplicationClient.d.ts +29 -0
  20. package/sdk/application/Finance/FinanceApplicationClient.js +111 -0
  21. package/sdk/application/Lead/LeadApplicationClient.d.ts +7 -7
  22. package/sdk/application/Lead/LeadApplicationClient.js +6 -6
  23. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +37 -57
  24. package/sdk/application/Logistic/LogisticApplicationClient.js +117 -180
  25. package/sdk/application/Order/OrderApplicationClient.d.ts +63 -21
  26. package/sdk/application/Order/OrderApplicationClient.js +217 -17
  27. package/sdk/application/Payment/PaymentApplicationClient.d.ts +179 -149
  28. package/sdk/application/Payment/PaymentApplicationClient.js +301 -167
  29. package/sdk/application/Share/ShareApplicationClient.d.ts +7 -7
  30. package/sdk/application/Share/ShareApplicationClient.js +7 -7
  31. package/sdk/application/Theme/ThemeApplicationClient.d.ts +7 -7
  32. package/sdk/application/Theme/ThemeApplicationClient.js +10 -6
  33. package/sdk/application/User/UserApplicationClient.d.ts +103 -53
  34. package/sdk/application/User/UserApplicationClient.js +308 -49
  35. package/sdk/common/AxiosHelper.js +11 -4
  36. package/sdk/common/Constant.d.ts +27 -4
  37. package/sdk/common/Constant.js +33 -6
  38. package/sdk/common/utils.d.ts +10 -0
  39. package/sdk/common/utils.js +24 -3
  40. package/sdk/partner/FileStorage/FileStoragePartnerClient.d.ts +46 -16
  41. package/sdk/partner/FileStorage/FileStoragePartnerClient.js +266 -40
  42. package/sdk/partner/FileStorage/FileStoragePartnerModel.d.ts +163 -19
  43. package/sdk/partner/FileStorage/FileStoragePartnerModel.js +158 -14
  44. package/sdk/partner/FileStorage/FileStoragePartnerValidator.d.ts +5 -2
  45. package/sdk/partner/FileStorage/FileStoragePartnerValidator.js +23 -7
  46. package/sdk/partner/Lead/LeadPartnerClient.d.ts +9 -9
  47. package/sdk/partner/Lead/LeadPartnerClient.js +9 -9
  48. package/sdk/partner/Lead/LeadPartnerModel.d.ts +14 -9
  49. package/sdk/partner/Lead/LeadPartnerModel.js +19 -17
  50. package/sdk/partner/Logistics/LogisticsPartnerClient.d.ts +264 -49
  51. package/sdk/partner/Logistics/LogisticsPartnerClient.js +2116 -252
  52. package/sdk/partner/Logistics/LogisticsPartnerModel.d.ts +2256 -258
  53. package/sdk/partner/Logistics/LogisticsPartnerModel.js +1187 -230
  54. package/sdk/partner/Logistics/LogisticsPartnerValidator.d.ts +21 -1
  55. package/sdk/partner/Logistics/LogisticsPartnerValidator.js +218 -13
  56. package/sdk/partner/PartnerClient.d.ts +5 -2
  57. package/sdk/partner/PartnerClient.js +21 -7
  58. package/sdk/partner/Theme/ThemePartnerClient.d.ts +32 -34
  59. package/sdk/partner/Theme/ThemePartnerClient.js +42 -44
  60. package/sdk/partner/Theme/ThemePartnerModel.d.ts +142 -43
  61. package/sdk/partner/Theme/ThemePartnerModel.js +129 -44
  62. package/sdk/partner/Theme/ThemePartnerValidator.js +4 -4
  63. package/sdk/partner/Webhook/WebhookPartnerClient.d.ts +83 -27
  64. package/sdk/partner/Webhook/WebhookPartnerClient.js +446 -27
  65. package/sdk/partner/Webhook/WebhookPartnerModel.d.ts +920 -185
  66. package/sdk/partner/Webhook/WebhookPartnerModel.js +462 -154
  67. package/sdk/partner/Webhook/WebhookPartnerValidator.d.ts +5 -0
  68. package/sdk/partner/Webhook/WebhookPartnerValidator.js +41 -3
  69. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +8 -7
  70. package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +17 -11
  71. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +4 -1
  72. package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +1 -1
  73. package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +68 -13
  74. package/sdk/platform/Analytics/AnalyticsPlatformModel.js +44 -6
  75. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +3 -33
  76. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +4 -244
  77. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +49 -145
  78. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +20 -171
  79. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +1 -39
  80. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +0 -35
  81. package/sdk/platform/Billing/BillingPlatformClient.d.ts +15 -15
  82. package/sdk/platform/Billing/BillingPlatformClient.js +18 -18
  83. package/sdk/platform/Billing/BillingPlatformModel.d.ts +443 -388
  84. package/sdk/platform/Billing/BillingPlatformModel.js +280 -263
  85. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +16 -18
  86. package/sdk/platform/Billing/BillingPlatformValidator.js +8 -9
  87. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +266 -203
  88. package/sdk/platform/Cart/CartPlatformApplicationClient.js +1446 -500
  89. package/sdk/platform/Cart/CartPlatformApplicationValidator.d.ts +729 -100
  90. package/sdk/platform/Cart/CartPlatformApplicationValidator.js +446 -82
  91. package/sdk/platform/Cart/CartPlatformModel.d.ts +6927 -1396
  92. package/sdk/platform/Cart/CartPlatformModel.js +3065 -1316
  93. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +433 -248
  94. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +1662 -559
  95. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.d.ts +464 -159
  96. package/sdk/platform/Catalog/CatalogPlatformApplicationValidator.js +304 -87
  97. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +383 -234
  98. package/sdk/platform/Catalog/CatalogPlatformClient.js +2475 -1557
  99. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +9571 -2674
  100. package/sdk/platform/Catalog/CatalogPlatformModel.js +5081 -2019
  101. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +364 -117
  102. package/sdk/platform/Catalog/CatalogPlatformValidator.js +281 -104
  103. package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -4
  104. package/sdk/platform/Common/CommonPlatformClient.js +6 -5
  105. package/sdk/platform/Common/CommonPlatformModel.d.ts +36 -25
  106. package/sdk/platform/Common/CommonPlatformModel.js +25 -14
  107. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +80 -153
  108. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +102 -541
  109. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +36 -49
  110. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +20 -60
  111. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +1 -1
  112. package/sdk/platform/Communication/CommunicationPlatformClient.js +1 -1
  113. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +189 -43
  114. package/sdk/platform/Communication/CommunicationPlatformModel.js +165 -42
  115. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +58 -81
  116. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +68 -116
  117. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +291 -249
  118. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +243 -234
  119. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +12 -12
  120. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +12 -12
  121. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +78 -65
  122. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +101 -88
  123. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +20 -20
  124. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +19 -19
  125. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +68 -34
  126. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +174 -41
  127. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +667 -244
  128. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +474 -155
  129. package/sdk/platform/Configuration/ConfigurationPlatformValidator.d.ts +37 -9
  130. package/sdk/platform/Configuration/ConfigurationPlatformValidator.js +27 -8
  131. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +366 -280
  132. package/sdk/platform/Content/ContentPlatformApplicationClient.js +1435 -753
  133. package/sdk/platform/Content/ContentPlatformApplicationValidator.d.ts +323 -223
  134. package/sdk/platform/Content/ContentPlatformApplicationValidator.js +335 -205
  135. package/sdk/platform/Content/ContentPlatformClient.d.ts +304 -106
  136. package/sdk/platform/Content/ContentPlatformClient.js +1842 -450
  137. package/sdk/platform/Content/ContentPlatformModel.d.ts +2582 -566
  138. package/sdk/platform/Content/ContentPlatformModel.js +1426 -558
  139. package/sdk/platform/Content/ContentPlatformValidator.d.ts +293 -114
  140. package/sdk/platform/Content/ContentPlatformValidator.js +328 -101
  141. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +59 -23
  142. package/sdk/platform/Discount/DiscountPlatformClient.js +84 -23
  143. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +403 -110
  144. package/sdk/platform/Discount/DiscountPlatformModel.js +121 -107
  145. package/sdk/platform/Discount/DiscountPlatformValidator.d.ts +56 -36
  146. package/sdk/platform/Discount/DiscountPlatformValidator.js +29 -19
  147. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +12 -110
  148. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +14 -684
  149. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +5 -94
  150. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +4 -115
  151. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +20 -20
  152. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +22 -22
  153. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +90 -920
  154. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +53 -949
  155. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +6 -6
  156. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +6 -6
  157. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +10 -10
  158. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +10 -10
  159. package/sdk/platform/Lead/LeadPlatformClient.d.ts +11 -11
  160. package/sdk/platform/Lead/LeadPlatformClient.js +11 -11
  161. package/sdk/platform/Lead/LeadPlatformModel.d.ts +14 -9
  162. package/sdk/platform/Lead/LeadPlatformModel.js +20 -18
  163. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +56 -9
  164. package/sdk/platform/Order/OrderPlatformApplicationClient.js +340 -10
  165. package/sdk/platform/Order/OrderPlatformApplicationValidator.d.ts +128 -24
  166. package/sdk/platform/Order/OrderPlatformApplicationValidator.js +81 -19
  167. package/sdk/platform/Order/OrderPlatformClient.d.ts +517 -160
  168. package/sdk/platform/Order/OrderPlatformClient.js +1623 -384
  169. package/sdk/platform/Order/OrderPlatformModel.d.ts +10372 -1587
  170. package/sdk/platform/Order/OrderPlatformModel.js +5726 -1512
  171. package/sdk/platform/Order/OrderPlatformValidator.d.ts +539 -123
  172. package/sdk/platform/Order/OrderPlatformValidator.js +323 -92
  173. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +8 -6
  174. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +11 -9
  175. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +6 -4
  176. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +3 -2
  177. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +77 -25
  178. package/sdk/platform/Partner/PartnerPlatformModel.js +32 -21
  179. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +144 -219
  180. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +307 -796
  181. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +86 -121
  182. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +80 -138
  183. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +30 -30
  184. package/sdk/platform/Payment/PaymentPlatformClient.js +30 -30
  185. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +901 -761
  186. package/sdk/platform/Payment/PaymentPlatformModel.js +663 -583
  187. package/sdk/platform/Payment/PaymentPlatformValidator.d.ts +8 -8
  188. package/sdk/platform/Payment/PaymentPlatformValidator.js +8 -8
  189. package/sdk/platform/PlatformApplicationClient.d.ts +0 -2
  190. package/sdk/platform/PlatformApplicationClient.js +0 -4
  191. package/sdk/platform/PlatformClient.d.ts +5 -4
  192. package/sdk/platform/PlatformClient.js +32 -22
  193. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +526 -69
  194. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +3337 -337
  195. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +603 -38
  196. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +529 -32
  197. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +184 -133
  198. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +780 -491
  199. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +9408 -1666
  200. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +5720 -1765
  201. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.d.ts +257 -180
  202. package/sdk/platform/Serviceability/ServiceabilityPlatformValidator.js +185 -127
  203. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +7 -7
  204. package/sdk/platform/Share/SharePlatformApplicationClient.js +7 -7
  205. package/sdk/platform/Share/SharePlatformModel.d.ts +45 -9
  206. package/sdk/platform/Share/SharePlatformModel.js +31 -6
  207. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +26 -26
  208. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +38 -29
  209. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +18 -3
  210. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +10 -2
  211. package/sdk/platform/Theme/ThemePlatformClient.d.ts +4 -4
  212. package/sdk/platform/Theme/ThemePlatformClient.js +4 -4
  213. package/sdk/platform/Theme/ThemePlatformModel.d.ts +103 -17
  214. package/sdk/platform/Theme/ThemePlatformModel.js +92 -23
  215. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +167 -45
  216. package/sdk/platform/User/UserPlatformApplicationClient.js +950 -67
  217. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +189 -3
  218. package/sdk/platform/User/UserPlatformApplicationValidator.js +157 -3
  219. package/sdk/platform/User/UserPlatformModel.d.ts +880 -47
  220. package/sdk/platform/User/UserPlatformModel.js +607 -46
  221. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +33 -86
  222. package/sdk/platform/Webhook/WebhookPlatformClient.js +79 -474
  223. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +861 -422
  224. package/sdk/platform/Webhook/WebhookPlatformModel.js +469 -391
  225. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +10 -55
  226. package/sdk/platform/Webhook/WebhookPlatformValidator.js +12 -72
  227. package/sdk/platform/index.d.ts +0 -2
  228. package/sdk/platform/index.js +0 -4
  229. package/sdk/public/Catalog/CatalogPublicClient.d.ts +22 -0
  230. package/sdk/public/Catalog/CatalogPublicClient.js +133 -0
  231. package/sdk/public/Catalog/CatalogPublicModel.d.ts +158 -0
  232. package/sdk/public/Catalog/CatalogPublicModel.js +116 -0
  233. package/sdk/public/Catalog/CatalogPublicValidator.d.ts +55 -0
  234. package/sdk/public/Catalog/CatalogPublicValidator.js +35 -0
  235. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -4
  236. package/sdk/public/Configuration/ConfigurationPublicClient.js +9 -8
  237. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +41 -21
  238. package/sdk/public/Configuration/ConfigurationPublicModel.js +28 -12
  239. package/sdk/public/Content/ContentPublicClient.d.ts +145 -2
  240. package/sdk/public/Content/ContentPublicClient.js +1067 -17
  241. package/sdk/public/Content/ContentPublicModel.d.ts +704 -3
  242. package/sdk/public/Content/ContentPublicModel.js +751 -3
  243. package/sdk/public/Content/ContentPublicValidator.d.ts +94 -3
  244. package/sdk/public/Content/ContentPublicValidator.js +119 -2
  245. package/sdk/public/Partner/PartnerPublicClient.d.ts +1 -1
  246. package/sdk/public/Partner/PartnerPublicClient.js +1 -1
  247. package/sdk/public/Partner/PartnerPublicModel.d.ts +248 -72
  248. package/sdk/public/Partner/PartnerPublicModel.js +81 -71
  249. package/sdk/public/Partner/PartnerPublicValidator.d.ts +2 -2
  250. package/sdk/public/Partner/PartnerPublicValidator.js +1 -1
  251. package/sdk/public/PublicClient.d.ts +5 -2
  252. package/sdk/public/PublicClient.js +16 -6
  253. package/sdk/public/Webhook/WebhookPublicClient.d.ts +13 -13
  254. package/sdk/public/Webhook/WebhookPublicClient.js +13 -13
  255. package/sdk/public/Webhook/WebhookPublicModel.d.ts +249 -67
  256. package/sdk/public/Webhook/WebhookPublicModel.js +81 -61
  257. package/sdk/public/Webhook/WebhookPublicValidator.d.ts +4 -4
  258. package/sdk/public/Webhook/WebhookPublicValidator.js +4 -4
  259. package/sdk/public/index.d.ts +1 -0
  260. package/sdk/public/index.js +2 -0
  261. package/utility.d.ts +3 -0
  262. package/utility.js +7 -0
  263. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +0 -79
  264. package/sdk/application/Rewards/RewardsApplicationClient.js +0 -315
  265. package/sdk/application/Webhook/WebhookApplicationClient.d.ts +0 -19
  266. package/sdk/application/Webhook/WebhookApplicationClient.js +0 -72
  267. package/sdk/platform/Finance/FinancePlatformClient.d.ts +0 -320
  268. package/sdk/platform/Finance/FinancePlatformClient.js +0 -2333
  269. package/sdk/platform/Finance/FinancePlatformModel.d.ts +0 -2890
  270. package/sdk/platform/Finance/FinancePlatformModel.js +0 -2148
  271. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +0 -284
  272. package/sdk/platform/Finance/FinancePlatformValidator.js +0 -354
  273. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +0 -136
  274. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +0 -976
  275. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.d.ts +0 -152
  276. package/sdk/platform/Rewards/RewardsPlatformApplicationValidator.js +0 -157
  277. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +0 -382
  278. package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -408
@@ -19,10 +19,10 @@ class Cart {
19
19
  * @param {CartPlatformApplicationValidator.AddAddressParam} arg - Arg object
20
20
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
21
21
  * @param {import("../PlatformAPIClient").Options} - Options
22
- * @returns {Promise<CartPlatformModel.SaveAddressResponse>} - Success response
22
+ * @returns {Promise<CartPlatformModel.SaveAddressDetails>} - Success response
23
23
  * @name addAddress
24
24
  * @summary: Creates a new address for a customer
25
- * @description: Customers can add a new address to their cart to save details such as name, email, contact information, and address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/addAddress/).
25
+ * @description: Customers can add a new address to their cart to save details such as name, email, contact information, and address. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/addAddress/).
26
26
  */
27
27
  async addAddress(
28
28
  { body, requestHeaders } = { requestHeaders: {} },
@@ -73,7 +73,7 @@ class Cart {
73
73
 
74
74
  const {
75
75
  error: res_error,
76
- } = CartPlatformModel.SaveAddressResponse().validate(responseData, {
76
+ } = CartPlatformModel.SaveAddressDetails().validate(responseData, {
77
77
  abortEarly: false,
78
78
  allowUnknown: true,
79
79
  });
@@ -93,26 +93,23 @@ class Cart {
93
93
  }
94
94
 
95
95
  /**
96
- * @param {CartPlatformApplicationValidator.AddBulkPriceAdjustmentParam} arg
97
- * - Arg object
98
- *
96
+ * @param {CartPlatformApplicationValidator.AddItemsParam} arg - Arg object
99
97
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
100
98
  * @param {import("../PlatformAPIClient").Options} - Options
101
- * @returns {Promise<CartPlatformModel.BulkPriceAdjustmentResponse>} -
102
- * Success response
103
- * @name addBulkPriceAdjustment
104
- * @summary: Create price adjustments in Bulk
105
- * @description: Create custom price adjustments for items in the cart, facilitating the application of discounts or promotions. Price adjustments can be tailored based on specific sales channel contexts, enhancing flexibility in pricing strategies. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/addBulkPriceAdjustment/).
99
+ * @returns {Promise<CartPlatformModel.AddCartDetailResult>} - Success response
100
+ * @name addItems
101
+ * @summary: Add items to cart
102
+ * @description: Add product items to the customer's existing shopping cart. If there is no existing cart associated with the customer, it creates a new one and adds the items to it. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/addItems/).
106
103
  */
107
- async addBulkPriceAdjustment(
108
- { body, requestHeaders } = { requestHeaders: {} },
104
+ async addItems(
105
+ { cartId, body, b, requestHeaders } = { requestHeaders: {} },
109
106
  { responseHeaders } = { responseHeaders: false }
110
107
  ) {
111
- const {
112
- error,
113
- } = CartPlatformApplicationValidator.addBulkPriceAdjustment().validate(
108
+ const { error } = CartPlatformApplicationValidator.addItems().validate(
114
109
  {
110
+ cartId,
115
111
  body,
112
+ b,
116
113
  },
117
114
  { abortEarly: false, allowUnknown: true }
118
115
  );
@@ -123,25 +120,28 @@ class Cart {
123
120
  // Showing warrnings if extra unknown parameters are found
124
121
  const {
125
122
  error: warrning,
126
- } = CartPlatformApplicationValidator.addBulkPriceAdjustment().validate(
123
+ } = CartPlatformApplicationValidator.addItems().validate(
127
124
  {
125
+ cartId,
128
126
  body,
127
+ b,
129
128
  },
130
129
  { abortEarly: false, allowUnknown: false }
131
130
  );
132
131
  if (warrning) {
133
132
  Logger({
134
133
  level: "WARN",
135
- message: `Parameter Validation warrnings for platform > Cart > addBulkPriceAdjustment \n ${warrning}`,
134
+ message: `Parameter Validation warrnings for platform > Cart > addItems \n ${warrning}`,
136
135
  });
137
136
  }
138
137
 
139
138
  const query_params = {};
139
+ query_params["b"] = b;
140
140
 
141
141
  const response = await PlatformAPIClient.execute(
142
142
  this.config,
143
143
  "post",
144
- `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/bulk-price-adjustment`,
144
+ `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/abandoned/carts/${cartId}`,
145
145
  query_params,
146
146
  body,
147
147
  requestHeaders,
@@ -155,7 +155,7 @@ class Cart {
155
155
 
156
156
  const {
157
157
  error: res_error,
158
- } = CartPlatformModel.BulkPriceAdjustmentResponse().validate(responseData, {
158
+ } = CartPlatformModel.AddCartDetailResult().validate(responseData, {
159
159
  abortEarly: false,
160
160
  allowUnknown: true,
161
161
  });
@@ -166,7 +166,7 @@ class Cart {
166
166
  } else {
167
167
  Logger({
168
168
  level: "WARN",
169
- message: `Response Validation Warnings for platform > Cart > addBulkPriceAdjustment \n ${res_error}`,
169
+ message: `Response Validation Warnings for platform > Cart > addItems \n ${res_error}`,
170
170
  });
171
171
  }
172
172
  }
@@ -175,23 +175,23 @@ class Cart {
175
175
  }
176
176
 
177
177
  /**
178
- * @param {CartPlatformApplicationValidator.AddItemsParam} arg - Arg object
178
+ * @param {CartPlatformApplicationValidator.AddPriceAdjustmentParam} arg - Arg object
179
179
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
180
180
  * @param {import("../PlatformAPIClient").Options} - Options
181
- * @returns {Promise<CartPlatformModel.AddCartDetailResponse>} - Success response
182
- * @name addItems
183
- * @summary: Add items to cart
184
- * @description: Add product items to the customer's existing shopping cart. If there is no existing cart associated with the customer, it creates a new one and adds the items to it. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/addItems/).
181
+ * @returns {Promise<CartPlatformModel.GetPriceAdjustmentResult>} - Success response
182
+ * @name addPriceAdjustment
183
+ * @summary: Create price adjustments
184
+ * @description: Create custom price adjustments for items in the cart, facilitating the application of discounts or promotions. Price adjustments can be tailored based on specific sales channel contexts, enhancing flexibility in pricing strategies. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/addPriceAdjustment/).
185
185
  */
186
- async addItems(
187
- { cartId, body, b, requestHeaders } = { requestHeaders: {} },
186
+ async addPriceAdjustment(
187
+ { body, requestHeaders } = { requestHeaders: {} },
188
188
  { responseHeaders } = { responseHeaders: false }
189
189
  ) {
190
- const { error } = CartPlatformApplicationValidator.addItems().validate(
190
+ const {
191
+ error,
192
+ } = CartPlatformApplicationValidator.addPriceAdjustment().validate(
191
193
  {
192
- cartId,
193
194
  body,
194
- b,
195
195
  },
196
196
  { abortEarly: false, allowUnknown: true }
197
197
  );
@@ -202,28 +202,25 @@ class Cart {
202
202
  // Showing warrnings if extra unknown parameters are found
203
203
  const {
204
204
  error: warrning,
205
- } = CartPlatformApplicationValidator.addItems().validate(
205
+ } = CartPlatformApplicationValidator.addPriceAdjustment().validate(
206
206
  {
207
- cartId,
208
207
  body,
209
- b,
210
208
  },
211
209
  { abortEarly: false, allowUnknown: false }
212
210
  );
213
211
  if (warrning) {
214
212
  Logger({
215
213
  level: "WARN",
216
- message: `Parameter Validation warrnings for platform > Cart > addItems \n ${warrning}`,
214
+ message: `Parameter Validation warrnings for platform > Cart > addPriceAdjustment \n ${warrning}`,
217
215
  });
218
216
  }
219
217
 
220
218
  const query_params = {};
221
- query_params["b"] = b;
222
219
 
223
220
  const response = await PlatformAPIClient.execute(
224
221
  this.config,
225
222
  "post",
226
- `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/abandoned/carts/${cartId}`,
223
+ `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/price-adjustment`,
227
224
  query_params,
228
225
  body,
229
226
  requestHeaders,
@@ -237,7 +234,7 @@ class Cart {
237
234
 
238
235
  const {
239
236
  error: res_error,
240
- } = CartPlatformModel.AddCartDetailResponse().validate(responseData, {
237
+ } = CartPlatformModel.GetPriceAdjustmentResult().validate(responseData, {
241
238
  abortEarly: false,
242
239
  allowUnknown: true,
243
240
  });
@@ -248,7 +245,7 @@ class Cart {
248
245
  } else {
249
246
  Logger({
250
247
  level: "WARN",
251
- message: `Response Validation Warnings for platform > Cart > addItems \n ${res_error}`,
248
+ message: `Response Validation Warnings for platform > Cart > addPriceAdjustment \n ${res_error}`,
252
249
  });
253
250
  }
254
251
  }
@@ -257,23 +254,40 @@ class Cart {
257
254
  }
258
255
 
259
256
  /**
260
- * @param {CartPlatformApplicationValidator.AddPriceAdjustmentParam} arg - Arg object
257
+ * @param {CartPlatformApplicationValidator.ApplyCouponParam} arg - Arg object
261
258
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
262
259
  * @param {import("../PlatformAPIClient").Options} - Options
263
- * @returns {Promise<CartPlatformModel.PriceAdjustmentResponse>} - Success response
264
- * @name addPriceAdjustment
265
- * @summary: Create price adjustments
266
- * @description: Create custom price adjustments for items in the cart, facilitating the application of discounts or promotions. Price adjustments can be tailored based on specific sales channel contexts, enhancing flexibility in pricing strategies. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/addPriceAdjustment/).
260
+ * @returns {Promise<CartPlatformModel.CartDetailResult>} - Success response
261
+ * @name applyCoupon
262
+ * @summary: Apply coupon
263
+ * @description: Apply a coupon code to the customer's cart to trigger discounts on eligible items - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/applyCoupon/).
267
264
  */
268
- async addPriceAdjustment(
269
- { body, requestHeaders } = { requestHeaders: {} },
265
+ async applyCoupon(
266
+ {
267
+ body,
268
+ xOrderingSource,
269
+ xOrderingSourceType,
270
+ xAnonymousCart,
271
+ i,
272
+ b,
273
+ p,
274
+ id,
275
+ buyNow,
276
+ requestHeaders,
277
+ } = { requestHeaders: {} },
270
278
  { responseHeaders } = { responseHeaders: false }
271
279
  ) {
272
- const {
273
- error,
274
- } = CartPlatformApplicationValidator.addPriceAdjustment().validate(
280
+ const { error } = CartPlatformApplicationValidator.applyCoupon().validate(
275
281
  {
276
282
  body,
283
+ xOrderingSource,
284
+ xOrderingSourceType,
285
+ xAnonymousCart,
286
+ i,
287
+ b,
288
+ p,
289
+ id,
290
+ buyNow,
277
291
  },
278
292
  { abortEarly: false, allowUnknown: true }
279
293
  );
@@ -284,25 +298,38 @@ class Cart {
284
298
  // Showing warrnings if extra unknown parameters are found
285
299
  const {
286
300
  error: warrning,
287
- } = CartPlatformApplicationValidator.addPriceAdjustment().validate(
301
+ } = CartPlatformApplicationValidator.applyCoupon().validate(
288
302
  {
289
303
  body,
304
+ xOrderingSource,
305
+ xOrderingSourceType,
306
+ xAnonymousCart,
307
+ i,
308
+ b,
309
+ p,
310
+ id,
311
+ buyNow,
290
312
  },
291
313
  { abortEarly: false, allowUnknown: false }
292
314
  );
293
315
  if (warrning) {
294
316
  Logger({
295
317
  level: "WARN",
296
- message: `Parameter Validation warrnings for platform > Cart > addPriceAdjustment \n ${warrning}`,
318
+ message: `Parameter Validation warrnings for platform > Cart > applyCoupon \n ${warrning}`,
297
319
  });
298
320
  }
299
321
 
300
322
  const query_params = {};
323
+ query_params["i"] = i;
324
+ query_params["b"] = b;
325
+ query_params["p"] = p;
326
+ query_params["id"] = id;
327
+ query_params["buy_now"] = buyNow;
301
328
 
302
329
  const response = await PlatformAPIClient.execute(
303
330
  this.config,
304
331
  "post",
305
- `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/price-adjustment`,
332
+ `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/platform-pos-coupon`,
306
333
  query_params,
307
334
  body,
308
335
  requestHeaders,
@@ -316,7 +343,7 @@ class Cart {
316
343
 
317
344
  const {
318
345
  error: res_error,
319
- } = CartPlatformModel.PriceAdjustmentResponse().validate(responseData, {
346
+ } = CartPlatformModel.CartDetailResult().validate(responseData, {
320
347
  abortEarly: false,
321
348
  allowUnknown: true,
322
349
  });
@@ -327,7 +354,7 @@ class Cart {
327
354
  } else {
328
355
  Logger({
329
356
  level: "WARN",
330
- message: `Response Validation Warnings for platform > Cart > addPriceAdjustment \n ${res_error}`,
357
+ message: `Response Validation Warnings for platform > Cart > applyCoupon \n ${res_error}`,
331
358
  });
332
359
  }
333
360
  }
@@ -336,25 +363,37 @@ class Cart {
336
363
  }
337
364
 
338
365
  /**
339
- * @param {CartPlatformApplicationValidator.ApplyCouponParam} arg - Arg object
366
+ * @param {CartPlatformApplicationValidator.ApplyLoyaltyPointsParam} arg - Arg object
340
367
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
341
368
  * @param {import("../PlatformAPIClient").Options} - Options
342
- * @returns {Promise<CartPlatformModel.CartDetailResponse>} - Success response
343
- * @name applyCoupon
344
- * @summary: Apply coupon
345
- * @description: Apply a coupon code to the customer's cart to trigger discounts on eligible items - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/applyCoupon/).
369
+ * @returns {Promise<CartPlatformModel.CartDetailResult>} - Success response
370
+ * @name applyLoyaltyPoints
371
+ * @summary: Redeem loyalty points.
372
+ * @description: Users can redeem their accumulated loyalty points and apply them to the items in their cart, thereby availing discounts on their current purchases. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/applyLoyaltyPoints/).
346
373
  */
347
- async applyCoupon(
348
- { body, i, b, p, id, buyNow, requestHeaders } = { requestHeaders: {} },
374
+ async applyLoyaltyPoints(
375
+ {
376
+ body,
377
+ xOrderingSource,
378
+ xOrderingSourceType,
379
+ id,
380
+ i,
381
+ b,
382
+ buyNow,
383
+ requestHeaders,
384
+ } = { requestHeaders: {} },
349
385
  { responseHeaders } = { responseHeaders: false }
350
386
  ) {
351
- const { error } = CartPlatformApplicationValidator.applyCoupon().validate(
387
+ const {
388
+ error,
389
+ } = CartPlatformApplicationValidator.applyLoyaltyPoints().validate(
352
390
  {
353
391
  body,
392
+ xOrderingSource,
393
+ xOrderingSourceType,
394
+ id,
354
395
  i,
355
396
  b,
356
- p,
357
- id,
358
397
  buyNow,
359
398
  },
360
399
  { abortEarly: false, allowUnknown: true }
@@ -366,13 +405,14 @@ class Cart {
366
405
  // Showing warrnings if extra unknown parameters are found
367
406
  const {
368
407
  error: warrning,
369
- } = CartPlatformApplicationValidator.applyCoupon().validate(
408
+ } = CartPlatformApplicationValidator.applyLoyaltyPoints().validate(
370
409
  {
371
410
  body,
411
+ xOrderingSource,
412
+ xOrderingSourceType,
413
+ id,
372
414
  i,
373
415
  b,
374
- p,
375
- id,
376
416
  buyNow,
377
417
  },
378
418
  { abortEarly: false, allowUnknown: false }
@@ -380,21 +420,20 @@ class Cart {
380
420
  if (warrning) {
381
421
  Logger({
382
422
  level: "WARN",
383
- message: `Parameter Validation warrnings for platform > Cart > applyCoupon \n ${warrning}`,
423
+ message: `Parameter Validation warrnings for platform > Cart > applyLoyaltyPoints \n ${warrning}`,
384
424
  });
385
425
  }
386
426
 
387
427
  const query_params = {};
428
+ query_params["id"] = id;
388
429
  query_params["i"] = i;
389
430
  query_params["b"] = b;
390
- query_params["p"] = p;
391
- query_params["id"] = id;
392
431
  query_params["buy_now"] = buyNow;
393
432
 
394
433
  const response = await PlatformAPIClient.execute(
395
434
  this.config,
396
435
  "post",
397
- `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/platform-pos-coupon`,
436
+ `/service/platform/cart/v2.0/company/${this.config.companyId}/application/${this.applicationId}/redeem`,
398
437
  query_params,
399
438
  body,
400
439
  requestHeaders,
@@ -408,7 +447,7 @@ class Cart {
408
447
 
409
448
  const {
410
449
  error: res_error,
411
- } = CartPlatformModel.CartDetailResponse().validate(responseData, {
450
+ } = CartPlatformModel.CartDetailResult().validate(responseData, {
412
451
  abortEarly: false,
413
452
  allowUnknown: true,
414
453
  });
@@ -419,7 +458,7 @@ class Cart {
419
458
  } else {
420
459
  Logger({
421
460
  level: "WARN",
422
- message: `Response Validation Warnings for platform > Cart > applyCoupon \n ${res_error}`,
461
+ message: `Response Validation Warnings for platform > Cart > applyLoyaltyPoints \n ${res_error}`,
423
462
  });
424
463
  }
425
464
  }
@@ -433,15 +472,16 @@ class Cart {
433
472
  *
434
473
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
435
474
  * @param {import("../PlatformAPIClient").Options} - Options
436
- * @returns {Promise<CartPlatformModel.OpenApiCartServiceabilityResponse>}
437
- * - Success response
438
- *
475
+ * @returns {Promise<CartPlatformModel.OpenApiCartServiceabilityResult>} -
476
+ * Success response
439
477
  * @name checkCartServiceability
440
478
  * @summary: Check cart serviceability
441
- * @description: Verify the serviceability of items in the cart at a specific pin code and ensure accurate delivery promises. System checks each item's availability and delivery feasibility, providing real-time information on serviceability and estimated delivery times. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/checkCartServiceability/).
479
+ * @description: Verify the serviceability of items in the cart at a specific pin code and ensure accurate delivery promises. System checks each item's availability and delivery feasibility, providing real-time information on serviceability and estimated delivery times. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/checkCartServiceability/).
442
480
  */
443
481
  async checkCartServiceability(
444
- { body, requestHeaders } = { requestHeaders: {} },
482
+ { body, xOrderingSource, xOrderingSourceType, requestHeaders } = {
483
+ requestHeaders: {},
484
+ },
445
485
  { responseHeaders } = { responseHeaders: false }
446
486
  ) {
447
487
  const {
@@ -449,6 +489,8 @@ class Cart {
449
489
  } = CartPlatformApplicationValidator.checkCartServiceability().validate(
450
490
  {
451
491
  body,
492
+ xOrderingSource,
493
+ xOrderingSourceType,
452
494
  },
453
495
  { abortEarly: false, allowUnknown: true }
454
496
  );
@@ -462,6 +504,8 @@ class Cart {
462
504
  } = CartPlatformApplicationValidator.checkCartServiceability().validate(
463
505
  {
464
506
  body,
507
+ xOrderingSource,
508
+ xOrderingSourceType,
465
509
  },
466
510
  { abortEarly: false, allowUnknown: false }
467
511
  );
@@ -491,7 +535,7 @@ class Cart {
491
535
 
492
536
  const {
493
537
  error: res_error,
494
- } = CartPlatformModel.OpenApiCartServiceabilityResponse().validate(
538
+ } = CartPlatformModel.OpenApiCartServiceabilityResult().validate(
495
539
  responseData,
496
540
  { abortEarly: false, allowUnknown: true }
497
541
  );
@@ -514,18 +558,31 @@ class Cart {
514
558
  * @param {CartPlatformApplicationValidator.CheckoutCartParam} arg - Arg object
515
559
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
516
560
  * @param {import("../PlatformAPIClient").Options} - Options
517
- * @returns {Promise<CartPlatformModel.OpenApiCheckoutResponse>} - Success response
561
+ * @returns {Promise<CartPlatformModel.OpenApiCheckoutResult>} - Success response
518
562
  * @name checkoutCart
519
- * @summary: Checkout cart
520
- * @description: The checkout cart initiates the order creation process based on the selected address and payment method. It revalidates the cart details to ensure safe and seamless order placement. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/checkoutCart/).
563
+ * @summary: Headless Checkout
564
+ * @description: The checkout cart initiates the order creation process based on the selected address and payment method. It revalidates the cart details to ensure safe and seamless order placement. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/checkoutCart/).
521
565
  */
522
566
  async checkoutCart(
523
- { body, requestHeaders } = { requestHeaders: {} },
567
+ {
568
+ body,
569
+ xOrderingSource,
570
+ xOrderingSourceType,
571
+ xAnonymousCart,
572
+ xLocationDetail,
573
+ xCurrencyCode,
574
+ requestHeaders,
575
+ } = { requestHeaders: {} },
524
576
  { responseHeaders } = { responseHeaders: false }
525
577
  ) {
526
578
  const { error } = CartPlatformApplicationValidator.checkoutCart().validate(
527
579
  {
528
580
  body,
581
+ xOrderingSource,
582
+ xOrderingSourceType,
583
+ xAnonymousCart,
584
+ xLocationDetail,
585
+ xCurrencyCode,
529
586
  },
530
587
  { abortEarly: false, allowUnknown: true }
531
588
  );
@@ -539,6 +596,11 @@ class Cart {
539
596
  } = CartPlatformApplicationValidator.checkoutCart().validate(
540
597
  {
541
598
  body,
599
+ xOrderingSource,
600
+ xOrderingSourceType,
601
+ xAnonymousCart,
602
+ xLocationDetail,
603
+ xCurrencyCode,
542
604
  },
543
605
  { abortEarly: false, allowUnknown: false }
544
606
  );
@@ -568,7 +630,7 @@ class Cart {
568
630
 
569
631
  const {
570
632
  error: res_error,
571
- } = CartPlatformModel.OpenApiCheckoutResponse().validate(responseData, {
633
+ } = CartPlatformModel.OpenApiCheckoutResult().validate(responseData, {
572
634
  abortEarly: false,
573
635
  allowUnknown: true,
574
636
  });
@@ -596,7 +658,7 @@ class Cart {
596
658
  * @returns {Promise<CartPlatformModel.CartMetaConfigAdd>} - Success response
597
659
  * @name createCartMetaConfig
598
660
  * @summary: Create a new cart meta
599
- * @description: Create custom meta configurations for carts associated with a specific sales channel. By specifying the company ID and application ID, seller can define unique cart settings, including preferences, rules, and constraints, tailored to their business needs. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/createCartMetaConfig/).
661
+ * @description: Create custom meta configurations for carts associated with a specific sales channel. By specifying the company ID and application ID, seller can define unique cart settings, including preferences, rules, and constraints, tailored to their business needs. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/createCartMetaConfig/).
600
662
  */
601
663
  async createCartMetaConfig(
602
664
  { body, requestHeaders } = { requestHeaders: {} },
@@ -672,18 +734,331 @@ class Cart {
672
734
  * @param {CartPlatformApplicationValidator.CreateCouponParam} arg - Arg object
673
735
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
674
736
  * @param {import("../PlatformAPIClient").Options} - Options
675
- * @returns {Promise<CartPlatformModel.SuccessMessage>} - Success response
737
+ * @returns {Promise<CartPlatformModel.CouponCreateResult>} - Success response
676
738
  * @name createCoupon
677
739
  * @summary: Create a coupon
678
- * @description: Creates a new coupon based on the selected coupon type. Sellers can choose from multiple supported coupon types, including percentage value, fixed amount value, bundled discount, buy X get Y items, and more, along with customizable coupon criteria to meet specific business requirements. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/createCoupon/).
740
+ * @description: Creates a new coupon based on the selected coupon type. Sellers can choose from multiple supported coupon types, including percentage value, fixed amount value, bundled discount, buy X get Y items, and more, along with customizable coupon criteria to meet specific business requirements. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/createCoupon/).
679
741
  */
680
742
  async createCoupon(
681
743
  { body, requestHeaders } = { requestHeaders: {} },
682
744
  { responseHeaders } = { responseHeaders: false }
683
745
  ) {
684
- const { error } = CartPlatformApplicationValidator.createCoupon().validate(
746
+ const { error } = CartPlatformApplicationValidator.createCoupon().validate(
747
+ {
748
+ body,
749
+ },
750
+ { abortEarly: false, allowUnknown: true }
751
+ );
752
+ if (error) {
753
+ return Promise.reject(new FDKClientValidationError(error));
754
+ }
755
+
756
+ // Showing warrnings if extra unknown parameters are found
757
+ const {
758
+ error: warrning,
759
+ } = CartPlatformApplicationValidator.createCoupon().validate(
760
+ {
761
+ body,
762
+ },
763
+ { abortEarly: false, allowUnknown: false }
764
+ );
765
+ if (warrning) {
766
+ Logger({
767
+ level: "WARN",
768
+ message: `Parameter Validation warrnings for platform > Cart > createCoupon \n ${warrning}`,
769
+ });
770
+ }
771
+
772
+ const query_params = {};
773
+
774
+ const response = await PlatformAPIClient.execute(
775
+ this.config,
776
+ "post",
777
+ `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/coupon`,
778
+ query_params,
779
+ body,
780
+ requestHeaders,
781
+ { responseHeaders }
782
+ );
783
+
784
+ let responseData = response;
785
+ if (responseHeaders) {
786
+ responseData = response[0];
787
+ }
788
+
789
+ const {
790
+ error: res_error,
791
+ } = CartPlatformModel.CouponCreateResult().validate(responseData, {
792
+ abortEarly: false,
793
+ allowUnknown: true,
794
+ });
795
+
796
+ if (res_error) {
797
+ if (this.config.options.strictResponseCheck === true) {
798
+ return Promise.reject(new FDKResponseValidationError(res_error));
799
+ } else {
800
+ Logger({
801
+ level: "WARN",
802
+ message: `Response Validation Warnings for platform > Cart > createCoupon \n ${res_error}`,
803
+ });
804
+ }
805
+ }
806
+
807
+ return response;
808
+ }
809
+
810
+ /**
811
+ * @param {CartPlatformApplicationValidator.CreateOfferParam} arg - Arg object
812
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
813
+ * @param {import("../PlatformAPIClient").Options} - Options
814
+ * @returns {Promise<CartPlatformModel.OfferSchema>} - Success response
815
+ * @name createOffer
816
+ * @summary: Create an offer
817
+ * @description: Creates a new offer based on the selected offer type. Sellers can choose from multiple supported offer types, including percentage value, fixed amount value, bundled discount, buy X get Y items, and more, along with customizable offer criteria to meet specific business requirements. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/createOffer/).
818
+ */
819
+ async createOffer(
820
+ { body, requestHeaders } = { requestHeaders: {} },
821
+ { responseHeaders } = { responseHeaders: false }
822
+ ) {
823
+ const { error } = CartPlatformApplicationValidator.createOffer().validate(
824
+ {
825
+ body,
826
+ },
827
+ { abortEarly: false, allowUnknown: true }
828
+ );
829
+ if (error) {
830
+ return Promise.reject(new FDKClientValidationError(error));
831
+ }
832
+
833
+ // Showing warrnings if extra unknown parameters are found
834
+ const {
835
+ error: warrning,
836
+ } = CartPlatformApplicationValidator.createOffer().validate(
837
+ {
838
+ body,
839
+ },
840
+ { abortEarly: false, allowUnknown: false }
841
+ );
842
+ if (warrning) {
843
+ Logger({
844
+ level: "WARN",
845
+ message: `Parameter Validation warrnings for platform > Cart > createOffer \n ${warrning}`,
846
+ });
847
+ }
848
+
849
+ const query_params = {};
850
+
851
+ const response = await PlatformAPIClient.execute(
852
+ this.config,
853
+ "post",
854
+ `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/offers`,
855
+ query_params,
856
+ body,
857
+ requestHeaders,
858
+ { responseHeaders }
859
+ );
860
+
861
+ let responseData = response;
862
+ if (responseHeaders) {
863
+ responseData = response[0];
864
+ }
865
+
866
+ const {
867
+ error: res_error,
868
+ } = CartPlatformModel.OfferSchema().validate(responseData, {
869
+ abortEarly: false,
870
+ allowUnknown: true,
871
+ });
872
+
873
+ if (res_error) {
874
+ if (this.config.options.strictResponseCheck === true) {
875
+ return Promise.reject(new FDKResponseValidationError(res_error));
876
+ } else {
877
+ Logger({
878
+ level: "WARN",
879
+ message: `Response Validation Warnings for platform > Cart > createOffer \n ${res_error}`,
880
+ });
881
+ }
882
+ }
883
+
884
+ return response;
885
+ }
886
+
887
+ /**
888
+ * @param {CartPlatformApplicationValidator.CreatePromotionParam} arg - Arg object
889
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
890
+ * @param {import("../PlatformAPIClient").Options} - Options
891
+ * @returns {Promise<CartPlatformModel.PromotionAddResult>} - Success response
892
+ * @name createPromotion
893
+ * @summary: Create a promotion
894
+ * @description: Creates a new promotion based on the selected promotion type. Sellers can choose from multiple supported promotion types, including percentage value, fixed amount value, bundled discount, buy X get Y items, and more, along with customizable promotion criteria to meet specific business requirements. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/createPromotion/).
895
+ */
896
+ async createPromotion(
897
+ { body, requestHeaders } = { requestHeaders: {} },
898
+ { responseHeaders } = { responseHeaders: false }
899
+ ) {
900
+ const {
901
+ error,
902
+ } = CartPlatformApplicationValidator.createPromotion().validate(
903
+ {
904
+ body,
905
+ },
906
+ { abortEarly: false, allowUnknown: true }
907
+ );
908
+ if (error) {
909
+ return Promise.reject(new FDKClientValidationError(error));
910
+ }
911
+
912
+ // Showing warrnings if extra unknown parameters are found
913
+ const {
914
+ error: warrning,
915
+ } = CartPlatformApplicationValidator.createPromotion().validate(
916
+ {
917
+ body,
918
+ },
919
+ { abortEarly: false, allowUnknown: false }
920
+ );
921
+ if (warrning) {
922
+ Logger({
923
+ level: "WARN",
924
+ message: `Parameter Validation warrnings for platform > Cart > createPromotion \n ${warrning}`,
925
+ });
926
+ }
927
+
928
+ const query_params = {};
929
+
930
+ const response = await PlatformAPIClient.execute(
931
+ this.config,
932
+ "post",
933
+ `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/promotion`,
934
+ query_params,
935
+ body,
936
+ requestHeaders,
937
+ { responseHeaders }
938
+ );
939
+
940
+ let responseData = response;
941
+ if (responseHeaders) {
942
+ responseData = response[0];
943
+ }
944
+
945
+ const {
946
+ error: res_error,
947
+ } = CartPlatformModel.PromotionAddResult().validate(responseData, {
948
+ abortEarly: false,
949
+ allowUnknown: true,
950
+ });
951
+
952
+ if (res_error) {
953
+ if (this.config.options.strictResponseCheck === true) {
954
+ return Promise.reject(new FDKResponseValidationError(res_error));
955
+ } else {
956
+ Logger({
957
+ level: "WARN",
958
+ message: `Response Validation Warnings for platform > Cart > createPromotion \n ${res_error}`,
959
+ });
960
+ }
961
+ }
962
+
963
+ return response;
964
+ }
965
+
966
+ /**
967
+ * @param {CartPlatformApplicationValidator.DeleteCartParam} arg - Arg object
968
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
969
+ * @param {import("../PlatformAPIClient").Options} - Options
970
+ * @returns {Promise<CartPlatformModel.DeleteCartDetailResult>} - Success response
971
+ * @name deleteCart
972
+ * @summary: Delete a cart
973
+ * @description: Delete all items from the user's cart and resets it to its initial state, providing a clean slate for new selections. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/deleteCart/).
974
+ */
975
+ async deleteCart(
976
+ { body, id, requestHeaders } = { requestHeaders: {} },
977
+ { responseHeaders } = { responseHeaders: false }
978
+ ) {
979
+ const { error } = CartPlatformApplicationValidator.deleteCart().validate(
980
+ {
981
+ body,
982
+ id,
983
+ },
984
+ { abortEarly: false, allowUnknown: true }
985
+ );
986
+ if (error) {
987
+ return Promise.reject(new FDKClientValidationError(error));
988
+ }
989
+
990
+ // Showing warrnings if extra unknown parameters are found
991
+ const {
992
+ error: warrning,
993
+ } = CartPlatformApplicationValidator.deleteCart().validate(
994
+ {
995
+ body,
996
+ id,
997
+ },
998
+ { abortEarly: false, allowUnknown: false }
999
+ );
1000
+ if (warrning) {
1001
+ Logger({
1002
+ level: "WARN",
1003
+ message: `Parameter Validation warrnings for platform > Cart > deleteCart \n ${warrning}`,
1004
+ });
1005
+ }
1006
+
1007
+ const query_params = {};
1008
+ query_params["id"] = id;
1009
+
1010
+ const response = await PlatformAPIClient.execute(
1011
+ this.config,
1012
+ "put",
1013
+ `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/cart_archive`,
1014
+ query_params,
1015
+ body,
1016
+ requestHeaders,
1017
+ { responseHeaders }
1018
+ );
1019
+
1020
+ let responseData = response;
1021
+ if (responseHeaders) {
1022
+ responseData = response[0];
1023
+ }
1024
+
1025
+ const {
1026
+ error: res_error,
1027
+ } = CartPlatformModel.DeleteCartDetailResult().validate(responseData, {
1028
+ abortEarly: false,
1029
+ allowUnknown: true,
1030
+ });
1031
+
1032
+ if (res_error) {
1033
+ if (this.config.options.strictResponseCheck === true) {
1034
+ return Promise.reject(new FDKResponseValidationError(res_error));
1035
+ } else {
1036
+ Logger({
1037
+ level: "WARN",
1038
+ message: `Response Validation Warnings for platform > Cart > deleteCart \n ${res_error}`,
1039
+ });
1040
+ }
1041
+ }
1042
+
1043
+ return response;
1044
+ }
1045
+
1046
+ /**
1047
+ * @param {CartPlatformApplicationValidator.DeleteCouponParam} arg - Arg object
1048
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1049
+ * @param {import("../PlatformAPIClient").Options} - Options
1050
+ * @returns {Promise<CartPlatformModel.SuccessMessage>} - Success response
1051
+ * @name deleteCoupon
1052
+ * @summary: Delete a coupon which is in draft state
1053
+ * @description: Delete details of a draft coupon by providing its unique identifier to delete information such as coupon type, rules, validity period and other related information. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/deleteCoupon/).
1054
+ */
1055
+ async deleteCoupon(
1056
+ { id, requestHeaders } = { requestHeaders: {} },
1057
+ { responseHeaders } = { responseHeaders: false }
1058
+ ) {
1059
+ const { error } = CartPlatformApplicationValidator.deleteCoupon().validate(
685
1060
  {
686
- body,
1061
+ id,
687
1062
  },
688
1063
  { abortEarly: false, allowUnknown: true }
689
1064
  );
@@ -694,16 +1069,16 @@ class Cart {
694
1069
  // Showing warrnings if extra unknown parameters are found
695
1070
  const {
696
1071
  error: warrning,
697
- } = CartPlatformApplicationValidator.createCoupon().validate(
1072
+ } = CartPlatformApplicationValidator.deleteCoupon().validate(
698
1073
  {
699
- body,
1074
+ id,
700
1075
  },
701
1076
  { abortEarly: false, allowUnknown: false }
702
1077
  );
703
1078
  if (warrning) {
704
1079
  Logger({
705
1080
  level: "WARN",
706
- message: `Parameter Validation warrnings for platform > Cart > createCoupon \n ${warrning}`,
1081
+ message: `Parameter Validation warrnings for platform > Cart > deleteCoupon \n ${warrning}`,
707
1082
  });
708
1083
  }
709
1084
 
@@ -711,10 +1086,10 @@ class Cart {
711
1086
 
712
1087
  const response = await PlatformAPIClient.execute(
713
1088
  this.config,
714
- "post",
715
- `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/coupon`,
1089
+ "delete",
1090
+ `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/coupon/${id}`,
716
1091
  query_params,
717
- body,
1092
+ undefined,
718
1093
  requestHeaders,
719
1094
  { responseHeaders }
720
1095
  );
@@ -737,7 +1112,7 @@ class Cart {
737
1112
  } else {
738
1113
  Logger({
739
1114
  level: "WARN",
740
- message: `Response Validation Warnings for platform > Cart > createCoupon \n ${res_error}`,
1115
+ message: `Response Validation Warnings for platform > Cart > deleteCoupon \n ${res_error}`,
741
1116
  });
742
1117
  }
743
1118
  }
@@ -746,23 +1121,21 @@ class Cart {
746
1121
  }
747
1122
 
748
1123
  /**
749
- * @param {CartPlatformApplicationValidator.CreatePromotionParam} arg - Arg object
1124
+ * @param {CartPlatformApplicationValidator.DeleteOfferParam} arg - Arg object
750
1125
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
751
1126
  * @param {import("../PlatformAPIClient").Options} - Options
752
- * @returns {Promise<CartPlatformModel.PromotionAdd>} - Success response
753
- * @name createPromotion
754
- * @summary: Create a promotion
755
- * @description: Creates a new promotion based on the selected promotion type. Sellers can choose from multiple supported promotion types, including percentage value, fixed amount value, bundled discount, buy X get Y items, and more, along with customizable promotion criteria to meet specific business requirements. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/createPromotion/).
1127
+ * @returns {Promise<CartPlatformModel.SuccessMessage>} - Success response
1128
+ * @name deleteOffer
1129
+ * @summary: Delete draft offer
1130
+ * @description: Delete details of a draft offer by providing its unique identifier to delete information such as offer type, rules, validity period and other related information. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/deleteOffer/).
756
1131
  */
757
- async createPromotion(
758
- { body, requestHeaders } = { requestHeaders: {} },
1132
+ async deleteOffer(
1133
+ { id, requestHeaders } = { requestHeaders: {} },
759
1134
  { responseHeaders } = { responseHeaders: false }
760
1135
  ) {
761
- const {
762
- error,
763
- } = CartPlatformApplicationValidator.createPromotion().validate(
1136
+ const { error } = CartPlatformApplicationValidator.deleteOffer().validate(
764
1137
  {
765
- body,
1138
+ id,
766
1139
  },
767
1140
  { abortEarly: false, allowUnknown: true }
768
1141
  );
@@ -773,16 +1146,16 @@ class Cart {
773
1146
  // Showing warrnings if extra unknown parameters are found
774
1147
  const {
775
1148
  error: warrning,
776
- } = CartPlatformApplicationValidator.createPromotion().validate(
1149
+ } = CartPlatformApplicationValidator.deleteOffer().validate(
777
1150
  {
778
- body,
1151
+ id,
779
1152
  },
780
1153
  { abortEarly: false, allowUnknown: false }
781
1154
  );
782
1155
  if (warrning) {
783
1156
  Logger({
784
1157
  level: "WARN",
785
- message: `Parameter Validation warrnings for platform > Cart > createPromotion \n ${warrning}`,
1158
+ message: `Parameter Validation warrnings for platform > Cart > deleteOffer \n ${warrning}`,
786
1159
  });
787
1160
  }
788
1161
 
@@ -790,10 +1163,10 @@ class Cart {
790
1163
 
791
1164
  const response = await PlatformAPIClient.execute(
792
1165
  this.config,
793
- "post",
794
- `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/promotion`,
1166
+ "delete",
1167
+ `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/offers/${id}`,
795
1168
  query_params,
796
- body,
1169
+ undefined,
797
1170
  requestHeaders,
798
1171
  { responseHeaders }
799
1172
  );
@@ -805,7 +1178,7 @@ class Cart {
805
1178
 
806
1179
  const {
807
1180
  error: res_error,
808
- } = CartPlatformModel.PromotionAdd().validate(responseData, {
1181
+ } = CartPlatformModel.SuccessMessage().validate(responseData, {
809
1182
  abortEarly: false,
810
1183
  allowUnknown: true,
811
1184
  });
@@ -816,7 +1189,7 @@ class Cart {
816
1189
  } else {
817
1190
  Logger({
818
1191
  level: "WARN",
819
- message: `Response Validation Warnings for platform > Cart > createPromotion \n ${res_error}`,
1192
+ message: `Response Validation Warnings for platform > Cart > deleteOffer \n ${res_error}`,
820
1193
  });
821
1194
  }
822
1195
  }
@@ -825,21 +1198,22 @@ class Cart {
825
1198
  }
826
1199
 
827
1200
  /**
828
- * @param {CartPlatformApplicationValidator.DeleteCartParam} arg - Arg object
1201
+ * @param {CartPlatformApplicationValidator.DeletePromotionParam} arg - Arg object
829
1202
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
830
1203
  * @param {import("../PlatformAPIClient").Options} - Options
831
- * @returns {Promise<CartPlatformModel.DeleteCartDetailResponse>} - Success response
832
- * @name deleteCart
833
- * @summary: Delete a cart
834
- * @description: Delete all items from the user's cart and resets it to its initial state, providing a clean slate for new selections. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/deleteCart/).
1204
+ * @returns {Promise<CartPlatformModel.SuccessMessage>} - Success response
1205
+ * @name deletePromotion
1206
+ * @summary: Delete a promotion which is in draft state
1207
+ * @description: Delete details of a draft promotion by providing its unique identifier to delete information such as promotion type, rules, validity period and other related information. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/deletePromotion/).
835
1208
  */
836
- async deleteCart(
837
- { body, id, requestHeaders } = { requestHeaders: {} },
1209
+ async deletePromotion(
1210
+ { id, requestHeaders } = { requestHeaders: {} },
838
1211
  { responseHeaders } = { responseHeaders: false }
839
1212
  ) {
840
- const { error } = CartPlatformApplicationValidator.deleteCart().validate(
1213
+ const {
1214
+ error,
1215
+ } = CartPlatformApplicationValidator.deletePromotion().validate(
841
1216
  {
842
- body,
843
1217
  id,
844
1218
  },
845
1219
  { abortEarly: false, allowUnknown: true }
@@ -851,9 +1225,8 @@ class Cart {
851
1225
  // Showing warrnings if extra unknown parameters are found
852
1226
  const {
853
1227
  error: warrning,
854
- } = CartPlatformApplicationValidator.deleteCart().validate(
1228
+ } = CartPlatformApplicationValidator.deletePromotion().validate(
855
1229
  {
856
- body,
857
1230
  id,
858
1231
  },
859
1232
  { abortEarly: false, allowUnknown: false }
@@ -861,19 +1234,18 @@ class Cart {
861
1234
  if (warrning) {
862
1235
  Logger({
863
1236
  level: "WARN",
864
- message: `Parameter Validation warrnings for platform > Cart > deleteCart \n ${warrning}`,
1237
+ message: `Parameter Validation warrnings for platform > Cart > deletePromotion \n ${warrning}`,
865
1238
  });
866
1239
  }
867
1240
 
868
1241
  const query_params = {};
869
- query_params["id"] = id;
870
1242
 
871
1243
  const response = await PlatformAPIClient.execute(
872
1244
  this.config,
873
- "put",
874
- `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/cart_archive`,
1245
+ "delete",
1246
+ `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/promotion/${id}`,
875
1247
  query_params,
876
- body,
1248
+ undefined,
877
1249
  requestHeaders,
878
1250
  { responseHeaders }
879
1251
  );
@@ -885,7 +1257,7 @@ class Cart {
885
1257
 
886
1258
  const {
887
1259
  error: res_error,
888
- } = CartPlatformModel.DeleteCartDetailResponse().validate(responseData, {
1260
+ } = CartPlatformModel.SuccessMessage().validate(responseData, {
889
1261
  abortEarly: false,
890
1262
  allowUnknown: true,
891
1263
  });
@@ -896,7 +1268,7 @@ class Cart {
896
1268
  } else {
897
1269
  Logger({
898
1270
  level: "WARN",
899
- message: `Response Validation Warnings for platform > Cart > deleteCart \n ${res_error}`,
1271
+ message: `Response Validation Warnings for platform > Cart > deletePromotion \n ${res_error}`,
900
1272
  });
901
1273
  }
902
1274
  }
@@ -910,13 +1282,20 @@ class Cart {
910
1282
  *
911
1283
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
912
1284
  * @param {import("../PlatformAPIClient").Options} - Options
913
- * @returns {Promise<CartPlatformModel.OpenapiCartDetailsResponse>} - Success response
1285
+ * @returns {Promise<CartPlatformModel.OpenapiCartDetailsResult>} - Success response
914
1286
  * @name fetchAndvalidateCartItems
915
1287
  * @summary: Get and validate cart items
916
- * @description: Retrieve cart details for a provided list of cart items and validate its contents. This ensures accuracy and completeness in cart information, including item quantities, prices, discounts, and applicable taxes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/fetchAndvalidateCartItems/).
1288
+ * @description: Retrieve cart details for a provided list of cart items and validate its contents. This ensures accuracy and completeness in cart information, including item quantities, prices, discounts, and applicable taxes. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/fetchAndvalidateCartItems/).
917
1289
  */
918
1290
  async fetchAndvalidateCartItems(
919
- { body, requestHeaders } = { requestHeaders: {} },
1291
+ {
1292
+ body,
1293
+ xOrderingSource,
1294
+ xOrderingSourceType,
1295
+ xLocationDetail,
1296
+ xCurrencyCode,
1297
+ requestHeaders,
1298
+ } = { requestHeaders: {} },
920
1299
  { responseHeaders } = { responseHeaders: false }
921
1300
  ) {
922
1301
  const {
@@ -924,6 +1303,10 @@ class Cart {
924
1303
  } = CartPlatformApplicationValidator.fetchAndvalidateCartItems().validate(
925
1304
  {
926
1305
  body,
1306
+ xOrderingSource,
1307
+ xOrderingSourceType,
1308
+ xLocationDetail,
1309
+ xCurrencyCode,
927
1310
  },
928
1311
  { abortEarly: false, allowUnknown: true }
929
1312
  );
@@ -937,6 +1320,10 @@ class Cart {
937
1320
  } = CartPlatformApplicationValidator.fetchAndvalidateCartItems().validate(
938
1321
  {
939
1322
  body,
1323
+ xOrderingSource,
1324
+ xOrderingSourceType,
1325
+ xLocationDetail,
1326
+ xCurrencyCode,
940
1327
  },
941
1328
  { abortEarly: false, allowUnknown: false }
942
1329
  );
@@ -966,7 +1353,7 @@ class Cart {
966
1353
 
967
1354
  const {
968
1355
  error: res_error,
969
- } = CartPlatformModel.OpenapiCartDetailsResponse().validate(responseData, {
1356
+ } = CartPlatformModel.OpenapiCartDetailsResult().validate(responseData, {
970
1357
  abortEarly: false,
971
1358
  allowUnknown: true,
972
1359
  });
@@ -992,7 +1379,7 @@ class Cart {
992
1379
  * @returns {Promise<CartPlatformModel.CartMetaConfigAdd>} - Success response
993
1380
  * @name fetchCartMetaConfig
994
1381
  * @summary: Get cart meta
995
- * @description: Retrieve meta configuration settings tailored for customizing the cart experience within a specific sales channel. Cart meta includes configuration settings such as allowed maximum cart value, allowed minimum cart value, maximum allowed cart items, delivery charges, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/fetchCartMetaConfig/).
1382
+ * @description: Retrieve meta configuration settings tailored for customizing the cart experience within a specific sales channel. Cart meta includes configuration settings such as allowed maximum cart value, allowed minimum cart value, maximum allowed cart items, delivery charges, etc. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/fetchCartMetaConfig/).
996
1383
  */
997
1384
  async fetchCartMetaConfig(
998
1385
  { requestHeaders } = { requestHeaders: {} },
@@ -1064,10 +1451,10 @@ class Cart {
1064
1451
  * @param {CartPlatformApplicationValidator.GetAbandonedCartParam} arg - Arg object
1065
1452
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1066
1453
  * @param {import("../PlatformAPIClient").Options} - Options
1067
- * @returns {Promise<CartPlatformModel.AbandonedCartResponse>} - Success response
1454
+ * @returns {Promise<CartPlatformModel.AbandonedCartResult>} - Success response
1068
1455
  * @name getAbandonedCart
1069
1456
  * @summary: Get abandoned carts
1070
- * @description: Retrieve the list of abandoned carts that have been active for the specified period of time and have not yet been archived for the specific sales channel. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAbandonedCart/).
1457
+ * @description: Retrieve the list of abandoned carts that have been active for the specified period of time and have not yet been archived for the specific sales channel. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/getAbandonedCart/).
1071
1458
  */
1072
1459
  async getAbandonedCart(
1073
1460
  {
@@ -1148,7 +1535,7 @@ class Cart {
1148
1535
 
1149
1536
  const {
1150
1537
  error: res_error,
1151
- } = CartPlatformModel.AbandonedCartResponse().validate(responseData, {
1538
+ } = CartPlatformModel.AbandonedCartResult().validate(responseData, {
1152
1539
  abortEarly: false,
1153
1540
  allowUnknown: true,
1154
1541
  });
@@ -1173,10 +1560,10 @@ class Cart {
1173
1560
  *
1174
1561
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1175
1562
  * @param {import("../PlatformAPIClient").Options} - Options
1176
- * @returns {Promise<CartPlatformModel.CartDetailResponse>} - Success response
1563
+ * @returns {Promise<CartPlatformModel.CartDetailResult>} - Success response
1177
1564
  * @name getAbandonedCartDetails
1178
1565
  * @summary: Get abandoned cart details
1179
- * @description: Retrieves abandoned cart details linked to a specific customer using a unique cart ID. It offers an overview of the items, quantities, prices, and other relevant information associated with the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAbandonedCartDetails/).
1566
+ * @description: Retrieves abandoned cart details linked to a specific customer using a unique cart ID. It offers an overview of the items, quantities, prices, and other relevant information associated with the cart. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/getAbandonedCartDetails/).
1180
1567
  */
1181
1568
  async getAbandonedCartDetails(
1182
1569
  { id, i, b, c, requestHeaders } = { requestHeaders: {} },
@@ -1239,7 +1626,7 @@ class Cart {
1239
1626
 
1240
1627
  const {
1241
1628
  error: res_error,
1242
- } = CartPlatformModel.CartDetailResponse().validate(responseData, {
1629
+ } = CartPlatformModel.CartDetailResult().validate(responseData, {
1243
1630
  abortEarly: false,
1244
1631
  allowUnknown: true,
1245
1632
  });
@@ -1265,7 +1652,7 @@ class Cart {
1265
1652
  * @returns {Promise<CartPlatformModel.PlatformAddress>} - Success response
1266
1653
  * @name getAddressById
1267
1654
  * @summary: Get details for a single customer address
1268
- * @description: Retrieve a specific customer address stored in the system by providing its unique identifier. This API provides detailed information about the address, including the recipient's name, address, city, postal code, and other relevant details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAddressById/).
1655
+ * @description: Retrieve a specific customer address stored in the system by providing its unique identifier. This API provides detailed information about the address, including the recipient's name, address, city, postal code, and other relevant details. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/getAddressById/).
1269
1656
  */
1270
1657
  async getAddressById(
1271
1658
  {
@@ -1372,11 +1759,11 @@ class Cart {
1372
1759
  * @param {CartPlatformApplicationValidator.GetAddressesParam} arg - Arg object
1373
1760
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1374
1761
  * @param {import("../PlatformAPIClient").Options} - Options
1375
- * @returns {Promise<CartPlatformModel.PlatformGetAddressesResponse>} -
1762
+ * @returns {Promise<CartPlatformModel.PlatformGetAddressesDetails>} -
1376
1763
  * Success response
1377
1764
  * @name getAddresses
1378
1765
  * @summary: Get a list of addresses for a customer
1379
- * @description: Retrieves a list of all addresses saved by the customer, simplifying the checkout process by offering pre-saved address options for delivery. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAddresses/).
1766
+ * @description: Retrieves a list of all addresses saved by the customer, simplifying the checkout process by offering pre-saved address options for delivery. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/getAddresses/).
1380
1767
  */
1381
1768
  async getAddresses(
1382
1769
  {
@@ -1455,10 +1842,10 @@ class Cart {
1455
1842
 
1456
1843
  const {
1457
1844
  error: res_error,
1458
- } = CartPlatformModel.PlatformGetAddressesResponse().validate(
1459
- responseData,
1460
- { abortEarly: false, allowUnknown: true }
1461
- );
1845
+ } = CartPlatformModel.PlatformGetAddressesDetails().validate(responseData, {
1846
+ abortEarly: false,
1847
+ allowUnknown: true,
1848
+ });
1462
1849
 
1463
1850
  if (res_error) {
1464
1851
  if (this.config.options.strictResponseCheck === true) {
@@ -1478,10 +1865,10 @@ class Cart {
1478
1865
  * @param {CartPlatformApplicationValidator.GetAppCouponsParam} arg - Arg object
1479
1866
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1480
1867
  * @param {import("../PlatformAPIClient").Options} - Options
1481
- * @returns {Promise<CartPlatformModel.GetCouponResponse>} - Success response
1868
+ * @returns {Promise<CartPlatformModel.GetCouponResult>} - Success response
1482
1869
  * @name getAppCoupons
1483
- * @summary: List coupons
1484
- * @description: Retrieve a list of all available coupons that customer can apply to their carts. It provides details about each coupon, including its code, discount amount, and applicable conditions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAppCoupons/).
1870
+ * @summary: List of coupons
1871
+ * @description: Retrieve a list of all available coupons that customer can apply to their carts. It provides details about each coupon, including its code, discount amount, and applicable conditions. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/getAppCoupons/).
1485
1872
  */
1486
1873
  async getAppCoupons(
1487
1874
  { id, buyNow, slug, storeId, requestHeaders } = { requestHeaders: {} },
@@ -1542,7 +1929,7 @@ class Cart {
1542
1929
 
1543
1930
  const {
1544
1931
  error: res_error,
1545
- } = CartPlatformModel.GetCouponResponse().validate(responseData, {
1932
+ } = CartPlatformModel.GetCouponResult().validate(responseData, {
1546
1933
  abortEarly: false,
1547
1934
  allowUnknown: true,
1548
1935
  });
@@ -1567,10 +1954,10 @@ class Cart {
1567
1954
  *
1568
1955
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1569
1956
  * @param {import("../PlatformAPIClient").Options} - Options
1570
- * @returns {Promise<CartPlatformModel.CartDeliveryModesResponse>} - Success response
1957
+ * @returns {Promise<CartPlatformModel.CartDeliveryModesDetails>} - Success response
1571
1958
  * @name getAvailableDeliveryModes
1572
1959
  * @summary: Get delivery modes
1573
- * @description: Retrieve a list of delivery modes (home delivery/store pickup) along with a list of available pickup stores for a given cart at a specified PIN Code. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAvailableDeliveryModes/).
1960
+ * @description: Retrieve a list of delivery modes (home delivery/store pickup) along with a list of available pickup stores for a given cart at a specified PIN Code. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/getAvailableDeliveryModes/).
1574
1961
  */
1575
1962
  async getAvailableDeliveryModes(
1576
1963
  { areaCode, id, requestHeaders } = { requestHeaders: {} },
@@ -1627,7 +2014,7 @@ class Cart {
1627
2014
 
1628
2015
  const {
1629
2016
  error: res_error,
1630
- } = CartPlatformModel.CartDeliveryModesResponse().validate(responseData, {
2017
+ } = CartPlatformModel.CartDeliveryModesDetails().validate(responseData, {
1631
2018
  abortEarly: false,
1632
2019
  allowUnknown: true,
1633
2020
  });
@@ -1650,19 +2037,32 @@ class Cart {
1650
2037
  * @param {CartPlatformApplicationValidator.GetCartParam} arg - Arg object
1651
2038
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1652
2039
  * @param {import("../PlatformAPIClient").Options} - Options
1653
- * @returns {Promise<CartPlatformModel.CartDetailResponse>} - Success response
2040
+ * @returns {Promise<CartPlatformModel.CartDetailResult>} - Success response
1654
2041
  * @name getCart
1655
2042
  * @summary: Get a cart
1656
- * @description: Retrieve details of a cart linked to a specific customer using either the customer's ID or a unique cart ID. It offers an overview of the items, quantities, prices, and other relevant information associated with the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCart/).
2043
+ * @description: Retrieve details of a cart linked to a specific customer using either the customer's ID or a unique cart ID. It offers an overview of the items, quantities, prices, and other relevant information associated with the cart. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/getCart/).
1657
2044
  */
1658
2045
  async getCart(
1659
- { id, userId, orderType, i, b, assignCardId, buyNow, requestHeaders } = {
1660
- requestHeaders: {},
1661
- },
2046
+ {
2047
+ xOrderingSource,
2048
+ xOrderingSourceType,
2049
+ xAnonymousCart,
2050
+ id,
2051
+ userId,
2052
+ orderType,
2053
+ i,
2054
+ b,
2055
+ assignCardId,
2056
+ buyNow,
2057
+ requestHeaders,
2058
+ } = { requestHeaders: {} },
1662
2059
  { responseHeaders } = { responseHeaders: false }
1663
2060
  ) {
1664
2061
  const { error } = CartPlatformApplicationValidator.getCart().validate(
1665
2062
  {
2063
+ xOrderingSource,
2064
+ xOrderingSourceType,
2065
+ xAnonymousCart,
1666
2066
  id,
1667
2067
  userId,
1668
2068
  orderType,
@@ -1682,6 +2082,9 @@ class Cart {
1682
2082
  error: warrning,
1683
2083
  } = CartPlatformApplicationValidator.getCart().validate(
1684
2084
  {
2085
+ xOrderingSource,
2086
+ xOrderingSourceType,
2087
+ xAnonymousCart,
1685
2088
  id,
1686
2089
  userId,
1687
2090
  orderType,
@@ -1725,7 +2128,7 @@ class Cart {
1725
2128
 
1726
2129
  const {
1727
2130
  error: res_error,
1728
- } = CartPlatformModel.CartDetailResponse().validate(responseData, {
2131
+ } = CartPlatformModel.CartDetailResult().validate(responseData, {
1729
2132
  abortEarly: false,
1730
2133
  allowUnknown: true,
1731
2134
  });
@@ -1748,10 +2151,10 @@ class Cart {
1748
2151
  * @param {CartPlatformApplicationValidator.GetCartListParam} arg - Arg object
1749
2152
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1750
2153
  * @param {import("../PlatformAPIClient").Options} - Options
1751
- * @returns {Promise<CartPlatformModel.MultiCartResponse>} - Success response
2154
+ * @returns {Promise<CartPlatformModel.MultiCartResult>} - Success response
1752
2155
  * @name getCartList
1753
- * @summary: List carts
1754
- * @description: Retrieve the list of active carts associated with a specific customer. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCartList/).
2156
+ * @summary: List of carts
2157
+ * @description: Retrieve the list of active carts associated with a specific customer. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/getCartList/).
1755
2158
  */
1756
2159
  async getCartList(
1757
2160
  { fromDate, toDate, filterOn, requestHeaders } = { requestHeaders: {} },
@@ -1809,7 +2212,7 @@ class Cart {
1809
2212
 
1810
2213
  const {
1811
2214
  error: res_error,
1812
- } = CartPlatformModel.MultiCartResponse().validate(responseData, {
2215
+ } = CartPlatformModel.MultiCartResult().validate(responseData, {
1813
2216
  abortEarly: false,
1814
2217
  allowUnknown: true,
1815
2218
  });
@@ -1832,10 +2235,10 @@ class Cart {
1832
2235
  * @param {CartPlatformApplicationValidator.GetCartShareLinkParam} arg - Arg object
1833
2236
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1834
2237
  * @param {import("../PlatformAPIClient").Options} - Options
1835
- * @returns {Promise<CartPlatformModel.GetShareCartLinkResponse>} - Success response
2238
+ * @returns {Promise<CartPlatformModel.GetShareCartLinkResult>} - Success response
1836
2239
  * @name getCartShareLink
1837
2240
  * @summary: Share cart link
1838
- * @description: Generate a unique shareable link for the customer's cart for a specific sales channel. This link enables easy sharing of the cart contents with other users, facilitating collaborative shopping experiences. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCartShareLink/).
2241
+ * @description: Generate a unique shareable link for the customer's cart for a specific sales channel. This link enables easy sharing of the cart contents with other users, facilitating collaborative shopping experiences. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/getCartShareLink/).
1839
2242
  */
1840
2243
  async getCartShareLink(
1841
2244
  { body, requestHeaders } = { requestHeaders: {} },
@@ -1888,7 +2291,7 @@ class Cart {
1888
2291
 
1889
2292
  const {
1890
2293
  error: res_error,
1891
- } = CartPlatformModel.GetShareCartLinkResponse().validate(responseData, {
2294
+ } = CartPlatformModel.GetShareCartLinkResult().validate(responseData, {
1892
2295
  abortEarly: false,
1893
2296
  allowUnknown: true,
1894
2297
  });
@@ -1911,10 +2314,10 @@ class Cart {
1911
2314
  * @param {CartPlatformApplicationValidator.GetCartSharedItemsParam} arg - Arg object
1912
2315
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1913
2316
  * @param {import("../PlatformAPIClient").Options} - Options
1914
- * @returns {Promise<CartPlatformModel.SharedCartResponse>} - Success response
2317
+ * @returns {Promise<CartPlatformModel.SharedCartResult>} - Success response
1915
2318
  * @name getCartSharedItems
1916
2319
  * @summary: List shared cart items
1917
- * @description: Retrieve the cart items from the shared cart link based on unique token. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCartSharedItems/).
2320
+ * @description: Retrieve the cart items from the shared cart link based on unique token. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/getCartSharedItems/).
1918
2321
  */
1919
2322
  async getCartSharedItems(
1920
2323
  { token, requestHeaders } = { requestHeaders: {} },
@@ -1967,7 +2370,7 @@ class Cart {
1967
2370
 
1968
2371
  const {
1969
2372
  error: res_error,
1970
- } = CartPlatformModel.SharedCartResponse().validate(responseData, {
2373
+ } = CartPlatformModel.SharedCartResult().validate(responseData, {
1971
2374
  abortEarly: false,
1972
2375
  allowUnknown: true,
1973
2376
  });
@@ -1993,7 +2396,7 @@ class Cart {
1993
2396
  * @returns {Promise<CartPlatformModel.CouponUpdate>} - Success response
1994
2397
  * @name getCouponById
1995
2398
  * @summary: Get a coupon
1996
- * @description: Retrieve details of a specific coupon by providing its unique identifier to obtain information such as coupon type, rules, validity period and other related information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCouponById/).
2399
+ * @description: Retrieve details of a specific coupon by providing its unique identifier to obtain information such as coupon type, rules, validity period and other related information. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/getCouponById/).
1997
2400
  */
1998
2401
  async getCouponById(
1999
2402
  { id, requestHeaders } = { requestHeaders: {} },
@@ -2070,7 +2473,7 @@ class Cart {
2070
2473
  * @returns {Promise<Object>} - Success response
2071
2474
  * @name getCouponCodeExists
2072
2475
  * @summary: Check coupon code exists
2073
- * @description: Validates the presence of a coupon code for the specified sales channel to verify whether the provided code already exists or not. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCouponCodeExists/).
2476
+ * @description: Validates the presence of a coupon code for the specified sales channel to verify whether the provided code already exists or not. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/getCouponCodeExists/).
2074
2477
  */
2075
2478
  async getCouponCodeExists(
2076
2479
  { code, requestHeaders } = { requestHeaders: {} },
@@ -2150,16 +2553,227 @@ class Cart {
2150
2553
  * @returns {Promise<Object>} - Success response
2151
2554
  * @name getCouponOptionValues
2152
2555
  * @summary: Get coupon option values
2153
- * @description: Retrieves the available values for coupon options used to create and update coupons. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCouponOptionValues/).
2556
+ * @description: Retrieves the available values for coupon options used to create and update coupons. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/getCouponOptionValues/).
2557
+ */
2558
+ async getCouponOptionValues(
2559
+ { requestHeaders } = { requestHeaders: {} },
2560
+ { responseHeaders } = { responseHeaders: false }
2561
+ ) {
2562
+ const {
2563
+ error,
2564
+ } = CartPlatformApplicationValidator.getCouponOptionValues().validate(
2565
+ {},
2566
+ { abortEarly: false, allowUnknown: true }
2567
+ );
2568
+ if (error) {
2569
+ return Promise.reject(new FDKClientValidationError(error));
2570
+ }
2571
+
2572
+ // Showing warrnings if extra unknown parameters are found
2573
+ const {
2574
+ error: warrning,
2575
+ } = CartPlatformApplicationValidator.getCouponOptionValues().validate(
2576
+ {},
2577
+ { abortEarly: false, allowUnknown: false }
2578
+ );
2579
+ if (warrning) {
2580
+ Logger({
2581
+ level: "WARN",
2582
+ message: `Parameter Validation warrnings for platform > Cart > getCouponOptionValues \n ${warrning}`,
2583
+ });
2584
+ }
2585
+
2586
+ const query_params = {};
2587
+
2588
+ const response = await PlatformAPIClient.execute(
2589
+ this.config,
2590
+ "get",
2591
+ `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/coupon_options`,
2592
+ query_params,
2593
+ undefined,
2594
+ requestHeaders,
2595
+ { responseHeaders }
2596
+ );
2597
+
2598
+ let responseData = response;
2599
+ if (responseHeaders) {
2600
+ responseData = response[0];
2601
+ }
2602
+
2603
+ const { error: res_error } = Joi.any().validate(responseData, {
2604
+ abortEarly: false,
2605
+ allowUnknown: true,
2606
+ });
2607
+
2608
+ if (res_error) {
2609
+ if (this.config.options.strictResponseCheck === true) {
2610
+ return Promise.reject(new FDKResponseValidationError(res_error));
2611
+ } else {
2612
+ Logger({
2613
+ level: "WARN",
2614
+ message: `Response Validation Warnings for platform > Cart > getCouponOptionValues \n ${res_error}`,
2615
+ });
2616
+ }
2617
+ }
2618
+
2619
+ return response;
2620
+ }
2621
+
2622
+ /**
2623
+ * @param {CartPlatformApplicationValidator.GetCouponsParam} arg - Arg object
2624
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2625
+ * @param {import("../PlatformAPIClient").Options} - Options
2626
+ * @returns {Promise<CartPlatformModel.CouponsResult>} - Success response
2627
+ * @name getCoupons
2628
+ * @summary: List of coupons
2629
+ * @description: Retrieve a list of all created coupons for specific sales channel. It also supports searching based on text search, pagination and other flags to filter coupons. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/getCoupons/).
2630
+ */
2631
+ async getCoupons(
2632
+ {
2633
+ pageNo,
2634
+ pageSize,
2635
+ isArchived,
2636
+ title,
2637
+ isPublic,
2638
+ isDisplay,
2639
+ typeSlug,
2640
+ code,
2641
+ createdBy,
2642
+ reviewedBy,
2643
+ approvedStartTime,
2644
+ approvedEndTime,
2645
+ reviewStartTime,
2646
+ reviewEndTime,
2647
+ status,
2648
+ requestHeaders,
2649
+ } = { requestHeaders: {} },
2650
+ { responseHeaders } = { responseHeaders: false }
2651
+ ) {
2652
+ const { error } = CartPlatformApplicationValidator.getCoupons().validate(
2653
+ {
2654
+ pageNo,
2655
+ pageSize,
2656
+ isArchived,
2657
+ title,
2658
+ isPublic,
2659
+ isDisplay,
2660
+ typeSlug,
2661
+ code,
2662
+ createdBy,
2663
+ reviewedBy,
2664
+ approvedStartTime,
2665
+ approvedEndTime,
2666
+ reviewStartTime,
2667
+ reviewEndTime,
2668
+ status,
2669
+ },
2670
+ { abortEarly: false, allowUnknown: true }
2671
+ );
2672
+ if (error) {
2673
+ return Promise.reject(new FDKClientValidationError(error));
2674
+ }
2675
+
2676
+ // Showing warrnings if extra unknown parameters are found
2677
+ const {
2678
+ error: warrning,
2679
+ } = CartPlatformApplicationValidator.getCoupons().validate(
2680
+ {
2681
+ pageNo,
2682
+ pageSize,
2683
+ isArchived,
2684
+ title,
2685
+ isPublic,
2686
+ isDisplay,
2687
+ typeSlug,
2688
+ code,
2689
+ createdBy,
2690
+ reviewedBy,
2691
+ approvedStartTime,
2692
+ approvedEndTime,
2693
+ reviewStartTime,
2694
+ reviewEndTime,
2695
+ status,
2696
+ },
2697
+ { abortEarly: false, allowUnknown: false }
2698
+ );
2699
+ if (warrning) {
2700
+ Logger({
2701
+ level: "WARN",
2702
+ message: `Parameter Validation warrnings for platform > Cart > getCoupons \n ${warrning}`,
2703
+ });
2704
+ }
2705
+
2706
+ const query_params = {};
2707
+ query_params["page_no"] = pageNo;
2708
+ query_params["page_size"] = pageSize;
2709
+ query_params["is_archived"] = isArchived;
2710
+ query_params["title"] = title;
2711
+ query_params["is_public"] = isPublic;
2712
+ query_params["is_display"] = isDisplay;
2713
+ query_params["type_slug"] = typeSlug;
2714
+ query_params["code"] = code;
2715
+ query_params["created_by"] = createdBy;
2716
+ query_params["reviewed_by"] = reviewedBy;
2717
+ query_params["approved_start_time"] = approvedStartTime;
2718
+ query_params["approved_end_time"] = approvedEndTime;
2719
+ query_params["review_start_time"] = reviewStartTime;
2720
+ query_params["review_end_time"] = reviewEndTime;
2721
+ query_params["status"] = status;
2722
+
2723
+ const response = await PlatformAPIClient.execute(
2724
+ this.config,
2725
+ "get",
2726
+ `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/coupon`,
2727
+ query_params,
2728
+ undefined,
2729
+ requestHeaders,
2730
+ { responseHeaders }
2731
+ );
2732
+
2733
+ let responseData = response;
2734
+ if (responseHeaders) {
2735
+ responseData = response[0];
2736
+ }
2737
+
2738
+ const {
2739
+ error: res_error,
2740
+ } = CartPlatformModel.CouponsResult().validate(responseData, {
2741
+ abortEarly: false,
2742
+ allowUnknown: true,
2743
+ });
2744
+
2745
+ if (res_error) {
2746
+ if (this.config.options.strictResponseCheck === true) {
2747
+ return Promise.reject(new FDKResponseValidationError(res_error));
2748
+ } else {
2749
+ Logger({
2750
+ level: "WARN",
2751
+ message: `Response Validation Warnings for platform > Cart > getCoupons \n ${res_error}`,
2752
+ });
2753
+ }
2754
+ }
2755
+
2756
+ return response;
2757
+ }
2758
+
2759
+ /**
2760
+ * @param {CartPlatformApplicationValidator.GetItemCountParam} arg - Arg object
2761
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2762
+ * @param {import("../PlatformAPIClient").Options} - Options
2763
+ * @returns {Promise<CartPlatformModel.CartItemCountResult>} - Success response
2764
+ * @name getItemCount
2765
+ * @summary: Get a cart items count
2766
+ * @description: Retrieve the total count of items currently present in the customer's cart. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/getItemCount/).
2154
2767
  */
2155
- async getCouponOptionValues(
2156
- { requestHeaders } = { requestHeaders: {} },
2768
+ async getItemCount(
2769
+ { id, buyNow, requestHeaders } = { requestHeaders: {} },
2157
2770
  { responseHeaders } = { responseHeaders: false }
2158
2771
  ) {
2159
- const {
2160
- error,
2161
- } = CartPlatformApplicationValidator.getCouponOptionValues().validate(
2162
- {},
2772
+ const { error } = CartPlatformApplicationValidator.getItemCount().validate(
2773
+ {
2774
+ id,
2775
+ buyNow,
2776
+ },
2163
2777
  { abortEarly: false, allowUnknown: true }
2164
2778
  );
2165
2779
  if (error) {
@@ -2169,23 +2783,28 @@ class Cart {
2169
2783
  // Showing warrnings if extra unknown parameters are found
2170
2784
  const {
2171
2785
  error: warrning,
2172
- } = CartPlatformApplicationValidator.getCouponOptionValues().validate(
2173
- {},
2786
+ } = CartPlatformApplicationValidator.getItemCount().validate(
2787
+ {
2788
+ id,
2789
+ buyNow,
2790
+ },
2174
2791
  { abortEarly: false, allowUnknown: false }
2175
2792
  );
2176
2793
  if (warrning) {
2177
2794
  Logger({
2178
2795
  level: "WARN",
2179
- message: `Parameter Validation warrnings for platform > Cart > getCouponOptionValues \n ${warrning}`,
2796
+ message: `Parameter Validation warrnings for platform > Cart > getItemCount \n ${warrning}`,
2180
2797
  });
2181
2798
  }
2182
2799
 
2183
2800
  const query_params = {};
2801
+ query_params["id"] = id;
2802
+ query_params["buy_now"] = buyNow;
2184
2803
 
2185
2804
  const response = await PlatformAPIClient.execute(
2186
2805
  this.config,
2187
2806
  "get",
2188
- `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/coupon_options`,
2807
+ `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/basic`,
2189
2808
  query_params,
2190
2809
  undefined,
2191
2810
  requestHeaders,
@@ -2197,7 +2816,9 @@ class Cart {
2197
2816
  responseData = response[0];
2198
2817
  }
2199
2818
 
2200
- const { error: res_error } = Joi.any().validate(responseData, {
2819
+ const {
2820
+ error: res_error,
2821
+ } = CartPlatformModel.CartItemCountResult().validate(responseData, {
2201
2822
  abortEarly: false,
2202
2823
  allowUnknown: true,
2203
2824
  });
@@ -2208,7 +2829,7 @@ class Cart {
2208
2829
  } else {
2209
2830
  Logger({
2210
2831
  level: "WARN",
2211
- message: `Response Validation Warnings for platform > Cart > getCouponOptionValues \n ${res_error}`,
2832
+ message: `Response Validation Warnings for platform > Cart > getItemCount \n ${res_error}`,
2212
2833
  });
2213
2834
  }
2214
2835
  }
@@ -2217,38 +2838,21 @@ class Cart {
2217
2838
  }
2218
2839
 
2219
2840
  /**
2220
- * @param {CartPlatformApplicationValidator.GetCouponsParam} arg - Arg object
2841
+ * @param {CartPlatformApplicationValidator.GetOfferByIdParam} arg - Arg object
2221
2842
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2222
2843
  * @param {import("../PlatformAPIClient").Options} - Options
2223
- * @returns {Promise<CartPlatformModel.CouponsResponse>} - Success response
2224
- * @name getCoupons
2225
- * @summary: List coupons
2226
- * @description: Retrieve a list of all created coupons for specific sales channel. It also supports searching based on text search, pagination and other flags to filter coupons. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCoupons/).
2844
+ * @returns {Promise<CartPlatformModel.OfferSchema>} - Success response
2845
+ * @name getOfferById
2846
+ * @summary: Get a specific offer
2847
+ * @description: Retrieve details of a specific offer by providing its unique identifier to obtain information such as offer type, rules, validity period and other related information. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/getOfferById/).
2227
2848
  */
2228
- async getCoupons(
2229
- {
2230
- pageNo,
2231
- pageSize,
2232
- isArchived,
2233
- title,
2234
- isPublic,
2235
- isDisplay,
2236
- typeSlug,
2237
- code,
2238
- requestHeaders,
2239
- } = { requestHeaders: {} },
2849
+ async getOfferById(
2850
+ { id, requestHeaders } = { requestHeaders: {} },
2240
2851
  { responseHeaders } = { responseHeaders: false }
2241
2852
  ) {
2242
- const { error } = CartPlatformApplicationValidator.getCoupons().validate(
2853
+ const { error } = CartPlatformApplicationValidator.getOfferById().validate(
2243
2854
  {
2244
- pageNo,
2245
- pageSize,
2246
- isArchived,
2247
- title,
2248
- isPublic,
2249
- isDisplay,
2250
- typeSlug,
2251
- code,
2855
+ id,
2252
2856
  },
2253
2857
  { abortEarly: false, allowUnknown: true }
2254
2858
  );
@@ -2259,40 +2863,25 @@ class Cart {
2259
2863
  // Showing warrnings if extra unknown parameters are found
2260
2864
  const {
2261
2865
  error: warrning,
2262
- } = CartPlatformApplicationValidator.getCoupons().validate(
2866
+ } = CartPlatformApplicationValidator.getOfferById().validate(
2263
2867
  {
2264
- pageNo,
2265
- pageSize,
2266
- isArchived,
2267
- title,
2268
- isPublic,
2269
- isDisplay,
2270
- typeSlug,
2271
- code,
2868
+ id,
2272
2869
  },
2273
2870
  { abortEarly: false, allowUnknown: false }
2274
2871
  );
2275
2872
  if (warrning) {
2276
2873
  Logger({
2277
2874
  level: "WARN",
2278
- message: `Parameter Validation warrnings for platform > Cart > getCoupons \n ${warrning}`,
2875
+ message: `Parameter Validation warrnings for platform > Cart > getOfferById \n ${warrning}`,
2279
2876
  });
2280
2877
  }
2281
2878
 
2282
2879
  const query_params = {};
2283
- query_params["page_no"] = pageNo;
2284
- query_params["page_size"] = pageSize;
2285
- query_params["is_archived"] = isArchived;
2286
- query_params["title"] = title;
2287
- query_params["is_public"] = isPublic;
2288
- query_params["is_display"] = isDisplay;
2289
- query_params["type_slug"] = typeSlug;
2290
- query_params["code"] = code;
2291
2880
 
2292
2881
  const response = await PlatformAPIClient.execute(
2293
2882
  this.config,
2294
2883
  "get",
2295
- `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/coupon`,
2884
+ `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/offers/${id}`,
2296
2885
  query_params,
2297
2886
  undefined,
2298
2887
  requestHeaders,
@@ -2306,7 +2895,7 @@ class Cart {
2306
2895
 
2307
2896
  const {
2308
2897
  error: res_error,
2309
- } = CartPlatformModel.CouponsResponse().validate(responseData, {
2898
+ } = CartPlatformModel.OfferSchema().validate(responseData, {
2310
2899
  abortEarly: false,
2311
2900
  allowUnknown: true,
2312
2901
  });
@@ -2317,7 +2906,7 @@ class Cart {
2317
2906
  } else {
2318
2907
  Logger({
2319
2908
  level: "WARN",
2320
- message: `Response Validation Warnings for platform > Cart > getCoupons \n ${res_error}`,
2909
+ message: `Response Validation Warnings for platform > Cart > getOfferById \n ${res_error}`,
2321
2910
  });
2322
2911
  }
2323
2912
  }
@@ -2326,22 +2915,52 @@ class Cart {
2326
2915
  }
2327
2916
 
2328
2917
  /**
2329
- * @param {CartPlatformApplicationValidator.GetItemCountParam} arg - Arg object
2918
+ * @param {CartPlatformApplicationValidator.GetOffersParam} arg - Arg object
2330
2919
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2331
2920
  * @param {import("../PlatformAPIClient").Options} - Options
2332
- * @returns {Promise<CartPlatformModel.CartItemCountResponse>} - Success response
2333
- * @name getItemCount
2334
- * @summary: Get a cart items count
2335
- * @description: Retrieve the total count of items currently present in the customer's cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getItemCount/).
2921
+ * @returns {Promise<CartPlatformModel.OfferListResult>} - Success response
2922
+ * @name getOffers
2923
+ * @summary: List of offers
2924
+ * @description: Retrieve a list of all created offers for specific sales channel. It also supports efficient text search and pagination functionalities, ensuring optimized offers listing for streamlined navigation and management. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/getOffers/).
2336
2925
  */
2337
- async getItemCount(
2338
- { id, buyNow, requestHeaders } = { requestHeaders: {} },
2926
+ async getOffers(
2927
+ {
2928
+ pageNo,
2929
+ pageSize,
2930
+ search,
2931
+ mode,
2932
+ type,
2933
+ promoGroup,
2934
+ excludeContractOffers,
2935
+ offerId,
2936
+ createdBy,
2937
+ reviewedBy,
2938
+ approvedStartTime,
2939
+ approvedEndTime,
2940
+ status,
2941
+ code,
2942
+ isPublic,
2943
+ requestHeaders,
2944
+ } = { requestHeaders: {} },
2339
2945
  { responseHeaders } = { responseHeaders: false }
2340
2946
  ) {
2341
- const { error } = CartPlatformApplicationValidator.getItemCount().validate(
2947
+ const { error } = CartPlatformApplicationValidator.getOffers().validate(
2342
2948
  {
2343
- id,
2344
- buyNow,
2949
+ pageNo,
2950
+ pageSize,
2951
+ search,
2952
+ mode,
2953
+ type,
2954
+ promoGroup,
2955
+ excludeContractOffers,
2956
+ offerId,
2957
+ createdBy,
2958
+ reviewedBy,
2959
+ approvedStartTime,
2960
+ approvedEndTime,
2961
+ status,
2962
+ code,
2963
+ isPublic,
2345
2964
  },
2346
2965
  { abortEarly: false, allowUnknown: true }
2347
2966
  );
@@ -2352,28 +2971,54 @@ class Cart {
2352
2971
  // Showing warrnings if extra unknown parameters are found
2353
2972
  const {
2354
2973
  error: warrning,
2355
- } = CartPlatformApplicationValidator.getItemCount().validate(
2974
+ } = CartPlatformApplicationValidator.getOffers().validate(
2356
2975
  {
2357
- id,
2358
- buyNow,
2976
+ pageNo,
2977
+ pageSize,
2978
+ search,
2979
+ mode,
2980
+ type,
2981
+ promoGroup,
2982
+ excludeContractOffers,
2983
+ offerId,
2984
+ createdBy,
2985
+ reviewedBy,
2986
+ approvedStartTime,
2987
+ approvedEndTime,
2988
+ status,
2989
+ code,
2990
+ isPublic,
2359
2991
  },
2360
2992
  { abortEarly: false, allowUnknown: false }
2361
2993
  );
2362
2994
  if (warrning) {
2363
2995
  Logger({
2364
2996
  level: "WARN",
2365
- message: `Parameter Validation warrnings for platform > Cart > getItemCount \n ${warrning}`,
2997
+ message: `Parameter Validation warrnings for platform > Cart > getOffers \n ${warrning}`,
2366
2998
  });
2367
2999
  }
2368
3000
 
2369
3001
  const query_params = {};
2370
- query_params["id"] = id;
2371
- query_params["buy_now"] = buyNow;
3002
+ query_params["page_no"] = pageNo;
3003
+ query_params["page_size"] = pageSize;
3004
+ query_params["search"] = search;
3005
+ query_params["mode"] = mode;
3006
+ query_params["type"] = type;
3007
+ query_params["promo_group"] = promoGroup;
3008
+ query_params["exclude_contract_offers"] = excludeContractOffers;
3009
+ query_params["offer_id"] = offerId;
3010
+ query_params["created_by"] = createdBy;
3011
+ query_params["reviewed_by"] = reviewedBy;
3012
+ query_params["approved_start_time"] = approvedStartTime;
3013
+ query_params["approved_end_time"] = approvedEndTime;
3014
+ query_params["status"] = status;
3015
+ query_params["code"] = code;
3016
+ query_params["is_public"] = isPublic;
2372
3017
 
2373
3018
  const response = await PlatformAPIClient.execute(
2374
3019
  this.config,
2375
3020
  "get",
2376
- `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/basic`,
3021
+ `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/offers`,
2377
3022
  query_params,
2378
3023
  undefined,
2379
3024
  requestHeaders,
@@ -2387,7 +3032,7 @@ class Cart {
2387
3032
 
2388
3033
  const {
2389
3034
  error: res_error,
2390
- } = CartPlatformModel.CartItemCountResponse().validate(responseData, {
3035
+ } = CartPlatformModel.OfferListResult().validate(responseData, {
2391
3036
  abortEarly: false,
2392
3037
  allowUnknown: true,
2393
3038
  });
@@ -2398,7 +3043,7 @@ class Cart {
2398
3043
  } else {
2399
3044
  Logger({
2400
3045
  level: "WARN",
2401
- message: `Response Validation Warnings for platform > Cart > getItemCount \n ${res_error}`,
3046
+ message: `Response Validation Warnings for platform > Cart > getOffers \n ${res_error}`,
2402
3047
  });
2403
3048
  }
2404
3049
  }
@@ -2410,10 +3055,10 @@ class Cart {
2410
3055
  * @param {CartPlatformApplicationValidator.GetPriceAdjustmentsParam} arg - Arg object
2411
3056
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2412
3057
  * @param {import("../PlatformAPIClient").Options} - Options
2413
- * @returns {Promise<CartPlatformModel.GetPriceAdjustmentResponse>} - Success response
3058
+ * @returns {Promise<CartPlatformModel.GetPriceAdjustmentResult>} - Success response
2414
3059
  * @name getPriceAdjustments
2415
3060
  * @summary: Get a list of all price adjustments associated with a cart
2416
- * @description: This API helps to get price adjustments data associated to a particular cart - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPriceAdjustments/).
3061
+ * @description: This API helps to get price adjustments data associated to a particular cart - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/getPriceAdjustments/).
2417
3062
  */
2418
3063
  async getPriceAdjustments(
2419
3064
  { cartId, requestHeaders } = { requestHeaders: {} },
@@ -2467,7 +3112,7 @@ class Cart {
2467
3112
 
2468
3113
  const {
2469
3114
  error: res_error,
2470
- } = CartPlatformModel.GetPriceAdjustmentResponse().validate(responseData, {
3115
+ } = CartPlatformModel.GetPriceAdjustmentResult().validate(responseData, {
2471
3116
  abortEarly: false,
2472
3117
  allowUnknown: true,
2473
3118
  });
@@ -2492,10 +3137,10 @@ class Cart {
2492
3137
  *
2493
3138
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2494
3139
  * @param {import("../PlatformAPIClient").Options} - Options
2495
- * @returns {Promise<CartPlatformModel.ActivePromosResponse>} - Success response
3140
+ * @returns {Promise<CartPlatformModel.ActivePromosResult>} - Success response
2496
3141
  * @name getPromosCouponConfig
2497
3142
  * @summary: Get promotion and coupon type
2498
- * @description: Retrieve the configuration settings related to promotions and coupons for a specific seller. It provides details of the supported types of coupons and promotions along with their descriptions, examples, and related attributes. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPromosCouponConfig/).
3143
+ * @description: Retrieve the configuration settings related to promotions and coupons for a specific seller. It provides details of the supported types of coupons and promotions along with their descriptions, examples, and related attributes. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/getPromosCouponConfig/).
2499
3144
  */
2500
3145
  async getPromosCouponConfig(
2501
3146
  { entityType, isHidden, requestHeaders } = { requestHeaders: {} },
@@ -2552,7 +3197,7 @@ class Cart {
2552
3197
 
2553
3198
  const {
2554
3199
  error: res_error,
2555
- } = CartPlatformModel.ActivePromosResponse().validate(responseData, {
3200
+ } = CartPlatformModel.ActivePromosResult().validate(responseData, {
2556
3201
  abortEarly: false,
2557
3202
  allowUnknown: true,
2558
3203
  });
@@ -2575,10 +3220,10 @@ class Cart {
2575
3220
  * @param {CartPlatformApplicationValidator.GetPromotionByIdParam} arg - Arg object
2576
3221
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2577
3222
  * @param {import("../PlatformAPIClient").Options} - Options
2578
- * @returns {Promise<CartPlatformModel.PromotionUpdate>} - Success response
3223
+ * @returns {Promise<CartPlatformModel.PromotionUpdateResult>} - Success response
2579
3224
  * @name getPromotionById
2580
- * @summary: Get a promotion
2581
- * @description: Retrieve details of a specific promotion by providing its unique identifier to obtain information such as promotion type, rules, validity period and other related information. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPromotionById/).
3225
+ * @summary: Get a specific promotion
3226
+ * @description: Retrieve details of a specific promotion by providing its unique identifier to obtain information such as promotion type, rules, validity period and other related information. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/getPromotionById/).
2582
3227
  */
2583
3228
  async getPromotionById(
2584
3229
  { id, requestHeaders } = { requestHeaders: {} },
@@ -2631,7 +3276,7 @@ class Cart {
2631
3276
 
2632
3277
  const {
2633
3278
  error: res_error,
2634
- } = CartPlatformModel.PromotionUpdate().validate(responseData, {
3279
+ } = CartPlatformModel.PromotionUpdateResult().validate(responseData, {
2635
3280
  abortEarly: false,
2636
3281
  allowUnknown: true,
2637
3282
  });
@@ -2659,7 +3304,7 @@ class Cart {
2659
3304
  * @returns {Promise<Object>} - Success response
2660
3305
  * @name getPromotionCodeExists
2661
3306
  * @summary: Check promotion code exists
2662
- * @description: Validates the presence of a promotion code for the specified sales channel to verify whether the provided code already exists or not. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPromotionCodeExists/).
3307
+ * @description: Validates the presence of a promotion code for the specified sales channel to verify whether the provided code already exists or not. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/getPromotionCodeExists/).
2663
3308
  */
2664
3309
  async getPromotionCodeExists(
2665
3310
  { code, requestHeaders } = { requestHeaders: {} },
@@ -2734,15 +3379,23 @@ class Cart {
2734
3379
  * @param {CartPlatformApplicationValidator.GetPromotionOffersParam} arg - Arg object
2735
3380
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2736
3381
  * @param {import("../PlatformAPIClient").Options} - Options
2737
- * @returns {Promise<CartPlatformModel.PromotionOffersResponse>} - Success response
3382
+ * @returns {Promise<CartPlatformModel.PromotionOffersDetails>} - Success response
2738
3383
  * @name getPromotionOffers
2739
- * @summary: List available promotion offers
2740
- * @description: Retrieve a list of all promotional offers available for the items in the cart, including details such as offer text, unique promotion ID, and validity period. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPromotionOffers/).
3384
+ * @summary: List of all available promotion offers
3385
+ * @description: Retrieve a list of all promotional offers available for the items in the cart, including details such as offer text, unique promotion ID, and validity period. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/getPromotionOffers/).
2741
3386
  */
2742
3387
  async getPromotionOffers(
2743
- { slug, pageSize, promotionGroup, storeId, cartType, requestHeaders } = {
2744
- requestHeaders: {},
2745
- },
3388
+ {
3389
+ slug,
3390
+ pageSize,
3391
+ promotionGroup,
3392
+ storeId,
3393
+ cartType,
3394
+ promotionType,
3395
+ cartId,
3396
+ autoApply,
3397
+ requestHeaders,
3398
+ } = { requestHeaders: {} },
2746
3399
  { responseHeaders } = { responseHeaders: false }
2747
3400
  ) {
2748
3401
  const {
@@ -2754,6 +3407,9 @@ class Cart {
2754
3407
  promotionGroup,
2755
3408
  storeId,
2756
3409
  cartType,
3410
+ promotionType,
3411
+ cartId,
3412
+ autoApply,
2757
3413
  },
2758
3414
  { abortEarly: false, allowUnknown: true }
2759
3415
  );
@@ -2771,6 +3427,9 @@ class Cart {
2771
3427
  promotionGroup,
2772
3428
  storeId,
2773
3429
  cartType,
3430
+ promotionType,
3431
+ cartId,
3432
+ autoApply,
2774
3433
  },
2775
3434
  { abortEarly: false, allowUnknown: false }
2776
3435
  );
@@ -2787,6 +3446,9 @@ class Cart {
2787
3446
  query_params["promotion_group"] = promotionGroup;
2788
3447
  query_params["store_id"] = storeId;
2789
3448
  query_params["cart_type"] = cartType;
3449
+ query_params["promotion_type"] = promotionType;
3450
+ query_params["cart_id"] = cartId;
3451
+ query_params["auto_apply"] = autoApply;
2790
3452
 
2791
3453
  const response = await PlatformAPIClient.execute(
2792
3454
  this.config,
@@ -2805,7 +3467,7 @@ class Cart {
2805
3467
 
2806
3468
  const {
2807
3469
  error: res_error,
2808
- } = CartPlatformModel.PromotionOffersResponse().validate(responseData, {
3470
+ } = CartPlatformModel.PromotionOffersDetails().validate(responseData, {
2809
3471
  abortEarly: false,
2810
3472
  allowUnknown: true,
2811
3473
  });
@@ -2830,11 +3492,11 @@ class Cart {
2830
3492
  *
2831
3493
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2832
3494
  * @param {import("../PlatformAPIClient").Options} - Options
2833
- * @returns {Promise<CartPlatformModel.PromotionPaymentOffersResponse>} -
3495
+ * @returns {Promise<CartPlatformModel.PromotionPaymentOffersDetails>} -
2834
3496
  * Success response
2835
3497
  * @name getPromotionPaymentOffers
2836
3498
  * @summary: Fetch available promotions payment offers
2837
- * @description: Use this API to get top 5 payment offers available for current product - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPromotionPaymentOffers/).
3499
+ * @description: Use this API to get top 5 payment offers available for current product - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/getPromotionPaymentOffers/).
2838
3500
  */
2839
3501
  async getPromotionPaymentOffers(
2840
3502
  { id, uid, requestHeaders } = { requestHeaders: {} },
@@ -2891,7 +3553,7 @@ class Cart {
2891
3553
 
2892
3554
  const {
2893
3555
  error: res_error,
2894
- } = CartPlatformModel.PromotionPaymentOffersResponse().validate(
3556
+ } = CartPlatformModel.PromotionPaymentOffersDetails().validate(
2895
3557
  responseData,
2896
3558
  { abortEarly: false, allowUnknown: true }
2897
3559
  );
@@ -2914,10 +3576,10 @@ class Cart {
2914
3576
  * @param {CartPlatformApplicationValidator.GetPromotionsParam} arg - Arg object
2915
3577
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2916
3578
  * @param {import("../PlatformAPIClient").Options} - Options
2917
- * @returns {Promise<CartPlatformModel.PromotionsResponse>} - Success response
3579
+ * @returns {Promise<CartPlatformModel.PromotionsResult>} - Success response
2918
3580
  * @name getPromotions
2919
- * @summary: List promotions
2920
- * @description: Retrieve a list of all created promotions for specific sales channel. It also supports efficient text search and pagination functionalities, ensuring optimized promotion listing for streamlined navigation and management. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPromotions/).
3581
+ * @summary: List of promotions
3582
+ * @description: Retrieve a list of all created promotions for specific sales channel. It also supports efficient text search and pagination functionalities, ensuring optimized promotion listing for streamlined navigation and management. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/getPromotions/).
2921
3583
  */
2922
3584
  async getPromotions(
2923
3585
  {
@@ -2929,6 +3591,13 @@ class Cart {
2929
3591
  promotionType,
2930
3592
  fpPanel,
2931
3593
  promotionId,
3594
+ createdBy,
3595
+ reviewedBy,
3596
+ approvedStartTime,
3597
+ approvedEndTime,
3598
+ reviewStartTime,
3599
+ reviewEndTime,
3600
+ status,
2932
3601
  requestHeaders,
2933
3602
  } = { requestHeaders: {} },
2934
3603
  { responseHeaders } = { responseHeaders: false }
@@ -2943,6 +3612,13 @@ class Cart {
2943
3612
  promotionType,
2944
3613
  fpPanel,
2945
3614
  promotionId,
3615
+ createdBy,
3616
+ reviewedBy,
3617
+ approvedStartTime,
3618
+ approvedEndTime,
3619
+ reviewStartTime,
3620
+ reviewEndTime,
3621
+ status,
2946
3622
  },
2947
3623
  { abortEarly: false, allowUnknown: true }
2948
3624
  );
@@ -2963,6 +3639,13 @@ class Cart {
2963
3639
  promotionType,
2964
3640
  fpPanel,
2965
3641
  promotionId,
3642
+ createdBy,
3643
+ reviewedBy,
3644
+ approvedStartTime,
3645
+ approvedEndTime,
3646
+ reviewStartTime,
3647
+ reviewEndTime,
3648
+ status,
2966
3649
  },
2967
3650
  { abortEarly: false, allowUnknown: false }
2968
3651
  );
@@ -2982,6 +3665,13 @@ class Cart {
2982
3665
  query_params["promotion_type"] = promotionType;
2983
3666
  query_params["fp_panel"] = fpPanel;
2984
3667
  query_params["promotion_id"] = promotionId;
3668
+ query_params["created_by"] = createdBy;
3669
+ query_params["reviewed_by"] = reviewedBy;
3670
+ query_params["approved_start_time"] = approvedStartTime;
3671
+ query_params["approved_end_time"] = approvedEndTime;
3672
+ query_params["review_start_time"] = reviewStartTime;
3673
+ query_params["review_end_time"] = reviewEndTime;
3674
+ query_params["status"] = status;
2985
3675
 
2986
3676
  const response = await PlatformAPIClient.execute(
2987
3677
  this.config,
@@ -3000,7 +3690,7 @@ class Cart {
3000
3690
 
3001
3691
  const {
3002
3692
  error: res_error,
3003
- } = CartPlatformModel.PromotionsResponse().validate(responseData, {
3693
+ } = CartPlatformModel.PromotionsResult().validate(responseData, {
3004
3694
  abortEarly: false,
3005
3695
  allowUnknown: true,
3006
3696
  });
@@ -3023,11 +3713,11 @@ class Cart {
3023
3713
  * @param {CartPlatformApplicationValidator.GetShipmentsParam} arg - Arg object
3024
3714
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3025
3715
  * @param {import("../PlatformAPIClient").Options} - Options
3026
- * @returns {Promise<CartPlatformModel.PlatformCartShipmentsResponse>} -
3716
+ * @returns {Promise<CartPlatformModel.PlatformCartShipmentsResult>} -
3027
3717
  * Success response
3028
3718
  * @name getShipments
3029
3719
  * @summary: Get shipments details
3030
- * @description: Use this API to get shipment details, expected delivery date, items and price breakup of the shipment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getShipments/).
3720
+ * @description: Use this API to get shipment details, expected delivery date, items and price breakup of the shipment. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/getShipments/).
3031
3721
  */
3032
3722
  async getShipments(
3033
3723
  {
@@ -3110,10 +3800,10 @@ class Cart {
3110
3800
 
3111
3801
  const {
3112
3802
  error: res_error,
3113
- } = CartPlatformModel.PlatformCartShipmentsResponse().validate(
3114
- responseData,
3115
- { abortEarly: false, allowUnknown: true }
3116
- );
3803
+ } = CartPlatformModel.PlatformCartShipmentsResult().validate(responseData, {
3804
+ abortEarly: false,
3805
+ allowUnknown: true,
3806
+ });
3117
3807
 
3118
3808
  if (res_error) {
3119
3809
  if (this.config.options.strictResponseCheck === true) {
@@ -3135,10 +3825,10 @@ class Cart {
3135
3825
  *
3136
3826
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3137
3827
  * @param {import("../PlatformAPIClient").Options} - Options
3138
- * @returns {Promise<CartPlatformModel.StoreDetailsResponse>} - Success response
3828
+ * @returns {Promise<CartPlatformModel.StoreDetails>} - Success response
3139
3829
  * @name getStoreAddressByUid
3140
3830
  * @summary: Get Store Address
3141
- * @description: Retrieve store details by entering the unique identifier of the pickup stores. Store details include the seller's name, contact information such as email address or phone number and business address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getStoreAddressByUid/).
3831
+ * @description: Retrieve store details by entering the unique identifier of the pickup stores. Store details include the seller's name, contact information such as email address or phone number and business address. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/getStoreAddressByUid/).
3142
3832
  */
3143
3833
  async getStoreAddressByUid(
3144
3834
  { storeUid, requestHeaders } = { requestHeaders: {} },
@@ -3192,7 +3882,7 @@ class Cart {
3192
3882
 
3193
3883
  const {
3194
3884
  error: res_error,
3195
- } = CartPlatformModel.StoreDetailsResponse().validate(responseData, {
3885
+ } = CartPlatformModel.StoreDetails().validate(responseData, {
3196
3886
  abortEarly: false,
3197
3887
  allowUnknown: true,
3198
3888
  });
@@ -3215,18 +3905,29 @@ class Cart {
3215
3905
  * @param {CartPlatformApplicationValidator.OverrideCartParam} arg - Arg object
3216
3906
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3217
3907
  * @param {import("../PlatformAPIClient").Options} - Options
3218
- * @returns {Promise<CartPlatformModel.OverrideCheckoutResponse>} - Success response
3908
+ * @returns {Promise<CartPlatformModel.OverrideCheckoutResult>} - Success response
3219
3909
  * @name overrideCart
3220
3910
  * @summary: Update cart checkout
3221
- * @description: Overrides the cart's checkout process with a new provided cart items. It provides flexibility in customizing checkout flows to meet specific business requirements, enhancing the user experience and optimizing order processing workflows. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/overrideCart/).
3911
+ * @description: Overrides the cart's checkout process with a new provided cart items. It provides flexibility in customizing checkout flows to meet specific business requirements, enhancing the user experience and optimizing order processing workflows. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/overrideCart/).
3222
3912
  */
3223
3913
  async overrideCart(
3224
- { body, requestHeaders } = { requestHeaders: {} },
3914
+ {
3915
+ body,
3916
+ xOrderingSource,
3917
+ xOrderingSourceType,
3918
+ xLocationDetail,
3919
+ xCurrencyCode,
3920
+ requestHeaders,
3921
+ } = { requestHeaders: {} },
3225
3922
  { responseHeaders } = { responseHeaders: false }
3226
3923
  ) {
3227
3924
  const { error } = CartPlatformApplicationValidator.overrideCart().validate(
3228
3925
  {
3229
3926
  body,
3927
+ xOrderingSource,
3928
+ xOrderingSourceType,
3929
+ xLocationDetail,
3930
+ xCurrencyCode,
3230
3931
  },
3231
3932
  { abortEarly: false, allowUnknown: true }
3232
3933
  );
@@ -3240,6 +3941,10 @@ class Cart {
3240
3941
  } = CartPlatformApplicationValidator.overrideCart().validate(
3241
3942
  {
3242
3943
  body,
3944
+ xOrderingSource,
3945
+ xOrderingSourceType,
3946
+ xLocationDetail,
3947
+ xCurrencyCode,
3243
3948
  },
3244
3949
  { abortEarly: false, allowUnknown: false }
3245
3950
  );
@@ -3269,7 +3974,7 @@ class Cart {
3269
3974
 
3270
3975
  const {
3271
3976
  error: res_error,
3272
- } = CartPlatformModel.OverrideCheckoutResponse().validate(responseData, {
3977
+ } = CartPlatformModel.OverrideCheckoutResult().validate(responseData, {
3273
3978
  abortEarly: false,
3274
3979
  allowUnknown: true,
3275
3980
  });
@@ -3292,15 +3997,25 @@ class Cart {
3292
3997
  * @param {CartPlatformApplicationValidator.PlatformAddItemsParam} arg - Arg object
3293
3998
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3294
3999
  * @param {import("../PlatformAPIClient").Options} - Options
3295
- * @returns {Promise<CartPlatformModel.AddCartDetailResponse>} - Success response
4000
+ * @returns {Promise<CartPlatformModel.AddCartDetailResult>} - Success response
3296
4001
  * @name platformAddItems
3297
4002
  * @summary: Add items to cart
3298
- * @description: Add product items to the customer's existing shopping cart. If there is no existing cart associated with the customer, it creates a new one and adds the items to it. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/platformAddItems/).
4003
+ * @description: Adds product items to a customer's shopping cart. If the customer does not have an existing cart, a new one is created automatically. - The `new_cart` flag forces creation of a new cart even if one already exists. - The `default_cart` flag determines whether the item is added to the user's default storefront-visible cart. If `true`, the item is added to the user's default cart that is accessible via the storefront. If `false`, an existing active cart is fetched if available; otherwise, a new hidden cart is created. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/platformAddItems/).
3299
4004
  */
3300
4005
  async platformAddItems(
3301
- { body, i, b, buyNow, orderType, id, requestHeaders } = {
3302
- requestHeaders: {},
3303
- },
4006
+ {
4007
+ body,
4008
+ xOrderingSource,
4009
+ xOrderingSourceType,
4010
+ xAnonymousCart,
4011
+ i,
4012
+ b,
4013
+ includeCartCalculation,
4014
+ buyNow,
4015
+ orderType,
4016
+ id,
4017
+ requestHeaders,
4018
+ } = { requestHeaders: {} },
3304
4019
  { responseHeaders } = { responseHeaders: false }
3305
4020
  ) {
3306
4021
  const {
@@ -3308,8 +4023,12 @@ class Cart {
3308
4023
  } = CartPlatformApplicationValidator.platformAddItems().validate(
3309
4024
  {
3310
4025
  body,
4026
+ xOrderingSource,
4027
+ xOrderingSourceType,
4028
+ xAnonymousCart,
3311
4029
  i,
3312
4030
  b,
4031
+ includeCartCalculation,
3313
4032
  buyNow,
3314
4033
  orderType,
3315
4034
  id,
@@ -3326,8 +4045,12 @@ class Cart {
3326
4045
  } = CartPlatformApplicationValidator.platformAddItems().validate(
3327
4046
  {
3328
4047
  body,
4048
+ xOrderingSource,
4049
+ xOrderingSourceType,
4050
+ xAnonymousCart,
3329
4051
  i,
3330
4052
  b,
4053
+ includeCartCalculation,
3331
4054
  buyNow,
3332
4055
  orderType,
3333
4056
  id,
@@ -3344,6 +4067,7 @@ class Cart {
3344
4067
  const query_params = {};
3345
4068
  query_params["i"] = i;
3346
4069
  query_params["b"] = b;
4070
+ query_params["include_cart_calculation"] = includeCartCalculation;
3347
4071
  query_params["buy_now"] = buyNow;
3348
4072
  query_params["order_type"] = orderType;
3349
4073
  query_params["id"] = id;
@@ -3365,7 +4089,7 @@ class Cart {
3365
4089
 
3366
4090
  const {
3367
4091
  error: res_error,
3368
- } = CartPlatformModel.AddCartDetailResponse().validate(responseData, {
4092
+ } = CartPlatformModel.AddCartDetailResult().validate(responseData, {
3369
4093
  abortEarly: false,
3370
4094
  allowUnknown: true,
3371
4095
  });
@@ -3390,13 +4114,20 @@ class Cart {
3390
4114
  *
3391
4115
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3392
4116
  * @param {import("../PlatformAPIClient").Options} - Options
3393
- * @returns {Promise<CartPlatformModel.CartCheckoutResponse>} - Success response
4117
+ * @returns {Promise<CartPlatformModel.CartCheckoutResult>} - Success response
3394
4118
  * @name platformCheckoutCart
3395
4119
  * @summary: Checkout cart
3396
- * @description: The checkout cart initiates the order creation process based on the selected address and payment method. It revalidates the cart details to ensure safe and seamless order placement. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/platformCheckoutCart/).
4120
+ * @description: The checkout cart initiates the order creation process based on the selected address and payment method. It revalidates the cart details to ensure safe and seamless order placement. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/platformCheckoutCart/).
3397
4121
  */
3398
4122
  async platformCheckoutCart(
3399
- { body, id, requestHeaders } = { requestHeaders: {} },
4123
+ {
4124
+ body,
4125
+ xOrderingSource,
4126
+ xOrderingSourceType,
4127
+ xAnonymousCart,
4128
+ id,
4129
+ requestHeaders,
4130
+ } = { requestHeaders: {} },
3400
4131
  { responseHeaders } = { responseHeaders: false }
3401
4132
  ) {
3402
4133
  const {
@@ -3404,6 +4135,9 @@ class Cart {
3404
4135
  } = CartPlatformApplicationValidator.platformCheckoutCart().validate(
3405
4136
  {
3406
4137
  body,
4138
+ xOrderingSource,
4139
+ xOrderingSourceType,
4140
+ xAnonymousCart,
3407
4141
  id,
3408
4142
  },
3409
4143
  { abortEarly: false, allowUnknown: true }
@@ -3418,6 +4152,9 @@ class Cart {
3418
4152
  } = CartPlatformApplicationValidator.platformCheckoutCart().validate(
3419
4153
  {
3420
4154
  body,
4155
+ xOrderingSource,
4156
+ xOrderingSourceType,
4157
+ xAnonymousCart,
3421
4158
  id,
3422
4159
  },
3423
4160
  { abortEarly: false, allowUnknown: false }
@@ -3449,7 +4186,7 @@ class Cart {
3449
4186
 
3450
4187
  const {
3451
4188
  error: res_error,
3452
- } = CartPlatformModel.CartCheckoutResponse().validate(responseData, {
4189
+ } = CartPlatformModel.CartCheckoutResult().validate(responseData, {
3453
4190
  abortEarly: false,
3454
4191
  allowUnknown: true,
3455
4192
  });
@@ -3474,13 +4211,22 @@ class Cart {
3474
4211
  *
3475
4212
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3476
4213
  * @param {import("../PlatformAPIClient").Options} - Options
3477
- * @returns {Promise<CartPlatformModel.CartCheckoutResponse>} - Success response
4214
+ * @returns {Promise<CartPlatformModel.CartCheckoutDetails>} - Success response
3478
4215
  * @name platformCheckoutCartV2
3479
4216
  * @summary: Checkout cart
3480
- * @description: The checkout cart initiates the order creation process based on the items in the user's cart, their selected address, and chosen payment methods. It also supports multiple payment method options and revalidates the cart details to ensure a secure and seamless order placement. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/platformCheckoutCartV2/).
4217
+ * @description: The checkout cart initiates the order creation process based on the items in the users cart, their selected address, and chosen payment methods. It also supports multiple payment method options and revalidates the cart details to ensure a secure and seamless order placement. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/platformCheckoutCartV2/).
3481
4218
  */
3482
4219
  async platformCheckoutCartV2(
3483
- { body, id, requestHeaders } = { requestHeaders: {} },
4220
+ {
4221
+ body,
4222
+ xOrderingSource,
4223
+ xOrderingSourceType,
4224
+ xAnonymousCart,
4225
+ xLocationDetail,
4226
+ xCurrencyCode,
4227
+ id,
4228
+ requestHeaders,
4229
+ } = { requestHeaders: {} },
3484
4230
  { responseHeaders } = { responseHeaders: false }
3485
4231
  ) {
3486
4232
  const {
@@ -3488,6 +4234,11 @@ class Cart {
3488
4234
  } = CartPlatformApplicationValidator.platformCheckoutCartV2().validate(
3489
4235
  {
3490
4236
  body,
4237
+ xOrderingSource,
4238
+ xOrderingSourceType,
4239
+ xAnonymousCart,
4240
+ xLocationDetail,
4241
+ xCurrencyCode,
3491
4242
  id,
3492
4243
  },
3493
4244
  { abortEarly: false, allowUnknown: true }
@@ -3502,6 +4253,11 @@ class Cart {
3502
4253
  } = CartPlatformApplicationValidator.platformCheckoutCartV2().validate(
3503
4254
  {
3504
4255
  body,
4256
+ xOrderingSource,
4257
+ xOrderingSourceType,
4258
+ xAnonymousCart,
4259
+ xLocationDetail,
4260
+ xCurrencyCode,
3505
4261
  id,
3506
4262
  },
3507
4263
  { abortEarly: false, allowUnknown: false }
@@ -3533,7 +4289,7 @@ class Cart {
3533
4289
 
3534
4290
  const {
3535
4291
  error: res_error,
3536
- } = CartPlatformModel.CartCheckoutResponse().validate(responseData, {
4292
+ } = CartPlatformModel.CartCheckoutDetails().validate(responseData, {
3537
4293
  abortEarly: false,
3538
4294
  allowUnknown: true,
3539
4295
  });
@@ -3556,15 +4312,25 @@ class Cart {
3556
4312
  * @param {CartPlatformApplicationValidator.PlatformUpdateCartParam} arg - Arg object
3557
4313
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3558
4314
  * @param {import("../PlatformAPIClient").Options} - Options
3559
- * @returns {Promise<CartPlatformModel.UpdateCartDetailResponse>} - Success response
4315
+ * @returns {Promise<CartPlatformModel.UpdateCartDetailResult>} - Success response
3560
4316
  * @name platformUpdateCart
3561
4317
  * @summary: Update cart items
3562
- * @description: Customers can modify added product attributes such as quantity and size, as well as remove items from the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/platformUpdateCart/).
4318
+ * @description: Customers can modify added product attributes such as quantity and size, as well as remove items from the cart. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/platformUpdateCart/).
3563
4319
  */
3564
4320
  async platformUpdateCart(
3565
- { body, id, i, orderType, b, buyNow, requestHeaders } = {
3566
- requestHeaders: {},
3567
- },
4321
+ {
4322
+ body,
4323
+ xOrderingSource,
4324
+ xOrderingSourceType,
4325
+ xAnonymousCart,
4326
+ id,
4327
+ i,
4328
+ orderType,
4329
+ b,
4330
+ includeCartCalculation,
4331
+ buyNow,
4332
+ requestHeaders,
4333
+ } = { requestHeaders: {} },
3568
4334
  { responseHeaders } = { responseHeaders: false }
3569
4335
  ) {
3570
4336
  const {
@@ -3572,10 +4338,14 @@ class Cart {
3572
4338
  } = CartPlatformApplicationValidator.platformUpdateCart().validate(
3573
4339
  {
3574
4340
  body,
4341
+ xOrderingSource,
4342
+ xOrderingSourceType,
4343
+ xAnonymousCart,
3575
4344
  id,
3576
4345
  i,
3577
4346
  orderType,
3578
4347
  b,
4348
+ includeCartCalculation,
3579
4349
  buyNow,
3580
4350
  },
3581
4351
  { abortEarly: false, allowUnknown: true }
@@ -3590,10 +4360,14 @@ class Cart {
3590
4360
  } = CartPlatformApplicationValidator.platformUpdateCart().validate(
3591
4361
  {
3592
4362
  body,
4363
+ xOrderingSource,
4364
+ xOrderingSourceType,
4365
+ xAnonymousCart,
3593
4366
  id,
3594
4367
  i,
3595
4368
  orderType,
3596
4369
  b,
4370
+ includeCartCalculation,
3597
4371
  buyNow,
3598
4372
  },
3599
4373
  { abortEarly: false, allowUnknown: false }
@@ -3610,94 +4384,15 @@ class Cart {
3610
4384
  query_params["i"] = i;
3611
4385
  query_params["order_type"] = orderType;
3612
4386
  query_params["b"] = b;
4387
+ query_params["include_cart_calculation"] = includeCartCalculation;
3613
4388
  query_params["buy_now"] = buyNow;
3614
4389
 
3615
4390
  const response = await PlatformAPIClient.execute(
3616
- this.config,
3617
- "put",
3618
- `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/detail`,
3619
- query_params,
3620
- body,
3621
- requestHeaders,
3622
- { responseHeaders }
3623
- );
3624
-
3625
- let responseData = response;
3626
- if (responseHeaders) {
3627
- responseData = response[0];
3628
- }
3629
-
3630
- const {
3631
- error: res_error,
3632
- } = CartPlatformModel.UpdateCartDetailResponse().validate(responseData, {
3633
- abortEarly: false,
3634
- allowUnknown: true,
3635
- });
3636
-
3637
- if (res_error) {
3638
- if (this.config.options.strictResponseCheck === true) {
3639
- return Promise.reject(new FDKResponseValidationError(res_error));
3640
- } else {
3641
- Logger({
3642
- level: "WARN",
3643
- message: `Response Validation Warnings for platform > Cart > platformUpdateCart \n ${res_error}`,
3644
- });
3645
- }
3646
- }
3647
-
3648
- return response;
3649
- }
3650
-
3651
- /**
3652
- * @param {CartPlatformApplicationValidator.RemoveAddressParam} arg - Arg object
3653
- * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3654
- * @param {import("../PlatformAPIClient").Options} - Options
3655
- * @returns {Promise<CartPlatformModel.DeleteAddressResponse>} - Success response
3656
- * @name removeAddress
3657
- * @summary: Removes an address from a customer's address list
3658
- * @description: Remove an existing customer address from the system. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/removeAddress/).
3659
- */
3660
- async removeAddress(
3661
- { id, userId, requestHeaders } = { requestHeaders: {} },
3662
- { responseHeaders } = { responseHeaders: false }
3663
- ) {
3664
- const { error } = CartPlatformApplicationValidator.removeAddress().validate(
3665
- {
3666
- id,
3667
- userId,
3668
- },
3669
- { abortEarly: false, allowUnknown: true }
3670
- );
3671
- if (error) {
3672
- return Promise.reject(new FDKClientValidationError(error));
3673
- }
3674
-
3675
- // Showing warrnings if extra unknown parameters are found
3676
- const {
3677
- error: warrning,
3678
- } = CartPlatformApplicationValidator.removeAddress().validate(
3679
- {
3680
- id,
3681
- userId,
3682
- },
3683
- { abortEarly: false, allowUnknown: false }
3684
- );
3685
- if (warrning) {
3686
- Logger({
3687
- level: "WARN",
3688
- message: `Parameter Validation warrnings for platform > Cart > removeAddress \n ${warrning}`,
3689
- });
3690
- }
3691
-
3692
- const query_params = {};
3693
- query_params["user_id"] = userId;
3694
-
3695
- const response = await PlatformAPIClient.execute(
3696
- this.config,
3697
- "delete",
3698
- `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/address/${id}`,
4391
+ this.config,
4392
+ "put",
4393
+ `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/detail`,
3699
4394
  query_params,
3700
- undefined,
4395
+ body,
3701
4396
  requestHeaders,
3702
4397
  { responseHeaders }
3703
4398
  );
@@ -3709,7 +4404,7 @@ class Cart {
3709
4404
 
3710
4405
  const {
3711
4406
  error: res_error,
3712
- } = CartPlatformModel.DeleteAddressResponse().validate(responseData, {
4407
+ } = CartPlatformModel.UpdateCartDetailResult().validate(responseData, {
3713
4408
  abortEarly: false,
3714
4409
  allowUnknown: true,
3715
4410
  });
@@ -3720,7 +4415,7 @@ class Cart {
3720
4415
  } else {
3721
4416
  Logger({
3722
4417
  level: "WARN",
3723
- message: `Response Validation Warnings for platform > Cart > removeAddress \n ${res_error}`,
4418
+ message: `Response Validation Warnings for platform > Cart > platformUpdateCart \n ${res_error}`,
3724
4419
  });
3725
4420
  }
3726
4421
  }
@@ -3729,25 +4424,22 @@ class Cart {
3729
4424
  }
3730
4425
 
3731
4426
  /**
3732
- * @param {CartPlatformApplicationValidator.RemoveBulkPriceAdjustmentParam} arg
3733
- * - Arg object
3734
- *
4427
+ * @param {CartPlatformApplicationValidator.RemoveAddressParam} arg - Arg object
3735
4428
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3736
4429
  * @param {import("../PlatformAPIClient").Options} - Options
3737
- * @returns {Promise<CartPlatformModel.SuccessMessage>} - Success response
3738
- * @name removeBulkPriceAdjustment
3739
- * @summary: Remove price adjustments in bulk.
3740
- * @description: Remove the applied price adjustments for specific items within the cart based on unique price adjustment IDs. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/removeBulkPriceAdjustment/).
4430
+ * @returns {Promise<CartPlatformModel.DeleteAddressResult>} - Success response
4431
+ * @name removeAddress
4432
+ * @summary: Removes an address from a customer's address list
4433
+ * @description: Remove an existing customer address from the system. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/removeAddress/).
3741
4434
  */
3742
- async removeBulkPriceAdjustment(
3743
- { priceAdjustmentIds, requestHeaders } = { requestHeaders: {} },
4435
+ async removeAddress(
4436
+ { id, userId, requestHeaders } = { requestHeaders: {} },
3744
4437
  { responseHeaders } = { responseHeaders: false }
3745
4438
  ) {
3746
- const {
3747
- error,
3748
- } = CartPlatformApplicationValidator.removeBulkPriceAdjustment().validate(
4439
+ const { error } = CartPlatformApplicationValidator.removeAddress().validate(
3749
4440
  {
3750
- priceAdjustmentIds,
4441
+ id,
4442
+ userId,
3751
4443
  },
3752
4444
  { abortEarly: false, allowUnknown: true }
3753
4445
  );
@@ -3758,26 +4450,27 @@ class Cart {
3758
4450
  // Showing warrnings if extra unknown parameters are found
3759
4451
  const {
3760
4452
  error: warrning,
3761
- } = CartPlatformApplicationValidator.removeBulkPriceAdjustment().validate(
4453
+ } = CartPlatformApplicationValidator.removeAddress().validate(
3762
4454
  {
3763
- priceAdjustmentIds,
4455
+ id,
4456
+ userId,
3764
4457
  },
3765
4458
  { abortEarly: false, allowUnknown: false }
3766
4459
  );
3767
4460
  if (warrning) {
3768
4461
  Logger({
3769
4462
  level: "WARN",
3770
- message: `Parameter Validation warrnings for platform > Cart > removeBulkPriceAdjustment \n ${warrning}`,
4463
+ message: `Parameter Validation warrnings for platform > Cart > removeAddress \n ${warrning}`,
3771
4464
  });
3772
4465
  }
3773
4466
 
3774
4467
  const query_params = {};
3775
- query_params["price_adjustment_ids"] = priceAdjustmentIds;
4468
+ query_params["user_id"] = userId;
3776
4469
 
3777
4470
  const response = await PlatformAPIClient.execute(
3778
4471
  this.config,
3779
4472
  "delete",
3780
- `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/bulk-price-adjustment`,
4473
+ `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/address/${id}`,
3781
4474
  query_params,
3782
4475
  undefined,
3783
4476
  requestHeaders,
@@ -3791,7 +4484,7 @@ class Cart {
3791
4484
 
3792
4485
  const {
3793
4486
  error: res_error,
3794
- } = CartPlatformModel.SuccessMessage().validate(responseData, {
4487
+ } = CartPlatformModel.DeleteAddressResult().validate(responseData, {
3795
4488
  abortEarly: false,
3796
4489
  allowUnknown: true,
3797
4490
  });
@@ -3802,7 +4495,7 @@ class Cart {
3802
4495
  } else {
3803
4496
  Logger({
3804
4497
  level: "WARN",
3805
- message: `Response Validation Warnings for platform > Cart > removeBulkPriceAdjustment \n ${res_error}`,
4498
+ message: `Response Validation Warnings for platform > Cart > removeAddress \n ${res_error}`,
3806
4499
  });
3807
4500
  }
3808
4501
  }
@@ -3814,17 +4507,27 @@ class Cart {
3814
4507
  * @param {CartPlatformApplicationValidator.RemoveCouponParam} arg - Arg object
3815
4508
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3816
4509
  * @param {import("../PlatformAPIClient").Options} - Options
3817
- * @returns {Promise<CartPlatformModel.CartDetailResponse>} - Success response
4510
+ * @returns {Promise<CartPlatformModel.CartDetailResult>} - Success response
3818
4511
  * @name removeCoupon
3819
4512
  * @summary: Remove coupon
3820
- * @description: Remove an applied coupon from the customer's cart, thereby removing the associated discount from the cart total. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/removeCoupon/).
4513
+ * @description: Remove an applied coupon from the customer's cart, thereby removing the associated discount from the cart total. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/removeCoupon/).
3821
4514
  */
3822
4515
  async removeCoupon(
3823
- { uid, buyNow, requestHeaders } = { requestHeaders: {} },
4516
+ {
4517
+ xOrderingSource,
4518
+ xOrderingSourceType,
4519
+ xAnonymousCart,
4520
+ uid,
4521
+ buyNow,
4522
+ requestHeaders,
4523
+ } = { requestHeaders: {} },
3824
4524
  { responseHeaders } = { responseHeaders: false }
3825
4525
  ) {
3826
4526
  const { error } = CartPlatformApplicationValidator.removeCoupon().validate(
3827
4527
  {
4528
+ xOrderingSource,
4529
+ xOrderingSourceType,
4530
+ xAnonymousCart,
3828
4531
  uid,
3829
4532
  buyNow,
3830
4533
  },
@@ -3839,6 +4542,9 @@ class Cart {
3839
4542
  error: warrning,
3840
4543
  } = CartPlatformApplicationValidator.removeCoupon().validate(
3841
4544
  {
4545
+ xOrderingSource,
4546
+ xOrderingSourceType,
4547
+ xAnonymousCart,
3842
4548
  uid,
3843
4549
  buyNow,
3844
4550
  },
@@ -3872,7 +4578,7 @@ class Cart {
3872
4578
 
3873
4579
  const {
3874
4580
  error: res_error,
3875
- } = CartPlatformModel.CartDetailResponse().validate(responseData, {
4581
+ } = CartPlatformModel.CartDetailResult().validate(responseData, {
3876
4582
  abortEarly: false,
3877
4583
  allowUnknown: true,
3878
4584
  });
@@ -3900,7 +4606,7 @@ class Cart {
3900
4606
  * @returns {Promise<CartPlatformModel.SuccessMessage>} - Success response
3901
4607
  * @name removePriceAdjustment
3902
4608
  * @summary: Remove price adjustments
3903
- * @description: Remove the applied price adjustments for specific items within the cart based on unique price adjustment ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/removePriceAdjustment/).
4609
+ * @description: Remove the applied price adjustments for specific items within the cart based on unique price adjustment ID. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/removePriceAdjustment/).
3904
4610
  */
3905
4611
  async removePriceAdjustment(
3906
4612
  { id, requestHeaders } = { requestHeaders: {} },
@@ -3976,18 +4682,31 @@ class Cart {
3976
4682
  * @param {CartPlatformApplicationValidator.SelectAddressParam} arg - Arg object
3977
4683
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3978
4684
  * @param {import("../PlatformAPIClient").Options} - Options
3979
- * @returns {Promise<CartPlatformModel.CartDetailResponse>} - Success response
4685
+ * @returns {Promise<CartPlatformModel.CartDetailResult>} - Success response
3980
4686
  * @name selectAddress
3981
4687
  * @summary: Select customer address for order processing
3982
- * @description: Select an address from the saved customer addresses and validates the availability of items in the cart. Additionally, it verifies and updates the delivery promise based on the selected address. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/selectAddress/).
4688
+ * @description: Select an address from the saved customer addresses and validates the availability of items in the cart. Additionally, it verifies and updates the delivery promise based on the selected address. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/selectAddress/).
3983
4689
  */
3984
4690
  async selectAddress(
3985
- { body, cartId, buyNow, i, b, requestHeaders } = { requestHeaders: {} },
4691
+ {
4692
+ body,
4693
+ xOrderingSource,
4694
+ xOrderingSourceType,
4695
+ xAnonymousCart,
4696
+ cartId,
4697
+ buyNow,
4698
+ i,
4699
+ b,
4700
+ requestHeaders,
4701
+ } = { requestHeaders: {} },
3986
4702
  { responseHeaders } = { responseHeaders: false }
3987
4703
  ) {
3988
4704
  const { error } = CartPlatformApplicationValidator.selectAddress().validate(
3989
4705
  {
3990
4706
  body,
4707
+ xOrderingSource,
4708
+ xOrderingSourceType,
4709
+ xAnonymousCart,
3991
4710
  cartId,
3992
4711
  buyNow,
3993
4712
  i,
@@ -4005,6 +4724,9 @@ class Cart {
4005
4724
  } = CartPlatformApplicationValidator.selectAddress().validate(
4006
4725
  {
4007
4726
  body,
4727
+ xOrderingSource,
4728
+ xOrderingSourceType,
4729
+ xAnonymousCart,
4008
4730
  cartId,
4009
4731
  buyNow,
4010
4732
  i,
@@ -4042,7 +4764,7 @@ class Cart {
4042
4764
 
4043
4765
  const {
4044
4766
  error: res_error,
4045
- } = CartPlatformModel.CartDetailResponse().validate(responseData, {
4767
+ } = CartPlatformModel.CartDetailResult().validate(responseData, {
4046
4768
  abortEarly: false,
4047
4769
  allowUnknown: true,
4048
4770
  });
@@ -4065,13 +4787,22 @@ class Cart {
4065
4787
  * @param {CartPlatformApplicationValidator.SelectPaymentModeParam} arg - Arg object
4066
4788
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4067
4789
  * @param {import("../PlatformAPIClient").Options} - Options
4068
- * @returns {Promise<CartPlatformModel.CartDetailResponse>} - Success response
4790
+ * @returns {Promise<CartPlatformModel.CartDetailResult>} - Success response
4069
4791
  * @name selectPaymentMode
4070
4792
  * @summary: Select payment mode
4071
- * @description: Customers can select a preferred payment mode from available options during the cart checkout process to securely and efficiently complete their transaction. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/selectPaymentMode/).
4793
+ * @description: Customers can select a preferred payment mode from available options during the cart checkout process to securely and efficiently complete their transaction. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/selectPaymentMode/).
4072
4794
  */
4073
4795
  async selectPaymentMode(
4074
- { body, id, buyNow, orderType, requestHeaders } = { requestHeaders: {} },
4796
+ {
4797
+ body,
4798
+ xOrderingSource,
4799
+ xOrderingSourceType,
4800
+ xAnonymousCart,
4801
+ id,
4802
+ buyNow,
4803
+ orderType,
4804
+ requestHeaders,
4805
+ } = { requestHeaders: {} },
4075
4806
  { responseHeaders } = { responseHeaders: false }
4076
4807
  ) {
4077
4808
  const {
@@ -4079,6 +4810,9 @@ class Cart {
4079
4810
  } = CartPlatformApplicationValidator.selectPaymentMode().validate(
4080
4811
  {
4081
4812
  body,
4813
+ xOrderingSource,
4814
+ xOrderingSourceType,
4815
+ xAnonymousCart,
4082
4816
  id,
4083
4817
  buyNow,
4084
4818
  orderType,
@@ -4095,6 +4829,9 @@ class Cart {
4095
4829
  } = CartPlatformApplicationValidator.selectPaymentMode().validate(
4096
4830
  {
4097
4831
  body,
4832
+ xOrderingSource,
4833
+ xOrderingSourceType,
4834
+ xAnonymousCart,
4098
4835
  id,
4099
4836
  buyNow,
4100
4837
  orderType,
@@ -4130,7 +4867,7 @@ class Cart {
4130
4867
 
4131
4868
  const {
4132
4869
  error: res_error,
4133
- } = CartPlatformModel.CartDetailResponse().validate(responseData, {
4870
+ } = CartPlatformModel.CartDetailResult().validate(responseData, {
4134
4871
  abortEarly: false,
4135
4872
  allowUnknown: true,
4136
4873
  });
@@ -4153,13 +4890,21 @@ class Cart {
4153
4890
  * @param {CartPlatformApplicationValidator.SelectPaymentModeV2Param} arg - Arg object
4154
4891
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4155
4892
  * @param {import("../PlatformAPIClient").Options} - Options
4156
- * @returns {Promise<CartPlatformModel.CartDetailResponse>} - Success response
4893
+ * @returns {Promise<CartPlatformModel.CartDetailResult>} - Success response
4157
4894
  * @name selectPaymentModeV2
4158
4895
  * @summary: Select payment mode (latest)
4159
- * @description: Selection of payment mode that supports multiple MOP(mode of payment). - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/selectPaymentModeV2/).
4896
+ * @description: Selection of payment mode that supports multiple MOP(mode of payment). - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/selectPaymentModeV2/).
4160
4897
  */
4161
4898
  async selectPaymentModeV2(
4162
- { body, id, buyNow, orderType, requestHeaders } = { requestHeaders: {} },
4899
+ {
4900
+ body,
4901
+ xOrderingSource,
4902
+ xOrderingSourceType,
4903
+ id,
4904
+ buyNow,
4905
+ orderType,
4906
+ requestHeaders,
4907
+ } = { requestHeaders: {} },
4163
4908
  { responseHeaders } = { responseHeaders: false }
4164
4909
  ) {
4165
4910
  const {
@@ -4167,6 +4912,8 @@ class Cart {
4167
4912
  } = CartPlatformApplicationValidator.selectPaymentModeV2().validate(
4168
4913
  {
4169
4914
  body,
4915
+ xOrderingSource,
4916
+ xOrderingSourceType,
4170
4917
  id,
4171
4918
  buyNow,
4172
4919
  orderType,
@@ -4183,6 +4930,8 @@ class Cart {
4183
4930
  } = CartPlatformApplicationValidator.selectPaymentModeV2().validate(
4184
4931
  {
4185
4932
  body,
4933
+ xOrderingSource,
4934
+ xOrderingSourceType,
4186
4935
  id,
4187
4936
  buyNow,
4188
4937
  orderType,
@@ -4218,7 +4967,7 @@ class Cart {
4218
4967
 
4219
4968
  const {
4220
4969
  error: res_error,
4221
- } = CartPlatformModel.CartDetailResponse().validate(responseData, {
4970
+ } = CartPlatformModel.CartDetailResult().validate(responseData, {
4222
4971
  abortEarly: false,
4223
4972
  allowUnknown: true,
4224
4973
  });
@@ -4241,10 +4990,10 @@ class Cart {
4241
4990
  * @param {CartPlatformApplicationValidator.UpdateAddressParam} arg - Arg object
4242
4991
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4243
4992
  * @param {import("../PlatformAPIClient").Options} - Options
4244
- * @returns {Promise<CartPlatformModel.UpdateAddressResponse>} - Success response
4993
+ * @returns {Promise<CartPlatformModel.UpdateAddressDetails>} - Success response
4245
4994
  * @name updateAddress
4246
4995
  * @summary: Updates an existing customer address
4247
- * @description: Update the user address - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateAddress/).
4996
+ * @description: Update the user address - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/updateAddress/).
4248
4997
  */
4249
4998
  async updateAddress(
4250
4999
  { id, body, requestHeaders } = { requestHeaders: {} },
@@ -4297,7 +5046,7 @@ class Cart {
4297
5046
 
4298
5047
  const {
4299
5048
  error: res_error,
4300
- } = CartPlatformModel.UpdateAddressResponse().validate(responseData, {
5049
+ } = CartPlatformModel.UpdateAddressDetails().validate(responseData, {
4301
5050
  abortEarly: false,
4302
5051
  allowUnknown: true,
4303
5052
  });
@@ -4317,26 +5066,23 @@ class Cart {
4317
5066
  }
4318
5067
 
4319
5068
  /**
4320
- * @param {CartPlatformApplicationValidator.UpdateBulkPriceAdjustmentParam} arg
4321
- * - Arg object
4322
- *
5069
+ * @param {CartPlatformApplicationValidator.UpdateCartParam} arg - Arg object
4323
5070
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4324
5071
  * @param {import("../PlatformAPIClient").Options} - Options
4325
- * @returns {Promise<CartPlatformModel.BulkPriceAdjustmentResponse>} -
4326
- * Success response
4327
- * @name updateBulkPriceAdjustment
4328
- * @summary: Update price adjustments
4329
- * @description: Modify price adjustments for specific items in the cart. By providing the seller ID, sales channel ID, and price adjustment ID, seller can apply discounts or other adjustments to the prices of cart items, facilitating dynamic pricing strategies. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateBulkPriceAdjustment/).
5072
+ * @returns {Promise<CartPlatformModel.UpdateCartDetailResult>} - Success response
5073
+ * @name updateCart
5074
+ * @summary: Update cart items
5075
+ * @description: Customers can modify added product attributes such as quantity and size, as well as remove items from the cart. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/updateCart/).
4330
5076
  */
4331
- async updateBulkPriceAdjustment(
4332
- { body, requestHeaders } = { requestHeaders: {} },
5077
+ async updateCart(
5078
+ { cartId, body, b, requestHeaders } = { requestHeaders: {} },
4333
5079
  { responseHeaders } = { responseHeaders: false }
4334
5080
  ) {
4335
- const {
4336
- error,
4337
- } = CartPlatformApplicationValidator.updateBulkPriceAdjustment().validate(
5081
+ const { error } = CartPlatformApplicationValidator.updateCart().validate(
4338
5082
  {
5083
+ cartId,
4339
5084
  body,
5085
+ b,
4340
5086
  },
4341
5087
  { abortEarly: false, allowUnknown: true }
4342
5088
  );
@@ -4347,25 +5093,28 @@ class Cart {
4347
5093
  // Showing warrnings if extra unknown parameters are found
4348
5094
  const {
4349
5095
  error: warrning,
4350
- } = CartPlatformApplicationValidator.updateBulkPriceAdjustment().validate(
5096
+ } = CartPlatformApplicationValidator.updateCart().validate(
4351
5097
  {
5098
+ cartId,
4352
5099
  body,
5100
+ b,
4353
5101
  },
4354
5102
  { abortEarly: false, allowUnknown: false }
4355
5103
  );
4356
5104
  if (warrning) {
4357
5105
  Logger({
4358
5106
  level: "WARN",
4359
- message: `Parameter Validation warrnings for platform > Cart > updateBulkPriceAdjustment \n ${warrning}`,
5107
+ message: `Parameter Validation warrnings for platform > Cart > updateCart \n ${warrning}`,
4360
5108
  });
4361
5109
  }
4362
5110
 
4363
5111
  const query_params = {};
5112
+ query_params["b"] = b;
4364
5113
 
4365
5114
  const response = await PlatformAPIClient.execute(
4366
5115
  this.config,
4367
5116
  "put",
4368
- `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/bulk-price-adjustment`,
5117
+ `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/abandoned/carts/${cartId}`,
4369
5118
  query_params,
4370
5119
  body,
4371
5120
  requestHeaders,
@@ -4379,7 +5128,7 @@ class Cart {
4379
5128
 
4380
5129
  const {
4381
5130
  error: res_error,
4382
- } = CartPlatformModel.BulkPriceAdjustmentResponse().validate(responseData, {
5131
+ } = CartPlatformModel.UpdateCartDetailResult().validate(responseData, {
4383
5132
  abortEarly: false,
4384
5133
  allowUnknown: true,
4385
5134
  });
@@ -4390,7 +5139,7 @@ class Cart {
4390
5139
  } else {
4391
5140
  Logger({
4392
5141
  level: "WARN",
4393
- message: `Response Validation Warnings for platform > Cart > updateBulkPriceAdjustment \n ${res_error}`,
5142
+ message: `Response Validation Warnings for platform > Cart > updateCart \n ${res_error}`,
4394
5143
  });
4395
5144
  }
4396
5145
  }
@@ -4399,23 +5148,42 @@ class Cart {
4399
5148
  }
4400
5149
 
4401
5150
  /**
4402
- * @param {CartPlatformApplicationValidator.UpdateCartParam} arg - Arg object
5151
+ * @param {CartPlatformApplicationValidator.UpdateCartBreakupParam} arg - Arg object
4403
5152
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4404
5153
  * @param {import("../PlatformAPIClient").Options} - Options
4405
- * @returns {Promise<CartPlatformModel.UpdateCartDetailResponse>} - Success response
4406
- * @name updateCart
4407
- * @summary: Update cart items
4408
- * @description: Customers can modify added product attributes such as quantity and size, as well as remove items from the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCart/).
5154
+ * @returns {Promise<CartPlatformModel.CartDetailResult>} - Success response
5155
+ * @name updateCartBreakup
5156
+ * @summary: Update cart breakup values
5157
+ * @description: Updates the cart breakup based on the enabled features and user preferences. This endpoint allows customers to modify how their cart totals are calculated — including options such as applying store credits, loyalty points, discounts, and other promotional benefits. The API recalculates and returns the updated breakup reflecting the selected configurations in real-time. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/updateCartBreakup/).
4409
5158
  */
4410
- async updateCart(
4411
- { cartId, body, b, requestHeaders } = { requestHeaders: {} },
5159
+ async updateCartBreakup(
5160
+ {
5161
+ body,
5162
+ xOrderingSource,
5163
+ xOrderingSourceType,
5164
+ xAnonymousCart,
5165
+ id,
5166
+ i,
5167
+ b,
5168
+ includeCartCalculation,
5169
+ buyNow,
5170
+ requestHeaders,
5171
+ } = { requestHeaders: {} },
4412
5172
  { responseHeaders } = { responseHeaders: false }
4413
5173
  ) {
4414
- const { error } = CartPlatformApplicationValidator.updateCart().validate(
5174
+ const {
5175
+ error,
5176
+ } = CartPlatformApplicationValidator.updateCartBreakup().validate(
4415
5177
  {
4416
- cartId,
4417
5178
  body,
5179
+ xOrderingSource,
5180
+ xOrderingSourceType,
5181
+ xAnonymousCart,
5182
+ id,
5183
+ i,
4418
5184
  b,
5185
+ includeCartCalculation,
5186
+ buyNow,
4419
5187
  },
4420
5188
  { abortEarly: false, allowUnknown: true }
4421
5189
  );
@@ -4426,28 +5194,38 @@ class Cart {
4426
5194
  // Showing warrnings if extra unknown parameters are found
4427
5195
  const {
4428
5196
  error: warrning,
4429
- } = CartPlatformApplicationValidator.updateCart().validate(
5197
+ } = CartPlatformApplicationValidator.updateCartBreakup().validate(
4430
5198
  {
4431
- cartId,
4432
5199
  body,
5200
+ xOrderingSource,
5201
+ xOrderingSourceType,
5202
+ xAnonymousCart,
5203
+ id,
5204
+ i,
4433
5205
  b,
5206
+ includeCartCalculation,
5207
+ buyNow,
4434
5208
  },
4435
5209
  { abortEarly: false, allowUnknown: false }
4436
5210
  );
4437
5211
  if (warrning) {
4438
5212
  Logger({
4439
5213
  level: "WARN",
4440
- message: `Parameter Validation warrnings for platform > Cart > updateCart \n ${warrning}`,
5214
+ message: `Parameter Validation warrnings for platform > Cart > updateCartBreakup \n ${warrning}`,
4441
5215
  });
4442
5216
  }
4443
5217
 
4444
5218
  const query_params = {};
5219
+ query_params["id"] = id;
5220
+ query_params["i"] = i;
4445
5221
  query_params["b"] = b;
5222
+ query_params["include_cart_calculation"] = includeCartCalculation;
5223
+ query_params["buy_now"] = buyNow;
4446
5224
 
4447
5225
  const response = await PlatformAPIClient.execute(
4448
5226
  this.config,
4449
- "put",
4450
- `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/abandoned/carts/${cartId}`,
5227
+ "patch",
5228
+ `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/detail`,
4451
5229
  query_params,
4452
5230
  body,
4453
5231
  requestHeaders,
@@ -4461,7 +5239,7 @@ class Cart {
4461
5239
 
4462
5240
  const {
4463
5241
  error: res_error,
4464
- } = CartPlatformModel.UpdateCartDetailResponse().validate(responseData, {
5242
+ } = CartPlatformModel.CartDetailResult().validate(responseData, {
4465
5243
  abortEarly: false,
4466
5244
  allowUnknown: true,
4467
5245
  });
@@ -4472,7 +5250,7 @@ class Cart {
4472
5250
  } else {
4473
5251
  Logger({
4474
5252
  level: "WARN",
4475
- message: `Response Validation Warnings for platform > Cart > updateCart \n ${res_error}`,
5253
+ message: `Response Validation Warnings for platform > Cart > updateCartBreakup \n ${res_error}`,
4476
5254
  });
4477
5255
  }
4478
5256
  }
@@ -4484,10 +5262,10 @@ class Cart {
4484
5262
  * @param {CartPlatformApplicationValidator.UpdateCartMetaParam} arg - Arg object
4485
5263
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4486
5264
  * @param {import("../PlatformAPIClient").Options} - Options
4487
- * @returns {Promise<CartPlatformModel.CartMetaResponse>} - Success response
5265
+ * @returns {Promise<CartPlatformModel.CartMetaDetails>} - Success response
4488
5266
  * @name updateCartMeta
4489
5267
  * @summary: Update cart metadata
4490
- * @description: Add or modify metadata associated with a cart, which includes customer preferences, delivery instructions, or any special requirements related to the cart items. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCartMeta/).
5268
+ * @description: Add or modify metadata associated with a cart, which includes customer preferences, delivery instructions, or any special requirements related to the cart items. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/updateCartMeta/).
4491
5269
  */
4492
5270
  async updateCartMeta(
4493
5271
  { body, id, buyNow, requestHeaders } = { requestHeaders: {} },
@@ -4546,7 +5324,7 @@ class Cart {
4546
5324
 
4547
5325
  const {
4548
5326
  error: res_error,
4549
- } = CartPlatformModel.CartMetaResponse().validate(responseData, {
5327
+ } = CartPlatformModel.CartMetaDetails().validate(responseData, {
4550
5328
  abortEarly: false,
4551
5329
  allowUnknown: true,
4552
5330
  });
@@ -4574,7 +5352,7 @@ class Cart {
4574
5352
  * @returns {Promise<CartPlatformModel.CartMetaConfigUpdate>} - Success response
4575
5353
  * @name updateCartMetaConfig
4576
5354
  * @summary: Update cart meta
4577
- * @description: Modify the configuration settings for cart metadata associated with a specific sales channel. Cart meta includes configuration settings such as allowed maximum cart value, allowed minimum cart value, maximum allowed cart items, delivery charges, etc. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCartMetaConfig/).
5355
+ * @description: Modify the configuration settings for cart metadata associated with a specific sales channel. Cart meta includes configuration settings such as allowed maximum cart value, allowed minimum cart value, maximum allowed cart items, delivery charges, etc. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/updateCartMetaConfig/).
4578
5356
  */
4579
5357
  async updateCartMetaConfig(
4580
5358
  { cartMetaId, body, requestHeaders } = { requestHeaders: {} },
@@ -4652,10 +5430,10 @@ class Cart {
4652
5430
  * @param {CartPlatformApplicationValidator.UpdateCartUserParam} arg - Arg object
4653
5431
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4654
5432
  * @param {import("../PlatformAPIClient").Options} - Options
4655
- * @returns {Promise<CartPlatformModel.UserCartMappingResponse>} - Success response
5433
+ * @returns {Promise<CartPlatformModel.UserCartMappingResult>} - Success response
4656
5434
  * @name updateCartUser
4657
5435
  * @summary: Update user of a cart
4658
- * @description: Modify the cart user to a new valid customer for the provided customer ID. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCartUser/).
5436
+ * @description: Modify the cart user to a new valid customer for the provided customer ID. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/updateCartUser/).
4659
5437
  */
4660
5438
  async updateCartUser(
4661
5439
  { body, id, requestHeaders } = { requestHeaders: {} },
@@ -4711,7 +5489,7 @@ class Cart {
4711
5489
 
4712
5490
  const {
4713
5491
  error: res_error,
4714
- } = CartPlatformModel.UserCartMappingResponse().validate(responseData, {
5492
+ } = CartPlatformModel.UserCartMappingResult().validate(responseData, {
4715
5493
  abortEarly: false,
4716
5494
  allowUnknown: true,
4717
5495
  });
@@ -4736,10 +5514,10 @@ class Cart {
4736
5514
  *
4737
5515
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4738
5516
  * @param {import("../PlatformAPIClient").Options} - Options
4739
- * @returns {Promise<CartPlatformModel.SharedCartResponse>} - Success response
5517
+ * @returns {Promise<CartPlatformModel.SharedCartResult>} - Success response
4740
5518
  * @name updateCartWithSharedItems
4741
5519
  * @summary: Update shared cart items
4742
- * @description: Customer can either merge or replace shared cart items with existing cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCartWithSharedItems/).
5520
+ * @description: Customer can either merge or replace shared cart items with existing cart. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/updateCartWithSharedItems/).
4743
5521
  */
4744
5522
  async updateCartWithSharedItems(
4745
5523
  { token, action, cartId, requestHeaders } = { requestHeaders: {} },
@@ -4797,7 +5575,7 @@ class Cart {
4797
5575
 
4798
5576
  const {
4799
5577
  error: res_error,
4800
- } = CartPlatformModel.SharedCartResponse().validate(responseData, {
5578
+ } = CartPlatformModel.SharedCartResult().validate(responseData, {
4801
5579
  abortEarly: false,
4802
5580
  allowUnknown: true,
4803
5581
  });
@@ -4820,10 +5598,10 @@ class Cart {
4820
5598
  * @param {CartPlatformApplicationValidator.UpdateCouponParam} arg - Arg object
4821
5599
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4822
5600
  * @param {import("../PlatformAPIClient").Options} - Options
4823
- * @returns {Promise<CartPlatformModel.SuccessMessage>} - Success response
5601
+ * @returns {Promise<CartPlatformModel.CouponCreateResult>} - Success response
4824
5602
  * @name updateCoupon
4825
5603
  * @summary: Update a coupon
4826
- * @description: Update the details of an existing coupon by specifying its unique identifier. This includes modifying coupon attributes such as discount percentage, validity period, and associated conditions. Leveraging this functionality allows businesses to quickly adapt their promotional strategies to changing market dynamics. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCoupon/).
5604
+ * @description: Update the details of an existing coupon by specifying its unique identifier. This includes modifying coupon attributes such as discount percentage, validity period, and associated conditions. Leveraging this functionality allows businesses to quickly adapt their promotional strategies to changing market dynamics. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/updateCoupon/).
4827
5605
  */
4828
5606
  async updateCoupon(
4829
5607
  { id, body, requestHeaders } = { requestHeaders: {} },
@@ -4876,7 +5654,7 @@ class Cart {
4876
5654
 
4877
5655
  const {
4878
5656
  error: res_error,
4879
- } = CartPlatformModel.SuccessMessage().validate(responseData, {
5657
+ } = CartPlatformModel.CouponCreateResult().validate(responseData, {
4880
5658
  abortEarly: false,
4881
5659
  allowUnknown: true,
4882
5660
  });
@@ -4904,7 +5682,7 @@ class Cart {
4904
5682
  * @returns {Promise<CartPlatformModel.SuccessMessage>} - Success response
4905
5683
  * @name updateCouponPartially
4906
5684
  * @summary: Update a coupon partially
4907
- * @description: Seller can make partial adjustments of an existing coupon by specifying its unique identifier. It enables businesses to modify specific attributes of the coupon while preserving other details intact. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCouponPartially/).
5685
+ * @description: Seller can make partial adjustments of an existing coupon by specifying its unique identifier. It enables businesses to modify specific attributes of the coupon while preserving other details intact. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/updateCouponPartially/).
4908
5686
  */
4909
5687
  async updateCouponPartially(
4910
5688
  { id, body, requestHeaders } = { requestHeaders: {} },
@@ -4978,16 +5756,178 @@ class Cart {
4978
5756
  return response;
4979
5757
  }
4980
5758
 
5759
+ /**
5760
+ * @param {CartPlatformApplicationValidator.UpdateOfferParam} arg - Arg object
5761
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
5762
+ * @param {import("../PlatformAPIClient").Options} - Options
5763
+ * @returns {Promise<CartPlatformModel.OfferSchema>} - Success response
5764
+ * @name updateOffer
5765
+ * @summary: Update existing offer
5766
+ * @description: Update the details of an existing offer by specifying its unique identifier. This includes modifying offer attributes such as discount percentage, validity period, and associated conditions. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/updateOffer/).
5767
+ */
5768
+ async updateOffer(
5769
+ { id, body, requestHeaders } = { requestHeaders: {} },
5770
+ { responseHeaders } = { responseHeaders: false }
5771
+ ) {
5772
+ const { error } = CartPlatformApplicationValidator.updateOffer().validate(
5773
+ {
5774
+ id,
5775
+ body,
5776
+ },
5777
+ { abortEarly: false, allowUnknown: true }
5778
+ );
5779
+ if (error) {
5780
+ return Promise.reject(new FDKClientValidationError(error));
5781
+ }
5782
+
5783
+ // Showing warrnings if extra unknown parameters are found
5784
+ const {
5785
+ error: warrning,
5786
+ } = CartPlatformApplicationValidator.updateOffer().validate(
5787
+ {
5788
+ id,
5789
+ body,
5790
+ },
5791
+ { abortEarly: false, allowUnknown: false }
5792
+ );
5793
+ if (warrning) {
5794
+ Logger({
5795
+ level: "WARN",
5796
+ message: `Parameter Validation warrnings for platform > Cart > updateOffer \n ${warrning}`,
5797
+ });
5798
+ }
5799
+
5800
+ const query_params = {};
5801
+
5802
+ const response = await PlatformAPIClient.execute(
5803
+ this.config,
5804
+ "put",
5805
+ `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/offers/${id}`,
5806
+ query_params,
5807
+ body,
5808
+ requestHeaders,
5809
+ { responseHeaders }
5810
+ );
5811
+
5812
+ let responseData = response;
5813
+ if (responseHeaders) {
5814
+ responseData = response[0];
5815
+ }
5816
+
5817
+ const {
5818
+ error: res_error,
5819
+ } = CartPlatformModel.OfferSchema().validate(responseData, {
5820
+ abortEarly: false,
5821
+ allowUnknown: true,
5822
+ });
5823
+
5824
+ if (res_error) {
5825
+ if (this.config.options.strictResponseCheck === true) {
5826
+ return Promise.reject(new FDKResponseValidationError(res_error));
5827
+ } else {
5828
+ Logger({
5829
+ level: "WARN",
5830
+ message: `Response Validation Warnings for platform > Cart > updateOffer \n ${res_error}`,
5831
+ });
5832
+ }
5833
+ }
5834
+
5835
+ return response;
5836
+ }
5837
+
5838
+ /**
5839
+ * @param {CartPlatformApplicationValidator.UpdateOfferPartiallyParam} arg
5840
+ * - Arg object
5841
+ *
5842
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
5843
+ * @param {import("../PlatformAPIClient").Options} - Options
5844
+ * @returns {Promise<CartPlatformModel.SuccessMessage>} - Success response
5845
+ * @name updateOfferPartially
5846
+ * @summary: Partially update offer
5847
+ * @description: Seller can make partial adjustments of an existing offer by specifying its unique identifier. It enables businesses to modify specific attributes of the offer while preserving other details intact. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/updateOfferPartially/).
5848
+ */
5849
+ async updateOfferPartially(
5850
+ { id, body, requestHeaders } = { requestHeaders: {} },
5851
+ { responseHeaders } = { responseHeaders: false }
5852
+ ) {
5853
+ const {
5854
+ error,
5855
+ } = CartPlatformApplicationValidator.updateOfferPartially().validate(
5856
+ {
5857
+ id,
5858
+ body,
5859
+ },
5860
+ { abortEarly: false, allowUnknown: true }
5861
+ );
5862
+ if (error) {
5863
+ return Promise.reject(new FDKClientValidationError(error));
5864
+ }
5865
+
5866
+ // Showing warrnings if extra unknown parameters are found
5867
+ const {
5868
+ error: warrning,
5869
+ } = CartPlatformApplicationValidator.updateOfferPartially().validate(
5870
+ {
5871
+ id,
5872
+ body,
5873
+ },
5874
+ { abortEarly: false, allowUnknown: false }
5875
+ );
5876
+ if (warrning) {
5877
+ Logger({
5878
+ level: "WARN",
5879
+ message: `Parameter Validation warrnings for platform > Cart > updateOfferPartially \n ${warrning}`,
5880
+ });
5881
+ }
5882
+
5883
+ const query_params = {};
5884
+
5885
+ const response = await PlatformAPIClient.execute(
5886
+ this.config,
5887
+ "patch",
5888
+ `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/offers/${id}`,
5889
+ query_params,
5890
+ body,
5891
+ requestHeaders,
5892
+ { responseHeaders }
5893
+ );
5894
+
5895
+ let responseData = response;
5896
+ if (responseHeaders) {
5897
+ responseData = response[0];
5898
+ }
5899
+
5900
+ const {
5901
+ error: res_error,
5902
+ } = CartPlatformModel.SuccessMessage().validate(responseData, {
5903
+ abortEarly: false,
5904
+ allowUnknown: true,
5905
+ });
5906
+
5907
+ if (res_error) {
5908
+ if (this.config.options.strictResponseCheck === true) {
5909
+ return Promise.reject(new FDKResponseValidationError(res_error));
5910
+ } else {
5911
+ Logger({
5912
+ level: "WARN",
5913
+ message: `Response Validation Warnings for platform > Cart > updateOfferPartially \n ${res_error}`,
5914
+ });
5915
+ }
5916
+ }
5917
+
5918
+ return response;
5919
+ }
5920
+
4981
5921
  /**
4982
5922
  * @param {CartPlatformApplicationValidator.UpdatePriceAdjustmentParam} arg
4983
5923
  * - Arg object
4984
5924
  *
4985
5925
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4986
5926
  * @param {import("../PlatformAPIClient").Options} - Options
4987
- * @returns {Promise<CartPlatformModel.PriceAdjustmentResponse>} - Success response
5927
+ * @returns {Promise<CartPlatformModel.GetPriceAdjustmentResult>} - Success response
4988
5928
  * @name updatePriceAdjustment
4989
5929
  * @summary: Update price adjustments
4990
- * @description: Modify price adjustments for specific items in the cart. By providing the seller ID, sales channel ID, and price adjustment ID, seller can apply discounts or other adjustments to the prices of cart items, facilitating dynamic pricing strategies. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updatePriceAdjustment/).
5930
+ * @description: Modify price adjustments for specific items in the cart. By providing the seller ID, sales channel ID, and price adjustment ID, seller can apply discounts or other adjustments to the prices of cart items, facilitating dynamic pricing strategies. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/updatePriceAdjustment/).
4991
5931
  */
4992
5932
  async updatePriceAdjustment(
4993
5933
  { id, body, requestHeaders } = { requestHeaders: {} },
@@ -5042,7 +5982,7 @@ class Cart {
5042
5982
 
5043
5983
  const {
5044
5984
  error: res_error,
5045
- } = CartPlatformModel.PriceAdjustmentResponse().validate(responseData, {
5985
+ } = CartPlatformModel.GetPriceAdjustmentResult().validate(responseData, {
5046
5986
  abortEarly: false,
5047
5987
  allowUnknown: true,
5048
5988
  });
@@ -5065,10 +6005,10 @@ class Cart {
5065
6005
  * @param {CartPlatformApplicationValidator.UpdatePromotionParam} arg - Arg object
5066
6006
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
5067
6007
  * @param {import("../PlatformAPIClient").Options} - Options
5068
- * @returns {Promise<CartPlatformModel.PromotionUpdate>} - Success response
6008
+ * @returns {Promise<CartPlatformModel.PromotionUpdateResult>} - Success response
5069
6009
  * @name updatePromotion
5070
6010
  * @summary: Update a promotion
5071
- * @description: Update the details of an existing promotion by specifying its unique identifier. This includes modifying promotion attributes such as discount percentage, validity period, and associated conditions. Leveraging this functionality allows businesses to quickly adapt their promotional strategies to changing market dynamics. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updatePromotion/).
6011
+ * @description: Update the details of an existing promotion by specifying its unique identifier. This includes modifying promotion attributes such as discount percentage, validity period, and associated conditions. Leveraging this functionality allows businesses to quickly adapt their promotional strategies to changing market dynamics. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/updatePromotion/).
5072
6012
  */
5073
6013
  async updatePromotion(
5074
6014
  { id, body, requestHeaders } = { requestHeaders: {} },
@@ -5123,7 +6063,7 @@ class Cart {
5123
6063
 
5124
6064
  const {
5125
6065
  error: res_error,
5126
- } = CartPlatformModel.PromotionUpdate().validate(responseData, {
6066
+ } = CartPlatformModel.PromotionUpdateResult().validate(responseData, {
5127
6067
  abortEarly: false,
5128
6068
  allowUnknown: true,
5129
6069
  });
@@ -5151,7 +6091,7 @@ class Cart {
5151
6091
  * @returns {Promise<CartPlatformModel.SuccessMessage>} - Success response
5152
6092
  * @name updatePromotionPartially
5153
6093
  * @summary: Update a promotion partially
5154
- * @description: Seller can make partial adjustments of an existing promotion by specifying its unique identifier. It enables businesses to modify specific attributes of the promotion while preserving other details intact. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updatePromotionPartially/).
6094
+ * @description: Seller can make partial adjustments of an existing promotion by specifying its unique identifier. It enables businesses to modify specific attributes of the promotion while preserving other details intact. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/updatePromotionPartially/).
5155
6095
  */
5156
6096
  async updatePromotionPartially(
5157
6097
  { id, body, requestHeaders } = { requestHeaders: {} },
@@ -5229,11 +6169,11 @@ class Cart {
5229
6169
  * @param {CartPlatformApplicationValidator.UpdateShipmentsParam} arg - Arg object
5230
6170
  * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
5231
6171
  * @param {import("../PlatformAPIClient").Options} - Options
5232
- * @returns {Promise<CartPlatformModel.PlatformCartShipmentsResponse>} -
6172
+ * @returns {Promise<CartPlatformModel.PlatformCartShipmentsResult>} -
5233
6173
  * Success response
5234
6174
  * @name updateShipments
5235
6175
  * @summary: Update shipments
5236
- * @description: Update the quantity or delivery type of the shipments. Customers can switch the order type from Home Delivery to Pick At Store and vice versa. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateShipments/).
6176
+ * @description: Update the quantity or delivery type of the shipments. Customers can switch the order type from Home Delivery to Pick At Store and vice versa. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/updateShipments/).
5237
6177
  */
5238
6178
  async updateShipments(
5239
6179
  { body, i, p, id, addressId, areaCode, orderType, requestHeaders } = {
@@ -5306,10 +6246,10 @@ class Cart {
5306
6246
 
5307
6247
  const {
5308
6248
  error: res_error,
5309
- } = CartPlatformModel.PlatformCartShipmentsResponse().validate(
5310
- responseData,
5311
- { abortEarly: false, allowUnknown: true }
5312
- );
6249
+ } = CartPlatformModel.PlatformCartShipmentsResult().validate(responseData, {
6250
+ abortEarly: false,
6251
+ allowUnknown: true,
6252
+ });
5313
6253
 
5314
6254
  if (res_error) {
5315
6255
  if (this.config.options.strictResponseCheck === true) {
@@ -5334,10 +6274,12 @@ class Cart {
5334
6274
  * @returns {Promise<CartPlatformModel.PaymentCouponValidate>} - Success response
5335
6275
  * @name validateCouponForPayment
5336
6276
  * @summary: Validate applied coupon
5337
- * @description: Validates the applicability of a coupon code for the selected payment mode for the existing cart. This ensures the coupon's validity before proceeding with the payment process, enhancing user experience and preventing potential errors during transactions. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/validateCouponForPayment/).
6277
+ * @description: Validates the applicability of a coupon code for the selected payment mode for the existing cart. This ensures the coupon's validity before proceeding with the payment process, enhancing user experience and preventing potential errors during transactions. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/cart/validateCouponForPayment/).
5338
6278
  */
5339
6279
  async validateCouponForPayment(
5340
6280
  {
6281
+ xOrderingSource,
6282
+ xOrderingSourceType,
5341
6283
  id,
5342
6284
  buyNow,
5343
6285
  addressId,
@@ -5353,6 +6295,8 @@ class Cart {
5353
6295
  error,
5354
6296
  } = CartPlatformApplicationValidator.validateCouponForPayment().validate(
5355
6297
  {
6298
+ xOrderingSource,
6299
+ xOrderingSourceType,
5356
6300
  id,
5357
6301
  buyNow,
5358
6302
  addressId,
@@ -5372,6 +6316,8 @@ class Cart {
5372
6316
  error: warrning,
5373
6317
  } = CartPlatformApplicationValidator.validateCouponForPayment().validate(
5374
6318
  {
6319
+ xOrderingSource,
6320
+ xOrderingSourceType,
5375
6321
  id,
5376
6322
  buyNow,
5377
6323
  addressId,