Skip to content

Commit f7f3847

Browse files
Merge pull request #957 from commercetools/gen-sdk-updates
Update generated SDKs
2 parents 7dbb46d + d099c5e commit f7f3847

File tree

34 files changed

+817
-11
lines changed

34 files changed

+817
-11
lines changed

changes.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<details>
44
<summary>Added Type(s)</summary>
55

6+
- added type `InventoryEntrySetInventoryLimitsAction`
67
- added type `RecurringOrderDeletedMessage`
78
- added type `RecurringOrderExpiresAtSetMessage`
89
- added type `RecurringOrderDeletedMessagePayload`
@@ -32,6 +33,10 @@
3233
<details>
3334
<summary>Added Property(s)</summary>
3435

36+
- added property `minCartQuantity` to type `InventoryEntry`
37+
- added property `maxCartQuantity` to type `InventoryEntry`
38+
- added property `minCartQuantity` to type `InventoryEntryDraft`
39+
- added property `maxCartQuantity` to type `InventoryEntryDraft`
3540
- added property `expiresAt` to type `RecurringOrderDraft`
3641
</details>
3742

commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5233,6 +5233,8 @@ type InventoryEntry implements Versioned & ReferenceExpandable {
52335233
supplyChannel: Channel
52345234
expectedDelivery: DateTime
52355235
supplyChannelRef: Reference
5236+
minCartQuantity: Long
5237+
maxCartQuantity: Long
52365238
custom: CustomFieldsType
52375239
id: String!
52385240
version: Long!
@@ -5262,6 +5264,8 @@ input InventoryEntryDraft {
52625264
expectedDelivery: DateTime
52635265
supplyChannel: ResourceIdentifierInput
52645266
custom: CustomFieldsDraft
5267+
minCartQuantity: Long
5268+
maxCartQuantity: Long
52655269
}
52665270

52675271
type InventoryEntryQuantitySet implements MessagePayload {
@@ -5286,11 +5290,13 @@ input InventoryEntryUpdateAction {
52865290
addQuantity: AddInventoryEntryQuantity
52875291
changeQuantity: ChangeInventoryEntryQuantity
52885292
removeQuantity: RemoveInventoryEntryQuantity
5293+
setKey: SetInventoryKey
52895294
setRestockableInDays: SetInventoryEntryRestockableInDays
52905295
setExpectedDelivery: SetInventoryEntryExpectedDelivery
52915296
setSupplyChannel: SetInventoryEntrySupplyChannel
52925297
setCustomType: SetInventoryEntryCustomType
52935298
setCustomField: SetInventoryEntryCustomField
5299+
setInventoryLimits: SetInventoryLimits
52945300
}
52955301

52965302
enum InventoryMode {
@@ -12527,6 +12533,15 @@ input SetInventoryEntrySupplyChannel {
1252712533
supplyChannel: ResourceIdentifierInput
1252812534
}
1252912535

12536+
input SetInventoryKey {
12537+
key: String
12538+
}
12539+
12540+
input SetInventoryLimits {
12541+
minCartQuantity: Int
12542+
maxCartQuantity: Int
12543+
}
12544+
1253012545
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
1253112546
input SetLineItemRecurrenceInfo {
1253212547
lineItemId: String!

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInventoryPost.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
import org.apache.commons.lang3.builder.HashCodeBuilder;
2121

2222
/**
23+
* <p>Creates an InventoryEntry in the Project.</p>
24+
* <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>
2325
* <p>Produces the InventoryEntryCreated Message.</p>
2426
*
2527
* <hr>

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInventoryPostString.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
import org.apache.commons.lang3.builder.HashCodeBuilder;
2222

2323
/**
24+
* <p>Creates an InventoryEntry in the Project.</p>
25+
* <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>
2426
* <p>Produces the InventoryEntryCreated Message.</p>
2527
*
2628
* <hr>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* <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>
2121
* <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>
2222
* <p>The LineItem price is set as described in Line Item price selection.</p>
23+
* <p>This action is subject to InventoryEntry min/max restrictions when applicable. For more information, see Quantity limits.</p>
2324
*
2425
* <hr>
2526
* Example to create an instance using the builder pattern

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* <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>
2121
* <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>
2222
* <p>The LineItem price is set as described in Line Item price selection.</p>
23+
* <p>This action is subject to InventoryEntry min/max restrictions when applicable. For more information, see Quantity limits.</p>
2324
*/
2425
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
2526
public class CartChangeLineItemQuantityActionImpl implements CartChangeLineItemQuantityAction, ModelBase {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
/**
1919
* <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>
20+
* <p>This action is subject to InventoryEntry min/max restrictions when applicable. For more information, see Quantity limits.</p>
2021
*
2122
* <hr>
2223
* Example to create an instance using the builder pattern

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
/**
2020
* <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>
21+
* <p>This action is subject to InventoryEntry min/max restrictions when applicable. For more information, see Quantity limits.</p>
2122
*/
2223
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
2324
public class CartSetLineItemSupplyChannelActionImpl implements CartSetLineItemSupplyChannelAction, ModelBase {

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/inventory/InventoryEntry.java

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,22 @@ public interface InventoryEntry
136136
@JsonProperty("availableQuantity")
137137
public Long getAvailableQuantity();
138138

139+
/**
140+
* <p>Minimum quantity that can be added to a Cart. See Quantity limits.</p>
141+
* @return minCartQuantity
142+
*/
143+
144+
@JsonProperty("minCartQuantity")
145+
public Integer getMinCartQuantity();
146+
147+
/**
148+
* <p>Maximum quantity that can be added to a Cart. See Quantity limits.</p>
149+
* @return maxCartQuantity
150+
*/
151+
152+
@JsonProperty("maxCartQuantity")
153+
public Integer getMaxCartQuantity();
154+
139155
/**
140156
* <p>How often the InventoryEntry is restocked (in days).</p>
141157
* @return restockableInDays
@@ -237,6 +253,20 @@ public interface InventoryEntry
237253

238254
public void setAvailableQuantity(final Long availableQuantity);
239255

256+
/**
257+
* <p>Minimum quantity that can be added to a Cart. See Quantity limits.</p>
258+
* @param minCartQuantity value to be set
259+
*/
260+
261+
public void setMinCartQuantity(final Integer minCartQuantity);
262+
263+
/**
264+
* <p>Maximum quantity that can be added to a Cart. See Quantity limits.</p>
265+
* @param maxCartQuantity value to be set
266+
*/
267+
268+
public void setMaxCartQuantity(final Integer maxCartQuantity);
269+
240270
/**
241271
* <p>How often the InventoryEntry is restocked (in days).</p>
242272
* @param restockableInDays value to be set
@@ -284,6 +314,8 @@ public static InventoryEntry of(final InventoryEntry template) {
284314
instance.setSupplyChannel(template.getSupplyChannel());
285315
instance.setQuantityOnStock(template.getQuantityOnStock());
286316
instance.setAvailableQuantity(template.getAvailableQuantity());
317+
instance.setMinCartQuantity(template.getMinCartQuantity());
318+
instance.setMaxCartQuantity(template.getMaxCartQuantity());
287319
instance.setRestockableInDays(template.getRestockableInDays());
288320
instance.setExpectedDelivery(template.getExpectedDelivery());
289321
instance.setCustom(template.getCustom());
@@ -316,6 +348,8 @@ public static InventoryEntry deepCopy(@Nullable final InventoryEntry template) {
316348
com.commercetools.api.models.channel.ChannelReference.deepCopy(template.getSupplyChannel()));
317349
instance.setQuantityOnStock(template.getQuantityOnStock());
318350
instance.setAvailableQuantity(template.getAvailableQuantity());
351+
instance.setMinCartQuantity(template.getMinCartQuantity());
352+
instance.setMaxCartQuantity(template.getMaxCartQuantity());
319353
instance.setRestockableInDays(template.getRestockableInDays());
320354
instance.setExpectedDelivery(template.getExpectedDelivery());
321355
instance.setCustom(com.commercetools.api.models.type.CustomFields.deepCopy(template.getCustom()));

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/inventory/InventoryEntryBuilder.java

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ public class InventoryEntryBuilder implements Builder<InventoryEntry> {
5656

5757
private Long availableQuantity;
5858

59+
@Nullable
60+
private Integer minCartQuantity;
61+
62+
@Nullable
63+
private Integer maxCartQuantity;
64+
5965
@Nullable
6066
private Long restockableInDays;
6167

@@ -260,6 +266,28 @@ public InventoryEntryBuilder availableQuantity(final Long availableQuantity) {
260266
return this;
261267
}
262268

269+
/**
270+
* <p>Minimum quantity that can be added to a Cart. See Quantity limits.</p>
271+
* @param minCartQuantity value to be set
272+
* @return Builder
273+
*/
274+
275+
public InventoryEntryBuilder minCartQuantity(@Nullable final Integer minCartQuantity) {
276+
this.minCartQuantity = minCartQuantity;
277+
return this;
278+
}
279+
280+
/**
281+
* <p>Maximum quantity that can be added to a Cart. See Quantity limits.</p>
282+
* @param maxCartQuantity value to be set
283+
* @return Builder
284+
*/
285+
286+
public InventoryEntryBuilder maxCartQuantity(@Nullable final Integer maxCartQuantity) {
287+
this.maxCartQuantity = maxCartQuantity;
288+
return this;
289+
}
290+
263291
/**
264292
* <p>How often the InventoryEntry is restocked (in days).</p>
265293
* @param restockableInDays value to be set
@@ -420,6 +448,26 @@ public Long getAvailableQuantity() {
420448
return this.availableQuantity;
421449
}
422450

451+
/**
452+
* <p>Minimum quantity that can be added to a Cart. See Quantity limits.</p>
453+
* @return minCartQuantity
454+
*/
455+
456+
@Nullable
457+
public Integer getMinCartQuantity() {
458+
return this.minCartQuantity;
459+
}
460+
461+
/**
462+
* <p>Maximum quantity that can be added to a Cart. See Quantity limits.</p>
463+
* @return maxCartQuantity
464+
*/
465+
466+
@Nullable
467+
public Integer getMaxCartQuantity() {
468+
return this.maxCartQuantity;
469+
}
470+
423471
/**
424472
* <p>How often the InventoryEntry is restocked (in days).</p>
425473
* @return restockableInDays
@@ -463,7 +511,8 @@ public InventoryEntry build() {
463511
Objects.requireNonNull(quantityOnStock, InventoryEntry.class + ": quantityOnStock is missing");
464512
Objects.requireNonNull(availableQuantity, InventoryEntry.class + ": availableQuantity is missing");
465513
return new InventoryEntryImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, key, sku,
466-
supplyChannel, quantityOnStock, availableQuantity, restockableInDays, expectedDelivery, custom);
514+
supplyChannel, quantityOnStock, availableQuantity, minCartQuantity, maxCartQuantity, restockableInDays,
515+
expectedDelivery, custom);
467516
}
468517

469518
/**
@@ -472,7 +521,8 @@ public InventoryEntry build() {
472521
*/
473522
public InventoryEntry buildUnchecked() {
474523
return new InventoryEntryImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, key, sku,
475-
supplyChannel, quantityOnStock, availableQuantity, restockableInDays, expectedDelivery, custom);
524+
supplyChannel, quantityOnStock, availableQuantity, minCartQuantity, maxCartQuantity, restockableInDays,
525+
expectedDelivery, custom);
476526
}
477527

478528
/**
@@ -501,6 +551,8 @@ public static InventoryEntryBuilder of(final InventoryEntry template) {
501551
builder.supplyChannel = template.getSupplyChannel();
502552
builder.quantityOnStock = template.getQuantityOnStock();
503553
builder.availableQuantity = template.getAvailableQuantity();
554+
builder.minCartQuantity = template.getMinCartQuantity();
555+
builder.maxCartQuantity = template.getMaxCartQuantity();
504556
builder.restockableInDays = template.getRestockableInDays();
505557
builder.expectedDelivery = template.getExpectedDelivery();
506558
builder.custom = template.getCustom();

0 commit comments

Comments
 (0)