Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<details>
<summary>Added Type(s)</summary>

- added type `InventoryEntrySetInventoryLimitsAction`
- added type `RecurringOrderDeletedMessage`
- added type `RecurringOrderExpiresAtSetMessage`
- added type `RecurringOrderDeletedMessagePayload`
Expand Down Expand Up @@ -32,6 +33,10 @@
<details>
<summary>Added Property(s)</summary>

- added property `minCartQuantity` to type `InventoryEntry`
- added property `maxCartQuantity` to type `InventoryEntry`
- added property `minCartQuantity` to type `InventoryEntryDraft`
- added property `maxCartQuantity` to type `InventoryEntryDraft`
- added property `expiresAt` to type `RecurringOrderDraft`
</details>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5233,6 +5233,8 @@ type InventoryEntry implements Versioned & ReferenceExpandable {
supplyChannel: Channel
expectedDelivery: DateTime
supplyChannelRef: Reference
minCartQuantity: Long
maxCartQuantity: Long
custom: CustomFieldsType
id: String!
version: Long!
Expand Down Expand Up @@ -5262,6 +5264,8 @@ input InventoryEntryDraft {
expectedDelivery: DateTime
supplyChannel: ResourceIdentifierInput
custom: CustomFieldsDraft
minCartQuantity: Long
maxCartQuantity: Long
}

type InventoryEntryQuantitySet implements MessagePayload {
Expand All @@ -5286,11 +5290,13 @@ input InventoryEntryUpdateAction {
addQuantity: AddInventoryEntryQuantity
changeQuantity: ChangeInventoryEntryQuantity
removeQuantity: RemoveInventoryEntryQuantity
setKey: SetInventoryKey
setRestockableInDays: SetInventoryEntryRestockableInDays
setExpectedDelivery: SetInventoryEntryExpectedDelivery
setSupplyChannel: SetInventoryEntrySupplyChannel
setCustomType: SetInventoryEntryCustomType
setCustomField: SetInventoryEntryCustomField
setInventoryLimits: SetInventoryLimits
}

enum InventoryMode {
Expand Down Expand Up @@ -12527,6 +12533,15 @@ input SetInventoryEntrySupplyChannel {
supplyChannel: ResourceIdentifierInput
}

input SetInventoryKey {
key: String
}

input SetInventoryLimits {
minCartQuantity: Int
maxCartQuantity: Int
}

"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
input SetLineItemRecurrenceInfo {
lineItemId: String!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
* <p>Creates an InventoryEntry in the Project.</p>
* <p>If quantity limits are provided, existing Line Items that reference a Product Variant with an SKU that matches the Inventory Entry can be affected. For more information, see Quantity limits.</p>
* <p>Produces the InventoryEntryCreated Message.</p>
*
* <hr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
* <p>Creates an InventoryEntry in the Project.</p>
* <p>If quantity limits are provided, existing Line Items that reference a Product Variant with an SKU that matches the Inventory Entry can be affected. For more information, see Quantity limits.</p>
* <p>Produces the InventoryEntryCreated Message.</p>
*
* <hr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* <p>When multiple shipping addresses are set for a Line Item, use the Remove LineItem and Add LineItem update action to change the shipping details. Since it is not possible for the API to infer how the overall change in the Line Item quantity should be distributed over the sub-quantities, the <code>shippingDetails</code> field is kept in its current state to avoid data loss.</p>
* <p>To change the Line Item quantity and shipping details together, use this update action in combination with the Set LineItem ShippingDetails update action in a single Cart update command.</p>
* <p>The LineItem price is set as described in Line Item price selection.</p>
* <p>This action is subject to InventoryEntry min/max restrictions when applicable. For more information, see Quantity limits.</p>
*
* <hr>
* Example to create an instance using the builder pattern
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* <p>When multiple shipping addresses are set for a Line Item, use the Remove LineItem and Add LineItem update action to change the shipping details. Since it is not possible for the API to infer how the overall change in the Line Item quantity should be distributed over the sub-quantities, the <code>shippingDetails</code> field is kept in its current state to avoid data loss.</p>
* <p>To change the Line Item quantity and shipping details together, use this update action in combination with the Set LineItem ShippingDetails update action in a single Cart update command.</p>
* <p>The LineItem price is set as described in Line Item price selection.</p>
* <p>This action is subject to InventoryEntry min/max restrictions when applicable. For more information, see Quantity limits.</p>
*/
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public class CartChangeLineItemQuantityActionImpl implements CartChangeLineItemQuantityAction, ModelBase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

/**
* <p>Performing this action does not reserve stock. Stock is only reserved at Order creation if the InventoryMode of the Cart is <code>TrackOnly</code> or <code>ReserveOnOrder</code>.</p>
* <p>This action is subject to InventoryEntry min/max restrictions when applicable. For more information, see Quantity limits.</p>
*
* <hr>
* Example to create an instance using the builder pattern
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

/**
* <p>Performing this action does not reserve stock. Stock is only reserved at Order creation if the InventoryMode of the Cart is <code>TrackOnly</code> or <code>ReserveOnOrder</code>.</p>
* <p>This action is subject to InventoryEntry min/max restrictions when applicable. For more information, see Quantity limits.</p>
*/
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public class CartSetLineItemSupplyChannelActionImpl implements CartSetLineItemSupplyChannelAction, ModelBase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,22 @@ public interface InventoryEntry
@JsonProperty("availableQuantity")
public Long getAvailableQuantity();

/**
* <p>Minimum quantity that can be added to a Cart. See Quantity limits.</p>
* @return minCartQuantity
*/

@JsonProperty("minCartQuantity")
public Integer getMinCartQuantity();

/**
* <p>Maximum quantity that can be added to a Cart. See Quantity limits.</p>
* @return maxCartQuantity
*/

@JsonProperty("maxCartQuantity")
public Integer getMaxCartQuantity();

/**
* <p>How often the InventoryEntry is restocked (in days).</p>
* @return restockableInDays
Expand Down Expand Up @@ -237,6 +253,20 @@ public interface InventoryEntry

public void setAvailableQuantity(final Long availableQuantity);

/**
* <p>Minimum quantity that can be added to a Cart. See Quantity limits.</p>
* @param minCartQuantity value to be set
*/

public void setMinCartQuantity(final Integer minCartQuantity);

/**
* <p>Maximum quantity that can be added to a Cart. See Quantity limits.</p>
* @param maxCartQuantity value to be set
*/

public void setMaxCartQuantity(final Integer maxCartQuantity);

/**
* <p>How often the InventoryEntry is restocked (in days).</p>
* @param restockableInDays value to be set
Expand Down Expand Up @@ -284,6 +314,8 @@ public static InventoryEntry of(final InventoryEntry template) {
instance.setSupplyChannel(template.getSupplyChannel());
instance.setQuantityOnStock(template.getQuantityOnStock());
instance.setAvailableQuantity(template.getAvailableQuantity());
instance.setMinCartQuantity(template.getMinCartQuantity());
instance.setMaxCartQuantity(template.getMaxCartQuantity());
instance.setRestockableInDays(template.getRestockableInDays());
instance.setExpectedDelivery(template.getExpectedDelivery());
instance.setCustom(template.getCustom());
Expand Down Expand Up @@ -316,6 +348,8 @@ public static InventoryEntry deepCopy(@Nullable final InventoryEntry template) {
com.commercetools.api.models.channel.ChannelReference.deepCopy(template.getSupplyChannel()));
instance.setQuantityOnStock(template.getQuantityOnStock());
instance.setAvailableQuantity(template.getAvailableQuantity());
instance.setMinCartQuantity(template.getMinCartQuantity());
instance.setMaxCartQuantity(template.getMaxCartQuantity());
instance.setRestockableInDays(template.getRestockableInDays());
instance.setExpectedDelivery(template.getExpectedDelivery());
instance.setCustom(com.commercetools.api.models.type.CustomFields.deepCopy(template.getCustom()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ public class InventoryEntryBuilder implements Builder<InventoryEntry> {

private Long availableQuantity;

@Nullable
private Integer minCartQuantity;

@Nullable
private Integer maxCartQuantity;

@Nullable
private Long restockableInDays;

Expand Down Expand Up @@ -260,6 +266,28 @@ public InventoryEntryBuilder availableQuantity(final Long availableQuantity) {
return this;
}

/**
* <p>Minimum quantity that can be added to a Cart. See Quantity limits.</p>
* @param minCartQuantity value to be set
* @return Builder
*/

public InventoryEntryBuilder minCartQuantity(@Nullable final Integer minCartQuantity) {
this.minCartQuantity = minCartQuantity;
return this;
}

/**
* <p>Maximum quantity that can be added to a Cart. See Quantity limits.</p>
* @param maxCartQuantity value to be set
* @return Builder
*/

public InventoryEntryBuilder maxCartQuantity(@Nullable final Integer maxCartQuantity) {
this.maxCartQuantity = maxCartQuantity;
return this;
}

/**
* <p>How often the InventoryEntry is restocked (in days).</p>
* @param restockableInDays value to be set
Expand Down Expand Up @@ -420,6 +448,26 @@ public Long getAvailableQuantity() {
return this.availableQuantity;
}

/**
* <p>Minimum quantity that can be added to a Cart. See Quantity limits.</p>
* @return minCartQuantity
*/

@Nullable
public Integer getMinCartQuantity() {
return this.minCartQuantity;
}

/**
* <p>Maximum quantity that can be added to a Cart. See Quantity limits.</p>
* @return maxCartQuantity
*/

@Nullable
public Integer getMaxCartQuantity() {
return this.maxCartQuantity;
}

/**
* <p>How often the InventoryEntry is restocked (in days).</p>
* @return restockableInDays
Expand Down Expand Up @@ -463,7 +511,8 @@ public InventoryEntry build() {
Objects.requireNonNull(quantityOnStock, InventoryEntry.class + ": quantityOnStock is missing");
Objects.requireNonNull(availableQuantity, InventoryEntry.class + ": availableQuantity is missing");
return new InventoryEntryImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, key, sku,
supplyChannel, quantityOnStock, availableQuantity, restockableInDays, expectedDelivery, custom);
supplyChannel, quantityOnStock, availableQuantity, minCartQuantity, maxCartQuantity, restockableInDays,
expectedDelivery, custom);
}

/**
Expand All @@ -472,7 +521,8 @@ public InventoryEntry build() {
*/
public InventoryEntry buildUnchecked() {
return new InventoryEntryImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, key, sku,
supplyChannel, quantityOnStock, availableQuantity, restockableInDays, expectedDelivery, custom);
supplyChannel, quantityOnStock, availableQuantity, minCartQuantity, maxCartQuantity, restockableInDays,
expectedDelivery, custom);
}

/**
Expand Down Expand Up @@ -501,6 +551,8 @@ public static InventoryEntryBuilder of(final InventoryEntry template) {
builder.supplyChannel = template.getSupplyChannel();
builder.quantityOnStock = template.getQuantityOnStock();
builder.availableQuantity = template.getAvailableQuantity();
builder.minCartQuantity = template.getMinCartQuantity();
builder.maxCartQuantity = template.getMaxCartQuantity();
builder.restockableInDays = template.getRestockableInDays();
builder.expectedDelivery = template.getExpectedDelivery();
builder.custom = template.getCustom();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,22 @@ public interface InventoryEntryDraft extends com.commercetools.api.models.Custom
@JsonProperty("quantityOnStock")
public Long getQuantityOnStock();

/**
* <p>Minimum quantity that can be added to a Cart. See Quantity limits.</p>
* @return minCartQuantity
*/

@JsonProperty("minCartQuantity")
public Integer getMinCartQuantity();

/**
* <p>Maximum quantity that can be added to a Cart. See Quantity limits.</p>
* @return maxCartQuantity
*/

@JsonProperty("maxCartQuantity")
public Integer getMaxCartQuantity();

/**
* <p>How often the InventoryEntry is restocked (in days).</p>
* @return restockableInDays
Expand Down Expand Up @@ -123,6 +139,20 @@ public interface InventoryEntryDraft extends com.commercetools.api.models.Custom

public void setQuantityOnStock(final Long quantityOnStock);

/**
* <p>Minimum quantity that can be added to a Cart. See Quantity limits.</p>
* @param minCartQuantity value to be set
*/

public void setMinCartQuantity(final Integer minCartQuantity);

/**
* <p>Maximum quantity that can be added to a Cart. See Quantity limits.</p>
* @param maxCartQuantity value to be set
*/

public void setMaxCartQuantity(final Integer maxCartQuantity);

/**
* <p>How often the InventoryEntry is restocked (in days).</p>
* @param restockableInDays value to be set
Expand Down Expand Up @@ -163,6 +193,8 @@ public static InventoryEntryDraft of(final InventoryEntryDraft template) {
instance.setKey(template.getKey());
instance.setSupplyChannel(template.getSupplyChannel());
instance.setQuantityOnStock(template.getQuantityOnStock());
instance.setMinCartQuantity(template.getMinCartQuantity());
instance.setMaxCartQuantity(template.getMaxCartQuantity());
instance.setRestockableInDays(template.getRestockableInDays());
instance.setExpectedDelivery(template.getExpectedDelivery());
instance.setCustom(template.getCustom());
Expand All @@ -187,6 +219,8 @@ public static InventoryEntryDraft deepCopy(@Nullable final InventoryEntryDraft t
instance.setSupplyChannel(
com.commercetools.api.models.channel.ChannelResourceIdentifier.deepCopy(template.getSupplyChannel()));
instance.setQuantityOnStock(template.getQuantityOnStock());
instance.setMinCartQuantity(template.getMinCartQuantity());
instance.setMaxCartQuantity(template.getMaxCartQuantity());
instance.setRestockableInDays(template.getRestockableInDays());
instance.setExpectedDelivery(template.getExpectedDelivery());
instance.setCustom(com.commercetools.api.models.type.CustomFieldsDraft.deepCopy(template.getCustom()));
Expand Down
Loading