Skip to content

Commit 3ba4583

Browse files
Merge pull request #629 from commercetools/gen-sdk-updates
Update generated SDKs
2 parents c88df19 + f215aca commit 3ba4583

File tree

10 files changed

+199
-84
lines changed

10 files changed

+199
-84
lines changed

changes.md

Lines changed: 6 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,17 @@
1-
**Api changes**
2-
3-
<details>
4-
<summary>Changed Property(s)</summary>
5-
6-
- :warning: changed property `custom` of type `MyBusinessUnitDraft` from type `CustomFields` to `CustomFieldsDraft`
7-
- :warning: changed property `custom` of type `MyCompanyDraft` from type `CustomFields` to `CustomFieldsDraft`
8-
- :warning: changed property `custom` of type `MyDivisionDraft` from type `CustomFields` to `CustomFieldsDraft`
9-
</details>
10-
11-
12-
<details>
13-
<summary>Added Property(s)</summary>
14-
15-
- added property `attributedTo` to type `CreatedBy`
16-
- added property `attributedTo` to type `LastModifiedBy`
17-
- added property `postFilter` to type `ProductSearchRequest`
18-
</details>
19-
20-
21-
<details>
22-
<summary>Required Property(s)</summary>
23-
24-
- :warning: changed property `stores` of type `BusinessUnit` to be required
25-
- :warning: changed property `stores` of type `Company` to be required
26-
- :warning: changed property `stores` of type `Division` to be required
27-
- :warning: changed property `stores` of type `BusinessUnitSetStoresAction` to be required
28-
- :warning: changed property `stores` of type `CartDiscountSetStoresAction` to be required
29-
- :warning: changed property `stores` of type `Customer` to be required
30-
- :warning: changed property `stores` of type `CustomerSetStoresAction` to be required
31-
</details>
32-
33-
34-
<details>
35-
<summary>Added Type(s)</summary>
36-
37-
- added type `Attribution`
38-
- added type `AttributionSource`
39-
</details>
40-
41-
42-
<details>
43-
<summary>Removed Method(s)</summary>
44-
45-
- :warning: removed method `apiRoot.withProjectKey().products().search().head()`
46-
</details>
47-
481
**Import changes**
492

503
<details>
51-
<summary>Added Resource(s)</summary>
52-
53-
- added resource `/{projectKey}/discount-codes`
54-
- added resource `/{projectKey}/discount-codes/import-containers`
55-
- added resource `/{projectKey}/discount-codes/import-containers/{importContainerKey}`
56-
</details>
57-
58-
59-
<details>
60-
<summary>Added Method(s)</summary>
4+
<summary>MarkDeprecated Property(s)</summary>
615

62-
- added method `apiRoot.withProjectKeyValue().discountCodes().importContainers().withImportContainerKeyValue().post()`
6+
- marked property `PriceImport::publish` as deprecated
7+
- marked property `ProductVariantImport::publish` as deprecated
638
</details>
649

6510

6611
<details>
67-
<summary>Added Type(s)</summary>
68-
69-
- added type `DiscountCodeImportRequest`
70-
- added type `DiscountCodeImport`
71-
</details>
72-
73-
74-
<details>
75-
<summary>Added Enum(s)</summary>
12+
<summary>Added Property(s)</summary>
7613

77-
- added enum `discount-code` to type `ImportResourceType`
14+
- added property `staged` to type `PriceImport`
15+
- added property `staged` to type `ProductVariantImport`
7816
</details>
7917

commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/prices/PriceImport.java

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,21 @@ public interface PriceImport extends ImportResource {
114114
* <p>Only the Embedded Price updates will be published to <code>staged</code> and <code>current</code> projection.</p>
115115
* @return publish
116116
*/
117-
117+
@Deprecated
118118
@JsonProperty("publish")
119119
public Boolean getPublish();
120120

121+
/**
122+
* <ul>
123+
* <li>Set to <code>false</code> to update both the current and staged projections of the Product with the new Price data.</li>
124+
* <li>Leave empty or set to <code>true</code> to only update the staged projection.</li>
125+
* </ul>
126+
* @return staged
127+
*/
128+
129+
@JsonProperty("staged")
130+
public Boolean getStaged();
131+
121132
/**
122133
* <p>The tiered prices for this price.</p>
123134
* @return tiers
@@ -212,9 +223,19 @@ public interface PriceImport extends ImportResource {
212223
* <p>Only the Embedded Price updates will be published to <code>staged</code> and <code>current</code> projection.</p>
213224
* @param publish value to be set
214225
*/
215-
226+
@Deprecated
216227
public void setPublish(final Boolean publish);
217228

229+
/**
230+
* <ul>
231+
* <li>Set to <code>false</code> to update both the current and staged projections of the Product with the new Price data.</li>
232+
* <li>Leave empty or set to <code>true</code> to only update the staged projection.</li>
233+
* </ul>
234+
* @param staged value to be set
235+
*/
236+
237+
public void setStaged(final Boolean staged);
238+
218239
/**
219240
* <p>The tiered prices for this price.</p>
220241
* @param tiers values to be set
@@ -275,6 +296,7 @@ public static PriceImport of(final PriceImport template) {
275296
instance.setChannel(template.getChannel());
276297
instance.setDiscounted(template.getDiscounted());
277298
instance.setPublish(template.getPublish());
299+
instance.setStaged(template.getStaged());
278300
instance.setTiers(template.getTiers());
279301
instance.setCustom(template.getCustom());
280302
instance.setProductVariant(template.getProductVariant());
@@ -305,6 +327,7 @@ public static PriceImport deepCopy(@Nullable final PriceImport template) {
305327
instance.setDiscounted(
306328
com.commercetools.importapi.models.common.DiscountedPrice.deepCopy(template.getDiscounted()));
307329
instance.setPublish(template.getPublish());
330+
instance.setStaged(template.getStaged());
308331
instance.setTiers(Optional.ofNullable(template.getTiers())
309332
.map(t -> t.stream()
310333
.map(com.commercetools.importapi.models.common.PriceTier::deepCopy)

commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/prices/PriceImportBuilder.java

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,13 @@ public class PriceImportBuilder implements Builder<PriceImport> {
4949
@Nullable
5050
private com.commercetools.importapi.models.common.DiscountedPrice discounted;
5151

52+
@Deprecated
5253
@Nullable
5354
private Boolean publish;
5455

56+
@Nullable
57+
private Boolean staged;
58+
5559
@Nullable
5660
private java.util.List<com.commercetools.importapi.models.common.PriceTier> tiers;
5761

@@ -245,12 +249,26 @@ public PriceImportBuilder discounted(
245249
* @param publish value to be set
246250
* @return Builder
247251
*/
248-
252+
@Deprecated
249253
public PriceImportBuilder publish(@Nullable final Boolean publish) {
250254
this.publish = publish;
251255
return this;
252256
}
253257

258+
/**
259+
* <ul>
260+
* <li>Set to <code>false</code> to update both the current and staged projections of the Product with the new Price data.</li>
261+
* <li>Leave empty or set to <code>true</code> to only update the staged projection.</li>
262+
* </ul>
263+
* @param staged value to be set
264+
* @return Builder
265+
*/
266+
267+
public PriceImportBuilder staged(@Nullable final Boolean staged) {
268+
this.staged = staged;
269+
return this;
270+
}
271+
254272
/**
255273
* <p>The tiered prices for this price.</p>
256274
* @param tiers value to be set
@@ -529,12 +547,25 @@ public com.commercetools.importapi.models.common.DiscountedPrice getDiscounted()
529547
* <p>Only the Embedded Price updates will be published to <code>staged</code> and <code>current</code> projection.</p>
530548
* @return publish
531549
*/
532-
550+
@Deprecated
533551
@Nullable
534552
public Boolean getPublish() {
535553
return this.publish;
536554
}
537555

556+
/**
557+
* <ul>
558+
* <li>Set to <code>false</code> to update both the current and staged projections of the Product with the new Price data.</li>
559+
* <li>Leave empty or set to <code>true</code> to only update the staged projection.</li>
560+
* </ul>
561+
* @return staged
562+
*/
563+
564+
@Nullable
565+
public Boolean getStaged() {
566+
return this.staged;
567+
}
568+
538569
/**
539570
* <p>The tiered prices for this price.</p>
540571
* @return tiers
@@ -583,7 +614,7 @@ public PriceImport build() {
583614
Objects.requireNonNull(productVariant, PriceImport.class + ": productVariant is missing");
584615
Objects.requireNonNull(product, PriceImport.class + ": product is missing");
585616
return new PriceImportImpl(key, value, country, validFrom, validUntil, customerGroup, channel, discounted,
586-
publish, tiers, custom, productVariant, product);
617+
publish, staged, tiers, custom, productVariant, product);
587618
}
588619

589620
/**
@@ -592,7 +623,7 @@ public PriceImport build() {
592623
*/
593624
public PriceImport buildUnchecked() {
594625
return new PriceImportImpl(key, value, country, validFrom, validUntil, customerGroup, channel, discounted,
595-
publish, tiers, custom, productVariant, product);
626+
publish, staged, tiers, custom, productVariant, product);
596627
}
597628

