Skip to content

Commit

Permalink
build(codegen): updating SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
ct-sdks[bot] committed Jan 13, 2025
1 parent 18ea89e commit a77ee7f
Show file tree
Hide file tree
Showing 8 changed files with 110 additions and 81 deletions.
28 changes: 21 additions & 7 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,22 @@
</details>


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

- :warning: changed property `triggerPattern` of type `CartDiscountPatternTarget` to be required
</details>


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

- added property `inheritedStores` to type `BusinessUnit`
- added property `inheritedStores` to type `Company`
- added property `inheritedStores` to type `Division`
</details>


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

Expand All @@ -25,21 +41,19 @@
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().withId().delete()`
</details>

**History changes**

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

- added property `inheritedStores` to type `BusinessUnit`
- added property `inheritedStores` to type `Company`
- added property `inheritedStores` to type `Division`
- :warning: changed property `extensions` of type `GraphQLError` from type `GraphQLErrorObject` to `object`
</details>

**History changes**

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

- :warning: changed property `extensions` of type `GraphQLError` from type `GraphQLErrorObject` to `object`
- :warning: changed property `triggerPattern` of type `ChangeTargetPatternChangeValue` to be required
</details>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* <div class=code-example>
* <pre><code class='java'>
* CartDiscountPatternTarget cartDiscountPatternTarget = CartDiscountPatternTarget.builder()
* .plusTriggerPattern(triggerPatternBuilder -> triggerPatternBuilder)
* .plusTargetPattern(targetPatternBuilder -> targetPatternBuilder)
* .selectionMode(SelectionMode.CHEAPEST)
* .build()
Expand All @@ -41,18 +42,20 @@ public interface CartDiscountPatternTarget extends CartDiscountTarget {
String PATTERN = "pattern";

/**
* <p>Units of a (Custom) Line Item that trigger a discount application.</p>
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, effecting the number of times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
* <p>If empty or not set, the Discount will apply indefinitely.</p>
* <p>Defines the set of units of (Custom) Line Items in a Cart that trigger a discount application.</p>
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, limiting the number of maximum times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
* <p>If empty, the Discount will apply indefinitely.</p>
* @return triggerPattern
*/
@NotNull
@Valid
@JsonProperty("triggerPattern")
public List<PatternComponent> getTriggerPattern();

/**
* <p>Units of (Custom) Line Items on which the Discount is applied.</p>
* <p>Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.</p>
* <p>Based on the availability of matching units and the limits from the <code>triggerPattern</code> or <code>maxOccurence</code>, the <code>targetPattern</code> can match multiple times.</p>
* <p>This array cannot be empty.</p>
* @return targetPattern
*/
@NotNull
Expand All @@ -78,36 +81,38 @@ public interface CartDiscountPatternTarget extends CartDiscountTarget {
public SelectionMode getSelectionMode();

/**
* <p>Units of a (Custom) Line Item that trigger a discount application.</p>
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, effecting the number of times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
* <p>If empty or not set, the Discount will apply indefinitely.</p>
* <p>Defines the set of units of (Custom) Line Items in a Cart that trigger a discount application.</p>
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, limiting the number of maximum times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
* <p>If empty, the Discount will apply indefinitely.</p>
* @param triggerPattern values to be set
*/

@JsonIgnore
public void setTriggerPattern(final PatternComponent... triggerPattern);

/**
* <p>Units of a (Custom) Line Item that trigger a discount application.</p>
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, effecting the number of times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
* <p>If empty or not set, the Discount will apply indefinitely.</p>
* <p>Defines the set of units of (Custom) Line Items in a Cart that trigger a discount application.</p>
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, limiting the number of maximum times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
* <p>If empty, the Discount will apply indefinitely.</p>
* @param triggerPattern values to be set
*/

public void setTriggerPattern(final List<PatternComponent> triggerPattern);

/**
* <p>Units of (Custom) Line Items on which the Discount is applied.</p>
* <p>Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.</p>
* <p>Based on the availability of matching units and the limits from the <code>triggerPattern</code> or <code>maxOccurence</code>, the <code>targetPattern</code> can match multiple times.</p>
* <p>This array cannot be empty.</p>
* @param targetPattern values to be set
*/

@JsonIgnore
public void setTargetPattern(final PatternComponent... targetPattern);

/**
* <p>Units of (Custom) Line Items on which the Discount is applied.</p>
* <p>Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.</p>
* <p>Based on the availability of matching units and the limits from the <code>triggerPattern</code> or <code>maxOccurence</code>, the <code>targetPattern</code> can match multiple times.</p>
* <p>This array cannot be empty.</p>
* @param targetPattern values to be set
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* <div class=code-example>
* <pre><code class='java'>
* CartDiscountPatternTarget cartDiscountPatternTarget = CartDiscountPatternTarget.builder()
* .plusTriggerPattern(triggerPatternBuilder -> triggerPatternBuilder)
* .plusTargetPattern(targetPatternBuilder -> targetPatternBuilder)
* .selectionMode(SelectionMode.CHEAPEST)
* .build()
Expand All @@ -25,7 +26,6 @@
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public class CartDiscountPatternTargetBuilder implements Builder<CartDiscountPatternTarget> {

@Nullable
private java.util.List<com.commercetools.api.models.cart_discount.PatternComponent> triggerPattern;

private java.util.List<com.commercetools.api.models.cart_discount.PatternComponent> targetPattern;
Expand All @@ -36,43 +36,43 @@ public class CartDiscountPatternTargetBuilder implements Builder<CartDiscountPat
private com.commercetools.api.models.cart_discount.SelectionMode selectionMode;

/**
* <p>Units of a (Custom) Line Item that trigger a discount application.</p>
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, effecting the number of times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
* <p>If empty or not set, the Discount will apply indefinitely.</p>
* <p>Defines the set of units of (Custom) Line Items in a Cart that trigger a discount application.</p>
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, limiting the number of maximum times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
* <p>If empty, the Discount will apply indefinitely.</p>
* @param triggerPattern value to be set
* @return Builder
*/

public CartDiscountPatternTargetBuilder triggerPattern(
@Nullable final com.commercetools.api.models.cart_discount.PatternComponent... triggerPattern) {
final com.commercetools.api.models.cart_discount.PatternComponent... triggerPattern) {
this.triggerPattern = new ArrayList<>(Arrays.asList(triggerPattern));
return this;
}

/**
* <p>Units of a (Custom) Line Item that trigger a discount application.</p>
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, effecting the number of times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
* <p>If empty or not set, the Discount will apply indefinitely.</p>
* <p>Defines the set of units of (Custom) Line Items in a Cart that trigger a discount application.</p>
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, limiting the number of maximum times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
* <p>If empty, the Discount will apply indefinitely.</p>
* @param triggerPattern value to be set
* @return Builder
*/

public CartDiscountPatternTargetBuilder triggerPattern(
@Nullable final java.util.List<com.commercetools.api.models.cart_discount.PatternComponent> triggerPattern) {
final java.util.List<com.commercetools.api.models.cart_discount.PatternComponent> triggerPattern) {
this.triggerPattern = triggerPattern;
return this;
}

/**
* <p>Units of a (Custom) Line Item that trigger a discount application.</p>
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, effecting the number of times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
* <p>If empty or not set, the Discount will apply indefinitely.</p>
* <p>Defines the set of units of (Custom) Line Items in a Cart that trigger a discount application.</p>
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, limiting the number of maximum times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
* <p>If empty, the Discount will apply indefinitely.</p>
* @param triggerPattern value to be set
* @return Builder
*/

public CartDiscountPatternTargetBuilder plusTriggerPattern(
@Nullable final com.commercetools.api.models.cart_discount.PatternComponent... triggerPattern) {
final com.commercetools.api.models.cart_discount.PatternComponent... triggerPattern) {
if (this.triggerPattern == null) {
this.triggerPattern = new ArrayList<>();
}
Expand All @@ -81,9 +81,9 @@ public CartDiscountPatternTargetBuilder plusTriggerPattern(
}

/**
* <p>Units of a (Custom) Line Item that trigger a discount application.</p>
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, effecting the number of times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
* <p>If empty or not set, the Discount will apply indefinitely.</p>
* <p>Defines the set of units of (Custom) Line Items in a Cart that trigger a discount application.</p>
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, limiting the number of maximum times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
* <p>If empty, the Discount will apply indefinitely.</p>
* @param builder function to build the triggerPattern value
* @return Builder
*/
Expand All @@ -99,9 +99,9 @@ public CartDiscountPatternTargetBuilder plusTriggerPattern(
}

/**
* <p>Units of a (Custom) Line Item that trigger a discount application.</p>
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, effecting the number of times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
* <p>If empty or not set, the Discount will apply indefinitely.</p>
* <p>Defines the set of units of (Custom) Line Items in a Cart that trigger a discount application.</p>
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, limiting the number of maximum times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
* <p>If empty, the Discount will apply indefinitely.</p>
* @param builder function to build the triggerPattern value
* @return Builder
*/
Expand All @@ -115,8 +115,9 @@ public CartDiscountPatternTargetBuilder withTriggerPattern(
}

/**
* <p>Units of (Custom) Line Items on which the Discount is applied.</p>
* <p>Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.</p>
* <p>Based on the availability of matching units and the limits from the <code>triggerPattern</code> or <code>maxOccurence</code>, the <code>targetPattern</code> can match multiple times.</p>
* <p>This array cannot be empty.</p>
* @param targetPattern value to be set
* @return Builder
*/
Expand All @@ -128,8 +129,9 @@ public CartDiscountPatternTargetBuilder targetPattern(
}

/**
* <p>Units of (Custom) Line Items on which the Discount is applied.</p>
* <p>Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.</p>
* <p>Based on the availability of matching units and the limits from the <code>triggerPattern</code> or <code>maxOccurence</code>, the <code>targetPattern</code> can match multiple times.</p>
* <p>This array cannot be empty.</p>
* @param targetPattern value to be set
* @return Builder
*/
Expand All @@ -141,8 +143,9 @@ public CartDiscountPatternTargetBuilder targetPattern(
}

/**
* <p>Units of (Custom) Line Items on which the Discount is applied.</p>
* <p>Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.</p>
* <p>Based on the availability of matching units and the limits from the <code>triggerPattern</code> or <code>maxOccurence</code>, the <code>targetPattern</code> can match multiple times.</p>
* <p>This array cannot be empty.</p>
* @param targetPattern value to be set
* @return Builder
*/
Expand All @@ -157,8 +160,9 @@ public CartDiscountPatternTargetBuilder plusTargetPattern(
}

/**
* <p>Units of (Custom) Line Items on which the Discount is applied.</p>
* <p>Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.</p>
* <p>Based on the availability of matching units and the limits from the <code>triggerPattern</code> or <code>maxOccurence</code>, the <code>targetPattern</code> can match multiple times.</p>
* <p>This array cannot be empty.</p>
* @param builder function to build the targetPattern value
* @return Builder
*/
Expand All @@ -174,8 +178,9 @@ public CartDiscountPatternTargetBuilder plusTargetPattern(
}

/**
* <p>Units of (Custom) Line Items on which the Discount is applied.</p>
* <p>Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.</p>
* <p>Based on the availability of matching units and the limits from the <code>triggerPattern</code> or <code>maxOccurence</code>, the <code>targetPattern</code> can match multiple times.</p>
* <p>This array cannot be empty.</p>
* @param builder function to build the targetPattern value
* @return Builder
*/
Expand Down Expand Up @@ -213,20 +218,20 @@ public CartDiscountPatternTargetBuilder selectionMode(
}

/**
* <p>Units of a (Custom) Line Item that trigger a discount application.</p>
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, effecting the number of times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
* <p>If empty or not set, the Discount will apply indefinitely.</p>
* <p>Defines the set of units of (Custom) Line Items in a Cart that trigger a discount application.</p>
* <p>Based on the availability of matching units, the <code>triggerPattern</code> can match multiple times, limiting the number of maximum times the discount will be applied. To further limit the discount application, set the <code>maxOccurrence</code>.</p>
* <p>If empty, the Discount will apply indefinitely.</p>
* @return triggerPattern
*/

@Nullable
public java.util.List<com.commercetools.api.models.cart_discount.PatternComponent> getTriggerPattern() {
return this.triggerPattern;
}

/**
* <p>Units of (Custom) Line Items on which the Discount is applied.</p>
* <p>Defines the set of units of (Custom) Line Items in a Cart on which the Discount is applied.</p>
* <p>Based on the availability of matching units and the limits from the <code>triggerPattern</code> or <code>maxOccurence</code>, the <code>targetPattern</code> can match multiple times.</p>
* <p>This array cannot be empty.</p>
* @return targetPattern
*/

Expand Down Expand Up @@ -259,6 +264,7 @@ public com.commercetools.api.models.cart_discount.SelectionMode getSelectionMode
* @return CartDiscountPatternTarget
*/
public CartDiscountPatternTarget build() {
Objects.requireNonNull(triggerPattern, CartDiscountPatternTarget.class + ": triggerPattern is missing");
Objects.requireNonNull(targetPattern, CartDiscountPatternTarget.class + ": targetPattern is missing");
Objects.requireNonNull(selectionMode, CartDiscountPatternTarget.class + ": selectionMode is missing");
return new CartDiscountPatternTargetImpl(triggerPattern, targetPattern, maxOccurrence, selectionMode);
Expand Down
Loading

0 comments on commit a77ee7f

Please sign in to comment.