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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/README.md +44 -7
  2. package/package.json +1 -2
  3. package/sdk/application/ApplicationAPIClient.d.ts +3 -3
  4. package/sdk/application/ApplicationAPIClient.js +6 -4
  5. package/sdk/application/ApplicationClient.d.ts +2 -3
  6. package/sdk/application/ApplicationClient.js +1 -45
  7. package/sdk/application/ApplicationConfig.d.ts +46 -6
  8. package/sdk/application/ApplicationConfig.js +15 -16
  9. package/sdk/application/Cart/CartApplicationClient.d.ts +61 -33
  10. package/sdk/application/Cart/CartApplicationClient.js +225 -134
  11. package/sdk/application/Cart/CartApplicationModel.d.ts +6 -4
  12. package/sdk/application/Cart/CartApplicationModel.js +6 -4
  13. package/sdk/application/Catalog/CatalogApplicationClient.d.ts +61 -30
  14. package/sdk/application/Catalog/CatalogApplicationClient.js +234 -146
  15. package/sdk/application/Catalog/CatalogApplicationModel.d.ts +115 -13
  16. package/sdk/application/Catalog/CatalogApplicationModel.js +77 -12
  17. package/sdk/application/Common/CommonApplicationClient.d.ts +5 -3
  18. package/sdk/application/Common/CommonApplicationClient.js +13 -11
  19. package/sdk/application/Common/CommonApplicationModel.d.ts +3 -83
  20. package/sdk/application/Common/CommonApplicationModel.js +2 -58
  21. package/sdk/application/Communication/CommunicationApplicationClient.d.ts +9 -3
  22. package/sdk/application/Communication/CommunicationApplicationClient.js +25 -13
  23. package/sdk/application/Communication/CommunicationApplicationModel.d.ts +1 -34
  24. package/sdk/application/Communication/CommunicationApplicationModel.js +0 -36
  25. package/sdk/application/Configuration/ConfigurationApplicationClient.d.ts +46 -16
  26. package/sdk/application/Configuration/ConfigurationApplicationClient.js +144 -68
  27. package/sdk/application/Configuration/ConfigurationApplicationModel.d.ts +1 -219
  28. package/sdk/application/Configuration/ConfigurationApplicationModel.js +0 -226
  29. package/sdk/application/Content/ContentApplicationClient.d.ts +49 -21
  30. package/sdk/application/Content/ContentApplicationClient.js +159 -80
  31. package/sdk/application/Content/ContentApplicationModel.d.ts +5 -622
  32. package/sdk/application/Content/ContentApplicationModel.js +11 -763
  33. package/sdk/application/FileStorage/FileStorageApplicationClient.d.ts +6 -3
  34. package/sdk/application/FileStorage/FileStorageApplicationClient.js +20 -14
  35. package/sdk/application/FileStorage/FileStorageApplicationModel.d.ts +1 -152
  36. package/sdk/application/FileStorage/FileStorageApplicationModel.js +0 -180
  37. package/sdk/application/Lead/LeadApplicationClient.d.ts +14 -7
  38. package/sdk/application/Lead/LeadApplicationClient.js +50 -31
  39. package/sdk/application/Lead/LeadApplicationModel.d.ts +22 -741
  40. package/sdk/application/Lead/LeadApplicationModel.js +21 -481
  41. package/sdk/application/Logistic/LogisticApplicationClient.d.ts +11 -5
  42. package/sdk/application/Logistic/LogisticApplicationClient.js +41 -20
  43. package/sdk/application/Order/OrderApplicationClient.d.ts +24 -12
  44. package/sdk/application/Order/OrderApplicationClient.js +88 -56
  45. package/sdk/application/Payment/PaymentApplicationClient.d.ts +91 -42
  46. package/sdk/application/Payment/PaymentApplicationClient.js +293 -194
  47. package/sdk/application/Payment/PaymentApplicationModel.d.ts +36 -36
  48. package/sdk/application/Payment/PaymentApplicationModel.js +36 -36
  49. package/sdk/application/PosCart/PosCartApplicationClient.d.ts +59 -32
  50. package/sdk/application/PosCart/PosCartApplicationClient.js +214 -130
  51. package/sdk/application/PosCart/PosCartApplicationModel.d.ts +2 -2
  52. package/sdk/application/PosCart/PosCartApplicationModel.js +2 -2
  53. package/sdk/application/Rewards/RewardsApplicationClient.d.ts +16 -7
  54. package/sdk/application/Rewards/RewardsApplicationClient.js +56 -29
  55. package/sdk/application/Share/ShareApplicationClient.d.ts +15 -7
  56. package/sdk/application/Share/ShareApplicationClient.js +51 -31
  57. package/sdk/application/Share/ShareApplicationModel.d.ts +1 -33
  58. package/sdk/application/Share/ShareApplicationModel.js +0 -38
  59. package/sdk/application/Theme/ThemeApplicationClient.d.ts +9 -4
  60. package/sdk/application/Theme/ThemeApplicationClient.js +35 -18
  61. package/sdk/application/Theme/ThemeApplicationModel.d.ts +982 -312
  62. package/sdk/application/Theme/ThemeApplicationModel.js +621 -284
  63. package/sdk/application/User/UserApplicationClient.d.ts +74 -35
  64. package/sdk/application/User/UserApplicationClient.js +252 -161
  65. package/sdk/application/User/UserApplicationModel.d.ts +3 -401
  66. package/sdk/application/User/UserApplicationModel.js +2 -490
  67. package/sdk/common/AxiosHelper.js +1 -2
  68. package/sdk/common/FDKError.d.ts +3 -0
  69. package/sdk/common/FDKError.js +8 -0
  70. package/sdk/common/utils.d.ts +3 -0
  71. package/sdk/common/utils.js +29 -0
  72. package/sdk/partner/PartnerAPIClient.d.ts +5 -4
  73. package/sdk/partner/PartnerAPIClient.js +7 -4
  74. package/sdk/partner/PartnerClient.d.ts +2 -0
  75. package/sdk/partner/PartnerClient.js +3 -0
  76. package/sdk/partner/Theme/ThemePartnerClient.d.ts +299 -0
  77. package/sdk/partner/Theme/ThemePartnerClient.js +768 -0
  78. package/sdk/partner/Theme/ThemePartnerModel.d.ts +1706 -0
  79. package/sdk/partner/Theme/ThemePartnerModel.js +1409 -0
  80. package/sdk/partner/Theme/ThemePartnerValidator.d.ts +22 -0
  81. package/sdk/partner/Theme/ThemePartnerValidator.js +157 -0
  82. package/sdk/partner/index.d.ts +3 -1
  83. package/sdk/partner/index.js +3 -1
  84. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.d.ts +8 -4
  85. package/sdk/platform/AuditTrail/AuditTrailPlatformClient.js +38 -16
  86. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.d.ts +1 -13
  87. package/sdk/platform/AuditTrail/AuditTrailPlatformModel.js +0 -12
  88. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.d.ts +10 -0
  89. package/sdk/platform/AuditTrail/AuditTrailPlatformValidator.js +4 -0
  90. package/sdk/platform/Billing/BillingPlatformClient.d.ts +59 -14
  91. package/sdk/platform/Billing/BillingPlatformClient.js +315 -64
  92. package/sdk/platform/Billing/BillingPlatformModel.d.ts +56 -196
  93. package/sdk/platform/Billing/BillingPlatformModel.js +63 -217
  94. package/sdk/platform/Billing/BillingPlatformValidator.d.ts +23 -1
  95. package/sdk/platform/Billing/BillingPlatformValidator.js +31 -0
  96. package/sdk/platform/Cart/CartPlatformApplicationClient.d.ts +124 -63
  97. package/sdk/platform/Cart/CartPlatformApplicationClient.js +431 -265
  98. package/sdk/platform/Cart/CartPlatformModel.d.ts +253 -53
  99. package/sdk/platform/Cart/CartPlatformModel.js +104 -54
  100. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +120 -53
  101. package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +398 -247
  102. package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +155 -78
  103. package/sdk/platform/Catalog/CatalogPlatformClient.js +561 -355
  104. package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +10 -12
  105. package/sdk/platform/Catalog/CatalogPlatformModel.js +10 -12
  106. package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +30 -0
  107. package/sdk/platform/Catalog/CatalogPlatformValidator.js +13 -0
  108. package/sdk/platform/Common/CommonPlatformClient.d.ts +5 -3
  109. package/sdk/platform/Common/CommonPlatformClient.js +13 -11
  110. package/sdk/platform/Common/CommonPlatformModel.d.ts +39 -64
  111. package/sdk/platform/Common/CommonPlatformModel.js +23 -57
  112. package/sdk/platform/Common/CommonPlatformValidator.d.ts +5 -10
  113. package/sdk/platform/Common/CommonPlatformValidator.js +3 -4
  114. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.d.ts +370 -120
  115. package/sdk/platform/Communication/CommunicationPlatformApplicationClient.js +2328 -888
  116. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.d.ts +143 -24
  117. package/sdk/platform/Communication/CommunicationPlatformApplicationValidator.js +179 -15
  118. package/sdk/platform/Communication/CommunicationPlatformClient.d.ts +2 -1
  119. package/sdk/platform/Communication/CommunicationPlatformClient.js +6 -5
  120. package/sdk/platform/Communication/CommunicationPlatformModel.d.ts +386 -308
  121. package/sdk/platform/Communication/CommunicationPlatformModel.js +415 -355
  122. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.d.ts +38 -13
  123. package/sdk/platform/CompanyProfile/CompanyProfilePlatformClient.js +171 -57
  124. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.d.ts +53 -1
  125. package/sdk/platform/CompanyProfile/CompanyProfilePlatformModel.js +54 -0
  126. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.d.ts +5 -1
  127. package/sdk/platform/CompanyProfile/CompanyProfilePlatformValidator.js +7 -0
  128. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.d.ts +96 -29
  129. package/sdk/platform/Configuration/ConfigurationPlatformApplicationClient.js +311 -126
  130. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.d.ts +5 -1
  131. package/sdk/platform/Configuration/ConfigurationPlatformApplicationValidator.js +7 -0
  132. package/sdk/platform/Configuration/ConfigurationPlatformClient.d.ts +36 -18
  133. package/sdk/platform/Configuration/ConfigurationPlatformClient.js +121 -86
  134. package/sdk/platform/Configuration/ConfigurationPlatformModel.d.ts +13 -180
  135. package/sdk/platform/Configuration/ConfigurationPlatformModel.js +5 -113
  136. package/sdk/platform/Content/ContentPlatformApplicationClient.d.ts +162 -70
  137. package/sdk/platform/Content/ContentPlatformApplicationClient.js +528 -309
  138. package/sdk/platform/Content/ContentPlatformModel.d.ts +9 -198
  139. package/sdk/platform/Content/ContentPlatformModel.js +8 -231
  140. package/sdk/platform/Discount/DiscountPlatformClient.d.ts +48 -11
  141. package/sdk/platform/Discount/DiscountPlatformClient.js +142 -48
  142. package/sdk/platform/Discount/DiscountPlatformModel.d.ts +40 -1
  143. package/sdk/platform/Discount/DiscountPlatformModel.js +27 -0
  144. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.d.ts +84 -18
  145. package/sdk/platform/FileStorage/FileStoragePlatformApplicationClient.js +486 -53
  146. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.d.ts +71 -7
  147. package/sdk/platform/FileStorage/FileStoragePlatformApplicationValidator.js +81 -5
  148. package/sdk/platform/FileStorage/FileStoragePlatformClient.d.ts +13 -18
  149. package/sdk/platform/FileStorage/FileStoragePlatformClient.js +58 -65
  150. package/sdk/platform/FileStorage/FileStoragePlatformModel.d.ts +198 -71
  151. package/sdk/platform/FileStorage/FileStoragePlatformModel.js +212 -64
  152. package/sdk/platform/FileStorage/FileStoragePlatformValidator.d.ts +18 -10
  153. package/sdk/platform/FileStorage/FileStoragePlatformValidator.js +11 -6
  154. package/sdk/platform/Finance/FinancePlatformClient.d.ts +177 -40
  155. package/sdk/platform/Finance/FinancePlatformClient.js +1028 -132
  156. package/sdk/platform/Finance/FinancePlatformModel.d.ts +670 -22
  157. package/sdk/platform/Finance/FinancePlatformModel.js +809 -23
  158. package/sdk/platform/Finance/FinancePlatformValidator.d.ts +111 -1
  159. package/sdk/platform/Finance/FinancePlatformValidator.js +134 -0
  160. package/sdk/platform/Inventory/InventoryPlatformClient.d.ts +24 -12
  161. package/sdk/platform/Inventory/InventoryPlatformClient.js +94 -52
  162. package/sdk/platform/Lead/LeadPlatformApplicationClient.d.ts +27 -13
  163. package/sdk/platform/Lead/LeadPlatformApplicationClient.js +101 -55
  164. package/sdk/platform/Lead/LeadPlatformClient.d.ts +50 -39
  165. package/sdk/platform/Lead/LeadPlatformClient.js +171 -112
  166. package/sdk/platform/Lead/LeadPlatformModel.d.ts +32 -390
  167. package/sdk/platform/Lead/LeadPlatformModel.js +31 -214
  168. package/sdk/platform/Lead/LeadPlatformValidator.d.ts +33 -33
  169. package/sdk/platform/Lead/LeadPlatformValidator.js +23 -23
  170. package/sdk/platform/OAuthClient.js +6 -2
  171. package/sdk/platform/Order/OrderPlatformApplicationClient.d.ts +4 -2
  172. package/sdk/platform/Order/OrderPlatformApplicationClient.js +12 -10
  173. package/sdk/platform/Order/OrderPlatformClient.d.ts +165 -71
  174. package/sdk/platform/Order/OrderPlatformClient.js +738 -205
  175. package/sdk/platform/Order/OrderPlatformModel.d.ts +261 -3
  176. package/sdk/platform/Order/OrderPlatformModel.js +225 -2
  177. package/sdk/platform/Order/OrderPlatformValidator.d.ts +104 -3
  178. package/sdk/platform/Order/OrderPlatformValidator.js +85 -2
  179. package/sdk/platform/Partner/PartnerPlatformApplicationClient.d.ts +4 -22
  180. package/sdk/platform/Partner/PartnerPlatformApplicationClient.js +12 -159
  181. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.d.ts +1 -30
  182. package/sdk/platform/Partner/PartnerPlatformApplicationValidator.js +0 -26
  183. package/sdk/platform/Partner/PartnerPlatformModel.d.ts +1 -690
  184. package/sdk/platform/Partner/PartnerPlatformModel.js +0 -809
  185. package/sdk/platform/Payment/PaymentPlatformApplicationClient.d.ts +167 -32
  186. package/sdk/platform/Payment/PaymentPlatformApplicationClient.js +793 -145
  187. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.d.ts +91 -1
  188. package/sdk/platform/Payment/PaymentPlatformApplicationValidator.js +91 -0
  189. package/sdk/platform/Payment/PaymentPlatformClient.d.ts +20 -10
  190. package/sdk/platform/Payment/PaymentPlatformClient.js +68 -47
  191. package/sdk/platform/Payment/PaymentPlatformModel.d.ts +549 -7
  192. package/sdk/platform/Payment/PaymentPlatformModel.js +305 -6
  193. package/sdk/platform/PlatformAPIClient.d.ts +3 -3
  194. package/sdk/platform/PlatformAPIClient.js +2 -2
  195. package/sdk/platform/PlatformClient.d.ts +2 -2
  196. package/sdk/platform/PlatformClient.js +4 -4
  197. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.d.ts +28 -12
  198. package/sdk/platform/Rewards/RewardsPlatformApplicationClient.js +90 -53
  199. package/sdk/platform/Rewards/RewardsPlatformModel.d.ts +1 -12
  200. package/sdk/platform/Rewards/RewardsPlatformModel.js +0 -14
  201. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.d.ts +62 -26
  202. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationClient.js +210 -93
  203. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.d.ts +20 -11
  204. package/sdk/platform/Serviceability/ServiceabilityPlatformApplicationValidator.js +23 -11
  205. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.d.ts +36 -18
  206. package/sdk/platform/Serviceability/ServiceabilityPlatformClient.js +142 -78
  207. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.d.ts +12 -3
  208. package/sdk/platform/Serviceability/ServiceabilityPlatformModel.js +14 -2
  209. package/sdk/platform/Share/SharePlatformApplicationClient.d.ts +10 -26
  210. package/sdk/platform/Share/SharePlatformApplicationClient.js +36 -67
  211. package/sdk/platform/Share/SharePlatformModel.d.ts +4 -4
  212. package/sdk/platform/Share/SharePlatformModel.js +4 -4
  213. package/sdk/platform/Theme/ThemePlatformApplicationClient.d.ts +127 -57
  214. package/sdk/platform/Theme/ThemePlatformApplicationClient.js +564 -189
  215. package/sdk/platform/Theme/ThemePlatformApplicationValidator.d.ts +63 -26
  216. package/sdk/platform/Theme/ThemePlatformApplicationValidator.js +62 -22
  217. package/sdk/platform/Theme/ThemePlatformClient.d.ts +37 -0
  218. package/sdk/platform/Theme/ThemePlatformClient.js +235 -0
  219. package/sdk/platform/Theme/ThemePlatformModel.d.ts +1167 -261
  220. package/sdk/platform/Theme/ThemePlatformModel.js +801 -244
  221. package/sdk/platform/Theme/ThemePlatformValidator.d.ts +32 -0
  222. package/sdk/platform/Theme/ThemePlatformValidator.js +38 -0
  223. package/sdk/platform/User/UserPlatformApplicationClient.d.ts +35 -17
  224. package/sdk/platform/User/UserPlatformApplicationClient.js +132 -73
  225. package/sdk/platform/User/UserPlatformApplicationValidator.d.ts +7 -0
  226. package/sdk/platform/User/UserPlatformApplicationValidator.js +3 -0
  227. package/sdk/platform/User/UserPlatformModel.d.ts +1 -738
  228. package/sdk/platform/User/UserPlatformModel.js +3 -899
  229. package/sdk/platform/Webhook/WebhookPlatformClient.d.ts +120 -7
  230. package/sdk/platform/Webhook/WebhookPlatformClient.js +799 -41
  231. package/sdk/platform/Webhook/WebhookPlatformModel.d.ts +476 -86
  232. package/sdk/platform/Webhook/WebhookPlatformModel.js +388 -89
  233. package/sdk/platform/Webhook/WebhookPlatformValidator.d.ts +90 -7
  234. package/sdk/platform/Webhook/WebhookPlatformValidator.js +113 -3
  235. package/sdk/public/Configuration/ConfigurationPublicClient.d.ts +5 -3
  236. package/sdk/public/Configuration/ConfigurationPublicClient.js +13 -11
  237. package/sdk/public/Configuration/ConfigurationPublicModel.d.ts +3 -106
  238. package/sdk/public/Configuration/ConfigurationPublicModel.js +2 -59
  239. package/sdk/public/Inventory/InventoryPublicClient.d.ts +12 -6
  240. package/sdk/public/Inventory/InventoryPublicClient.js +42 -27
  241. package/sdk/public/Partner/PartnerPublicClient.d.ts +22 -0
  242. package/sdk/public/Partner/PartnerPublicClient.js +110 -0
  243. package/sdk/public/Partner/PartnerPublicModel.d.ts +240 -0
  244. package/sdk/public/Partner/PartnerPublicModel.js +280 -0
  245. package/sdk/public/Partner/PartnerPublicValidator.d.ts +18 -0
  246. package/sdk/public/Partner/PartnerPublicValidator.js +19 -0
  247. package/sdk/public/PublicAPIClient.d.ts +14 -1
  248. package/sdk/public/PublicAPIClient.js +7 -1
  249. package/sdk/public/PublicClient.d.ts +2 -0
  250. package/sdk/public/PublicClient.js +4 -0
  251. package/sdk/public/Webhook/WebhookPublicClient.d.ts +5 -2
  252. package/sdk/public/Webhook/WebhookPublicClient.js +15 -9
  253. package/sdk/public/Webhook/WebhookPublicModel.d.ts +1 -191
  254. package/sdk/public/Webhook/WebhookPublicModel.js +0 -229
  255. package/sdk/public/index.d.ts +1 -0
  256. package/sdk/public/index.js +2 -0
  257. package/sdk/application/ApplicationModels.d.ts +0 -48
  258. package/sdk/application/ApplicationModels.js +0 -38
  259. package/sdk/platform/Partner/PartnerPlatformClient.d.ts +0 -106
  260. package/sdk/platform/Partner/PartnerPlatformClient.js +0 -878
  261. package/sdk/platform/Partner/PartnerPlatformValidator.d.ts +0 -208
  262. package/sdk/platform/Partner/PartnerPlatformValidator.js +0 -169
