Skip to content

Commit

Permalink
Merge pull request #639 from commercetools/gen-sdk-updates
Browse files Browse the repository at this point in the history
Update generated SDKs
  • Loading branch information
kodiakhq[bot] authored May 7, 2024
2 parents 6cfa558 + abd5112 commit e94d6a0
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 34 deletions.
15 changes: 3 additions & 12 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
**Import changes**
**Api changes**

<details>
<summary>MarkDeprecated Property(s)</summary>
<summary>Changed Property(s)</summary>

- marked property `PriceImport::publish` as deprecated
- marked property `ProductVariantImport::publish` as deprecated
</details>


<details>
<summary>Added Property(s)</summary>

- added property `staged` to type `PriceImport`
- added property `staged` to type `ProductVariantImport`
- :warning: changed property `value` of type `DirectDiscountDraft` from type `CartDiscountValue` to `CartDiscountValueDraft`
</details>

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import javax.validation.constraints.NotNull;

import com.commercetools.api.models.cart_discount.CartDiscountTarget;
import com.commercetools.api.models.cart_discount.CartDiscountValue;
import com.commercetools.api.models.cart_discount.CartDiscountValueDraft;
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.*;

Expand Down Expand Up @@ -42,7 +42,7 @@ public interface DirectDiscountDraft extends io.vrap.rmf.base.client.Draft<Direc
@NotNull
@Valid
@JsonProperty("value")
public CartDiscountValue getValue();
public CartDiscountValueDraft getValue();

/**
* <p>Defines what segment of the Cart will be discounted.</p>
Expand All @@ -58,7 +58,7 @@ public interface DirectDiscountDraft extends io.vrap.rmf.base.client.Draft<Direc
* @param value value to be set
*/

public void setValue(final CartDiscountValue value);
public void setValue(final CartDiscountValueDraft value);

/**
* <p>Defines what segment of the Cart will be discounted.</p>
Expand Down Expand Up @@ -99,7 +99,8 @@ public static DirectDiscountDraft deepCopy(@Nullable final DirectDiscountDraft t
return null;
}
DirectDiscountDraftImpl instance = new DirectDiscountDraftImpl();
instance.setValue(com.commercetools.api.models.cart_discount.CartDiscountValue.deepCopy(template.getValue()));
instance.setValue(
com.commercetools.api.models.cart_discount.CartDiscountValueDraft.deepCopy(template.getValue()));
instance.setTarget(
com.commercetools.api.models.cart_discount.CartDiscountTarget.deepCopy(template.getTarget()));
return instance;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public class DirectDiscountDraftBuilder implements Builder<DirectDiscountDraft> {

private com.commercetools.api.models.cart_discount.CartDiscountValue value;
private com.commercetools.api.models.cart_discount.CartDiscountValueDraft value;

@Nullable
private com.commercetools.api.models.cart_discount.CartDiscountTarget target;
Expand All @@ -35,7 +35,8 @@ public class DirectDiscountDraftBuilder implements Builder<DirectDiscountDraft>
* @return Builder
*/