598629
/**
@@ -619,6 +650,7 @@ public static PriceImportBuilder of(final PriceImport template) {
619650
builder.channel = template.getChannel();
620651
builder.discounted = template.getDiscounted();
621652
builder.publish = template.getPublish();
653+
builder.staged = template.getStaged();
622654
builder.tiers = template.getTiers();
623655
builder.custom = template.getCustom();
624656
builder.productVariant = template.getProductVariant();

commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/prices/PriceImportImpl.java

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,11 @@ public class PriceImportImpl implements PriceImport, ModelBase {
3838

3939
private com.commercetools.importapi.models.common.DiscountedPrice discounted;
4040

41+
@Deprecated
4142
private Boolean publish;
4243

44+
private Boolean staged;
45+
4346
private java.util.List<com.commercetools.importapi.models.common.PriceTier> tiers;
4447

4548
private com.commercetools.importapi.models.customfields.Custom custom;
@@ -60,7 +63,7 @@ public class PriceImportImpl implements PriceImport, ModelBase {
6063
@JsonProperty("customerGroup") final com.commercetools.importapi.models.common.CustomerGroupKeyReference customerGroup,
6164
@JsonProperty("channel") final com.commercetools.importapi.models.common.ChannelKeyReference channel,
6265
@JsonProperty("discounted") final com.commercetools.importapi.models.common.DiscountedPrice discounted,
63-
@JsonProperty("publish") final Boolean publish,
66+
@JsonProperty("publish") final Boolean publish, @JsonProperty("staged") final Boolean staged,
6467
@JsonProperty("tiers") final java.util.List<com.commercetools.importapi.models.common.PriceTier> tiers,
6568
@JsonProperty("custom") final com.commercetools.importapi.models.customfields.Custom custom,
6669
@JsonProperty("productVariant") final com.commercetools.importapi.models.common.ProductVariantKeyReference productVariant,
@@ -74,6 +77,7 @@ public class PriceImportImpl implements PriceImport, ModelBase {
7477
this.channel = channel;
7578
this.discounted = discounted;
7679
this.publish = publish;
80+
this.staged = staged;
7781
this.tiers = tiers;
7882
this.custom = custom;
7983
this.productVariant = productVariant;
@@ -153,11 +157,22 @@ public com.commercetools.importapi.models.common.DiscountedPrice getDiscounted()
153157
/**
154158
* <p>Only the Embedded Price updates will be published to <code>staged</code> and <code>current</code> projection.</p>
155159
*/
156-
160+
@Deprecated
157161
public Boolean getPublish() {
158162
return this.publish;
159163
}
160164

165+
/**
166+
* <ul>
167+
* <li>Set to <code>false</code> to update both the current and staged projections of the Product with the new Price data.</li>
168+
* <li>Leave empty or set to <code>true</code> to only update the staged projection.</li>
169+
* </ul>
170+
*/
171+
172+
public Boolean getStaged() {
173+
return this.staged;
174+
}
175+
161176
/**
162177
* <p>The tiered prices for this price.</p>
163178
*/
@@ -223,10 +238,15 @@ public void setDiscounted(final com.commercetools.importapi.models.common.Discou
223238
this.discounted = discounted;
224239
}
225240

241+
@Deprecated
226242
public void setPublish(final Boolean publish) {
227243
this.publish = publish;
228244
}
229245

246+
public void setStaged(final Boolean staged) {
247+
this.staged = staged;
248+
}
249+
230250
public void setTiers(final com.commercetools.importapi.models.common.PriceTier... tiers) {
231251
this.tiers = new ArrayList<>(Arrays.asList(tiers));
232252
}
@@ -267,6 +287,7 @@ public boolean equals(Object o) {
267287
.append(channel, that.channel)
268288
.append(discounted, that.discounted)
269289
.append(publish, that.publish)
290+
.append(staged, that.staged)
270291
.append(tiers, that.tiers)
271292
.append(custom, that.custom)
272293
.append(productVariant, that.productVariant)
@@ -280,6 +301,7 @@ public boolean equals(Object o) {
280301
.append(channel, that.channel)
281302
.append(discounted, that.discounted)
282303
.append(publish, that.publish)
304+
.append(staged, that.staged)
283305
.append(tiers, that.tiers)
284306
.append(custom, that.custom)
285307
.append(productVariant, that.productVariant)
@@ -298,6 +320,7 @@ public int hashCode() {
298320
.append(channel)
299321
.append(discounted)
300322
.append(publish)
323+
.append(staged)
301324
.append(tiers)
302325
.append(custom)
303326
.append(productVariant)
@@ -316,6 +339,7 @@ public String toString() {
316339
.append("channel", channel)
317340
.append("discounted", discounted)
318341
.append("publish", publish)
342+
.append("staged", staged)
319343
.append("tiers", tiers)
320344
.append("custom", custom)
321345
.append("productVariant", productVariant)

0 commit comments

Comments
 (0)