@@ -14,13 +14,17 @@ class Cart {
14
14
 
15
15
  /**
16
16
  * @param {CartPlatformApplicationValidator.AddAddressParam} arg - Arg object
17
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
17
18
  * @param {import("../PlatformAPIClient").Options} - Options
18
19
  * @returns {Promise<CartPlatformModel.SaveAddressResponse>} - Success response
19
20
  * @name addAddress
20
21
  * @summary: Add address to an account
21
22
  * @description: Use this API to add an address to an account. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/addAddress/).
22
23
  */
23
- async addAddress({ body } = {}, { headers } = { headers: false }) {
24
+ async addAddress(
25
+ { body, requestHeaders } = { requestHeaders: {} },
26
+ { responseHeaders } = { responseHeaders: false }
27
+ ) {
24
28
  const { error } = CartPlatformApplicationValidator.addAddress().validate(
25
29
  {
26
30
  body,
@@ -55,12 +59,12 @@ class Cart {
55
59
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/address`,
56
60
  query_params,
57
61
  body,
58
- undefined,
59
- { headers }
62
+ requestHeaders,
63
+ { responseHeaders }
60
64
  );
61
65
 
62
66
  let responseData = response;
63
- if (headers) {
67
+ if (responseHeaders) {
64
68
  responseData = response[0];
65
69
  }
66
70
 
@@ -83,13 +87,17 @@ class Cart {
83
87
 
84
88
  /**
85
89
  * @param {CartPlatformApplicationValidator.AddItemsParam} arg - Arg object
90
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
86
91
  * @param {import("../PlatformAPIClient").Options} - Options
87
92
  * @returns {Promise<CartPlatformModel.AddCartDetailResponse>} - Success response
88
93
  * @name addItems
89
94
  * @summary: Add items to abandoned cart
90
95
  * @description: Use this API to add items to the abandoned cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/addItems/).
91
96
  */
92
- async addItems({ cartId, body, b } = {}, { headers } = { headers: false }) {
97
+ async addItems(
98
+ { cartId, body, b, requestHeaders } = { requestHeaders: {} },
99
+ { responseHeaders } = { responseHeaders: false }
100
+ ) {
93
101
  const { error } = CartPlatformApplicationValidator.addItems().validate(
94
102
  {
95
103
  cartId,
@@ -129,12 +137,12 @@ class Cart {
129
137
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/abandoned/carts/${cartId}`,
130
138
  query_params,
131
139
  body,
132
- undefined,
133
- { headers }
140
+ requestHeaders,
141
+ { responseHeaders }
134
142
  );
135
143
 
136
144
  let responseData = response;
137
- if (headers) {
145
+ if (responseHeaders) {
138
146
  responseData = response[0];
139
147
  }
140
148
 
@@ -157,13 +165,17 @@ class Cart {
157
165
 
158
166
  /**
159
167
  * @param {CartPlatformApplicationValidator.AddPriceAdjustmentParam} arg - Arg object
168
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
160
169
  * @param {import("../PlatformAPIClient").Options} - Options
161
170
  * @returns {Promise<CartPlatformModel.PriceAdjustmentResponse>} - Success response
162
171
  * @name addPriceAdjustment
163
172
  * @summary: Create new price adjustment
164
173
  * @description: Create new price adjustment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/addPriceAdjustment/).
165
174
  */
166
- async addPriceAdjustment({ body } = {}, { headers } = { headers: false }) {
175
+ async addPriceAdjustment(
176
+ { body, requestHeaders } = { requestHeaders: {} },
177
+ { responseHeaders } = { responseHeaders: false }
178
+ ) {
167
179
  const {
168
180
  error,
169
181
  } = CartPlatformApplicationValidator.addPriceAdjustment().validate(
@@ -200,12 +212,12 @@ class Cart {
200
212
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/price-adjustment`,
201
213
  query_params,
202
214
  body,
203
- undefined,
204
- { headers }
215
+ requestHeaders,
216
+ { responseHeaders }
205
217
  );
206
218
 
207
219
  let responseData = response;
208
- if (headers) {
220
+ if (responseHeaders) {
209
221
  responseData = response[0];
210
222
  }
211
223
 
@@ -228,6 +240,7 @@ class Cart {
228
240
 
229
241
  /**
230
242
  * @param {CartPlatformApplicationValidator.ApplyCouponParam} arg - Arg object
243
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
231
244
  * @param {import("../PlatformAPIClient").Options} - Options
232
245
  * @returns {Promise<CartPlatformModel.CartDetailResponse>} - Success response
233
246
  * @name applyCoupon
@@ -235,8 +248,8 @@ class Cart {
235
248
  * @description: Use this API to apply coupons on items in the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/applyCoupon/).
236
249
  */
237
250
  async applyCoupon(
238
- { body, i, b, p, id, buyNow } = {},
239
- { headers } = { headers: false }
251
+ { body, i, b, p, id, buyNow, requestHeaders } = { requestHeaders: {} },
252
+ { responseHeaders } = { responseHeaders: false }
240
253
  ) {
241
254
  const { error } = CartPlatformApplicationValidator.applyCoupon().validate(
242
255
  {
@@ -287,12 +300,12 @@ class Cart {
287
300
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/platform-pos-coupon`,
288
301
  query_params,
289
302
  body,
290
- undefined,
291
- { headers }
303
+ requestHeaders,
304
+ { responseHeaders }
292
305
  );
293
306
 
294
307
  let responseData = response;
295
- if (headers) {
308
+ if (responseHeaders) {
296
309
  responseData = response[0];
297
310
  }
298
311
 
@@ -317,6 +330,7 @@ class Cart {
317
330
  * @param {CartPlatformApplicationValidator.CheckCartServiceabilityParam} arg
318
331
  * - Arg object
319
332
  *
333
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
320
334
  * @param {import("../PlatformAPIClient").Options} - Options
321
335
  * @returns {Promise<CartPlatformModel.OpenApiCartServiceabilityResponse>}
322
336
  * - Success response
@@ -326,8 +340,8 @@ class Cart {
326
340
  * @description: Check Pincode serviceability for cart items provided in `cart_items` and address pincode in `shipping_address` - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/checkCartServiceability/).
327
341
  */
328
342
  async checkCartServiceability(
329
- { body } = {},
330
- { headers } = { headers: false }
343
+ { body, requestHeaders } = { requestHeaders: {} },
344
+ { responseHeaders } = { responseHeaders: false }
331
345
  ) {
332
346
  const {
333
347
  error,
@@ -365,12 +379,12 @@ class Cart {
365
379
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/cart/serviceability`,
366
380
  query_params,
367
381
  body,
368
- undefined,
369
- { headers }
382
+ requestHeaders,
383
+ { responseHeaders }
370
384
  );
371
385
 
372
386
  let responseData = response;
373
- if (headers) {
387
+ if (responseHeaders) {
374
388
  responseData = response[0];
375
389
  }
376
390
 
@@ -393,13 +407,17 @@ class Cart {
393
407
 
394
408
  /**
395
409
  * @param {CartPlatformApplicationValidator.CheckoutCartParam} arg - Arg object
410
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
396
411
  * @param {import("../PlatformAPIClient").Options} - Options
397
412
  * @returns {Promise<CartPlatformModel.OpenApiCheckoutResponse>} - Success response
398
413
  * @name checkoutCart
399
414
  * @summary: Create Fynd order with cart details
400
415
  * @description: Generate Fynd order for cart details send with provided `cart_items` - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/checkoutCart/).
401
416
  */
402
- async checkoutCart({ body } = {}, { headers } = { headers: false }) {
417
+ async checkoutCart(
418
+ { body, requestHeaders } = { requestHeaders: {} },
419
+ { responseHeaders } = { responseHeaders: false }
420
+ ) {
403
421
  const { error } = CartPlatformApplicationValidator.checkoutCart().validate(
404
422
  {
405
423
  body,
@@ -434,12 +452,12 @@ class Cart {
434
452
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/cart/checkout`,
435
453
  query_params,
436
454
  body,
437
- undefined,
438
- { headers }
455
+ requestHeaders,
456
+ { responseHeaders }
439
457
  );
440
458
 
441
459
  let responseData = response;
442
- if (headers) {
460
+ if (responseHeaders) {
443
461
  responseData = response[0];
444
462
  }
445
463
 
@@ -464,13 +482,17 @@ class Cart {
464
482
  * @param {CartPlatformApplicationValidator.CreateCartMetaConfigParam} arg
465
483
  * - Arg object
466
484
  *
485
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
467
486
  * @param {import("../PlatformAPIClient").Options} - Options
468
487
  * @returns {Promise<CartPlatformModel.CartMetaConfigAdd>} - Success response
469
488
  * @name createCartMetaConfig
470
489
  * @summary: Create new cart meta configuration
471
490
  * @description: Create new cart meta configuration - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/createCartMetaConfig/).
472
491
  */
473
- async createCartMetaConfig({ body } = {}, { headers } = { headers: false }) {
492
+ async createCartMetaConfig(
493
+ { body, requestHeaders } = { requestHeaders: {} },
494
+ { responseHeaders } = { responseHeaders: false }
495
+ ) {
474
496
  const {
475
497
  error,
476
498
  } = CartPlatformApplicationValidator.createCartMetaConfig().validate(
@@ -507,12 +529,12 @@ class Cart {
507
529
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/cart_configuration`,
508
530
  query_params,
509
531
  body,
510
- undefined,
511
- { headers }
532
+ requestHeaders,
533
+ { responseHeaders }
512
534
  );
513
535
 
514
536
  let responseData = response;
515
- if (headers) {
537
+ if (responseHeaders) {
516
538
  responseData = response[0];
517
539
  }
518
540
 
@@ -535,13 +557,17 @@ class Cart {
535
557
 
536
558
  /**
537
559
  * @param {CartPlatformApplicationValidator.CreateCouponParam} arg - Arg object
560
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
538
561
  * @param {import("../PlatformAPIClient").Options} - Options
539
562
  * @returns {Promise<CartPlatformModel.SuccessMessage>} - Success response
540
563
  * @name createCoupon
541
564
  * @summary: Create new coupon
542
565
  * @description: Create new coupon - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/createCoupon/).
543
566
  */
544
- async createCoupon({ body } = {}, { headers } = { headers: false }) {
567
+ async createCoupon(
568
+ { body, requestHeaders } = { requestHeaders: {} },
569
+ { responseHeaders } = { responseHeaders: false }
570
+ ) {
545
571
  const { error } = CartPlatformApplicationValidator.createCoupon().validate(
546
572
  {
547
573
  body,
@@ -576,12 +602,12 @@ class Cart {
576
602
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/coupon`,
577
603
  query_params,
578
604
  body,
579
- undefined,
580
- { headers }
605
+ requestHeaders,
606
+ { responseHeaders }
581
607
  );
582
608
 
583
609
  let responseData = response;
584
- if (headers) {
610
+ if (responseHeaders) {
585
611
  responseData = response[0];
586
612
  }
587
613
 
@@ -604,13 +630,17 @@ class Cart {
604
630
 
605
631
  /**
606
632
  * @param {CartPlatformApplicationValidator.CreatePromotionParam} arg - Arg object
633
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
607
634
  * @param {import("../PlatformAPIClient").Options} - Options
608
635
  * @returns {Promise<CartPlatformModel.PromotionAdd>} - Success response
609
636
  * @name createPromotion
610
637
  * @summary: Create new promotion
611
638
  * @description: Create new promotion - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/createPromotion/).
612
639
  */
613
- async createPromotion({ body } = {}, { headers } = { headers: false }) {
640
+ async createPromotion(
641
+ { body, requestHeaders } = { requestHeaders: {} },
642
+ { responseHeaders } = { responseHeaders: false }
643
+ ) {
614
644
  const {
615
645
  error,
616
646
  } = CartPlatformApplicationValidator.createPromotion().validate(
@@ -647,12 +677,12 @@ class Cart {
647
677
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/promotion`,
648
678
  query_params,
649
679
  body,
650
- undefined,
651
- { headers }
680
+ requestHeaders,
681
+ { responseHeaders }
652
682
  );
653
683
 
654
684
  let responseData = response;
655
- if (headers) {
685
+ if (responseHeaders) {
656
686
  responseData = response[0];
657
687
  }
658
688
 
@@ -675,13 +705,17 @@ class Cart {
675
705
 
676
706
  /**
677
707
  * @param {CartPlatformApplicationValidator.DeleteCartParam} arg - Arg object
708
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
678
709
  * @param {import("../PlatformAPIClient").Options} - Options
679
710
  * @returns {Promise<CartPlatformModel.DeleteCartDetailResponse>} - Success response
680
711
  * @name deleteCart
681
712
  * @summary: Delete cart once user made successful checkout
682
713
  * @description: Use this API to delete the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/deleteCart/).
683
714
  */
684
- async deleteCart({ body, id } = {}, { headers } = { headers: false }) {
715
+ async deleteCart(
716
+ { body, id, requestHeaders } = { requestHeaders: {} },
717
+ { responseHeaders } = { responseHeaders: false }
718
+ ) {
685
719
  const { error } = CartPlatformApplicationValidator.deleteCart().validate(
686
720
  {
687
721
  body,
@@ -719,12 +753,12 @@ class Cart {
719
753
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/cart_archive`,
720
754
  query_params,
721
755
  body,
722
- undefined,
723
- { headers }
756
+ requestHeaders,
757
+ { responseHeaders }
724
758
  );
725
759
 
726
760
  let responseData = response;
727
- if (headers) {
761
+ if (responseHeaders) {
728
762
  responseData = response[0];
729
763
  }
730
764
 
@@ -749,6 +783,7 @@ class Cart {
749
783
  * @param {CartPlatformApplicationValidator.FetchAndvalidateCartItemsParam} arg
750
784
  * - Arg object
751
785
  *
786
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
752
787
  * @param {import("../PlatformAPIClient").Options} - Options
753
788
  * @returns {Promise<CartPlatformModel.OpenapiCartDetailsResponse>} - Success response
754
789
  * @name fetchAndvalidateCartItems
@@ -756,8 +791,8 @@ class Cart {
756
791
  * @description: Get all the details of cart for a list of provided `cart_items` - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/fetchAndvalidateCartItems/).
757
792
  */
758
793
  async fetchAndvalidateCartItems(
759
- { body } = {},
760
- { headers } = { headers: false }
794
+ { body, requestHeaders } = { requestHeaders: {} },
795
+ { responseHeaders } = { responseHeaders: false }
761
796
  ) {
762
797
  const {
763
798
  error,
@@ -795,12 +830,12 @@ class Cart {
795
830
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/cart/validate`,
796
831
  query_params,
797
832
  body,
798
- undefined,
799
- { headers }
833
+ requestHeaders,
834
+ { responseHeaders }
800
835
  );
801
836
 
802
837
  let responseData = response;
803
- if (headers) {
838
+ if (responseHeaders) {
804
839
  responseData = response[0];
805
840
  }
806
841
 
@@ -822,13 +857,18 @@ class Cart {
822
857
  }
823
858
 
824
859
  /**
860
+ * @param {CartPlatformApplicationValidator.FetchCartMetaConfigParam} arg - Arg object
861
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
825
862
  * @param {import("../PlatformAPIClient").Options} - Options
826
863
  * @returns {Promise<CartPlatformModel.CartMetaConfigAdd>} - Success response
827
864
  * @name fetchCartMetaConfig
828
865
  * @summary: Fetch cart meta configuration
829
866
  * @description: Fetch cart meta configuration - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/fetchCartMetaConfig/).
830
867
  */
831
- async fetchCartMetaConfig({ headers } = { headers: false }) {
868
+ async fetchCartMetaConfig(
869
+ { requestHeaders } = { requestHeaders: {} },
870
+ { responseHeaders } = { responseHeaders: false }
871
+ ) {
832
872
  const {
833
873
  error,
834
874
  } = CartPlatformApplicationValidator.fetchCartMetaConfig().validate(
@@ -861,12 +901,12 @@ class Cart {
861
901
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/cart_configuration`,
862
902
  query_params,
863
903
  undefined,
864
- undefined,
865
- { headers }
904
+ requestHeaders,
905
+ { responseHeaders }
866
906
  );
867
907
 
868
908
  let responseData = response;
869
- if (headers) {
909
+ if (responseHeaders) {
870
910
  responseData = response[0];
871
911
  }
872
912
 
@@ -889,6 +929,7 @@ class Cart {
889
929
 
890
930
  /**
891
931
  * @param {CartPlatformApplicationValidator.GetAbandonedCartParam} arg - Arg object
932
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
892
933
  * @param {import("../PlatformAPIClient").Options} - Options
893
934
  * @returns {Promise<CartPlatformModel.AbandonedCartResponse>} - Success response
894
935
  * @name getAbandonedCart
@@ -896,8 +937,17 @@ class Cart {
896
937
  * @description: Get abandoned cart list with pagination - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAbandonedCart/).
897
938
  */
898
939
  async getAbandonedCart(
899
- { pageNo, pageSize, fromDate, toDate, anonymousCart, lastId, sortOn } = {},
900
- { headers } = { headers: false }
940
+ {
941
+ pageNo,
942
+ pageSize,
943
+ fromDate,
944
+ toDate,
945
+ anonymousCart,
946
+ lastId,
947
+ sortOn,
948
+ requestHeaders,
949
+ } = { requestHeaders: {} },
950
+ { responseHeaders } = { responseHeaders: false }
901
951
  ) {
902
952
  const {
903
953
  error,
@@ -954,12 +1004,12 @@ class Cart {
954
1004
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/abandoned/carts`,
955
1005
  query_params,
956
1006
  undefined,
957
- undefined,
958
- { headers }
1007
+ requestHeaders,
1008
+ { responseHeaders }
959
1009
  );
960
1010
 
961
1011
  let responseData = response;
962
- if (headers) {
1012
+ if (responseHeaders) {
963
1013
  responseData = response[0];
964
1014
  }
965
1015
 
@@ -1034,6 +1084,7 @@ class Cart {
1034
1084
  * @param {CartPlatformApplicationValidator.GetAbandonedCartDetailsParam} arg
1035
1085
  * - Arg object
1036
1086
  *
1087
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1037
1088
  * @param {import("../PlatformAPIClient").Options} - Options
1038
1089
  * @returns {Promise<CartPlatformModel.CartDetailResponse>} - Success response
1039
1090
  * @name getAbandonedCartDetails
@@ -1041,8 +1092,8 @@ class Cart {
1041
1092
  * @description: Use this API to get details of all the items added to a cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAbandonedCartDetails/).
1042
1093
  */
1043
1094
  async getAbandonedCartDetails(
1044
- { id, i, b } = {},
1045
- { headers } = { headers: false }
1095
+ { id, i, b, requestHeaders } = { requestHeaders: {} },
1096
+ { responseHeaders } = { responseHeaders: false }
1046
1097
  ) {
1047
1098
  const {
1048
1099
  error,
@@ -1087,12 +1138,12 @@ class Cart {
1087
1138
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/abandoned/cart/detail`,
1088
1139
  query_params,
1089
1140
  undefined,
1090
- undefined,
1091
- { headers }
1141
+ requestHeaders,
1142
+ { responseHeaders }
1092
1143
  );
1093
1144
 
1094
1145
  let responseData = response;
1095
- if (headers) {
1146
+ if (responseHeaders) {
1096
1147
  responseData = response[0];
1097
1148
  }
1098
1149
 
@@ -1115,11 +1166,12 @@ class Cart {
1115
1166
 
1116
1167
  /**
1117
1168
  * @param {CartPlatformApplicationValidator.GetAddressByIdParam} arg - Arg object
1169
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1118
1170
  * @param {import("../PlatformAPIClient").Options} - Options
1119
1171
  * @returns {Promise<CartPlatformModel.PlatformAddress>} - Success response
1120
1172
  * @name getAddressById
1121
1173
  * @summary: Fetch a single address by its ID
1122
- * @description: Use this API to get an addresses using its ID. If successful, returns a Address resource in the response body specified in `PlatformAddress`. Attibutes listed below are optional <ul> <li> <font color="monochrome">mobile_no</font></li> <li> <font color="monochrome">checkout_mode</font></li> <li> <font color="monochrome">tags</font></li> <li> <font color="monochrome">default</font></li> </ul> - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAddressById/).
1174
+ * @description: Use this API to get an addresses using its ID. If successful, returns a Address resource in the response body specified in `PlatformAddress`. Attibutes listed below are optional mobile_no checkout_mode tags default - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAddressById/).
1123
1175
  */
1124
1176
  async getAddressById(
1125
1177
  {
@@ -1131,8 +1183,9 @@ class Cart {
1131
1183
  tags,
1132
1184
  isDefault,
1133
1185
  userId,
1134
- } = {},
1135
- { headers } = { headers: false }
1186
+ requestHeaders,
1187
+ } = { requestHeaders: {} },
1188
+ { responseHeaders } = { responseHeaders: false }
1136
1189
  ) {
1137
1190
  const {
1138
1191
  error,
@@ -1191,12 +1244,12 @@ class Cart {
1191
1244
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/address/${id}`,
1192
1245
  query_params,
1193
1246
  undefined,
1194
- undefined,
1195
- { headers }
1247
+ requestHeaders,
1248
+ { responseHeaders }
1196
1249
  );
1197
1250
 
1198
1251
  let responseData = response;
1199
- if (headers) {
1252
+ if (responseHeaders) {
1200
1253
  responseData = response[0];
1201
1254
  }
1202
1255
 
@@ -1219,16 +1272,26 @@ class Cart {
1219
1272
 
1220
1273
  /**
1221
1274
  * @param {CartPlatformApplicationValidator.GetAddressesParam} arg - Arg object
1275
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1222
1276
  * @param {import("../PlatformAPIClient").Options} - Options
1223
1277
  * @returns {Promise<CartPlatformModel.PlatformGetAddressesResponse>} -
1224
1278
  * Success response
1225
1279
  * @name getAddresses
1226
1280
  * @summary: Fetch address
1227
- * @description: Use this API to get all the addresses associated with an account. If successful, returns a Address resource in the response body specified in GetAddressesResponse.attibutes listed below are optional <ul> <li> <font color="monochrome">uid</font></li> <li> <font color="monochrome">address_id</font></li> <li> <font color="monochrome">mobile_no</font></li> <li> <font color="monochrome">checkout_mode</font></li> <li> <font color="monochrome">tags</font></li> <li> <font color="monochrome">default</font></li> </ul> - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAddresses/).
1281
+ * @description: Use this API to get all the addresses associated with an account. If successful, returns a Address resource in the response body specified in GetAddressesResponse.attibutes listed below are optional uid address_id mobile_no checkout_mode tags default - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAddresses/).
1228
1282
  */
1229
1283
  async getAddresses(
1230
- { cartId, buyNow, mobileNo, checkoutMode, tags, isDefault, userId } = {},
1231
- { headers } = { headers: false }
1284
+ {
1285
+ cartId,
1286
+ buyNow,
1287
+ mobileNo,
1288
+ checkoutMode,
1289
+ tags,
1290
+ isDefault,
1291
+ userId,
1292
+ requestHeaders,
1293
+ } = { requestHeaders: {} },
1294
+ { responseHeaders } = { responseHeaders: false }
1232
1295
  ) {
1233
1296
  const { error } = CartPlatformApplicationValidator.getAddresses().validate(
1234
1297
  {
@@ -1283,12 +1346,12 @@ class Cart {
1283
1346
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/address`,
1284
1347
  query_params,
1285
1348
  undefined,
1286
- undefined,
1287
- { headers }
1349
+ requestHeaders,
1350
+ { responseHeaders }
1288
1351
  );
1289
1352
 
1290
1353
  let responseData = response;
1291
- if (headers) {
1354
+ if (responseHeaders) {
1292
1355
  responseData = response[0];
1293
1356
  }
1294
1357
 
@@ -1311,13 +1374,17 @@ class Cart {
1311
1374
 
1312
1375
  /**
1313
1376
  * @param {CartPlatformApplicationValidator.GetAppCouponsParam} arg - Arg object
1377
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1314
1378
  * @param {import("../PlatformAPIClient").Options} - Options
1315
1379
  * @returns {Promise<CartPlatformModel.GetCouponResponse>} - Success response
1316
1380
  * @name getAppCoupons
1317
1381
  * @summary: Fetch Coupon
1318
1382
  * @description: Use this API to get a list of available coupons along with their details. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAppCoupons/).
1319
1383
  */
1320
- async getAppCoupons({ id, buyNow } = {}, { headers } = { headers: false }) {
1384
+ async getAppCoupons(
1385
+ { id, buyNow, requestHeaders } = { requestHeaders: {} },
1386
+ { responseHeaders } = { responseHeaders: false }
1387
+ ) {
1321
1388
  const { error } = CartPlatformApplicationValidator.getAppCoupons().validate(
1322
1389
  {
1323
1390
  id,
@@ -1356,12 +1423,12 @@ class Cart {
1356
1423
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/platform-pos-coupon`,
1357
1424
  query_params,
1358
1425
  undefined,
1359
- undefined,
1360
- { headers }
1426
+ requestHeaders,
1427
+ { responseHeaders }
1361
1428
  );
1362
1429
 
1363
1430
  let responseData = response;
1364
- if (headers) {
1431
+ if (responseHeaders) {
1365
1432
  responseData = response[0];
1366
1433
  }
1367
1434
 
@@ -1386,6 +1453,7 @@ class Cart {
1386
1453
  * @param {CartPlatformApplicationValidator.GetAvailableDeliveryModesParam} arg
1387
1454
  * - Arg object
1388
1455
  *
1456
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1389
1457
  * @param {import("../PlatformAPIClient").Options} - Options
1390
1458
  * @returns {Promise<CartPlatformModel.CartDeliveryModesResponse>} - Success response
1391
1459
  * @name getAvailableDeliveryModes
@@ -1393,8 +1461,8 @@ class Cart {
1393
1461
  * @description: Use this API to get the delivery modes (home-delivery/store-pickup) along with a list of pickup stores available for a given cart at a given PIN Code. User can then view the address of a pickup store with the help of store-address API. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getAvailableDeliveryModes/).
1394
1462
  */
1395
1463
  async getAvailableDeliveryModes(
1396
- { areaCode, id } = {},
1397
- { headers } = { headers: false }
1464
+ { areaCode, id, requestHeaders } = { requestHeaders: {} },
1465
+ { responseHeaders } = { responseHeaders: false }
1398
1466
  ) {
1399
1467
  const {
1400
1468
  error,
@@ -1436,12 +1504,12 @@ class Cart {
1436
1504
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/available-delivery-mode`,
1437
1505
  query_params,
1438
1506
  undefined,
1439
- undefined,
1440
- { headers }
1507
+ requestHeaders,
1508
+ { responseHeaders }
1441
1509
  );
1442
1510
 
1443
1511
  let responseData = response;
1444
- if (headers) {
1512
+ if (responseHeaders) {
1445
1513
  responseData = response[0];
1446
1514
  }
1447
1515
 
@@ -1464,6 +1532,7 @@ class Cart {
1464
1532
 
1465
1533
  /**
1466
1534
  * @param {CartPlatformApplicationValidator.GetCartParam} arg - Arg object
1535
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1467
1536
  * @param {import("../PlatformAPIClient").Options} - Options
1468
1537
  * @returns {Promise<CartPlatformModel.CartDetailResponse>} - Success response
1469
1538
  * @name getCart
@@ -1471,8 +1540,10 @@ class Cart {
1471
1540
  * @description: Use this API to get details of all the items added to a cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCart/).
1472
1541
  */
1473
1542
  async getCart(
1474
- { id, userId, i, b, assignCardId, buyNow } = {},
1475
- { headers } = { headers: false }
1543
+ { id, userId, i, b, assignCardId, buyNow, requestHeaders } = {
1544
+ requestHeaders: {},
1545
+ },
1546
+ { responseHeaders } = { responseHeaders: false }
1476
1547
  ) {
1477
1548
  const { error } = CartPlatformApplicationValidator.getCart().validate(
1478
1549
  {
@@ -1524,12 +1595,12 @@ class Cart {
1524
1595
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/detail`,
1525
1596
  query_params,
1526
1597
  undefined,
1527
- undefined,
1528
- { headers }
1598
+ requestHeaders,
1599
+ { responseHeaders }
1529
1600
  );
1530
1601
 
1531
1602
  let responseData = response;
1532
- if (headers) {
1603
+ if (responseHeaders) {
1533
1604
  responseData = response[0];
1534
1605
  }
1535
1606
 
@@ -1552,6 +1623,7 @@ class Cart {
1552
1623
 
1553
1624
  /**
1554
1625
  * @param {CartPlatformApplicationValidator.GetCartListParam} arg - Arg object
1626
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1555
1627
  * @param {import("../PlatformAPIClient").Options} - Options
1556
1628
  * @returns {Promise<CartPlatformModel.MultiCartResponse>} - Success response
1557
1629
  * @name getCartList
@@ -1559,8 +1631,8 @@ class Cart {
1559
1631
  * @description: Get all carts for the store os user which is created for customer - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCartList/).
1560
1632
  */
1561
1633
  async getCartList(
1562
- { fromDate, toDate, filterOn } = {},
1563
- { headers } = { headers: false }
1634
+ { fromDate, toDate, filterOn, requestHeaders } = { requestHeaders: {} },
1635
+ { responseHeaders } = { responseHeaders: false }
1564
1636
  ) {
1565
1637
  const { error } = CartPlatformApplicationValidator.getCartList().validate(
1566
1638
  {
@@ -1603,12 +1675,12 @@ class Cart {
1603
1675
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/cart-list`,
1604
1676
  query_params,
1605
1677
  undefined,
1606
- undefined,
1607
- { headers }
1678
+ requestHeaders,
1679
+ { responseHeaders }
1608
1680
  );
1609
1681
 
1610
1682
  let responseData = response;
1611
- if (headers) {
1683
+ if (responseHeaders) {
1612
1684
  responseData = response[0];
1613
1685
  }
1614
1686
 
@@ -1631,13 +1703,17 @@ class Cart {
1631
1703
 
1632
1704
  /**
1633
1705
  * @param {CartPlatformApplicationValidator.GetCartShareLinkParam} arg - Arg object
1706
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1634
1707
  * @param {import("../PlatformAPIClient").Options} - Options
1635
1708
  * @returns {Promise<CartPlatformModel.GetShareCartLinkResponse>} - Success response
1636
1709
  * @name getCartShareLink
1637
1710
  * @summary: Generate token for sharing the cart
1638
1711
  * @description: Use this API to generate a shared cart snapshot and return a shortlink token. The link can be shared with other users for getting the same items in their cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCartShareLink/).
1639
1712
  */
1640
- async getCartShareLink({ body } = {}, { headers } = { headers: false }) {
1713
+ async getCartShareLink(
1714
+ { body, requestHeaders } = { requestHeaders: {} },
1715
+ { responseHeaders } = { responseHeaders: false }
1716
+ ) {
1641
1717
  const {
1642
1718
  error,
1643
1719
  } = CartPlatformApplicationValidator.getCartShareLink().validate(
@@ -1674,12 +1750,12 @@ class Cart {
1674
1750
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/share-cart`,
1675
1751
  query_params,
1676
1752
  body,
1677
- undefined,
1678
- { headers }
1753
+ requestHeaders,
1754
+ { responseHeaders }
1679
1755
  );
1680
1756
 
1681
1757
  let responseData = response;
1682
- if (headers) {
1758
+ if (responseHeaders) {
1683
1759
  responseData = response[0];
1684
1760
  }
1685
1761
 
@@ -1702,13 +1778,17 @@ class Cart {
1702
1778
 
1703
1779
  /**
1704
1780
  * @param {CartPlatformApplicationValidator.GetCartSharedItemsParam} arg - Arg object
1781
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1705
1782
  * @param {import("../PlatformAPIClient").Options} - Options
1706
1783
  * @returns {Promise<CartPlatformModel.SharedCartResponse>} - Success response
1707
1784
  * @name getCartSharedItems
1708
1785
  * @summary: Get details of a shared cart
1709
1786
  * @description: Use this API to get the shared cart details as per the token generated using the share-cart API. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCartSharedItems/).
1710
1787
  */
1711
- async getCartSharedItems({ token } = {}, { headers } = { headers: false }) {
1788
+ async getCartSharedItems(
1789
+ { token, requestHeaders } = { requestHeaders: {} },
1790
+ { responseHeaders } = { responseHeaders: false }
1791
+ ) {
1712
1792
  const {
1713
1793
  error,
1714
1794
  } = CartPlatformApplicationValidator.getCartSharedItems().validate(
@@ -1745,12 +1825,12 @@ class Cart {
1745
1825
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/share-cart/${token}`,
1746
1826
  query_params,
1747
1827
  undefined,
1748
- undefined,
1749
- { headers }
1828
+ requestHeaders,
1829
+ { responseHeaders }
1750
1830
  );
1751
1831
 
1752
1832
  let responseData = response;
1753
- if (headers) {
1833
+ if (responseHeaders) {
1754
1834
  responseData = response[0];
1755
1835
  }
1756
1836
 
@@ -1773,13 +1853,17 @@ class Cart {
1773
1853
 
1774
1854
  /**
1775
1855
  * @param {CartPlatformApplicationValidator.GetCouponByIdParam} arg - Arg object
1856
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1776
1857
  * @param {import("../PlatformAPIClient").Options} - Options
1777
1858
  * @returns {Promise<CartPlatformModel.CouponUpdate>} - Success response
1778
1859
  * @name getCouponById
1779
1860
  * @summary: Get with single coupon details or coupon list
1780
1861
  * @description: Get single coupon details with `id` in path param - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCouponById/).
1781
1862
  */
1782
- async getCouponById({ id } = {}, { headers } = { headers: false }) {
1863
+ async getCouponById(
1864
+ { id, requestHeaders } = { requestHeaders: {} },
1865
+ { responseHeaders } = { responseHeaders: false }
1866
+ ) {
1783
1867
  const { error } = CartPlatformApplicationValidator.getCouponById().validate(
1784
1868
  {
1785
1869
  id,
@@ -1814,12 +1898,12 @@ class Cart {
1814
1898
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/coupon/${id}`,
1815
1899
  query_params,
1816
1900
  undefined,
1817
- undefined,
1818
- { headers }
1901
+ requestHeaders,
1902
+ { responseHeaders }
1819
1903
  );
1820
1904
 
1821
1905
  let responseData = response;
1822
- if (headers) {
1906
+ if (responseHeaders) {
1823
1907
  responseData = response[0];
1824
1908
  }
1825
1909
 
@@ -1842,13 +1926,17 @@ class Cart {
1842
1926
 
1843
1927
  /**
1844
1928
  * @param {CartPlatformApplicationValidator.GetCouponCodeExistsParam} arg - Arg object
1929
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1845
1930
  * @param {import("../PlatformAPIClient").Options} - Options
1846
1931
  * @returns {Promise<Object>} - Success response
1847
1932
  * @name getCouponCodeExists
1848
1933
  * @summary: Check if coupon is already created with coupon code
1849
1934
  * @description: Check if sent coupon code is already existing coupon code. As coupon code is to be unique. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCouponCodeExists/).
1850
1935
  */
1851
- async getCouponCodeExists({ code } = {}, { headers } = { headers: false }) {
1936
+ async getCouponCodeExists(
1937
+ { code, requestHeaders } = { requestHeaders: {} },
1938
+ { responseHeaders } = { responseHeaders: false }
1939
+ ) {
1852
1940
  const {
1853
1941
  error,
1854
1942
  } = CartPlatformApplicationValidator.getCouponCodeExists().validate(
@@ -1886,12 +1974,12 @@ class Cart {
1886
1974
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/coupon_code_exists`,
1887
1975
  query_params,
1888
1976
  undefined,
1889
- undefined,
1890
- { headers }
1977
+ requestHeaders,
1978
+ { responseHeaders }
1891
1979
  );
1892
1980
 
1893
1981
  let responseData = response;
1894
- if (headers) {
1982
+ if (responseHeaders) {
1895
1983
  responseData = response[0];
1896
1984
  }
1897
1985
 
@@ -1911,13 +1999,20 @@ class Cart {
1911
1999
  }
1912
2000
 
1913
2001
  /**
2002
+ * @param {CartPlatformApplicationValidator.GetCouponOptionValuesParam} arg
2003
+ * - Arg object
2004
+ *
2005
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1914
2006
  * @param {import("../PlatformAPIClient").Options} - Options
1915
2007
  * @returns {Promise<Object>} - Success response
1916
2008
  * @name getCouponOptionValues
1917
2009
  * @summary: Get coupon options enums with display values
1918
2010
  * @description: Get coupon enum values for fields in valid coupon object. Used for front end to create, update and filter coupon lists via fields - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getCouponOptionValues/).
1919
2011
  */
1920
- async getCouponOptionValues({ headers } = { headers: false }) {
2012
+ async getCouponOptionValues(
2013
+ { requestHeaders } = { requestHeaders: {} },
2014
+ { responseHeaders } = { responseHeaders: false }
2015
+ ) {
1921
2016
  const {
1922
2017
  error,
1923
2018
  } = CartPlatformApplicationValidator.getCouponOptionValues().validate(
@@ -1950,12 +2045,12 @@ class Cart {
1950
2045
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/coupon_options`,
1951
2046
  query_params,
1952
2047
  undefined,
1953
- undefined,
1954
- { headers }
2048
+ requestHeaders,
2049
+ { responseHeaders }
1955
2050
  );
1956
2051
 
1957
2052
  let responseData = response;
1958
- if (headers) {
2053
+ if (responseHeaders) {
1959
2054
  responseData = response[0];
1960
2055
  }
1961
2056
 
@@ -1976,6 +2071,7 @@ class Cart {
1976
2071
 
1977
2072
  /**
1978
2073
  * @param {CartPlatformApplicationValidator.GetCouponsParam} arg - Arg object
2074
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
1979
2075
  * @param {import("../PlatformAPIClient").Options} - Options
1980
2076
  * @returns {Promise<CartPlatformModel.CouponsResponse>} - Success response
1981
2077
  * @name getCoupons
@@ -1992,8 +2088,9 @@ class Cart {
1992
2088
  isDisplay,
1993
2089
  typeSlug,
1994
2090
  code,
1995
- } = {},
1996
- { headers } = { headers: false }
2091
+ requestHeaders,
2092
+ } = { requestHeaders: {} },
2093
+ { responseHeaders } = { responseHeaders: false }
1997
2094
  ) {
1998
2095
  const { error } = CartPlatformApplicationValidator.getCoupons().validate(
1999
2096
  {
@@ -2051,12 +2148,12 @@ class Cart {
2051
2148
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/coupon`,
2052
2149
  query_params,
2053
2150
  undefined,
2054
- undefined,
2055
- { headers }
2151
+ requestHeaders,
2152
+ { responseHeaders }
2056
2153
  );
2057
2154
 
2058
2155
  let responseData = response;
2059
- if (headers) {
2156
+ if (responseHeaders) {
2060
2157
  responseData = response[0];
2061
2158
  }
2062
2159
 
@@ -2132,13 +2229,17 @@ class Cart {
2132
2229
 
2133
2230
  /**
2134
2231
  * @param {CartPlatformApplicationValidator.GetItemCountParam} arg - Arg object
2232
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2135
2233
  * @param {import("../PlatformAPIClient").Options} - Options
2136
2234
  * @returns {Promise<CartPlatformModel.CartItemCountResponse>} - Success response
2137
2235
  * @name getItemCount
2138
2236
  * @summary: Count items in the customer's cart
2139
2237
  * @description: Use this API to get the total number of items present in cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getItemCount/).
2140
2238
  */
2141
- async getItemCount({ id, buyNow } = {}, { headers } = { headers: false }) {
2239
+ async getItemCount(
2240
+ { id, buyNow, requestHeaders } = { requestHeaders: {} },
2241
+ { responseHeaders } = { responseHeaders: false }
2242
+ ) {
2142
2243
  const { error } = CartPlatformApplicationValidator.getItemCount().validate(
2143
2244
  {
2144
2245
  id,
@@ -2177,12 +2278,12 @@ class Cart {
2177
2278
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/basic`,
2178
2279
  query_params,
2179
2280
  undefined,
2180
- undefined,
2181
- { headers }
2281
+ requestHeaders,
2282
+ { responseHeaders }
2182
2283
  );
2183
2284
 
2184
2285
  let responseData = response;
2185
- if (headers) {
2286
+ if (responseHeaders) {
2186
2287
  responseData = response[0];
2187
2288
  }
2188
2289
 
@@ -2207,6 +2308,7 @@ class Cart {
2207
2308
  * @param {CartPlatformApplicationValidator.GetPromosCouponConfigParam} arg
2208
2309
  * - Arg object
2209
2310
  *
2311
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2210
2312
  * @param {import("../PlatformAPIClient").Options} - Options
2211
2313
  * @returns {Promise<CartPlatformModel.ActivePromosResponse>} - Success response
2212
2314
  * @name getPromosCouponConfig
@@ -2214,8 +2316,8 @@ class Cart {
2214
2316
  * @description: Use this API to get list of all the active promos/coupons. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPromosCouponConfig/).
2215
2317
  */
2216
2318
  async getPromosCouponConfig(
2217
- { entityType, isHidden } = {},
2218
- { headers } = { headers: false }
2319
+ { entityType, isHidden, requestHeaders } = { requestHeaders: {} },
2320
+ { responseHeaders } = { responseHeaders: false }
2219
2321
  ) {
2220
2322
  const {
2221
2323
  error,
@@ -2257,12 +2359,12 @@ class Cart {
2257
2359
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/promo-coupons`,
2258
2360
  query_params,
2259
2361
  undefined,
2260
- undefined,
2261
- { headers }
2362
+ requestHeaders,
2363
+ { responseHeaders }
2262
2364
  );
2263
2365
 
2264
2366
  let responseData = response;
2265
- if (headers) {
2367
+ if (responseHeaders) {
2266
2368
  responseData = response[0];
2267
2369
  }
2268
2370
 
@@ -2285,13 +2387,17 @@ class Cart {
2285
2387
 
2286
2388
  /**
2287
2389
  * @param {CartPlatformApplicationValidator.GetPromotionByIdParam} arg - Arg object
2390
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2288
2391
  * @param {import("../PlatformAPIClient").Options} - Options
2289
2392
  * @returns {Promise<CartPlatformModel.PromotionUpdate>} - Success response
2290
2393
  * @name getPromotionById
2291
2394
  * @summary: Get with single promotion details or promotion list
2292
2395
  * @description: Get single promotion details with `id` in path param - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPromotionById/).
2293
2396
  */
2294
- async getPromotionById({ id } = {}, { headers } = { headers: false }) {
2397
+ async getPromotionById(
2398
+ { id, requestHeaders } = { requestHeaders: {} },
2399
+ { responseHeaders } = { responseHeaders: false }
2400
+ ) {
2295
2401
  const {
2296
2402
  error,
2297
2403
  } = CartPlatformApplicationValidator.getPromotionById().validate(
@@ -2328,12 +2434,12 @@ class Cart {
2328
2434
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/promotion/${id}`,
2329
2435
  query_params,
2330
2436
  undefined,
2331
- undefined,
2332
- { headers }
2437
+ requestHeaders,
2438
+ { responseHeaders }
2333
2439
  );
2334
2440
 
2335
2441
  let responseData = response;
2336
- if (headers) {
2442
+ if (responseHeaders) {
2337
2443
  responseData = response[0];
2338
2444
  }
2339
2445
 
@@ -2358,6 +2464,7 @@ class Cart {
2358
2464
  * @param {CartPlatformApplicationValidator.GetPromotionCodeExistsParam} arg
2359
2465
  * - Arg object
2360
2466
  *
2467
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2361
2468
  * @param {import("../PlatformAPIClient").Options} - Options
2362
2469
  * @returns {Promise<Object>} - Success response
2363
2470
  * @name getPromotionCodeExists
@@ -2365,8 +2472,8 @@ class Cart {
2365
2472
  * @description: Check if sent promotion code is already existing promotion code. As promotion code is to be unique. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getPromotionCodeExists/).
2366
2473
  */
2367
2474
  async getPromotionCodeExists(
2368
- { code } = {},
2369
- { headers } = { headers: false }
2475
+ { code, requestHeaders } = { requestHeaders: {} },
2476
+ { responseHeaders } = { responseHeaders: false }
2370
2477
  ) {
2371
2478
  const {
2372
2479
  error,
@@ -2405,12 +2512,12 @@ class Cart {
2405
2512
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/promotion_code_exists`,
2406
2513
  query_params,
2407
2514
  undefined,
2408
- undefined,
2409
- { headers }
2515
+ requestHeaders,
2516
+ { responseHeaders }
2410
2517
  );
2411
2518
 
2412
2519
  let responseData = response;
2413
- if (headers) {
2520
+ if (responseHeaders) {
2414
2521
  responseData = response[0];
2415
2522
  }
2416
2523
 
@@ -2431,6 +2538,7 @@ class Cart {
2431
2538
 
2432
2539
  /**
2433
2540
  * @param {CartPlatformApplicationValidator.GetPromotionsParam} arg - Arg object
2541
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2434
2542
  * @param {import("../PlatformAPIClient").Options} - Options
2435
2543
  * @returns {Promise<CartPlatformModel.PromotionsResponse>} - Success response
2436
2544
  * @name getPromotions
@@ -2447,8 +2555,9 @@ class Cart {
2447
2555
  promotionType,
2448
2556
  fpPanel,
2449
2557
  promotionId,
2450
- } = {},
2451
- { headers } = { headers: false }
2558
+ requestHeaders,
2559
+ } = { requestHeaders: {} },
2560
+ { responseHeaders } = { responseHeaders: false }
2452
2561
  ) {
2453
2562
  const { error } = CartPlatformApplicationValidator.getPromotions().validate(
2454
2563
  {
@@ -2506,12 +2615,12 @@ class Cart {
2506
2615
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/promotion`,
2507
2616
  query_params,
2508
2617
  undefined,
2509
- undefined,
2510
- { headers }
2618
+ requestHeaders,
2619
+ { responseHeaders }
2511
2620
  );
2512
2621
 
2513
2622
  let responseData = response;
2514
- if (headers) {
2623
+ if (responseHeaders) {
2515
2624
  responseData = response[0];
2516
2625
  }
2517
2626
 
@@ -2587,6 +2696,7 @@ class Cart {
2587
2696
 
2588
2697
  /**
2589
2698
  * @param {CartPlatformApplicationValidator.GetShipmentsParam} arg - Arg object
2699
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2590
2700
  * @param {import("../PlatformAPIClient").Options} - Options
2591
2701
  * @returns {Promise<CartPlatformModel.PlatformCartShipmentsResponse>} -
2592
2702
  * Success response
@@ -2604,8 +2714,9 @@ class Cart {
2604
2714
  addressId,
2605
2715
  areaCode,
2606
2716
  orderType,
2607
- } = {},
2608
- { headers } = { headers: false }
2717
+ requestHeaders,
2718
+ } = { requestHeaders: {} },
2719
+ { responseHeaders } = { responseHeaders: false }
2609
2720
  ) {
2610
2721
  const { error } = CartPlatformApplicationValidator.getShipments().validate(
2611
2722
  {
@@ -2663,12 +2774,12 @@ class Cart {
2663
2774
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/shipment`,
2664
2775
  query_params,
2665
2776
  undefined,
2666
- undefined,
2667
- { headers }
2777
+ requestHeaders,
2778
+ { responseHeaders }
2668
2779
  );
2669
2780
 
2670
2781
  let responseData = response;
2671
- if (headers) {
2782
+ if (responseHeaders) {
2672
2783
  responseData = response[0];
2673
2784
  }
2674
2785
 
@@ -2693,6 +2804,7 @@ class Cart {
2693
2804
  * @param {CartPlatformApplicationValidator.GetStoreAddressByUidParam} arg
2694
2805
  * - Arg object
2695
2806
  *
2807
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2696
2808
  * @param {import("../PlatformAPIClient").Options} - Options
2697
2809
  * @returns {Promise<CartPlatformModel.StoreDetailsResponse>} - Success response
2698
2810
  * @name getStoreAddressByUid
@@ -2700,8 +2812,8 @@ class Cart {
2700
2812
  * @description: Use this API to get the store details by entering the unique identifier of the pickup stores shown in the response of available-delivery-mode API. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/getStoreAddressByUid/).
2701
2813
  */
2702
2814
  async getStoreAddressByUid(
2703
- { storeUid } = {},
2704
- { headers } = { headers: false }
2815
+ { storeUid, requestHeaders } = { requestHeaders: {} },
2816
+ { responseHeaders } = { responseHeaders: false }
2705
2817
  ) {
2706
2818
  const {
2707
2819
  error,
@@ -2740,12 +2852,12 @@ class Cart {
2740
2852
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/store-address`,
2741
2853
  query_params,
2742
2854
  undefined,
2743
- undefined,
2744
- { headers }
2855
+ requestHeaders,
2856
+ { responseHeaders }
2745
2857
  );
2746
2858
 
2747
2859
  let responseData = response;
2748
- if (headers) {
2860
+ if (responseHeaders) {
2749
2861
  responseData = response[0];
2750
2862
  }
2751
2863
 
@@ -2768,13 +2880,17 @@ class Cart {
2768
2880
 
2769
2881
  /**
2770
2882
  * @param {CartPlatformApplicationValidator.OverrideCartParam} arg - Arg object
2883
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2771
2884
  * @param {import("../PlatformAPIClient").Options} - Options
2772
2885
  * @returns {Promise<CartPlatformModel.OverrideCheckoutResponse>} - Success response
2773
2886
  * @name overrideCart
2774
2887
  * @summary: Create Fynd order with overriding cart details
2775
2888
  * @description: Generate Fynd order while overriding cart details sent with provided `cart_items` - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/overrideCart/).
2776
2889
  */
2777
- async overrideCart({ body } = {}, { headers } = { headers: false }) {
2890
+ async overrideCart(
2891
+ { body, requestHeaders } = { requestHeaders: {} },
2892
+ { responseHeaders } = { responseHeaders: false }
2893
+ ) {
2778
2894
  const { error } = CartPlatformApplicationValidator.overrideCart().validate(
2779
2895
  {
2780
2896
  body,
@@ -2809,12 +2925,12 @@ class Cart {
2809
2925
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/checkout/over-ride`,
2810
2926
  query_params,
2811
2927
  body,
2812
- undefined,
2813
- { headers }
2928
+ requestHeaders,
2929
+ { responseHeaders }
2814
2930
  );
2815
2931
 
2816
2932
  let responseData = response;
2817
- if (headers) {
2933
+ if (responseHeaders) {
2818
2934
  responseData = response[0];
2819
2935
  }
2820
2936
 
@@ -2837,6 +2953,7 @@ class Cart {
2837
2953
 
2838
2954
  /**
2839
2955
  * @param {CartPlatformApplicationValidator.PlatformAddItemsParam} arg - Arg object
2956
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2840
2957
  * @param {import("../PlatformAPIClient").Options} - Options
2841
2958
  * @returns {Promise<CartPlatformModel.AddCartDetailResponse>} - Success response
2842
2959
  * @name platformAddItems
@@ -2844,8 +2961,8 @@ class Cart {
2844
2961
  * @description: Use this API to add items to the cart. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/platformAddItems/).
2845
2962
  */
2846
2963
  async platformAddItems(
2847
- { body, i, b, buyNow, id } = {},
2848
- { headers } = { headers: false }
2964
+ { body, i, b, buyNow, id, requestHeaders } = { requestHeaders: {} },
2965
+ { responseHeaders } = { responseHeaders: false }
2849
2966
  ) {
2850
2967
  const {
2851
2968
  error,
@@ -2895,12 +3012,12 @@ class Cart {
2895
3012
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/detail`,
2896
3013
  query_params,
2897
3014
  body,
2898
- undefined,
2899
- { headers }
3015
+ requestHeaders,
3016
+ { responseHeaders }
2900
3017
  );
2901
3018
 
2902
3019
  let responseData = response;
2903
- if (headers) {
3020
+ if (responseHeaders) {
2904
3021
  responseData = response[0];
2905
3022
  }
2906
3023
 
@@ -2925,6 +3042,7 @@ class Cart {
2925
3042
  * @param {CartPlatformApplicationValidator.PlatformCheckoutCartParam} arg
2926
3043
  * - Arg object
2927
3044
  *
3045
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
2928
3046
  * @param {import("../PlatformAPIClient").Options} - Options
2929
3047
  * @returns {Promise<CartPlatformModel.CartCheckoutResponse>} - Success response
2930
3048
  * @name platformCheckoutCart
@@ -2932,8 +3050,8 @@ class Cart {
2932
3050
  * @description: Use this API to checkout all items in the cart for payment and order generation. For COD, order will be generated directly, whereas for other checkout modes, user will be redirected to a payment gateway. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/platformCheckoutCart/).
2933
3051
  */
2934
3052
  async platformCheckoutCart(
2935
- { body, id } = {},
2936
- { headers } = { headers: false }
3053
+ { body, id, requestHeaders } = { requestHeaders: {} },
3054
+ { responseHeaders } = { responseHeaders: false }
2937
3055
  ) {
2938
3056
  const {
2939
3057
  error,
@@ -2974,12 +3092,12 @@ class Cart {
2974
3092
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/checkout`,
2975
3093
  query_params,
2976
3094
  body,
2977
- undefined,
2978
- { headers }
3095
+ requestHeaders,
3096
+ { responseHeaders }
2979
3097
  );
2980
3098
 
2981
3099
  let responseData = response;
2982
- if (headers) {
3100
+ if (responseHeaders) {
2983
3101
  responseData = response[0];
2984
3102
  }
2985
3103
 
@@ -3004,6 +3122,7 @@ class Cart {
3004
3122
  * @param {CartPlatformApplicationValidator.PlatformCheckoutCartV2Param} arg
3005
3123
  * - Arg object
3006
3124
  *
3125
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3007
3126
  * @param {import("../PlatformAPIClient").Options} - Options
3008
3127
  * @returns {Promise<CartPlatformModel.CartCheckoutResponse>} - Success response
3009
3128
  * @name platformCheckoutCartV2
@@ -3011,8 +3130,8 @@ class Cart {
3011
3130
  * @description: Use this API to checkout all items in the cart for payment and order generation. For COD, order will be directly generated, whereas for other checkout modes, user will be redirected to a payment gateway. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/platformCheckoutCartV2/).
3012
3131
  */
3013
3132
  async platformCheckoutCartV2(
3014
- { body, id } = {},
3015
- { headers } = { headers: false }
3133
+ { body, id, requestHeaders } = { requestHeaders: {} },
3134
+ { responseHeaders } = { responseHeaders: false }
3016
3135
  ) {
3017
3136
  const {
3018
3137
  error,
@@ -3053,12 +3172,12 @@ class Cart {
3053
3172
  `/service/platform/cart/v2.0/company/${this.config.companyId}/application/${this.applicationId}/checkout`,
3054
3173
  query_params,
3055
3174
  body,
3056
- undefined,
3057
- { headers }
3175
+ requestHeaders,
3176
+ { responseHeaders }
3058
3177
  );
3059
3178
 
3060
3179
  let responseData = response;
3061
- if (headers) {
3180
+ if (responseHeaders) {
3062
3181
  responseData = response[0];
3063
3182
  }
3064
3183
 
@@ -3081,15 +3200,16 @@ class Cart {
3081
3200
 
3082
3201
  /**
3083
3202
  * @param {CartPlatformApplicationValidator.PlatformUpdateCartParam} arg - Arg object
3203
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3084
3204
  * @param {import("../PlatformAPIClient").Options} - Options
3085
3205
  * @returns {Promise<CartPlatformModel.UpdateCartDetailResponse>} - Success response
3086
3206
  * @name platformUpdateCart
3087
3207
  * @summary: Update items in the customer 's cart using cart id
3088
- * @description: <p>Use this API to update items added to the cart with the help of a request object containing attributes like item_quantity and item_size. These attributes will be fetched from the following APIs</p> <ul> <li><font color="monochrome">operation</font> Operation for current api call. <b>update_item</b> for update items. <b>remove_item</b> for removing items.</li> <li> <font color="monochrome">item_id</font> "/platform/content/v1/products/"</li> <li> <font color="monochrome">item_size</font> "/platform/content/v1/products/:slug/sizes/"</li> <li> <font color="monochrome">quantity</font> item quantity (must be greater than or equal to 1)</li> <li> <font color="monochrome">article_id</font> "/content​/v1​/products​/:identifier​/sizes​/price​/"</li> <li> <font color="monochrome">item_index</font> item position in the cart (must be greater than or equal to 0)</li> </ul> - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/platformUpdateCart/).
3208
+ * @description: Use this API to update items added to the cart with the help of a request object containing attributes like item_quantity and item_size. These attributes will be fetched from the following APIs operation Operation for current api call. update_item for update items. remove_item for removing items.item_id "/platform/content/v1/products/" item_size "/platform/content/v1/products/:slug/sizes/" quantity item quantity (must be greater than or equal to 1) article_id "/content​/v1​/products​/:identifier​/sizes​/price​/" item_index item position in the cart (must be greater than or equal to 0) - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/platformUpdateCart/).
3089
3209
  */
3090
3210
  async platformUpdateCart(
3091
- { body, id, i, b, buyNow } = {},
3092
- { headers } = { headers: false }
3211
+ { body, id, i, b, buyNow, requestHeaders } = { requestHeaders: {} },
3212
+ { responseHeaders } = { responseHeaders: false }
3093
3213
  ) {
3094
3214
  const {
3095
3215
  error,
@@ -3139,12 +3259,12 @@ class Cart {
3139
3259
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/detail`,
3140
3260
  query_params,
3141
3261
  body,
3142
- undefined,
3143
- { headers }
3262
+ requestHeaders,
3263
+ { responseHeaders }
3144
3264
  );
3145
3265
 
3146
3266
  let responseData = response;
3147
- if (headers) {
3267
+ if (responseHeaders) {
3148
3268
  responseData = response[0];
3149
3269
  }
3150
3270
 
@@ -3167,13 +3287,17 @@ class Cart {
3167
3287
 
3168
3288
  /**
3169
3289
  * @param {CartPlatformApplicationValidator.RemoveAddressParam} arg - Arg object
3290
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3170
3291
  * @param {import("../PlatformAPIClient").Options} - Options
3171
3292
  * @returns {Promise<CartPlatformModel.DeleteAddressResponse>} - Success response
3172
3293
  * @name removeAddress
3173
3294
  * @summary: Remove address associated with an account
3174
3295
  * @description: Use this API to delete an address by its ID. This will returns an object that will indicate whether the address was deleted successfully or not. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/removeAddress/).
3175
3296
  */
3176
- async removeAddress({ id, userId } = {}, { headers } = { headers: false }) {
3297
+ async removeAddress(
3298
+ { id, userId, requestHeaders } = { requestHeaders: {} },
3299
+ { responseHeaders } = { responseHeaders: false }
3300
+ ) {
3177
3301
  const { error } = CartPlatformApplicationValidator.removeAddress().validate(
3178
3302
  {
3179
3303
  id,
@@ -3211,12 +3335,12 @@ class Cart {
3211
3335
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/address/${id}`,
3212
3336
  query_params,
3213
3337
  undefined,
3214
- undefined,
3215
- { headers }
3338
+ requestHeaders,
3339
+ { responseHeaders }
3216
3340
  );
3217
3341
 
3218
3342
  let responseData = response;
3219
- if (headers) {
3343
+ if (responseHeaders) {
3220
3344
  responseData = response[0];
3221
3345
  }
3222
3346
 
@@ -3239,13 +3363,17 @@ class Cart {
3239
3363
 
3240
3364
  /**
3241
3365
  * @param {CartPlatformApplicationValidator.RemoveCouponParam} arg - Arg object
3366
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3242
3367
  * @param {import("../PlatformAPIClient").Options} - Options
3243
3368
  * @returns {Promise<CartPlatformModel.CartDetailResponse>} - Success response
3244
3369
  * @name removeCoupon
3245
3370
  * @summary: Remove Applied Coupon for platform pos user
3246
3371
  * @description: Remove Coupon applied on the cart by passing uid in request body. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/removeCoupon/).
3247
3372
  */
3248
- async removeCoupon({ uid, buyNow } = {}, { headers } = { headers: false }) {
3373
+ async removeCoupon(
3374
+ { uid, buyNow, requestHeaders } = { requestHeaders: {} },
3375
+ { responseHeaders } = { responseHeaders: false }
3376
+ ) {
3249
3377
  const { error } = CartPlatformApplicationValidator.removeCoupon().validate(
3250
3378
  {
3251
3379
  uid,
@@ -3284,12 +3412,12 @@ class Cart {
3284
3412
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/platform-pos-coupon`,
3285
3413
  query_params,
3286
3414
  undefined,
3287
- undefined,
3288
- { headers }
3415
+ requestHeaders,
3416
+ { responseHeaders }
3289
3417
  );
3290
3418
 
3291
3419
  let responseData = response;
3292
- if (headers) {
3420
+ if (responseHeaders) {
3293
3421
  responseData = response[0];
3294
3422
  }
3295
3423
 
@@ -3314,13 +3442,17 @@ class Cart {
3314
3442
  * @param {CartPlatformApplicationValidator.RemovePriceAdjustmentParam} arg
3315
3443
  * - Arg object
3316
3444
  *
3445
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3317
3446
  * @param {import("../PlatformAPIClient").Options} - Options
3318
3447
  * @returns {Promise<CartPlatformModel.SuccessMessage>} - Success response
3319
3448
  * @name removePriceAdjustment
3320
3449
  * @summary: Remove price adjustment
3321
3450
  * @description: Remove price adjustment - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/removePriceAdjustment/).
3322
3451
  */
3323
- async removePriceAdjustment({ id } = {}, { headers } = { headers: false }) {
3452
+ async removePriceAdjustment(
3453
+ { id, requestHeaders } = { requestHeaders: {} },
3454
+ { responseHeaders } = { responseHeaders: false }
3455
+ ) {
3324
3456
  const {
3325
3457
  error,
3326
3458
  } = CartPlatformApplicationValidator.removePriceAdjustment().validate(
@@ -3357,12 +3489,12 @@ class Cart {
3357
3489
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/price-adjustment/${id}`,
3358
3490
  query_params,
3359
3491
  undefined,
3360
- undefined,
3361
- { headers }
3492
+ requestHeaders,
3493
+ { responseHeaders }
3362
3494
  );
3363
3495
 
3364
3496
  let responseData = response;
3365
- if (headers) {
3497
+ if (responseHeaders) {
3366
3498
  responseData = response[0];
3367
3499
  }
3368
3500
 
@@ -3385,15 +3517,16 @@ class Cart {
3385
3517
 
3386
3518
  /**
3387
3519
  * @param {CartPlatformApplicationValidator.SelectAddressParam} arg - Arg object
3520
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3388
3521
  * @param {import("../PlatformAPIClient").Options} - Options
3389
3522
  * @returns {Promise<CartPlatformModel.CartDetailResponse>} - Success response
3390
3523
  * @name selectAddress
3391
3524
  * @summary: Select an address from available addresses
3392
- * @description: <p>Select Address from all addresses associated with the account in order to ship the cart items to that address, otherwise default address will be selected implicitly. See `PlatformSelectCartAddressRequest` in schema of request body for the list of attributes needed to select Address from account. On successful request, this API returns a Cart object. Below address attributes are required. <ul> <li> <font color="monochrome">address_id</font></li> <li> <font color="monochrome">billing_address_id</font></li> <li> <font color="monochrome">uid</font></li> </ul></p> - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/selectAddress/).
3525
+ * @description: Select Address from all addresses associated with the account in order to ship the cart items to that address, otherwise default address will be selected implicitly. See `PlatformSelectCartAddressRequest` in schema of request body for the list of attributes needed to select Address from account. On successful request, this API returns a Cart object. Below address attributes are required. address_id billing_address_id uid - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/selectAddress/).
3393
3526
  */
3394
3527
  async selectAddress(
3395
- { body, cartId, buyNow, i, b } = {},
3396
- { headers } = { headers: false }
3528
+ { body, cartId, buyNow, i, b, requestHeaders } = { requestHeaders: {} },
3529
+ { responseHeaders } = { responseHeaders: false }
3397
3530
  ) {
3398
3531
  const { error } = CartPlatformApplicationValidator.selectAddress().validate(
3399
3532
  {
@@ -3441,12 +3574,12 @@ class Cart {
3441
3574
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/select-address`,
3442
3575
  query_params,
3443
3576
  body,
3444
- undefined,
3445
- { headers }
3577
+ requestHeaders,
3578
+ { responseHeaders }
3446
3579
  );
3447
3580
 
3448
3581
  let responseData = response;
3449
- if (headers) {
3582
+ if (responseHeaders) {
3450
3583
  responseData = response[0];
3451
3584
  }
3452
3585
 
@@ -3469,6 +3602,7 @@ class Cart {
3469
3602
 
3470
3603
  /**
3471
3604
  * @param {CartPlatformApplicationValidator.SelectPaymentModeParam} arg - Arg object
3605
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3472
3606
  * @param {import("../PlatformAPIClient").Options} - Options
3473
3607
  * @returns {Promise<CartPlatformModel.CartDetailResponse>} - Success response
3474
3608
  * @name selectPaymentMode
@@ -3476,8 +3610,8 @@ class Cart {
3476
3610
  * @description: Use this API to update cart payment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/selectPaymentMode/).
3477
3611
  */
3478
3612
  async selectPaymentMode(
3479
- { body, id, buyNow, orderType } = {},
3480
- { headers } = { headers: false }
3613
+ { body, id, buyNow, orderType, requestHeaders } = { requestHeaders: {} },
3614
+ { responseHeaders } = { responseHeaders: false }
3481
3615
  ) {
3482
3616
  const {
3483
3617
  error,
@@ -3524,12 +3658,12 @@ class Cart {
3524
3658
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment`,
3525
3659
  query_params,
3526
3660
  body,
3527
- undefined,
3528
- { headers }
3661
+ requestHeaders,
3662
+ { responseHeaders }
3529
3663
  );
3530
3664
 
3531
3665
  let responseData = response;
3532
- if (headers) {
3666
+ if (responseHeaders) {
3533
3667
  responseData = response[0];
3534
3668
  }
3535
3669
 
@@ -3552,6 +3686,7 @@ class Cart {
3552
3686
 
3553
3687
  /**
3554
3688
  * @param {CartPlatformApplicationValidator.SelectPaymentModeV2Param} arg - Arg object
3689
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3555
3690
  * @param {import("../PlatformAPIClient").Options} - Options
3556
3691
  * @returns {Promise<CartPlatformModel.CartDetailResponse>} - Success response
3557
3692
  * @name selectPaymentModeV2
@@ -3559,8 +3694,8 @@ class Cart {
3559
3694
  * @description: Use this API to update cart payment. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/selectPaymentModeV2/).
3560
3695
  */
3561
3696
  async selectPaymentModeV2(
3562
- { body, id, buyNow, orderType } = {},
3563
- { headers } = { headers: false }
3697
+ { body, id, buyNow, orderType, requestHeaders } = { requestHeaders: {} },
3698
+ { responseHeaders } = { responseHeaders: false }
3564
3699
  ) {
3565
3700
  const {
3566
3701
  error,
@@ -3607,12 +3742,12 @@ class Cart {
3607
3742
  `/service/platform/cart/v2.0/company/${this.config.companyId}/application/${this.applicationId}/payment`,
3608
3743
  query_params,
3609
3744
  body,
3610
- undefined,
3611
- { headers }
3745
+ requestHeaders,
3746
+ { responseHeaders }
3612
3747
  );
3613
3748
 
3614
3749
  let responseData = response;
3615
- if (headers) {
3750
+ if (responseHeaders) {
3616
3751
  responseData = response[0];
3617
3752
  }
3618
3753
 
@@ -3635,13 +3770,17 @@ class Cart {
3635
3770
 
3636
3771
  /**
3637
3772
  * @param {CartPlatformApplicationValidator.UpdateAddressParam} arg - Arg object
3773
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3638
3774
  * @param {import("../PlatformAPIClient").Options} - Options
3639
3775
  * @returns {Promise<CartPlatformModel.UpdateAddressResponse>} - Success response
3640
3776
  * @name updateAddress
3641
3777
  * @summary: Update address added to an account
3642
- * @description: <p>Use this API to update an existing address in the account. Request object should contain attributes mentioned in <font color="blue">Address </font> can be updated. These attributes are:</p> <ul> <li> <font color="monochrome">is_default_address</font></li> <li> <font color="monochrome">landmark</font></li> <li> <font color="monochrome">area</font></li> <li> <font color="monochrome">pincode</font></li> <li> <font color="monochrome">email</font></li> <li> <font color="monochrome">address_type</font></li> <li> <font color="monochrome">name</font></li> <li> <font color="monochrome">address_id</font></li> <li> <font color="monochrome">address</font></li> </ul> - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateAddress/).
3778
+ * @description: Use this API to update an existing address in the account. Request object should contain attributes mentioned in Address can be updated. These attributes are:is_default_address landmark area pincode email address_type name address_id address - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateAddress/).
3643
3779
  */
3644
- async updateAddress({ id, body } = {}, { headers } = { headers: false }) {
3780
+ async updateAddress(
3781
+ { id, body, requestHeaders } = { requestHeaders: {} },
3782
+ { responseHeaders } = { responseHeaders: false }
3783
+ ) {
3645
3784
  const { error } = CartPlatformApplicationValidator.updateAddress().validate(
3646
3785
  {
3647
3786
  id,
@@ -3678,12 +3817,12 @@ class Cart {
3678
3817
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/address/${id}`,
3679
3818
  query_params,
3680
3819
  body,
3681
- undefined,
3682
- { headers }
3820
+ requestHeaders,
3821
+ { responseHeaders }
3683
3822
  );
3684
3823
 
3685
3824
  let responseData = response;
3686
- if (headers) {
3825
+ if (responseHeaders) {
3687
3826
  responseData = response[0];
3688
3827
  }
3689
3828
 
@@ -3706,13 +3845,17 @@ class Cart {
3706
3845
 
3707
3846
  /**
3708
3847
  * @param {CartPlatformApplicationValidator.UpdateCartParam} arg - Arg object
3848
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3709
3849
  * @param {import("../PlatformAPIClient").Options} - Options
3710
3850
  * @returns {Promise<CartPlatformModel.UpdateCartDetailResponse>} - Success response
3711
3851
  * @name updateCart
3712
3852
  * @summary: Update items in the abandoned cart
3713
- * @description: <p>Use this API to update items added to the cart with the help of a request object containing attributes like item_quantity and item_size. These attributes will be fetched from the following APIs</p> <ul> <li><font color="monochrome">operation</font> Operation for current api call. <b>update_item</b> for update items. <b>remove_item</b> for removing items.</li> <li> <font color="monochrome">item_id</font> "/platform/content/v1/products/"</li> <li> <font color="monochrome">item_size</font> "/platform/content/v1/products/:slug/sizes/"</li> <li> <font color="monochrome">quantity</font> item quantity (must be greater than or equal to 1)</li> <li> <font color="monochrome">article_id</font> "/content​/v1​/products​/:identifier​/sizes​/price​/"</li> <li> <font color="monochrome">item_index</font> item position in the cart (must be greater than or equal to 0)</li> </ul> - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCart/).
3853
+ * @description: Use this API to update items added to the cart with the help of a request object containing attributes like item_quantity and item_size. These attributes will be fetched from the following APIs operation Operation for current api call.update_item for update items. remove_item for removing items. item_id "/platform/content/v1/products/" "/platform/content/v1/products/:slug/sizes/" quantity item quantity (must be greater than or equal to 1) article_id "/content​/v1​/products​/:identifier​/sizes​/price​/" item position in the cart (must be greater than or equal to 0) - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCart/).
3714
3854
  */
3715
- async updateCart({ cartId, body, b } = {}, { headers } = { headers: false }) {
3855
+ async updateCart(
3856
+ { cartId, body, b, requestHeaders } = { requestHeaders: {} },
3857
+ { responseHeaders } = { responseHeaders: false }
3858
+ ) {
3716
3859
  const { error } = CartPlatformApplicationValidator.updateCart().validate(
3717
3860
  {
3718
3861
  cartId,
@@ -3752,12 +3895,12 @@ class Cart {
3752
3895
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/abandoned/carts/${cartId}`,
3753
3896
  query_params,
3754
3897
  body,
3755
- undefined,
3756
- { headers }
3898
+ requestHeaders,
3899
+ { responseHeaders }
3757
3900
  );
3758
3901
 
3759
3902
  let responseData = response;
3760
- if (headers) {
3903
+ if (responseHeaders) {
3761
3904
  responseData = response[0];
3762
3905
  }
3763
3906
 
@@ -3780,6 +3923,7 @@ class Cart {
3780
3923
 
3781
3924
  /**
3782
3925
  * @param {CartPlatformApplicationValidator.UpdateCartMetaParam} arg - Arg object
3926
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3783
3927
  * @param {import("../PlatformAPIClient").Options} - Options
3784
3928
  * @returns {Promise<CartPlatformModel.CartMetaResponse>} - Success response
3785
3929
  * @name updateCartMeta
@@ -3787,8 +3931,8 @@ class Cart {
3787
3931
  * @description: Use this API to update cart meta like checkout_mode and gstin. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCartMeta/).
3788
3932
  */
3789
3933
  async updateCartMeta(
3790
- { body, id, buyNow } = {},
3791
- { headers } = { headers: false }
3934
+ { body, id, buyNow, requestHeaders } = { requestHeaders: {} },
3935
+ { responseHeaders } = { responseHeaders: false }
3792
3936
  ) {
3793
3937
  const {
3794
3938
  error,
@@ -3832,12 +3976,12 @@ class Cart {
3832
3976
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/meta`,
3833
3977
  query_params,
3834
3978
  body,
3835
- undefined,
3836
- { headers }
3979
+ requestHeaders,
3980
+ { responseHeaders }
3837
3981
  );
3838
3982
 
3839
3983
  let responseData = response;
3840
- if (headers) {
3984
+ if (responseHeaders) {
3841
3985
  responseData = response[0];
3842
3986
  }
3843
3987
 
@@ -3862,6 +4006,7 @@ class Cart {
3862
4006
  * @param {CartPlatformApplicationValidator.UpdateCartMetaConfigParam} arg
3863
4007
  * - Arg object
3864
4008
  *
4009
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3865
4010
  * @param {import("../PlatformAPIClient").Options} - Options
3866
4011
  * @returns {Promise<CartPlatformModel.CartMetaConfigUpdate>} - Success response
3867
4012
  * @name updateCartMetaConfig
@@ -3869,8 +4014,8 @@ class Cart {
3869
4014
  * @description: Update cart meta configuration - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCartMetaConfig/).
3870
4015
  */
3871
4016
  async updateCartMetaConfig(
3872
- { cartMetaId, body } = {},
3873
- { headers } = { headers: false }
4017
+ { cartMetaId, body, requestHeaders } = { requestHeaders: {} },
4018
+ { responseHeaders } = { responseHeaders: false }
3874
4019
  ) {
3875
4020
  const {
3876
4021
  error,
@@ -3910,12 +4055,12 @@ class Cart {
3910
4055
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/cart_configuration/${cartMetaId}`,
3911
4056
  query_params,
3912
4057
  body,
3913
- undefined,
3914
- { headers }
4058
+ requestHeaders,
4059
+ { responseHeaders }
3915
4060
  );
3916
4061
 
3917
4062
  let responseData = response;
3918
- if (headers) {
4063
+ if (responseHeaders) {
3919
4064
  responseData = response[0];
3920
4065
  }
3921
4066
 
@@ -3938,13 +4083,17 @@ class Cart {
3938
4083
 
3939
4084
  /**
3940
4085
  * @param {CartPlatformApplicationValidator.UpdateCartUserParam} arg - Arg object
4086
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
3941
4087
  * @param {import("../PlatformAPIClient").Options} - Options
3942
4088
  * @returns {Promise<CartPlatformModel.UserCartMappingResponse>} - Success response
3943
4089
  * @name updateCartUser
3944
4090
  * @summary: Update user id for store os customer
3945
4091
  * @description: Update user id for store os customer after creating customer - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCartUser/).
3946
4092
  */
3947
- async updateCartUser({ body, id } = {}, { headers } = { headers: false }) {
4093
+ async updateCartUser(
4094
+ { body, id, requestHeaders } = { requestHeaders: {} },
4095
+ { responseHeaders } = { responseHeaders: false }
4096
+ ) {
3948
4097
  const {
3949
4098
  error,
3950
4099
  } = CartPlatformApplicationValidator.updateCartUser().validate(
@@ -3984,12 +4133,12 @@ class Cart {
3984
4133
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/update-user`,
3985
4134
  query_params,
3986
4135
  body,
3987
- undefined,
3988
- { headers }
4136
+ requestHeaders,
4137
+ { responseHeaders }
3989
4138
  );
3990
4139
 
3991
4140
  let responseData = response;
3992
- if (headers) {
4141
+ if (responseHeaders) {
3993
4142
  responseData = response[0];
3994
4143
  }
3995
4144
 
@@ -4014,6 +4163,7 @@ class Cart {
4014
4163
  * @param {CartPlatformApplicationValidator.UpdateCartWithSharedItemsParam} arg
4015
4164
  * - Arg object
4016
4165
  *
4166
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4017
4167
  * @param {import("../PlatformAPIClient").Options} - Options
4018
4168
  * @returns {Promise<CartPlatformModel.SharedCartResponse>} - Success response
4019
4169
  * @name updateCartWithSharedItems
@@ -4021,8 +4171,8 @@ class Cart {
4021
4171
  * @description: Use this API to merge the shared cart with existing cart, or replace the existing cart with the shared cart. The `action` parameter is used to indicate the operation Merge or Replace. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCartWithSharedItems/).
4022
4172
  */
4023
4173
  async updateCartWithSharedItems(
4024
- { token, action, cartId } = {},
4025
- { headers } = { headers: false }
4174
+ { token, action, cartId, requestHeaders } = { requestHeaders: {} },
4175
+ { responseHeaders } = { responseHeaders: false }
4026
4176
  ) {
4027
4177
  const {
4028
4178
  error,
@@ -4065,12 +4215,12 @@ class Cart {
4065
4215
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/share-cart/${token}/${action}`,
4066
4216
  query_params,
4067
4217
  undefined,
4068
- undefined,
4069
- { headers }
4218
+ requestHeaders,
4219
+ { responseHeaders }
4070
4220
  );
4071
4221
 
4072
4222
  let responseData = response;
4073
- if (headers) {
4223
+ if (responseHeaders) {
4074
4224
  responseData = response[0];
4075
4225
  }
4076
4226
 
@@ -4093,13 +4243,17 @@ class Cart {
4093
4243
 
4094
4244
  /**
4095
4245
  * @param {CartPlatformApplicationValidator.UpdateCouponParam} arg - Arg object
4246
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4096
4247
  * @param {import("../PlatformAPIClient").Options} - Options
4097
4248
  * @returns {Promise<CartPlatformModel.SuccessMessage>} - Success response
4098
4249
  * @name updateCoupon
4099
4250
  * @summary: Update existing coupon configuration
4100
4251
  * @description: Update coupon with id sent in `id` - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCoupon/).
4101
4252
  */
4102
- async updateCoupon({ id, body } = {}, { headers } = { headers: false }) {
4253
+ async updateCoupon(
4254
+ { id, body, requestHeaders } = { requestHeaders: {} },
4255
+ { responseHeaders } = { responseHeaders: false }
4256
+ ) {
4103
4257
  const { error } = CartPlatformApplicationValidator.updateCoupon().validate(
4104
4258
  {
4105
4259
  id,
@@ -4136,12 +4290,12 @@ class Cart {
4136
4290
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/coupon/${id}`,
4137
4291
  query_params,
4138
4292
  body,
4139
- undefined,
4140
- { headers }
4293
+ requestHeaders,
4294
+ { responseHeaders }
4141
4295
  );
4142
4296
 
4143
4297
  let responseData = response;
4144
- if (headers) {
4298
+ if (responseHeaders) {
4145
4299
  responseData = response[0];
4146
4300
  }
4147
4301
 
@@ -4166,6 +4320,7 @@ class Cart {
4166
4320
  * @param {CartPlatformApplicationValidator.UpdateCouponPartiallyParam} arg
4167
4321
  * - Arg object
4168
4322
  *
4323
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4169
4324
  * @param {import("../PlatformAPIClient").Options} - Options
4170
4325
  * @returns {Promise<CartPlatformModel.SuccessMessage>} - Success response
4171
4326
  * @name updateCouponPartially
@@ -4173,8 +4328,8 @@ class Cart {
4173
4328
  * @description: Update archive/unarchive and change schedule for coupon - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateCouponPartially/).
4174
4329
  */
4175
4330
  async updateCouponPartially(
4176
- { id, body } = {},
4177
- { headers } = { headers: false }
4331
+ { id, body, requestHeaders } = { requestHeaders: {} },
4332
+ { responseHeaders } = { responseHeaders: false }
4178
4333
  ) {
4179
4334
  const {
4180
4335
  error,
@@ -4214,12 +4369,12 @@ class Cart {
4214
4369
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/coupon/${id}`,
4215
4370
  query_params,
4216
4371
  body,
4217
- undefined,
4218
- { headers }
4372
+ requestHeaders,
4373
+ { responseHeaders }
4219
4374
  );
4220
4375
 
4221
4376
  let responseData = response;
4222
- if (headers) {
4377
+ if (responseHeaders) {
4223
4378
  responseData = response[0];
4224
4379
  }
4225
4380
 
@@ -4244,6 +4399,7 @@ class Cart {
4244
4399
  * @param {CartPlatformApplicationValidator.UpdatePriceAdjustmentParam} arg
4245
4400
  * - Arg object
4246
4401
  *
4402
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4247
4403
  * @param {import("../PlatformAPIClient").Options} - Options
4248
4404
  * @returns {Promise<CartPlatformModel.PriceAdjustmentResponse>} - Success response
4249
4405
  * @name updatePriceAdjustment
@@ -4251,8 +4407,8 @@ class Cart {
4251
4407
  * @description: Update price adjustment configuration - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updatePriceAdjustment/).
4252
4408
  */
4253
4409
  async updatePriceAdjustment(
4254
- { id, body } = {},
4255
- { headers } = { headers: false }
4410
+ { id, body, requestHeaders } = { requestHeaders: {} },
4411
+ { responseHeaders } = { responseHeaders: false }
4256
4412
  ) {
4257
4413
  const {
4258
4414
  error,
@@ -4292,12 +4448,12 @@ class Cart {
4292
4448
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/price-adjustment/${id}`,
4293
4449
  query_params,
4294
4450
  body,
4295
- undefined,
4296
- { headers }
4451
+ requestHeaders,
4452
+ { responseHeaders }
4297
4453
  );
4298
4454
 
4299
4455
  let responseData = response;
4300
- if (headers) {
4456
+ if (responseHeaders) {
4301
4457
  responseData = response[0];
4302
4458
  }
4303
4459
 
@@ -4320,13 +4476,17 @@ class Cart {
4320
4476
 
4321
4477
  /**
4322
4478
  * @param {CartPlatformApplicationValidator.UpdatePromotionParam} arg - Arg object
4479
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4323
4480
  * @param {import("../PlatformAPIClient").Options} - Options
4324
4481
  * @returns {Promise<CartPlatformModel.PromotionUpdate>} - Success response
4325
4482
  * @name updatePromotion
4326
4483
  * @summary: Update existing promotion configuration
4327
4484
  * @description: Update promotion with id sent in `id` - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updatePromotion/).
4328
4485
  */
4329
- async updatePromotion({ id, body } = {}, { headers } = { headers: false }) {
4486
+ async updatePromotion(
4487
+ { id, body, requestHeaders } = { requestHeaders: {} },
4488
+ { responseHeaders } = { responseHeaders: false }
4489
+ ) {
4330
4490
  const {
4331
4491
  error,
4332
4492
  } = CartPlatformApplicationValidator.updatePromotion().validate(
@@ -4365,12 +4525,12 @@ class Cart {
4365
4525
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/promotion/${id}`,
4366
4526
  query_params,
4367
4527
  body,
4368
- undefined,
4369
- { headers }
4528
+ requestHeaders,
4529
+ { responseHeaders }
4370
4530
  );
4371
4531
 
4372
4532
  let responseData = response;
4373
- if (headers) {
4533
+ if (responseHeaders) {
4374
4534
  responseData = response[0];
4375
4535
  }
4376
4536
 
@@ -4395,6 +4555,7 @@ class Cart {
4395
4555
  * @param {CartPlatformApplicationValidator.UpdatePromotionPartiallyParam} arg
4396
4556
  * - Arg object
4397
4557
  *
4558
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4398
4559
  * @param {import("../PlatformAPIClient").Options} - Options
4399
4560
  * @returns {Promise<CartPlatformModel.SuccessMessage>} - Success response
4400
4561
  * @name updatePromotionPartially
@@ -4402,8 +4563,8 @@ class Cart {
4402
4563
  * @description: Update publish/unpublish and change schedule for promotion - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updatePromotionPartially/).
4403
4564
  */
4404
4565
  async updatePromotionPartially(
4405
- { id, body } = {},
4406
- { headers } = { headers: false }
4566
+ { id, body, requestHeaders } = { requestHeaders: {} },
4567
+ { responseHeaders } = { responseHeaders: false }
4407
4568
  ) {
4408
4569
  const {
4409
4570
  error,
@@ -4443,12 +4604,12 @@ class Cart {
4443
4604
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/promotion/${id}`,
4444
4605
  query_params,
4445
4606
  body,
4446
- undefined,
4447
- { headers }
4607
+ requestHeaders,
4608
+ { responseHeaders }
4448
4609
  );
4449
4610
 
4450
4611
  let responseData = response;
4451
- if (headers) {
4612
+ if (responseHeaders) {
4452
4613
  responseData = response[0];
4453
4614
  }
4454
4615
 
@@ -4471,6 +4632,7 @@ class Cart {
4471
4632
 
4472
4633
  /**
4473
4634
  * @param {CartPlatformApplicationValidator.UpdateShipmentsParam} arg - Arg object
4635
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4474
4636
  * @param {import("../PlatformAPIClient").Options} - Options
4475
4637
  * @returns {Promise<CartPlatformModel.PlatformCartShipmentsResponse>} -
4476
4638
  * Success response
@@ -4479,8 +4641,10 @@ class Cart {
4479
4641
  * @description: Use this API to update the delivery type and quantity as per customer's preference for either store pick-up or home-delivery. - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/cart/updateShipments/).
4480
4642
  */
4481
4643
  async updateShipments(
4482
- { body, i, p, id, addressId, areaCode, orderType } = {},
4483
- { headers } = { headers: false }
4644
+ { body, i, p, id, addressId, areaCode, orderType, requestHeaders } = {
4645
+ requestHeaders: {},
4646
+ },
4647
+ { responseHeaders } = { responseHeaders: false }
4484
4648
  ) {
4485
4649
  const {
4486
4650
  error,
@@ -4536,12 +4700,12 @@ class Cart {
4536
4700
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/shipment`,
4537
4701
  query_params,
4538
4702
  body,
4539
- undefined,
4540
- { headers }
4703
+ requestHeaders,
4704
+ { responseHeaders }
4541
4705
  );
4542
4706
 
4543
4707
  let responseData = response;
4544
- if (headers) {
4708
+ if (responseHeaders) {
4545
4709
  responseData = response[0];
4546
4710
  }
4547
4711
 
@@ -4566,6 +4730,7 @@ class Cart {
4566
4730
  * @param {CartPlatformApplicationValidator.ValidateCouponForPaymentParam} arg
4567
4731
  * - Arg object
4568
4732
  *
4733
+ * @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
4569
4734
  * @param {import("../PlatformAPIClient").Options} - Options
4570
4735
  * @returns {Promise<CartPlatformModel.PaymentCouponValidate>} - Success response
4571
4736
  * @name validateCouponForPayment
@@ -4581,8 +4746,9 @@ class Cart {
4581
4746
  paymentIdentifier,
4582
4747
  aggregatorName,
4583
4748
  merchantCode,
4584
- } = {},
4585
- { headers } = { headers: false }
4749
+ requestHeaders,
4750
+ } = { requestHeaders: {} },
4751
+ { responseHeaders } = { responseHeaders: false }
4586
4752
  ) {
4587
4753
  const {
4588
4754
  error,
@@ -4639,12 +4805,12 @@ class Cart {
4639
4805
  `/service/platform/cart/v1.0/company/${this.config.companyId}/application/${this.applicationId}/payment/validate/`,
4640
4806
  query_params,
4641
4807
  undefined,
4642
- undefined,
4643
- { headers }
4808
+ requestHeaders,
4809
+ { responseHeaders }
4644
4810
  );
4645
4811
 
4646
4812
  let responseData = response;
4647
- if (headers) {
4813
+ if (responseHeaders) {
4648
4814
  responseData = response[0];
4649
4815
  }
4650
4816