diff --git a/src/main/groovy/life/qbic/datamodel/dtos/business/ProductItem.groovy b/src/main/groovy/life/qbic/datamodel/dtos/business/ProductItem.groovy index 45f710b58..e22298e87 100644 --- a/src/main/groovy/life/qbic/datamodel/dtos/business/ProductItem.groovy +++ b/src/main/groovy/life/qbic/datamodel/dtos/business/ProductItem.groovy @@ -40,6 +40,13 @@ class ProductItem { */ final double quantityDiscount + /** + * Stores the latest position on the offer. + * + * A negative value indicates no specific position was stored in the item. + */ + private int offerPosition = -1 + /** * * @param quantity The quantity of a product @@ -70,5 +77,27 @@ class ProductItem { this.quantityDiscount = quantityDiscount } + /** + * Sets the position information on the offer the item should be placed + * + * A negative value indicates no positional information. + * @param position a positive value >= 0 indicating a position on the offer + * @since 2.22.0 + */ + void setOrderPosition(int position) { + offerPosition = position + } + + /** + * The position on the offer. + * + * Is negative, if no positional information is available. + * @return + * @since 2.22.0 + */ + int offerPosition() { + return offerPosition + } + }