Skip to content

Commit a77ee7f

Browse files
committed
build(codegen): updating SDK
1 parent 18ea89e commit a77ee7f

File tree

8 files changed

+110
-81
lines changed

8 files changed

+110
-81
lines changed

changes.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,22 @@
99
</details>
1010

1111

12+
<details>
13+
<summary>Required Property(s)</summary>
14+
15+
- :warning: changed property `triggerPattern` of type `CartDiscountPatternTarget` to be required
16+
</details>
17+
18+
19+
<details>
20+
<summary>Added Property(s)</summary>
21+
22+
- added property `inheritedStores` to type `BusinessUnit`
23+
- added property `inheritedStores` to type `Company`
24+
- added property `inheritedStores` to type `Division`
25+
</details>
26+
27+
1228
<details>
1329
<summary>Added Method(s)</summary>
1430

@@ -25,21 +41,19 @@
2541
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().withId().delete()`
2642
</details>
2743

44+
**History changes**
2845

2946
<details>
30-
<summary>Added Property(s)</summary>
47+
<summary>Changed Property(s)</summary>
3148

32-
- added property `inheritedStores` to type `BusinessUnit`
33-
- added property `inheritedStores` to type `Company`
34-
- added property `inheritedStores` to type `Division`
49+
- :warning: changed property `extensions` of type `GraphQLError` from type `GraphQLErrorObject` to `object`
3550
</details>
3651

37-
**History changes**
3852

3953
<details>
40-
<summary>Changed Property(s)</summary>
54+
<summary>Required Property(s)</summary>
4155

42-
- :warning: changed property `extensions` of type `GraphQLError` from type `GraphQLErrorObject` to `object`
56+
- :warning: changed property `triggerPattern` of type `ChangeTargetPatternChangeValue` to be required
4357
</details>
4458

4559

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscountPatternTarget.java

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
* <div class=code-example>
2626
* <pre><code class='java'>
2727
* CartDiscountPatternTarget cartDiscountPatternTarget = CartDiscountPatternTarget.builder()
28+
* .plusTriggerPattern(triggerPatternBuilder -> triggerPatternBuilder)
2829
* .plusTargetPattern(targetPatternBuilder -> targetPatternBuilder)
2930
* .selectionMode(SelectionMode.CHEAPEST)
3031
* .build()
@@ -41,18 +42,20 @@ public interface CartDiscountPatternTarget extends CartDiscountTarget {
4142
String PATTERN = "pattern";
4243

4344
/**
44-
* <p>Units of a (Custom) Line Item that trigger a discount application.</p>
45-
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, effecting the number of times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
46-
* <p>If empty or not set, the Discount will apply indefinitely.</p>
45+
* <p>Defines the set of units of (Custom) Line Items in a Cart that trigger a discount application.</p>
46+
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, limiting the number of maximum times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
47+
* <p>If empty, the Discount will apply indefinitely.</p>
4748
* @return triggerPattern
4849
*/
50+
@NotNull
4951
@Valid
5052
@JsonProperty("triggerPattern")
5153
public List<PatternComponent> getTriggerPattern();
5254

5355
/**
54-
* <p>Units of (Custom) Line Items on which the Discount is applied.</p>
56+
* <p>Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.</p>
5557
* <p>Based on the availability of matching units and the limits from the <code>triggerPattern</code> or <code>maxOccurence</code>, the <code>targetPattern</code> can match multiple times.</p>
58+
* <p>This array cannot be empty.</p>
5659
* @return targetPattern
5760
*/
5861
@NotNull
@@ -78,36 +81,38 @@ public interface CartDiscountPatternTarget extends CartDiscountTarget {
7881
public SelectionMode getSelectionMode();
7982

8083
/**
81-
* <p>Units of a (Custom) Line Item that trigger a discount application.</p>
82-
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, effecting the number of times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
83-
* <p>If empty or not set, the Discount will apply indefinitely.</p>
84+
* <p>Defines the set of units of (Custom) Line Items in a Cart that trigger a discount application.</p>
85+
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, limiting the number of maximum times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
86+
* <p>If empty, the Discount will apply indefinitely.</p>
8487
* @param triggerPattern values to be set
8588
*/
8689

8790
@JsonIgnore
8891
public void setTriggerPattern(final PatternComponent... triggerPattern);
8992

9093
/**
91-
* <p>Units of a (Custom) Line Item that trigger a discount application.</p>
92-
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, effecting the number of times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
93-
* <p>If empty or not set, the Discount will apply indefinitely.</p>
94+
* <p>Defines the set of units of (Custom) Line Items in a Cart that trigger a discount application.</p>
95+
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, limiting the number of maximum times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
96+
* <p>If empty, the Discount will apply indefinitely.</p>
9497
* @param triggerPattern values to be set
9598
*/
9699

97100
public void setTriggerPattern(final List<PatternComponent> triggerPattern);
98101

99102
/**
100-
* <p>Units of (Custom) Line Items on which the Discount is applied.</p>
103+
* <p>Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.</p>
101104
* <p>Based on the availability of matching units and the limits from the <code>triggerPattern</code> or <code>maxOccurence</code>, the <code>targetPattern</code> can match multiple times.</p>
105+
* <p>This array cannot be empty.</p>
102106
* @param targetPattern values to be set
103107
*/
104108

105109
@JsonIgnore
106110
public void setTargetPattern(final PatternComponent... targetPattern);
107111

108112
/**
109-
* <p>Units of (Custom) Line Items on which the Discount is applied.</p>
113+
* <p>Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.</p>
110114
* <p>Based on the availability of matching units and the limits from the <code>triggerPattern</code> or <code>maxOccurence</code>, the <code>targetPattern</code> can match multiple times.</p>
115+
* <p>This array cannot be empty.</p>
111116
* @param targetPattern values to be set
112117
*/
113118

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart_discount/CartDiscountPatternTargetBuilder.java

Lines changed: 35 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* <div class=code-example>
1717
* <pre><code class='java'>
1818
* CartDiscountPatternTarget cartDiscountPatternTarget = CartDiscountPatternTarget.builder()
19+
* .plusTriggerPattern(triggerPatternBuilder -> triggerPatternBuilder)
1920
* .plusTargetPattern(targetPatternBuilder -> targetPatternBuilder)
2021
* .selectionMode(SelectionMode.CHEAPEST)
2122
* .build()
@@ -25,7 +26,6 @@
2526
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
2627
public class CartDiscountPatternTargetBuilder implements Builder<CartDiscountPatternTarget> {
2728

28-
@Nullable
2929
private java.util.List<com.commercetools.api.models.cart_discount.PatternComponent> triggerPattern;
3030

3131
private java.util.List<com.commercetools.api.models.cart_discount.PatternComponent> targetPattern;
@@ -36,43 +36,43 @@ public class CartDiscountPatternTargetBuilder implements Builder<CartDiscountPat
3636
private com.commercetools.api.models.cart_discount.SelectionMode selectionMode;
3737

3838
/**
39-
* <p>Units of a (Custom) Line Item that trigger a discount application.</p>
40-
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, effecting the number of times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
41-
* <p>If empty or not set, the Discount will apply indefinitely.</p>
39+
* <p>Defines the set of units of (Custom) Line Items in a Cart that trigger a discount application.</p>
40+
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, limiting the number of maximum times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
41+
* <p>If empty, the Discount will apply indefinitely.</p>
4242
* @param triggerPattern value to be set
4343
* @return Builder
4444
*/
4545

4646
public CartDiscountPatternTargetBuilder triggerPattern(
47-
@Nullable final com.commercetools.api.models.cart_discount.PatternComponent... triggerPattern) {
47+
final com.commercetools.api.models.cart_discount.PatternComponent... triggerPattern) {
4848
this.triggerPattern = new ArrayList<>(Arrays.asList(triggerPattern));
4949
return this;
5050
}
5151

5252
/**
53-
* <p>Units of a (Custom) Line Item that trigger a discount application.</p>
54-
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, effecting the number of times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
55-
* <p>If empty or not set, the Discount will apply indefinitely.</p>
53+
* <p>Defines the set of units of (Custom) Line Items in a Cart that trigger a discount application.</p>
54+
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, limiting the number of maximum times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
55+
* <p>If empty, the Discount will apply indefinitely.</p>
5656
* @param triggerPattern value to be set
5757
* @return Builder
5858
*/
5959

6060
public CartDiscountPatternTargetBuilder triggerPattern(
61-
@Nullable final java.util.List<com.commercetools.api.models.cart_discount.PatternComponent> triggerPattern) {
61+
final java.util.List<com.commercetools.api.models.cart_discount.PatternComponent> triggerPattern) {
6262
this.triggerPattern = triggerPattern;
6363
return this;
6464
}
6565

6666
/**
67-
* <p>Units of a (Custom) Line Item that trigger a discount application.</p>
68-
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, effecting the number of times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
69-
* <p>If empty or not set, the Discount will apply indefinitely.</p>
67+
* <p>Defines the set of units of (Custom) Line Items in a Cart that trigger a discount application.</p>
68+
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, limiting the number of maximum times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
69+
* <p>If empty, the Discount will apply indefinitely.</p>
7070
* @param triggerPattern value to be set
7171
* @return Builder
7272
*/
7373

7474
public CartDiscountPatternTargetBuilder plusTriggerPattern(
75-
@Nullable final com.commercetools.api.models.cart_discount.PatternComponent... triggerPattern) {
75+
final com.commercetools.api.models.cart_discount.PatternComponent... triggerPattern) {
7676
if (this.triggerPattern == null) {
7777
this.triggerPattern = new ArrayList<>();
7878
}
@@ -81,9 +81,9 @@ public CartDiscountPatternTargetBuilder plusTriggerPattern(
8181
}
8282

8383
/**
84-
* <p>Units of a (Custom) Line Item that trigger a discount application.</p>
85-
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, effecting the number of times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
86-
* <p>If empty or not set, the Discount will apply indefinitely.</p>
84+
* <p>Defines the set of units of (Custom) Line Items in a Cart that trigger a discount application.</p>
85+
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, limiting the number of maximum times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
86+
* <p>If empty, the Discount will apply indefinitely.</p>
8787
* @param builder function to build the triggerPattern value
8888
* @return Builder
8989
*/
@@ -99,9 +99,9 @@ public CartDiscountPatternTargetBuilder plusTriggerPattern(
9999
}
100100

101101
/**
102-
* <p>Units of a (Custom) Line Item that trigger a discount application.</p>
103-
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, effecting the number of times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
104-
* <p>If empty or not set, the Discount will apply indefinitely.</p>
102+
* <p>Defines the set of units of (Custom) Line Items in a Cart that trigger a discount application.</p>
103+
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, limiting the number of maximum times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
104+
* <p>If empty, the Discount will apply indefinitely.</p>
105105
* @param builder function to build the triggerPattern value
106106
* @return Builder
107107
*/
@@ -115,8 +115,9 @@ public CartDiscountPatternTargetBuilder withTriggerPattern(
115115
}
116116

117117
/**
118-
* <p>Units of (Custom) Line Items on which the Discount is applied.</p>
118+
* <p>Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.</p>
119119
* <p>Based on the availability of matching units and the limits from the <code>triggerPattern</code> or <code>maxOccurence</code>, the <code>targetPattern</code> can match multiple times.</p>
120+
* <p>This array cannot be empty.</p>
120121
* @param targetPattern value to be set
121122
* @return Builder
122123
*/
@@ -128,8 +129,9 @@ public CartDiscountPatternTargetBuilder targetPattern(
128129
}
129130

130131
/**
131-
* <p>Units of (Custom) Line Items on which the Discount is applied.</p>
132+
* <p>Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.</p>
132133
* <p>Based on the availability of matching units and the limits from the <code>triggerPattern</code> or <code>maxOccurence</code>, the <code>targetPattern</code> can match multiple times.</p>
134+
* <p>This array cannot be empty.</p>
133135
* @param targetPattern value to be set
134136
* @return Builder
135137
*/
@@ -141,8 +143,9 @@ public CartDiscountPatternTargetBuilder targetPattern(
141143
}
142144

143145
/**
144-
* <p>Units of (Custom) Line Items on which the Discount is applied.</p>
146+
* <p>Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.</p>
145147
* <p>Based on the availability of matching units and the limits from the <code>triggerPattern</code> or <code>maxOccurence</code>, the <code>targetPattern</code> can match multiple times.</p>
148+
* <p>This array cannot be empty.</p>
146149
* @param targetPattern value to be set
147150
* @return Builder
148151
*/
@@ -157,8 +160,9 @@ public CartDiscountPatternTargetBuilder plusTargetPattern(
157160
}
158161

159162
/**
160-
* <p>Units of (Custom) Line Items on which the Discount is applied.</p>
163+
* <p>Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.</p>
161164
* <p>Based on the availability of matching units and the limits from the <code>triggerPattern</code> or <code>maxOccurence</code>, the <code>targetPattern</code> can match multiple times.</p>
165+
* <p>This array cannot be empty.</p>
162166
* @param builder function to build the targetPattern value
163167
* @return Builder
164168
*/
@@ -174,8 +178,9 @@ public CartDiscountPatternTargetBuilder plusTargetPattern(
174178
}
175179

176180
/**
177-
* <p>Units of (Custom) Line Items on which the Discount is applied.</p>
181+
* <p>Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.</p>
178182
* <p>Based on the availability of matching units and the limits from the <code>triggerPattern</code> or <code>maxOccurence</code>, the <code>targetPattern</code> can match multiple times.</p>
183+
* <p>This array cannot be empty.</p>
179184
* @param builder function to build the targetPattern value
180185
* @return Builder
181186
*/
@@ -213,20 +218,20 @@ public CartDiscountPatternTargetBuilder selectionMode(
213218
}
214219

215220
/**
216-
* <p>Units of a (Custom) Line Item that trigger a discount application.</p>
217-
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, effecting the number of times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
218-
* <p>If empty or not set, the Discount will apply indefinitely.</p>
221+
* <p>Defines the set of units of (Custom) Line Items in a Cart that trigger a discount application.</p>
222+
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, limiting the number of maximum times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
223+
* <p>If empty, the Discount will apply indefinitely.</p>
219224
* @return triggerPattern
220225
*/
221226

222-
@Nullable
223227
public java.util.List<com.commercetools.api.models.cart_discount.PatternComponent> getTriggerPattern() {
224228
return this.triggerPattern;
225229
}
226230

227231
/**
228-
* <p>Units of (Custom) Line Items on which the Discount is applied.</p>
232+
* <p>Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.</p>
229233
* <p>Based on the availability of matching units and the limits from the <code>triggerPattern</code> or <code>maxOccurence</code>, the <code>targetPattern</code> can match multiple times.</p>
234+
* <p>This array cannot be empty.</p>
230235
* @return targetPattern
231236
*/
232237

@@ -259,6 +264,7 @@ public com.commercetools.api.models.cart_discount.SelectionMode getSelectionMode
259264
* @return CartDiscountPatternTarget
260265
*/
261266
public CartDiscountPatternTarget build() {
267+
Objects.requireNonNull(triggerPattern, CartDiscountPatternTarget.class + ": triggerPattern is missing");
262268
Objects.requireNonNull(targetPattern, CartDiscountPatternTarget.class + ": targetPattern is missing");
263269
Objects.requireNonNull(selectionMode, CartDiscountPatternTarget.class + ": selectionMode is missing");
264270
return new CartDiscountPatternTargetImpl(triggerPattern, targetPattern, maxOccurrence, selectionMode);

0 commit comments

Comments
 (0)