public DirectDiscountDraftBuilder value(final com.commercetools.api.models.cart_discount.CartDiscountValue value) {
public DirectDiscountDraftBuilder value(
final com.commercetools.api.models.cart_discount.CartDiscountValueDraft value) {
this.value = value;
return this;
}
Expand All @@ -47,8 +48,9 @@ public DirectDiscountDraftBuilder value(final com.commercetools.api.models.cart_
*/

public DirectDiscountDraftBuilder value(
Function<com.commercetools.api.models.cart_discount.CartDiscountValueBuilder, Builder<? extends com.commercetools.api.models.cart_discount.CartDiscountValue>> builder) {
this.value = builder.apply(com.commercetools.api.models.cart_discount.CartDiscountValueBuilder.of()).build();
Function<com.commercetools.api.models.cart_discount.CartDiscountValueDraftBuilder, Builder<? extends com.commercetools.api.models.cart_discount.CartDiscountValueDraft>> builder) {
this.value = builder.apply(com.commercetools.api.models.cart_discount.CartDiscountValueDraftBuilder.of())
.build();
return this;
}

Expand Down Expand Up @@ -83,7 +85,7 @@ public DirectDiscountDraftBuilder target(
* @return value
*/

public com.commercetools.api.models.cart_discount.CartDiscountValue getValue() {
public com.commercetools.api.models.cart_discount.CartDiscountValueDraft getValue() {
return this.value;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public class DirectDiscountDraftImpl implements DirectDiscountDraft, ModelBase {

private com.commercetools.api.models.cart_discount.CartDiscountValue value;
private com.commercetools.api.models.cart_discount.CartDiscountValueDraft value;

private com.commercetools.api.models.cart_discount.CartDiscountTarget target;

Expand All @@ -33,7 +33,7 @@ public class DirectDiscountDraftImpl implements DirectDiscountDraft, ModelBase {
*/
@JsonCreator
DirectDiscountDraftImpl(
@JsonProperty("value") final com.commercetools.api.models.cart_discount.CartDiscountValue value,
@JsonProperty("value") final com.commercetools.api.models.cart_discount.CartDiscountValueDraft value,
@JsonProperty("target") final com.commercetools.api.models.cart_discount.CartDiscountTarget target) {
this.value = value;
this.target = target;
Expand All @@ -49,7 +49,7 @@ public DirectDiscountDraftImpl() {
* <p>Defines the effect the Discount will have.</p>
*/

public com.commercetools.api.models.cart_discount.CartDiscountValue getValue() {
public com.commercetools.api.models.cart_discount.CartDiscountValueDraft getValue() {
return this.value;
}

Expand All @@ -62,7 +62,7 @@ public com.commercetools.api.models.cart_discount.CartDiscountTarget getTarget()
return this.target;
}

public void setValue(final com.commercetools.api.models.cart_discount.CartDiscountValue value) {
public void setValue(final com.commercetools.api.models.cart_discount.CartDiscountValueDraft value) {
this.value = value;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ public static DirectDiscountDraftQueryBuilderDsl of() {
}

public CombinationQueryPredicate<DirectDiscountDraftQueryBuilderDsl> value(
Function<com.commercetools.api.predicates.query.cart_discount.CartDiscountValueQueryBuilderDsl, CombinationQueryPredicate<com.commercetools.api.predicates.query.cart_discount.CartDiscountValueQueryBuilderDsl>> fn) {
return new CombinationQueryPredicate<>(
ContainerQueryPredicate.of()
.parent(ConstantQueryPredicate.of().constant("value"))
.inner(fn.apply(
com.commercetools.api.predicates.query.cart_discount.CartDiscountValueQueryBuilderDsl.of())),
Function<com.commercetools.api.predicates.query.cart_discount.CartDiscountValueDraftQueryBuilderDsl, CombinationQueryPredicate<com.commercetools.api.predicates.query.cart_discount.CartDiscountValueDraftQueryBuilderDsl>> fn) {
return new CombinationQueryPredicate<>(ContainerQueryPredicate.of()
.parent(ConstantQueryPredicate.of().constant("value"))
.inner(fn.apply(
com.commercetools.api.predicates.query.cart_discount.CartDiscountValueDraftQueryBuilderDsl.of())),
DirectDiscountDraftQueryBuilderDsl::of);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ public void buildUnchecked(DirectDiscountDraftBuilder builder) {
public static Object[][] objectBuilder() {
return new Object[][] {
new Object[] { DirectDiscountDraft.builder()
.value(new com.commercetools.api.models.cart_discount.CartDiscountValueImpl()) },
.value(new com.commercetools.api.models.cart_discount.CartDiscountValueDraftImpl()) },
new Object[] { DirectDiscountDraft.builder()
.target(new com.commercetools.api.models.cart_discount.CartDiscountTargetImpl()) } };
}

@Test
public void value() {
DirectDiscountDraft value = DirectDiscountDraft.of();
value.setValue(new com.commercetools.api.models.cart_discount.CartDiscountValueImpl());
value.setValue(new com.commercetools.api.models.cart_discount.CartDiscountValueDraftImpl());
Assertions.assertThat(value.getValue())
.isEqualTo(new com.commercetools.api.models.cart_discount.CartDiscountValueImpl());
.isEqualTo(new com.commercetools.api.models.cart_discount.CartDiscountValueDraftImpl());
}

@Test
Expand Down
1 change: 1 addition & 0 deletions references.txt
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,4 @@ c50b9ffcff1ea4a31e509f124bf0f87baced36af
494b8e902a3947c3c10bee83fde353fca02e3883
486ddbfe9cd2b72d6ad3253ed78b00bc41d0cd3c
47606ecb6f140e1e97dc0578ea2207fb4a9bc5f7
a690700ee3c192050e86193dea13bef4cc8effc6

0 comments on commit e94d6a0

Please sign in to comment.