Skip to content

Commit ad43566

Browse files
authored
Prepare release 2.22.0
Prepare release 2.22.0
2 parents 3f40421 + 801ac4f commit ad43566

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

src/main/groovy/life/qbic/datamodel/dtos/business/ProductItem.groovy

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ class ProductItem {
4040
*/
4141
final double quantityDiscount
4242

43+
/**
44+
* Stores the latest position on the offer.
45+
*
46+
* A negative value indicates no specific position was stored in the item.
47+
*/
48+
private int offerPosition = -1
49+
4350
/**
4451
*
4552
* @param quantity The quantity of a product
@@ -70,5 +77,27 @@ class ProductItem {
7077
this.quantityDiscount = quantityDiscount
7178
}
7279

80+
/**
81+
* Sets the position information on the offer the item should be placed
82+
*
83+
* A negative value indicates no positional information.
84+
* @param position a positive value >= 0 indicating a position on the offer
85+
* @since 2.22.0
86+
*/
87+
void setOrderPosition(int position) {
88+
offerPosition = position
89+
}
90+
91+
/**
92+
* The position on the offer.
93+
*
94+
* Is negative, if no positional information is available.
95+
* @return
96+
* @since 2.22.0
97+
*/
98+
int offerPosition() {
99+
return offerPosition
100+
}
101+
73102

74103
}

0 commit comments

Comments
 (0)