@gradientedge/commercetools-utils 5.27.2 → 5.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (393) hide show
  1. package/dist/cjs/types/models/approval-flow.d.ts +264 -0
  2. package/dist/cjs/types/models/approval-flow.d.ts.map +1 -0
  3. package/dist/cjs/types/models/approval-flow.js +8 -0
  4. package/dist/cjs/types/models/approval-flow.js.map +1 -0
  5. package/dist/cjs/types/models/approval-rule.d.ts +415 -0
  6. package/dist/cjs/types/models/approval-rule.d.ts.map +1 -0
  7. package/dist/cjs/types/models/approval-rule.js +8 -0
  8. package/dist/cjs/types/models/approval-rule.js.map +1 -0
  9. package/dist/cjs/types/models/associate-role.d.ts +319 -0
  10. package/dist/cjs/types/models/associate-role.d.ts.map +1 -0
  11. package/dist/cjs/types/models/associate-role.js +8 -0
  12. package/dist/cjs/types/models/associate-role.js.map +1 -0
  13. package/dist/cjs/types/models/attribute-group.d.ts +254 -0
  14. package/dist/cjs/types/models/attribute-group.d.ts.map +1 -0
  15. package/dist/cjs/types/models/attribute-group.js +8 -0
  16. package/dist/cjs/types/models/attribute-group.js.map +1 -0
  17. package/dist/cjs/types/models/business-unit.d.ts +1244 -0
  18. package/dist/cjs/types/models/business-unit.d.ts.map +1 -0
  19. package/dist/cjs/types/models/business-unit.js +8 -0
  20. package/dist/cjs/types/models/business-unit.js.map +1 -0
  21. package/dist/cjs/types/models/cart-discount.d.ts +848 -0
  22. package/dist/cjs/types/models/cart-discount.d.ts.map +1 -0
  23. package/dist/cjs/types/models/cart-discount.js +8 -0
  24. package/dist/cjs/types/models/cart-discount.js.map +1 -0
  25. package/dist/cjs/types/models/cart.d.ts +3593 -0
  26. package/dist/cjs/types/models/cart.d.ts.map +1 -0
  27. package/dist/cjs/types/models/cart.js +8 -0
  28. package/dist/cjs/types/models/cart.js.map +1 -0
  29. package/dist/cjs/types/models/category.d.ts +636 -0
  30. package/dist/cjs/types/models/category.d.ts.map +1 -0
  31. package/dist/cjs/types/models/category.js +8 -0
  32. package/dist/cjs/types/models/category.js.map +1 -0
  33. package/dist/cjs/types/models/channel.d.ts +380 -0
  34. package/dist/cjs/types/models/channel.d.ts.map +1 -0
  35. package/dist/cjs/types/models/channel.js +8 -0
  36. package/dist/cjs/types/models/channel.js.map +1 -0
  37. package/dist/cjs/types/models/common.d.ts +1163 -0
  38. package/dist/cjs/types/models/common.d.ts.map +1 -0
  39. package/dist/cjs/types/models/common.js +8 -0
  40. package/dist/cjs/types/models/common.js.map +1 -0
  41. package/dist/cjs/types/models/custom-object.d.ts +152 -0
  42. package/dist/cjs/types/models/custom-object.d.ts.map +1 -0
  43. package/dist/cjs/types/models/custom-object.js +8 -0
  44. package/dist/cjs/types/models/custom-object.js.map +1 -0
  45. package/dist/cjs/types/models/customer-group.d.ts +235 -0
  46. package/dist/cjs/types/models/customer-group.d.ts.map +1 -0
  47. package/dist/cjs/types/models/customer-group.js +8 -0
  48. package/dist/cjs/types/models/customer-group.js.map +1 -0
  49. package/dist/cjs/types/models/customer-search.d.ts +114 -0
  50. package/dist/cjs/types/models/customer-search.d.ts.map +1 -0
  51. package/dist/cjs/types/models/customer-search.js +8 -0
  52. package/dist/cjs/types/models/customer-search.js.map +1 -0
  53. package/dist/cjs/types/models/customer.d.ts +1270 -0
  54. package/dist/cjs/types/models/customer.d.ts.map +1 -0
  55. package/dist/cjs/types/models/customer.js +8 -0
  56. package/dist/cjs/types/models/customer.js.map +1 -0
  57. package/dist/cjs/types/models/discount-code.d.ts +473 -0
  58. package/dist/cjs/types/models/discount-code.d.ts.map +1 -0
  59. package/dist/cjs/types/models/discount-code.js +8 -0
  60. package/dist/cjs/types/models/discount-code.js.map +1 -0
  61. package/dist/cjs/types/models/error.d.ts +3330 -0
  62. package/dist/cjs/types/models/error.d.ts.map +1 -0
  63. package/dist/cjs/types/models/error.js +8 -0
  64. package/dist/cjs/types/models/error.js.map +1 -0
  65. package/dist/cjs/types/models/extension.d.ts +336 -0
  66. package/dist/cjs/types/models/extension.d.ts.map +1 -0
  67. package/dist/cjs/types/models/extension.js +8 -0
  68. package/dist/cjs/types/models/extension.js.map +1 -0
  69. package/dist/cjs/types/models/index.d.ts +48 -0
  70. package/dist/cjs/types/models/index.d.ts.map +1 -0
  71. package/dist/cjs/types/models/index.js +64 -0
  72. package/dist/cjs/types/models/index.js.map +1 -0
  73. package/dist/cjs/types/models/inventory.d.ts +330 -0
  74. package/dist/cjs/types/models/inventory.d.ts.map +1 -0
  75. package/dist/cjs/types/models/inventory.js +8 -0
  76. package/dist/cjs/types/models/inventory.js.map +1 -0
  77. package/dist/cjs/types/models/me.d.ts +2636 -0
  78. package/dist/cjs/types/models/me.d.ts.map +1 -0
  79. package/dist/cjs/types/models/me.js +8 -0
  80. package/dist/cjs/types/models/me.js.map +1 -0
  81. package/dist/cjs/types/models/message.d.ts +23707 -0
  82. package/dist/cjs/types/models/message.d.ts.map +1 -0
  83. package/dist/cjs/types/models/message.js +8 -0
  84. package/dist/cjs/types/models/message.js.map +1 -0
  85. package/dist/cjs/types/models/order-edit.d.ts +2725 -0
  86. package/dist/cjs/types/models/order-edit.d.ts.map +1 -0
  87. package/dist/cjs/types/models/order-edit.js +8 -0
  88. package/dist/cjs/types/models/order-edit.js.map +1 -0
  89. package/dist/cjs/types/models/order.d.ts +3187 -0
  90. package/dist/cjs/types/models/order.d.ts.map +1 -0
  91. package/dist/cjs/types/models/order.js +8 -0
  92. package/dist/cjs/types/models/order.js.map +1 -0
  93. package/dist/cjs/types/models/payment.d.ts +680 -0
  94. package/dist/cjs/types/models/payment.d.ts.map +1 -0
  95. package/dist/cjs/types/models/payment.js +8 -0
  96. package/dist/cjs/types/models/payment.js.map +1 -0
  97. package/dist/cjs/types/models/product-discount.d.ts +465 -0
  98. package/dist/cjs/types/models/product-discount.d.ts.map +1 -0
  99. package/dist/cjs/types/models/product-discount.js +8 -0
  100. package/dist/cjs/types/models/product-discount.js.map +1 -0
  101. package/dist/cjs/types/models/product-search.d.ts +437 -0
  102. package/dist/cjs/types/models/product-search.d.ts.map +1 -0
  103. package/dist/cjs/types/models/product-search.js +8 -0
  104. package/dist/cjs/types/models/product-search.js.map +1 -0
  105. package/dist/cjs/types/models/product-selection.d.ts +579 -0
  106. package/dist/cjs/types/models/product-selection.d.ts.map +1 -0
  107. package/dist/cjs/types/models/product-selection.js +8 -0
  108. package/dist/cjs/types/models/product-selection.js.map +1 -0
  109. package/dist/cjs/types/models/product-tailoring.d.ts +1368 -0
  110. package/dist/cjs/types/models/product-tailoring.d.ts.map +1 -0
  111. package/dist/cjs/types/models/product-tailoring.js +8 -0
  112. package/dist/cjs/types/models/product-tailoring.js.map +1 -0
  113. package/dist/cjs/types/models/product-type.d.ts +775 -0
  114. package/dist/cjs/types/models/product-type.d.ts.map +1 -0
  115. package/dist/cjs/types/models/product-type.js +8 -0
  116. package/dist/cjs/types/models/product-type.js.map +1 -0
  117. package/dist/cjs/types/models/product.d.ts +2314 -0
  118. package/dist/cjs/types/models/product.d.ts.map +1 -0
  119. package/dist/cjs/types/models/product.js +8 -0
  120. package/dist/cjs/types/models/product.js.map +1 -0
  121. package/dist/cjs/types/models/project.d.ts +418 -0
  122. package/dist/cjs/types/models/project.d.ts.map +1 -0
  123. package/dist/cjs/types/models/project.js +8 -0
  124. package/dist/cjs/types/models/project.js.map +1 -0
  125. package/dist/cjs/types/models/quote-request.d.ts +452 -0
  126. package/dist/cjs/types/models/quote-request.d.ts.map +1 -0
  127. package/dist/cjs/types/models/quote-request.js +8 -0
  128. package/dist/cjs/types/models/quote-request.js.map +1 -0
  129. package/dist/cjs/types/models/quote.d.ts +473 -0
  130. package/dist/cjs/types/models/quote.d.ts.map +1 -0
  131. package/dist/cjs/types/models/quote.js +8 -0
  132. package/dist/cjs/types/models/quote.js.map +1 -0
  133. package/dist/cjs/types/models/review.d.ts +435 -0
  134. package/dist/cjs/types/models/review.d.ts.map +1 -0
  135. package/dist/cjs/types/models/review.js +8 -0
  136. package/dist/cjs/types/models/review.js.map +1 -0
  137. package/dist/cjs/types/models/scalar-types.d.ts +10 -0
  138. package/dist/cjs/types/models/scalar-types.d.ts.map +1 -0
  139. package/dist/cjs/types/models/scalar-types.js +8 -0
  140. package/dist/cjs/types/models/scalar-types.js.map +1 -0
  141. package/dist/cjs/types/models/search.d.ts +334 -0
  142. package/dist/cjs/types/models/search.d.ts.map +1 -0
  143. package/dist/cjs/types/models/search.js +8 -0
  144. package/dist/cjs/types/models/search.js.map +1 -0
  145. package/dist/cjs/types/models/shipping-method.d.ts +595 -0
  146. package/dist/cjs/types/models/shipping-method.d.ts.map +1 -0
  147. package/dist/cjs/types/models/shipping-method.js +8 -0
  148. package/dist/cjs/types/models/shipping-method.js.map +1 -0
  149. package/dist/cjs/types/models/shopping-list.d.ts +941 -0
  150. package/dist/cjs/types/models/shopping-list.d.ts.map +1 -0
  151. package/dist/cjs/types/models/shopping-list.js +8 -0
  152. package/dist/cjs/types/models/shopping-list.js.map +1 -0
  153. package/dist/cjs/types/models/staged-quote.d.ts +345 -0
  154. package/dist/cjs/types/models/staged-quote.d.ts.map +1 -0
  155. package/dist/cjs/types/models/staged-quote.js +8 -0
  156. package/dist/cjs/types/models/staged-quote.js.map +1 -0
  157. package/dist/cjs/types/models/standalone-price.d.ts +546 -0
  158. package/dist/cjs/types/models/standalone-price.d.ts.map +1 -0
  159. package/dist/cjs/types/models/standalone-price.js +8 -0
  160. package/dist/cjs/types/models/standalone-price.js.map +1 -0
  161. package/dist/cjs/types/models/state.d.ts +342 -0
  162. package/dist/cjs/types/models/state.d.ts.map +1 -0
  163. package/dist/cjs/types/models/state.js +8 -0
  164. package/dist/cjs/types/models/state.js.map +1 -0
  165. package/dist/cjs/types/models/store-country.d.ts +14 -0
  166. package/dist/cjs/types/models/store-country.d.ts.map +1 -0
  167. package/dist/cjs/types/models/store-country.js +8 -0
  168. package/dist/cjs/types/models/store-country.js.map +1 -0
  169. package/dist/cjs/types/models/store.d.ts +548 -0
  170. package/dist/cjs/types/models/store.d.ts.map +1 -0
  171. package/dist/cjs/types/models/store.js +8 -0
  172. package/dist/cjs/types/models/store.js.map +1 -0
  173. package/dist/cjs/types/models/subscription.d.ts +772 -0
  174. package/dist/cjs/types/models/subscription.d.ts.map +1 -0
  175. package/dist/cjs/types/models/subscription.js +8 -0
  176. package/dist/cjs/types/models/subscription.js.map +1 -0
  177. package/dist/cjs/types/models/tax-category.d.ts +379 -0
  178. package/dist/cjs/types/models/tax-category.d.ts.map +1 -0
  179. package/dist/cjs/types/models/tax-category.js +8 -0
  180. package/dist/cjs/types/models/tax-category.js.map +1 -0
  181. package/dist/cjs/types/models/type.d.ts +646 -0
  182. package/dist/cjs/types/models/type.d.ts.map +1 -0
  183. package/dist/cjs/types/models/type.js +8 -0
  184. package/dist/cjs/types/models/type.js.map +1 -0
  185. package/dist/cjs/types/models/warning.d.ts +24 -0
  186. package/dist/cjs/types/models/warning.d.ts.map +1 -0
  187. package/dist/cjs/types/models/warning.js +8 -0
  188. package/dist/cjs/types/models/warning.js.map +1 -0
  189. package/dist/cjs/types/models/zone.d.ts +235 -0
  190. package/dist/cjs/types/models/zone.d.ts.map +1 -0
  191. package/dist/cjs/types/models/zone.js +8 -0
  192. package/dist/cjs/types/models/zone.js.map +1 -0
  193. package/dist/cjs/types.d.ts +1 -1
  194. package/dist/cjs/types.d.ts.map +1 -1
  195. package/dist/cjs/types.js +15 -0
  196. package/dist/cjs/types.js.map +1 -1
  197. package/dist/mjs/types/models/approval-flow.d.ts +264 -0
  198. package/dist/mjs/types/models/approval-flow.d.ts.map +1 -0
  199. package/dist/mjs/types/models/approval-flow.js +7 -0
  200. package/dist/mjs/types/models/approval-flow.js.map +1 -0
  201. package/dist/mjs/types/models/approval-rule.d.ts +415 -0
  202. package/dist/mjs/types/models/approval-rule.d.ts.map +1 -0
  203. package/dist/mjs/types/models/approval-rule.js +7 -0
  204. package/dist/mjs/types/models/approval-rule.js.map +1 -0
  205. package/dist/mjs/types/models/associate-role.d.ts +319 -0
  206. package/dist/mjs/types/models/associate-role.d.ts.map +1 -0
  207. package/dist/mjs/types/models/associate-role.js +7 -0
  208. package/dist/mjs/types/models/associate-role.js.map +1 -0
  209. package/dist/mjs/types/models/attribute-group.d.ts +254 -0
  210. package/dist/mjs/types/models/attribute-group.d.ts.map +1 -0
  211. package/dist/mjs/types/models/attribute-group.js +7 -0
  212. package/dist/mjs/types/models/attribute-group.js.map +1 -0
  213. package/dist/mjs/types/models/business-unit.d.ts +1244 -0
  214. package/dist/mjs/types/models/business-unit.d.ts.map +1 -0
  215. package/dist/mjs/types/models/business-unit.js +7 -0
  216. package/dist/mjs/types/models/business-unit.js.map +1 -0
  217. package/dist/mjs/types/models/cart-discount.d.ts +848 -0
  218. package/dist/mjs/types/models/cart-discount.d.ts.map +1 -0
  219. package/dist/mjs/types/models/cart-discount.js +7 -0
  220. package/dist/mjs/types/models/cart-discount.js.map +1 -0
  221. package/dist/mjs/types/models/cart.d.ts +3593 -0
  222. package/dist/mjs/types/models/cart.d.ts.map +1 -0
  223. package/dist/mjs/types/models/cart.js +7 -0
  224. package/dist/mjs/types/models/cart.js.map +1 -0
  225. package/dist/mjs/types/models/category.d.ts +636 -0
  226. package/dist/mjs/types/models/category.d.ts.map +1 -0
  227. package/dist/mjs/types/models/category.js +7 -0
  228. package/dist/mjs/types/models/category.js.map +1 -0
  229. package/dist/mjs/types/models/channel.d.ts +380 -0
  230. package/dist/mjs/types/models/channel.d.ts.map +1 -0
  231. package/dist/mjs/types/models/channel.js +7 -0
  232. package/dist/mjs/types/models/channel.js.map +1 -0
  233. package/dist/mjs/types/models/common.d.ts +1163 -0
  234. package/dist/mjs/types/models/common.d.ts.map +1 -0
  235. package/dist/mjs/types/models/common.js +7 -0
  236. package/dist/mjs/types/models/common.js.map +1 -0
  237. package/dist/mjs/types/models/custom-object.d.ts +152 -0
  238. package/dist/mjs/types/models/custom-object.d.ts.map +1 -0
  239. package/dist/mjs/types/models/custom-object.js +7 -0
  240. package/dist/mjs/types/models/custom-object.js.map +1 -0
  241. package/dist/mjs/types/models/customer-group.d.ts +235 -0
  242. package/dist/mjs/types/models/customer-group.d.ts.map +1 -0
  243. package/dist/mjs/types/models/customer-group.js +7 -0
  244. package/dist/mjs/types/models/customer-group.js.map +1 -0
  245. package/dist/mjs/types/models/customer-search.d.ts +114 -0
  246. package/dist/mjs/types/models/customer-search.d.ts.map +1 -0
  247. package/dist/mjs/types/models/customer-search.js +7 -0
  248. package/dist/mjs/types/models/customer-search.js.map +1 -0
  249. package/dist/mjs/types/models/customer.d.ts +1270 -0
  250. package/dist/mjs/types/models/customer.d.ts.map +1 -0
  251. package/dist/mjs/types/models/customer.js +7 -0
  252. package/dist/mjs/types/models/customer.js.map +1 -0
  253. package/dist/mjs/types/models/discount-code.d.ts +473 -0
  254. package/dist/mjs/types/models/discount-code.d.ts.map +1 -0
  255. package/dist/mjs/types/models/discount-code.js +7 -0
  256. package/dist/mjs/types/models/discount-code.js.map +1 -0
  257. package/dist/mjs/types/models/error.d.ts +3330 -0
  258. package/dist/mjs/types/models/error.d.ts.map +1 -0
  259. package/dist/mjs/types/models/error.js +7 -0
  260. package/dist/mjs/types/models/error.js.map +1 -0
  261. package/dist/mjs/types/models/extension.d.ts +336 -0
  262. package/dist/mjs/types/models/extension.d.ts.map +1 -0
  263. package/dist/mjs/types/models/extension.js +7 -0
  264. package/dist/mjs/types/models/extension.js.map +1 -0
  265. package/dist/mjs/types/models/index.d.ts +48 -0
  266. package/dist/mjs/types/models/index.d.ts.map +1 -0
  267. package/dist/mjs/types/models/index.js +48 -0
  268. package/dist/mjs/types/models/index.js.map +1 -0
  269. package/dist/mjs/types/models/inventory.d.ts +330 -0
  270. package/dist/mjs/types/models/inventory.d.ts.map +1 -0
  271. package/dist/mjs/types/models/inventory.js +7 -0
  272. package/dist/mjs/types/models/inventory.js.map +1 -0
  273. package/dist/mjs/types/models/me.d.ts +2636 -0
  274. package/dist/mjs/types/models/me.d.ts.map +1 -0
  275. package/dist/mjs/types/models/me.js +7 -0
  276. package/dist/mjs/types/models/me.js.map +1 -0
  277. package/dist/mjs/types/models/message.d.ts +23707 -0
  278. package/dist/mjs/types/models/message.d.ts.map +1 -0
  279. package/dist/mjs/types/models/message.js +7 -0
  280. package/dist/mjs/types/models/message.js.map +1 -0
  281. package/dist/mjs/types/models/order-edit.d.ts +2725 -0
  282. package/dist/mjs/types/models/order-edit.d.ts.map +1 -0
  283. package/dist/mjs/types/models/order-edit.js +7 -0
  284. package/dist/mjs/types/models/order-edit.js.map +1 -0
  285. package/dist/mjs/types/models/order.d.ts +3187 -0
  286. package/dist/mjs/types/models/order.d.ts.map +1 -0
  287. package/dist/mjs/types/models/order.js +7 -0
  288. package/dist/mjs/types/models/order.js.map +1 -0
  289. package/dist/mjs/types/models/payment.d.ts +680 -0
  290. package/dist/mjs/types/models/payment.d.ts.map +1 -0
  291. package/dist/mjs/types/models/payment.js +7 -0
  292. package/dist/mjs/types/models/payment.js.map +1 -0
  293. package/dist/mjs/types/models/product-discount.d.ts +465 -0
  294. package/dist/mjs/types/models/product-discount.d.ts.map +1 -0
  295. package/dist/mjs/types/models/product-discount.js +7 -0
  296. package/dist/mjs/types/models/product-discount.js.map +1 -0
  297. package/dist/mjs/types/models/product-search.d.ts +437 -0
  298. package/dist/mjs/types/models/product-search.d.ts.map +1 -0
  299. package/dist/mjs/types/models/product-search.js +7 -0
  300. package/dist/mjs/types/models/product-search.js.map +1 -0
  301. package/dist/mjs/types/models/product-selection.d.ts +579 -0
  302. package/dist/mjs/types/models/product-selection.d.ts.map +1 -0
  303. package/dist/mjs/types/models/product-selection.js +7 -0
  304. package/dist/mjs/types/models/product-selection.js.map +1 -0
  305. package/dist/mjs/types/models/product-tailoring.d.ts +1368 -0
  306. package/dist/mjs/types/models/product-tailoring.d.ts.map +1 -0
  307. package/dist/mjs/types/models/product-tailoring.js +7 -0
  308. package/dist/mjs/types/models/product-tailoring.js.map +1 -0
  309. package/dist/mjs/types/models/product-type.d.ts +775 -0
  310. package/dist/mjs/types/models/product-type.d.ts.map +1 -0
  311. package/dist/mjs/types/models/product-type.js +7 -0
  312. package/dist/mjs/types/models/product-type.js.map +1 -0
  313. package/dist/mjs/types/models/product.d.ts +2314 -0
  314. package/dist/mjs/types/models/product.d.ts.map +1 -0
  315. package/dist/mjs/types/models/product.js +7 -0
  316. package/dist/mjs/types/models/product.js.map +1 -0
  317. package/dist/mjs/types/models/project.d.ts +418 -0
  318. package/dist/mjs/types/models/project.d.ts.map +1 -0
  319. package/dist/mjs/types/models/project.js +7 -0
  320. package/dist/mjs/types/models/project.js.map +1 -0
  321. package/dist/mjs/types/models/quote-request.d.ts +452 -0
  322. package/dist/mjs/types/models/quote-request.d.ts.map +1 -0
  323. package/dist/mjs/types/models/quote-request.js +7 -0
  324. package/dist/mjs/types/models/quote-request.js.map +1 -0
  325. package/dist/mjs/types/models/quote.d.ts +473 -0
  326. package/dist/mjs/types/models/quote.d.ts.map +1 -0
  327. package/dist/mjs/types/models/quote.js +7 -0
  328. package/dist/mjs/types/models/quote.js.map +1 -0
  329. package/dist/mjs/types/models/review.d.ts +435 -0
  330. package/dist/mjs/types/models/review.d.ts.map +1 -0
  331. package/dist/mjs/types/models/review.js +7 -0
  332. package/dist/mjs/types/models/review.js.map +1 -0
  333. package/dist/mjs/types/models/scalar-types.d.ts +10 -0
  334. package/dist/mjs/types/models/scalar-types.d.ts.map +1 -0
  335. package/dist/mjs/types/models/scalar-types.js +7 -0
  336. package/dist/mjs/types/models/scalar-types.js.map +1 -0
  337. package/dist/mjs/types/models/search.d.ts +334 -0
  338. package/dist/mjs/types/models/search.d.ts.map +1 -0
  339. package/dist/mjs/types/models/search.js +7 -0
  340. package/dist/mjs/types/models/search.js.map +1 -0
  341. package/dist/mjs/types/models/shipping-method.d.ts +595 -0
  342. package/dist/mjs/types/models/shipping-method.d.ts.map +1 -0
  343. package/dist/mjs/types/models/shipping-method.js +7 -0
  344. package/dist/mjs/types/models/shipping-method.js.map +1 -0
  345. package/dist/mjs/types/models/shopping-list.d.ts +941 -0
  346. package/dist/mjs/types/models/shopping-list.d.ts.map +1 -0
  347. package/dist/mjs/types/models/shopping-list.js +7 -0
  348. package/dist/mjs/types/models/shopping-list.js.map +1 -0
  349. package/dist/mjs/types/models/staged-quote.d.ts +345 -0
  350. package/dist/mjs/types/models/staged-quote.d.ts.map +1 -0
  351. package/dist/mjs/types/models/staged-quote.js +7 -0
  352. package/dist/mjs/types/models/staged-quote.js.map +1 -0
  353. package/dist/mjs/types/models/standalone-price.d.ts +546 -0
  354. package/dist/mjs/types/models/standalone-price.d.ts.map +1 -0
  355. package/dist/mjs/types/models/standalone-price.js +7 -0
  356. package/dist/mjs/types/models/standalone-price.js.map +1 -0
  357. package/dist/mjs/types/models/state.d.ts +342 -0
  358. package/dist/mjs/types/models/state.d.ts.map +1 -0
  359. package/dist/mjs/types/models/state.js +7 -0
  360. package/dist/mjs/types/models/state.js.map +1 -0
  361. package/dist/mjs/types/models/store-country.d.ts +14 -0
  362. package/dist/mjs/types/models/store-country.d.ts.map +1 -0
  363. package/dist/mjs/types/models/store-country.js +7 -0
  364. package/dist/mjs/types/models/store-country.js.map +1 -0
  365. package/dist/mjs/types/models/store.d.ts +548 -0
  366. package/dist/mjs/types/models/store.d.ts.map +1 -0
  367. package/dist/mjs/types/models/store.js +7 -0
  368. package/dist/mjs/types/models/store.js.map +1 -0
  369. package/dist/mjs/types/models/subscription.d.ts +772 -0
  370. package/dist/mjs/types/models/subscription.d.ts.map +1 -0
  371. package/dist/mjs/types/models/subscription.js +7 -0
  372. package/dist/mjs/types/models/subscription.js.map +1 -0
  373. package/dist/mjs/types/models/tax-category.d.ts +379 -0
  374. package/dist/mjs/types/models/tax-category.d.ts.map +1 -0
  375. package/dist/mjs/types/models/tax-category.js +7 -0
  376. package/dist/mjs/types/models/tax-category.js.map +1 -0
  377. package/dist/mjs/types/models/type.d.ts +646 -0
  378. package/dist/mjs/types/models/type.d.ts.map +1 -0
  379. package/dist/mjs/types/models/type.js +7 -0
  380. package/dist/mjs/types/models/type.js.map +1 -0
  381. package/dist/mjs/types/models/warning.d.ts +24 -0
  382. package/dist/mjs/types/models/warning.d.ts.map +1 -0
  383. package/dist/mjs/types/models/warning.js +7 -0
  384. package/dist/mjs/types/models/warning.js.map +1 -0
  385. package/dist/mjs/types/models/zone.d.ts +235 -0
  386. package/dist/mjs/types/models/zone.d.ts.map +1 -0
  387. package/dist/mjs/types/models/zone.js +7 -0
  388. package/dist/mjs/types/models/zone.js.map +1 -0
  389. package/dist/mjs/types.d.ts +1 -1
  390. package/dist/mjs/types.d.ts.map +1 -1
  391. package/dist/mjs/types.js +1 -0
  392. package/dist/mjs/types.js.map +1 -1
  393. package/package.json +2 -1
