Skip to content

Commit 5bd41ac

Browse files
Merge pull request #805 from commercetools/gen-sdk-updates
Update generated SDKs
2 parents 01bd9a8 + 258cbd1 commit 5bd41ac

File tree

9 files changed

+34
-106
lines changed

9 files changed

+34
-106
lines changed

changes.md

Lines changed: 1 addition & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,8 @@
11
**Api changes**
22

3-
<details>
4-
<summary>Added Resource(s)</summary>
5-
6-
- added resource `/{projectKey}/in-store/key={storeKey}/business-units`
7-
- added resource `/{projectKey}/in-store/key={storeKey}/business-units/key={key}`
8-
- added resource `/{projectKey}/in-store/key={storeKey}/business-units/{ID}`
9-
</details>
10-
11-
12-
<details>
13-
<summary>Required Property(s)</summary>
14-
15-
- :warning: changed property `triggerPattern` of type `CartDiscountPatternTarget` to be required
16-
- changed property `images` of type `ProductTailoringSetExternalImagesAction` to be optional
17-
</details>
18-
19-
20-
<details>
21-
<summary>Added Property(s)</summary>
22-
23-
- added property `inheritedStores` to type `BusinessUnit`
24-
- added property `inheritedStores` to type `Company`
25-
- added property `inheritedStores` to type `Division`
26-
</details>
27-
28-
29-
<details>
30-
<summary>Added Method(s)</summary>
31-
32-
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().get()`
33-
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().head()`
34-
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().post()`
35-
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().withKey().get()`
36-
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().withKey().head()`
37-
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().withKey().post()`
38-
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().withKey().delete()`
39-
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().withId().get()`
40-
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().withId().head()`
41-
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().withId().post()`
42-
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().withId().delete()`
43-
</details>
44-
45-
**History changes**
46-
473
<details>
484
<summary>Changed Property(s)</summary>
495

50-
- :warning: changed property `extensions` of type `GraphQLError` from type `GraphQLErrorObject` to `object`
51-
</details>
52-
53-
54-
<details>
55-
<summary>Required Property(s)</summary>
56-
57-
- :warning: changed property `triggerPattern` of type `ChangeTargetPatternChangeValue` to be required
58-
</details>
59-
60-
61-
<details>
62-
<summary>Removed Type(s)</summary>
63-
64-
- :warning: removed type `GraphQLErrorObject`
6+
- :warning: changed property `discount` of type `DiscountedTotalPricePortion` from type `CartDiscountReference` to `Reference`
657
</details>
668

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/DiscountedTotalPricePortion.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import javax.annotation.Nullable;
99

10-
import com.commercetools.api.models.cart_discount.CartDiscountReference;
10+
import com.commercetools.api.models.common.Reference;
1111
import com.commercetools.api.models.common.TypedMoney;
1212
import com.fasterxml.jackson.annotation.*;
1313
import com.fasterxml.jackson.databind.annotation.*;
@@ -36,13 +36,13 @@
3636
public interface DiscountedTotalPricePortion {
3737

3838
/**
39-
* <p>Cart Discount related to the discounted price.</p>
39+
* <p>A CartDiscountReference or DirectDiscountReference to the discount applied on the Cart <code>totalPrice</code>.</p>
4040
* @return discount
4141
*/
4242
@NotNull
4343
@Valid
4444
@JsonProperty("discount")
45-
public CartDiscountReference getDiscount();
45+
public Reference getDiscount();
4646

4747
/**
4848
* <p>Money value of the discount.</p>
@@ -54,11 +54,11 @@ public interface DiscountedTotalPricePortion {
5454
public TypedMoney getDiscountedAmount();
5555

5656
/**
57-
* <p>Cart Discount related to the discounted price.</p>
57+
* <p>A CartDiscountReference or DirectDiscountReference to the discount applied on the Cart <code>totalPrice</code>.</p>
5858
* @param discount value to be set
5959
*/
6060

61-
public void setDiscount(final CartDiscountReference discount);
61+
public void setDiscount(final Reference discount);
6262

6363
/**
6464
* <p>Money value of the discount.</p>
@@ -98,8 +98,7 @@ public static DiscountedTotalPricePortion deepCopy(@Nullable final DiscountedTot
9898
return null;
9999
}
100100
DiscountedTotalPricePortionImpl instance = new DiscountedTotalPricePortionImpl();
101-
instance.setDiscount(
102-
com.commercetools.api.models.cart_discount.CartDiscountReference.deepCopy(template.getDiscount()));
101+
instance.setDiscount(com.commercetools.api.models.common.Reference.deepCopy(template.getDiscount()));
103102
instance.setDiscountedAmount(
104103
com.commercetools.api.models.common.TypedMoney.deepCopy(template.getDiscountedAmount()));
105104
return instance;

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/DiscountedTotalPricePortionBuilder.java

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -23,44 +23,30 @@
2323
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
2424
public class DiscountedTotalPricePortionBuilder implements Builder<DiscountedTotalPricePortion> {
2525

26-
private com.commercetools.api.models.cart_discount.CartDiscountReference discount;
26+
private com.commercetools.api.models.common.Reference discount;
2727

2828
private com.commercetools.api.models.common.TypedMoney discountedAmount;
2929

3030
/**
31-
* <p>Cart Discount related to the discounted price.</p>
32-
* @param builder function to build the discount value
31+
* <p>A CartDiscountReference or DirectDiscountReference to the discount applied on the Cart <code>totalPrice</code>.</p>
32+
* @param discount value to be set
3333
* @return Builder
3434
*/
3535

36-
public DiscountedTotalPricePortionBuilder discount(
37-
Function<com.commercetools.api.models.cart_discount.CartDiscountReferenceBuilder, com.commercetools.api.models.cart_discount.CartDiscountReferenceBuilder> builder) {
38-
this.discount = builder.apply(com.commercetools.api.models.cart_discount.CartDiscountReferenceBuilder.of())
39-
.build();
36+
public DiscountedTotalPricePortionBuilder discount(final com.commercetools.api.models.common.Reference discount) {
37+
this.discount = discount;
4038
return this;
4139
}
4240

4341
/**
44-
* <p>Cart Discount related to the discounted price.</p>
42+
* <p>A CartDiscountReference or DirectDiscountReference to the discount applied on the Cart <code>totalPrice</code>.</p>
4543
* @param builder function to build the discount value
4644
* @return Builder
4745
*/
4846

49-
public DiscountedTotalPricePortionBuilder withDiscount(
50-
Function<com.commercetools.api.models.cart_discount.CartDiscountReferenceBuilder, com.commercetools.api.models.cart_discount.CartDiscountReference> builder) {
51-
this.discount = builder.apply(com.commercetools.api.models.cart_discount.CartDiscountReferenceBuilder.of());
52-
return this;
53-
}
54-
55-
/**
56-
* <p>Cart Discount related to the discounted price.</p>
57-
* @param discount value to be set
58-
* @return Builder
59-
*/
60-
6147
public DiscountedTotalPricePortionBuilder discount(
62-
final com.commercetools.api.models.cart_discount.CartDiscountReference discount) {
63-
this.discount = discount;
48+
Function<com.commercetools.api.models.common.ReferenceBuilder, Builder<? extends com.commercetools.api.models.common.Reference>> builder) {
49+
this.discount = builder.apply(com.commercetools.api.models.common.ReferenceBuilder.of()).build();
6450
return this;
6551
}
6652

@@ -89,11 +75,11 @@ public DiscountedTotalPricePortionBuilder discountedAmount(
8975
}
9076

9177
/**
92-
* <p>Cart Discount related to the discounted price.</p>
78+
* <p>A CartDiscountReference or DirectDiscountReference to the discount applied on the Cart <code>totalPrice</code>.</p>
9379
* @return discount
9480
*/
9581

96-
public com.commercetools.api.models.cart_discount.CartDiscountReference getDiscount() {
82+
public com.commercetools.api.models.common.Reference getDiscount() {
9783
return this.discount;
9884
}
9985

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/DiscountedTotalPricePortionImpl.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
2323
public class DiscountedTotalPricePortionImpl implements DiscountedTotalPricePortion, ModelBase {
2424

25-
private com.commercetools.api.models.cart_discount.CartDiscountReference discount;
25+
private com.commercetools.api.models.common.Reference discount;
2626

2727
private com.commercetools.api.models.common.TypedMoney discountedAmount;
2828

@@ -31,7 +31,7 @@ public class DiscountedTotalPricePortionImpl implements DiscountedTotalPricePort
3131
*/
3232
@JsonCreator
3333
DiscountedTotalPricePortionImpl(
34-
@JsonProperty("discount") final com.commercetools.api.models.cart_discount.CartDiscountReference discount,
34+
@JsonProperty("discount") final com.commercetools.api.models.common.Reference discount,
3535
@JsonProperty("discountedAmount") final com.commercetools.api.models.common.TypedMoney discountedAmount) {
3636
this.discount = discount;
3737
this.discountedAmount = discountedAmount;
@@ -44,10 +44,10 @@ public DiscountedTotalPricePortionImpl() {
4444
}
4545

4646
/**
47-
* <p>Cart Discount related to the discounted price.</p>
47+
* <p>A CartDiscountReference or DirectDiscountReference to the discount applied on the Cart <code>totalPrice</code>.</p>
4848
*/
4949

50-
public com.commercetools.api.models.cart_discount.CartDiscountReference getDiscount() {
50+
public com.commercetools.api.models.common.Reference getDiscount() {
5151
return this.discount;
5252
}
5353

@@ -59,7 +59,7 @@ public com.commercetools.api.models.common.TypedMoney getDiscountedAmount() {
5959
return this.discountedAmount;
6060
}
6161

62-
public void setDiscount(final com.commercetools.api.models.cart_discount.CartDiscountReference discount) {
62+
public void setDiscount(final com.commercetools.api.models.common.Reference discount) {
6363
this.discount = discount;
6464
}
6565

commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/expansion/cart/DiscountedTotalPricePortionExpansionBuilderDsl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ public List<String> getPath() {
2929
return path;
3030
}
3131

32-
public com.commercetools.api.predicates.expansion.cart_discount.CartDiscountReferenceExpansionBuilderDsl discount() {
33-
return com.commercetools.api.predicates.expansion.cart_discount.CartDiscountReferenceExpansionBuilderDsl
32+
public com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl discount() {
33+
return com.commercetools.api.predicates.expansion.common.ReferenceExpansionBuilderDsl
3434
.of(appendOne(path, "discount"));
3535
}
3636
}

commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/cart/DiscountedTotalPricePortionQueryBuilderDsl.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ public static DiscountedTotalPricePortionQueryBuilderDsl of() {
1414
}
1515

1616
public CombinationQueryPredicate<DiscountedTotalPricePortionQueryBuilderDsl> discount(
17-
Function<com.commercetools.api.predicates.query.cart_discount.CartDiscountReferenceQueryBuilderDsl, CombinationQueryPredicate<com.commercetools.api.predicates.query.cart_discount.CartDiscountReferenceQueryBuilderDsl>> fn) {
18-
return new CombinationQueryPredicate<>(ContainerQueryPredicate.of()
19-
.parent(ConstantQueryPredicate.of().constant("discount"))
20-
.inner(fn.apply(
21-
com.commercetools.api.predicates.query.cart_discount.CartDiscountReferenceQueryBuilderDsl.of())),
17+
Function<com.commercetools.api.predicates.query.common.ReferenceQueryBuilderDsl, CombinationQueryPredicate<com.commercetools.api.predicates.query.common.ReferenceQueryBuilderDsl>> fn) {
18+
return new CombinationQueryPredicate<>(
19+
ContainerQueryPredicate.of()
20+
.parent(ConstantQueryPredicate.of().constant("discount"))
21+
.inner(fn.apply(com.commercetools.api.predicates.query.common.ReferenceQueryBuilderDsl.of())),
2222
DiscountedTotalPricePortionQueryBuilderDsl::of);
2323
}
2424

commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/cart/DiscountedTotalPricePortionTest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,16 @@ public void buildUnchecked(DiscountedTotalPricePortionBuilder builder) {
2626
public static Object[][] objectBuilder() {
2727
return new Object[][] {
2828
new Object[] { DiscountedTotalPricePortion.builder()
29-
.discount(new com.commercetools.api.models.cart_discount.CartDiscountReferenceImpl()) },
29+
.discount(new com.commercetools.api.models.common.ReferenceImpl()) },
3030
new Object[] { DiscountedTotalPricePortion.builder()
3131
.discountedAmount(new com.commercetools.api.models.common.TypedMoneyImpl()) } };
3232
}
3333

3434
@Test
3535
public void discount() {
3636
DiscountedTotalPricePortion value = DiscountedTotalPricePortion.of();
37-
value.setDiscount(new com.commercetools.api.models.cart_discount.CartDiscountReferenceImpl());
38-
Assertions.assertThat(value.getDiscount())
39-
.isEqualTo(new com.commercetools.api.models.cart_discount.CartDiscountReferenceImpl());
37+
value.setDiscount(new com.commercetools.api.models.common.ReferenceImpl());
38+
Assertions.assertThat(value.getDiscount()).isEqualTo(new com.commercetools.api.models.common.ReferenceImpl());
4039
}
4140

4241
@Test

reference.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
64c89a7773b97bd6425a82d7d8cee1a9f0f3e6e2

references.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,3 +361,4 @@ e3d5bc9cb69146c5d1dd755ed5e8cf2f54566b3a
361361
591d5eaefd1d56fd350895ccea401cb42f2f0ee8
362362
2cad0e3daf32cb4eacc6b08feef37acb27065b0b
363363
64c89a7773b97bd6425a82d7d8cee1a9f0f3e6e2
364+
f28a1461a4122eed74c423156f1969ba204e6948

0 commit comments

Comments
 (0)