diff --git a/changes.md b/changes.md
index 0ec4167409d..07bc86e10d6 100644
--- a/changes.md
+++ b/changes.md
@@ -1,8 +1,16 @@
**Api changes**
Changed Property(s)
+Added Type(s)
-- :warning: changed property `discount` of type `DiscountedTotalPricePortion` from type `CartDiscountReference` to `Reference`
+- added type `ShoppingListSetBusinessUnitAction`
+Added Property(s)
+
+- added property `businessUnit` to type `ShoppingList`
+- added property `businessUnit` to type `ShoppingListDraft`
Reference to the Business Unit the Shopping List belongs to.
+ * @return businessUnit + */ + @Valid + @JsonProperty("businessUnit") + public BusinessUnitKeyReference getBusinessUnit(); + /** *Custom Fields defined for the ShoppingList.
* @return custom @@ -290,6 +299,13 @@ public interface ShoppingList public void setStore(final StoreKeyReference store); + /** + *Reference to the Business Unit the Shopping List belongs to.
+ * @param businessUnit value to be set + */ + + public void setBusinessUnit(final BusinessUnitKeyReference businessUnit); + /** *Custom Fields defined for the ShoppingList.
* @param custom value to be set @@ -354,6 +370,7 @@ public static ShoppingList of(final ShoppingList template) { instance.setDeleteDaysAfterLastModification(template.getDeleteDaysAfterLastModification()); instance.setAnonymousId(template.getAnonymousId()); instance.setStore(template.getStore()); + instance.setBusinessUnit(template.getBusinessUnit()); instance.setCustom(template.getCustom()); instance.setLastModifiedBy(template.getLastModifiedBy()); instance.setCreatedBy(template.getCreatedBy()); @@ -394,6 +411,8 @@ public static ShoppingList deepCopy(@Nullable final ShoppingList template) { instance.setDeleteDaysAfterLastModification(template.getDeleteDaysAfterLastModification()); instance.setAnonymousId(template.getAnonymousId()); instance.setStore(com.commercetools.api.models.store.StoreKeyReference.deepCopy(template.getStore())); + instance.setBusinessUnit( + com.commercetools.api.models.business_unit.BusinessUnitKeyReference.deepCopy(template.getBusinessUnit())); instance.setCustom(com.commercetools.api.models.type.CustomFields.deepCopy(template.getCustom())); instance.setLastModifiedBy( com.commercetools.api.models.common.LastModifiedBy.deepCopy(template.getLastModifiedBy())); diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListBuilder.java index fc018798b82..5e0592fb0ed 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListBuilder.java @@ -65,6 +65,9 @@ public class ShoppingListBuilder implements BuilderReference to the Business Unit the Shopping List belongs to.
+ * @param builder function to build the businessUnit value + * @return Builder + */ + + public ShoppingListBuilder businessUnit( + FunctionReference to the Business Unit the Shopping List belongs to.
+ * @param builder function to build the businessUnit value + * @return Builder + */ + + public ShoppingListBuilder withBusinessUnit( + FunctionReference to the Business Unit the Shopping List belongs to.
+ * @param businessUnit value to be set + * @return Builder + */ + + public ShoppingListBuilder businessUnit( + @Nullable final com.commercetools.api.models.business_unit.BusinessUnitKeyReference businessUnit) { + this.businessUnit = businessUnit; + return this; + } + /** *Custom Fields defined for the ShoppingList.
* @param builder function to build the custom value @@ -750,6 +792,16 @@ public com.commercetools.api.models.store.StoreKeyReference getStore() { return this.store; } + /** + *Reference to the Business Unit the Shopping List belongs to.
+ * @return businessUnit + */ + + @Nullable + public com.commercetools.api.models.business_unit.BusinessUnitKeyReference getBusinessUnit() { + return this.businessUnit; + } + /** *Custom Fields defined for the ShoppingList.
* @return custom @@ -793,8 +845,8 @@ public ShoppingList build() { Objects.requireNonNull(lineItems, ShoppingList.class + ": lineItems is missing"); Objects.requireNonNull(textLineItems, ShoppingList.class + ": textLineItems is missing"); return new ShoppingListImpl(id, version, createdAt, lastModifiedAt, name, key, customer, slug, description, - lineItems, textLineItems, deleteDaysAfterLastModification, anonymousId, store, custom, lastModifiedBy, - createdBy); + lineItems, textLineItems, deleteDaysAfterLastModification, anonymousId, store, businessUnit, custom, + lastModifiedBy, createdBy); } /** @@ -803,8 +855,8 @@ public ShoppingList build() { */ public ShoppingList buildUnchecked() { return new ShoppingListImpl(id, version, createdAt, lastModifiedAt, name, key, customer, slug, description, - lineItems, textLineItems, deleteDaysAfterLastModification, anonymousId, store, custom, lastModifiedBy, - createdBy); + lineItems, textLineItems, deleteDaysAfterLastModification, anonymousId, store, businessUnit, custom, + lastModifiedBy, createdBy); } /** @@ -836,6 +888,7 @@ public static ShoppingListBuilder of(final ShoppingList template) { builder.deleteDaysAfterLastModification = template.getDeleteDaysAfterLastModification(); builder.anonymousId = template.getAnonymousId(); builder.store = template.getStore(); + builder.businessUnit = template.getBusinessUnit(); builder.custom = template.getCustom(); builder.lastModifiedBy = template.getLastModifiedBy(); builder.createdBy = template.getCreatedBy(); diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListDraft.java index 1fd719ed226..8ae552dc6b5 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListDraft.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListDraft.java @@ -8,6 +8,7 @@ import javax.annotation.Nullable; +import com.commercetools.api.models.business_unit.BusinessUnitResourceIdentifier; import com.commercetools.api.models.common.LocalizedString; import com.commercetools.api.models.customer.CustomerResourceIdentifier; import com.commercetools.api.models.store.StoreResourceIdentifier; @@ -119,6 +120,14 @@ public interface ShoppingListDraft extends com.commercetools.api.models.Customiz @JsonProperty("store") public StoreResourceIdentifier getStore(); + /** + *ResourceIdentifier of the Business Unit the Shopping List should belong to. When the customer of the Shopping List is set, the Customer must be an Associate of the Business Unit.
Custom Fields defined for the ShoppingList.
* @return custom @@ -213,6 +222,13 @@ public interface ShoppingListDraft extends com.commercetools.api.models.Customiz public void setStore(final StoreResourceIdentifier store); + /** + *ResourceIdentifier of the Business Unit the Shopping List should belong to. When the customer of the Shopping List is set, the Customer must be an Associate of the Business Unit.
Custom Fields defined for the ShoppingList.
* @param custom value to be set @@ -245,6 +261,7 @@ public static ShoppingListDraft of(final ShoppingListDraft template) { instance.setLineItems(template.getLineItems()); instance.setTextLineItems(template.getTextLineItems()); instance.setStore(template.getStore()); + instance.setBusinessUnit(template.getBusinessUnit()); instance.setCustom(template.getCustom()); return instance; } @@ -280,6 +297,8 @@ public static ShoppingListDraft deepCopy(@Nullable final ShoppingListDraft templ .collect(Collectors.toList())) .orElse(null)); instance.setStore(com.commercetools.api.models.store.StoreResourceIdentifier.deepCopy(template.getStore())); + instance.setBusinessUnit(com.commercetools.api.models.business_unit.BusinessUnitResourceIdentifier + .deepCopy(template.getBusinessUnit())); instance.setCustom(com.commercetools.api.models.type.CustomFieldsDraft.deepCopy(template.getCustom())); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListDraftBuilder.java index 0b982d5c632..be082d130b6 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListDraftBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListDraftBuilder.java @@ -53,6 +53,9 @@ public class ShoppingListDraftBuilder implements BuilderResourceIdentifier of the Business Unit the Shopping List should belong to. When the customer of the Shopping List is set, the Customer must be an Associate of the Business Unit.
ResourceIdentifier of the Business Unit the Shopping List should belong to. When the customer of the Shopping List is set, the Customer must be an Associate of the Business Unit.
ResourceIdentifier of the Business Unit the Shopping List should belong to. When the customer of the Shopping List is set, the Customer must be an Associate of the Business Unit.
Custom Fields defined for the ShoppingList.
* @param builder function to build the custom value @@ -588,6 +630,16 @@ public com.commercetools.api.models.store.StoreResourceIdentifier getStore() { return this.store; } + /** + *ResourceIdentifier of the Business Unit the Shopping List should belong to. When the customer of the Shopping List is set, the Customer must be an Associate of the Business Unit.
Custom Fields defined for the ShoppingList.
* @return custom @@ -605,7 +657,7 @@ public com.commercetools.api.models.type.CustomFieldsDraft getCustom() { public ShoppingListDraft build() { Objects.requireNonNull(name, ShoppingListDraft.class + ": name is missing"); return new ShoppingListDraftImpl(name, slug, customer, key, description, anonymousId, - deleteDaysAfterLastModification, lineItems, textLineItems, store, custom); + deleteDaysAfterLastModification, lineItems, textLineItems, store, businessUnit, custom); } /** @@ -614,7 +666,7 @@ public ShoppingListDraft build() { */ public ShoppingListDraft buildUnchecked() { return new ShoppingListDraftImpl(name, slug, customer, key, description, anonymousId, - deleteDaysAfterLastModification, lineItems, textLineItems, store, custom); + deleteDaysAfterLastModification, lineItems, textLineItems, store, businessUnit, custom); } /** @@ -642,6 +694,7 @@ public static ShoppingListDraftBuilder of(final ShoppingListDraft template) { builder.lineItems = template.getLineItems(); builder.textLineItems = template.getTextLineItems(); builder.store = template.getStore(); + builder.businessUnit = template.getBusinessUnit(); builder.custom = template.getCustom(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListDraftImpl.java index 8bea4a4f07d..9cda88d3f70 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListDraftImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListDraftImpl.java @@ -42,6 +42,8 @@ public class ShoppingListDraftImpl implements ShoppingListDraft, ModelBase { private com.commercetools.api.models.store.StoreResourceIdentifier store; + private com.commercetools.api.models.business_unit.BusinessUnitResourceIdentifier businessUnit; + private com.commercetools.api.models.type.CustomFieldsDraft custom; /** @@ -58,6 +60,7 @@ public class ShoppingListDraftImpl implements ShoppingListDraft, ModelBase { @JsonProperty("lineItems") final java.util.ListResourceIdentifier of the Business Unit the Shopping List should belong to. When the customer of the Shopping List is set, the Customer must be an Associate of the Business Unit.
Custom Fields defined for the ShoppingList.
*/ @@ -216,6 +228,11 @@ public void setStore(final com.commercetools.api.models.store.StoreResourceIdent this.store = store; } + public void setBusinessUnit( + final com.commercetools.api.models.business_unit.BusinessUnitResourceIdentifier businessUnit) { + this.businessUnit = businessUnit; + } + public void setCustom(final com.commercetools.api.models.type.CustomFieldsDraft custom) { this.custom = custom; } @@ -240,6 +257,7 @@ public boolean equals(Object o) { .append(lineItems, that.lineItems) .append(textLineItems, that.textLineItems) .append(store, that.store) + .append(businessUnit, that.businessUnit) .append(custom, that.custom) .append(name, that.name) .append(slug, that.slug) @@ -251,6 +269,7 @@ public boolean equals(Object o) { .append(lineItems, that.lineItems) .append(textLineItems, that.textLineItems) .append(store, that.store) + .append(businessUnit, that.businessUnit) .append(custom, that.custom) .isEquals(); } @@ -267,6 +286,7 @@ public int hashCode() { .append(lineItems) .append(textLineItems) .append(store) + .append(businessUnit) .append(custom) .toHashCode(); } @@ -283,6 +303,7 @@ public String toString() { .append("lineItems", lineItems) .append("textLineItems", textLineItems) .append("store", store) + .append("businessUnit", businessUnit) .append("custom", custom) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListImpl.java index f8b7408b9d2..0b0a292a8b6 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListImpl.java @@ -50,6 +50,8 @@ public class ShoppingListImpl implements ShoppingList, ModelBase { private com.commercetools.api.models.store.StoreKeyReference store; + private com.commercetools.api.models.business_unit.BusinessUnitKeyReference businessUnit; + private com.commercetools.api.models.type.CustomFields custom; private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; @@ -73,6 +75,7 @@ public class ShoppingListImpl implements ShoppingList, ModelBase { @JsonProperty("deleteDaysAfterLastModification") final Long deleteDaysAfterLastModification, @JsonProperty("anonymousId") final String anonymousId, @JsonProperty("store") final com.commercetools.api.models.store.StoreKeyReference store, + @JsonProperty("businessUnit") final com.commercetools.api.models.business_unit.BusinessUnitKeyReference businessUnit, @JsonProperty("custom") final com.commercetools.api.models.type.CustomFields custom, @JsonProperty("lastModifiedBy") final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy, @JsonProperty("createdBy") final com.commercetools.api.models.common.CreatedBy createdBy) { @@ -90,6 +93,7 @@ public class ShoppingListImpl implements ShoppingList, ModelBase { this.deleteDaysAfterLastModification = deleteDaysAfterLastModification; this.anonymousId = anonymousId; this.store = store; + this.businessUnit = businessUnit; this.custom = custom; this.lastModifiedBy = lastModifiedBy; this.createdBy = createdBy; @@ -213,6 +217,14 @@ public com.commercetools.api.models.store.StoreKeyReference getStore() { return this.store; } + /** + *Reference to the Business Unit the Shopping List belongs to.
+ */ + + public com.commercetools.api.models.business_unit.BusinessUnitKeyReference getBusinessUnit() { + return this.businessUnit; + } + /** *Custom Fields defined for the ShoppingList.
*/ @@ -303,6 +315,11 @@ public void setStore(final com.commercetools.api.models.store.StoreKeyReference this.store = store; } + public void setBusinessUnit( + final com.commercetools.api.models.business_unit.BusinessUnitKeyReference businessUnit) { + this.businessUnit = businessUnit; + } + public void setCustom(final com.commercetools.api.models.type.CustomFields custom) { this.custom = custom; } @@ -339,6 +356,7 @@ public boolean equals(Object o) { .append(deleteDaysAfterLastModification, that.deleteDaysAfterLastModification) .append(anonymousId, that.anonymousId) .append(store, that.store) + .append(businessUnit, that.businessUnit) .append(custom, that.custom) .append(lastModifiedBy, that.lastModifiedBy) .append(createdBy, that.createdBy) @@ -356,6 +374,7 @@ public boolean equals(Object o) { .append(deleteDaysAfterLastModification, that.deleteDaysAfterLastModification) .append(anonymousId, that.anonymousId) .append(store, that.store) + .append(businessUnit, that.businessUnit) .append(custom, that.custom) .append(lastModifiedBy, that.lastModifiedBy) .append(createdBy, that.createdBy) @@ -378,6 +397,7 @@ public int hashCode() { .append(deleteDaysAfterLastModification) .append(anonymousId) .append(store) + .append(businessUnit) .append(custom) .append(lastModifiedBy) .append(createdBy) @@ -400,6 +420,7 @@ public String toString() { .append("deleteDaysAfterLastModification", deleteDaysAfterLastModification) .append("anonymousId", anonymousId) .append("store", store) + .append("businessUnit", businessUnit) .append("custom", custom) .append("lastModifiedBy", lastModifiedBy) .append("createdBy", createdBy) diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListSetBusinessUnitAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListSetBusinessUnitAction.java new file mode 100644 index 00000000000..501dda3b390 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListSetBusinessUnitAction.java @@ -0,0 +1,132 @@ + +package com.commercetools.api.models.shopping_list; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.business_unit.BusinessUnitResourceIdentifier; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *Updates the Business Unit on the Shopping List. The Shopping List must have an existing Business Unit assigned already.
+ * + *
+ * ShoppingListSetBusinessUnitAction shoppingListSetBusinessUnitAction = ShoppingListSetBusinessUnitAction.builder()
+ * .businessUnit(businessUnitBuilder -> businessUnitBuilder)
+ * .build()
+ *
+ * The Business Unit to assign to the Shopping List, which must have access to the Store that is set on the Shopping List.
+ * @return businessUnit + */ + @NotNull + @Valid + @JsonProperty("businessUnit") + public BusinessUnitResourceIdentifier getBusinessUnit(); + + /** + *The Business Unit to assign to the Shopping List, which must have access to the Store that is set on the Shopping List.
+ * @param businessUnit value to be set + */ + + public void setBusinessUnit(final BusinessUnitResourceIdentifier businessUnit); + + /** + * factory method + * @return instance of ShoppingListSetBusinessUnitAction + */ + public static ShoppingListSetBusinessUnitAction of() { + return new ShoppingListSetBusinessUnitActionImpl(); + } + + /** + * factory method to create a shallow copy ShoppingListSetBusinessUnitAction + * @param template instance to be copied + * @return copy instance + */ + public static ShoppingListSetBusinessUnitAction of(final ShoppingListSetBusinessUnitAction template) { + ShoppingListSetBusinessUnitActionImpl instance = new ShoppingListSetBusinessUnitActionImpl(); + instance.setBusinessUnit(template.getBusinessUnit()); + return instance; + } + + /** + * factory method to create a deep copy of ShoppingListSetBusinessUnitAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ShoppingListSetBusinessUnitAction deepCopy( + @Nullable final ShoppingListSetBusinessUnitAction template) { + if (template == null) { + return null; + } + ShoppingListSetBusinessUnitActionImpl instance = new ShoppingListSetBusinessUnitActionImpl(); + instance.setBusinessUnit(com.commercetools.api.models.business_unit.BusinessUnitResourceIdentifier + .deepCopy(template.getBusinessUnit())); + return instance; + } + + /** + * builder factory method for ShoppingListSetBusinessUnitAction + * @return builder + */ + public static ShoppingListSetBusinessUnitActionBuilder builder() { + return ShoppingListSetBusinessUnitActionBuilder.of(); + } + + /** + * create builder for ShoppingListSetBusinessUnitAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ShoppingListSetBusinessUnitActionBuilder builder(final ShoppingListSetBusinessUnitAction template) { + return ShoppingListSetBusinessUnitActionBuilder.of(template); + } + + /** + * accessor map function + * @param
+ * ShoppingListSetBusinessUnitAction shoppingListSetBusinessUnitAction = ShoppingListSetBusinessUnitAction.builder()
+ * .businessUnit(businessUnitBuilder -> businessUnitBuilder)
+ * .build()
+ *
+ * The Business Unit to assign to the Shopping List, which must have access to the Store that is set on the Shopping List.
+ * @param builder function to build the businessUnit value + * @return Builder + */ + + public ShoppingListSetBusinessUnitActionBuilder businessUnit( + FunctionThe Business Unit to assign to the Shopping List, which must have access to the Store that is set on the Shopping List.
+ * @param builder function to build the businessUnit value + * @return Builder + */ + + public ShoppingListSetBusinessUnitActionBuilder withBusinessUnit( + FunctionThe Business Unit to assign to the Shopping List, which must have access to the Store that is set on the Shopping List.
+ * @param businessUnit value to be set + * @return Builder + */ + + public ShoppingListSetBusinessUnitActionBuilder businessUnit( + final com.commercetools.api.models.business_unit.BusinessUnitResourceIdentifier businessUnit) { + this.businessUnit = businessUnit; + return this; + } + + /** + *The Business Unit to assign to the Shopping List, which must have access to the Store that is set on the Shopping List.
+ * @return businessUnit + */ + + public com.commercetools.api.models.business_unit.BusinessUnitResourceIdentifier getBusinessUnit() { + return this.businessUnit; + } + + /** + * builds ShoppingListSetBusinessUnitAction with checking for non-null required values + * @return ShoppingListSetBusinessUnitAction + */ + public ShoppingListSetBusinessUnitAction build() { + Objects.requireNonNull(businessUnit, ShoppingListSetBusinessUnitAction.class + ": businessUnit is missing"); + return new ShoppingListSetBusinessUnitActionImpl(businessUnit); + } + + /** + * builds ShoppingListSetBusinessUnitAction without checking for non-null required values + * @return ShoppingListSetBusinessUnitAction + */ + public ShoppingListSetBusinessUnitAction buildUnchecked() { + return new ShoppingListSetBusinessUnitActionImpl(businessUnit); + } + + /** + * factory method for an instance of ShoppingListSetBusinessUnitActionBuilder + * @return builder + */ + public static ShoppingListSetBusinessUnitActionBuilder of() { + return new ShoppingListSetBusinessUnitActionBuilder(); + } + + /** + * create builder for ShoppingListSetBusinessUnitAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ShoppingListSetBusinessUnitActionBuilder of(final ShoppingListSetBusinessUnitAction template) { + ShoppingListSetBusinessUnitActionBuilder builder = new ShoppingListSetBusinessUnitActionBuilder(); + builder.businessUnit = template.getBusinessUnit(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListSetBusinessUnitActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListSetBusinessUnitActionImpl.java new file mode 100644 index 00000000000..fb0d65111a3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListSetBusinessUnitActionImpl.java @@ -0,0 +1,96 @@ + +package com.commercetools.api.models.shopping_list; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *Updates the Business Unit on the Shopping List. The Shopping List must have an existing Business Unit assigned already.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ShoppingListSetBusinessUnitActionImpl implements ShoppingListSetBusinessUnitAction, ModelBase { + + private String action; + + private com.commercetools.api.models.business_unit.BusinessUnitResourceIdentifier businessUnit; + + /** + * create instance with all properties + */ + @JsonCreator + ShoppingListSetBusinessUnitActionImpl( + @JsonProperty("businessUnit") final com.commercetools.api.models.business_unit.BusinessUnitResourceIdentifier businessUnit) { + this.businessUnit = businessUnit; + this.action = SET_BUSINESS_UNIT; + } + + /** + * create empty instance + */ + public ShoppingListSetBusinessUnitActionImpl() { + this.action = SET_BUSINESS_UNIT; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *The Business Unit to assign to the Shopping List, which must have access to the Store that is set on the Shopping List.
+ */ + + public com.commercetools.api.models.business_unit.BusinessUnitResourceIdentifier getBusinessUnit() { + return this.businessUnit; + } + + public void setBusinessUnit( + final com.commercetools.api.models.business_unit.BusinessUnitResourceIdentifier businessUnit) { + this.businessUnit = businessUnit; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ShoppingListSetBusinessUnitActionImpl that = (ShoppingListSetBusinessUnitActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(businessUnit, that.businessUnit) + .append(action, that.action) + .append(businessUnit, that.businessUnit) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(businessUnit).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("businessUnit", businessUnit) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListUpdateAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListUpdateAction.java index 8c1e17bcd58..ea908f15695 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListUpdateAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListUpdateAction.java @@ -38,6 +38,7 @@ @JsonSubTypes.Type(value = com.commercetools.api.models.shopping_list.ShoppingListRemoveLineItemActionImpl.class, name = ShoppingListRemoveLineItemAction.REMOVE_LINE_ITEM), @JsonSubTypes.Type(value = com.commercetools.api.models.shopping_list.ShoppingListRemoveTextLineItemActionImpl.class, name = ShoppingListRemoveTextLineItemAction.REMOVE_TEXT_LINE_ITEM), @JsonSubTypes.Type(value = com.commercetools.api.models.shopping_list.ShoppingListSetAnonymousIdActionImpl.class, name = ShoppingListSetAnonymousIdAction.SET_ANONYMOUS_ID), + @JsonSubTypes.Type(value = com.commercetools.api.models.shopping_list.ShoppingListSetBusinessUnitActionImpl.class, name = ShoppingListSetBusinessUnitAction.SET_BUSINESS_UNIT), @JsonSubTypes.Type(value = com.commercetools.api.models.shopping_list.ShoppingListSetCustomFieldActionImpl.class, name = ShoppingListSetCustomFieldAction.SET_CUSTOM_FIELD), @JsonSubTypes.Type(value = com.commercetools.api.models.shopping_list.ShoppingListSetCustomTypeActionImpl.class, name = ShoppingListSetCustomTypeAction.SET_CUSTOM_TYPE), @JsonSubTypes.Type(value = com.commercetools.api.models.shopping_list.ShoppingListSetCustomerActionImpl.class, name = ShoppingListSetCustomerAction.SET_CUSTOMER), @@ -119,6 +120,10 @@ public static ShoppingListUpdateAction deepCopy(@Nullable final ShoppingListUpda return com.commercetools.api.models.shopping_list.ShoppingListSetAnonymousIdAction .deepCopy((com.commercetools.api.models.shopping_list.ShoppingListSetAnonymousIdAction) template); } + if (template instanceof com.commercetools.api.models.shopping_list.ShoppingListSetBusinessUnitAction) { + return com.commercetools.api.models.shopping_list.ShoppingListSetBusinessUnitAction + .deepCopy((com.commercetools.api.models.shopping_list.ShoppingListSetBusinessUnitAction) template); + } if (template instanceof com.commercetools.api.models.shopping_list.ShoppingListSetCustomFieldAction) { return com.commercetools.api.models.shopping_list.ShoppingListSetCustomFieldAction .deepCopy((com.commercetools.api.models.shopping_list.ShoppingListSetCustomFieldAction) template); @@ -264,6 +269,14 @@ public static com.commercetools.api.models.shopping_list.ShoppingListSetAnonymou return com.commercetools.api.models.shopping_list.ShoppingListSetAnonymousIdActionBuilder.of(); } + /** + * builder for setBusinessUnit subtype + * @return builder + */ + public static com.commercetools.api.models.shopping_list.ShoppingListSetBusinessUnitActionBuilder setBusinessUnitBuilder() { + return com.commercetools.api.models.shopping_list.ShoppingListSetBusinessUnitActionBuilder.of(); + } + /** * builder for setCustomField subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListUpdateActionBuilder.java index f90f8c8e501..84114fb26b6 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListUpdateActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/shopping_list/ShoppingListUpdateActionBuilder.java @@ -55,6 +55,10 @@ public com.commercetools.api.models.shopping_list.ShoppingListSetAnonymousIdActi return com.commercetools.api.models.shopping_list.ShoppingListSetAnonymousIdActionBuilder.of(); } + public com.commercetools.api.models.shopping_list.ShoppingListSetBusinessUnitActionBuilder setBusinessUnitBuilder() { + return com.commercetools.api.models.shopping_list.ShoppingListSetBusinessUnitActionBuilder.of(); + } + public com.commercetools.api.models.shopping_list.ShoppingListSetCustomFieldActionBuilder setCustomFieldBuilder() { return com.commercetools.api.models.shopping_list.ShoppingListSetCustomFieldActionBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/shopping_list/ShoppingListDraftQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/shopping_list/ShoppingListDraftQueryBuilderDsl.java index 8df8eaefc31..4024cfc9b5a 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/shopping_list/ShoppingListDraftQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/shopping_list/ShoppingListDraftQueryBuilderDsl.java @@ -107,6 +107,16 @@ public CombinationQueryPredicate