@@ -0,0 +1,3593 @@
1
+ /**
2
+ * Code generated by [commercetools RMF-Codegen](https://github.com/commercetools/rmf-codegen). DO NOT EDIT.
3
+ * Please don't change this file manually but run `rmf-codegen generate raml_file_path -o output_path -t typescript_client` to update it.
4
+ * For more information about the commercetools platform APIs, visit https://docs.commercetools.com/.
5
+ */
6
+ import { BusinessUnitKeyReference, BusinessUnitResourceIdentifier } from './business-unit.js';
7
+ import { CartDiscountReference, CartDiscountTarget, CartDiscountValue, CartDiscountValueDraft } from './cart-discount.js';
8
+ import { ChannelReference, ChannelResourceIdentifier } from './channel.js';
9
+ import { Address, BaseAddress, BaseResource, CentPrecisionMoney, CreatedBy, LastModifiedBy, LocalizedString, Price, Reference, TypedMoney, TypedMoneyDraft, _BaseAddress, _Money } from './common.js';
10
+ import { CustomerGroupReference, CustomerGroupResourceIdentifier } from './customer-group.js';
11
+ import { DiscountCodeReference } from './discount-code.js';
12
+ import { Delivery, DeliveryDraft, ItemState, OrderReference, PaymentInfo } from './order.js';
13
+ import { PaymentResourceIdentifier } from './payment.js';
14
+ import { ProductVariant } from './product.js';
15
+ import { ProductTailoringUpdateAction } from './product-tailoring.js';
16
+ import { ProductTypeReference } from './product-type.js';
17
+ import { ShippingMethodReference, ShippingMethodResourceIdentifier, ShippingRate, ShippingRateDraft } from './shipping-method.js';
18
+ import { ShoppingListResourceIdentifier } from './shopping-list.js';
19
+ import { StoreKeyReference, StoreResourceIdentifier } from './store.js';
20
+ import { SubRate, TaxCategoryReference, TaxCategoryResourceIdentifier, TaxRate } from './tax-category.js';
21
+ import { CustomFields, CustomFieldsDraft, FieldContainer, TypeResourceIdentifier } from './type.js';
22
+ export interface Cart extends BaseResource {
23
+ /**
24
+ * Unique identifier of the Cart.
25
+ *
26
+ *
27
+ */
28
+ readonly id: string;
29
+ /**
30
+ * Current version of the Cart.
31
+ *
32
+ *
33
+ */
34
+ readonly version: number;
35
+ /**
36
+ * User-defined unique identifier of the Cart.
37
+ *
38
+ *
39
+ */
40
+ readonly key?: string;
41
+ /**
42
+ * `id` of the [Customer](ctp:api:type:Customer) that the Cart belongs to.
43
+ *
44
+ *
45
+ */
46
+ readonly customerId?: string;
47
+ /**
48
+ * Email address of the Customer that the Cart belongs to.
49
+ *
50
+ *
51
+ */
52
+ readonly customerEmail?: string;
53
+ /**
54
+ * [Reference](ctp:api:type:Reference) to the Customer Group of the Customer that the Cart belongs to. Used for [Line Item price selection](/../api/pricing-and-discounts-overview#line-item-price-selection).
55
+ *
56
+ *
57
+ */
58
+ readonly customerGroup?: CustomerGroupReference;
59
+ /**
60
+ * [Anonymous session](ctp:api:type:AnonymousSession) associated with the Cart.
61
+ *
62
+ *
63
+ */
64
+ readonly anonymousId?: string;
65
+ /**
66
+ * [Reference](ctp:api:type:Reference) to a Business Unit the Cart belongs to.
67
+ *
68
+ *
69
+ */
70
+ readonly businessUnit?: BusinessUnitKeyReference;
71
+ /**
72
+ * [Reference](ctp:api:type:Reference) to a Store the Cart belongs to.
73
+ *
74
+ *
75
+ */
76
+ readonly store?: StoreKeyReference;
77
+ /**
78
+ * [Line Items](ctp:api:type:LineItems) added to the Cart.
79
+ *
80
+ *
81
+ */
82
+ readonly lineItems: LineItem[];
83
+ /**
84
+ * [Custom Line Items](ctp:api:type:CustomLineItems) added to the Cart.
85
+ *
86
+ *
87
+ */
88
+ readonly customLineItems: CustomLineItem[];
89
+ /**
90
+ * Sum of all [LineItem](ctp:api:type:LineItem) quantities, excluding [CustomLineItems](ctp:api:type:CustomLineItem). Only present when the Cart has at least one LineItem.
91
+ *
92
+ *
93
+ */
94
+ readonly totalLineItemQuantity?: number;
95
+ /**
96
+ * Sum of the `totalPrice` field of all [LineItems](ctp:api:type:LineItem) and [CustomLineItems](ctp:api:type:CustomLineItem), and if available, the `price` field of [ShippingInfo](ctp:api:type:ShippingInfo).
97
+ * If a discount applies on `totalPrice`, this field holds the discounted value.
98
+ *
99
+ * Taxes are included if [TaxRate](ctp:api:type:TaxRate) `includedInPrice` is `true` for each price.
100
+ *
101
+ *
102
+ */
103
+ readonly totalPrice: CentPrecisionMoney;
104
+ /**
105
+ *
106
+ * - For a Cart with `Platform` [TaxMode](ctp:api:type:TaxMode), it is automatically set when a [shipping address is set](ctp:api:type:CartSetShippingAddressAction). For Carts with `Multiple` [ShippingMode](ctp:api:type:ShippingMode), all Line Items and Custom Line Items must be fully distributed between the Shipping Methods (via `shippingDetails`), otherwise `taxedPrice` is not automatically set.
107
+ * - For a Cart with `External` [TaxMode](ctp:api:type:TaxMode), it is automatically set when `shippingAddress` and external Tax Rates for all Line Items, Custom Line Items, and Shipping Methods in the Cart are set. For Carts with `Multiple` [ShippingMode](ctp:api:type:ShippingMode), all allocations must have their respective tax rates present in `perMethodTaxRate`, otherwise `taxedPrice` is not automatically set.
108
+ *
109
+ * If a discount applies on `totalPrice`, this field holds the discounted values.
110
+ *
111
+ *
112
+ */
113
+ readonly taxedPrice?: TaxedPrice;
114
+ /**
115
+ * Sum of the `taxedPrice` field of [ShippingInfo](ctp:api:type:ShippingInfo) across all Shipping Methods.
116
+ *
117
+ */
118
+ readonly taxedShippingPrice?: TaxedPrice;
119
+ /**
120
+ * Discounts that apply on the Cart `totalPrice`.
121
+ *
122
+ */
123
+ readonly discountOnTotalPrice?: DiscountOnTotalPrice;
124
+ /**
125
+ * Indicates how Tax Rates are set.
126
+ *
127
+ *
128
+ */
129
+ readonly taxMode: TaxMode;
130
+ /**
131
+ * Indicates how monetary values are rounded when calculating taxes for `taxedPrice`.
132
+ *
133
+ *
134
+ */
135
+ readonly taxRoundingMode: RoundingMode;
136
+ /**
137
+ * Indicates how taxes are calculated when calculating taxes for `taxedPrice`.
138
+ *
139
+ *
140
+ */
141
+ readonly taxCalculationMode: TaxCalculationMode;
142
+ /**
143
+ * Indicates how stock quantities are tracked for Line Items in the Cart.
144
+ *
145
+ *
146
+ */
147
+ readonly inventoryMode: InventoryMode;
148
+ /**
149
+ * Current status of the Cart.
150
+ *
151
+ *
152
+ */
153
+ readonly cartState: CartState;
154
+ /**
155
+ * Billing address associated with the Cart.
156
+ *
157
+ *
158
+ */
159
+ readonly billingAddress?: Address;
160
+ /**
161
+ * Shipping address for a Cart with `Single` [ShippingMode](ctp:api:type:ShippingMode). Determines eligible [ShippingMethod](ctp:api:type:ShippingMethod) rates and Tax Rates of Line Items.
162
+ *
163
+ *
164
+ */
165
+ readonly shippingAddress?: Address;
166
+ /**
167
+ * Indicates whether the Cart has one or multiple Shipping Methods.
168
+ *
169
+ */
170
+ readonly shippingMode: ShippingMode;
171
+ /**
172
+ * User-defined unique identifier of the Shipping Method in a Cart with `Single` [ShippingMode](ctp:api:type:ShippingMode).
173
+ *
174
+ *
175
+ */
176
+ readonly shippingKey?: string;
177
+ /**
178
+ * Shipping-related information of a Cart with `Single` [ShippingMode](ctp:api:type:ShippingMode). Automatically set when a [Shipping Method is set](ctp:api:type:CartSetShippingMethodAction).
179
+ *
180
+ *
181
+ */
182
+ readonly shippingInfo?: ShippingInfo;
183
+ /**
184
+ * Input used to select a [ShippingRatePriceTier](ctp:api:type:ShippingRatePriceTier).
185
+ * The data type of this field depends on the `shippingRateInputType.type` configured in the [Project](ctp:api:type:Project):
186
+ *
187
+ * - If `CartClassification`, it is [ClassificationShippingRateInput](ctp:api:type:ClassificationShippingRateInput).
188
+ * - If `CartScore`, it is [ScoreShippingRateInput](ctp:api:type:ScoreShippingRateInput).
189
+ * - If `CartValue`, it cannot be used.
190
+ *
191
+ *
192
+ */
193
+ readonly shippingRateInput?: ShippingRateInput;
194
+ /**
195
+ * Custom Fields of the Shipping Method in a Cart with `Single` [ShippingMode](ctp:api:type:ShippingMode).
196
+ *
197
+ *
198
+ */
199
+ readonly shippingCustomFields?: CustomFields;
200
+ /**
201
+ * Shipping-related information of a Cart with `Multiple` [ShippingMode](ctp:api:type:ShippingMode). Updated automatically each time a new [Shipping Method is added](ctp:api:type:CartAddShippingMethodAction).
202
+ *
203
+ */
204
+ readonly shipping: Shipping[];
205
+ /**
206
+ * Additional shipping addresses of the Cart as specified by [LineItems](ctp:api:type:LineItem) using the `shippingDetails` field.
207
+ *
208
+ * For Carts with `Single` [ShippingMode](ctp:api:type:ShippingMode): eligible Shipping Methods or applicable Tax Rates are determined by the address in `shippingAddress`, and not `itemShippingAddresses`.
209
+ *
210
+ *
211
+ */
212
+ readonly itemShippingAddresses: Address[];
213
+ /**
214
+ * Discount Codes applied to the Cart. A Cart that has `directDiscounts` cannot have `discountCodes`.
215
+ *
216
+ *
217
+ */
218
+ readonly discountCodes: DiscountCodeInfo[];
219
+ /**
220
+ * Direct Discounts added to the Cart. A Cart that has `discountCodes` cannot have `directDiscounts`.
221
+ *
222
+ *
223
+ */
224
+ readonly directDiscounts: DirectDiscount[];
225
+ /**
226
+ * Automatically set when a Line Item with `GiftLineItem` [LineItemMode](ctp:api:type:LineItemMode) is [removed](ctp:api:type:CartRemoveLineItemAction) from the Cart.
227
+ *
228
+ *
229
+ */
230
+ readonly refusedGifts: CartDiscountReference[];
231
+ /**
232
+ * Payment information related to the Cart.
233
+ *
234
+ *
235
+ */
236
+ readonly paymentInfo?: PaymentInfo;
237
+ /**
238
+ * Used for [Line Item price selection](/../api/pricing-and-discounts-overview#line-item-price-selection).
239
+ *
240
+ *
241
+ */
242
+ readonly country?: string;
243
+ /**
244
+ * Languages of the Cart. Can only contain languages supported by the [Project](ctp:api:type:Project).
245
+ *
246
+ *
247
+ */
248
+ readonly locale?: string;
249
+ /**
250
+ * Indicates how the Cart was created.
251
+ *
252
+ *
253
+ */
254
+ readonly origin: CartOrigin;
255
+ /**
256
+ * Custom Fields of the Cart.
257
+ *
258
+ *
259
+ */
260
+ readonly custom?: CustomFields;
261
+ /**
262
+ * Number of days after which an active Cart is deleted since its last modification. Configured in [Project settings](ctp:api:type:CartsConfiguration).
263
+ *
264
+ *
265
+ */
266
+ readonly deleteDaysAfterLastModification?: number;
267
+ /**
268
+ * Date and time (UTC) the Cart was initially created.
269
+ *
270
+ *
271
+ */
272
+ readonly createdAt: string;
273
+ /**
274
+ * Date and time (UTC) the Cart was last updated.
275
+ *
276
+ *
277
+ */
278
+ readonly lastModifiedAt: string;
279
+ /**
280
+ * IDs and references that last modified the Cart.
281
+ *
282
+ *
283
+ */
284
+ readonly lastModifiedBy?: LastModifiedBy;
285
+ /**
286
+ * IDs and references that created the Cart.
287
+ *
288
+ *
289
+ */
290
+ readonly createdBy?: CreatedBy;
291
+ }
292
+ export interface CartDraft {
293
+ /**
294
+ * Currency the Cart uses.
295
+ *
296
+ *
297
+ */
298
+ readonly currency: string;
299
+ /**
300
+ * User-defined unique identifier for the Cart.
301
+ *
302
+ *
303
+ */
304
+ readonly key?: string;
305
+ /**
306
+ * `id` of the [Customer](ctp:api:type:Customer) that the Cart belongs to.
307
+ *
308
+ *
309
+ */
310
+ readonly customerId?: string;
311
+ /**
312
+ * Email address of the Customer that the Cart belongs to.
313
+ *
314
+ *
315
+ */
316
+ readonly customerEmail?: string;
317
+ /**
318
+ * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to the Customer Group of the Customer that the Cart belongs to. Used for [Line Item price selection](/../api/pricing-and-discounts-overview#line-item-price-selection).
319
+ *
320
+ * It is automatically set if the Customer referenced in `customerId` belongs to a Customer Group.
321
+ * It can also be set explicitly when no `customerId` is present.
322
+ *
323
+ *
324
+ */
325
+ readonly customerGroup?: CustomerGroupResourceIdentifier;
326
+ /**
327
+ * [Anonymous session](ctp:api:type:AnonymousSession) associated with the Cart.
328
+ *
329
+ *
330
+ */
331
+ readonly anonymousId?: string;
332
+ /**
333
+ * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to the Business Unit the Cart should belong to. When the `customerId` of the Cart is also set, the [Customer](ctp:api:type:Customer) must be an [Associate](ctp:api:type:Associate) of the Business Unit.
334
+ *
335
+ *
336
+ */
337
+ readonly businessUnit?: BusinessUnitResourceIdentifier;
338
+ /**
339
+ * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to the Store the Cart should belong to. Once set, it cannot be updated.
340
+ *
341
+ *
342
+ */
343
+ readonly store?: StoreResourceIdentifier;
344
+ /**
345
+ * [Line Items](ctp:api:type:LineItems) to add to the Cart.
346
+ *
347
+ *
348
+ */
349
+ readonly lineItems?: LineItemDraft[];
350
+ /**
351
+ * [Custom Line Items](ctp:api:type:CustomLineItems) to add to the Cart.
352
+ *
353
+ *
354
+ */
355
+ readonly customLineItems?: CustomLineItemDraft[];
356
+ /**
357
+ * Determines how Tax Rates are set.
358
+ *
359
+ *
360
+ */
361
+ readonly taxMode?: TaxMode;
362
+ /**
363
+ * External Tax Rate for the `shippingMethod` if the Cart has `External` [TaxMode](ctp:api:type:TaxMode).
364
+ *
365
+ *
366
+ */
367
+ readonly externalTaxRateForShippingMethod?: ExternalTaxRateDraft;
368
+ /**
369
+ * Determines how monetary values are rounded when calculating taxes for `taxedPrice`.
370
+ *
371
+ *
372
+ */
373
+ readonly taxRoundingMode?: RoundingMode;
374
+ /**
375
+ * Determines how taxes are calculated for `taxedPrice`.
376
+ *
377
+ *
378
+ */
379
+ readonly taxCalculationMode?: TaxCalculationMode;
380
+ /**
381
+ * Determines how stock quantities are tracked for Line Items in the Cart.
382
+ *
383
+ *
384
+ */
385
+ readonly inventoryMode?: InventoryMode;
386
+ /**
387
+ * Billing address associated with the Cart.
388
+ *
389
+ *
390
+ */
391
+ readonly billingAddress?: _BaseAddress;
392
+ /**
393
+ * Shipping address for a Cart with `Single` [ShippingMode](ctp:api:type:ShippingMode). Determines eligible [ShippingMethod](ctp:api:type:ShippingMethod) rates and Tax Rates of Line Items.
394
+ * Must be one of the `itemShippingAddresses` when that field is also provided.
395
+ *
396
+ *
397
+ */
398
+ readonly shippingAddress?: _BaseAddress;
399
+ /**
400
+ * Shipping Method for a Cart with `Single` [ShippingMode](ctp:api:type:ShippingMode). If the referenced [ShippingMethod](ctp:api:type:ShippingMethod) has a `predicate` that does not match the Cart, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned when [creating a Cart](ctp:api:endpoint:/{projectKey}/carts:POST).
401
+ *
402
+ *
403
+ */
404
+ readonly shippingMethod?: ShippingMethodResourceIdentifier;
405
+ /**
406
+ * Used as an input to select a [ShippingRatePriceTier](ctp:api:type:ShippingRatePriceTier).
407
+ * The data type of this field depends on the `shippingRateInputType.type` configured in the [Project](ctp:api:type:Project):
408
+ *
409
+ * - If `CartClassification`, it must be [ClassificationShippingRateInputDraft](ctp:api:type:ClassificationShippingRateInputDraft).
410
+ * - If `CartScore`, it must be [ScoreShippingRateInputDraft](ctp:api:type:ScoreShippingRateInputDraft).
411
+ * - If `CartValue`, it cannot be set.
412
+ *
413
+ *
414
+ */
415
+ readonly shippingRateInput?: ShippingRateInputDraft;
416
+ /**
417
+ * - If set to `Single`, only a single Shipping Method can be added to the Cart.
418
+ * - If set to `Multiple`, multiple Shipping Methods can be added to the Cart.
419
+ *
420
+ */
421
+ readonly shippingMode?: ShippingMode;
422
+ /**
423
+ * Custom Shipping Methods for a Cart with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
424
+ *
425
+ */
426
+ readonly customShipping?: CustomShippingDraft[];
427
+ /**
428
+ * Shipping Methods for a Cart with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
429
+ *
430
+ */
431
+ readonly shipping?: ShippingDraft[];
432
+ /**
433
+ * Multiple shipping addresses of the Cart. Each address must contain a `key` that is unique in this Cart.
434
+ * The keys are used by [LineItems](ctp:api:type:LineItem) to reference these addresses under their `shippingDetails`.
435
+ *
436
+ * For Carts with `Single` [ShippingMode](ctp:api:type:ShippingMode): eligible Shipping Methods or applicable Tax Rates are determined by the address `shippingAddress`, and not `itemShippingAddresses`.
437
+ *
438
+ *
439
+ */
440
+ readonly itemShippingAddresses?: BaseAddress[];
441
+ /**
442
+ * `code` of the existing [DiscountCodes](ctp:api:type:DiscountCode) to add to the Cart.
443
+ *
444
+ *
445
+ */
446
+ readonly discountCodes?: string[];
447
+ /**
448
+ * Used for [Line Item price selection](/../api/pricing-and-discounts-overview#line-item-price-selection).
449
+ * If used for [Create Cart in Store](ctp:api:endpoint:/{projectKey}/in-store/carts:POST), the provided country must be one of the [Store's](ctp:api:type:Store) `countries`.
450
+ *
451
+ *
452
+ */
453
+ readonly country?: string;
454
+ /**
455
+ * Languages of the Cart. Can only contain languages supported by the [Project](ctp:api:type:Project).
456
+ *
457
+ *
458
+ */
459
+ readonly locale?: string;
460
+ /**
461
+ * Indicates how the Cart was created.
462
+ *
463
+ *
464
+ */
465
+ readonly origin?: CartOrigin;
466
+ /**
467
+ * Number of days after which an active Cart is deleted since its last modification.
468
+ * If not provided, the default value for this field configured in [Project settings](ctp:api:type:CartsConfiguration) is assigned.
469
+ *
470
+ * Create a [ChangeSubscription](ctp:api:type:ChangeSubscription) for Carts to receive a [ResourceDeletedDeliveryPayload](ctp:api:type:ResourceDeletedDeliveryPayload) upon deletion of the Cart.
471
+ *
472
+ *
473
+ */
474
+ readonly deleteDaysAfterLastModification?: number;
475
+ /**
476
+ * Custom Fields for the Cart.
477
+ *
478
+ *
479
+ */
480
+ readonly custom?: CustomFieldsDraft;
481
+ }
482
+ /**
483
+ * Indicates who created the Cart.
484
+ *
485
+ */
486
+ export type CartOrigin = 'Customer' | 'Merchant' | 'Quote' | string;
487
+ /**
488
+ * [PagedQueryResult](/../api/general-concepts#pagedqueryresult) with results containing an array of [Cart](ctp:api:type:Cart).
489
+ *
490
+ */
491
+ export interface CartPagedQueryResponse {
492
+ /**
493
+ * Number of [results requested](/../api/general-concepts#limit).
494
+ *
495
+ *
496
+ */
497
+ readonly limit: number;
498
+ /**
499
+ * Number of [elements skipped](/../api/general-concepts#offset).
500
+ *
501
+ *
502
+ */
503
+ readonly offset: number;
504
+ /**
505
+ * Actual number of results returned.
506
+ *
507
+ *
508
+ */
509
+ readonly count: number;
510
+ /**
511
+ * Total number of results matching the query.
512
+ * This number is an estimation that is not [strongly consistent](/../api/general-concepts#strong-consistency).
513
+ * This field is returned by default.
514
+ * For improved performance, calculating this field can be deactivated by using the query parameter `withTotal=false`.
515
+ * When the results are filtered with a [Query Predicate](/../api/predicates/query), `total` is subject to a [limit](/../api/limits#queries).
516
+ *
517
+ *
518
+ */
519
+ readonly total?: number;
520
+ /**
521
+ * [Carts](ctp:api:type:Cart) matching the query.
522
+ *
523
+ *
524
+ */
525
+ readonly results: Cart[];
526
+ }
527
+ /**
528
+ * [Reference](ctp:api:type:Reference) to a [Cart](ctp:api:type:Cart).
529
+ *
530
+ */
531
+ export interface CartReference {
532
+ readonly typeId: 'cart';
533
+ /**
534
+ * Unique identifier of the referenced [Cart](ctp:api:type:Cart).
535
+ *
536
+ *
537
+ */
538
+ readonly id: string;
539
+ /**
540
+ * Contains the representation of the expanded Cart. Only present in responses to requests with [Reference Expansion](/../api/general-concepts#reference-expansion) for Carts.
541
+ *
542
+ *
543
+ */
544
+ readonly obj?: Cart;
545
+ }
546
+ /**
547
+ * [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to a [Cart](ctp:api:type:Cart). Either `id` or `key` is required. If both are set, an [InvalidJsonInput](/../api/errors#invalidjsoninput) error is returned.
548
+ *
549
+ */
550
+ export interface CartResourceIdentifier {
551
+ readonly typeId: 'cart';
552
+ /**
553
+ * Unique identifier of the referenced [Cart](ctp:api:type:Cart). Required if `key` is absent.
554
+ *
555
+ *
556
+ */
557
+ readonly id?: string;
558
+ /**
559
+ * User-defined unique identifier of the referenced [Cart](ctp:api:type:Cart). Required if `id` is absent.
560
+ *
561
+ *
562
+ */
563
+ readonly key?: string;
564
+ }
565
+ /**
566
+ * Indicates the current status of a Cart.
567
+ *
568
+ */
569
+ export type CartState = 'Active' | 'Frozen' | 'Merged' | 'Ordered' | string;
570
+ export interface CartUpdate {
571
+ /**
572
+ * Expected version of the Cart on which the changes apply.
573
+ * If the expected version does not match the actual version, a [ConcurrentModification](ctp:api:type:ConcurrentModificationError) error will be returned.
574
+ *
575
+ *
576
+ */
577
+ readonly version: number;
578
+ /**
579
+ * Update actions to be performed on the Cart.
580
+ *
581
+ *
582
+ */
583
+ readonly actions: CartUpdateAction[];
584
+ }
585
+ export type CartUpdateAction = CartAddCustomLineItemAction | CartAddCustomShippingMethodAction | CartAddDiscountCodeAction | CartAddItemShippingAddressAction | CartAddLineItemAction | CartAddPaymentAction | CartAddShippingMethodAction | CartAddShoppingListAction | CartApplyDeltaToCustomLineItemShippingDetailsTargetsAction | CartApplyDeltaToLineItemShippingDetailsTargetsAction | CartChangeCustomLineItemMoneyAction | CartChangeCustomLineItemPriceModeAction | CartChangeCustomLineItemQuantityAction | CartChangeLineItemQuantityAction | CartChangeLineItemsOrderAction | CartChangeTaxCalculationModeAction | CartChangeTaxModeAction | CartChangeTaxRoundingModeAction | CartFreezeCartAction | CartRecalculateAction | CartRemoveCustomLineItemAction | CartRemoveDiscountCodeAction | CartRemoveItemShippingAddressAction | CartRemoveLineItemAction | CartRemovePaymentAction | CartRemoveShippingMethodAction | CartSetAnonymousIdAction | CartSetBillingAddressAction | CartSetBillingAddressCustomFieldAction | CartSetBillingAddressCustomTypeAction | CartSetBusinessUnitAction | CartSetCartTotalTaxAction | CartSetCountryAction | CartSetCustomFieldAction | CartSetCustomLineItemCustomFieldAction | CartSetCustomLineItemCustomTypeAction | CartSetCustomLineItemShippingDetailsAction | CartSetCustomLineItemTaxAmountAction | CartSetCustomLineItemTaxRateAction | CartSetCustomShippingMethodAction | CartSetCustomTypeAction | CartSetCustomerEmailAction | CartSetCustomerGroupAction | CartSetCustomerIdAction | CartSetDeleteDaysAfterLastModificationAction | CartSetDirectDiscountsAction | CartSetItemShippingAddressCustomFieldAction | CartSetItemShippingAddressCustomTypeAction | CartSetKeyAction | CartSetLineItemCustomFieldAction | CartSetLineItemCustomTypeAction | CartSetLineItemDistributionChannelAction | CartSetLineItemInventoryModeAction | CartSetLineItemPriceAction | CartSetLineItemShippingDetailsAction | CartSetLineItemSupplyChannelAction | CartSetLineItemTaxAmountAction | CartSetLineItemTaxRateAction | CartSetLineItemTotalPriceAction | CartSetLocaleAction | CartSetShippingAddressAction | CartSetShippingAddressCustomFieldAction | CartSetShippingAddressCustomTypeAction | CartSetShippingCustomFieldAction | CartSetShippingCustomTypeAction | CartSetShippingMethodAction | CartSetShippingMethodTaxAmountAction | CartSetShippingMethodTaxRateAction | CartSetShippingRateInputAction | CartUnfreezeCartAction | CartUpdateItemShippingAddressAction;
586
+ /**
587
+ * A generic item that can be added to the Cart but is not bound to a Product that can be used for discounts (negative money), vouchers, complex cart rules, additional services, or fees.
588
+ * You control the lifecycle of this item.
589
+ *
590
+ */
591
+ export interface CustomLineItem {
592
+ /**
593
+ * Unique identifier of the Custom Line Item.
594
+ *
595
+ *
596
+ */
597
+ readonly id: string;
598
+ /**
599
+ * User-defined unique identifier of the Custom Line Item.
600
+ *
601
+ *
602
+ */
603
+ readonly key?: string;
604
+ /**
605
+ * Name of the Custom Line Item.
606
+ *
607
+ *
608
+ */
609
+ readonly name: LocalizedString;
610
+ /**
611
+ * Money value of the Custom Line Item.
612
+ *
613
+ *
614
+ */
615
+ readonly money: TypedMoney;
616
+ /**
617
+ * Automatically set after the `taxRate` is set.
618
+ *
619
+ *
620
+ */
621
+ readonly taxedPrice?: TaxedItemPrice;
622
+ /**
623
+ * Total taxed prices based on the quantity of the Custom Line Item assigned to each [Shipping Method](ctp:api:type:ShippingMethod). Only applicable for Carts with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
624
+ * Automatically set after `perMethodTaxRate` is set.
625
+ *
626
+ */
627
+ readonly taxedPricePortions: MethodTaxedPrice[];
628
+ /**
629
+ * Total price of the Custom Line Item (`money` multiplied by `quantity`).
630
+ * If the Custom Line Item is discounted, the total price is `discountedPricePerQuantity` multiplied by `quantity`.
631
+ *
632
+ * Includes taxes if the [TaxRate](ctp:api:type:TaxRate) `includedInPrice` is `true`.
633
+ *
634
+ *
635
+ */
636
+ readonly totalPrice: CentPrecisionMoney;
637
+ /**
638
+ * User-defined identifier used in a deep-link URL for the Custom Line Item.
639
+ * It matches the pattern `[a-zA-Z0-9_-]{2,256}`.
640
+ *
641
+ *
642
+ */
643
+ readonly slug: string;
644
+ /**
645
+ * Number of Custom Line Items in the [Cart](ctp:api:type:Cart) or [Order](ctp:api:type:Order).
646
+ *
647
+ *
648
+ */
649
+ readonly quantity: number;
650
+ /**
651
+ * State of the Custom Line Item in the [Cart](ctp:api:type:Cart) or [Order](ctp:api:type:Order).
652
+ *
653
+ *
654
+ */
655
+ readonly state: ItemState[];
656
+ /**
657
+ * Used to select a Tax Rate when a Cart has the `Platform` [TaxMode](ctp:api:type:TaxMode).
658
+ *
659
+ *
660
+ */
661
+ readonly taxCategory?: TaxCategoryReference;
662
+ /**
663
+ * - For a Cart with `Platform` [TaxMode](ctp:api:type:TaxMode), the `taxRate` of Custom Line Items is set automatically once a shipping address is set. The rate is based on the [TaxCategory](ctp:api:type:TaxCategory) that applies for the shipping address.
664
+ * - For a Cart with `External` TaxMode, the `taxRate` of Custom Line Items can be set using [ExternalTaxRateDraft](ctp:api:type:ExternalTaxRateDraft).
665
+ *
666
+ *
667
+ */
668
+ readonly taxRate?: TaxRate;
669
+ /**
670
+ * Tax Rate per Shipping Method for a Cart with `Multiple` [ShippingMode](ctp:api:type:ShippingMode). For a Cart with `Platform` [TaxMode](ctp:api:type:TaxMode) it is automatically set after the [Shipping Method is added](ctp:api:type:CartAddShippingMethodAction).
671
+ * For a Cart with `External` [TaxMode](ctp:api:type:TaxMode), the Tax Rate must be set with [ExternalTaxRateDraft](ctp:api:type:ExternalTaxRateDraft).
672
+ *
673
+ */
674
+ readonly perMethodTaxRate: MethodTaxRate[];
675
+ /**
676
+ * Discounted price of a single quantity of the Custom Line Item.
677
+ *
678
+ *
679
+ */
680
+ readonly discountedPricePerQuantity: DiscountedLineItemPriceForQuantity[];
681
+ /**
682
+ * Custom Fields of the Custom Line Item.
683
+ *
684
+ *
685
+ */
686
+ readonly custom?: CustomFields;
687
+ /**
688
+ * Container for Custom Line Item-specific addresses.
689
+ *
690
+ *
691
+ */
692
+ readonly shippingDetails?: ItemShippingDetails;
693
+ /**
694
+ * Indicates whether Cart Discounts with a matching [CartDiscountCustomLineItemsTarget](ctp:api:type:CartDiscountCustomLineItemsTarget) are applied to the Custom Line Item.
695
+ *
696
+ *
697
+ */
698
+ readonly priceMode: CustomLineItemPriceMode;
699
+ }
700
+ export interface CustomLineItemDraft {
701
+ /**
702
+ * Name of the Custom Line Item.
703
+ *
704
+ *
705
+ */
706
+ readonly name: LocalizedString;
707
+ /**
708
+ * User-defined unique identifier of the Custom Line Item.
709
+ *
710
+ *
711
+ */
712
+ readonly key?: string;
713
+ /**
714
+ * Number of Custom Line Items to add to the Cart.
715
+ *
716
+ *
717
+ */
718
+ readonly quantity?: number;
719
+ /**
720
+ * Money value of the Custom Line Item.
721
+ * The value can be negative.
722
+ *
723
+ *
724
+ */
725
+ readonly money: _Money;
726
+ /**
727
+ * User-defined identifier used in a deep-link URL for the Custom Line Item.
728
+ * It must match the pattern `[a-zA-Z0-9_-]{2,256}`.
729
+ *
730
+ *
731
+ */
732
+ readonly slug: string;
733
+ /**
734
+ * Used to select a Tax Rate when a Cart has the `Platform` [TaxMode](ctp:api:type:TaxMode).
735
+ * This field is required for `Platform` [TaxMode](ctp:api:type:TaxMode).
736
+ *
737
+ *
738
+ */
739
+ readonly taxCategory?: TaxCategoryResourceIdentifier;
740
+ /**
741
+ * External Tax Rate for the Custom Line Item if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode).
742
+ *
743
+ *
744
+ */
745
+ readonly externalTaxRate?: ExternalTaxRateDraft;
746
+ /**
747
+ * Custom Fields for the Custom Line Item.
748
+ *
749
+ *
750
+ */
751
+ readonly custom?: CustomFieldsDraft;
752
+ /**
753
+ * Container for Custom Line Item-specific addresses.
754
+ *
755
+ *
756
+ */
757
+ readonly shippingDetails?: ItemShippingDetailsDraft;
758
+ /**
759
+ * - If `Standard`, Cart Discounts with a matching [CartDiscountCustomLineItemsTarget](ctp:api:type:CartDiscountCustomLineItemsTarget)
760
+ * are applied to the Custom Line Item.
761
+ * - If `External`, Cart Discounts are not considered on the Custom Line Item.
762
+ *
763
+ *
764
+ */
765
+ readonly priceMode?: CustomLineItemPriceMode;
766
+ }
767
+ /**
768
+ * Determines if Cart Discounts can be applied to a Custom Line Item in the Cart.
769
+ *
770
+ */
771
+ export type CustomLineItemPriceMode = 'External' | 'Standard' | string;
772
+ export interface CustomShippingDraft {
773
+ /**
774
+ * User-defined unique identifier of the custom Shipping Method in the Cart with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
775
+ *
776
+ *
777
+ */
778
+ readonly key: string;
779
+ /**
780
+ * Name of the custom Shipping Method.
781
+ *
782
+ *
783
+ */
784
+ readonly shippingMethodName: string;
785
+ /**
786
+ * Determines the shipping rate and Tax Rate of the associated Line Items.
787
+ *
788
+ *
789
+ */
790
+ readonly shippingAddress?: _BaseAddress;
791
+ /**
792
+ * Determines the shipping price.
793
+ *
794
+ *
795
+ */
796
+ readonly shippingRate: ShippingRateDraft;
797
+ /**
798
+ * Input used to select a [ShippingRatePriceTier](ctp:api:type:ShippingRatePriceTier).
799
+ * The data type of this field depends on the `shippingRateInputType.type` configured in the [Project](ctp:api:type:Project):
800
+ *
801
+ * - If `CartClassification`, it must be [ClassificationShippingRateInputDraft](ctp:api:type:ClassificationShippingRateInputDraft).
802
+ * - If `CartScore`, it must be [ScoreShippingRateInputDraft](ctp:api:type:ScoreShippingRateInputDraft).
803
+ * - If `CartValue`, it cannot be set.
804
+ *
805
+ *
806
+ */
807
+ readonly shippingRateInput?: ShippingRateInputDraft;
808
+ /**
809
+ * Tax Category used to determine a shipping Tax Rate if the Cart has the `Platform` [TaxMode](ctp:api:type:TaxMode).
810
+ *
811
+ *
812
+ */
813
+ readonly taxCategory?: TaxCategoryResourceIdentifier;
814
+ /**
815
+ * Tax Rate used to tax a shipping expense if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode).
816
+ *
817
+ *
818
+ */
819
+ readonly externalTaxRate?: ExternalTaxRateDraft;
820
+ /**
821
+ * Deliveries to be shipped with the custom Shipping Method.
822
+ *
823
+ *
824
+ */
825
+ readonly deliveries?: DeliveryDraft[];
826
+ /**
827
+ * Custom Fields for the custom Shipping Method.
828
+ *
829
+ *
830
+ */
831
+ readonly custom?: CustomFieldsDraft;
832
+ }
833
+ /**
834
+ * Represents a [CartDiscount](ctp:api:type:CartDiscount) that is only associated with a single Cart or Order.
835
+ *
836
+ */
837
+ export interface DirectDiscount {
838
+ /**
839
+ * Unique identifier of the Direct Discount.
840
+ *
841
+ *
842
+ */
843
+ readonly id: string;
844
+ /**
845
+ * Effect of the Discount on the Cart.
846
+ *
847
+ *
848
+ */
849
+ readonly value: CartDiscountValue;
850
+ /**
851
+ * Segment of the Cart that is discounted.
852
+ *
853
+ * Empty when the `value` is set to `giftLineItem`.
854
+ *
855
+ *
856
+ */
857
+ readonly target?: CartDiscountTarget;
858
+ }
859
+ /**
860
+ * Represents a [CartDiscount](ctp:api:type:CartDiscount) that can only be associated with a single Cart or Order.
861
+ *
862
+ * For an introduction to Direct Discounts and to understand how they work in Composable Commerce, see the [Direct Discounts overview](/pricing-and-discounts-overview#direct-discounts).
863
+ *
864
+ */
865
+ export interface DirectDiscountDraft {
866
+ /**
867
+ * Defines the effect the Discount will have.
868
+ *
869
+ *
870
+ */
871
+ readonly value: CartDiscountValueDraft;
872
+ /**
873
+ * Defines what segment of the Cart will be discounted.
874
+ *
875
+ * If `value` is set to `giftLineItem`, this must not be set.
876
+ *
877
+ *
878
+ */
879
+ readonly target?: CartDiscountTarget;
880
+ }
881
+ /**
882
+ * [Reference](ctp:api:type:Reference) to a [DirectDiscount](ctp:api:type:DirectDiscount).
883
+ *
884
+ */
885
+ export interface DirectDiscountReference {
886
+ readonly typeId: 'direct-discount';
887
+ /**
888
+ * Unique identifier of the referenced [DirectDiscount](ctp:api:type:DirectDiscount).
889
+ *
890
+ *
891
+ */
892
+ readonly id: string;
893
+ }
894
+ export interface DiscountCodeInfo {
895
+ /**
896
+ * Discount Code associated with the Cart or Order.
897
+ *
898
+ *
899
+ */
900
+ readonly discountCode: DiscountCodeReference;
901
+ /**
902
+ * Indicates the state of the Discount Code applied to the Cart or Order.
903
+ *
904
+ *
905
+ */
906
+ readonly state: DiscountCodeState;
907
+ }
908
+ /**
909
+ * Indicates the state of a Discount Code in a Cart.
910
+ *
911
+ * If an Order is created from a Cart with a state other than `MatchesCart`, a [DiscountCodeNonApplicable](ctp:api:type:DiscountCodeNonApplicableError) error is returned.
912
+ *
913
+ */
914
+ export type DiscountCodeState = 'ApplicationStoppedByPreviousDiscount' | 'DoesNotMatchCart' | 'MatchesCart' | 'MaxApplicationReached' | 'NotActive' | 'NotValid' | string;
915
+ export interface DiscountOnTotalPrice {
916
+ /**
917
+ * Money value of the discount on the total price of the Cart or Order.
918
+ *
919
+ *
920
+ */
921
+ readonly discountedAmount: TypedMoney;
922
+ /**
923
+ * Discounts that impact the total price of the Cart or Order.
924
+ *
925
+ *
926
+ */
927
+ readonly includedDiscounts: DiscountedTotalPricePortion[];
928
+ /**
929
+ * Money value of the discount on the total net price of the Cart or Order.
930
+ * Present only when `taxedPrice` of the Cart or Order exists.
931
+ *
932
+ *
933
+ */
934
+ readonly discountedNetAmount?: TypedMoney;
935
+ /**
936
+ * Money value of the discount on the total gross price of the Cart or Order.
937
+ * Present only when `taxedPrice` of the Cart or Order exists.
938
+ *
939
+ *
940
+ */
941
+ readonly discountedGrossAmount?: TypedMoney;
942
+ }
943
+ export interface DiscountedLineItemPortion {
944
+ /**
945
+ * A [CartDiscountReference](ctp:api:type:CartDiscountReference) or [DirectDiscountReference](ctp:api:type:DirectDiscountReference) of the applicable discount on the Line Item.
946
+ *
947
+ *
948
+ */
949
+ readonly discount: Reference;
950
+ /**
951
+ * Money value of the applicable discount.
952
+ *
953
+ *
954
+ */
955
+ readonly discountedAmount: TypedMoney;
956
+ }
957
+ export interface DiscountedLineItemPortionDraft {
958
+ /**
959
+ * A [CartDiscountReference](ctp:api:type:CartDiscountReference) or [DirectDiscountReference](ctp:api:type:DirectDiscountReference) for the discount applicable on the Line Item.
960
+ *
961
+ *
962
+ */
963
+ readonly discount: Reference;
964
+ /**
965
+ * Money value for the discount applicable.
966
+ *
967
+ *
968
+ */
969
+ readonly discountedAmount: TypedMoneyDraft;
970
+ }
971
+ export interface DiscountedLineItemPrice {
972
+ /**
973
+ * Money value of the discounted Line Item or Custom Line Item.
974
+ *
975
+ *
976
+ */
977
+ readonly value: TypedMoney;
978
+ /**
979
+ * Discount applicable on the Line Item or Custom Line Item.
980
+ *
981
+ *
982
+ */
983
+ readonly includedDiscounts: DiscountedLineItemPortion[];
984
+ }
985
+ export interface DiscountedLineItemPriceForQuantity {
986
+ /**
987
+ * Number of Line Items or Custom Line Items in the Cart.
988
+ *
989
+ *
990
+ */
991
+ readonly quantity: number;
992
+ /**
993
+ * Discounted price of the Line Item or Custom Line Item.
994
+ *
995
+ *
996
+ */
997
+ readonly discountedPrice: DiscountedLineItemPrice;
998
+ }
999
+ export interface DiscountedTotalPricePortion {
1000
+ /**
1001
+ * Cart Discount related to the discounted price.
1002
+ *
1003
+ *
1004
+ */
1005
+ readonly discount: CartDiscountReference;
1006
+ /**
1007
+ * Money value of the discount.
1008
+ *
1009
+ *
1010
+ */
1011
+ readonly discountedAmount: TypedMoney;
1012
+ }
1013
+ export interface ExternalLineItemTotalPrice {
1014
+ /**
1015
+ * Price of the Line Item.
1016
+ *
1017
+ *
1018
+ */
1019
+ readonly price: _Money;
1020
+ /**
1021
+ * Total price of the Line Item.
1022
+ *
1023
+ *
1024
+ */
1025
+ readonly totalPrice: _Money;
1026
+ }
1027
+ /**
1028
+ * Cannot be used in [LineItemDraft](ctp:api:type:LineItemDraft) or [CustomLineItemDraft](ctp:api:type:CustomLineItemDraft).
1029
+ *
1030
+ * Can only be set by these update actions:
1031
+ *
1032
+ * - [Set LineItem TaxAmount](ctp:api:type:CartSetLineItemTaxAmountAction), [Set CustomLineItem TaxAmount](ctp:api:type:CartSetCustomLineItemTaxAmountAction), or [Set ShippingMethod TaxAmount](ctp:api:type:CartSetShippingMethodTaxAmountAction) on Carts
1033
+ * - [Set LineItem TaxAmount](ctp:api:type:StagedOrderSetLineItemTaxAmountAction), [Set CustomLineItem TaxAmount](ctp:api:type:StagedOrderSetCustomLineItemTaxAmountAction), or [Set ShippingMethod TaxAmount](ctp:api:type:StagedOrderSetShippingMethodTaxAmountAction) on Order Edits
1034
+ *
1035
+ */
1036
+ export interface ExternalTaxAmountDraft {
1037
+ /**
1038
+ * Total gross amount (`totalNet` + `taxPortions`) of the Line Item or Custom Line Item.
1039
+ *
1040
+ *
1041
+ */
1042
+ readonly totalGross: _Money;
1043
+ /**
1044
+ * Tax Rates and subrates of states and countries.
1045
+ *
1046
+ *
1047
+ */
1048
+ readonly taxRate: ExternalTaxRateDraft;
1049
+ }
1050
+ /**
1051
+ * Controls calculation of taxed prices for Line Items, Custom Line Items, and Shipping Methods as explained in [Cart tax calculation](ctp:api:type:CartTaxCalculation).
1052
+ *
1053
+ */
1054
+ export interface ExternalTaxRateDraft {
1055
+ /**
1056
+ * Name of the Tax Rate.
1057
+ *
1058
+ *
1059
+ */
1060
+ readonly name: string;
1061
+ /**
1062
+ * Percentage in the range of 0-1.
1063
+ *
1064
+ * - If no `subRates` are specified, a value must be defined.
1065
+ * - If `subRates` are specified, this can be omitted or its value must be the sum of all `subRates` amounts.
1066
+ *
1067
+ *
1068
+ */
1069
+ readonly amount?: number;
1070
+ /**
1071
+ * - If set to `false`, the related price is considered the net price and the provided `amount` is applied to calculate the gross price.
1072
+ * - If set to `true`, the related price is considered the gross price, and the provided `amount` is applied to calculate the net price.
1073
+ *
1074
+ *
1075
+ */
1076
+ readonly includedInPrice?: boolean;
1077
+ /**
1078
+ * Country for which the tax applies.
1079
+ *
1080
+ *
1081
+ */
1082
+ readonly country: string;
1083
+ /**
1084
+ * State within the specified country.
1085
+ *
1086
+ *
1087
+ */
1088
+ readonly state?: string;
1089
+ /**
1090
+ * Used when the total tax is a combination of multiple taxes (for example, local, state/provincial, and/or federal taxes). The total of all subrates must equal the TaxRate `amount`.
1091
+ * These subrates are used to calculate the `taxPortions` field of a [Cart](ctp:api:type:Cart) or [Order](ctp:api:type:Order) and the `taxedPrice` field of [LineItems](ctp:api:type:LineItem), [CustomLineItems](ctp:api:type:CustomLineItem), and [ShippingInfos](ctp:api:type:ShippingInfo).
1092
+ *
1093
+ *
1094
+ */
1095
+ readonly subRates?: SubRate[];
1096
+ }
1097
+ /**
1098
+ * Indicates how Line Items in a Cart are tracked.
1099
+ *
1100
+ */
1101
+ export type InventoryMode = 'None' | 'ReserveOnOrder' | 'TrackOnly' | string;
1102
+ export interface ItemShippingDetails {
1103
+ /**
1104
+ * Holds information on the quantity of Line Items or Custom Line Items and the address it is shipped.
1105
+ *
1106
+ *
1107
+ */
1108
+ readonly targets: ItemShippingTarget[];
1109
+ /**
1110
+ * - `true` if the quantity of Line Items or Custom Line Items is equal to the sum of sub-quantities defined in `targets`.
1111
+ * - `false` if the quantity of Line Items or Custom Line Items is not equal to the sum of sub-quantities defined in `targets`.
1112
+ * Ordering a Cart when the value is `false` returns an [InvalidItemShippingDetails](ctp:api:type:InvalidItemShippingDetailsError) error.
1113
+ *
1114
+ *
1115
+ */
1116
+ readonly valid: boolean;
1117
+ }
1118
+ /**
1119
+ * For order creation and updates, the sum of the `targets` must match the quantity of the Line Items or Custom Line Items.
1120
+ *
1121
+ */
1122
+ export interface ItemShippingDetailsDraft {
1123
+ /**
1124
+ * Holds information on the quantity of Line Items or Custom Line Items and the address it is shipped.
1125
+ *
1126
+ * If multiple shipping addresses are present for a Line Item or Custom Line Item, sub-quantities must be specified.
1127
+ *
1128
+ *
1129
+ */
1130
+ readonly targets: ItemShippingTarget[];
1131
+ }
1132
+ /**
1133
+ * Determines the address (as a reference to an address in `itemShippingAddresses`) and the quantity shipped to the address.
1134
+ *
1135
+ * If multiple shipping addresses are present for a Line Item or Custom Line Item, sub-quantities must be specified.
1136
+ * An array of addresses and sub-quantities is stored per Line Item or Custom Line Item.
1137
+ *
1138
+ */
1139
+ export interface ItemShippingTarget {
1140
+ /**
1141
+ * Key of the address in the [Cart](ctp:api:type:Cart) `itemShippingAddresses`.
1142
+ * Duplicate address keys are not allowed.
1143
+ *
1144
+ *
1145
+ */
1146
+ readonly addressKey: string;
1147
+ /**
1148
+ * Quantity of Line Items or Custom Line Items shipped to the address with the specified `addressKey`.
1149
+ *
1150
+ * If a quantity is updated to `0` when defining [ItemShippingDetailsDraft](ctp:api:type:ItemShippingDetailsDraft), the `targets` are removed from a Line Item or Custom Line Item in the resulting [ItemShippingDetails](ctp:api:type:ItemShippingDetails).
1151
+ *
1152
+ *
1153
+ */
1154
+ readonly quantity: number;
1155
+ /**
1156
+ * User-defined unique identifier of the Shipping Method in a Cart with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
1157
+ *
1158
+ * It connects Line Item or Custom Line Item quantities with individual Shipping Methods.
1159
+ *
1160
+ */
1161
+ readonly shippingMethodKey?: string;
1162
+ }
1163
+ /**
1164
+ * The representation of a [Line Item](/../api/carts-orders-overview#line-items) in a [Cart](ctp:api:type:Cart) or in an [Order](ctp:api:type:Order).
1165
+ *
1166
+ */
1167
+ export interface LineItem {
1168
+ /**
1169
+ * Unique identifier of the LineItem.
1170
+ *
1171
+ *
1172
+ */
1173
+ readonly id: string;
1174
+ /**
1175
+ * User-defined unique identifier of the LineItem.
1176
+ *
1177
+ *
1178
+ */
1179
+ readonly key?: string;
1180
+ /**
1181
+ * `id` of the [Product](ctp:api:type:Product) the Line Item is based on.
1182
+ *
1183
+ *
1184
+ */
1185
+ readonly productId: string;
1186
+ /**
1187
+ * `key` of the [Product](ctp:api:type:Product).
1188
+ *
1189
+ * This field is only present on:
1190
+ *
1191
+ * - Line Items in a [Cart](ctp:api:type:Cart) when the `key` is available on that specific Product at the time the LineItem was created or updated on the Cart.
1192
+ * - Line Items in an [Order](ctp:api:type:Order) when the `key` is available on the specific Product at the time the Order was created from the Cart.
1193
+ *
1194
+ * Present on resources created or updated after 3 December 2021.
1195
+ *
1196
+ *
1197
+ */
1198
+ readonly productKey?: string;
1199
+ /**
1200
+ * Name of the Product.
1201
+ *
1202
+ *
1203
+ */
1204
+ readonly name: LocalizedString;
1205
+ /**
1206
+ * `slug` of the current version of the Product. Updated automatically if the `slug` changes. Empty if the Product has been deleted.
1207
+ * The `productSlug` field of LineItem is not expanded when using [Reference Expansion](/../api/general-concepts#reference-expansion).
1208
+ *
1209
+ *
1210
+ */
1211
+ readonly productSlug?: LocalizedString;
1212
+ /**
1213
+ * Product Type of the Product.
1214
+ *
1215
+ *
1216
+ */
1217
+ readonly productType: ProductTypeReference;
1218
+ /**
1219
+ * Holds the data of the Product Variant added to the Cart.
1220
+ *
1221
+ * The data is saved at the time the Product Variant is added to the Cart and is not updated automatically when Product Variant data changes.
1222
+ * Must be updated using the [Recalculate](ctp:api:type:CartRecalculateAction) update action.
1223
+ *
1224
+ *
1225
+ */
1226
+ readonly variant: ProductVariant;
1227
+ /**
1228
+ * Price of a Line Item selected from the Product Variant according to the [Product](ctp:api:type:Product) `priceMode`. If the `priceMode` is `Embedded` [ProductPriceMode](ctp:api:type:ProductPriceModeEnum) and the `variant` field hasn't been updated, the price may not correspond to a price in `variant.prices`.
1229
+ *
1230
+ *
1231
+ */
1232
+ readonly price: Price;
1233
+ /**
1234
+ * Number of Line Items of the given Product Variant present in the [Cart](ctp:api:type:Cart) or [Order](ctp:api:type:Order).
1235
+ *
1236
+ *
1237
+ */
1238
+ readonly quantity: number;
1239
+ /**
1240
+ * Total price of this Line Item equalling `price` multiplied by `quantity`. If the Line Item is discounted, the total price is the `discountedPricePerQuantity` multiplied by `quantity`.
1241
+ * Includes taxes if the [TaxRate](ctp:api:type:TaxRate) `includedInPrice` is `true`.
1242
+ *
1243
+ *
1244
+ */
1245
+ readonly totalPrice: CentPrecisionMoney;
1246
+ /**
1247
+ * Discounted price of a single quantity of the Line Item.
1248
+ *
1249
+ *
1250
+ */
1251
+ readonly discountedPricePerQuantity: DiscountedLineItemPriceForQuantity[];
1252
+ /**
1253
+ * Automatically set after `taxRate` is set.
1254
+ *
1255
+ *
1256
+ */
1257
+ readonly taxedPrice?: TaxedItemPrice;
1258
+ /**
1259
+ * Total taxed prices based on the quantity of Line Item assigned to each [Shipping Method](ctp:api:type:ShippingMethod). Only applicable for Carts with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
1260
+ * Automatically set after `perMethodTaxRate` is set.
1261
+ *
1262
+ */
1263
+ readonly taxedPricePortions: MethodTaxedPrice[];
1264
+ /**
1265
+ * State of the Line Item in the [Cart](ctp:api:type:Cart) or the [Order](ctp:api:type:Order).
1266
+ *
1267
+ *
1268
+ */
1269
+ readonly state: ItemState[];
1270
+ /**
1271
+ * - For a Cart with `Platform` [TaxMode](ctp:api:type:TaxMode), the `taxRate` of Line Items is set automatically once a shipping address is set. The rate is based on the [TaxCategory](ctp:api:type:TaxCategory) that applies for the shipping address.
1272
+ * - For a Cart with `External` TaxMode, the `taxRate` of Line Items can be set using [ExternalTaxRateDraft](ctp:api:type:ExternalTaxRateDraft).
1273
+ *
1274
+ *
1275
+ */
1276
+ readonly taxRate?: TaxRate;
1277
+ /**
1278
+ * Tax Rate per Shipping Method for a Cart with `Multiple` [ShippingMode](ctp:api:type:ShippingMode). For a Cart with `Platform` [TaxMode](ctp:api:type:TaxMode) it is automatically set after the [Shipping Method is added](ctp:api:type:CartAddShippingMethodAction).
1279
+ * For a Cart with `External` [TaxMode](ctp:api:type:TaxMode), the Tax Rate must be set with [ExternalTaxRateDraft](ctp:api:type:ExternalTaxRateDraft).
1280
+ *
1281
+ */
1282
+ readonly perMethodTaxRate: MethodTaxRate[];
1283
+ /**
1284
+ * Identifies [Inventory entries](/../api/projects/inventory) that are reserved. The referenced Channel has the `InventorySupply` [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum).
1285
+ *
1286
+ *
1287
+ */
1288
+ readonly supplyChannel?: ChannelReference;
1289
+ /**
1290
+ * Used to [select](/../api/pricing-and-discounts-overview#line-item-price-selection) a Product Price. The referenced Channel has the `ProductDistribution` [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum).
1291
+ *
1292
+ *
1293
+ */
1294
+ readonly distributionChannel?: ChannelReference;
1295
+ /**
1296
+ * Indicates how the Price for the Line Item is set.
1297
+ *
1298
+ *
1299
+ */
1300
+ readonly priceMode: LineItemPriceMode;
1301
+ /**
1302
+ * Indicates how the Line Item is added to the Cart.
1303
+ *
1304
+ *
1305
+ */
1306
+ readonly lineItemMode: LineItemMode;
1307
+ /**
1308
+ * Inventory mode specific to this Line Item only, and valid for the entire `quantity` of the Line Item.
1309
+ * Only present if the inventory mode is different from the `inventoryMode` specified on the [Cart](ctp:api:type:Cart).
1310
+ *
1311
+ *
1312
+ */
1313
+ readonly inventoryMode?: InventoryMode;
1314
+ /**
1315
+ * Container for Line Item-specific addresses.
1316
+ *
1317
+ *
1318
+ */
1319
+ readonly shippingDetails?: ItemShippingDetails;
1320
+ /**
1321
+ * Custom Fields of the Line Item.
1322
+ *
1323
+ *
1324
+ */
1325
+ readonly custom?: CustomFields;
1326
+ /**
1327
+ * Date and time (UTC) the Line Item was added to the Cart.
1328
+ *
1329
+ *
1330
+ */
1331
+ readonly addedAt?: string;
1332
+ /**
1333
+ * Date and time (UTC) the Line Item was last updated.
1334
+ *
1335
+ *
1336
+ */
1337
+ readonly lastModifiedAt?: string;
1338
+ }
1339
+ /**
1340
+ * For Product Variant identification, either the `productId` and `variantId`, or `sku` must be provided.
1341
+ *
1342
+ */
1343
+ export interface LineItemDraft {
1344
+ /**
1345
+ * User-defined unique identifier of the LineItem.
1346
+ *
1347
+ *
1348
+ */
1349
+ readonly key?: string;
1350
+ /**
1351
+ * `id` of a published [Product](ctp:api:type:Product).
1352
+ *
1353
+ *
1354
+ */
1355
+ readonly productId?: string;
1356
+ /**
1357
+ * `id` of the [ProductVariant](ctp:api:type:ProductVariant) in the Product.
1358
+ * If not provided, the Master Variant is used.
1359
+ *
1360
+ *
1361
+ */
1362
+ readonly variantId?: number;
1363
+ /**
1364
+ * `sku` of the [ProductVariant](ctp:api:type:ProductVariant).
1365
+ *
1366
+ *
1367
+ */
1368
+ readonly sku?: string;
1369
+ /**
1370
+ * Quantity of the Product Variant to add to the Cart.
1371
+ *
1372
+ *
1373
+ */
1374
+ readonly quantity?: number;
1375
+ /**
1376
+ * Date and time (UTC) the Product Variant is added to the Cart.
1377
+ * If not set, it defaults to the current date and time.
1378
+ *
1379
+ * Optional for backwards compatibility reasons.
1380
+ *
1381
+ *
1382
+ */
1383
+ readonly addedAt?: string;
1384
+ /**
1385
+ * Used to [select](/../api/pricing-and-discounts-overview#line-item-price-selection) a Product Price.
1386
+ * The referenced Channel must have the `ProductDistribution` [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum).
1387
+ *
1388
+ * If the Cart is bound to a [Store](ctp:api:type:Store) with `distributionChannels` set,
1389
+ * the Channel must match one of the Store's distribution channels.
1390
+ *
1391
+ *
1392
+ */
1393
+ readonly distributionChannel?: ChannelResourceIdentifier;
1394
+ /**
1395
+ * Used to identify [Inventory entries](/../api/projects/inventory) that must be reserved.
1396
+ * The referenced Channel must have the `InventorySupply` [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum).
1397
+ *
1398
+ *
1399
+ */
1400
+ readonly supplyChannel?: ChannelResourceIdentifier;
1401
+ /**
1402
+ * Sets the [LineItem](ctp:api:type:LineItem) `price` value, and the `priceMode` to `ExternalPrice` [LineItemPriceMode](ctp:api:type:LineItemPriceMode).
1403
+ *
1404
+ *
1405
+ */
1406
+ readonly externalPrice?: _Money;
1407
+ /**
1408
+ * Sets the [LineItem](ctp:api:type:LineItem) `price` and `totalPrice` values, and the `priceMode` to `ExternalTotal` [LineItemPriceMode](ctp:api:type:LineItemPriceMode).
1409
+ *
1410
+ *
1411
+ */
1412
+ readonly externalTotalPrice?: ExternalLineItemTotalPrice;
1413
+ /**
1414
+ * Sets the external Tax Rate for the Line Item, if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode) and `Single` [ShippingMode](ctp:api:type:ShippingMode). If the Cart has `Multiple` [ShippingMode](ctp:api:type:ShippingMode), the Tax Rate is accepted but ignored.
1415
+ *
1416
+ *
1417
+ */
1418
+ readonly externalTaxRate?: ExternalTaxRateDraft;
1419
+ /**
1420
+ * Sets the external Tax Rates for individual Shipping Methods, if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode) and `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
1421
+ *
1422
+ *
1423
+ */
1424
+ readonly perMethodExternalTaxRate?: MethodExternalTaxRateDraft[];
1425
+ /**
1426
+ * Inventory mode specific to the Line Item only, and valid for the entire `quantity` of the Line Item.
1427
+ * Set only if the inventory mode should be different from the `inventoryMode` specified on the [Cart](ctp:api:type:Cart).
1428
+ *
1429
+ *
1430
+ */
1431
+ readonly inventoryMode?: InventoryMode;
1432
+ /**
1433
+ * Container for Line Item-specific addresses.
1434
+ *
1435
+ *
1436
+ */
1437
+ readonly shippingDetails?: ItemShippingDetailsDraft;
1438
+ /**
1439
+ * Custom Fields for the Line Item.
1440
+ *
1441
+ *
1442
+ */
1443
+ readonly custom?: CustomFieldsDraft;
1444
+ }
1445
+ /**
1446
+ * Indicates how a Line Item was added to a Cart.
1447
+ *
1448
+ */
1449
+ export type LineItemMode = 'GiftLineItem' | 'Standard' | string;
1450
+ /**
1451
+ * This mode indicates how the price is set for the Line Item.
1452
+ *
1453
+ */
1454
+ export type LineItemPriceMode = 'ExternalPrice' | 'ExternalTotal' | 'Platform' | string;
1455
+ export interface MethodExternalTaxRateDraft {
1456
+ /**
1457
+ * User-defined unique identifier of the Shipping Method in a Cart with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
1458
+ *
1459
+ *
1460
+ */
1461
+ readonly shippingMethodKey: string;
1462
+ /**
1463
+ * External Tax Rate for the Shipping Method, if the Cart has `External` [TaxMode](ctp:api:type:TaxMode).
1464
+ *
1465
+ *
1466
+ */
1467
+ readonly taxRate?: ExternalTaxRateDraft;
1468
+ }
1469
+ export interface MethodTaxRate {
1470
+ /**
1471
+ * User-defined unique identifier of the Shipping Method in a Cart with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
1472
+ *
1473
+ *
1474
+ */
1475
+ readonly shippingMethodKey: string;
1476
+ /**
1477
+ * Tax Rate for the Shipping Method.
1478
+ *
1479
+ *
1480
+ */
1481
+ readonly taxRate?: TaxRate;
1482
+ }
1483
+ export interface MethodTaxedPrice {
1484
+ /**
1485
+ * User-defined unique identifier of the [Shipping Method](ctp:api:type:ShippingMethod) in a Cart with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
1486
+ *
1487
+ *
1488
+ */
1489
+ readonly shippingMethodKey: string;
1490
+ /**
1491
+ * Total taxed price based on the quantity of the Line Item or Custom Line Item assigned to the Shipping Method identified by `shippingMethodKey`.
1492
+ *
1493
+ *
1494
+ */
1495
+ readonly taxedPrice?: TaxedItemPrice;
1496
+ }
1497
+ /**
1498
+ * Used for [replicating an existing Cart](ctp:api:endpoint:/{projectKey}/carts/replicate:POST) or Order.
1499
+ *
1500
+ */
1501
+ export interface ReplicaCartDraft {
1502
+ /**
1503
+ * [Reference](ctp:api:type:Reference) to a [Cart](ctp:api:type:Cart) or [Order](ctp:api:type:Order) that is replicated.
1504
+ *
1505
+ *
1506
+ */
1507
+ readonly reference: CartReference | OrderReference;
1508
+ /**
1509
+ * User-defined unique identifier for the Cart.
1510
+ *
1511
+ *
1512
+ */
1513
+ readonly key?: string;
1514
+ }
1515
+ /**
1516
+ * Determines how monetary values are rounded.
1517
+ *
1518
+ */
1519
+ export type RoundingMode = 'HalfDown' | 'HalfEven' | 'HalfUp' | string;
1520
+ export interface Shipping {
1521
+ /**
1522
+ * User-defined unique identifier of the Shipping in a Cart with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
1523
+ *
1524
+ *
1525
+ */
1526
+ readonly shippingKey: string;
1527
+ /**
1528
+ * Automatically set when the [Shipping Method is added](ctp:api:type:CartAddShippingMethodAction).
1529
+ *
1530
+ *
1531
+ */
1532
+ readonly shippingInfo: ShippingInfo;
1533
+ /**
1534
+ * Determines the shipping rates and Tax Rates of associated Line Items.
1535
+ *
1536
+ *
1537
+ */
1538
+ readonly shippingAddress: Address;
1539
+ /**
1540
+ * Used as an input to select a [ShippingRatePriceTier](ctp:api:type:ShippingRatePriceTier).
1541
+ * The data type of this field depends on the `shippingRateInputType.type` configured in the [Project](ctp:api:type:Project):
1542
+ *
1543
+ * - If `CartClassification`, it is [ClassificationShippingRateInput](ctp:api:type:ClassificationShippingRateInput).
1544
+ * - If `CartScore`, it is [ScoreShippingRateInput](ctp:api:type:ScoreShippingRateInput).
1545
+ * - If `CartValue`, it cannot be used.
1546
+ *
1547
+ *
1548
+ */
1549
+ readonly shippingRateInput?: ShippingRateInput;
1550
+ /**
1551
+ * Custom Fields of Shipping with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
1552
+ *
1553
+ *
1554
+ */
1555
+ readonly shippingCustomFields?: CustomFields;
1556
+ }
1557
+ /**
1558
+ * Wraps all shipping-related information (such as address, rate, deliveries) per Shipping Method for Carts with multiple Shipping Methods.
1559
+ *
1560
+ */
1561
+ export interface ShippingDraft {
1562
+ /**
1563
+ * User-defined unique identifier for the Shipping in a Cart with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
1564
+ *
1565
+ *
1566
+ */
1567
+ readonly key: string;
1568
+ /**
1569
+ * Shipping Methods added to the Cart with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
1570
+ *
1571
+ *
1572
+ */
1573
+ readonly shippingMethod?: ShippingMethodReference;
1574
+ /**
1575
+ * Determines the shipping rate and Tax Rate of the associated Line Items.
1576
+ *
1577
+ *
1578
+ */
1579
+ readonly shippingAddress: _BaseAddress;
1580
+ /**
1581
+ * Input used to select a [ShippingRatePriceTier](ctp:api:type:ShippingRatePriceTier).
1582
+ * The data type of this field depends on the `shippingRateInputType.type` configured in the [Project](ctp:api:type:Project):
1583
+ *
1584
+ * - If `CartClassification`, it must be [ClassificationShippingRateInputDraft](ctp:api:type:ClassificationShippingRateInputDraft).
1585
+ * - If `CartScore`, it must be [ScoreShippingRateInputDraft](ctp:api:type:ScoreShippingRateInputDraft).
1586
+ * - If `CartValue`, it cannot be set.
1587
+ *
1588
+ *
1589
+ */
1590
+ readonly shippingRateInput?: ShippingRateInputDraft;
1591
+ /**
1592
+ * Tax Rate used for taxing a shipping expense if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode).
1593
+ *
1594
+ *
1595
+ */
1596
+ readonly externalTaxRate?: ExternalTaxRateDraft;
1597
+ /**
1598
+ * Deliveries to be shipped with the Shipping Method.
1599
+ *
1600
+ *
1601
+ */
1602
+ readonly deliveries?: DeliveryDraft[];
1603
+ /**
1604
+ * Custom Fields for Shipping.
1605
+ *
1606
+ *
1607
+ */
1608
+ readonly custom?: CustomFieldsDraft;
1609
+ }
1610
+ export interface ShippingInfo {
1611
+ /**
1612
+ * Name of the Shipping Method.
1613
+ *
1614
+ *
1615
+ */
1616
+ readonly shippingMethodName: string;
1617
+ /**
1618
+ * Determined based on the [ShippingRate](ctp:api:type:ShippingRate) and its tiered prices, and either the sum of [LineItem](ctp:api:type:LineItem) prices or the `shippingRateInput` field.
1619
+ *
1620
+ *
1621
+ */
1622
+ readonly price: CentPrecisionMoney;
1623
+ /**
1624
+ * Used to determine the price.
1625
+ *
1626
+ *
1627
+ */
1628
+ readonly shippingRate: ShippingRate;
1629
+ /**
1630
+ * Automatically set after the `taxRate` is set.
1631
+ *
1632
+ *
1633
+ */
1634
+ readonly taxedPrice?: TaxedItemPrice;
1635
+ /**
1636
+ * Automatically set in the `Platform` [TaxMode](ctp:api:type:TaxMode) after the [shipping address is set](ctp:api:type:CartSetShippingAddressAction).
1637
+ *
1638
+ * For the `External` [TaxMode](ctp:api:type:TaxMode) the Tax Rate must be set explicitly with the [ExternalTaxRateDraft](ctp:api:type:ExternalTaxRateDraft).
1639
+ *
1640
+ *
1641
+ */
1642
+ readonly taxRate?: TaxRate;
1643
+ /**
1644
+ * Used to select a Tax Rate when a Cart has the `Platform` [TaxMode](ctp:api:type:TaxMode).
1645
+ *
1646
+ *
1647
+ */
1648
+ readonly taxCategory?: TaxCategoryReference;
1649
+ /**
1650
+ * Not set if a custom Shipping Method is used.
1651
+ *
1652
+ *
1653
+ */
1654
+ readonly shippingMethod?: ShippingMethodReference;
1655
+ /**
1656
+ * Information on how items are delivered to customers.
1657
+ *
1658
+ *
1659
+ */
1660
+ readonly deliveries?: Delivery[];
1661
+ /**
1662
+ * Discounted price of the Shipping Method.
1663
+ *
1664
+ *
1665
+ */
1666
+ readonly discountedPrice?: DiscountedLineItemPrice;
1667
+ /**
1668
+ * Indicates whether the [ShippingMethod](ctp:api:type:ShippingMethod) referenced in this ShippingInfo is allowed for the Cart.
1669
+ *
1670
+ *
1671
+ */
1672
+ readonly shippingMethodState: ShippingMethodState;
1673
+ }
1674
+ /**
1675
+ * Determines whether the selected [ShippingMethod](ctp:api:type:ShippingMethod) is allowed for the Cart. For more information, see [Predicates](/shipping-delivery-overview#predicates).
1676
+ *
1677
+ */
1678
+ export type ShippingMethodState = 'DoesNotMatchCart' | 'MatchesCart' | string;
1679
+ export type ShippingMode = 'Multiple' | 'Single' | string;
1680
+ export type ShippingRateInput = ClassificationShippingRateInput | ScoreShippingRateInput;
1681
+ export interface ClassificationShippingRateInput {
1682
+ readonly type: 'Classification';
1683
+ /**
1684
+ * Key of the value used as a programmatic identifier.
1685
+ *
1686
+ *
1687
+ */
1688
+ readonly key: string;
1689
+ /**
1690
+ * Descriptive localized label of the value.
1691
+ *
1692
+ *
1693
+ */
1694
+ readonly label: LocalizedString;
1695
+ }
1696
+ export interface ScoreShippingRateInput {
1697
+ readonly type: 'Score';
1698
+ /**
1699
+ * Abstract value for categorizing a Cart.
1700
+ *
1701
+ *
1702
+ */
1703
+ readonly score: number;
1704
+ }
1705
+ /**
1706
+ * Generic type holding specifc ShippingRateInputDraft types.
1707
+ */
1708
+ export type ShippingRateInputDraft = ClassificationShippingRateInputDraft | ScoreShippingRateInputDraft;
1709
+ export interface ClassificationShippingRateInputDraft {
1710
+ readonly type: 'Classification';
1711
+ /**
1712
+ * Key of the value used as a programmatic identifier.
1713
+ *
1714
+ *
1715
+ */
1716
+ readonly key: string;
1717
+ }
1718
+ export interface ScoreShippingRateInputDraft {
1719
+ readonly type: 'Score';
1720
+ /**
1721
+ * Abstract value for categorizing a Cart.
1722
+ *
1723
+ *
1724
+ */
1725
+ readonly score: number;
1726
+ }
1727
+ /**
1728
+ * Determines in which [Tax calculation mode](/carts-orders-overview#tax-calculation-mode) taxed prices are calculated.
1729
+ *
1730
+ */
1731
+ export type TaxCalculationMode = 'LineItemLevel' | 'UnitPriceLevel' | string;
1732
+ /**
1733
+ * Indicates how taxes are set on the Cart.
1734
+ *
1735
+ */
1736
+ export type TaxMode = 'Disabled' | 'External' | 'ExternalAmount' | 'Platform' | string;
1737
+ /**
1738
+ * The tax portions are calculated from the [TaxRates](ctp:api:type:TaxRate).
1739
+ * If a Tax Rate has [SubRates](ctp:api:type:SubRate), they are used and can be identified by name.
1740
+ * Tax portions from Line Items with the same `rate` and `name` are accumulated to the same tax portion.
1741
+ *
1742
+ */
1743
+ export interface TaxPortion {
1744
+ /**
1745
+ * Name of the tax portion.
1746
+ *
1747
+ *
1748
+ */
1749
+ readonly name?: string;
1750
+ /**
1751
+ * A number in the range 0-1.
1752
+ *
1753
+ *
1754
+ */
1755
+ readonly rate: number;
1756
+ /**
1757
+ * Money value of the tax portion.
1758
+ *
1759
+ *
1760
+ */
1761
+ readonly amount: CentPrecisionMoney;
1762
+ }
1763
+ /**
1764
+ * Represents the portions that sum up to the `totalGross` field of a [TaxedPrice](ctp:api:type:TaxedPrice).
1765
+ *
1766
+ * The portions are calculated from the [TaxRates](ctp:api:type:TaxRate).
1767
+ * If a Tax Rate has [SubRates](ctp:api:type:SubRate), they are used and can be identified by name.
1768
+ * Tax portions from Line Items with the same `rate` and `name` will be accumulated to the same tax portion.
1769
+ *
1770
+ */
1771
+ export interface TaxPortionDraft {
1772
+ /**
1773
+ * Name of the tax portion.
1774
+ *
1775
+ *
1776
+ */
1777
+ readonly name?: string;
1778
+ /**
1779
+ * A number in the range 0-1.
1780
+ *
1781
+ *
1782
+ */
1783
+ readonly rate: number;
1784
+ /**
1785
+ * Money value for the tax portion.
1786
+ *
1787
+ *
1788
+ */
1789
+ readonly amount: _Money;
1790
+ }
1791
+ export interface TaxedItemPrice {
1792
+ /**
1793
+ * Total net amount of the Line Item or Custom Line Item.
1794
+ *
1795
+ *
1796
+ */
1797
+ readonly totalNet: CentPrecisionMoney;
1798
+ /**
1799
+ * Total gross amount of the Line Item or Custom Line Item.
1800
+ *
1801
+ *
1802
+ */
1803
+ readonly totalGross: CentPrecisionMoney;
1804
+ /**
1805
+ * Taxable portions added to the total net price.
1806
+ *
1807
+ * Calculated from the [TaxRates](ctp:api:type:TaxRate).
1808
+ *
1809
+ *
1810
+ */
1811
+ readonly taxPortions: TaxPortion[];
1812
+ /**
1813
+ * Total tax applicable for the Line Item or Custom Line Item.
1814
+ * Automatically calculated as the difference between the `totalGross` and `totalNet` values.
1815
+ *
1816
+ *
1817
+ */
1818
+ readonly totalTax?: CentPrecisionMoney;
1819
+ }
1820
+ export interface TaxedPrice {
1821
+ /**
1822
+ * Total net price of the Cart or Order.
1823
+ *
1824
+ *
1825
+ */
1826
+ readonly totalNet: CentPrecisionMoney;
1827
+ /**
1828
+ * Total gross price of the Cart or Order.
1829
+ *
1830
+ *
1831
+ */
1832
+ readonly totalGross: CentPrecisionMoney;
1833
+ /**
1834
+ * Taxable portions added to the total net price.
1835
+ *
1836
+ * Calculated from the [TaxRates](ctp:api:type:TaxRate).
1837
+ *
1838
+ *
1839
+ */
1840
+ readonly taxPortions: TaxPortion[];
1841
+ /**
1842
+ * Total tax applicable for the Cart or Order.
1843
+ *
1844
+ * Automatically calculated as the difference between the `totalGross` and `totalNet` values.
1845
+ *
1846
+ *
1847
+ */
1848
+ readonly totalTax?: CentPrecisionMoney;
1849
+ }
1850
+ export interface TaxedPriceDraft {
1851
+ /**
1852
+ * Total net price of the Cart or Order.
1853
+ *
1854
+ *
1855
+ */
1856
+ readonly totalNet: _Money;
1857
+ /**
1858
+ * Total gross price of the Cart or Order.
1859
+ *
1860
+ *
1861
+ */
1862
+ readonly totalGross: _Money;
1863
+ /**
1864
+ * Taxable portions added to the `totalGross`.
1865
+ *
1866
+ * Calculated from the [TaxRates](ctp:api:type:TaxRate).
1867
+ *
1868
+ *
1869
+ */
1870
+ readonly taxPortions: TaxPortionDraft[];
1871
+ /**
1872
+ * Total tax applicable for the Cart or Order.
1873
+ *
1874
+ *
1875
+ */
1876
+ readonly totalTax?: TypedMoneyDraft;
1877
+ }
1878
+ /**
1879
+ * If the Cart already contains a [CustomLineItem](ctp:api:type:CustomLineItem) with the same `slug`, `name`, `money`, `taxCategory`, `state`,
1880
+ * and Custom Fields, then only the quantity of the existing Custom Line Item is increased.
1881
+ * If [CustomLineItem](ctp:api:type:CustomLineItem) `shippingDetails` are set, they are merged with the `targets` that already exist on the
1882
+ * [ItemShippingDetails](ctp:api:type:ItemShippingDetails) of the Custom Line Item.
1883
+ * In case of overlapping address keys the [ItemShippingTarget](ctp:api:type:ItemShippingTarget) `quantity` is summed up.
1884
+ *
1885
+ * If the Cart already contains a Custom Line Item with the same slug that is otherwise not identical, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned.
1886
+ *
1887
+ * If the Tax Rate is not set, a [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError) error is returned.
1888
+ *
1889
+ */
1890
+ export interface CartAddCustomLineItemAction {
1891
+ readonly action: 'addCustomLineItem';
1892
+ /**
1893
+ * Money value of the Custom Line Item.
1894
+ * The value can be negative.
1895
+ *
1896
+ *
1897
+ */
1898
+ readonly money: _Money;
1899
+ /**
1900
+ * Name of the Custom Line Item.
1901
+ *
1902
+ *
1903
+ */
1904
+ readonly name: LocalizedString;
1905
+ /**
1906
+ * User-defined unique identifier of the Custom Line Item.
1907
+ *
1908
+ *
1909
+ */
1910
+ readonly key?: string;
1911
+ /**
1912
+ * Number of Custom Line Items to add to the Cart.
1913
+ *
1914
+ *
1915
+ */
1916
+ readonly quantity?: number;
1917
+ /**
1918
+ * User-defined identifier used in a deep-link URL for the Custom Line Item.
1919
+ * It must match the pattern `[a-zA-Z0-9_-]{2,256}`.
1920
+ *
1921
+ *
1922
+ */
1923
+ readonly slug: string;
1924
+ /**
1925
+ * Used to select a Tax Rate when a Cart has the `Platform` [TaxMode](ctp:api:type:TaxMode).
1926
+ *
1927
+ * If [TaxMode](ctp:api:type:TaxMode) is `Platform`, this field must not be empty.
1928
+ *
1929
+ *
1930
+ */
1931
+ readonly taxCategory?: TaxCategoryResourceIdentifier;
1932
+ /**
1933
+ * An external Tax Rate can be set if the Cart has `External` [TaxMode](ctp:api:type:TaxMode).
1934
+ *
1935
+ *
1936
+ */
1937
+ readonly externalTaxRate?: ExternalTaxRateDraft;
1938
+ /**
1939
+ * Container for Custom Line Item-specific addresses.
1940
+ *
1941
+ *
1942
+ */
1943
+ readonly shippingDetails?: ItemShippingDetailsDraft;
1944
+ /**
1945
+ * Custom Fields for the Custom Line Item.
1946
+ *
1947
+ *
1948
+ */
1949
+ readonly custom?: CustomFieldsDraft;
1950
+ /**
1951
+ * - If `Standard`, Cart Discounts with a matching [CartDiscountCustomLineItemsTarget](ctp:api:type:CartDiscountCustomLineItemsTarget)
1952
+ * are applied to the Custom Line Item.
1953
+ * - If `External`, Cart Discounts are not considered on the Custom Line Item.
1954
+ *
1955
+ *
1956
+ */
1957
+ readonly priceMode?: CustomLineItemPriceMode;
1958
+ }
1959
+ /**
1960
+ * To add a custom Shipping Method (independent of the [ShippingMethods](ctp:api:type:ShippingMethod) managed through
1961
+ * the [Shipping Methods API](/projects/shippingMethods)) to the Cart, it **must have** the `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
1962
+ *
1963
+ */
1964
+ export interface CartAddCustomShippingMethodAction {
1965
+ readonly action: 'addCustomShippingMethod';
1966
+ /**
1967
+ * User-defined identifier for the custom Shipping Method that must be unique across the Cart with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
1968
+ *
1969
+ *
1970
+ */
1971
+ readonly shippingKey: string;
1972
+ /**
1973
+ * Name of the custom Shipping Method.
1974
+ *
1975
+ *
1976
+ */
1977
+ readonly shippingMethodName: string;
1978
+ /**
1979
+ * Determines the shipping rate and Tax Rate of the associated Line Items.
1980
+ *
1981
+ *
1982
+ */
1983
+ readonly shippingAddress: _BaseAddress;
1984
+ /**
1985
+ * Determines the shipping price.
1986
+ *
1987
+ *
1988
+ */
1989
+ readonly shippingRate: ShippingRateDraft;
1990
+ /**
1991
+ * Input used to select a [ShippingRatePriceTier](ctp:api:type:ShippingRatePriceTier).
1992
+ * The data type of this field depends on the `shippingRateInputType.type` configured in the [Project](ctp:api:type:Project):
1993
+ *
1994
+ * - If `CartClassification`, it must be [ClassificationShippingRateInputDraft](ctp:api:type:ClassificationShippingRateInputDraft).
1995
+ * - If `CartScore`, it must be [ScoreShippingRateInputDraft](ctp:api:type:ScoreShippingRateInputDraft).
1996
+ * - If `CartValue`, it cannot be set.
1997
+ *
1998
+ *
1999
+ */
2000
+ readonly shippingRateInput?: ShippingRateInputDraft;
2001
+ /**
2002
+ * Tax Category used to determine a shipping Tax Rate if the Cart has the `Platform` [TaxMode](ctp:api:type:TaxMode).
2003
+ *
2004
+ *
2005
+ */
2006
+ readonly taxCategory?: TaxCategoryResourceIdentifier;
2007
+ /**
2008
+ * Tax Rate used to tax a shipping expense if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode).
2009
+ *
2010
+ *
2011
+ */
2012
+ readonly externalTaxRate?: ExternalTaxRateDraft;
2013
+ /**
2014
+ * Deliveries to be shipped with the custom Shipping Method.
2015
+ *
2016
+ *
2017
+ */
2018
+ readonly deliveries?: DeliveryDraft[];
2019
+ /**
2020
+ * Custom Fields for the custom Shipping Method.
2021
+ *
2022
+ *
2023
+ */
2024
+ readonly custom?: CustomFieldsDraft;
2025
+ }
2026
+ /**
2027
+ * Adds a [DiscountCode](ctp:api:type:DiscountCode) to the Cart to activate the related [Cart Discounts](/../api/projects/cartDiscounts).
2028
+ * Adding a Discount Code is only possible if no [DirectDiscount](ctp:api:type:DirectDiscount) has been applied to the Cart.
2029
+ * Discount Codes can be added to [frozen Carts](ctp:api:type:FrozenCarts), but their [DiscountCodeState](ctp:api:type:DiscountCodeState) is then `DoesNotMatchCart`.
2030
+ *
2031
+ * The maximum number of Discount Codes in a Cart is restricted by a [limit](/../api/limits#carts).
2032
+ *
2033
+ * Specific Error Code: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError)
2034
+ *
2035
+ */
2036
+ export interface CartAddDiscountCodeAction {
2037
+ readonly action: 'addDiscountCode';
2038
+ /**
2039
+ * `code` of a [DiscountCode](ctp:api:type:DiscountCode).
2040
+ *
2041
+ *
2042
+ */
2043
+ readonly code: string;
2044
+ }
2045
+ /**
2046
+ * Adds an address to a Cart when shipping to multiple addresses is desired.
2047
+ *
2048
+ */
2049
+ export interface CartAddItemShippingAddressAction {
2050
+ readonly action: 'addItemShippingAddress';
2051
+ /**
2052
+ * Address to append to `itemShippingAddresses`.
2053
+ *
2054
+ * The new Address must have a `key` that is unique across this Cart.
2055
+ *
2056
+ *
2057
+ */
2058
+ readonly address: _BaseAddress;
2059
+ }
2060
+ /**
2061
+ * If the Cart contains a [LineItem](ctp:api:type:LineItem) for a Product Variant with the same [LineItemMode](ctp:api:type:LineItemMode), [Custom Fields](/../api/projects/custom-fields), supply and distribution channel, then only the quantity of the existing Line Item is increased.
2062
+ * If [LineItem](ctp:api:type:LineItem) `shippingDetails` is set, it is merged. All addresses will be present afterwards and, for address keys present in both shipping details, the quantity will be summed up.
2063
+ * A new Line Item is added when the `externalPrice` or `externalTotalPrice` is set in this update action.
2064
+ * The [LineItem](ctp:api:type:LineItem) price is set as described in [Line Item price selection](/../api/pricing-and-discounts-overview#line-item-price-selection).
2065
+ *
2066
+ * If the Tax Rate is not set, a [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError) error is returned.
2067
+ *
2068
+ * If the Line Items do not have a Price according to the [Product](ctp:api:type:Product) `priceMode` value for a selected currency and/or country, Customer Group, or Channel, a [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) error is returned.
2069
+ *
2070
+ */
2071
+ export interface CartAddLineItemAction {
2072
+ readonly action: 'addLineItem';
2073
+ /**
2074
+ * User-defined unique identifier of the LineItem.
2075
+ *
2076
+ *
2077
+ */
2078
+ readonly key?: string;
2079
+ /**
2080
+ * `id` of the published [Product](ctp:api:type:Product).
2081
+ *
2082
+ * Either the `productId` and `variantId`, or `sku` must be provided.
2083
+ *
2084
+ *
2085
+ */
2086
+ readonly productId?: string;
2087
+ /**
2088
+ * `id` of the [ProductVariant](ctp:api:type:ProductVariant) in the Product.
2089
+ * If not provided, the Master Variant is used.
2090
+ *
2091
+ * Either the `productId` and `variantId`, or `sku` must be provided.
2092
+ *
2093
+ *
2094
+ */
2095
+ readonly variantId?: number;
2096
+ /**
2097
+ * SKU of the [ProductVariant](ctp:api:type:ProductVariant).
2098
+ *
2099
+ * Either the `productId` and `variantId`, or `sku` must be provided.
2100
+ *
2101
+ *
2102
+ */
2103
+ readonly sku?: string;
2104
+ /**
2105
+ * Quantity of the Product Variant to add to the Cart.
2106
+ *
2107
+ *
2108
+ */
2109
+ readonly quantity?: number;
2110
+ /**
2111
+ * Date and time (UTC) the Product Variant is added to the Cart.
2112
+ * If not set, it defaults to the current date and time.
2113
+ *
2114
+ * Optional for backwards compatibility reasons.
2115
+ *
2116
+ *
2117
+ */
2118
+ readonly addedAt?: string;
2119
+ /**
2120
+ * Used to [select](/../api/pricing-and-discounts-overview#line-item-price-selection) a Product Price.
2121
+ * The Channel must have the `ProductDistribution` [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum).
2122
+ * If the Cart is bound to a [Store](ctp:api:type:Store) with `distributionChannels` set, the Channel must match one of the Store's distribution channels.
2123
+ *
2124
+ *
2125
+ */
2126
+ readonly distributionChannel?: ChannelResourceIdentifier;
2127
+ /**
2128
+ * Used to identify [Inventory entries](/../api/projects/inventory) that must be reserved.
2129
+ * The Channel must have the `InventorySupply` [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum).
2130
+ *
2131
+ *
2132
+ */
2133
+ readonly supplyChannel?: ChannelResourceIdentifier;
2134
+ /**
2135
+ * Sets the [LineItem](ctp:api:type:LineItem) `price` value, and the `priceMode` to `ExternalPrice` [LineItemPriceMode](ctp:api:type:LineItemPriceMode).
2136
+ *
2137
+ *
2138
+ */
2139
+ readonly externalPrice?: _Money;
2140
+ /**
2141
+ * Sets the [LineItem](ctp:api:type:LineItem) `price` and `totalPrice` values, and the `priceMode` to `ExternalTotal` [LineItemPriceMode](ctp:api:type:LineItemPriceMode).
2142
+ *
2143
+ *
2144
+ */
2145
+ readonly externalTotalPrice?: ExternalLineItemTotalPrice;
2146
+ /**
2147
+ * Sets the external Tax Rate for the Line Item, if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode) and `Single` [ShippingMode](ctp:api:type:ShippingMode). If the Cart has `Multiple` [ShippingMode](ctp:api:type:ShippingMode), the Tax Rate is accepted but ignored.
2148
+ *
2149
+ *
2150
+ */
2151
+ readonly externalTaxRate?: ExternalTaxRateDraft;
2152
+ /**
2153
+ * Sets the external Tax Rates for individual Shipping Methods, if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode) and `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
2154
+ *
2155
+ *
2156
+ */
2157
+ readonly perMethodExternalTaxRate?: MethodExternalTaxRateDraft[];
2158
+ /**
2159
+ * Inventory mode specific to the Line Item only, and valid for the entire `quantity` of the Line Item.
2160
+ * Set only if the inventory mode should be different from the `inventoryMode` specified on the [Cart](ctp:api:type:Cart).
2161
+ *
2162
+ *
2163
+ */
2164
+ readonly inventoryMode?: InventoryMode;
2165
+ /**
2166
+ * Container for Line Item-specific addresses.
2167
+ *
2168
+ *
2169
+ */
2170
+ readonly shippingDetails?: ItemShippingDetailsDraft;
2171
+ /**
2172
+ * Custom Fields for the Line Item.
2173
+ *
2174
+ *
2175
+ */
2176
+ readonly custom?: CustomFieldsDraft;
2177
+ }
2178
+ export interface CartAddPaymentAction {
2179
+ readonly action: 'addPayment';
2180
+ /**
2181
+ * Payment to add to the Cart.
2182
+ * Must not be assigned to another Order or active Cart already.
2183
+ *
2184
+ *
2185
+ */
2186
+ readonly payment: PaymentResourceIdentifier;
2187
+ }
2188
+ /**
2189
+ * Adds a Shipping Method for a specified shipping address to a Cart with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
2190
+ *
2191
+ */
2192
+ export interface CartAddShippingMethodAction {
2193
+ readonly action: 'addShippingMethod';
2194
+ /**
2195
+ * User-defined identifier for the [Shipping](ctp:api:type:Shipping) that must be unique across the Cart with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
2196
+ *
2197
+ *
2198
+ */
2199
+ readonly shippingKey: string;
2200
+ /**
2201
+ * RecourceIdentifier to a [ShippingMethod](ctp:api:type:ShippingMethod) to add to the Cart with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
2202
+ * If the referenced Shipping Method has a predicate that does not match the Cart, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned.
2203
+ *
2204
+ *
2205
+ */
2206
+ readonly shippingMethod: ShippingMethodResourceIdentifier;
2207
+ /**
2208
+ * Determines the shipping rate and Tax Rate of the Line Items.
2209
+ *
2210
+ *
2211
+ */
2212
+ readonly shippingAddress: _BaseAddress;
2213
+ /**
2214
+ * Input used to select a [ShippingRatePriceTier](ctp:api:type:ShippingRatePriceTier).
2215
+ * The data type of this field depends on the `shippingRateInputType.type` configured in the [Project](ctp:api:type:Project):
2216
+ *
2217
+ * - If `CartClassification`, it must be [ClassificationShippingRateInputDraft](ctp:api:type:ClassificationShippingRateInputDraft).
2218
+ * - If `CartScore`, it must be [ScoreShippingRateInputDraft](ctp:api:type:ScoreShippingRateInputDraft).
2219
+ * - If `CartValue`, it cannot be set.
2220
+ *
2221
+ *
2222
+ */
2223
+ readonly shippingRateInput?: ShippingRateInputDraft;
2224
+ /**
2225
+ * Tax Rate used to tax a shipping expense if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode).
2226
+ *
2227
+ *
2228
+ */
2229
+ readonly externalTaxRate?: ExternalTaxRateDraft;
2230
+ /**
2231
+ * Deliveries to be shipped with the referenced Shipping Method.
2232
+ *
2233
+ *
2234
+ */
2235
+ readonly deliveries?: DeliveryDraft[];
2236
+ /**
2237
+ * Custom Fields for the Shipping Method.
2238
+ *
2239
+ *
2240
+ */
2241
+ readonly custom?: CustomFieldsDraft;
2242
+ }
2243
+ /**
2244
+ * Adds all [LineItems](ctp:api:type:LineItem) of a [ShoppingList](ctp:api:type:ShoppingList) to the Cart.
2245
+ *
2246
+ */
2247
+ export interface CartAddShoppingListAction {
2248
+ readonly action: 'addShoppingList';
2249
+ /**
2250
+ * Shopping List that contains the Line Items to be added.
2251
+ *
2252
+ *
2253
+ */
2254
+ readonly shoppingList: ShoppingListResourceIdentifier;
2255
+ /**
2256
+ * `distributionChannel` to set for all [LineItems](ctp:api:type:LineItem) that are added to the Cart.
2257
+ * The Channel must have the `ProductDistribution` [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum).
2258
+ *
2259
+ *
2260
+ */
2261
+ readonly distributionChannel?: ChannelResourceIdentifier;
2262
+ /**
2263
+ * `supplyChannel` to set for all [LineItems](ctp:api:type:LineItem) that are added to the Cart.
2264
+ * The Channel must have the `InventorySupply` [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum).
2265
+ *
2266
+ *
2267
+ */
2268
+ readonly supplyChannel?: ChannelResourceIdentifier;
2269
+ }
2270
+ export interface CartApplyDeltaToCustomLineItemShippingDetailsTargetsAction {
2271
+ readonly action: 'applyDeltaToCustomLineItemShippingDetailsTargets';
2272
+ /**
2273
+ * `id` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
2274
+ *
2275
+ *
2276
+ */
2277
+ readonly customLineItemId?: string;
2278
+ /**
2279
+ * `key` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
2280
+ *
2281
+ *
2282
+ */
2283
+ readonly customLineItemKey?: string;
2284
+ /**
2285
+ * Using positive or negative quantities increases or decreases the number of items shipped to an address.
2286
+ *
2287
+ *
2288
+ */
2289
+ readonly targetsDelta: ItemShippingTarget[];
2290
+ }
2291
+ /**
2292
+ * To override the shipping details, see [Set LineItem ShippingDetails](ctp:api:type:CartSetLineItemShippingDetailsAction).
2293
+ *
2294
+ */
2295
+ export interface CartApplyDeltaToLineItemShippingDetailsTargetsAction {
2296
+ readonly action: 'applyDeltaToLineItemShippingDetailsTargets';
2297
+ /**
2298
+ * `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
2299
+ *
2300
+ *
2301
+ */
2302
+ readonly lineItemId?: string;
2303
+ /**
2304
+ * `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
2305
+ *
2306
+ *
2307
+ */
2308
+ readonly lineItemKey?: string;
2309
+ /**
2310
+ * Using positive or negative quantities increases or decreases the number of items shipped to an address.
2311
+ *
2312
+ *
2313
+ */
2314
+ readonly targetsDelta: ItemShippingTarget[];
2315
+ }
2316
+ export interface CartChangeCustomLineItemMoneyAction {
2317
+ readonly action: 'changeCustomLineItemMoney';
2318
+ /**
2319
+ * `id` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
2320
+ *
2321
+ *
2322
+ */
2323
+ readonly customLineItemId?: string;
2324
+ /**
2325
+ * `key` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
2326
+ *
2327
+ *
2328
+ */
2329
+ readonly customLineItemKey?: string;
2330
+ /**
2331
+ * Value to set. Must not be empty. Can be a negative amount.
2332
+ *
2333
+ *
2334
+ */
2335
+ readonly money: _Money;
2336
+ }
2337
+ export interface CartChangeCustomLineItemPriceModeAction {
2338
+ readonly action: 'changeCustomLineItemPriceMode';
2339
+ /**
2340
+ * `id` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
2341
+ *
2342
+ *
2343
+ */
2344
+ readonly customLineItemId?: string;
2345
+ /**
2346
+ * `key` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
2347
+ *
2348
+ *
2349
+ */
2350
+ readonly customLineItemKey?: string;
2351
+ /**
2352
+ * New value to set. Must not be empty.
2353
+ *
2354
+ *
2355
+ */
2356
+ readonly mode: CustomLineItemPriceMode;
2357
+ }
2358
+ /**
2359
+ * When multiple shipping addresses are set for a Custom Line Item,
2360
+ * use the [Add CustomLineItem](ctp:api:type:CartAddCustomLineItemAction) update action to change the shipping details.
2361
+ * Since it is not possible for the API to infer how the overall change in the Custom Line Item quantity should be distributed over the sub-quantities,
2362
+ * the `shippingDetails` field is kept in its current state to avoid data loss.
2363
+ *
2364
+ * To change the Custom Line Item quantity and shipping details together,
2365
+ * use this update action in combination with the [Set CustomLineItem ShippingDetails](ctp:api:type:CartSetCustomLineItemShippingDetailsAction) update action
2366
+ * in a single Cart update command.
2367
+ *
2368
+ */
2369
+ export interface CartChangeCustomLineItemQuantityAction {
2370
+ readonly action: 'changeCustomLineItemQuantity';
2371
+ /**
2372
+ * `id` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
2373
+ *
2374
+ *
2375
+ */
2376
+ readonly customLineItemId?: string;
2377
+ /**
2378
+ * `key` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
2379
+ *
2380
+ *
2381
+ */
2382
+ readonly customLineItemKey?: string;
2383
+ /**
2384
+ * New value to set.
2385
+ *
2386
+ * If `0`, the Custom Line Item is removed from the Cart.
2387
+ *
2388
+ *
2389
+ */
2390
+ readonly quantity: number;
2391
+ }
2392
+ /**
2393
+ * When multiple shipping addresses are set for a Line Item,
2394
+ * use the [Remove LineItem](ctp:api:type:CartRemoveLineItemAction) and [Add LineItem](ctp:api:type:CartAddLineItemAction) update action
2395
+ * to change the shipping details.
2396
+ * Since it is not possible for the API to infer how the overall change in the Line Item quantity should be distributed over the sub-quantities,
2397
+ * the `shippingDetails` field is kept in its current state to avoid data loss.
2398
+ *
2399
+ * To change the Line Item quantity and shipping details together,
2400
+ * use this update action in combination with the [Set LineItem ShippingDetails](ctp:api:type:CartSetLineItemShippingDetailsAction) update action
2401
+ * in a single Cart update command.
2402
+ *
2403
+ * The [LineItem](ctp:api:type:LineItem) price is set as described in [Line Item price selection](/../api/pricing-and-discounts-overview#line-item-price-selection).
2404
+ *
2405
+ */
2406
+ export interface CartChangeLineItemQuantityAction {
2407
+ readonly action: 'changeLineItemQuantity';
2408
+ /**
2409
+ * `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
2410
+ *
2411
+ *
2412
+ */
2413
+ readonly lineItemId?: string;
2414
+ /**
2415
+ * `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
2416
+ *
2417
+ *
2418
+ */
2419
+ readonly lineItemKey?: string;
2420
+ /**
2421
+ * New value to set.
2422
+ *
2423
+ * If `0`, the Line Item is removed from the Cart.
2424
+ *
2425
+ *
2426
+ */
2427
+ readonly quantity: number;
2428
+ /**
2429
+ * Required when the Line Item uses `ExternalPrice` [LineItemPriceMode](ctp:api:type:LineItemPriceMode).
2430
+ * Sets the [LineItem](ctp:api:type:LineItem) `price` to the given value when changing the quantity of a Line Item.
2431
+ *
2432
+ * The LineItem price is updated as described in Line Item price selection.
2433
+ *
2434
+ *
2435
+ */
2436
+ readonly externalPrice?: _Money;
2437
+ /**
2438
+ * Sets the [LineItem](ctp:api:type:LineItem) `price` and `totalPrice` to the given value when changing the quantity of a Line Item with the `ExternalTotal` [LineItemPriceMode](ctp:api:type:LineItemPriceMode).
2439
+ * If `externalTotalPrice` is not given and the `priceMode` is `ExternalTotal`, the external price is unset and the `priceMode` is set to `Platform`.
2440
+ *
2441
+ *
2442
+ */
2443
+ readonly externalTotalPrice?: ExternalLineItemTotalPrice;
2444
+ }
2445
+ export interface CartChangeLineItemsOrderAction {
2446
+ readonly action: 'changeLineItemsOrder';
2447
+ /**
2448
+ * All existing [LineItem](ctp:api:type:LineItem) `id`s in the desired new order.
2449
+ *
2450
+ *
2451
+ */
2452
+ readonly lineItemOrder: string[];
2453
+ }
2454
+ /**
2455
+ * Changing the tax calculation mode leads to [recalculation of taxes](/../api/carts-orders-overview#cart-tax-calculation).
2456
+ *
2457
+ */
2458
+ export interface CartChangeTaxCalculationModeAction {
2459
+ readonly action: 'changeTaxCalculationMode';
2460
+ /**
2461
+ * New value to set.
2462
+ *
2463
+ *
2464
+ */
2465
+ readonly taxCalculationMode: TaxCalculationMode;
2466
+ }
2467
+ /**
2468
+ * - When `External` [TaxMode](ctp:api:type:TaxMode) is changed to `Platform` or `Disabled`, all previously set external Tax Rates are removed.
2469
+ * - When set to `Platform`, Line Items, Custom Line Items, and Shipping Method require a Tax Category with a Tax Rate for the Cart's `shippingAddress`.
2470
+ *
2471
+ */
2472
+ export interface CartChangeTaxModeAction {
2473
+ readonly action: 'changeTaxMode';
2474
+ /**
2475
+ * The new TaxMode.
2476
+ *
2477
+ *
2478
+ */
2479
+ readonly taxMode: TaxMode;
2480
+ }
2481
+ /**
2482
+ * Changing the tax rounding mode leads to [recalculation of taxes](/../api/carts-orders-overview#cart-tax-calculation).
2483
+ *
2484
+ */
2485
+ export interface CartChangeTaxRoundingModeAction {
2486
+ readonly action: 'changeTaxRoundingMode';
2487
+ /**
2488
+ * New value to set.
2489
+ *
2490
+ *
2491
+ */
2492
+ readonly taxRoundingMode: RoundingMode;
2493
+ }
2494
+ /**
2495
+ * Changes the [CartState](ctp:api:type:CartState) from `Active` to `Frozen`. Results in a [Frozen Cart](ctp:api:type:FrozenCarts).
2496
+ * Fails with [InvalidOperation](ctp:api:type:InvalidOperationError) error when the Cart is empty.
2497
+ *
2498
+ */
2499
+ export interface CartFreezeCartAction {
2500
+ readonly action: 'freezeCart';
2501
+ }
2502
+ /**
2503
+ * This update action does not set any Cart field in particular, but it triggers several [Cart updates](/../api/carts-orders-overview#cart-updates)
2504
+ * to bring prices and discounts to the latest state. Those can become stale over time when no Cart updates have been performed for a while and
2505
+ * prices on related Products have changed in the meanwhile.
2506
+ *
2507
+ * If the `priceMode` of the [Product](ctp:api:type:Product) related to a Line Item is of `Embedded` [ProductPriceMode](ctp:api:type:ProductPriceModeEnum),
2508
+ * the updated `price` of that [LineItem](ctp:api:type:LineItem) may not correspond to a Price in the `variant.prices` anymore.
2509
+ *
2510
+ */
2511
+ export interface CartRecalculateAction {
2512
+ readonly action: 'recalculate';
2513
+ /**
2514
+ * - Leave empty or set to `false` to only update the Prices and TaxRates of the Line Items.
2515
+ * - Set to `true` to update the Line Items' product data (like `name`, `variant` and `productType`) also.
2516
+ *
2517
+ *
2518
+ */
2519
+ readonly updateProductData?: boolean;
2520
+ }
2521
+ /**
2522
+ * This update action does not support specifying quantities, unlike the [Remove LineItem](ctp:api:type:CartRemoveLineItemAction) update action.
2523
+ *
2524
+ * If `shippingDetails` must be partially removed, use the [Change CustomLineItem Quantity](ctp:api:type:CartChangeCustomLineItemQuantityAction) update action.
2525
+ *
2526
+ */
2527
+ export interface CartRemoveCustomLineItemAction {
2528
+ readonly action: 'removeCustomLineItem';
2529
+ /**
2530
+ * `id` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
2531
+ *
2532
+ *
2533
+ */
2534
+ readonly customLineItemId?: string;
2535
+ /**
2536
+ * `key` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
2537
+ *
2538
+ *
2539
+ */
2540
+ readonly customLineItemKey?: string;
2541
+ }
2542
+ export interface CartRemoveDiscountCodeAction {
2543
+ readonly action: 'removeDiscountCode';
2544
+ /**
2545
+ * Discount Code to remove from the Cart.
2546
+ *
2547
+ *
2548
+ */
2549
+ readonly discountCode: DiscountCodeReference;
2550
+ }
2551
+ /**
2552
+ * An address can only be removed if it is not referenced in any [ItemShippingTarget](ctp:api:type:ItemShippingTarget) of the Cart.
2553
+ *
2554
+ */
2555
+ export interface CartRemoveItemShippingAddressAction {
2556
+ readonly action: 'removeItemShippingAddress';
2557
+ /**
2558
+ * `key` of the Address to remove from `itemShippingAddresses`.
2559
+ *
2560
+ *
2561
+ */
2562
+ readonly addressKey: string;
2563
+ }
2564
+ /**
2565
+ * The [LineItem](ctp:api:type:LineItem) price is updated as described in [Line Item price selection](/../api/pricing-and-discounts-overview#line-item-price-selection).
2566
+ *
2567
+ */
2568
+ export interface CartRemoveLineItemAction {
2569
+ readonly action: 'removeLineItem';
2570
+ /**
2571
+ * `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
2572
+ *
2573
+ *
2574
+ */
2575
+ readonly lineItemId?: string;
2576
+ /**
2577
+ * `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
2578
+ *
2579
+ *
2580
+ */
2581
+ readonly lineItemKey?: string;
2582
+ /**
2583
+ * Amount to subtract from the LineItem's `quantity`.
2584
+ * If absent, the LineItem is removed from the Cart.
2585
+ *
2586
+ *
2587
+ */
2588
+ readonly quantity?: number;
2589
+ /**
2590
+ * Sets the [LineItem](ctp:api:type:LineItem) `price` to the given value when decreasing the quantity of a Line Item with the `ExternalPrice` [LineItemPriceMode](ctp:api:type:LineItemPriceMode).
2591
+ *
2592
+ *
2593
+ */
2594
+ readonly externalPrice?: _Money;
2595
+ /**
2596
+ * Sets the [LineItem](ctp:api:type:LineItem) `price` and `totalPrice` to the given value when decreasing the quantity of a Line Item with the `ExternalTotal` [LineItemPriceMode](ctp:api:type:LineItemPriceMode).
2597
+ *
2598
+ *
2599
+ */
2600
+ readonly externalTotalPrice?: ExternalLineItemTotalPrice;
2601
+ /**
2602
+ * Container for Line Item-specific addresses to remove.
2603
+ *
2604
+ *
2605
+ */
2606
+ readonly shippingDetailsToRemove?: ItemShippingDetailsDraft;
2607
+ }
2608
+ export interface CartRemovePaymentAction {
2609
+ readonly action: 'removePayment';
2610
+ /**
2611
+ * Payment to remove from the Cart.
2612
+ *
2613
+ *
2614
+ */
2615
+ readonly payment: PaymentResourceIdentifier;
2616
+ }
2617
+ /**
2618
+ * Removes a Shipping Method from a Cart that has the `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
2619
+ *
2620
+ */
2621
+ export interface CartRemoveShippingMethodAction {
2622
+ readonly action: 'removeShippingMethod';
2623
+ /**
2624
+ * User-defined unique identifier of the Shipping Method to remove from the Cart.
2625
+ *
2626
+ *
2627
+ */
2628
+ readonly shippingKey: string;
2629
+ }
2630
+ /**
2631
+ * If the Cart is already associated with a Customer, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned.
2632
+ *
2633
+ */
2634
+ export interface CartSetAnonymousIdAction {
2635
+ readonly action: 'setAnonymousId';
2636
+ /**
2637
+ * Value to set.
2638
+ * If empty, any existing value is removed.
2639
+ *
2640
+ *
2641
+ */
2642
+ readonly anonymousId?: string;
2643
+ }
2644
+ export interface CartSetBillingAddressAction {
2645
+ readonly action: 'setBillingAddress';
2646
+ /**
2647
+ * Value to set.
2648
+ * If empty, any existing value is removed.
2649
+ *
2650
+ *
2651
+ */
2652
+ readonly address?: _BaseAddress;
2653
+ }
2654
+ export interface CartSetBillingAddressCustomFieldAction {
2655
+ readonly action: 'setBillingAddressCustomField';
2656
+ /**
2657
+ * Name of the [Custom Field](/../api/projects/custom-fields).
2658
+ *
2659
+ *
2660
+ */
2661
+ readonly name: string;
2662
+ /**
2663
+ * If `value` is absent or `null`, this field will be removed if it exists.
2664
+ * Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
2665
+ * If `value` is provided, it is set for the field defined by `name`.
2666
+ *
2667
+ *
2668
+ */
2669
+ readonly value?: any;
2670
+ }
2671
+ export interface CartSetBillingAddressCustomTypeAction {
2672
+ readonly action: 'setBillingAddressCustomType';
2673
+ /**
2674
+ * Defines the [Type](ctp:api:type:Type) that extends the `billingAddress` with [Custom Fields](/../api/projects/custom-fields).
2675
+ * If absent, any existing Type and Custom Fields are removed from the `billingAddress`.
2676
+ *
2677
+ *
2678
+ */
2679
+ readonly type?: TypeResourceIdentifier;
2680
+ /**
2681
+ * Sets the [Custom Fields](/../api/projects/custom-fields) fields for the `billingAddress`.
2682
+ *
2683
+ *
2684
+ */
2685
+ readonly fields?: FieldContainer;
2686
+ }
2687
+ /**
2688
+ * Updates the Business Unit on the Cart. The Cart must have an existing Business Unit assigned already.
2689
+ *
2690
+ */
2691
+ export interface CartSetBusinessUnitAction {
2692
+ readonly action: 'setBusinessUnit';
2693
+ /**
2694
+ * New Business Unit to assign to the Cart, which must have access to the [Store](/../api/projects/stores) that is set on the Cart.
2695
+ *
2696
+ *
2697
+ */
2698
+ readonly businessUnit: BusinessUnitResourceIdentifier;
2699
+ }
2700
+ /**
2701
+ * Can be used if the Cart has the `ExternalAmount` [TaxMode](ctp:api:type:TaxMode). This update action adds the `taxedPrice` field to the Cart and must be used after any price-affecting change occurs within the Cart.
2702
+ *
2703
+ */
2704
+ export interface CartSetCartTotalTaxAction {
2705
+ readonly action: 'setCartTotalTax';
2706
+ /**
2707
+ * The Cart's total gross price becoming the `totalGross` field (`totalNet` + taxes) on the Cart's `taxedPrice`.
2708
+ *
2709
+ *
2710
+ */
2711
+ readonly externalTotalGross: _Money;
2712
+ /**
2713
+ * Set if the `externalTotalGross` price is a sum of portions with different tax rates.
2714
+ *
2715
+ *
2716
+ */
2717
+ readonly externalTaxPortions?: TaxPortionDraft[];
2718
+ }
2719
+ /**
2720
+ * Setting the country can lead to changes in the [LineItem](ctp:api:type:LineItem) prices.
2721
+ *
2722
+ */
2723
+ export interface CartSetCountryAction {
2724
+ readonly action: 'setCountry';
2725
+ /**
2726
+ * Value to set.
2727
+ * If empty, any existing value is removed.
2728
+ *
2729
+ * If the Cart is bound to a `store`, the provided value must be included in the [Store's](ctp:api:type:Store) `countries`.
2730
+ * Otherwise a [CountryNotConfiguredInStore](ctp:api:type:CountryNotConfiguredInStoreError) error is returned.
2731
+ *
2732
+ *
2733
+ */
2734
+ readonly country?: string;
2735
+ }
2736
+ export interface CartSetCustomFieldAction {
2737
+ readonly action: 'setCustomField';
2738
+ /**
2739
+ * Name of the [Custom Field](/../api/projects/custom-fields).
2740
+ *
2741
+ *
2742
+ */
2743
+ readonly name: string;
2744
+ /**
2745
+ * If `value` is absent or `null`, this field will be removed if it exists.
2746
+ * Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
2747
+ * If `value` is provided, it is set for the field defined by `name`.
2748
+ *
2749
+ *
2750
+ */
2751
+ readonly value?: any;
2752
+ }
2753
+ export interface CartSetCustomLineItemCustomFieldAction {
2754
+ readonly action: 'setCustomLineItemCustomField';
2755
+ /**
2756
+ * `id` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
2757
+ *
2758
+ *
2759
+ */
2760
+ readonly customLineItemId?: string;
2761
+ /**
2762
+ * `key` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
2763
+ *
2764
+ *
2765
+ */
2766
+ readonly customLineItemKey?: string;
2767
+ /**
2768
+ * Name of the [Custom Field](/../api/projects/custom-fields).
2769
+ *
2770
+ *
2771
+ */
2772
+ readonly name: string;
2773
+ /**
2774
+ * If `value` is absent or `null`, this field will be removed if it exists.
2775
+ * Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
2776
+ * If `value` is provided, it is set for the field defined by `name`.
2777
+ *
2778
+ *
2779
+ */
2780
+ readonly value?: any;
2781
+ }
2782
+ export interface CartSetCustomLineItemCustomTypeAction {
2783
+ readonly action: 'setCustomLineItemCustomType';
2784
+ /**
2785
+ * `id` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
2786
+ *
2787
+ *
2788
+ */
2789
+ readonly customLineItemId?: string;
2790
+ /**
2791
+ * `key` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
2792
+ *
2793
+ *
2794
+ */
2795
+ readonly customLineItemKey?: string;
2796
+ /**
2797
+ * Defines the [Type](ctp:api:type:Type) that extends the CustomLineItem with [Custom Fields](/../api/projects/custom-fields).
2798
+ * If absent, any existing Type and Custom Fields are removed from the CustomLineItem.
2799
+ *
2800
+ *
2801
+ */
2802
+ readonly type?: TypeResourceIdentifier;
2803
+ /**
2804
+ * Sets the [Custom Fields](/../api/projects/custom-fields) fields for the CustomLineItem.
2805
+ *
2806
+ *
2807
+ */
2808
+ readonly fields?: FieldContainer;
2809
+ }
2810
+ export interface CartSetCustomLineItemShippingDetailsAction {
2811
+ readonly action: 'setCustomLineItemShippingDetails';
2812
+ /**
2813
+ * `id` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
2814
+ *
2815
+ *
2816
+ */
2817
+ readonly customLineItemId?: string;
2818
+ /**
2819
+ * `key` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
2820
+ *
2821
+ *
2822
+ */
2823
+ readonly customLineItemKey?: string;
2824
+ /**
2825
+ * Value to set.
2826
+ * If empty, any existing value is removed.
2827
+ *
2828
+ *
2829
+ */
2830
+ readonly shippingDetails?: ItemShippingDetailsDraft;
2831
+ }
2832
+ /**
2833
+ * Can be used if the Cart has the `ExternalAmount` [TaxMode](ctp:api:type:TaxMode).
2834
+ *
2835
+ */
2836
+ export interface CartSetCustomLineItemTaxAmountAction {
2837
+ readonly action: 'setCustomLineItemTaxAmount';
2838
+ /**
2839
+ * `id` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
2840
+ *
2841
+ *
2842
+ */
2843
+ readonly customLineItemId?: string;
2844
+ /**
2845
+ * `key` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
2846
+ *
2847
+ *
2848
+ */
2849
+ readonly customLineItemKey?: string;
2850
+ /**
2851
+ * Value to set.
2852
+ * If empty, any existing value is removed.
2853
+ *
2854
+ *
2855
+ */
2856
+ readonly externalTaxAmount?: ExternalTaxAmountDraft;
2857
+ /**
2858
+ * `key` of the [ShippingMethod](ctp:api:type:ShippingMethod) used for this Custom Line Item.
2859
+ * This is required for Carts with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
2860
+ *
2861
+ *
2862
+ */
2863
+ readonly shippingKey?: string;
2864
+ }
2865
+ /**
2866
+ * Can be used if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode).
2867
+ *
2868
+ */
2869
+ export interface CartSetCustomLineItemTaxRateAction {
2870
+ readonly action: 'setCustomLineItemTaxRate';
2871
+ /**
2872
+ * `id` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
2873
+ *
2874
+ *
2875
+ */
2876
+ readonly customLineItemId?: string;
2877
+ /**
2878
+ * `key` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
2879
+ *
2880
+ *
2881
+ */
2882
+ readonly customLineItemKey?: string;
2883
+ /**
2884
+ * Value to set.
2885
+ * If empty, an existing value is removed.
2886
+ *
2887
+ *
2888
+ */
2889
+ readonly externalTaxRate?: ExternalTaxRateDraft;
2890
+ /**
2891
+ * `key` of the [ShippingMethod](ctp:api:type:ShippingMethod) used for this Custom Line Item.
2892
+ * This is required for Carts with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
2893
+ *
2894
+ *
2895
+ */
2896
+ readonly shippingKey?: string;
2897
+ }
2898
+ /**
2899
+ * To set the Cart's custom Shipping Method (independent of the [ShippingMethods](ctp:api:type:ShippingMethod) managed through
2900
+ * the [Shipping Methods API](/projects/shippingMethods)) the Cart must have
2901
+ * the `Single` [ShippingMode](ctp:api:type:ShippingMode) and a `shippingAddress`.
2902
+ *
2903
+ * To unset a custom Shipping Method on a Cart, use the [Set ShippingMethod](ctp:api:type:CartSetShippingMethodAction) update action
2904
+ * without the `shippingMethod` field instead.
2905
+ *
2906
+ */
2907
+ export interface CartSetCustomShippingMethodAction {
2908
+ readonly action: 'setCustomShippingMethod';
2909
+ /**
2910
+ * Name of the custom Shipping Method.
2911
+ *
2912
+ *
2913
+ */
2914
+ readonly shippingMethodName: string;
2915
+ /**
2916
+ * Determines the shipping price.
2917
+ *
2918
+ *
2919
+ */
2920
+ readonly shippingRate: ShippingRateDraft;
2921
+ /**
2922
+ * Tax Category used to determine the Tax Rate when the Cart has the `Platform` [TaxMode](ctp:api:type:TaxMode).
2923
+ *
2924
+ *
2925
+ */
2926
+ readonly taxCategory?: TaxCategoryResourceIdentifier;
2927
+ /**
2928
+ * External Tax Rate for the `shippingRate` to be set if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode).
2929
+ *
2930
+ *
2931
+ */
2932
+ readonly externalTaxRate?: ExternalTaxRateDraft;
2933
+ }
2934
+ export interface CartSetCustomTypeAction {
2935
+ readonly action: 'setCustomType';
2936
+ /**
2937
+ * Defines the [Type](ctp:api:type:Type) that extends the Cart with [Custom Fields](/../api/projects/custom-fields).
2938
+ * If absent, any existing Type and Custom Fields are removed from the Cart.
2939
+ *
2940
+ *
2941
+ */
2942
+ readonly type?: TypeResourceIdentifier;
2943
+ /**
2944
+ * Sets the [Custom Fields](/../api/projects/custom-fields) fields for the Cart.
2945
+ *
2946
+ *
2947
+ */
2948
+ readonly fields?: FieldContainer;
2949
+ }
2950
+ export interface CartSetCustomerEmailAction {
2951
+ readonly action: 'setCustomerEmail';
2952
+ /**
2953
+ * Value to set.
2954
+ * If empty, any existing value is removed.
2955
+ *
2956
+ *
2957
+ */
2958
+ readonly email?: string;
2959
+ }
2960
+ /**
2961
+ * This update action can only be used if a Customer is not assigned to the Cart.
2962
+ * If a Customer is already assigned, the Cart uses the Customer Group of the assigned Customer.
2963
+ *
2964
+ * To reflect the new Customer Group, this update action can result in [updates to the Cart](/api/carts-orders-overview#cart-updates). When this occurs, the following errors can be returned: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError) and [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError).
2965
+ *
2966
+ */
2967
+ export interface CartSetCustomerGroupAction {
2968
+ readonly action: 'setCustomerGroup';
2969
+ /**
2970
+ * Value to set.
2971
+ * If empty, any existing value is removed.
2972
+ *
2973
+ *
2974
+ */
2975
+ readonly customerGroup?: CustomerGroupResourceIdentifier;
2976
+ }
2977
+ /**
2978
+ * Setting the Cart's `customerId` can lead to updates on all its [LineItem](ctp:api:type:LineItem) `prices`.
2979
+ *
2980
+ * If the Customer with the specified `id` cannot be found, this update action returns a
2981
+ * [ReferencedResourceNotFound](ctp:api:type:ReferencedResourceNotFoundError) error.
2982
+ *
2983
+ */
2984
+ export interface CartSetCustomerIdAction {
2985
+ readonly action: 'setCustomerId';
2986
+ /**
2987
+ * `id` of an existing [Customer](ctp:api:type:Customer).
2988
+ * If the Customer is assigned to a [CustomerGroup](ctp:api:type:CustomerGroup), this update action also sets the value for the `customerGroup` field.
2989
+ * If empty, the update action removes the value for both `customerId` and `customerGroup`.
2990
+ *
2991
+ *
2992
+ */
2993
+ readonly customerId?: string;
2994
+ }
2995
+ /**
2996
+ * Number of days after which a Cart with `Active` [CartState](ctp:api:type:CartState) is deleted since its last modification.
2997
+ *
2998
+ * If a [ChangeSubscription](ctp:api:type:ChangeSubscription) exists for Carts, a [ResourceDeletedDeliveryPayload](ctp:api:type:ResourceDeletedDeliveryPayload) is sent.
2999
+ *
3000
+ */
3001
+ export interface CartSetDeleteDaysAfterLastModificationAction {
3002
+ readonly action: 'setDeleteDaysAfterLastModification';
3003
+ /**
3004
+ * Value to set.
3005
+ * If not provided, the default value for this field configured in [Project settings](ctp:api:type:CartsConfiguration) is assigned.
3006
+ *
3007
+ *
3008
+ */
3009
+ readonly deleteDaysAfterLastModification?: number;
3010
+ }
3011
+ /**
3012
+ * Adds a [DirectDiscount](ctp:api:type:DirectDiscount), but only if no [DiscountCode](ctp:api:type:DiscountCode) has been added to the Cart.
3013
+ * Either a Discount Code or a Direct Discount can exist on a Cart at the same time.
3014
+ *
3015
+ */
3016
+ export interface CartSetDirectDiscountsAction {
3017
+ readonly action: 'setDirectDiscounts';
3018
+ /**
3019
+ * - If set, all existing Direct Discounts are replaced.
3020
+ * The discounts apply in the order they are added to the list.
3021
+ * - If empty, all existing Direct Discounts are removed and all affected prices on the Cart or Order are recalculated.
3022
+ *
3023
+ *
3024
+ */
3025
+ readonly discounts: DirectDiscountDraft[];
3026
+ }
3027
+ export interface CartSetItemShippingAddressCustomFieldAction {
3028
+ readonly action: 'setItemShippingAddressCustomField';
3029
+ /**
3030
+ * `key` of the [Address](ctp:api:type:Address) in `itemShippingAddress`.
3031
+ *
3032
+ *
3033
+ */
3034
+ readonly addressKey: string;
3035
+ /**
3036
+ * Name of the [Custom Field](/../api/projects/custom-fields).
3037
+ *
3038
+ *
3039
+ */
3040
+ readonly name: string;
3041
+ /**
3042
+ * If `value` is absent or `null`, this field will be removed if it exists.
3043
+ * Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
3044
+ * If `value` is provided, it is set for the field defined by `name`.
3045
+ *
3046
+ *
3047
+ */
3048
+ readonly value?: any;
3049
+ }
3050
+ export interface CartSetItemShippingAddressCustomTypeAction {
3051
+ readonly action: 'setItemShippingAddressCustomType';
3052
+ /**
3053
+ * `key` of the [Address](ctp:api:type:Address) in `itemShippingAddress`.
3054
+ *
3055
+ *
3056
+ */
3057
+ readonly addressKey: string;
3058
+ /**
3059
+ * Defines the [Type](ctp:api:type:Type) that extends the `itemShippingAddress` with [Custom Fields](/../api/projects/custom-fields).
3060
+ * If absent, any existing Type and Custom Fields are removed from the `itemShippingAddress`.
3061
+ *
3062
+ *
3063
+ */
3064
+ readonly type?: TypeResourceIdentifier;
3065
+ /**
3066
+ * Sets the [Custom Fields](/../api/projects/custom-fields) fields for the `itemShippingAddress`.
3067
+ *
3068
+ *
3069
+ */
3070
+ readonly fields?: FieldContainer;
3071
+ }
3072
+ export interface CartSetKeyAction {
3073
+ readonly action: 'setKey';
3074
+ /**
3075
+ * Value to set.
3076
+ * If empty, any existing key will be removed.
3077
+ *
3078
+ *
3079
+ */
3080
+ readonly key?: string;
3081
+ }
3082
+ export interface CartSetLineItemCustomFieldAction {
3083
+ readonly action: 'setLineItemCustomField';
3084
+ /**
3085
+ * `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
3086
+ *
3087
+ *
3088
+ */
3089
+ readonly lineItemId?: string;
3090
+ /**
3091
+ * `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
3092
+ *
3093
+ *
3094
+ */
3095
+ readonly lineItemKey?: string;
3096
+ /**
3097
+ * Name of the [Custom Field](/../api/projects/custom-fields).
3098
+ *
3099
+ *
3100
+ */
3101
+ readonly name: string;
3102
+ /**
3103
+ * If `value` is absent or `null`, this field will be removed if it exists.
3104
+ * Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
3105
+ * If `value` is provided, it is set for the field defined by `name`.
3106
+ *
3107
+ *
3108
+ */
3109
+ readonly value?: any;
3110
+ }
3111
+ export interface CartSetLineItemCustomTypeAction {
3112
+ readonly action: 'setLineItemCustomType';
3113
+ /**
3114
+ * `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
3115
+ *
3116
+ *
3117
+ */
3118
+ readonly lineItemId?: string;
3119
+ /**
3120
+ * `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
3121
+ *
3122
+ *
3123
+ */
3124
+ readonly lineItemKey?: string;
3125
+ /**
3126
+ * Defines the [Type](ctp:api:type:Type) that extends the Line Item with [Custom Fields](/../api/projects/custom-fields).
3127
+ * If absent, any existing Type and Custom Fields are removed from the Line Item.
3128
+ *
3129
+ *
3130
+ */
3131
+ readonly type?: TypeResourceIdentifier;
3132
+ /**
3133
+ * Sets the [Custom Fields](/../api/projects/custom-fields) fields for the Line Item.
3134
+ *
3135
+ *
3136
+ */
3137
+ readonly fields?: FieldContainer;
3138
+ }
3139
+ /**
3140
+ * Setting a distribution channel for a [LineItem](ctp:api:type:LineItem) can lead to an updated `price` as described in [Line Item price selection](/../api/pricing-and-discounts-overview#line-item-price-selection).
3141
+ *
3142
+ */
3143
+ export interface CartSetLineItemDistributionChannelAction {
3144
+ readonly action: 'setLineItemDistributionChannel';
3145
+ /**
3146
+ * `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
3147
+ *
3148
+ *
3149
+ */
3150
+ readonly lineItemId?: string;
3151
+ /**
3152
+ * `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
3153
+ *
3154
+ *
3155
+ */
3156
+ readonly lineItemKey?: string;
3157
+ /**
3158
+ * - If present, a [Reference](ctp:api:type:Reference) to the Channel is set for the [LineItem](ctp:api:type:LineItem) specified by `lineItemId`.
3159
+ * - If not present, the current [Reference](ctp:api:type:Reference) to a distribution channel is removed from the [LineItem](ctp:api:type:LineItem) specified by `lineItemId`.
3160
+ * The Channel must have the `ProductDistribution` [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum).
3161
+ *
3162
+ *
3163
+ */
3164
+ readonly distributionChannel?: ChannelResourceIdentifier;
3165
+ }
3166
+ export interface CartSetLineItemInventoryModeAction {
3167
+ readonly action: 'setLineItemInventoryMode';
3168
+ /**
3169
+ * `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
3170
+ *
3171
+ *
3172
+ */
3173
+ readonly lineItemId?: string;
3174
+ /**
3175
+ * `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
3176
+ *
3177
+ *
3178
+ */
3179
+ readonly lineItemKey?: string;
3180
+ /**
3181
+ * Inventory mode specific to the Line Item only, and valid for the entire `quantity` of the Line Item.
3182
+ * Set only if the inventory mode should be different from the `inventoryMode` specified on the [Cart](ctp:api:type:Cart).
3183
+ *
3184
+ *
3185
+ */
3186
+ readonly inventoryMode?: InventoryMode;
3187
+ }
3188
+ /**
3189
+ * Sets the [LineItem](ctp:api:type:LineItem) `price` and changes the `priceMode` to `ExternalPrice` [LineItemPriceMode](ctp:api:type:LineItemPriceMode).
3190
+ *
3191
+ */
3192
+ export interface CartSetLineItemPriceAction {
3193
+ readonly action: 'setLineItemPrice';
3194
+ /**
3195
+ * `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
3196
+ *
3197
+ *
3198
+ */
3199
+ readonly lineItemId?: string;
3200
+ /**
3201
+ * `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
3202
+ *
3203
+ *
3204
+ */
3205
+ readonly lineItemKey?: string;
3206
+ /**
3207
+ * Value to set.
3208
+ * If `externalPrice` is not given and the `priceMode` is `ExternalPrice`, the external price is unset and the `priceMode` is set to `Platform`.
3209
+ *
3210
+ *
3211
+ */
3212
+ readonly externalPrice?: _Money;
3213
+ }
3214
+ export interface CartSetLineItemShippingDetailsAction {
3215
+ readonly action: 'setLineItemShippingDetails';
3216
+ /**
3217
+ * `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
3218
+ *
3219
+ *
3220
+ */
3221
+ readonly lineItemId?: string;
3222
+ /**
3223
+ * `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
3224
+ *
3225
+ *
3226
+ */
3227
+ readonly lineItemKey?: string;
3228
+ /**
3229
+ * Value to set.
3230
+ * If empty, the existing value is removed.
3231
+ *
3232
+ *
3233
+ */
3234
+ readonly shippingDetails?: ItemShippingDetailsDraft;
3235
+ }
3236
+ /**
3237
+ * Performing this action has no impact on inventory that should be reserved.
3238
+ *
3239
+ */
3240
+ export interface CartSetLineItemSupplyChannelAction {
3241
+ readonly action: 'setLineItemSupplyChannel';
3242
+ /**
3243
+ * `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
3244
+ *
3245
+ *
3246
+ */
3247
+ readonly lineItemId?: string;
3248
+ /**
3249
+ * `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
3250
+ *
3251
+ *
3252
+ */
3253
+ readonly lineItemKey?: string;
3254
+ /**
3255
+ * - If present, a [Reference](ctp:api:type:Reference) to the Channel is set for the [LineItem](ctp:api:type:LineItem) specified by `lineItemId`.
3256
+ * - If not present, the current [Reference](ctp:api:type:Reference) to a supply channel will be removed from the [LineItem](ctp:api:type:LineItem) specified by `lineItemId`.
3257
+ * The Channel must have the `InventorySupply` [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum).
3258
+ *
3259
+ *
3260
+ */
3261
+ readonly supplyChannel?: ChannelResourceIdentifier;
3262
+ }
3263
+ /**
3264
+ * Can be used if the Cart has the `ExternalAmount` [TaxMode](ctp:api:type:TaxMode). This update action sets the `taxedPrice` and `taxRate` on a Line Item and must be used after any price-affecting change occurs.
3265
+ *
3266
+ */
3267
+ export interface CartSetLineItemTaxAmountAction {
3268
+ readonly action: 'setLineItemTaxAmount';
3269
+ /**
3270
+ * `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
3271
+ *
3272
+ *
3273
+ */
3274
+ readonly lineItemId?: string;
3275
+ /**
3276
+ * `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
3277
+ *
3278
+ *
3279
+ */
3280
+ readonly lineItemKey?: string;
3281
+ /**
3282
+ * Value to set.
3283
+ * If empty, any existing value is removed.
3284
+ *
3285
+ *
3286
+ */
3287
+ readonly externalTaxAmount?: ExternalTaxAmountDraft;
3288
+ /**
3289
+ * `key` of the [ShippingMethod](ctp:api:type:ShippingMethod) used for this Line Item.
3290
+ * This is required for Carts with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
3291
+ *
3292
+ *
3293
+ */
3294
+ readonly shippingKey?: string;
3295
+ }
3296
+ /**
3297
+ * Can be used if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode).
3298
+ *
3299
+ */
3300
+ export interface CartSetLineItemTaxRateAction {
3301
+ readonly action: 'setLineItemTaxRate';
3302
+ /**
3303
+ * `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
3304
+ *
3305
+ *
3306
+ */
3307
+ readonly lineItemId?: string;
3308
+ /**
3309
+ * `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
3310
+ *
3311
+ *
3312
+ */
3313
+ readonly lineItemKey?: string;
3314
+ /**
3315
+ * Value to set.
3316
+ * If empty, any existing value is removed.
3317
+ *
3318
+ *
3319
+ */
3320
+ readonly externalTaxRate?: ExternalTaxRateDraft;
3321
+ /**
3322
+ * `key` of the [ShippingMethod](ctp:api:type:ShippingMethod) used for this Line Item.
3323
+ * This is required for Carts with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
3324
+ *
3325
+ *
3326
+ */
3327
+ readonly shippingKey?: string;
3328
+ }
3329
+ /**
3330
+ * Sets the [LineItem](ctp:api:type:LineItem) `totalPrice` and `price`, and changes the `priceMode` to `ExternalTotal` [LineItemPriceMode](ctp:api:type:LineItemPriceMode).
3331
+ *
3332
+ */
3333
+ export interface CartSetLineItemTotalPriceAction {
3334
+ readonly action: 'setLineItemTotalPrice';
3335
+ /**
3336
+ * `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
3337
+ *
3338
+ *
3339
+ */
3340
+ readonly lineItemId?: string;
3341
+ /**
3342
+ * `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
3343
+ *
3344
+ *
3345
+ */
3346
+ readonly lineItemKey?: string;
3347
+ /**
3348
+ * Value to set.
3349
+ * If `externalTotalPrice` is not given and the `priceMode` is `ExternalTotal`, the external price is unset and the `priceMode` is set to `Platform`.
3350
+ *
3351
+ *
3352
+ */
3353
+ readonly externalTotalPrice?: ExternalLineItemTotalPrice;
3354
+ }
3355
+ export interface CartSetLocaleAction {
3356
+ readonly action: 'setLocale';
3357
+ /**
3358
+ * Value to set.
3359
+ * Must be one of the [Project](ctp:api:type:Project)'s `languages`.
3360
+ * If empty, any existing value will be removed.
3361
+ *
3362
+ *
3363
+ */
3364
+ readonly locale?: string;
3365
+ }
3366
+ /**
3367
+ * Setting the shipping address also sets the [TaxRate](ctp:api:type:TaxRate) of Line Items and calculates the [TaxedPrice](ctp:api:type:TaxedPrice).
3368
+ *
3369
+ * If a matching price cannot be found for the given shipping address during [Line Item price selection](/../api/pricing-and-discounts-overview#line-item-price-selection),
3370
+ * a [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError) error is returned.
3371
+ *
3372
+ * If you want to allow shipping to states inside a country that are not explicitly covered by a TaxRate,
3373
+ * set the `countryTaxRateFallbackEnabled` field to `true` in the [CartsConfiguration](ctp:api:type:CartsConfiguration) by using
3374
+ * the [Change CountryTaxRateFallbackEnabled](ctp:api:type:ProjectChangeCountryTaxRateFallbackEnabledAction) update action.
3375
+ *
3376
+ */
3377
+ export interface CartSetShippingAddressAction {
3378
+ readonly action: 'setShippingAddress';
3379
+ /**
3380
+ * Value to set.
3381
+ * If not set, the shipping address is unset, and the `taxedPrice` and `taxRate` are unset in all Line Items of the Cart.
3382
+ *
3383
+ *
3384
+ */
3385
+ readonly address?: _BaseAddress;
3386
+ }
3387
+ export interface CartSetShippingAddressCustomFieldAction {
3388
+ readonly action: 'setShippingAddressCustomField';
3389
+ /**
3390
+ * Name of the [Custom Field](/../api/projects/custom-fields).
3391
+ *
3392
+ *
3393
+ */
3394
+ readonly name: string;
3395
+ /**
3396
+ * If `value` is absent or `null`, this field will be removed if it exists.
3397
+ * Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
3398
+ * If `value` is provided, it is set for the field defined by `name`.
3399
+ *
3400
+ *
3401
+ */
3402
+ readonly value?: any;
3403
+ }
3404
+ export interface CartSetShippingAddressCustomTypeAction {
3405
+ readonly action: 'setShippingAddressCustomType';
3406
+ /**
3407
+ * Defines the [Type](ctp:api:type:Type) that extends the `shippingAddress` with [Custom Fields](/../api/projects/custom-fields).
3408
+ * If absent, any existing Type and Custom Fields are removed from the `shippingAddress`.
3409
+ *
3410
+ *
3411
+ */
3412
+ readonly type?: TypeResourceIdentifier;
3413
+ /**
3414
+ * Sets the [Custom Fields](/../api/projects/custom-fields) fields for the `shippingAddress`.
3415
+ *
3416
+ *
3417
+ */
3418
+ readonly fields?: FieldContainer;
3419
+ }
3420
+ export interface CartSetShippingCustomFieldAction {
3421
+ readonly action: 'setShippingCustomField';
3422
+ /**
3423
+ * The `shippingKey` of the [Shipping](ctp:api:type:Shipping) to customize. Used to specify which Shipping Method to customize
3424
+ * on a Cart with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
3425
+ * Leave this empty to customize the one and only ShippingMethod on a `Single` ShippingMode Cart.
3426
+ *
3427
+ *
3428
+ */
3429
+ readonly shippingKey?: string;
3430
+ /**
3431
+ * Name of the [Custom Field](/../api/projects/custom-fields).
3432
+ *
3433
+ *
3434
+ */
3435
+ readonly name: string;
3436
+ /**
3437
+ * If `value` is absent or `null`, this field will be removed if it exists.
3438
+ * Trying to remove a field that does not exist will fail with an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
3439
+ * If `value` is provided, it is set for the field defined by `name`.
3440
+ *
3441
+ *
3442
+ */
3443
+ readonly value?: any;
3444
+ }
3445
+ /**
3446
+ * This action sets, overwrites, or removes any existing Custom Type and Custom Fields for the Cart's `shippingMethod` or `shipping`.
3447
+ *
3448
+ */
3449
+ export interface CartSetShippingCustomTypeAction {
3450
+ readonly action: 'setShippingCustomType';
3451
+ /**
3452
+ * The `shippingKey` of the [Shipping](ctp:api:type:Shipping) to customize. Used to specify which Shipping Method to customize
3453
+ * on a Cart with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
3454
+ * Leave this empty to customize the one and only ShippingMethod on a `Single` ShippingMode Cart.
3455
+ *
3456
+ *
3457
+ */
3458
+ readonly shippingKey?: string;
3459
+ /**
3460
+ * Defines the [Type](ctp:api:type:Type) that extends the specified ShippingMethod with [Custom Fields](/../api/projects/custom-fields).
3461
+ * If absent, any existing Type and Custom Fields are removed from the ShippingMethod.
3462
+ *
3463
+ *
3464
+ */
3465
+ readonly type?: TypeResourceIdentifier;
3466
+ /**
3467
+ * Sets the [Custom Fields](/../api/projects/custom-fields) fields for the `shippingMethod`.
3468
+ *
3469
+ *
3470
+ */
3471
+ readonly fields?: FieldContainer;
3472
+ }
3473
+ /**
3474
+ * To set the Cart's Shipping Method the Cart must have the `Single` [ShippingMode](ctp:api:type:ShippingMode) and a `shippingAddress`.
3475
+ *
3476
+ */
3477
+ export interface CartSetShippingMethodAction {
3478
+ readonly action: 'setShippingMethod';
3479
+ /**
3480
+ * Value to set.
3481
+ * If empty, any existing value is removed.
3482
+ *
3483
+ * If the referenced Shipping Method has a predicate that does not match the Cart, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned.
3484
+ *
3485
+ *
3486
+ */
3487
+ readonly shippingMethod?: ShippingMethodResourceIdentifier;
3488
+ /**
3489
+ * An external Tax Rate can be set if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode).
3490
+ *
3491
+ *
3492
+ */
3493
+ readonly externalTaxRate?: ExternalTaxRateDraft;
3494
+ }
3495
+ /**
3496
+ * A Shipping Method tax amount can be set if the Cart has the `ExternalAmount` [TaxMode](ctp:api:type:TaxMode).
3497
+ *
3498
+ */
3499
+ export interface CartSetShippingMethodTaxAmountAction {
3500
+ readonly action: 'setShippingMethodTaxAmount';
3501
+ /**
3502
+ * `key` of the [ShippingMethod](ctp:api:type:ShippingMethod) to update. This is required for Carts with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
3503
+ *
3504
+ *
3505
+ */
3506
+ readonly shippingKey?: string;
3507
+ /**
3508
+ * Value to set.
3509
+ * If empty, any existing value is removed.
3510
+ *
3511
+ *
3512
+ */
3513
+ readonly externalTaxAmount?: ExternalTaxAmountDraft;
3514
+ }
3515
+ /**
3516
+ * A Shipping Method Tax Rate can be set if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode).
3517
+ *
3518
+ */
3519
+ export interface CartSetShippingMethodTaxRateAction {
3520
+ readonly action: 'setShippingMethodTaxRate';
3521
+ /**
3522
+ * `key` of the [ShippingMethod](ctp:api:type:ShippingMethod) to update. This is required for Carts with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
3523
+ *
3524
+ *
3525
+ */
3526
+ readonly shippingKey?: string;
3527
+ /**
3528
+ * Value to set.
3529
+ * If empty, any existing value is removed.
3530
+ *
3531
+ *
3532
+ */
3533
+ readonly externalTaxRate?: ExternalTaxRateDraft;
3534
+ }
3535
+ /**
3536
+ * Input used to select a [ShippingRatePriceTier](ctp:api:type:ShippingRatePriceTier).
3537
+ * If no matching tier can be found, or the input is not set, the default price for the shipping rate is used.
3538
+ *
3539
+ */
3540
+ export interface CartSetShippingRateInputAction {
3541
+ readonly action: 'setShippingRateInput';
3542
+ /**
3543
+ * The data type of this field depends on the `shippingRateInputType.type` configured in the [Project](ctp:api:type:Project):
3544
+ *
3545
+ * - If `CartClassification`, it must be [ClassificationShippingRateInputDraft](ctp:api:type:ClassificationShippingRateInputDraft).
3546
+ * - If `CartScore`, it must be [ScoreShippingRateInputDraft](ctp:api:type:ScoreShippingRateInputDraft).
3547
+ * - If `CartValue`, it cannot be set.
3548
+ *
3549
+ *
3550
+ */
3551
+ readonly shippingRateInput?: ShippingRateInputDraft;
3552
+ }
3553
+ /**
3554
+ * Changes the [CartState](ctp:api:type:CartState) from `Frozen` to `Active`. Reactivates a [Frozen Cart](ctp:api:type:FrozenCarts).
3555
+ * This action updates all prices in the Cart according to latest Prices on related Product Variants and Shipping Methods and by applying all discounts currently being active and applicable for the Cart.
3556
+ *
3557
+ */
3558
+ export interface CartUnfreezeCartAction {
3559
+ readonly action: 'unfreezeCart';
3560
+ }
3561
+ /**
3562
+ * Updates an address in `itemShippingAddresses` by keeping the Address `key`.
3563
+ *
3564
+ */
3565
+ export interface CartUpdateItemShippingAddressAction {
3566
+ readonly action: 'updateItemShippingAddress';
3567
+ /**
3568
+ * The new Address with the same `key` as the Address it will replace.
3569
+ *
3570
+ *
3571
+ */
3572
+ readonly address: _BaseAddress;
3573
+ }
3574
+ export interface ProductTailoringUpdate {
3575
+ /**
3576
+ * Expected version of the ProductTailoring on which the changes apply.
3577
+ * If the expected version does not match the actual version, a [409 Conflict](/../api/errors#409-conflict) is returned.
3578
+ *
3579
+ *
3580
+ */
3581
+ readonly version: number;
3582
+ /**
3583
+ * Update actions to be performed on the ProductTailoring.
3584
+ *
3585
+ *
3586
+ */
3587
+ readonly actions: ProductTailoringUpdateAction[];
3588
+ }
3589
+ /**
3590
+ * The scope controls which part of the product information is published.
3591
+ */
3592
+ export type ProductPublishScope = 'All' | 'Prices' | string;
3593
+ //# sourceMappingURL=cart.d.ts.map