@gradientedge/commercetools-utils 5.27.1 → 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.
- package/dist/cjs/types/models/approval-flow.d.ts +264 -0
- package/dist/cjs/types/models/approval-flow.d.ts.map +1 -0
- package/dist/cjs/types/models/approval-flow.js +8 -0
- package/dist/cjs/types/models/approval-flow.js.map +1 -0
- package/dist/cjs/types/models/approval-rule.d.ts +415 -0
- package/dist/cjs/types/models/approval-rule.d.ts.map +1 -0
- package/dist/cjs/types/models/approval-rule.js +8 -0
- package/dist/cjs/types/models/approval-rule.js.map +1 -0
- package/dist/cjs/types/models/associate-role.d.ts +319 -0
- package/dist/cjs/types/models/associate-role.d.ts.map +1 -0
- package/dist/cjs/types/models/associate-role.js +8 -0
- package/dist/cjs/types/models/associate-role.js.map +1 -0
- package/dist/cjs/types/models/attribute-group.d.ts +254 -0
- package/dist/cjs/types/models/attribute-group.d.ts.map +1 -0
- package/dist/cjs/types/models/attribute-group.js +8 -0
- package/dist/cjs/types/models/attribute-group.js.map +1 -0
- package/dist/cjs/types/models/business-unit.d.ts +1244 -0
- package/dist/cjs/types/models/business-unit.d.ts.map +1 -0
- package/dist/cjs/types/models/business-unit.js +8 -0
- package/dist/cjs/types/models/business-unit.js.map +1 -0
- package/dist/cjs/types/models/cart-discount.d.ts +848 -0
- package/dist/cjs/types/models/cart-discount.d.ts.map +1 -0
- package/dist/cjs/types/models/cart-discount.js +8 -0
- package/dist/cjs/types/models/cart-discount.js.map +1 -0
- package/dist/cjs/types/models/cart.d.ts +3593 -0
- package/dist/cjs/types/models/cart.d.ts.map +1 -0
- package/dist/cjs/types/models/cart.js +8 -0
- package/dist/cjs/types/models/cart.js.map +1 -0
- package/dist/cjs/types/models/category.d.ts +636 -0
- package/dist/cjs/types/models/category.d.ts.map +1 -0
- package/dist/cjs/types/models/category.js +8 -0
- package/dist/cjs/types/models/category.js.map +1 -0
- package/dist/cjs/types/models/channel.d.ts +380 -0
- package/dist/cjs/types/models/channel.d.ts.map +1 -0
- package/dist/cjs/types/models/channel.js +8 -0
- package/dist/cjs/types/models/channel.js.map +1 -0
- package/dist/cjs/types/models/common.d.ts +1163 -0
- package/dist/cjs/types/models/common.d.ts.map +1 -0
- package/dist/cjs/types/models/common.js +8 -0
- package/dist/cjs/types/models/common.js.map +1 -0
- package/dist/cjs/types/models/custom-object.d.ts +152 -0
- package/dist/cjs/types/models/custom-object.d.ts.map +1 -0
- package/dist/cjs/types/models/custom-object.js +8 -0
- package/dist/cjs/types/models/custom-object.js.map +1 -0
- package/dist/cjs/types/models/customer-group.d.ts +235 -0
- package/dist/cjs/types/models/customer-group.d.ts.map +1 -0
- package/dist/cjs/types/models/customer-group.js +8 -0
- package/dist/cjs/types/models/customer-group.js.map +1 -0
- package/dist/cjs/types/models/customer-search.d.ts +114 -0
- package/dist/cjs/types/models/customer-search.d.ts.map +1 -0
- package/dist/cjs/types/models/customer-search.js +8 -0
- package/dist/cjs/types/models/customer-search.js.map +1 -0
- package/dist/cjs/types/models/customer.d.ts +1270 -0
- package/dist/cjs/types/models/customer.d.ts.map +1 -0
- package/dist/cjs/types/models/customer.js +8 -0
- package/dist/cjs/types/models/customer.js.map +1 -0
- package/dist/cjs/types/models/discount-code.d.ts +473 -0
- package/dist/cjs/types/models/discount-code.d.ts.map +1 -0
- package/dist/cjs/types/models/discount-code.js +8 -0
- package/dist/cjs/types/models/discount-code.js.map +1 -0
- package/dist/cjs/types/models/error.d.ts +3330 -0
- package/dist/cjs/types/models/error.d.ts.map +1 -0
- package/dist/cjs/types/models/error.js +8 -0
- package/dist/cjs/types/models/error.js.map +1 -0
- package/dist/cjs/types/models/extension.d.ts +336 -0
- package/dist/cjs/types/models/extension.d.ts.map +1 -0
- package/dist/cjs/types/models/extension.js +8 -0
- package/dist/cjs/types/models/extension.js.map +1 -0
- package/dist/cjs/types/models/index.d.ts +48 -0
- package/dist/cjs/types/models/index.d.ts.map +1 -0
- package/dist/cjs/types/models/index.js +64 -0
- package/dist/cjs/types/models/index.js.map +1 -0
- package/dist/cjs/types/models/inventory.d.ts +330 -0
- package/dist/cjs/types/models/inventory.d.ts.map +1 -0
- package/dist/cjs/types/models/inventory.js +8 -0
- package/dist/cjs/types/models/inventory.js.map +1 -0
- package/dist/cjs/types/models/me.d.ts +2636 -0
- package/dist/cjs/types/models/me.d.ts.map +1 -0
- package/dist/cjs/types/models/me.js +8 -0
- package/dist/cjs/types/models/me.js.map +1 -0
- package/dist/cjs/types/models/message.d.ts +23707 -0
- package/dist/cjs/types/models/message.d.ts.map +1 -0
- package/dist/cjs/types/models/message.js +8 -0
- package/dist/cjs/types/models/message.js.map +1 -0
- package/dist/cjs/types/models/order-edit.d.ts +2725 -0
- package/dist/cjs/types/models/order-edit.d.ts.map +1 -0
- package/dist/cjs/types/models/order-edit.js +8 -0
- package/dist/cjs/types/models/order-edit.js.map +1 -0
- package/dist/cjs/types/models/order.d.ts +3187 -0
- package/dist/cjs/types/models/order.d.ts.map +1 -0
- package/dist/cjs/types/models/order.js +8 -0
- package/dist/cjs/types/models/order.js.map +1 -0
- package/dist/cjs/types/models/payment.d.ts +680 -0
- package/dist/cjs/types/models/payment.d.ts.map +1 -0
- package/dist/cjs/types/models/payment.js +8 -0
- package/dist/cjs/types/models/payment.js.map +1 -0
- package/dist/cjs/types/models/product-discount.d.ts +465 -0
- package/dist/cjs/types/models/product-discount.d.ts.map +1 -0
- package/dist/cjs/types/models/product-discount.js +8 -0
- package/dist/cjs/types/models/product-discount.js.map +1 -0
- package/dist/cjs/types/models/product-search.d.ts +437 -0
- package/dist/cjs/types/models/product-search.d.ts.map +1 -0
- package/dist/cjs/types/models/product-search.js +8 -0
- package/dist/cjs/types/models/product-search.js.map +1 -0
- package/dist/cjs/types/models/product-selection.d.ts +579 -0
- package/dist/cjs/types/models/product-selection.d.ts.map +1 -0
- package/dist/cjs/types/models/product-selection.js +8 -0
- package/dist/cjs/types/models/product-selection.js.map +1 -0
- package/dist/cjs/types/models/product-tailoring.d.ts +1368 -0
- package/dist/cjs/types/models/product-tailoring.d.ts.map +1 -0
- package/dist/cjs/types/models/product-tailoring.js +8 -0
- package/dist/cjs/types/models/product-tailoring.js.map +1 -0
- package/dist/cjs/types/models/product-type.d.ts +775 -0
- package/dist/cjs/types/models/product-type.d.ts.map +1 -0
- package/dist/cjs/types/models/product-type.js +8 -0
- package/dist/cjs/types/models/product-type.js.map +1 -0
- package/dist/cjs/types/models/product.d.ts +2314 -0
- package/dist/cjs/types/models/product.d.ts.map +1 -0
- package/dist/cjs/types/models/product.js +8 -0
- package/dist/cjs/types/models/product.js.map +1 -0
- package/dist/cjs/types/models/project.d.ts +418 -0
- package/dist/cjs/types/models/project.d.ts.map +1 -0
- package/dist/cjs/types/models/project.js +8 -0
- package/dist/cjs/types/models/project.js.map +1 -0
- package/dist/cjs/types/models/quote-request.d.ts +452 -0
- package/dist/cjs/types/models/quote-request.d.ts.map +1 -0
- package/dist/cjs/types/models/quote-request.js +8 -0
- package/dist/cjs/types/models/quote-request.js.map +1 -0
- package/dist/cjs/types/models/quote.d.ts +473 -0
- package/dist/cjs/types/models/quote.d.ts.map +1 -0
- package/dist/cjs/types/models/quote.js +8 -0
- package/dist/cjs/types/models/quote.js.map +1 -0
- package/dist/cjs/types/models/review.d.ts +435 -0
- package/dist/cjs/types/models/review.d.ts.map +1 -0
- package/dist/cjs/types/models/review.js +8 -0
- package/dist/cjs/types/models/review.js.map +1 -0
- package/dist/cjs/types/models/scalar-types.d.ts +10 -0
- package/dist/cjs/types/models/scalar-types.d.ts.map +1 -0
- package/dist/cjs/types/models/scalar-types.js +8 -0
- package/dist/cjs/types/models/scalar-types.js.map +1 -0
- package/dist/cjs/types/models/search.d.ts +334 -0
- package/dist/cjs/types/models/search.d.ts.map +1 -0
- package/dist/cjs/types/models/search.js +8 -0
- package/dist/cjs/types/models/search.js.map +1 -0
- package/dist/cjs/types/models/shipping-method.d.ts +595 -0
- package/dist/cjs/types/models/shipping-method.d.ts.map +1 -0
- package/dist/cjs/types/models/shipping-method.js +8 -0
- package/dist/cjs/types/models/shipping-method.js.map +1 -0
- package/dist/cjs/types/models/shopping-list.d.ts +941 -0
- package/dist/cjs/types/models/shopping-list.d.ts.map +1 -0
- package/dist/cjs/types/models/shopping-list.js +8 -0
- package/dist/cjs/types/models/shopping-list.js.map +1 -0
- package/dist/cjs/types/models/staged-quote.d.ts +345 -0
- package/dist/cjs/types/models/staged-quote.d.ts.map +1 -0
- package/dist/cjs/types/models/staged-quote.js +8 -0
- package/dist/cjs/types/models/staged-quote.js.map +1 -0
- package/dist/cjs/types/models/standalone-price.d.ts +546 -0
- package/dist/cjs/types/models/standalone-price.d.ts.map +1 -0
- package/dist/cjs/types/models/standalone-price.js +8 -0
- package/dist/cjs/types/models/standalone-price.js.map +1 -0
- package/dist/cjs/types/models/state.d.ts +342 -0
- package/dist/cjs/types/models/state.d.ts.map +1 -0
- package/dist/cjs/types/models/state.js +8 -0
- package/dist/cjs/types/models/state.js.map +1 -0
- package/dist/cjs/types/models/store-country.d.ts +14 -0
- package/dist/cjs/types/models/store-country.d.ts.map +1 -0
- package/dist/cjs/types/models/store-country.js +8 -0
- package/dist/cjs/types/models/store-country.js.map +1 -0
- package/dist/cjs/types/models/store.d.ts +548 -0
- package/dist/cjs/types/models/store.d.ts.map +1 -0
- package/dist/cjs/types/models/store.js +8 -0
- package/dist/cjs/types/models/store.js.map +1 -0
- package/dist/cjs/types/models/subscription.d.ts +772 -0
- package/dist/cjs/types/models/subscription.d.ts.map +1 -0
- package/dist/cjs/types/models/subscription.js +8 -0
- package/dist/cjs/types/models/subscription.js.map +1 -0
- package/dist/cjs/types/models/tax-category.d.ts +379 -0
- package/dist/cjs/types/models/tax-category.d.ts.map +1 -0
- package/dist/cjs/types/models/tax-category.js +8 -0
- package/dist/cjs/types/models/tax-category.js.map +1 -0
- package/dist/cjs/types/models/type.d.ts +646 -0
- package/dist/cjs/types/models/type.d.ts.map +1 -0
- package/dist/cjs/types/models/type.js +8 -0
- package/dist/cjs/types/models/type.js.map +1 -0
- package/dist/cjs/types/models/warning.d.ts +24 -0
- package/dist/cjs/types/models/warning.d.ts.map +1 -0
- package/dist/cjs/types/models/warning.js +8 -0
- package/dist/cjs/types/models/warning.js.map +1 -0
- package/dist/cjs/types/models/zone.d.ts +235 -0
- package/dist/cjs/types/models/zone.d.ts.map +1 -0
- package/dist/cjs/types/models/zone.js +8 -0
- package/dist/cjs/types/models/zone.js.map +1 -0
- package/dist/cjs/types.d.ts +1 -1
- package/dist/cjs/types.d.ts.map +1 -1
- package/dist/cjs/types.js +15 -0
- package/dist/cjs/types.js.map +1 -1
- package/dist/mjs/types/models/approval-flow.d.ts +264 -0
- package/dist/mjs/types/models/approval-flow.d.ts.map +1 -0
- package/dist/mjs/types/models/approval-flow.js +7 -0
- package/dist/mjs/types/models/approval-flow.js.map +1 -0
- package/dist/mjs/types/models/approval-rule.d.ts +415 -0
- package/dist/mjs/types/models/approval-rule.d.ts.map +1 -0
- package/dist/mjs/types/models/approval-rule.js +7 -0
- package/dist/mjs/types/models/approval-rule.js.map +1 -0
- package/dist/mjs/types/models/associate-role.d.ts +319 -0
- package/dist/mjs/types/models/associate-role.d.ts.map +1 -0
- package/dist/mjs/types/models/associate-role.js +7 -0
- package/dist/mjs/types/models/associate-role.js.map +1 -0
- package/dist/mjs/types/models/attribute-group.d.ts +254 -0
- package/dist/mjs/types/models/attribute-group.d.ts.map +1 -0
- package/dist/mjs/types/models/attribute-group.js +7 -0
- package/dist/mjs/types/models/attribute-group.js.map +1 -0
- package/dist/mjs/types/models/business-unit.d.ts +1244 -0
- package/dist/mjs/types/models/business-unit.d.ts.map +1 -0
- package/dist/mjs/types/models/business-unit.js +7 -0
- package/dist/mjs/types/models/business-unit.js.map +1 -0
- package/dist/mjs/types/models/cart-discount.d.ts +848 -0
- package/dist/mjs/types/models/cart-discount.d.ts.map +1 -0
- package/dist/mjs/types/models/cart-discount.js +7 -0
- package/dist/mjs/types/models/cart-discount.js.map +1 -0
- package/dist/mjs/types/models/cart.d.ts +3593 -0
- package/dist/mjs/types/models/cart.d.ts.map +1 -0
- package/dist/mjs/types/models/cart.js +7 -0
- package/dist/mjs/types/models/cart.js.map +1 -0
- package/dist/mjs/types/models/category.d.ts +636 -0
- package/dist/mjs/types/models/category.d.ts.map +1 -0
- package/dist/mjs/types/models/category.js +7 -0
- package/dist/mjs/types/models/category.js.map +1 -0
- package/dist/mjs/types/models/channel.d.ts +380 -0
- package/dist/mjs/types/models/channel.d.ts.map +1 -0
- package/dist/mjs/types/models/channel.js +7 -0
- package/dist/mjs/types/models/channel.js.map +1 -0
- package/dist/mjs/types/models/common.d.ts +1163 -0
- package/dist/mjs/types/models/common.d.ts.map +1 -0
- package/dist/mjs/types/models/common.js +7 -0
- package/dist/mjs/types/models/common.js.map +1 -0
- package/dist/mjs/types/models/custom-object.d.ts +152 -0
- package/dist/mjs/types/models/custom-object.d.ts.map +1 -0
- package/dist/mjs/types/models/custom-object.js +7 -0
- package/dist/mjs/types/models/custom-object.js.map +1 -0
- package/dist/mjs/types/models/customer-group.d.ts +235 -0
- package/dist/mjs/types/models/customer-group.d.ts.map +1 -0
- package/dist/mjs/types/models/customer-group.js +7 -0
- package/dist/mjs/types/models/customer-group.js.map +1 -0
- package/dist/mjs/types/models/customer-search.d.ts +114 -0
- package/dist/mjs/types/models/customer-search.d.ts.map +1 -0
- package/dist/mjs/types/models/customer-search.js +7 -0
- package/dist/mjs/types/models/customer-search.js.map +1 -0
- package/dist/mjs/types/models/customer.d.ts +1270 -0
- package/dist/mjs/types/models/customer.d.ts.map +1 -0
- package/dist/mjs/types/models/customer.js +7 -0
- package/dist/mjs/types/models/customer.js.map +1 -0
- package/dist/mjs/types/models/discount-code.d.ts +473 -0
- package/dist/mjs/types/models/discount-code.d.ts.map +1 -0
- package/dist/mjs/types/models/discount-code.js +7 -0
- package/dist/mjs/types/models/discount-code.js.map +1 -0
- package/dist/mjs/types/models/error.d.ts +3330 -0
- package/dist/mjs/types/models/error.d.ts.map +1 -0
- package/dist/mjs/types/models/error.js +7 -0
- package/dist/mjs/types/models/error.js.map +1 -0
- package/dist/mjs/types/models/extension.d.ts +336 -0
- package/dist/mjs/types/models/extension.d.ts.map +1 -0
- package/dist/mjs/types/models/extension.js +7 -0
- package/dist/mjs/types/models/extension.js.map +1 -0
- package/dist/mjs/types/models/index.d.ts +48 -0
- package/dist/mjs/types/models/index.d.ts.map +1 -0
- package/dist/mjs/types/models/index.js +48 -0
- package/dist/mjs/types/models/index.js.map +1 -0
- package/dist/mjs/types/models/inventory.d.ts +330 -0
- package/dist/mjs/types/models/inventory.d.ts.map +1 -0
- package/dist/mjs/types/models/inventory.js +7 -0
- package/dist/mjs/types/models/inventory.js.map +1 -0
- package/dist/mjs/types/models/me.d.ts +2636 -0
- package/dist/mjs/types/models/me.d.ts.map +1 -0
- package/dist/mjs/types/models/me.js +7 -0
- package/dist/mjs/types/models/me.js.map +1 -0
- package/dist/mjs/types/models/message.d.ts +23707 -0
- package/dist/mjs/types/models/message.d.ts.map +1 -0
- package/dist/mjs/types/models/message.js +7 -0
- package/dist/mjs/types/models/message.js.map +1 -0
- package/dist/mjs/types/models/order-edit.d.ts +2725 -0
- package/dist/mjs/types/models/order-edit.d.ts.map +1 -0
- package/dist/mjs/types/models/order-edit.js +7 -0
- package/dist/mjs/types/models/order-edit.js.map +1 -0
- package/dist/mjs/types/models/order.d.ts +3187 -0
- package/dist/mjs/types/models/order.d.ts.map +1 -0
- package/dist/mjs/types/models/order.js +7 -0
- package/dist/mjs/types/models/order.js.map +1 -0
- package/dist/mjs/types/models/payment.d.ts +680 -0
- package/dist/mjs/types/models/payment.d.ts.map +1 -0
- package/dist/mjs/types/models/payment.js +7 -0
- package/dist/mjs/types/models/payment.js.map +1 -0
- package/dist/mjs/types/models/product-discount.d.ts +465 -0
- package/dist/mjs/types/models/product-discount.d.ts.map +1 -0
- package/dist/mjs/types/models/product-discount.js +7 -0
- package/dist/mjs/types/models/product-discount.js.map +1 -0
- package/dist/mjs/types/models/product-search.d.ts +437 -0
- package/dist/mjs/types/models/product-search.d.ts.map +1 -0
- package/dist/mjs/types/models/product-search.js +7 -0
- package/dist/mjs/types/models/product-search.js.map +1 -0
- package/dist/mjs/types/models/product-selection.d.ts +579 -0
- package/dist/mjs/types/models/product-selection.d.ts.map +1 -0
- package/dist/mjs/types/models/product-selection.js +7 -0
- package/dist/mjs/types/models/product-selection.js.map +1 -0
- package/dist/mjs/types/models/product-tailoring.d.ts +1368 -0
- package/dist/mjs/types/models/product-tailoring.d.ts.map +1 -0
- package/dist/mjs/types/models/product-tailoring.js +7 -0
- package/dist/mjs/types/models/product-tailoring.js.map +1 -0
- package/dist/mjs/types/models/product-type.d.ts +775 -0
- package/dist/mjs/types/models/product-type.d.ts.map +1 -0
- package/dist/mjs/types/models/product-type.js +7 -0
- package/dist/mjs/types/models/product-type.js.map +1 -0
- package/dist/mjs/types/models/product.d.ts +2314 -0
- package/dist/mjs/types/models/product.d.ts.map +1 -0
- package/dist/mjs/types/models/product.js +7 -0
- package/dist/mjs/types/models/product.js.map +1 -0
- package/dist/mjs/types/models/project.d.ts +418 -0
- package/dist/mjs/types/models/project.d.ts.map +1 -0
- package/dist/mjs/types/models/project.js +7 -0
- package/dist/mjs/types/models/project.js.map +1 -0
- package/dist/mjs/types/models/quote-request.d.ts +452 -0
- package/dist/mjs/types/models/quote-request.d.ts.map +1 -0
- package/dist/mjs/types/models/quote-request.js +7 -0
- package/dist/mjs/types/models/quote-request.js.map +1 -0
- package/dist/mjs/types/models/quote.d.ts +473 -0
- package/dist/mjs/types/models/quote.d.ts.map +1 -0
- package/dist/mjs/types/models/quote.js +7 -0
- package/dist/mjs/types/models/quote.js.map +1 -0
- package/dist/mjs/types/models/review.d.ts +435 -0
- package/dist/mjs/types/models/review.d.ts.map +1 -0
- package/dist/mjs/types/models/review.js +7 -0
- package/dist/mjs/types/models/review.js.map +1 -0
- package/dist/mjs/types/models/scalar-types.d.ts +10 -0
- package/dist/mjs/types/models/scalar-types.d.ts.map +1 -0
- package/dist/mjs/types/models/scalar-types.js +7 -0
- package/dist/mjs/types/models/scalar-types.js.map +1 -0
- package/dist/mjs/types/models/search.d.ts +334 -0
- package/dist/mjs/types/models/search.d.ts.map +1 -0
- package/dist/mjs/types/models/search.js +7 -0
- package/dist/mjs/types/models/search.js.map +1 -0
- package/dist/mjs/types/models/shipping-method.d.ts +595 -0
- package/dist/mjs/types/models/shipping-method.d.ts.map +1 -0
- package/dist/mjs/types/models/shipping-method.js +7 -0
- package/dist/mjs/types/models/shipping-method.js.map +1 -0
- package/dist/mjs/types/models/shopping-list.d.ts +941 -0
- package/dist/mjs/types/models/shopping-list.d.ts.map +1 -0
- package/dist/mjs/types/models/shopping-list.js +7 -0
- package/dist/mjs/types/models/shopping-list.js.map +1 -0
- package/dist/mjs/types/models/staged-quote.d.ts +345 -0
- package/dist/mjs/types/models/staged-quote.d.ts.map +1 -0
- package/dist/mjs/types/models/staged-quote.js +7 -0
- package/dist/mjs/types/models/staged-quote.js.map +1 -0
- package/dist/mjs/types/models/standalone-price.d.ts +546 -0
- package/dist/mjs/types/models/standalone-price.d.ts.map +1 -0
- package/dist/mjs/types/models/standalone-price.js +7 -0
- package/dist/mjs/types/models/standalone-price.js.map +1 -0
- package/dist/mjs/types/models/state.d.ts +342 -0
- package/dist/mjs/types/models/state.d.ts.map +1 -0
- package/dist/mjs/types/models/state.js +7 -0
- package/dist/mjs/types/models/state.js.map +1 -0
- package/dist/mjs/types/models/store-country.d.ts +14 -0
- package/dist/mjs/types/models/store-country.d.ts.map +1 -0
- package/dist/mjs/types/models/store-country.js +7 -0
- package/dist/mjs/types/models/store-country.js.map +1 -0
- package/dist/mjs/types/models/store.d.ts +548 -0
- package/dist/mjs/types/models/store.d.ts.map +1 -0
- package/dist/mjs/types/models/store.js +7 -0
- package/dist/mjs/types/models/store.js.map +1 -0
- package/dist/mjs/types/models/subscription.d.ts +772 -0
- package/dist/mjs/types/models/subscription.d.ts.map +1 -0
- package/dist/mjs/types/models/subscription.js +7 -0
- package/dist/mjs/types/models/subscription.js.map +1 -0
- package/dist/mjs/types/models/tax-category.d.ts +379 -0
- package/dist/mjs/types/models/tax-category.d.ts.map +1 -0
- package/dist/mjs/types/models/tax-category.js +7 -0
- package/dist/mjs/types/models/tax-category.js.map +1 -0
- package/dist/mjs/types/models/type.d.ts +646 -0
- package/dist/mjs/types/models/type.d.ts.map +1 -0
- package/dist/mjs/types/models/type.js +7 -0
- package/dist/mjs/types/models/type.js.map +1 -0
- package/dist/mjs/types/models/warning.d.ts +24 -0
- package/dist/mjs/types/models/warning.d.ts.map +1 -0
- package/dist/mjs/types/models/warning.js +7 -0
- package/dist/mjs/types/models/warning.js.map +1 -0
- package/dist/mjs/types/models/zone.d.ts +235 -0
- package/dist/mjs/types/models/zone.d.ts.map +1 -0
- package/dist/mjs/types/models/zone.js +7 -0
- package/dist/mjs/types/models/zone.js.map +1 -0
- package/dist/mjs/types.d.ts +1 -1
- package/dist/mjs/types.d.ts.map +1 -1
- package/dist/mjs/types.js +1 -0
- package/dist/mjs/types.js.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,2725 @@
|
|
|
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 { CustomLineItemPriceMode, DirectDiscountDraft, ExternalLineItemTotalPrice, ExternalTaxAmountDraft, ExternalTaxRateDraft, InventoryMode, ItemShippingDetailsDraft, RoundingMode, ShippingRateInputDraft, TaxCalculationMode, TaxedPrice, TaxMode, TaxPortionDraft } from './cart.js';
|
|
7
|
+
import { ChannelResourceIdentifier } from './channel.js';
|
|
8
|
+
import { BaseResource, CreatedBy, LastModifiedBy, LocalizedString, TypedMoney, _BaseAddress, _Money } from './common.js';
|
|
9
|
+
import { CustomerGroupResourceIdentifier } from './customer-group.js';
|
|
10
|
+
import { DiscountCodeReference } from './discount-code.js';
|
|
11
|
+
import { ErrorObject } from './error.js';
|
|
12
|
+
import { MessagePayload } from './message.js';
|
|
13
|
+
import { DeliveryItem, ItemState, Order, OrderReference, OrderState, ParcelDraft, ParcelMeasurements, PaymentState, ReturnInfoDraft, ReturnItemDraft, ReturnPaymentState, ReturnShipmentState, ShipmentState, StagedOrderUpdateAction, TrackingData } from './order.js';
|
|
14
|
+
import { PaymentResourceIdentifier } from './payment.js';
|
|
15
|
+
import { ShippingMethodResourceIdentifier, ShippingRateDraft } from './shipping-method.js';
|
|
16
|
+
import { ShoppingListResourceIdentifier } from './shopping-list.js';
|
|
17
|
+
import { StateResourceIdentifier } from './state.js';
|
|
18
|
+
import { StoreResourceIdentifier } from './store.js';
|
|
19
|
+
import { TaxCategoryResourceIdentifier } from './tax-category.js';
|
|
20
|
+
import { CustomFields, CustomFieldsDraft, FieldContainer, TypeResourceIdentifier } from './type.js';
|
|
21
|
+
export interface OrderEdit extends BaseResource {
|
|
22
|
+
/**
|
|
23
|
+
* Unique identifier of the Order Edit.
|
|
24
|
+
*
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
readonly id: string;
|
|
28
|
+
/**
|
|
29
|
+
* Current version of the Order Edit.
|
|
30
|
+
*
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
readonly version: number;
|
|
34
|
+
/**
|
|
35
|
+
* User-defined unique identifier of the Order Edit.
|
|
36
|
+
*
|
|
37
|
+
*
|
|
38
|
+
*/
|
|
39
|
+
readonly key?: string;
|
|
40
|
+
/**
|
|
41
|
+
* [Reference](ctp:api:type:Reference) to the Order updated with this edit.
|
|
42
|
+
*
|
|
43
|
+
*
|
|
44
|
+
*/
|
|
45
|
+
readonly resource: OrderReference;
|
|
46
|
+
/**
|
|
47
|
+
* Update actions applied to the Order referenced by `resource`.
|
|
48
|
+
*
|
|
49
|
+
*
|
|
50
|
+
*/
|
|
51
|
+
readonly stagedActions: StagedOrderUpdateAction[];
|
|
52
|
+
/**
|
|
53
|
+
* For applied edits, it's a summary of the changes on the Order.
|
|
54
|
+
* For unapplied edits, it's a preview of the changes.
|
|
55
|
+
*
|
|
56
|
+
*
|
|
57
|
+
*/
|
|
58
|
+
readonly result: OrderEditResult;
|
|
59
|
+
/**
|
|
60
|
+
* User-defined information regarding the Order Edit.
|
|
61
|
+
*
|
|
62
|
+
*
|
|
63
|
+
*/
|
|
64
|
+
readonly comment?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Custom Fields of the Order Edit.
|
|
67
|
+
*
|
|
68
|
+
*
|
|
69
|
+
*/
|
|
70
|
+
readonly custom?: CustomFields;
|
|
71
|
+
/**
|
|
72
|
+
* Date and time (UTC) the Order Edit was initially created.
|
|
73
|
+
*
|
|
74
|
+
*
|
|
75
|
+
*/
|
|
76
|
+
readonly createdAt: string;
|
|
77
|
+
/**
|
|
78
|
+
* Date and time (UTC) the Order Edit was last updated.
|
|
79
|
+
*
|
|
80
|
+
*
|
|
81
|
+
*/
|
|
82
|
+
readonly lastModifiedAt: string;
|
|
83
|
+
/**
|
|
84
|
+
* IDs and references that last modified the OrderEdit.
|
|
85
|
+
*
|
|
86
|
+
*
|
|
87
|
+
*/
|
|
88
|
+
readonly lastModifiedBy?: LastModifiedBy;
|
|
89
|
+
/**
|
|
90
|
+
* IDs and references that created the OrderEdit.
|
|
91
|
+
*
|
|
92
|
+
*
|
|
93
|
+
*/
|
|
94
|
+
readonly createdBy?: CreatedBy;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* If the `editVersion` and/or `resourceVersion` do not match the actual version, a [ConcurrentModification](ctp:api:type:ConcurrentModificationError) error will be returned.
|
|
98
|
+
*
|
|
99
|
+
*/
|
|
100
|
+
export interface OrderEditApply {
|
|
101
|
+
/**
|
|
102
|
+
* Current `version` of the OrderEdit to be applied.
|
|
103
|
+
*
|
|
104
|
+
*
|
|
105
|
+
*/
|
|
106
|
+
readonly editVersion: number;
|
|
107
|
+
/**
|
|
108
|
+
* Current `version` of the [Order](ctp:api:type:Order) to which the OrderEdit is applied.
|
|
109
|
+
*
|
|
110
|
+
*
|
|
111
|
+
*/
|
|
112
|
+
readonly resourceVersion: number;
|
|
113
|
+
}
|
|
114
|
+
export interface OrderEditDraft {
|
|
115
|
+
/**
|
|
116
|
+
* User-defined unique identifier for the Order Edit.
|
|
117
|
+
*
|
|
118
|
+
*
|
|
119
|
+
*/
|
|
120
|
+
readonly key?: string;
|
|
121
|
+
/**
|
|
122
|
+
* [Reference](ctp:api:type:Reference) to the Order updated with this edit.
|
|
123
|
+
*
|
|
124
|
+
*
|
|
125
|
+
*/
|
|
126
|
+
readonly resource: OrderReference;
|
|
127
|
+
/**
|
|
128
|
+
* Update actions to apply to the Order referenced in `resource`.
|
|
129
|
+
* Cannot be updated if the [edit has been applied](ctp:api:endpoint:/{projectKey}/orders/edits/{id}/apply:POST).
|
|
130
|
+
*
|
|
131
|
+
*
|
|
132
|
+
*/
|
|
133
|
+
readonly stagedActions?: StagedOrderUpdateAction[];
|
|
134
|
+
/**
|
|
135
|
+
* Custom Fields for the Order Edit.
|
|
136
|
+
*
|
|
137
|
+
*
|
|
138
|
+
*/
|
|
139
|
+
readonly custom?: CustomFieldsDraft;
|
|
140
|
+
/**
|
|
141
|
+
* User-defined description regarding the Order Edit.
|
|
142
|
+
*
|
|
143
|
+
*
|
|
144
|
+
*/
|
|
145
|
+
readonly comment?: string;
|
|
146
|
+
/**
|
|
147
|
+
* Set to `true` if you want to [peview](ctp:api:type:OrderEditPreviewSuccess) the edited Order first without persisting it (dry run).
|
|
148
|
+
* A dry run allows checking for potential [errors](ctp:api:type:OrderEditPreviewFailure) when trying to apply the `stagedActions`.
|
|
149
|
+
*
|
|
150
|
+
* Order [API Extensions](/../api/projects/api-extensions), if any, are also called in dry runs.
|
|
151
|
+
*
|
|
152
|
+
*
|
|
153
|
+
*/
|
|
154
|
+
readonly dryRun?: boolean;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* [PagedQueryResult](/../api/general-concepts#pagedqueryresult) with `results` containing an array of [OrderEdit](ctp:api:type:OrderEdit).
|
|
158
|
+
*
|
|
159
|
+
*/
|
|
160
|
+
export interface OrderEditPagedQueryResponse {
|
|
161
|
+
/**
|
|
162
|
+
* Number of [results requested](/../api/general-concepts#limit).
|
|
163
|
+
*
|
|
164
|
+
*
|
|
165
|
+
*/
|
|
166
|
+
readonly limit: number;
|
|
167
|
+
/**
|
|
168
|
+
* Number of [elements skipped](/../api/general-concepts#offset).
|
|
169
|
+
*
|
|
170
|
+
*
|
|
171
|
+
*/
|
|
172
|
+
readonly offset: number;
|
|
173
|
+
/**
|
|
174
|
+
* Actual number of results returned.
|
|
175
|
+
*
|
|
176
|
+
*
|
|
177
|
+
*/
|
|
178
|
+
readonly count: number;
|
|
179
|
+
/**
|
|
180
|
+
* Total number of results matching the query.
|
|
181
|
+
* This number is an estimation that is not [strongly consistent](/../api/general-concepts#strong-consistency).
|
|
182
|
+
* This field is returned by default.
|
|
183
|
+
* For improved performance, calculating this field can be deactivated by using the query parameter `withTotal=false`.
|
|
184
|
+
* When the results are filtered with a [Query Predicate](/../api/predicates/query), `total` is subject to a [limit](/../api/limits#queries).
|
|
185
|
+
*
|
|
186
|
+
*
|
|
187
|
+
*/
|
|
188
|
+
readonly total?: number;
|
|
189
|
+
/**
|
|
190
|
+
* [OrderEdits](ctp:api:type:OrderEdit) matching the query.
|
|
191
|
+
*
|
|
192
|
+
*
|
|
193
|
+
*/
|
|
194
|
+
readonly results: OrderEdit[];
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* [Reference](ctp:api:type:Reference) to an [OrderEdit](ctp:api:type:OrderEdit).
|
|
198
|
+
*
|
|
199
|
+
*/
|
|
200
|
+
export interface OrderEditReference {
|
|
201
|
+
readonly typeId: 'order-edit';
|
|
202
|
+
/**
|
|
203
|
+
* Unique identifier of the referenced [OrderEdit](ctp:api:type:OrderEdit).
|
|
204
|
+
*
|
|
205
|
+
*
|
|
206
|
+
*/
|
|
207
|
+
readonly id: string;
|
|
208
|
+
/**
|
|
209
|
+
* Contains the representation of the expanded Order Edit. Only present in responses to requests with [Reference Expansion](/../api/general-concepts#reference-expansion) for Order Edits.
|
|
210
|
+
*
|
|
211
|
+
*
|
|
212
|
+
*/
|
|
213
|
+
readonly obj?: OrderEdit;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* [ResourceIdentifier](ctp:api:type:ResourceIdentifier) to an [OrderEdit](ctp:api:type:OrderEdit). Either `id` or `key` is required. If both are set, an [InvalidJsonInput](/../api/errors#invalidjsoninput) error is returned.
|
|
217
|
+
*
|
|
218
|
+
*/
|
|
219
|
+
export interface OrderEditResourceIdentifier {
|
|
220
|
+
readonly typeId: 'order-edit';
|
|
221
|
+
/**
|
|
222
|
+
* Unique identifier of the referenced [OrderEdit](ctp:api:type:OrderEdit). Required if `key` is absent.
|
|
223
|
+
*
|
|
224
|
+
*
|
|
225
|
+
*/
|
|
226
|
+
readonly id?: string;
|
|
227
|
+
/**
|
|
228
|
+
* User-defined unique identifier of the referenced [OrderEdit](ctp:api:type:OrderEdit). Required if `id` is absent.
|
|
229
|
+
*
|
|
230
|
+
*
|
|
231
|
+
*/
|
|
232
|
+
readonly key?: string;
|
|
233
|
+
}
|
|
234
|
+
export type OrderEditResult = OrderEditApplied | OrderEditNotProcessed | OrderEditPreviewFailure | OrderEditPreviewSuccess;
|
|
235
|
+
/**
|
|
236
|
+
* Result of a succesful application of `stagedActions` to the Order.
|
|
237
|
+
*
|
|
238
|
+
*/
|
|
239
|
+
export interface OrderEditApplied {
|
|
240
|
+
readonly type: 'Applied';
|
|
241
|
+
/**
|
|
242
|
+
* Date and time (UTC) the Order was edited.
|
|
243
|
+
*
|
|
244
|
+
*
|
|
245
|
+
*/
|
|
246
|
+
readonly appliedAt: string;
|
|
247
|
+
/**
|
|
248
|
+
* Prices of the Order before the edit.
|
|
249
|
+
*
|
|
250
|
+
*
|
|
251
|
+
*/
|
|
252
|
+
readonly excerptBeforeEdit: OrderExcerpt;
|
|
253
|
+
/**
|
|
254
|
+
* Prices of the Order after the edit.
|
|
255
|
+
*
|
|
256
|
+
*
|
|
257
|
+
*/
|
|
258
|
+
readonly excerptAfterEdit: OrderExcerpt;
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Indicates that the edit has not been applied or processed in any way.
|
|
262
|
+
*
|
|
263
|
+
*/
|
|
264
|
+
export interface OrderEditNotProcessed {
|
|
265
|
+
readonly type: 'NotProcessed';
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Result of a failed application of `stagedActions` to the Order. The data is calculated on the fly and is not queryable.
|
|
269
|
+
*
|
|
270
|
+
*/
|
|
271
|
+
export interface OrderEditPreviewFailure {
|
|
272
|
+
readonly type: 'PreviewFailure';
|
|
273
|
+
/**
|
|
274
|
+
* Errors returned.
|
|
275
|
+
*
|
|
276
|
+
*
|
|
277
|
+
*/
|
|
278
|
+
readonly errors: ErrorObject[];
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* The data is not persisted but is dynamically pulled by dry-running the update actions from `stagedActions` on the current version of the related [Order](ctp:api:type:Order), not from the Order version at the time the OrderEdit was created. Therefore, it cannot be queried.
|
|
282
|
+
*
|
|
283
|
+
*/
|
|
284
|
+
export interface OrderEditPreviewSuccess {
|
|
285
|
+
readonly type: 'PreviewSuccess';
|
|
286
|
+
/**
|
|
287
|
+
* A preview of the edited [Order](ctp:api:type:Order) as it will be after all `stagedActions` (incl. optional Order [API Extensions](/../api/projects/api-extensions)) are applied.
|
|
288
|
+
*
|
|
289
|
+
*
|
|
290
|
+
*/
|
|
291
|
+
readonly preview: StagedOrder;
|
|
292
|
+
/**
|
|
293
|
+
* Messages that will be generated if the edit is applied.
|
|
294
|
+
*
|
|
295
|
+
*
|
|
296
|
+
*/
|
|
297
|
+
readonly messagePayloads: MessagePayload[];
|
|
298
|
+
}
|
|
299
|
+
export interface OrderEditUpdate {
|
|
300
|
+
/**
|
|
301
|
+
* Expected version of the Order Edit on which the changes should be applied.
|
|
302
|
+
* If the expected version does not match the actual version, a [ConcurrentModification](ctp:api:type:ConcurrentModificationError) error will be returned.
|
|
303
|
+
*
|
|
304
|
+
*
|
|
305
|
+
*/
|
|
306
|
+
readonly version: number;
|
|
307
|
+
/**
|
|
308
|
+
* Update actions to be performed on the Order Edit.
|
|
309
|
+
*
|
|
310
|
+
*
|
|
311
|
+
*/
|
|
312
|
+
readonly actions: OrderEditUpdateAction[];
|
|
313
|
+
/**
|
|
314
|
+
* If set to `true`, the Order Edit is applied on the [Order](ctp:api:type:Order) without persisting it.
|
|
315
|
+
*
|
|
316
|
+
*
|
|
317
|
+
*/
|
|
318
|
+
readonly dryRun?: boolean;
|
|
319
|
+
}
|
|
320
|
+
export type OrderEditUpdateAction = OrderEditAddStagedActionAction | OrderEditSetCommentAction | OrderEditSetCustomFieldAction | OrderEditSetCustomTypeAction | OrderEditSetKeyAction | OrderEditSetStagedActionsAction;
|
|
321
|
+
/**
|
|
322
|
+
* Excerpt of the Order extracting the total and the taxed price.
|
|
323
|
+
*
|
|
324
|
+
*/
|
|
325
|
+
export interface OrderExcerpt {
|
|
326
|
+
/**
|
|
327
|
+
* Total price of the Order.
|
|
328
|
+
*
|
|
329
|
+
*
|
|
330
|
+
*/
|
|
331
|
+
readonly totalPrice: TypedMoney;
|
|
332
|
+
/**
|
|
333
|
+
* Taxed price of the Order.
|
|
334
|
+
*
|
|
335
|
+
*
|
|
336
|
+
*/
|
|
337
|
+
readonly taxedPrice?: TaxedPrice;
|
|
338
|
+
/**
|
|
339
|
+
* Current version of the Order.
|
|
340
|
+
*
|
|
341
|
+
*
|
|
342
|
+
*/
|
|
343
|
+
readonly version: number;
|
|
344
|
+
}
|
|
345
|
+
export interface StagedOrder extends Order {
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* The `stagedActions` field cannot be updated if the Order Edit `result` is [OrderEdit Applied](/projects/order-edits#orderedit-applied).
|
|
349
|
+
*
|
|
350
|
+
*/
|
|
351
|
+
export interface OrderEditAddStagedActionAction {
|
|
352
|
+
readonly action: 'addStagedAction';
|
|
353
|
+
/**
|
|
354
|
+
* Order update action to append to the `stagedActions` array.
|
|
355
|
+
*
|
|
356
|
+
*
|
|
357
|
+
*/
|
|
358
|
+
readonly stagedAction: StagedOrderUpdateAction;
|
|
359
|
+
}
|
|
360
|
+
export interface OrderEditSetCommentAction {
|
|
361
|
+
readonly action: 'setComment';
|
|
362
|
+
/**
|
|
363
|
+
* Value to set.
|
|
364
|
+
* If empty, any existing value will be removed.
|
|
365
|
+
*
|
|
366
|
+
*
|
|
367
|
+
*/
|
|
368
|
+
readonly comment?: string;
|
|
369
|
+
}
|
|
370
|
+
export interface OrderEditSetCustomFieldAction {
|
|
371
|
+
readonly action: 'setCustomField';
|
|
372
|
+
/**
|
|
373
|
+
* Name of the [Custom Field](/../api/projects/custom-fields).
|
|
374
|
+
*
|
|
375
|
+
*
|
|
376
|
+
*/
|
|
377
|
+
readonly name: string;
|
|
378
|
+
/**
|
|
379
|
+
* If `value` is absent or `null`, this field will be removed if it exists.
|
|
380
|
+
* Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
|
|
381
|
+
* If `value` is provided, it is set for the field defined by `name`.
|
|
382
|
+
*
|
|
383
|
+
*
|
|
384
|
+
*/
|
|
385
|
+
readonly value?: any;
|
|
386
|
+
}
|
|
387
|
+
export interface OrderEditSetCustomTypeAction {
|
|
388
|
+
readonly action: 'setCustomType';
|
|
389
|
+
/**
|
|
390
|
+
* Defines the [Type](ctp:api:type:Type) that extends the Order Edit with [Custom Fields](/../api/projects/custom-fields).
|
|
391
|
+
* If absent, any existing Type and Custom Fields are removed from the Order Edit.
|
|
392
|
+
*
|
|
393
|
+
*
|
|
394
|
+
*/
|
|
395
|
+
readonly type?: TypeResourceIdentifier;
|
|
396
|
+
/**
|
|
397
|
+
* Sets the [Custom Fields](/../api/projects/custom-fields) fields for the Order Edit.
|
|
398
|
+
*
|
|
399
|
+
*
|
|
400
|
+
*/
|
|
401
|
+
readonly fields?: FieldContainer;
|
|
402
|
+
}
|
|
403
|
+
export interface OrderEditSetKeyAction {
|
|
404
|
+
readonly action: 'setKey';
|
|
405
|
+
/**
|
|
406
|
+
* Value to set.
|
|
407
|
+
* If empty, any existing value will be removed.
|
|
408
|
+
*
|
|
409
|
+
*
|
|
410
|
+
*/
|
|
411
|
+
readonly key?: string;
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* The `stagedActions` field cannot be updated if the Order Edit `result` is [OrderEdit Applied](/projects/order-edits#orderedit-applied).
|
|
415
|
+
*
|
|
416
|
+
*/
|
|
417
|
+
export interface OrderEditSetStagedActionsAction {
|
|
418
|
+
readonly action: 'setStagedActions';
|
|
419
|
+
/**
|
|
420
|
+
* Value to replace the `stagedActions` of the Order Edit.
|
|
421
|
+
*
|
|
422
|
+
*
|
|
423
|
+
*/
|
|
424
|
+
readonly stagedActions: StagedOrderUpdateAction[];
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* If the Cart already contains a [CustomLineItem](ctp:api:type:CustomLineItem) with the same `slug`, `name`, `money`, `taxCategory`, `state`,
|
|
428
|
+
* and Custom Fields, then only the quantity of the existing Custom Line Item is increased.
|
|
429
|
+
* If [CustomLineItem](ctp:api:type:CustomLineItem) `shippingDetails` are set, they are merged with the `targets` that already exist on the
|
|
430
|
+
* [ItemShippingDetails](ctp:api:type:ItemShippingDetails) of the Custom Line Item.
|
|
431
|
+
* In case of overlapping address keys the [ItemShippingTarget](ctp:api:type:ItemShippingTarget) `quantity` is summed up.
|
|
432
|
+
*
|
|
433
|
+
* 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.
|
|
434
|
+
*
|
|
435
|
+
* If the Tax Rate is not set, a [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError) error is returned.
|
|
436
|
+
*
|
|
437
|
+
*/
|
|
438
|
+
export interface StagedOrderAddCustomLineItemAction {
|
|
439
|
+
readonly action: 'addCustomLineItem';
|
|
440
|
+
/**
|
|
441
|
+
* Money value of the Custom Line Item. The value can be negative.
|
|
442
|
+
*
|
|
443
|
+
*
|
|
444
|
+
*/
|
|
445
|
+
readonly money: _Money;
|
|
446
|
+
/**
|
|
447
|
+
* Name of the Custom Line Item.
|
|
448
|
+
*
|
|
449
|
+
*
|
|
450
|
+
*/
|
|
451
|
+
readonly name: LocalizedString;
|
|
452
|
+
/**
|
|
453
|
+
* User-defined unique identifier of the Custom Line Item.
|
|
454
|
+
*
|
|
455
|
+
*
|
|
456
|
+
*/
|
|
457
|
+
readonly key?: string;
|
|
458
|
+
/**
|
|
459
|
+
* Number of Custom Line Items to add to the Cart.
|
|
460
|
+
*
|
|
461
|
+
*
|
|
462
|
+
*/
|
|
463
|
+
readonly quantity?: number;
|
|
464
|
+
/**
|
|
465
|
+
* User-defined identifier used in a deep-link URL for the Custom Line Item. It must match the pattern `[a-zA-Z0-9_-]{2,256}`.
|
|
466
|
+
*
|
|
467
|
+
*
|
|
468
|
+
*/
|
|
469
|
+
readonly slug: string;
|
|
470
|
+
/**
|
|
471
|
+
* Used to select a Tax Rate when a Cart has the `Platform` [TaxMode](ctp:api:type:TaxMode).
|
|
472
|
+
* If [TaxMode](ctp:api:type:TaxMode) is `Platform`, this field must not be empty.
|
|
473
|
+
*
|
|
474
|
+
*
|
|
475
|
+
*/
|
|
476
|
+
readonly taxCategory?: TaxCategoryResourceIdentifier;
|
|
477
|
+
/**
|
|
478
|
+
* An external Tax Rate can be set if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode).
|
|
479
|
+
*
|
|
480
|
+
*
|
|
481
|
+
*/
|
|
482
|
+
readonly externalTaxRate?: ExternalTaxRateDraft;
|
|
483
|
+
/**
|
|
484
|
+
* Container for Custom Line Item-specific addresses.
|
|
485
|
+
*
|
|
486
|
+
*
|
|
487
|
+
*/
|
|
488
|
+
readonly shippingDetails?: ItemShippingDetailsDraft;
|
|
489
|
+
/**
|
|
490
|
+
* - If `Standard`, Cart Discounts with a matching [CartDiscountCustomLineItemsTarget](ctp:api:type:CartDiscountCustomLineItemsTarget)
|
|
491
|
+
* are applied to the Custom Line Item.
|
|
492
|
+
* - If `External`, Cart Discounts are not considered on the Custom Line Item.
|
|
493
|
+
*
|
|
494
|
+
*
|
|
495
|
+
*/
|
|
496
|
+
readonly priceMode?: CustomLineItemPriceMode;
|
|
497
|
+
/**
|
|
498
|
+
* Custom Fields for the Custom Line Item.
|
|
499
|
+
*
|
|
500
|
+
*
|
|
501
|
+
*/
|
|
502
|
+
readonly custom?: CustomFieldsDraft;
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* A [Delivery](ctp:api:type:Delivery) can only be added to an [Order](ctp:api:type:Order) if
|
|
506
|
+
* its `shippingInfo` (for `shippingMode` = `Single`), or its `shipping` (for `shippingMode` = `Multiple`) exists.
|
|
507
|
+
*
|
|
508
|
+
* Produces the [Delivery Added](ctp:api:type:DeliveryAddedMessage) Message.
|
|
509
|
+
*
|
|
510
|
+
*/
|
|
511
|
+
export interface StagedOrderAddDeliveryAction {
|
|
512
|
+
readonly action: 'addDelivery';
|
|
513
|
+
/**
|
|
514
|
+
* `key` of an existing [Delivery](ctp:api:type:Delivery).
|
|
515
|
+
*
|
|
516
|
+
*
|
|
517
|
+
*/
|
|
518
|
+
readonly deliveryKey?: string;
|
|
519
|
+
/**
|
|
520
|
+
* `key` of the [ShippingMethod](ctp:api:type:ShippingMethod), required for `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
|
|
521
|
+
*
|
|
522
|
+
*
|
|
523
|
+
*/
|
|
524
|
+
readonly shippingKey?: string;
|
|
525
|
+
/**
|
|
526
|
+
* Items to be included in the Delivery.
|
|
527
|
+
*
|
|
528
|
+
*
|
|
529
|
+
*/
|
|
530
|
+
readonly items?: DeliveryItem[];
|
|
531
|
+
/**
|
|
532
|
+
* Address the `parcels` should be delivered to.
|
|
533
|
+
*
|
|
534
|
+
*
|
|
535
|
+
*/
|
|
536
|
+
readonly address?: _BaseAddress;
|
|
537
|
+
/**
|
|
538
|
+
* Parcels of the Delivery.
|
|
539
|
+
*
|
|
540
|
+
* If provided, this update action also produces the [Parcel Added To Delivery](ctp:api:type:ParcelAddedToDeliveryMessage) Message.
|
|
541
|
+
*
|
|
542
|
+
*
|
|
543
|
+
*/
|
|
544
|
+
readonly parcels?: ParcelDraft[];
|
|
545
|
+
/**
|
|
546
|
+
* Custom Fields for the Delivery.
|
|
547
|
+
*
|
|
548
|
+
*
|
|
549
|
+
*/
|
|
550
|
+
readonly custom?: CustomFieldsDraft;
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* Adds a [DiscountCode](ctp:api:type:DiscountCode) to the Cart to activate the related [Cart Discounts](/../api/projects/cartDiscounts).
|
|
554
|
+
* Adding a Discount Code is only possible if no [DirectDiscount](ctp:api:type:DirectDiscount) has been applied to the Order.
|
|
555
|
+
*
|
|
556
|
+
* The maximum number of Discount Codes in a Cart is restricted by a [limit](/../api/limits#carts).
|
|
557
|
+
*
|
|
558
|
+
* Specific Error Code: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError)
|
|
559
|
+
*
|
|
560
|
+
*/
|
|
561
|
+
export interface StagedOrderAddDiscountCodeAction {
|
|
562
|
+
readonly action: 'addDiscountCode';
|
|
563
|
+
/**
|
|
564
|
+
* `code` of a [DiscountCode](ctp:api:type:DiscountCode).
|
|
565
|
+
*
|
|
566
|
+
*
|
|
567
|
+
*/
|
|
568
|
+
readonly code: string;
|
|
569
|
+
}
|
|
570
|
+
/**
|
|
571
|
+
* Adds an address to an Order when shipping to multiple addresses is desired.
|
|
572
|
+
*
|
|
573
|
+
*/
|
|
574
|
+
export interface StagedOrderAddItemShippingAddressAction {
|
|
575
|
+
readonly action: 'addItemShippingAddress';
|
|
576
|
+
/**
|
|
577
|
+
* Address to append to `itemShippingAddresses`.
|
|
578
|
+
* The new Address must have a `key` that is unique across this Order.
|
|
579
|
+
*
|
|
580
|
+
*
|
|
581
|
+
*/
|
|
582
|
+
readonly address: _BaseAddress;
|
|
583
|
+
}
|
|
584
|
+
/**
|
|
585
|
+
* 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.
|
|
586
|
+
* 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.
|
|
587
|
+
* A new Line Item is added when the `externalPrice` or `externalTotalPrice` is set in this update action.
|
|
588
|
+
* 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).
|
|
589
|
+
*
|
|
590
|
+
* If the Tax Rate is not set, a [MissingTaxRateForCountry](ctp:api:type:MissingTaxRateForCountryError) error is returned.
|
|
591
|
+
*
|
|
592
|
+
* 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.
|
|
593
|
+
*
|
|
594
|
+
*/
|
|
595
|
+
export interface StagedOrderAddLineItemAction {
|
|
596
|
+
readonly action: 'addLineItem';
|
|
597
|
+
/**
|
|
598
|
+
* User-defined unique identifier of the LineItem.
|
|
599
|
+
*
|
|
600
|
+
*
|
|
601
|
+
*/
|
|
602
|
+
readonly key?: string;
|
|
603
|
+
/**
|
|
604
|
+
* `id` of the published [Product](ctp:api:type:Product).
|
|
605
|
+
*
|
|
606
|
+
* Either the `productId` and `variantId`, or `sku` must be provided.
|
|
607
|
+
*
|
|
608
|
+
*
|
|
609
|
+
*/
|
|
610
|
+
readonly productId?: string;
|
|
611
|
+
/**
|
|
612
|
+
* `id` of the [ProductVariant](ctp:api:type:ProductVariant) in the Product.
|
|
613
|
+
* If not provided, the Master Variant is used.
|
|
614
|
+
*
|
|
615
|
+
* Either the `productId` and `variantId`, or `sku` must be provided.
|
|
616
|
+
*
|
|
617
|
+
*
|
|
618
|
+
*/
|
|
619
|
+
readonly variantId?: number;
|
|
620
|
+
/**
|
|
621
|
+
* SKU of the [ProductVariant](ctp:api:type:ProductVariant).
|
|
622
|
+
*
|
|
623
|
+
* Either the `productId` and `variantId`, or `sku` must be provided.
|
|
624
|
+
*
|
|
625
|
+
*
|
|
626
|
+
*/
|
|
627
|
+
readonly sku?: string;
|
|
628
|
+
/**
|
|
629
|
+
* Quantity of the Product Variant to add to the Cart.
|
|
630
|
+
*
|
|
631
|
+
*
|
|
632
|
+
*/
|
|
633
|
+
readonly quantity?: number;
|
|
634
|
+
/**
|
|
635
|
+
* Date and time (UTC) the Product Variant is added to the Cart.
|
|
636
|
+
* If not set, it defaults to the current date and time.
|
|
637
|
+
*
|
|
638
|
+
* Optional for backwards compatibility reasons.
|
|
639
|
+
*
|
|
640
|
+
*
|
|
641
|
+
*/
|
|
642
|
+
readonly addedAt?: string;
|
|
643
|
+
/**
|
|
644
|
+
* Used to [select](/../api/pricing-and-discounts-overview#line-item-price-selection) a Product Price.
|
|
645
|
+
* The Channel must have the `ProductDistribution` [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum).
|
|
646
|
+
* 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.
|
|
647
|
+
*
|
|
648
|
+
*
|
|
649
|
+
*/
|
|
650
|
+
readonly distributionChannel?: ChannelResourceIdentifier;
|
|
651
|
+
/**
|
|
652
|
+
* Used to identify [Inventory entries](/../api/projects/inventory) that must be reserved.
|
|
653
|
+
* The Channel must have the `InventorySupply` [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum).
|
|
654
|
+
*
|
|
655
|
+
*
|
|
656
|
+
*/
|
|
657
|
+
readonly supplyChannel?: ChannelResourceIdentifier;
|
|
658
|
+
/**
|
|
659
|
+
* Sets the [LineItem](ctp:api:type:LineItem) `price` value, and the `priceMode` to `ExternalPrice` [LineItemPriceMode](ctp:api:type:LineItemPriceMode).
|
|
660
|
+
*
|
|
661
|
+
*
|
|
662
|
+
*/
|
|
663
|
+
readonly externalPrice?: _Money;
|
|
664
|
+
/**
|
|
665
|
+
* Sets the [LineItem](ctp:api:type:LineItem) `price` and `totalPrice` values, and the `priceMode` to `ExternalTotal` [LineItemPriceMode](ctp:api:type:LineItemPriceMode).
|
|
666
|
+
*
|
|
667
|
+
*
|
|
668
|
+
*/
|
|
669
|
+
readonly externalTotalPrice?: ExternalLineItemTotalPrice;
|
|
670
|
+
/**
|
|
671
|
+
* Sets the external Tax Rate for the Line Item, if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode). If the Cart has `Multiple` [ShippingMode](ctp:api:type:ShippingMode), the Tax Rate is accepted but ignored.
|
|
672
|
+
*
|
|
673
|
+
*
|
|
674
|
+
*/
|
|
675
|
+
readonly externalTaxRate?: ExternalTaxRateDraft;
|
|
676
|
+
/**
|
|
677
|
+
* Inventory mode specific to the Line Item only, and valid for the entire `quantity` of the Line Item.
|
|
678
|
+
* Set only if the inventory mode should be different from the `inventoryMode` specified on the [Cart](ctp:api:type:Cart).
|
|
679
|
+
*
|
|
680
|
+
*
|
|
681
|
+
*/
|
|
682
|
+
readonly inventoryMode?: InventoryMode;
|
|
683
|
+
/**
|
|
684
|
+
* Container for Line Item-specific addresses.
|
|
685
|
+
*
|
|
686
|
+
*
|
|
687
|
+
*/
|
|
688
|
+
readonly shippingDetails?: ItemShippingDetailsDraft;
|
|
689
|
+
/**
|
|
690
|
+
* Custom Fields for the Line Item.
|
|
691
|
+
*
|
|
692
|
+
*
|
|
693
|
+
*/
|
|
694
|
+
readonly custom?: CustomFieldsDraft;
|
|
695
|
+
}
|
|
696
|
+
/**
|
|
697
|
+
* To add a Parcel, at least one [Delivery](ctp:api:type:Delivery) must exist.
|
|
698
|
+
*
|
|
699
|
+
* Produces the [Parcel Added To Delivery](ctp:api:type:ParcelAddedToDeliveryMessage) Message.
|
|
700
|
+
*
|
|
701
|
+
*/
|
|
702
|
+
export interface StagedOrderAddParcelToDeliveryAction {
|
|
703
|
+
readonly action: 'addParcelToDelivery';
|
|
704
|
+
/**
|
|
705
|
+
* `id` of an existing [Delivery](ctp:api:type:Delivery).
|
|
706
|
+
*
|
|
707
|
+
* Either `deliveryId` or `deliveryKey` must be provided.
|
|
708
|
+
*
|
|
709
|
+
*
|
|
710
|
+
*/
|
|
711
|
+
readonly deliveryId?: string;
|
|
712
|
+
/**
|
|
713
|
+
* `key` of an existing [Delivery](ctp:api:type:Delivery).
|
|
714
|
+
*
|
|
715
|
+
* Either `deliveryId` or `deliveryKey` must be provided.
|
|
716
|
+
*
|
|
717
|
+
*
|
|
718
|
+
*/
|
|
719
|
+
readonly deliveryKey?: string;
|
|
720
|
+
/**
|
|
721
|
+
* `key` of an existing [Parcel](ctp:api:type:Parcel).
|
|
722
|
+
*
|
|
723
|
+
*
|
|
724
|
+
*/
|
|
725
|
+
readonly parcelKey?: string;
|
|
726
|
+
/**
|
|
727
|
+
* Value to set.
|
|
728
|
+
*
|
|
729
|
+
*
|
|
730
|
+
*/
|
|
731
|
+
readonly measurements?: ParcelMeasurements;
|
|
732
|
+
/**
|
|
733
|
+
* Value to set.
|
|
734
|
+
*
|
|
735
|
+
*
|
|
736
|
+
*/
|
|
737
|
+
readonly trackingData?: TrackingData;
|
|
738
|
+
/**
|
|
739
|
+
* Value to set.
|
|
740
|
+
*
|
|
741
|
+
*
|
|
742
|
+
*/
|
|
743
|
+
readonly items?: DeliveryItem[];
|
|
744
|
+
/**
|
|
745
|
+
* Custom Fields for the Parcel.
|
|
746
|
+
*
|
|
747
|
+
*
|
|
748
|
+
*/
|
|
749
|
+
readonly custom?: CustomFieldsDraft;
|
|
750
|
+
}
|
|
751
|
+
export interface StagedOrderAddPaymentAction {
|
|
752
|
+
readonly action: 'addPayment';
|
|
753
|
+
/**
|
|
754
|
+
* Payment to add to the [PaymentInfo](ctp:api:type:PaymentInfo).
|
|
755
|
+
* Must not be assigned to another Order or active Cart already.
|
|
756
|
+
*
|
|
757
|
+
*
|
|
758
|
+
*/
|
|
759
|
+
readonly payment: PaymentResourceIdentifier;
|
|
760
|
+
}
|
|
761
|
+
/**
|
|
762
|
+
* Produces the [Return Info Added](ctp:api:type:ReturnInfoAddedMessage) Message.
|
|
763
|
+
*
|
|
764
|
+
*/
|
|
765
|
+
export interface StagedOrderAddReturnInfoAction {
|
|
766
|
+
readonly action: 'addReturnInfo';
|
|
767
|
+
/**
|
|
768
|
+
* Value to set.
|
|
769
|
+
*
|
|
770
|
+
*
|
|
771
|
+
*/
|
|
772
|
+
readonly returnTrackingId?: string;
|
|
773
|
+
/**
|
|
774
|
+
* Items to be returned.
|
|
775
|
+
* Must not be empty.
|
|
776
|
+
*
|
|
777
|
+
*
|
|
778
|
+
*/
|
|
779
|
+
readonly items: ReturnItemDraft[];
|
|
780
|
+
/**
|
|
781
|
+
* Value to set.
|
|
782
|
+
* If not set, it defaults to the current date and time.
|
|
783
|
+
*
|
|
784
|
+
*
|
|
785
|
+
*/
|
|
786
|
+
readonly returnDate?: string;
|
|
787
|
+
}
|
|
788
|
+
/**
|
|
789
|
+
* Adds all [LineItems](ctp:api:type:LineItem) of a [ShoppingList](ctp:api:type:ShoppingList) to the Cart.
|
|
790
|
+
*
|
|
791
|
+
*/
|
|
792
|
+
export interface StagedOrderAddShoppingListAction {
|
|
793
|
+
readonly action: 'addShoppingList';
|
|
794
|
+
/**
|
|
795
|
+
* Shopping List that contains the Line Items to be added.
|
|
796
|
+
*
|
|
797
|
+
*
|
|
798
|
+
*/
|
|
799
|
+
readonly shoppingList: ShoppingListResourceIdentifier;
|
|
800
|
+
/**
|
|
801
|
+
* `distributionChannel` to set for all [LineItems](ctp:api:type:LineItem) that are added to the Cart.
|
|
802
|
+
* The Channel must have the `ProductDistribution` [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum).
|
|
803
|
+
*
|
|
804
|
+
*
|
|
805
|
+
*/
|
|
806
|
+
readonly distributionChannel?: ChannelResourceIdentifier;
|
|
807
|
+
/**
|
|
808
|
+
* `supplyChannel` to set for all [LineItems](ctp:api:type:LineItem) that are added to the Cart.
|
|
809
|
+
* The Channel must have the `InventorySupply` [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum).
|
|
810
|
+
*
|
|
811
|
+
*
|
|
812
|
+
*/
|
|
813
|
+
readonly supplyChannel?: ChannelResourceIdentifier;
|
|
814
|
+
}
|
|
815
|
+
export interface StagedOrderChangeCustomLineItemMoneyAction {
|
|
816
|
+
readonly action: 'changeCustomLineItemMoney';
|
|
817
|
+
/**
|
|
818
|
+
* `id` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
|
|
819
|
+
*
|
|
820
|
+
*
|
|
821
|
+
*/
|
|
822
|
+
readonly customLineItemId?: string;
|
|
823
|
+
/**
|
|
824
|
+
* `key` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
|
|
825
|
+
*
|
|
826
|
+
*
|
|
827
|
+
*/
|
|
828
|
+
readonly customLineItemKey?: string;
|
|
829
|
+
/**
|
|
830
|
+
* Value to set.
|
|
831
|
+
* Must not be empty.
|
|
832
|
+
* Can be a negative amount.
|
|
833
|
+
*
|
|
834
|
+
*
|
|
835
|
+
*/
|
|
836
|
+
readonly money: _Money;
|
|
837
|
+
}
|
|
838
|
+
/**
|
|
839
|
+
* When multiple shipping addresses are set for a Custom Line Item, use the [Add CustomLineItem](ctp:api:type:StagedOrderAddCustomLineItemAction) update action to change the shipping details. 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, the `shippingDetails` field is kept in its current state to avoid data loss.
|
|
840
|
+
*
|
|
841
|
+
* To change the Custom Line Item quantity and shipping details together, use this update action in combination with the [Set CustomLineItem ShippingDetails](ctp:api:type:StagedOrderSetCustomLineItemShippingDetailsAction) update action in a single Order update command.
|
|
842
|
+
*
|
|
843
|
+
*/
|
|
844
|
+
export interface StagedOrderChangeCustomLineItemQuantityAction {
|
|
845
|
+
readonly action: 'changeCustomLineItemQuantity';
|
|
846
|
+
/**
|
|
847
|
+
* `id` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
|
|
848
|
+
*
|
|
849
|
+
*
|
|
850
|
+
*/
|
|
851
|
+
readonly customLineItemId?: string;
|
|
852
|
+
/**
|
|
853
|
+
* `key` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
|
|
854
|
+
*
|
|
855
|
+
*
|
|
856
|
+
*/
|
|
857
|
+
readonly customLineItemKey?: string;
|
|
858
|
+
/**
|
|
859
|
+
* New value to set.
|
|
860
|
+
* If `0`, the Custom Line Item is removed from the Order.
|
|
861
|
+
*
|
|
862
|
+
*
|
|
863
|
+
*/
|
|
864
|
+
readonly quantity: number;
|
|
865
|
+
}
|
|
866
|
+
/**
|
|
867
|
+
* When multiple shipping addresses are set for a Line Item, use the [Remove LineItem](ctp:api:type:StagedOrderRemoveLineItemAction) and [Add LineItem](ctp:api:type:StagedOrderAddLineItemAction) update action to change the shipping details. 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, the `shippingDetails` field is kept in its current state to avoid data loss.
|
|
868
|
+
*
|
|
869
|
+
* To change the Line Item quantity and shipping details together, use this update action in combination with the [Set LineItem ShippingDetails](ctp:api:type:StagedOrderSetLineItemShippingDetailsAction) update action in a single Order update command.
|
|
870
|
+
*
|
|
871
|
+
* 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).
|
|
872
|
+
*
|
|
873
|
+
*/
|
|
874
|
+
export interface StagedOrderChangeLineItemQuantityAction {
|
|
875
|
+
readonly action: 'changeLineItemQuantity';
|
|
876
|
+
/**
|
|
877
|
+
* `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
878
|
+
*
|
|
879
|
+
*
|
|
880
|
+
*/
|
|
881
|
+
readonly lineItemId?: string;
|
|
882
|
+
/**
|
|
883
|
+
* `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
884
|
+
*
|
|
885
|
+
*
|
|
886
|
+
*/
|
|
887
|
+
readonly lineItemKey?: string;
|
|
888
|
+
/**
|
|
889
|
+
* New value to set.
|
|
890
|
+
* If `0`, the LineItem is removed from the Order.
|
|
891
|
+
*
|
|
892
|
+
*
|
|
893
|
+
*/
|
|
894
|
+
readonly quantity: number;
|
|
895
|
+
/**
|
|
896
|
+
* Required when the Line Item uses `ExternalPrice` [LineItemPriceMode](ctp:api:type:LineItemPriceMode).
|
|
897
|
+
* Sets the [LineItem](ctp:api:type:LineItem) `price` to the given value when changing the quantity of a Line Item.
|
|
898
|
+
*
|
|
899
|
+
* 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).
|
|
900
|
+
*
|
|
901
|
+
*
|
|
902
|
+
*/
|
|
903
|
+
readonly externalPrice?: _Money;
|
|
904
|
+
/**
|
|
905
|
+
* 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).
|
|
906
|
+
* If `externalTotalPrice` is not given and the `priceMode` is `ExternalTotal`, the external price is unset and the `priceMode` is set to `Platform`.
|
|
907
|
+
*
|
|
908
|
+
*
|
|
909
|
+
*/
|
|
910
|
+
readonly externalTotalPrice?: ExternalLineItemTotalPrice;
|
|
911
|
+
}
|
|
912
|
+
/**
|
|
913
|
+
* Produces the [Order State Changed](ctp:api:type:OrderStateChangedMessage) Message.
|
|
914
|
+
*
|
|
915
|
+
*/
|
|
916
|
+
export interface StagedOrderChangeOrderStateAction {
|
|
917
|
+
readonly action: 'changeOrderState';
|
|
918
|
+
/**
|
|
919
|
+
* New status of the Order.
|
|
920
|
+
*
|
|
921
|
+
*
|
|
922
|
+
*/
|
|
923
|
+
readonly orderState: OrderState;
|
|
924
|
+
}
|
|
925
|
+
/**
|
|
926
|
+
* Produces the [Order Payment State Changed](ctp:api:type:OrderPaymentStateChangedMessage) Message.
|
|
927
|
+
*
|
|
928
|
+
*/
|
|
929
|
+
export interface StagedOrderChangePaymentStateAction {
|
|
930
|
+
readonly action: 'changePaymentState';
|
|
931
|
+
/**
|
|
932
|
+
* New payment status of the Order.
|
|
933
|
+
*
|
|
934
|
+
*
|
|
935
|
+
*/
|
|
936
|
+
readonly paymentState: PaymentState;
|
|
937
|
+
}
|
|
938
|
+
/**
|
|
939
|
+
* Produces the [Order Shipment State Changed](ctp:api:type:OrderShipmentStateChangedMessage) Message.
|
|
940
|
+
*
|
|
941
|
+
*/
|
|
942
|
+
export interface StagedOrderChangeShipmentStateAction {
|
|
943
|
+
readonly action: 'changeShipmentState';
|
|
944
|
+
/**
|
|
945
|
+
* New shipment status of the Order.
|
|
946
|
+
*
|
|
947
|
+
*
|
|
948
|
+
*/
|
|
949
|
+
readonly shipmentState: ShipmentState;
|
|
950
|
+
}
|
|
951
|
+
/**
|
|
952
|
+
* Changing the tax calculation mode leads to [recalculation of taxes](/../api/carts-orders-overview#cart-tax-calculation).
|
|
953
|
+
*
|
|
954
|
+
*/
|
|
955
|
+
export interface StagedOrderChangeTaxCalculationModeAction {
|
|
956
|
+
readonly action: 'changeTaxCalculationMode';
|
|
957
|
+
/**
|
|
958
|
+
* New value to set.
|
|
959
|
+
*
|
|
960
|
+
*
|
|
961
|
+
*/
|
|
962
|
+
readonly taxCalculationMode: TaxCalculationMode;
|
|
963
|
+
}
|
|
964
|
+
/**
|
|
965
|
+
* - When `External` [TaxMode](ctp:api:type:TaxMode) is changed to `Platform` or `Disabled`, all previously set external Tax Rates are removed.
|
|
966
|
+
* - 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`.
|
|
967
|
+
*
|
|
968
|
+
*/
|
|
969
|
+
export interface StagedOrderChangeTaxModeAction {
|
|
970
|
+
readonly action: 'changeTaxMode';
|
|
971
|
+
/**
|
|
972
|
+
* The new TaxMode.
|
|
973
|
+
*
|
|
974
|
+
*
|
|
975
|
+
*/
|
|
976
|
+
readonly taxMode: TaxMode;
|
|
977
|
+
}
|
|
978
|
+
/**
|
|
979
|
+
* Changing the tax rounding mode leads to [recalculation of taxes](/../api/carts-orders-overview#cart-tax-calculation).
|
|
980
|
+
*
|
|
981
|
+
*/
|
|
982
|
+
export interface StagedOrderChangeTaxRoundingModeAction {
|
|
983
|
+
readonly action: 'changeTaxRoundingMode';
|
|
984
|
+
/**
|
|
985
|
+
* New value to set.
|
|
986
|
+
*
|
|
987
|
+
*
|
|
988
|
+
*/
|
|
989
|
+
readonly taxRoundingMode: RoundingMode;
|
|
990
|
+
}
|
|
991
|
+
/**
|
|
992
|
+
* The import of States does not follow any predefined rules and should be only used if no transitions are defined.
|
|
993
|
+
* The `quantity` of the [ItemStates](ctp:api:type:ItemState) must match the sum of all Custom Line Item states' quantities.
|
|
994
|
+
*
|
|
995
|
+
*/
|
|
996
|
+
export interface StagedOrderImportCustomLineItemStateAction {
|
|
997
|
+
readonly action: 'importCustomLineItemState';
|
|
998
|
+
/**
|
|
999
|
+
* `id` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
|
|
1000
|
+
*
|
|
1001
|
+
*
|
|
1002
|
+
*/
|
|
1003
|
+
readonly customLineItemId?: string;
|
|
1004
|
+
/**
|
|
1005
|
+
* `key` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
|
|
1006
|
+
*
|
|
1007
|
+
*
|
|
1008
|
+
*/
|
|
1009
|
+
readonly customLineItemKey?: string;
|
|
1010
|
+
/**
|
|
1011
|
+
* New status of the Custom Line Items.
|
|
1012
|
+
*
|
|
1013
|
+
*
|
|
1014
|
+
*/
|
|
1015
|
+
readonly state: ItemState[];
|
|
1016
|
+
}
|
|
1017
|
+
/**
|
|
1018
|
+
* The import of States does not follow any predefined rules and should be only used if no transitions are defined.
|
|
1019
|
+
* The `quantity` in the [ItemStates](ctp:api:type:ItemState) must match the sum of all Line Item states' quantities.
|
|
1020
|
+
*
|
|
1021
|
+
*/
|
|
1022
|
+
export interface StagedOrderImportLineItemStateAction {
|
|
1023
|
+
readonly action: 'importLineItemState';
|
|
1024
|
+
/**
|
|
1025
|
+
* `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1026
|
+
*
|
|
1027
|
+
*
|
|
1028
|
+
*/
|
|
1029
|
+
readonly lineItemId?: string;
|
|
1030
|
+
/**
|
|
1031
|
+
* `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1032
|
+
*
|
|
1033
|
+
*
|
|
1034
|
+
*/
|
|
1035
|
+
readonly lineItemKey?: string;
|
|
1036
|
+
/**
|
|
1037
|
+
* New status of the Line Items.
|
|
1038
|
+
*
|
|
1039
|
+
*
|
|
1040
|
+
*/
|
|
1041
|
+
readonly state: ItemState[];
|
|
1042
|
+
}
|
|
1043
|
+
/**
|
|
1044
|
+
* This update action does not support specifying a quantity, unlike the [Remove LineItem](ctp:api:type:StagedOrderRemoveLineItemAction) update action.
|
|
1045
|
+
*
|
|
1046
|
+
* If `shippingDetails` must be partially removed, use the [Change CustomLineItem Quantity](ctp:api:type:StagedOrderChangeCustomLineItemQuantityAction) update action.
|
|
1047
|
+
*
|
|
1048
|
+
*/
|
|
1049
|
+
export interface StagedOrderRemoveCustomLineItemAction {
|
|
1050
|
+
readonly action: 'removeCustomLineItem';
|
|
1051
|
+
/**
|
|
1052
|
+
* `id` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
|
|
1053
|
+
*
|
|
1054
|
+
*
|
|
1055
|
+
*/
|
|
1056
|
+
readonly customLineItemId?: string;
|
|
1057
|
+
/**
|
|
1058
|
+
* `key` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
|
|
1059
|
+
*
|
|
1060
|
+
*
|
|
1061
|
+
*/
|
|
1062
|
+
readonly customLineItemKey?: string;
|
|
1063
|
+
}
|
|
1064
|
+
/**
|
|
1065
|
+
* Produces the [DeliveryRemoved](ctp:api:type:DeliveryRemovedMessage) Message.
|
|
1066
|
+
*
|
|
1067
|
+
*/
|
|
1068
|
+
export interface StagedOrderRemoveDeliveryAction {
|
|
1069
|
+
readonly action: 'removeDelivery';
|
|
1070
|
+
/**
|
|
1071
|
+
* `id` of an existing [Delivery](ctp:api:type:Delivery).
|
|
1072
|
+
*
|
|
1073
|
+
* Either `deliveryId` or `deliveryKey` must be provided.
|
|
1074
|
+
*
|
|
1075
|
+
*
|
|
1076
|
+
*/
|
|
1077
|
+
readonly deliveryId?: string;
|
|
1078
|
+
/**
|
|
1079
|
+
* `key` of an existing [Delivery](ctp:api:type:Delivery).
|
|
1080
|
+
*
|
|
1081
|
+
* Either `deliveryId` or `deliveryKey` must be provided.
|
|
1082
|
+
*
|
|
1083
|
+
*
|
|
1084
|
+
*/
|
|
1085
|
+
readonly deliveryKey?: string;
|
|
1086
|
+
}
|
|
1087
|
+
export interface StagedOrderRemoveDiscountCodeAction {
|
|
1088
|
+
readonly action: 'removeDiscountCode';
|
|
1089
|
+
/**
|
|
1090
|
+
* Discount Code to remove from the Cart.
|
|
1091
|
+
*
|
|
1092
|
+
*
|
|
1093
|
+
*/
|
|
1094
|
+
readonly discountCode: DiscountCodeReference;
|
|
1095
|
+
}
|
|
1096
|
+
/**
|
|
1097
|
+
* An address can only be removed if it is not referenced in any [ItemShippingTarget](ctp:api:type:ItemShippingTarget) of the Cart.
|
|
1098
|
+
*
|
|
1099
|
+
*/
|
|
1100
|
+
export interface StagedOrderRemoveItemShippingAddressAction {
|
|
1101
|
+
readonly action: 'removeItemShippingAddress';
|
|
1102
|
+
/**
|
|
1103
|
+
* `key` of the Address to remove from `itemShippingAddresses`.
|
|
1104
|
+
*
|
|
1105
|
+
*
|
|
1106
|
+
*/
|
|
1107
|
+
readonly addressKey: string;
|
|
1108
|
+
}
|
|
1109
|
+
/**
|
|
1110
|
+
* 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).
|
|
1111
|
+
*
|
|
1112
|
+
*/
|
|
1113
|
+
export interface StagedOrderRemoveLineItemAction {
|
|
1114
|
+
readonly action: 'removeLineItem';
|
|
1115
|
+
/**
|
|
1116
|
+
* `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1117
|
+
*
|
|
1118
|
+
*
|
|
1119
|
+
*/
|
|
1120
|
+
readonly lineItemId?: string;
|
|
1121
|
+
/**
|
|
1122
|
+
* `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1123
|
+
*
|
|
1124
|
+
*
|
|
1125
|
+
*/
|
|
1126
|
+
readonly lineItemKey?: string;
|
|
1127
|
+
/**
|
|
1128
|
+
* New value to set.
|
|
1129
|
+
* If absent or `0`, the Line Item is removed from the Cart.
|
|
1130
|
+
*
|
|
1131
|
+
*
|
|
1132
|
+
*/
|
|
1133
|
+
readonly quantity?: number;
|
|
1134
|
+
/**
|
|
1135
|
+
* 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).
|
|
1136
|
+
*
|
|
1137
|
+
*
|
|
1138
|
+
*/
|
|
1139
|
+
readonly externalPrice?: _Money;
|
|
1140
|
+
/**
|
|
1141
|
+
* 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).
|
|
1142
|
+
*
|
|
1143
|
+
*
|
|
1144
|
+
*/
|
|
1145
|
+
readonly externalTotalPrice?: ExternalLineItemTotalPrice;
|
|
1146
|
+
/**
|
|
1147
|
+
* Container for Line Item-specific addresses to remove.
|
|
1148
|
+
*
|
|
1149
|
+
*
|
|
1150
|
+
*/
|
|
1151
|
+
readonly shippingDetailsToRemove?: ItemShippingDetailsDraft;
|
|
1152
|
+
}
|
|
1153
|
+
/**
|
|
1154
|
+
* Produces the [ParcelRemovedFromDelivery](ctp:api:type:ParcelRemovedFromDeliveryMessage) Message.
|
|
1155
|
+
*
|
|
1156
|
+
*/
|
|
1157
|
+
export interface StagedOrderRemoveParcelFromDeliveryAction {
|
|
1158
|
+
readonly action: 'removeParcelFromDelivery';
|
|
1159
|
+
/**
|
|
1160
|
+
* `id` of an existing [Parcel](ctp:api:type:Parcel).
|
|
1161
|
+
*
|
|
1162
|
+
* Either `parcelId` or `parcelKey` must be provided.
|
|
1163
|
+
*
|
|
1164
|
+
*
|
|
1165
|
+
*/
|
|
1166
|
+
readonly parcelId?: string;
|
|
1167
|
+
/**
|
|
1168
|
+
* `key` of an existing [Parcel](ctp:api:type:Parcel).
|
|
1169
|
+
*
|
|
1170
|
+
* Either `parcelId` or `parcelKey` must be provided.
|
|
1171
|
+
*
|
|
1172
|
+
*
|
|
1173
|
+
*/
|
|
1174
|
+
readonly parcelKey?: string;
|
|
1175
|
+
}
|
|
1176
|
+
export interface StagedOrderRemovePaymentAction {
|
|
1177
|
+
readonly action: 'removePayment';
|
|
1178
|
+
/**
|
|
1179
|
+
* Payment to remove from the [PaymentInfo](ctp:api:type:PaymentInfo).
|
|
1180
|
+
*
|
|
1181
|
+
*
|
|
1182
|
+
*/
|
|
1183
|
+
readonly payment: PaymentResourceIdentifier;
|
|
1184
|
+
}
|
|
1185
|
+
/**
|
|
1186
|
+
* This action updates the `billingAddress` on the Order, but it does not change the billing address on the referenced [Cart](ctp:api:type:Cart) from which the Order is created.
|
|
1187
|
+
*
|
|
1188
|
+
* Produces the [Order Billing Address Set](ctp:api:type:OrderBillingAddressSetMessage) Message.
|
|
1189
|
+
*
|
|
1190
|
+
*/
|
|
1191
|
+
export interface StagedOrderSetBillingAddressAction {
|
|
1192
|
+
readonly action: 'setBillingAddress';
|
|
1193
|
+
/**
|
|
1194
|
+
* Value to set.
|
|
1195
|
+
* If empty, any existing value is removed.
|
|
1196
|
+
*
|
|
1197
|
+
*
|
|
1198
|
+
*/
|
|
1199
|
+
readonly address?: _BaseAddress;
|
|
1200
|
+
}
|
|
1201
|
+
export interface StagedOrderSetBillingAddressCustomFieldAction {
|
|
1202
|
+
readonly action: 'setBillingAddressCustomField';
|
|
1203
|
+
/**
|
|
1204
|
+
* Name of the [Custom Field](/../api/projects/custom-fields).
|
|
1205
|
+
*
|
|
1206
|
+
*
|
|
1207
|
+
*/
|
|
1208
|
+
readonly name: string;
|
|
1209
|
+
/**
|
|
1210
|
+
* If `value` is absent or `null`, this field will be removed if it exists.
|
|
1211
|
+
* Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
|
|
1212
|
+
* If `value` is provided, it is set for the field defined by `name`.
|
|
1213
|
+
*
|
|
1214
|
+
*
|
|
1215
|
+
*/
|
|
1216
|
+
readonly value?: any;
|
|
1217
|
+
}
|
|
1218
|
+
export interface StagedOrderSetBillingAddressCustomTypeAction {
|
|
1219
|
+
readonly action: 'setBillingAddressCustomType';
|
|
1220
|
+
/**
|
|
1221
|
+
* Defines the [Type](ctp:api:type:Type) that extends the `billingAddress` with [Custom Fields](/../api/projects/custom-fields).
|
|
1222
|
+
* If absent, any existing Type and Custom Fields are removed from the `billingAddress`.
|
|
1223
|
+
*
|
|
1224
|
+
*
|
|
1225
|
+
*/
|
|
1226
|
+
readonly type?: TypeResourceIdentifier;
|
|
1227
|
+
/**
|
|
1228
|
+
* Sets the [Custom Fields](/../api/projects/custom-fields) fields for the `billingAddress`.
|
|
1229
|
+
*
|
|
1230
|
+
*
|
|
1231
|
+
*/
|
|
1232
|
+
readonly fields?: FieldContainer;
|
|
1233
|
+
}
|
|
1234
|
+
/**
|
|
1235
|
+
* Setting the country can lead to changes in the [LineItem](ctp:api:type:LineItem) prices.
|
|
1236
|
+
*
|
|
1237
|
+
*/
|
|
1238
|
+
export interface StagedOrderSetCountryAction {
|
|
1239
|
+
readonly action: 'setCountry';
|
|
1240
|
+
/**
|
|
1241
|
+
* Value to set.
|
|
1242
|
+
* If empty, any existing value is removed.
|
|
1243
|
+
*
|
|
1244
|
+
* If the Cart is bound to a `store`, the provided value must be included in the [Store](ctp:api:type:Store)'s `countries`.
|
|
1245
|
+
* Otherwise a [CountryNotConfiguredInStore](ctp:api:type:CountryNotConfiguredInStoreError) error is returned.
|
|
1246
|
+
*
|
|
1247
|
+
*
|
|
1248
|
+
*/
|
|
1249
|
+
readonly country?: string;
|
|
1250
|
+
}
|
|
1251
|
+
export interface StagedOrderSetCustomFieldAction {
|
|
1252
|
+
readonly action: 'setCustomField';
|
|
1253
|
+
/**
|
|
1254
|
+
* Name of the [Custom Field](/../api/projects/custom-fields).
|
|
1255
|
+
*
|
|
1256
|
+
*
|
|
1257
|
+
*/
|
|
1258
|
+
readonly name: string;
|
|
1259
|
+
/**
|
|
1260
|
+
* If `value` is absent or `null`, this field will be removed if it exists.
|
|
1261
|
+
* Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
|
|
1262
|
+
* If `value` is provided, it is set for the field defined by `name`.
|
|
1263
|
+
*
|
|
1264
|
+
*
|
|
1265
|
+
*/
|
|
1266
|
+
readonly value?: any;
|
|
1267
|
+
}
|
|
1268
|
+
export interface StagedOrderSetCustomLineItemCustomFieldAction {
|
|
1269
|
+
readonly action: 'setCustomLineItemCustomField';
|
|
1270
|
+
/**
|
|
1271
|
+
* `id` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
|
|
1272
|
+
*
|
|
1273
|
+
*
|
|
1274
|
+
*/
|
|
1275
|
+
readonly customLineItemId?: string;
|
|
1276
|
+
/**
|
|
1277
|
+
* `key` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
|
|
1278
|
+
*
|
|
1279
|
+
*
|
|
1280
|
+
*/
|
|
1281
|
+
readonly customLineItemKey?: string;
|
|
1282
|
+
/**
|
|
1283
|
+
* Name of the [Custom Field](/../api/projects/custom-fields).
|
|
1284
|
+
*
|
|
1285
|
+
*
|
|
1286
|
+
*/
|
|
1287
|
+
readonly name: string;
|
|
1288
|
+
/**
|
|
1289
|
+
* If `value` is absent or `null`, this field will be removed if it exists.
|
|
1290
|
+
* Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
|
|
1291
|
+
* If `value` is provided, it is set for the field defined by `name`.
|
|
1292
|
+
*
|
|
1293
|
+
*
|
|
1294
|
+
*/
|
|
1295
|
+
readonly value?: any;
|
|
1296
|
+
}
|
|
1297
|
+
export interface StagedOrderSetCustomLineItemCustomTypeAction {
|
|
1298
|
+
readonly action: 'setCustomLineItemCustomType';
|
|
1299
|
+
/**
|
|
1300
|
+
* `id` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
|
|
1301
|
+
*
|
|
1302
|
+
*
|
|
1303
|
+
*/
|
|
1304
|
+
readonly customLineItemId?: string;
|
|
1305
|
+
/**
|
|
1306
|
+
* `key` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
|
|
1307
|
+
*
|
|
1308
|
+
*
|
|
1309
|
+
*/
|
|
1310
|
+
readonly customLineItemKey?: string;
|
|
1311
|
+
/**
|
|
1312
|
+
* Defines the [Type](ctp:api:type:Type) that extends the Custom Line Item with [Custom Fields](/../api/projects/custom-fields).
|
|
1313
|
+
* If absent, any existing Type and Custom Fields are removed from the Custom Line Item.
|
|
1314
|
+
*
|
|
1315
|
+
*
|
|
1316
|
+
*/
|
|
1317
|
+
readonly type?: TypeResourceIdentifier;
|
|
1318
|
+
/**
|
|
1319
|
+
* Sets the [Custom Fields](/../api/projects/custom-fields) fields for the Custom Line Item.
|
|
1320
|
+
*
|
|
1321
|
+
*
|
|
1322
|
+
*/
|
|
1323
|
+
readonly fields?: FieldContainer;
|
|
1324
|
+
}
|
|
1325
|
+
export interface StagedOrderSetCustomLineItemShippingDetailsAction {
|
|
1326
|
+
readonly action: 'setCustomLineItemShippingDetails';
|
|
1327
|
+
/**
|
|
1328
|
+
* `id` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
|
|
1329
|
+
*
|
|
1330
|
+
*
|
|
1331
|
+
*/
|
|
1332
|
+
readonly customLineItemId?: string;
|
|
1333
|
+
/**
|
|
1334
|
+
* `key` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
|
|
1335
|
+
*
|
|
1336
|
+
*
|
|
1337
|
+
*/
|
|
1338
|
+
readonly customLineItemKey?: string;
|
|
1339
|
+
/**
|
|
1340
|
+
* Value to set.
|
|
1341
|
+
* If empty, any existing value is removed.
|
|
1342
|
+
*
|
|
1343
|
+
*
|
|
1344
|
+
*/
|
|
1345
|
+
readonly shippingDetails?: ItemShippingDetailsDraft;
|
|
1346
|
+
}
|
|
1347
|
+
/**
|
|
1348
|
+
* Can be used if the Cart has the `ExternalAmount` [TaxMode](ctp:api:type:TaxMode).
|
|
1349
|
+
*
|
|
1350
|
+
*/
|
|
1351
|
+
export interface StagedOrderSetCustomLineItemTaxAmountAction {
|
|
1352
|
+
readonly action: 'setCustomLineItemTaxAmount';
|
|
1353
|
+
/**
|
|
1354
|
+
* `id` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
|
|
1355
|
+
*
|
|
1356
|
+
*
|
|
1357
|
+
*/
|
|
1358
|
+
readonly customLineItemId?: string;
|
|
1359
|
+
/**
|
|
1360
|
+
* `key` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
|
|
1361
|
+
*
|
|
1362
|
+
*
|
|
1363
|
+
*/
|
|
1364
|
+
readonly customLineItemKey?: string;
|
|
1365
|
+
/**
|
|
1366
|
+
* Value to set.
|
|
1367
|
+
* If empty, any existing value is removed.
|
|
1368
|
+
*
|
|
1369
|
+
*
|
|
1370
|
+
*/
|
|
1371
|
+
readonly externalTaxAmount?: ExternalTaxAmountDraft;
|
|
1372
|
+
/**
|
|
1373
|
+
* `key` of the [ShippingMethod](ctp:api:type:ShippingMethod) used for this Custom Line Item.
|
|
1374
|
+
* This is required for Carts with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
|
|
1375
|
+
*
|
|
1376
|
+
*
|
|
1377
|
+
*/
|
|
1378
|
+
readonly shippingKey?: string;
|
|
1379
|
+
}
|
|
1380
|
+
/**
|
|
1381
|
+
* Can be used if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode).
|
|
1382
|
+
*
|
|
1383
|
+
*/
|
|
1384
|
+
export interface StagedOrderSetCustomLineItemTaxRateAction {
|
|
1385
|
+
readonly action: 'setCustomLineItemTaxRate';
|
|
1386
|
+
/**
|
|
1387
|
+
* `id` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
|
|
1388
|
+
*
|
|
1389
|
+
*
|
|
1390
|
+
*/
|
|
1391
|
+
readonly customLineItemId?: string;
|
|
1392
|
+
/**
|
|
1393
|
+
* `key` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
|
|
1394
|
+
*
|
|
1395
|
+
*
|
|
1396
|
+
*/
|
|
1397
|
+
readonly customLineItemKey?: string;
|
|
1398
|
+
/**
|
|
1399
|
+
* Value to set.
|
|
1400
|
+
* If empty, an existing value is removed.
|
|
1401
|
+
*
|
|
1402
|
+
*
|
|
1403
|
+
*/
|
|
1404
|
+
readonly externalTaxRate?: ExternalTaxRateDraft;
|
|
1405
|
+
/**
|
|
1406
|
+
* `key` of the [ShippingMethod](ctp:api:type:ShippingMethod) used for this Custom Line Item.
|
|
1407
|
+
* This is required for Carts with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
|
|
1408
|
+
*
|
|
1409
|
+
*
|
|
1410
|
+
*/
|
|
1411
|
+
readonly shippingKey?: string;
|
|
1412
|
+
}
|
|
1413
|
+
/**
|
|
1414
|
+
* To set the Cart's custom Shipping Method (independent of the [ShippingMethods](ctp:api:type:ShippingMethod) managed through the [Shipping Methods API](/../api/projects/shippingMethods)) the Cart must have the `Single` [ShippingMode](ctp:api:type:ShippingMode) and a `shippingAddress`.
|
|
1415
|
+
*
|
|
1416
|
+
* To unset a custom Shipping Method on a Cart, use the [Set ShippingMethod](ctp:api:type:StagedOrderSetShippingMethodAction) update action without the `shippingMethod` field instead.
|
|
1417
|
+
*
|
|
1418
|
+
*/
|
|
1419
|
+
export interface StagedOrderSetCustomShippingMethodAction {
|
|
1420
|
+
readonly action: 'setCustomShippingMethod';
|
|
1421
|
+
/**
|
|
1422
|
+
* Name of the custom Shipping Method.
|
|
1423
|
+
*
|
|
1424
|
+
*
|
|
1425
|
+
*/
|
|
1426
|
+
readonly shippingMethodName: string;
|
|
1427
|
+
/**
|
|
1428
|
+
* Determines the shipping price.
|
|
1429
|
+
*
|
|
1430
|
+
*
|
|
1431
|
+
*/
|
|
1432
|
+
readonly shippingRate: ShippingRateDraft;
|
|
1433
|
+
/**
|
|
1434
|
+
* Tax Category used to determine the Tax Rate when the Cart has the `Platform` [TaxMode](ctp:api:type:TaxMode).
|
|
1435
|
+
*
|
|
1436
|
+
*
|
|
1437
|
+
*/
|
|
1438
|
+
readonly taxCategory?: TaxCategoryResourceIdentifier;
|
|
1439
|
+
/**
|
|
1440
|
+
* External Tax Rate for the `shippingRate` to be set if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode).
|
|
1441
|
+
*
|
|
1442
|
+
*
|
|
1443
|
+
*/
|
|
1444
|
+
readonly externalTaxRate?: ExternalTaxRateDraft;
|
|
1445
|
+
}
|
|
1446
|
+
export interface StagedOrderSetCustomTypeAction {
|
|
1447
|
+
readonly action: 'setCustomType';
|
|
1448
|
+
/**
|
|
1449
|
+
* Defines the [Type](ctp:api:type:Type) that extends the Order Edit with [Custom Fields](/../api/projects/custom-fields).
|
|
1450
|
+
* If absent, any existing Type and Custom Fields are removed from the Order Edit.
|
|
1451
|
+
*
|
|
1452
|
+
*
|
|
1453
|
+
*/
|
|
1454
|
+
readonly type?: TypeResourceIdentifier;
|
|
1455
|
+
/**
|
|
1456
|
+
* Sets the [Custom Fields](/../api/projects/custom-fields) fields for the Order Edit.
|
|
1457
|
+
*
|
|
1458
|
+
*
|
|
1459
|
+
*/
|
|
1460
|
+
readonly fields?: FieldContainer;
|
|
1461
|
+
}
|
|
1462
|
+
/**
|
|
1463
|
+
* This action updates the `customerEmail` on the Order, but it does not change the Customer email on the [Cart](ctp:api:type:Cart) the Order has been created from.
|
|
1464
|
+
*
|
|
1465
|
+
* Produces the [Order Customer Email Set](ctp:api:type:OrderCustomerEmailSetMessage) Message.
|
|
1466
|
+
*
|
|
1467
|
+
*/
|
|
1468
|
+
export interface StagedOrderSetCustomerEmailAction {
|
|
1469
|
+
readonly action: 'setCustomerEmail';
|
|
1470
|
+
/**
|
|
1471
|
+
* Value to set.
|
|
1472
|
+
* If empty, any existing value will be removed.
|
|
1473
|
+
*
|
|
1474
|
+
*
|
|
1475
|
+
*/
|
|
1476
|
+
readonly email?: string;
|
|
1477
|
+
}
|
|
1478
|
+
/**
|
|
1479
|
+
* This update action can only be used if a Customer is not assigned to a Cart.
|
|
1480
|
+
* If a Customer is already assigned, the Cart uses the Customer Group of the assigned Customer.
|
|
1481
|
+
*
|
|
1482
|
+
* To reflect the new Customer Group, this update action can result in [updates to the Cart](/../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).
|
|
1483
|
+
*
|
|
1484
|
+
*/
|
|
1485
|
+
export interface StagedOrderSetCustomerGroupAction {
|
|
1486
|
+
readonly action: 'setCustomerGroup';
|
|
1487
|
+
/**
|
|
1488
|
+
* Value to set.
|
|
1489
|
+
* If empty, any existing value is removed.
|
|
1490
|
+
*
|
|
1491
|
+
*
|
|
1492
|
+
*/
|
|
1493
|
+
readonly customerGroup?: CustomerGroupResourceIdentifier;
|
|
1494
|
+
}
|
|
1495
|
+
/**
|
|
1496
|
+
* Setting the Order's `customerId` does not recalculate prices or discounts on the Order.
|
|
1497
|
+
* If the Customer belongs to a Customer Group, `customerGroup` on the [Order](ctp:api:type:Order) is updated automatically.
|
|
1498
|
+
*
|
|
1499
|
+
* Produces the [OrderCustomerSet](ctp:api:type:OrderCustomerSetMessage) Message.
|
|
1500
|
+
*
|
|
1501
|
+
*/
|
|
1502
|
+
export interface StagedOrderSetCustomerIdAction {
|
|
1503
|
+
readonly action: 'setCustomerId';
|
|
1504
|
+
/**
|
|
1505
|
+
* `id` of an existing [Customer](ctp:api:type:Customer).
|
|
1506
|
+
* If empty, any existing value is removed.
|
|
1507
|
+
*
|
|
1508
|
+
*
|
|
1509
|
+
*/
|
|
1510
|
+
readonly customerId?: string;
|
|
1511
|
+
}
|
|
1512
|
+
/**
|
|
1513
|
+
* Produces the [DeliveryAddressSet](ctp:api:type:DeliveryAddressSetMessage) Message.
|
|
1514
|
+
*
|
|
1515
|
+
*/
|
|
1516
|
+
export interface StagedOrderSetDeliveryAddressAction {
|
|
1517
|
+
readonly action: 'setDeliveryAddress';
|
|
1518
|
+
/**
|
|
1519
|
+
* `id` of an existing [Delivery](ctp:api:type:Delivery).
|
|
1520
|
+
*
|
|
1521
|
+
* Either `deliveryId` or `deliveryKey` must be provided.
|
|
1522
|
+
*
|
|
1523
|
+
*
|
|
1524
|
+
*/
|
|
1525
|
+
readonly deliveryId?: string;
|
|
1526
|
+
/**
|
|
1527
|
+
* `key` of an existing [Delivery](ctp:api:type:Delivery).
|
|
1528
|
+
*
|
|
1529
|
+
* Either `deliveryId` or `deliveryKey` must be provided.
|
|
1530
|
+
*
|
|
1531
|
+
*
|
|
1532
|
+
*/
|
|
1533
|
+
readonly deliveryKey?: string;
|
|
1534
|
+
/**
|
|
1535
|
+
* Value to set.
|
|
1536
|
+
* If empty, any existing value will be removed.
|
|
1537
|
+
*
|
|
1538
|
+
*
|
|
1539
|
+
*/
|
|
1540
|
+
readonly address?: _BaseAddress;
|
|
1541
|
+
}
|
|
1542
|
+
export interface StagedOrderSetDeliveryAddressCustomFieldAction {
|
|
1543
|
+
readonly action: 'setDeliveryAddressCustomField';
|
|
1544
|
+
/**
|
|
1545
|
+
* `id` of an existing [Delivery](ctp:api:type:Delivery).
|
|
1546
|
+
*
|
|
1547
|
+
* Either `deliveryId` or `deliveryKey` must be provided.
|
|
1548
|
+
*
|
|
1549
|
+
*
|
|
1550
|
+
*/
|
|
1551
|
+
readonly deliveryId?: string;
|
|
1552
|
+
/**
|
|
1553
|
+
* `key` of an existing [Delivery](ctp:api:type:Delivery).
|
|
1554
|
+
*
|
|
1555
|
+
* Either `deliveryId` or `deliveryKey` must be provided.
|
|
1556
|
+
*
|
|
1557
|
+
*
|
|
1558
|
+
*/
|
|
1559
|
+
readonly deliveryKey?: string;
|
|
1560
|
+
/**
|
|
1561
|
+
* Name of the [Custom Field](/../api/projects/custom-fields).
|
|
1562
|
+
*
|
|
1563
|
+
*
|
|
1564
|
+
*/
|
|
1565
|
+
readonly name: string;
|
|
1566
|
+
/**
|
|
1567
|
+
* If `value` is absent or `null`, this field will be removed if it exists.
|
|
1568
|
+
* Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
|
|
1569
|
+
* If `value` is provided, it is set for the field defined by `name`.
|
|
1570
|
+
*
|
|
1571
|
+
*
|
|
1572
|
+
*/
|
|
1573
|
+
readonly value?: any;
|
|
1574
|
+
}
|
|
1575
|
+
export interface StagedOrderSetDeliveryAddressCustomTypeAction {
|
|
1576
|
+
readonly action: 'setDeliveryAddressCustomType';
|
|
1577
|
+
/**
|
|
1578
|
+
* `id` of an existing [Delivery](ctp:api:type:Delivery).
|
|
1579
|
+
*
|
|
1580
|
+
* Either `deliveryId` or `deliveryKey` must be provided.
|
|
1581
|
+
*
|
|
1582
|
+
*
|
|
1583
|
+
*/
|
|
1584
|
+
readonly deliveryId?: string;
|
|
1585
|
+
/**
|
|
1586
|
+
* `key` of an existing [Delivery](ctp:api:type:Delivery).
|
|
1587
|
+
*
|
|
1588
|
+
* Either `deliveryId` or `deliveryKey` must be provided.
|
|
1589
|
+
*
|
|
1590
|
+
*
|
|
1591
|
+
*/
|
|
1592
|
+
readonly deliveryKey?: string;
|
|
1593
|
+
/**
|
|
1594
|
+
* Defines the [Type](ctp:api:type:Type) that extends the [Delivery](ctp:api:type:Delivery) `address` with [Custom Fields](/../api/projects/custom-fields).
|
|
1595
|
+
* If absent, any existing Type and Custom Fields are removed from the [Delivery](ctp:api:type:Delivery) `address`.
|
|
1596
|
+
*
|
|
1597
|
+
*
|
|
1598
|
+
*/
|
|
1599
|
+
readonly type?: TypeResourceIdentifier;
|
|
1600
|
+
/**
|
|
1601
|
+
* Sets the [Custom Fields](/../api/projects/custom-fields) fields for the [Delivery](ctp:api:type:Delivery) `address`.
|
|
1602
|
+
*
|
|
1603
|
+
*
|
|
1604
|
+
*/
|
|
1605
|
+
readonly fields?: FieldContainer;
|
|
1606
|
+
}
|
|
1607
|
+
export interface StagedOrderSetDeliveryCustomFieldAction {
|
|
1608
|
+
readonly action: 'setDeliveryCustomField';
|
|
1609
|
+
/**
|
|
1610
|
+
* `id` of an existing [Delivery](ctp:api:type:Delivery).
|
|
1611
|
+
*
|
|
1612
|
+
* Either `deliveryId` or `deliveryKey` must be provided.
|
|
1613
|
+
*
|
|
1614
|
+
*
|
|
1615
|
+
*/
|
|
1616
|
+
readonly deliveryId?: string;
|
|
1617
|
+
/**
|
|
1618
|
+
* `key` of an existing [Delivery](ctp:api:type:Delivery).
|
|
1619
|
+
*
|
|
1620
|
+
* Either `deliveryId` or `deliveryKey` must be provided.
|
|
1621
|
+
*
|
|
1622
|
+
*
|
|
1623
|
+
*/
|
|
1624
|
+
readonly deliveryKey?: string;
|
|
1625
|
+
/**
|
|
1626
|
+
* Name of the [Custom Field](/../api/projects/custom-fields).
|
|
1627
|
+
*
|
|
1628
|
+
*
|
|
1629
|
+
*/
|
|
1630
|
+
readonly name: string;
|
|
1631
|
+
/**
|
|
1632
|
+
* If `value` is absent or `null`, this field will be removed if it exists.
|
|
1633
|
+
* Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
|
|
1634
|
+
* If `value` is provided, it is set for the field defined by `name`.
|
|
1635
|
+
*
|
|
1636
|
+
*
|
|
1637
|
+
*/
|
|
1638
|
+
readonly value?: any;
|
|
1639
|
+
}
|
|
1640
|
+
export interface StagedOrderSetDeliveryCustomTypeAction {
|
|
1641
|
+
readonly action: 'setDeliveryCustomType';
|
|
1642
|
+
/**
|
|
1643
|
+
* `id` of an existing [Delivery](ctp:api:type:Delivery).
|
|
1644
|
+
*
|
|
1645
|
+
* Either `deliveryId` or `deliveryKey` must be provided.
|
|
1646
|
+
*
|
|
1647
|
+
*
|
|
1648
|
+
*/
|
|
1649
|
+
readonly deliveryId?: string;
|
|
1650
|
+
/**
|
|
1651
|
+
* `key` of an existing [Delivery](ctp:api:type:Delivery).
|
|
1652
|
+
*
|
|
1653
|
+
* Either `deliveryId` or `deliveryKey` must be provided.
|
|
1654
|
+
*
|
|
1655
|
+
*
|
|
1656
|
+
*/
|
|
1657
|
+
readonly deliveryKey?: string;
|
|
1658
|
+
/**
|
|
1659
|
+
* Defines the [Type](ctp:api:type:Type) that extends the Delivery with [Custom Fields](/../api/projects/custom-fields).
|
|
1660
|
+
* If absent, any existing Type and Custom Fields are removed from the Delivery.
|
|
1661
|
+
*
|
|
1662
|
+
*
|
|
1663
|
+
*/
|
|
1664
|
+
readonly type?: TypeResourceIdentifier;
|
|
1665
|
+
/**
|
|
1666
|
+
* Sets the [Custom Fields](/../api/projects/custom-fields) fields for the Delivery.
|
|
1667
|
+
*
|
|
1668
|
+
*
|
|
1669
|
+
*/
|
|
1670
|
+
readonly fields?: FieldContainer;
|
|
1671
|
+
}
|
|
1672
|
+
/**
|
|
1673
|
+
* Produces the [Delivery Items Updated](ctp:api:type:DeliveryItemsUpdatedMessage) Message.
|
|
1674
|
+
*
|
|
1675
|
+
*/
|
|
1676
|
+
export interface StagedOrderSetDeliveryItemsAction {
|
|
1677
|
+
readonly action: 'setDeliveryItems';
|
|
1678
|
+
/**
|
|
1679
|
+
* `id` of an existing [Delivery](ctp:api:type:Delivery).
|
|
1680
|
+
*
|
|
1681
|
+
* Either `deliveryId` or `deliveryKey` must be provided.
|
|
1682
|
+
*
|
|
1683
|
+
*
|
|
1684
|
+
*/
|
|
1685
|
+
readonly deliveryId?: string;
|
|
1686
|
+
/**
|
|
1687
|
+
* `key` of an existing [Delivery](ctp:api:type:Delivery).
|
|
1688
|
+
*
|
|
1689
|
+
* Either `deliveryId` or `deliveryKey` must be provided.
|
|
1690
|
+
*
|
|
1691
|
+
*
|
|
1692
|
+
*/
|
|
1693
|
+
readonly deliveryKey?: string;
|
|
1694
|
+
/**
|
|
1695
|
+
* Value to set.
|
|
1696
|
+
* If empty, any existing value is removed.
|
|
1697
|
+
*
|
|
1698
|
+
*
|
|
1699
|
+
*/
|
|
1700
|
+
readonly items: DeliveryItem[];
|
|
1701
|
+
}
|
|
1702
|
+
/**
|
|
1703
|
+
* Adds a [DirectDiscount](ctp:api:type:DirectDiscount), but only if no [DiscountCode](ctp:api:type:DiscountCode) has been added to the Order.
|
|
1704
|
+
* Either a Discount Code or a Direct Discount can exist on a Order at the same time.
|
|
1705
|
+
*
|
|
1706
|
+
*/
|
|
1707
|
+
export interface StagedOrderSetDirectDiscountsAction {
|
|
1708
|
+
readonly action: 'setDirectDiscounts';
|
|
1709
|
+
/**
|
|
1710
|
+
* - If set, all existing Direct Discounts are replaced.
|
|
1711
|
+
* The discounts apply in the order they are added to the list.
|
|
1712
|
+
* - If empty, all existing Direct Discounts are removed and all affected prices on the Order are recalculated.
|
|
1713
|
+
*
|
|
1714
|
+
*
|
|
1715
|
+
*/
|
|
1716
|
+
readonly discounts: DirectDiscountDraft[];
|
|
1717
|
+
}
|
|
1718
|
+
export interface StagedOrderSetItemShippingAddressCustomFieldAction {
|
|
1719
|
+
readonly action: 'setItemShippingAddressCustomField';
|
|
1720
|
+
/**
|
|
1721
|
+
* `key` of the [Address](ctp:api:type:Address) in `itemShippingAddresses`.
|
|
1722
|
+
*
|
|
1723
|
+
*
|
|
1724
|
+
*/
|
|
1725
|
+
readonly addressKey: string;
|
|
1726
|
+
/**
|
|
1727
|
+
* Name of the [Custom Field](/../api/projects/custom-fields).
|
|
1728
|
+
*
|
|
1729
|
+
*
|
|
1730
|
+
*/
|
|
1731
|
+
readonly name: string;
|
|
1732
|
+
/**
|
|
1733
|
+
* If `value` is absent or `null`, this field will be removed if it exists.
|
|
1734
|
+
* Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
|
|
1735
|
+
* If `value` is provided, it is set for the field defined by `name`.
|
|
1736
|
+
*
|
|
1737
|
+
*
|
|
1738
|
+
*/
|
|
1739
|
+
readonly value?: any;
|
|
1740
|
+
}
|
|
1741
|
+
export interface StagedOrderSetItemShippingAddressCustomTypeAction {
|
|
1742
|
+
readonly action: 'setItemShippingAddressCustomType';
|
|
1743
|
+
/**
|
|
1744
|
+
* `key` of the [Address](ctp:api:type:Address) in `itemShippingAddresses`.
|
|
1745
|
+
*
|
|
1746
|
+
*
|
|
1747
|
+
*/
|
|
1748
|
+
readonly addressKey: string;
|
|
1749
|
+
/**
|
|
1750
|
+
* Defines the [Type](ctp:api:type:Type) that extends the `itemShippingAddress` with [Custom Fields](/../api/projects/custom-fields).
|
|
1751
|
+
* If absent, any existing Type and Custom Fields are removed from the `itemShippingAddress`.
|
|
1752
|
+
*
|
|
1753
|
+
*
|
|
1754
|
+
*/
|
|
1755
|
+
readonly type?: TypeResourceIdentifier;
|
|
1756
|
+
/**
|
|
1757
|
+
* Sets the [Custom Fields](/../api/projects/custom-fields) fields for the `itemShippingAddress`.
|
|
1758
|
+
*
|
|
1759
|
+
*
|
|
1760
|
+
*/
|
|
1761
|
+
readonly fields?: FieldContainer;
|
|
1762
|
+
}
|
|
1763
|
+
export interface StagedOrderSetLineItemCustomFieldAction {
|
|
1764
|
+
readonly action: 'setLineItemCustomField';
|
|
1765
|
+
/**
|
|
1766
|
+
* `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1767
|
+
*
|
|
1768
|
+
*
|
|
1769
|
+
*/
|
|
1770
|
+
readonly lineItemId?: string;
|
|
1771
|
+
/**
|
|
1772
|
+
* `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1773
|
+
*
|
|
1774
|
+
*
|
|
1775
|
+
*/
|
|
1776
|
+
readonly lineItemKey?: string;
|
|
1777
|
+
/**
|
|
1778
|
+
* Name of the [Custom Field](/../api/projects/custom-fields).
|
|
1779
|
+
*
|
|
1780
|
+
*
|
|
1781
|
+
*/
|
|
1782
|
+
readonly name: string;
|
|
1783
|
+
/**
|
|
1784
|
+
* If `value` is absent or `null`, this field will be removed if it exists.
|
|
1785
|
+
* Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
|
|
1786
|
+
* If `value` is provided, it is set for the field defined by `name`.
|
|
1787
|
+
*
|
|
1788
|
+
*
|
|
1789
|
+
*/
|
|
1790
|
+
readonly value?: any;
|
|
1791
|
+
}
|
|
1792
|
+
export interface StagedOrderSetLineItemCustomTypeAction {
|
|
1793
|
+
readonly action: 'setLineItemCustomType';
|
|
1794
|
+
/**
|
|
1795
|
+
* `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1796
|
+
*
|
|
1797
|
+
*
|
|
1798
|
+
*/
|
|
1799
|
+
readonly lineItemId?: string;
|
|
1800
|
+
/**
|
|
1801
|
+
* `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1802
|
+
*
|
|
1803
|
+
*
|
|
1804
|
+
*/
|
|
1805
|
+
readonly lineItemKey?: string;
|
|
1806
|
+
/**
|
|
1807
|
+
* Defines the [Type](ctp:api:type:Type) that extends the Line Item with [Custom Fields](/../api/projects/custom-fields).
|
|
1808
|
+
* If absent, any existing Type and Custom Fields are removed from the Line Item.
|
|
1809
|
+
*
|
|
1810
|
+
*
|
|
1811
|
+
*/
|
|
1812
|
+
readonly type?: TypeResourceIdentifier;
|
|
1813
|
+
/**
|
|
1814
|
+
* Sets the [Custom Fields](/../api/projects/custom-fields) fields for the Line Item.
|
|
1815
|
+
*
|
|
1816
|
+
*
|
|
1817
|
+
*/
|
|
1818
|
+
readonly fields?: FieldContainer;
|
|
1819
|
+
}
|
|
1820
|
+
/**
|
|
1821
|
+
* 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).
|
|
1822
|
+
*
|
|
1823
|
+
* Produces the [OrderLineItemDistributionChannelSet](ctp:api:type:OrderLineItemDistributionChannelSetMessage) Message.
|
|
1824
|
+
*
|
|
1825
|
+
*/
|
|
1826
|
+
export interface StagedOrderSetLineItemDistributionChannelAction {
|
|
1827
|
+
readonly action: 'setLineItemDistributionChannel';
|
|
1828
|
+
/**
|
|
1829
|
+
* `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1830
|
+
*
|
|
1831
|
+
*
|
|
1832
|
+
*/
|
|
1833
|
+
readonly lineItemId?: string;
|
|
1834
|
+
/**
|
|
1835
|
+
* `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1836
|
+
*
|
|
1837
|
+
*
|
|
1838
|
+
*/
|
|
1839
|
+
readonly lineItemKey?: string;
|
|
1840
|
+
/**
|
|
1841
|
+
* - If present, a [Reference](ctp:api:type:Reference) to the Channel is set for the [LineItem](ctp:api:type:LineItem) specified by `lineItemId`.
|
|
1842
|
+
* - 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`.
|
|
1843
|
+
* The Channel must have the `ProductDistribution` [ChannelRoleEnum](ctp:api:type:ChannelRoleEnum).
|
|
1844
|
+
*
|
|
1845
|
+
*
|
|
1846
|
+
*/
|
|
1847
|
+
readonly distributionChannel?: ChannelResourceIdentifier;
|
|
1848
|
+
}
|
|
1849
|
+
/**
|
|
1850
|
+
* Sets the [LineItem](ctp:api:type:LineItem) `price` and changes the `priceMode` to `ExternalPrice` [LineItemPriceMode](ctp:api:type:LineItemPriceMode).
|
|
1851
|
+
*
|
|
1852
|
+
*/
|
|
1853
|
+
export interface StagedOrderSetLineItemPriceAction {
|
|
1854
|
+
readonly action: 'setLineItemPrice';
|
|
1855
|
+
/**
|
|
1856
|
+
* `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1857
|
+
*
|
|
1858
|
+
*
|
|
1859
|
+
*/
|
|
1860
|
+
readonly lineItemId?: string;
|
|
1861
|
+
/**
|
|
1862
|
+
* `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1863
|
+
*
|
|
1864
|
+
*
|
|
1865
|
+
*/
|
|
1866
|
+
readonly lineItemKey?: string;
|
|
1867
|
+
/**
|
|
1868
|
+
* Value to set.
|
|
1869
|
+
* If `externalPrice` is not given and the `priceMode` is `ExternalPrice`, the external price is unset and the `priceMode` is set to `Platform`.
|
|
1870
|
+
*
|
|
1871
|
+
*
|
|
1872
|
+
*/
|
|
1873
|
+
readonly externalPrice?: _Money;
|
|
1874
|
+
}
|
|
1875
|
+
export interface StagedOrderSetLineItemShippingDetailsAction {
|
|
1876
|
+
readonly action: 'setLineItemShippingDetails';
|
|
1877
|
+
/**
|
|
1878
|
+
* `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1879
|
+
*
|
|
1880
|
+
*
|
|
1881
|
+
*/
|
|
1882
|
+
readonly lineItemId?: string;
|
|
1883
|
+
/**
|
|
1884
|
+
* `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1885
|
+
*
|
|
1886
|
+
*
|
|
1887
|
+
*/
|
|
1888
|
+
readonly lineItemKey?: string;
|
|
1889
|
+
/**
|
|
1890
|
+
* Value to set.
|
|
1891
|
+
* If empty, the existing value is removed.
|
|
1892
|
+
*
|
|
1893
|
+
*
|
|
1894
|
+
*/
|
|
1895
|
+
readonly shippingDetails?: ItemShippingDetailsDraft;
|
|
1896
|
+
}
|
|
1897
|
+
/**
|
|
1898
|
+
* 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.
|
|
1899
|
+
*
|
|
1900
|
+
*/
|
|
1901
|
+
export interface StagedOrderSetLineItemTaxAmountAction {
|
|
1902
|
+
readonly action: 'setLineItemTaxAmount';
|
|
1903
|
+
/**
|
|
1904
|
+
* `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1905
|
+
*
|
|
1906
|
+
*
|
|
1907
|
+
*/
|
|
1908
|
+
readonly lineItemId?: string;
|
|
1909
|
+
/**
|
|
1910
|
+
* `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1911
|
+
*
|
|
1912
|
+
*
|
|
1913
|
+
*/
|
|
1914
|
+
readonly lineItemKey?: string;
|
|
1915
|
+
/**
|
|
1916
|
+
* Value to set.
|
|
1917
|
+
* If empty, any existing value will be removed.
|
|
1918
|
+
*
|
|
1919
|
+
*
|
|
1920
|
+
*/
|
|
1921
|
+
readonly externalTaxAmount?: ExternalTaxAmountDraft;
|
|
1922
|
+
/**
|
|
1923
|
+
* `key` of the [ShippingMethod](ctp:api:type:ShippingMethod) used for this Line Item.
|
|
1924
|
+
* This is required for Carts with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
|
|
1925
|
+
*
|
|
1926
|
+
*
|
|
1927
|
+
*/
|
|
1928
|
+
readonly shippingKey?: string;
|
|
1929
|
+
}
|
|
1930
|
+
/**
|
|
1931
|
+
* Can be used if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode).
|
|
1932
|
+
*
|
|
1933
|
+
*/
|
|
1934
|
+
export interface StagedOrderSetLineItemTaxRateAction {
|
|
1935
|
+
readonly action: 'setLineItemTaxRate';
|
|
1936
|
+
/**
|
|
1937
|
+
* `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1938
|
+
*
|
|
1939
|
+
*
|
|
1940
|
+
*/
|
|
1941
|
+
readonly lineItemId?: string;
|
|
1942
|
+
/**
|
|
1943
|
+
* `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1944
|
+
*
|
|
1945
|
+
*
|
|
1946
|
+
*/
|
|
1947
|
+
readonly lineItemKey?: string;
|
|
1948
|
+
/**
|
|
1949
|
+
* Value to set.
|
|
1950
|
+
* If empty, any existing value will be removed.
|
|
1951
|
+
*
|
|
1952
|
+
*
|
|
1953
|
+
*/
|
|
1954
|
+
readonly externalTaxRate?: ExternalTaxRateDraft;
|
|
1955
|
+
/**
|
|
1956
|
+
* `key` of the [ShippingMethod](ctp:api:type:ShippingMethod) used for this Line Item.
|
|
1957
|
+
* This is required for Carts with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
|
|
1958
|
+
*
|
|
1959
|
+
*
|
|
1960
|
+
*/
|
|
1961
|
+
readonly shippingKey?: string;
|
|
1962
|
+
}
|
|
1963
|
+
/**
|
|
1964
|
+
* Sets the [LineItem](ctp:api:type:LineItem) `totalPrice` and `price`, and changes the `priceMode` to `ExternalTotal` [LineItemPriceMode](ctp:api:type:LineItemPriceMode).
|
|
1965
|
+
*
|
|
1966
|
+
*/
|
|
1967
|
+
export interface StagedOrderSetLineItemTotalPriceAction {
|
|
1968
|
+
readonly action: 'setLineItemTotalPrice';
|
|
1969
|
+
/**
|
|
1970
|
+
* `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1971
|
+
*
|
|
1972
|
+
*
|
|
1973
|
+
*/
|
|
1974
|
+
readonly lineItemId?: string;
|
|
1975
|
+
/**
|
|
1976
|
+
* `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
1977
|
+
*
|
|
1978
|
+
*
|
|
1979
|
+
*/
|
|
1980
|
+
readonly lineItemKey?: string;
|
|
1981
|
+
/**
|
|
1982
|
+
* Value to set.
|
|
1983
|
+
* If `externalTotalPrice` is not given and the `priceMode` is `ExternalTotal`, the external price is unset and the `priceMode` is set to `Platform`.
|
|
1984
|
+
*
|
|
1985
|
+
*
|
|
1986
|
+
*/
|
|
1987
|
+
readonly externalTotalPrice?: ExternalLineItemTotalPrice;
|
|
1988
|
+
}
|
|
1989
|
+
export interface StagedOrderSetLocaleAction {
|
|
1990
|
+
readonly action: 'setLocale';
|
|
1991
|
+
/**
|
|
1992
|
+
* Value to set.
|
|
1993
|
+
* Must be one of the [Project](ctp:api:type:Project)'s languages.
|
|
1994
|
+
* If empty, any existing value is removed.
|
|
1995
|
+
*
|
|
1996
|
+
*
|
|
1997
|
+
*/
|
|
1998
|
+
readonly locale?: string;
|
|
1999
|
+
}
|
|
2000
|
+
export interface StagedOrderSetOrderNumberAction {
|
|
2001
|
+
readonly action: 'setOrderNumber';
|
|
2002
|
+
/**
|
|
2003
|
+
* Value to set. Must be unique across a Project.
|
|
2004
|
+
* Once set, the value cannot be changed.
|
|
2005
|
+
*
|
|
2006
|
+
*
|
|
2007
|
+
*/
|
|
2008
|
+
readonly orderNumber?: string;
|
|
2009
|
+
}
|
|
2010
|
+
/**
|
|
2011
|
+
* Updates the total tax amount of the Order if it has the `ExternalAmount` [TaxMode](ctp:api:type:TaxMode).
|
|
2012
|
+
*
|
|
2013
|
+
*/
|
|
2014
|
+
export interface StagedOrderSetOrderTotalTaxAction {
|
|
2015
|
+
readonly action: 'setOrderTotalTax';
|
|
2016
|
+
/**
|
|
2017
|
+
* Total gross amount of the Order (totalNet + taxes).
|
|
2018
|
+
*
|
|
2019
|
+
*
|
|
2020
|
+
*/
|
|
2021
|
+
readonly externalTotalGross: _Money;
|
|
2022
|
+
/**
|
|
2023
|
+
* Value to set.
|
|
2024
|
+
*
|
|
2025
|
+
*
|
|
2026
|
+
*/
|
|
2027
|
+
readonly externalTaxPortions?: TaxPortionDraft[];
|
|
2028
|
+
}
|
|
2029
|
+
export interface StagedOrderSetParcelCustomFieldAction {
|
|
2030
|
+
readonly action: 'setParcelCustomField';
|
|
2031
|
+
/**
|
|
2032
|
+
* `id` of an existing [Parcel](ctp:api:type:Parcel).
|
|
2033
|
+
*
|
|
2034
|
+
* Either `parcelId` or `parcelKey` must be provided.
|
|
2035
|
+
*
|
|
2036
|
+
*
|
|
2037
|
+
*/
|
|
2038
|
+
readonly parcelId?: string;
|
|
2039
|
+
/**
|
|
2040
|
+
* `key` of an existing [Parcel](ctp:api:type:Parcel).
|
|
2041
|
+
*
|
|
2042
|
+
* Either `parcelId` or `parcelKey` must be provided.
|
|
2043
|
+
*
|
|
2044
|
+
*
|
|
2045
|
+
*/
|
|
2046
|
+
readonly parcelKey?: string;
|
|
2047
|
+
/**
|
|
2048
|
+
* Name of the [Custom Field](/../api/projects/custom-fields).
|
|
2049
|
+
*
|
|
2050
|
+
*
|
|
2051
|
+
*/
|
|
2052
|
+
readonly name: string;
|
|
2053
|
+
/**
|
|
2054
|
+
* If `value` is absent or `null`, this field will be removed if it exists.
|
|
2055
|
+
* Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
|
|
2056
|
+
* If `value` is provided, it is set for the field defined by `name`.
|
|
2057
|
+
*
|
|
2058
|
+
*
|
|
2059
|
+
*/
|
|
2060
|
+
readonly value?: any;
|
|
2061
|
+
}
|
|
2062
|
+
export interface StagedOrderSetParcelCustomTypeAction {
|
|
2063
|
+
readonly action: 'setParcelCustomType';
|
|
2064
|
+
/**
|
|
2065
|
+
* `id` of an existing [Parcel](ctp:api:type:Parcel).
|
|
2066
|
+
*
|
|
2067
|
+
* Either `parcelId` or `parcelKey` must be provided.
|
|
2068
|
+
*
|
|
2069
|
+
*
|
|
2070
|
+
*/
|
|
2071
|
+
readonly parcelId?: string;
|
|
2072
|
+
/**
|
|
2073
|
+
* `key` of an existing [Parcel](ctp:api:type:Parcel).
|
|
2074
|
+
*
|
|
2075
|
+
* Either `parcelId` or `parcelKey` must be provided.
|
|
2076
|
+
*
|
|
2077
|
+
*
|
|
2078
|
+
*/
|
|
2079
|
+
readonly parcelKey?: string;
|
|
2080
|
+
/**
|
|
2081
|
+
* Defines the [Type](ctp:api:type:Type) that extends the Parcel with [Custom Fields](/../api/projects/custom-fields).
|
|
2082
|
+
* If absent, any existing Type and Custom Fields are removed from the Parcel.
|
|
2083
|
+
*
|
|
2084
|
+
*
|
|
2085
|
+
*/
|
|
2086
|
+
readonly type?: TypeResourceIdentifier;
|
|
2087
|
+
/**
|
|
2088
|
+
* Sets the [Custom Fields](/../api/projects/custom-fields) fields for the Parcel.
|
|
2089
|
+
*
|
|
2090
|
+
*
|
|
2091
|
+
*/
|
|
2092
|
+
readonly fields?: FieldContainer;
|
|
2093
|
+
}
|
|
2094
|
+
/**
|
|
2095
|
+
* Produces the [ParcelItemsUpdated](ctp:api:type:ParcelItemsUpdatedMessage) Message.
|
|
2096
|
+
*
|
|
2097
|
+
*/
|
|
2098
|
+
export interface StagedOrderSetParcelItemsAction {
|
|
2099
|
+
readonly action: 'setParcelItems';
|
|
2100
|
+
/**
|
|
2101
|
+
* `id` of an existing [Parcel](ctp:api:type:Parcel).
|
|
2102
|
+
*
|
|
2103
|
+
* Either `parcelId` or `parcelKey` must be provided.
|
|
2104
|
+
*
|
|
2105
|
+
*
|
|
2106
|
+
*/
|
|
2107
|
+
readonly parcelId?: string;
|
|
2108
|
+
/**
|
|
2109
|
+
* `key` of an existing [Parcel](ctp:api:type:Parcel).
|
|
2110
|
+
*
|
|
2111
|
+
* Either `parcelId` or `parcelKey` must be provided.
|
|
2112
|
+
*
|
|
2113
|
+
*
|
|
2114
|
+
*/
|
|
2115
|
+
readonly parcelKey?: string;
|
|
2116
|
+
/**
|
|
2117
|
+
* Value to set.
|
|
2118
|
+
* If empty, any existing value will be removed.
|
|
2119
|
+
*
|
|
2120
|
+
*
|
|
2121
|
+
*/
|
|
2122
|
+
readonly items: DeliveryItem[];
|
|
2123
|
+
}
|
|
2124
|
+
/**
|
|
2125
|
+
* Produces the [ParcelMeasurementsUpdated](ctp:api:type:ParcelMeasurementsUpdatedMessage) Message.
|
|
2126
|
+
*
|
|
2127
|
+
*/
|
|
2128
|
+
export interface StagedOrderSetParcelMeasurementsAction {
|
|
2129
|
+
readonly action: 'setParcelMeasurements';
|
|
2130
|
+
/**
|
|
2131
|
+
* `id` of an existing [Parcel](ctp:api:type:Parcel).
|
|
2132
|
+
*
|
|
2133
|
+
* Either `parcelId` or `parcelKey` must be provided.
|
|
2134
|
+
*
|
|
2135
|
+
*
|
|
2136
|
+
*/
|
|
2137
|
+
readonly parcelId?: string;
|
|
2138
|
+
/**
|
|
2139
|
+
* `key` of an existing [Parcel](ctp:api:type:Parcel).
|
|
2140
|
+
*
|
|
2141
|
+
* Either `parcelId` or `parcelKey` must be provided.
|
|
2142
|
+
*
|
|
2143
|
+
*
|
|
2144
|
+
*/
|
|
2145
|
+
readonly parcelKey?: string;
|
|
2146
|
+
/**
|
|
2147
|
+
* Value to set.
|
|
2148
|
+
* If empty, any existing value will be removed.
|
|
2149
|
+
*
|
|
2150
|
+
*
|
|
2151
|
+
*/
|
|
2152
|
+
readonly measurements?: ParcelMeasurements;
|
|
2153
|
+
}
|
|
2154
|
+
/**
|
|
2155
|
+
* Produces the [ParcelTrackingDataUpdated](ctp:api:type:ParcelTrackingDataUpdatedMessage) Message.
|
|
2156
|
+
*
|
|
2157
|
+
*/
|
|
2158
|
+
export interface StagedOrderSetParcelTrackingDataAction {
|
|
2159
|
+
readonly action: 'setParcelTrackingData';
|
|
2160
|
+
/**
|
|
2161
|
+
* `id` of an existing [Parcel](ctp:api:type:Parcel).
|
|
2162
|
+
*
|
|
2163
|
+
* Either `parcelId` or `parcelKey` must be provided.
|
|
2164
|
+
*
|
|
2165
|
+
*
|
|
2166
|
+
*/
|
|
2167
|
+
readonly parcelId?: string;
|
|
2168
|
+
/**
|
|
2169
|
+
* `key` of an existing [Parcel](ctp:api:type:Parcel).
|
|
2170
|
+
*
|
|
2171
|
+
* Either `parcelId` or `parcelKey` must be provided.
|
|
2172
|
+
*
|
|
2173
|
+
*
|
|
2174
|
+
*/
|
|
2175
|
+
readonly parcelKey?: string;
|
|
2176
|
+
/**
|
|
2177
|
+
* Value to set.
|
|
2178
|
+
* If empty, any existing value will be removed.
|
|
2179
|
+
*
|
|
2180
|
+
*
|
|
2181
|
+
*/
|
|
2182
|
+
readonly trackingData?: TrackingData;
|
|
2183
|
+
}
|
|
2184
|
+
/**
|
|
2185
|
+
* Produces the [PurchaseOrderNumberSet](ctp:api:type:OrderPurchaseOrderNumberSetMessage) Message.
|
|
2186
|
+
*
|
|
2187
|
+
*/
|
|
2188
|
+
export interface StagedOrderSetPurchaseOrderNumberAction {
|
|
2189
|
+
readonly action: 'setPurchaseOrderNumber';
|
|
2190
|
+
/**
|
|
2191
|
+
* Value to set.
|
|
2192
|
+
*
|
|
2193
|
+
*
|
|
2194
|
+
*/
|
|
2195
|
+
readonly purchaseOrderNumber?: string;
|
|
2196
|
+
}
|
|
2197
|
+
/**
|
|
2198
|
+
* Produces the [Return Info Set](ctp:api:type:ReturnInfoSetMessage) Message.
|
|
2199
|
+
*
|
|
2200
|
+
*/
|
|
2201
|
+
export interface StagedOrderSetReturnInfoAction {
|
|
2202
|
+
readonly action: 'setReturnInfo';
|
|
2203
|
+
/**
|
|
2204
|
+
* Value to set.
|
|
2205
|
+
* If empty, any existing value will be removed.
|
|
2206
|
+
*
|
|
2207
|
+
*
|
|
2208
|
+
*/
|
|
2209
|
+
readonly items?: ReturnInfoDraft[];
|
|
2210
|
+
}
|
|
2211
|
+
export interface StagedOrderSetReturnItemCustomFieldAction {
|
|
2212
|
+
readonly action: 'setReturnItemCustomField';
|
|
2213
|
+
/**
|
|
2214
|
+
* `id` of the [ReturnItem](ctp:api:type:ReturnItem) to update. Either `returnItemId` or `returnItemKey` is required.
|
|
2215
|
+
*
|
|
2216
|
+
*
|
|
2217
|
+
*/
|
|
2218
|
+
readonly returnItemId?: string;
|
|
2219
|
+
/**
|
|
2220
|
+
* `key` of the [ReturnItem](ctp:api:type:ReturnItem) to update. Either `returnItemId` or `returnItemKey` is required.
|
|
2221
|
+
*
|
|
2222
|
+
*
|
|
2223
|
+
*/
|
|
2224
|
+
readonly returnItemKey?: string;
|
|
2225
|
+
/**
|
|
2226
|
+
* Name of the [Custom Field](/../api/projects/custom-fields).
|
|
2227
|
+
*
|
|
2228
|
+
*
|
|
2229
|
+
*/
|
|
2230
|
+
readonly name: string;
|
|
2231
|
+
/**
|
|
2232
|
+
* If `value` is absent or `null`, this field will be removed if it exists.
|
|
2233
|
+
* Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
|
|
2234
|
+
* If `value` is provided, it is set for the field defined by `name`.
|
|
2235
|
+
*
|
|
2236
|
+
*
|
|
2237
|
+
*/
|
|
2238
|
+
readonly value?: any;
|
|
2239
|
+
}
|
|
2240
|
+
export interface StagedOrderSetReturnItemCustomTypeAction {
|
|
2241
|
+
readonly action: 'setReturnItemCustomType';
|
|
2242
|
+
/**
|
|
2243
|
+
* `id` of the [ReturnItem](ctp:api:type:ReturnItem) to update. Either `returnItemId` or `returnItemKey` is required.
|
|
2244
|
+
*
|
|
2245
|
+
*
|
|
2246
|
+
*/
|
|
2247
|
+
readonly returnItemId?: string;
|
|
2248
|
+
/**
|
|
2249
|
+
* `key` of the [ReturnItem](ctp:api:type:ReturnItem) to update. Either `returnItemId` or `returnItemKey` is required.
|
|
2250
|
+
*
|
|
2251
|
+
*
|
|
2252
|
+
*/
|
|
2253
|
+
readonly returnItemKey?: string;
|
|
2254
|
+
/**
|
|
2255
|
+
* Defines the [Type](ctp:api:type:Type) that extends the Return Item with [Custom Fields](/../api/projects/custom-fields).
|
|
2256
|
+
* If absent, any existing Type and Custom Fields are removed from the Return Item.
|
|
2257
|
+
*
|
|
2258
|
+
*
|
|
2259
|
+
*/
|
|
2260
|
+
readonly type?: TypeResourceIdentifier;
|
|
2261
|
+
/**
|
|
2262
|
+
* Sets the [Custom Fields](/../api/projects/custom-fields) fields for the Return Item.
|
|
2263
|
+
*
|
|
2264
|
+
*
|
|
2265
|
+
*/
|
|
2266
|
+
readonly fields?: FieldContainer;
|
|
2267
|
+
}
|
|
2268
|
+
/**
|
|
2269
|
+
* To set a [ReturnPaymentState](ctp:api:type:ReturnPaymentState), the [Order](ctp:api:type:Order) `returnInfo` must have at least one [ReturnItem](ctp:api:type:ReturnItem).
|
|
2270
|
+
*
|
|
2271
|
+
*/
|
|
2272
|
+
export interface StagedOrderSetReturnPaymentStateAction {
|
|
2273
|
+
readonly action: 'setReturnPaymentState';
|
|
2274
|
+
/**
|
|
2275
|
+
* `id` of the [ReturnItem](ctp:api:type:ReturnItem) to update. Either `returnItemId` or `returnItemKey` is required.
|
|
2276
|
+
*
|
|
2277
|
+
*
|
|
2278
|
+
*/
|
|
2279
|
+
readonly returnItemId?: string;
|
|
2280
|
+
/**
|
|
2281
|
+
* `key` of the [ReturnItem](ctp:api:type:ReturnItem) to update. Either `returnItemId` or `returnItemKey` is required.
|
|
2282
|
+
*
|
|
2283
|
+
*
|
|
2284
|
+
*/
|
|
2285
|
+
readonly returnItemKey?: string;
|
|
2286
|
+
/**
|
|
2287
|
+
* New Payment status of the [ReturnItem](ctp:api:type:ReturnItem).
|
|
2288
|
+
*
|
|
2289
|
+
*
|
|
2290
|
+
*/
|
|
2291
|
+
readonly paymentState: ReturnPaymentState;
|
|
2292
|
+
}
|
|
2293
|
+
/**
|
|
2294
|
+
* To set a `ReturnShipmentState`, the [Order](ctp:api:type:Order) `returnInfo` must have at least one [ReturnItem](ctp:api:type:ReturnItem).
|
|
2295
|
+
*
|
|
2296
|
+
* Produces the [Order Return Shipment State Changed](ctp:api:type:OrderReturnShipmentStateChangedMessage) Message.
|
|
2297
|
+
*
|
|
2298
|
+
*/
|
|
2299
|
+
export interface StagedOrderSetReturnShipmentStateAction {
|
|
2300
|
+
readonly action: 'setReturnShipmentState';
|
|
2301
|
+
/**
|
|
2302
|
+
* `id` of the [ReturnItem](ctp:api:type:ReturnItem) to update. Either `returnItemId` or `returnItemKey` is required.
|
|
2303
|
+
*
|
|
2304
|
+
*
|
|
2305
|
+
*/
|
|
2306
|
+
readonly returnItemId?: string;
|
|
2307
|
+
/**
|
|
2308
|
+
* `key` of the [ReturnItem](ctp:api:type:ReturnItem) to update. Either `returnItemId` or `returnItemKey` is required.
|
|
2309
|
+
*
|
|
2310
|
+
*
|
|
2311
|
+
*/
|
|
2312
|
+
readonly returnItemKey?: string;
|
|
2313
|
+
/**
|
|
2314
|
+
* New shipment state of the [ReturnItem](ctp:api:type:ReturnItem).
|
|
2315
|
+
*
|
|
2316
|
+
*
|
|
2317
|
+
*/
|
|
2318
|
+
readonly shipmentState: ReturnShipmentState;
|
|
2319
|
+
}
|
|
2320
|
+
/**
|
|
2321
|
+
* This action updates the `shippingAddress` on the Order, but it does not change the shipping address on the referenced [Cart](ctp:api:type:Cart) from which the Order is created.
|
|
2322
|
+
* Also, it does not recalculate the Cart as taxes may not fit to the shipping address anymore.
|
|
2323
|
+
*
|
|
2324
|
+
* Produces the [Order Shipping Address Set](ctp:api:type:OrderShippingAddressSetMessage) Message.
|
|
2325
|
+
*
|
|
2326
|
+
*/
|
|
2327
|
+
export interface StagedOrderSetShippingAddressAction {
|
|
2328
|
+
readonly action: 'setShippingAddress';
|
|
2329
|
+
/**
|
|
2330
|
+
* Value to set.
|
|
2331
|
+
* If empty, any existing value is removed.
|
|
2332
|
+
*
|
|
2333
|
+
*
|
|
2334
|
+
*/
|
|
2335
|
+
readonly address?: _BaseAddress;
|
|
2336
|
+
}
|
|
2337
|
+
/**
|
|
2338
|
+
* Sets the shipping address and a custom Shipping Method together to prevent an inconsistent state.
|
|
2339
|
+
*
|
|
2340
|
+
*/
|
|
2341
|
+
export interface StagedOrderSetShippingAddressAndCustomShippingMethodAction {
|
|
2342
|
+
readonly action: 'setShippingAddressAndCustomShippingMethod';
|
|
2343
|
+
/**
|
|
2344
|
+
* Value to set for `shippingAddress`.
|
|
2345
|
+
*
|
|
2346
|
+
*
|
|
2347
|
+
*/
|
|
2348
|
+
readonly address: _BaseAddress;
|
|
2349
|
+
/**
|
|
2350
|
+
* Value to set.
|
|
2351
|
+
*
|
|
2352
|
+
*
|
|
2353
|
+
*/
|
|
2354
|
+
readonly shippingMethodName: string;
|
|
2355
|
+
/**
|
|
2356
|
+
* Value to set.
|
|
2357
|
+
*
|
|
2358
|
+
*
|
|
2359
|
+
*/
|
|
2360
|
+
readonly shippingRate: ShippingRateDraft;
|
|
2361
|
+
/**
|
|
2362
|
+
* Used to select a Tax Rate when the Order has the `Platform` [TaxMode](ctp:api:type:TaxMode).
|
|
2363
|
+
*
|
|
2364
|
+
*
|
|
2365
|
+
*/
|
|
2366
|
+
readonly taxCategory?: TaxCategoryResourceIdentifier;
|
|
2367
|
+
/**
|
|
2368
|
+
* An external Tax Rate can be set if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode).
|
|
2369
|
+
*
|
|
2370
|
+
*
|
|
2371
|
+
*/
|
|
2372
|
+
readonly externalTaxRate?: ExternalTaxRateDraft;
|
|
2373
|
+
}
|
|
2374
|
+
/**
|
|
2375
|
+
* Sets the shipping address and Shipping Method together to prevent an inconsistent state.
|
|
2376
|
+
*
|
|
2377
|
+
*/
|
|
2378
|
+
export interface StagedOrderSetShippingAddressAndShippingMethodAction {
|
|
2379
|
+
readonly action: 'setShippingAddressAndShippingMethod';
|
|
2380
|
+
/**
|
|
2381
|
+
* Value to set for `shippingAddress`.
|
|
2382
|
+
*
|
|
2383
|
+
*
|
|
2384
|
+
*/
|
|
2385
|
+
readonly address: _BaseAddress;
|
|
2386
|
+
/**
|
|
2387
|
+
* Value to set.
|
|
2388
|
+
*
|
|
2389
|
+
*
|
|
2390
|
+
*/
|
|
2391
|
+
readonly shippingMethod?: ShippingMethodResourceIdentifier;
|
|
2392
|
+
/**
|
|
2393
|
+
* An external Tax Rate can be set if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode).
|
|
2394
|
+
*
|
|
2395
|
+
*
|
|
2396
|
+
*/
|
|
2397
|
+
readonly externalTaxRate?: ExternalTaxRateDraft;
|
|
2398
|
+
}
|
|
2399
|
+
export interface StagedOrderSetShippingAddressCustomFieldAction {
|
|
2400
|
+
readonly action: 'setShippingAddressCustomField';
|
|
2401
|
+
/**
|
|
2402
|
+
* Name of the [Custom Field](/../api/projects/custom-fields).
|
|
2403
|
+
*
|
|
2404
|
+
*
|
|
2405
|
+
*/
|
|
2406
|
+
readonly name: string;
|
|
2407
|
+
/**
|
|
2408
|
+
* If `value` is absent or `null`, this field will be removed if it exists.
|
|
2409
|
+
* Removing a field that does not exist returns an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
|
|
2410
|
+
* If `value` is provided, it is set for the field defined by `name`.
|
|
2411
|
+
*
|
|
2412
|
+
*
|
|
2413
|
+
*/
|
|
2414
|
+
readonly value?: any;
|
|
2415
|
+
}
|
|
2416
|
+
export interface StagedOrderSetShippingAddressCustomTypeAction {
|
|
2417
|
+
readonly action: 'setShippingAddressCustomType';
|
|
2418
|
+
/**
|
|
2419
|
+
* Defines the [Type](ctp:api:type:Type) that extends the `shippingAddress` with [Custom Fields](/../api/projects/custom-fields).
|
|
2420
|
+
* If absent, any existing Type and Custom Fields are removed from the `shippingAddress`.
|
|
2421
|
+
*
|
|
2422
|
+
*
|
|
2423
|
+
*/
|
|
2424
|
+
readonly type?: TypeResourceIdentifier;
|
|
2425
|
+
/**
|
|
2426
|
+
* Sets the [Custom Fields](/../api/projects/custom-fields) fields for the `shippingAddress`.
|
|
2427
|
+
*
|
|
2428
|
+
*
|
|
2429
|
+
*/
|
|
2430
|
+
readonly fields?: FieldContainer;
|
|
2431
|
+
}
|
|
2432
|
+
export interface StagedOrderSetShippingCustomFieldAction {
|
|
2433
|
+
readonly action: 'setShippingCustomField';
|
|
2434
|
+
/**
|
|
2435
|
+
* The `shippingKey` of the [Shipping](ctp:api:type:Shipping) to customize. Used to specify which Shipping Method to customize
|
|
2436
|
+
* on a Order with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
|
|
2437
|
+
* Leave this empty to customize the one and only ShippingMethod on a `Single` ShippingMode Order.
|
|
2438
|
+
*
|
|
2439
|
+
*
|
|
2440
|
+
*/
|
|
2441
|
+
readonly shippingKey?: string;
|
|
2442
|
+
/**
|
|
2443
|
+
* Name of the [Custom Field](/../api/projects/custom-fields).
|
|
2444
|
+
*
|
|
2445
|
+
*
|
|
2446
|
+
*/
|
|
2447
|
+
readonly name: string;
|
|
2448
|
+
/**
|
|
2449
|
+
* If `value` is absent or `null`, this field will be removed if it exists.
|
|
2450
|
+
* Trying to remove a field that does not exist will fail with an [InvalidOperation](ctp:api:type:InvalidOperationError) error.
|
|
2451
|
+
* If `value` is provided, it is set for the field defined by `name`.
|
|
2452
|
+
*
|
|
2453
|
+
*
|
|
2454
|
+
*/
|
|
2455
|
+
readonly value?: any;
|
|
2456
|
+
}
|
|
2457
|
+
/**
|
|
2458
|
+
* This action sets, overwrites, or removes any existing Custom Type and Custom Fields for the Order's `shippingMethod` or `shipping`.
|
|
2459
|
+
*
|
|
2460
|
+
*/
|
|
2461
|
+
export interface StagedOrderSetShippingCustomTypeAction {
|
|
2462
|
+
readonly action: 'setShippingCustomType';
|
|
2463
|
+
/**
|
|
2464
|
+
* The `shippingKey` of the [Shipping](ctp:api:type:Shipping) to customize. Used to specify which Shipping Method to customize
|
|
2465
|
+
* on a Order with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
|
|
2466
|
+
* Leave this empty to customize the one and only ShippingMethod on a `Single` ShippingMode Order.
|
|
2467
|
+
*
|
|
2468
|
+
*
|
|
2469
|
+
*/
|
|
2470
|
+
readonly shippingKey?: string;
|
|
2471
|
+
/**
|
|
2472
|
+
* Defines the [Type](ctp:api:type:Type) that extends the specified ShippingMethod with [Custom Fields](/../api/projects/custom-fields).
|
|
2473
|
+
* If absent, any existing Type and Custom Fields are removed from the ShippingMethod.
|
|
2474
|
+
*
|
|
2475
|
+
*
|
|
2476
|
+
*/
|
|
2477
|
+
readonly type?: TypeResourceIdentifier;
|
|
2478
|
+
/**
|
|
2479
|
+
* Sets the [Custom Fields](/../api/projects/custom-fields) fields for the `shippingMethod`.
|
|
2480
|
+
*
|
|
2481
|
+
*
|
|
2482
|
+
*/
|
|
2483
|
+
readonly fields?: FieldContainer;
|
|
2484
|
+
}
|
|
2485
|
+
/**
|
|
2486
|
+
* To set the Cart's Shipping Method, the Cart must have the `Single` [ShippingMode](ctp:api:type:ShippingMode) and a `shippingAddress`.
|
|
2487
|
+
*
|
|
2488
|
+
*/
|
|
2489
|
+
export interface StagedOrderSetShippingMethodAction {
|
|
2490
|
+
readonly action: 'setShippingMethod';
|
|
2491
|
+
/**
|
|
2492
|
+
* Value to set. If empty, any existing value will be removed.
|
|
2493
|
+
* If the referenced Shipping Method has a predicate that does not match the Cart, an [InvalidOperation](ctp:api:type:InvalidOperationError) error is returned.
|
|
2494
|
+
*
|
|
2495
|
+
*
|
|
2496
|
+
*/
|
|
2497
|
+
readonly shippingMethod?: ShippingMethodResourceIdentifier;
|
|
2498
|
+
/**
|
|
2499
|
+
* An external Tax Rate can be set if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode).
|
|
2500
|
+
*
|
|
2501
|
+
*
|
|
2502
|
+
*/
|
|
2503
|
+
readonly externalTaxRate?: ExternalTaxRateDraft;
|
|
2504
|
+
}
|
|
2505
|
+
/**
|
|
2506
|
+
* A Shipping Method tax amount can be set if the Cart has the `ExternalAmount` [TaxMode](ctp:api:type:TaxMode).
|
|
2507
|
+
*
|
|
2508
|
+
*/
|
|
2509
|
+
export interface StagedOrderSetShippingMethodTaxAmountAction {
|
|
2510
|
+
readonly action: 'setShippingMethodTaxAmount';
|
|
2511
|
+
/**
|
|
2512
|
+
* `key` of the [ShippingMethod](ctp:api:type:ShippingMethod) to update. This is required for Orders with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
|
|
2513
|
+
*
|
|
2514
|
+
*
|
|
2515
|
+
*/
|
|
2516
|
+
readonly shippingKey?: string;
|
|
2517
|
+
/**
|
|
2518
|
+
* Value to set. If empty, any existing value will be removed.
|
|
2519
|
+
*
|
|
2520
|
+
*
|
|
2521
|
+
*/
|
|
2522
|
+
readonly externalTaxAmount?: ExternalTaxAmountDraft;
|
|
2523
|
+
}
|
|
2524
|
+
/**
|
|
2525
|
+
* A Shipping Method Tax Rate can be set if the Cart has the `External` [TaxMode](ctp:api:type:TaxMode).
|
|
2526
|
+
*
|
|
2527
|
+
*/
|
|
2528
|
+
export interface StagedOrderSetShippingMethodTaxRateAction {
|
|
2529
|
+
readonly action: 'setShippingMethodTaxRate';
|
|
2530
|
+
/**
|
|
2531
|
+
* `key` of the [ShippingMethod](ctp:api:type:ShippingMethod) to update. This is required for Orders with `Multiple` [ShippingMode](ctp:api:type:ShippingMode).
|
|
2532
|
+
*
|
|
2533
|
+
*
|
|
2534
|
+
*/
|
|
2535
|
+
readonly shippingKey?: string;
|
|
2536
|
+
/**
|
|
2537
|
+
* Value to set.
|
|
2538
|
+
* If empty, any existing value is removed.
|
|
2539
|
+
*
|
|
2540
|
+
*
|
|
2541
|
+
*/
|
|
2542
|
+
readonly externalTaxRate?: ExternalTaxRateDraft;
|
|
2543
|
+
}
|
|
2544
|
+
/**
|
|
2545
|
+
* Input used to select a [ShippingRatePriceTier](ctp:api:type:ShippingRatePriceTier). If no matching tier can be found, or the input is not set, the default price for the shipping rate is used.
|
|
2546
|
+
*
|
|
2547
|
+
*/
|
|
2548
|
+
export interface StagedOrderSetShippingRateInputAction {
|
|
2549
|
+
readonly action: 'setShippingRateInput';
|
|
2550
|
+
/**
|
|
2551
|
+
* The data type of this field depends on the `shippingRateInputType.type` configured in the [Project](ctp:api:type:Project):
|
|
2552
|
+
*
|
|
2553
|
+
* - If `CartClassification`, it must be [ClassificationShippingRateInputDraft](ctp:api:type:ClassificationShippingRateInputDraft).
|
|
2554
|
+
* - If `CartScore`, it must be [ScoreShippingRateInputDraft](ctp:api:type:ScoreShippingRateInputDraft).
|
|
2555
|
+
* - If `CartValue`, it cannot be set.
|
|
2556
|
+
*
|
|
2557
|
+
*
|
|
2558
|
+
*/
|
|
2559
|
+
readonly shippingRateInput?: ShippingRateInputDraft;
|
|
2560
|
+
}
|
|
2561
|
+
/**
|
|
2562
|
+
* Sets the [Store](ctp:api:type:Store) the Order is assigned to.
|
|
2563
|
+
* It should be used to migrate Orders to a new Store.
|
|
2564
|
+
* No validations are performed (such as that the Customer is allowed to create Orders in the Store).
|
|
2565
|
+
*
|
|
2566
|
+
* Produces the [Order Store Set](ctp:api:type:OrderStoreSetMessage) Message.
|
|
2567
|
+
* Returns a `400` error if `store` references the same Store the Order is currently assigned to, including if you try to remove the value when no Store is currently assigned.
|
|
2568
|
+
*
|
|
2569
|
+
*/
|
|
2570
|
+
export interface StagedOrderSetStoreAction {
|
|
2571
|
+
readonly action: 'setStore';
|
|
2572
|
+
/**
|
|
2573
|
+
* Value to set. If empty, any existing value will be removed.
|
|
2574
|
+
*
|
|
2575
|
+
* If `store` references the same Store the Order is currently assigned to or if you try to remove the value when no Store is currently assigned, a `400` error is returned.
|
|
2576
|
+
*
|
|
2577
|
+
*
|
|
2578
|
+
*/
|
|
2579
|
+
readonly store?: StoreResourceIdentifier;
|
|
2580
|
+
}
|
|
2581
|
+
/**
|
|
2582
|
+
* Produces the [Custom Line Item State Transition](ctp:api:type:CustomLineItemStateTransitionMessage) Message.
|
|
2583
|
+
*
|
|
2584
|
+
*/
|
|
2585
|
+
export interface StagedOrderTransitionCustomLineItemStateAction {
|
|
2586
|
+
readonly action: 'transitionCustomLineItemState';
|
|
2587
|
+
/**
|
|
2588
|
+
* `id` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
|
|
2589
|
+
*
|
|
2590
|
+
*
|
|
2591
|
+
*/
|
|
2592
|
+
readonly customLineItemId?: string;
|
|
2593
|
+
/**
|
|
2594
|
+
* `key` of the [CustomLineItem](ctp:api:type:CustomLineItem) to update. Either `customLineItemId` or `customLineItemKey` is required.
|
|
2595
|
+
*
|
|
2596
|
+
*
|
|
2597
|
+
*/
|
|
2598
|
+
readonly customLineItemKey?: string;
|
|
2599
|
+
/**
|
|
2600
|
+
* Number of Custom Line Items that should transition [State](ctp:api:type:State).
|
|
2601
|
+
*
|
|
2602
|
+
*
|
|
2603
|
+
*/
|
|
2604
|
+
readonly quantity: number;
|
|
2605
|
+
/**
|
|
2606
|
+
* [State](ctp:api:type:State) the Custom Line Item should transition from.
|
|
2607
|
+
*
|
|
2608
|
+
*
|
|
2609
|
+
*/
|
|
2610
|
+
readonly fromState: StateResourceIdentifier;
|
|
2611
|
+
/**
|
|
2612
|
+
* [State](ctp:api:type:State) the Custom Line Item should transition to.
|
|
2613
|
+
*
|
|
2614
|
+
*
|
|
2615
|
+
*/
|
|
2616
|
+
readonly toState: StateResourceIdentifier;
|
|
2617
|
+
/**
|
|
2618
|
+
* Date and time (UTC) to perform the [State](ctp:api:type:State) transition.
|
|
2619
|
+
*
|
|
2620
|
+
*
|
|
2621
|
+
*/
|
|
2622
|
+
readonly actualTransitionDate?: string;
|
|
2623
|
+
}
|
|
2624
|
+
/**
|
|
2625
|
+
* Produces the [Line Item State Transition](ctp:api:type:LineItemStateTransitionMessage) Message.
|
|
2626
|
+
*
|
|
2627
|
+
*/
|
|
2628
|
+
export interface StagedOrderTransitionLineItemStateAction {
|
|
2629
|
+
readonly action: 'transitionLineItemState';
|
|
2630
|
+
/**
|
|
2631
|
+
* `id` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
2632
|
+
*
|
|
2633
|
+
*
|
|
2634
|
+
*/
|
|
2635
|
+
readonly lineItemId?: string;
|
|
2636
|
+
/**
|
|
2637
|
+
* `key` of the [LineItem](ctp:api:type:LineItem) to update. Either `lineItemId` or `lineItemKey` is required.
|
|
2638
|
+
*
|
|
2639
|
+
*
|
|
2640
|
+
*/
|
|
2641
|
+
readonly lineItemKey?: string;
|
|
2642
|
+
/**
|
|
2643
|
+
* Number of Line Items that should transition [State](ctp:api:type:State).
|
|
2644
|
+
*
|
|
2645
|
+
*
|
|
2646
|
+
*/
|
|
2647
|
+
readonly quantity: number;
|
|
2648
|
+
/**
|
|
2649
|
+
* [State](ctp:api:type:State) the Line Item should transition from.
|
|
2650
|
+
*
|
|
2651
|
+
*
|
|
2652
|
+
*/
|
|
2653
|
+
readonly fromState: StateResourceIdentifier;
|
|
2654
|
+
/**
|
|
2655
|
+
* [State](ctp:api:type:State) the Line Item should transition to.
|
|
2656
|
+
*
|
|
2657
|
+
*
|
|
2658
|
+
*/
|
|
2659
|
+
readonly toState: StateResourceIdentifier;
|
|
2660
|
+
/**
|
|
2661
|
+
* Date and time (UTC) to perform the [State](ctp:api:type:State) transition.
|
|
2662
|
+
*
|
|
2663
|
+
*
|
|
2664
|
+
*/
|
|
2665
|
+
readonly actualTransitionDate?: string;
|
|
2666
|
+
}
|
|
2667
|
+
/**
|
|
2668
|
+
* If the existing [State](ctp:api:type:State) has set `transitions`, there must be a direct transition to the new State. If `transitions` is not set, no validation is performed.
|
|
2669
|
+
*
|
|
2670
|
+
* This update action produces the [Order State Transition](ctp:api:type:OrderStateTransitionMessage) Message.
|
|
2671
|
+
*
|
|
2672
|
+
*/
|
|
2673
|
+
export interface StagedOrderTransitionStateAction {
|
|
2674
|
+
readonly action: 'transitionState';
|
|
2675
|
+
/**
|
|
2676
|
+
* Value to set.
|
|
2677
|
+
* If there is no State yet, the new State must be an initial State.
|
|
2678
|
+
*
|
|
2679
|
+
*
|
|
2680
|
+
*/
|
|
2681
|
+
readonly state: StateResourceIdentifier;
|
|
2682
|
+
/**
|
|
2683
|
+
* Set to `true` to turn off validation.
|
|
2684
|
+
*
|
|
2685
|
+
*
|
|
2686
|
+
*/
|
|
2687
|
+
readonly force?: boolean;
|
|
2688
|
+
}
|
|
2689
|
+
/**
|
|
2690
|
+
* Updates an address in `itemShippingAddresses` by keeping the Address `key`.
|
|
2691
|
+
*
|
|
2692
|
+
*/
|
|
2693
|
+
export interface StagedOrderUpdateItemShippingAddressAction {
|
|
2694
|
+
readonly action: 'updateItemShippingAddress';
|
|
2695
|
+
/**
|
|
2696
|
+
* The new Address with the same `key` as the Address it will replace.
|
|
2697
|
+
*
|
|
2698
|
+
*
|
|
2699
|
+
*/
|
|
2700
|
+
readonly address: _BaseAddress;
|
|
2701
|
+
}
|
|
2702
|
+
export interface StagedOrderUpdateSyncInfoAction {
|
|
2703
|
+
readonly action: 'updateSyncInfo';
|
|
2704
|
+
/**
|
|
2705
|
+
* Set this to identify an external order instance, file, or other resource.
|
|
2706
|
+
*
|
|
2707
|
+
*
|
|
2708
|
+
*/
|
|
2709
|
+
readonly externalId?: string;
|
|
2710
|
+
/**
|
|
2711
|
+
* The synchronization destination to set. Must not be empty.
|
|
2712
|
+
* The referenced Channel must have the [Channel Role](ctp:api:type:ChannelRoleEnum) `OrderExport` or `OrderImport`.
|
|
2713
|
+
* Otherwise this update action returns an [InvalidInput](ctp:api:type:InvalidInputError) error.
|
|
2714
|
+
*
|
|
2715
|
+
*
|
|
2716
|
+
*/
|
|
2717
|
+
readonly channel: ChannelResourceIdentifier;
|
|
2718
|
+
/**
|
|
2719
|
+
* If not set, it defaults to the current date and time.
|
|
2720
|
+
*
|
|
2721
|
+
*
|
|
2722
|
+
*/
|
|
2723
|
+
readonly syncedAt?: string;
|
|
2724
|
+
}
|
|
2725
|
+
//# sourceMappingURL=order-edit.d.ts.map
|