From e19c0c367f586160958d1f039e832775fa80ed9f Mon Sep 17 00:00:00 2001
From: "ct-sdks[bot]" <153784748+ct-sdks[bot]@users.noreply.github.com>
Date: Tue, 7 Jul 2026 16:09:42 +0000
Subject: [PATCH 01/17] build(codegen): updating SDK
---
.../src/main/resources/graphql/schema.graphqls | 4 ++--
reference.txt | 1 +
references.txt | 1 +
3 files changed, 4 insertions(+), 2 deletions(-)
create mode 100644 reference.txt
diff --git a/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls b/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls
index 6d69029b65..ddec9b7bf0 100644
--- a/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls
+++ b/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls
@@ -1830,8 +1830,8 @@ type McpServerTypeCatalogEntry {
type McpServerCatalogTool {
name: String!
description: String
- operationType: McpToolOperationType!
- groups: [String!]!
+ operationType: McpToolOperationType
+ groups: [String!]
}
type Product implements Versioned & ReviewTarget & ReferenceExpandable {
diff --git a/reference.txt b/reference.txt
new file mode 100644
index 0000000000..3223e1e190
--- /dev/null
+++ b/reference.txt
@@ -0,0 +1 @@
+0fd20527a3590275d0224f6daba460c9ae55f4c7
diff --git a/references.txt b/references.txt
index 853434ff57..ae2dc1bcff 100644
--- a/references.txt
+++ b/references.txt
@@ -583,3 +583,4 @@ c9cd63b8b3c149eb27bc2f2a62dffa68ea137d8b
d4c439f7fc7dd0ad0d9d85c9e69cd5f32609af3d
6ff4467597dad93dc5797d057b1b6181ae49514d
2e41f003e889de240f6a92aa143c3103ea348e54
+eba9a59893b6b3e86b86d17cf2c33986232bc543
From 9de05f8a7976894095b8abcca7afb79111e82914 Mon Sep 17 00:00:00 2001
From: "ct-sdks[bot]" <153784748+ct-sdks[bot]@users.noreply.github.com>
Date: Thu, 9 Jul 2026 11:25:42 +0000
Subject: [PATCH 02/17] build(codegen): updating SDK
---
.../api/models/subscription/SubscriptionHealthStatus.java | 2 +-
references.txt | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/SubscriptionHealthStatus.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/SubscriptionHealthStatus.java
index 3a9a2cb3f4..7f5ccd371d 100644
--- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/SubscriptionHealthStatus.java
+++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/SubscriptionHealthStatus.java
@@ -23,7 +23,7 @@ public interface SubscriptionHealthStatus extends JsonEnum {
Notifications cannot be delivered with the current configuration. Common causes are deleting the Destination queue, deleting access credentials, or removing necessary permissions. You can fix the configuration by re-creating the configuration on the Destination side, or by setting a new configuration with the Change Destination update action. After the configuration is fixed, undelivered notifications will be delivered and the status will change to Healthy. ConfigurationError is automatically turned into ConfigurationErrorDeliveryStopped after some time. For more information, see Delivery Guarantees.
*/
SubscriptionHealthStatus CONFIGURATION_ERROR = SubscriptionHealthStatusEnum.CONFIGURATION_ERROR;
/**
- Does not deliver notifications with the current configuration and the delivery of the notifications is no longer attempted. After the configuration is fixed, undelivered notifications are not retained and will not be delivered. The status will change to Healthy as soon as new notifications can be delivered.
*/
+ Does not deliver notifications with the current configuration and the delivery of the notifications is no longer attempted. After the configuration is fixed, undelivered notifications are not retained and will not be delivered. The status will not automatically change to Healthy. To return your Subscription to a Healthy status, use the Change Destination update action or recreate the Subscription.
*/
SubscriptionHealthStatus CONFIGURATION_ERROR_DELIVERY_STOPPED = SubscriptionHealthStatusEnum.CONFIGURATION_ERROR_DELIVERY_STOPPED;
/**
Does not deliver notifications temporarily due to reasons other than a configuration error. For example, the Destination has a temporary outage.
*/
diff --git a/references.txt b/references.txt
index ae2dc1bcff..a37ed941d4 100644
--- a/references.txt
+++ b/references.txt
@@ -584,3 +584,4 @@ d4c439f7fc7dd0ad0d9d85c9e69cd5f32609af3d
6ff4467597dad93dc5797d057b1b6181ae49514d
2e41f003e889de240f6a92aa143c3103ea348e54
eba9a59893b6b3e86b86d17cf2c33986232bc543
+a9e9771fe2b7eca7651b0ca5fef4992d4df8b21c
From 937e412c628d9e86c7c7e9c919dd0761bfe0681b Mon Sep 17 00:00:00 2001
From: "ct-sdks[bot]" <153784748+ct-sdks[bot]@users.noreply.github.com>
Date: Thu, 9 Jul 2026 13:35:35 +0000
Subject: [PATCH 03/17] build(codegen): updating SDK
---
changes.md | 204 +-----
...toreKeyByStoreKeyDiscountCodesByIDGet.java | 228 ++++++
...oreKeyByStoreKeyDiscountCodesByIDHead.java | 137 ++++
...oreKeyDiscountCodesByIDRequestBuilder.java | 31 +
...yInStoreKeyByStoreKeyDiscountCodesGet.java | 689 ++++++++++++++++++
...InStoreKeyByStoreKeyDiscountCodesHead.java | 209 ++++++
...KeyByStoreKeyDiscountCodesKeyByKeyGet.java | 231 ++++++
...eyByStoreKeyDiscountCodesKeyByKeyHead.java | 138 ++++
...eyDiscountCodesKeyByKeyRequestBuilder.java | 31 +
...ByStoreKeyDiscountCodesRequestBuilder.java | 39 +
...KeyInStoreKeyByStoreKeyRequestBuilder.java | 4 +
.../models/discount_code/DiscountCode.java | 35 +
.../discount_code/DiscountCodeBuilder.java | 113 ++-
.../discount_code/DiscountCodeImpl.java | 25 +
.../DiscountCodeQueryBuilderDsl.java | 13 +
...oreKeyByStoreKeyDiscountCodesByIDTest.java | 106 +++
...eyByStoreKeyDiscountCodesKeyByKeyTest.java | 107 +++
...InStoreKeyByStoreKeyDiscountCodesTest.java | 191 +++++
.../discount_code/DiscountCodeTest.java | 12 +
references.txt | 1 +
20 files changed, 2348 insertions(+), 196 deletions(-)
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDHead.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDRequestBuilder.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyHead.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyRequestBuilder.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesRequestBuilder.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDTest.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyTest.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesTest.java
diff --git a/changes.md b/changes.md
index 662adc79ee..5bfe2f2196 100644
--- a/changes.md
+++ b/changes.md
@@ -1,213 +1,29 @@
**Api changes**
-
-Added Type(s)
-
-- added type `BulkOperationMaxItemsExceededError`
-- added type `OverlappingPriceValidityError`
-- added type `GraphQLBulkOperationMaxItemsExceededError`
-- added type `GraphQLOverlappingPriceValidityError`
-- added type `CartLockedMessage`
-- added type `CartUnlockedMessage`
-- added type `VariantCreatedMessage`
-- added type `VariantDeletedMessage`
-- added type `VariantImageAddedMessage`
-- added type `VariantImagesSetMessage`
-- added type `VariantKeySetMessage`
-- added type `VariantPublishedMessage`
-- added type `VariantSkuSetMessage`
-- added type `VariantStagedChangesRemovedMessage`
-- added type `VariantUnpublishedMessage`
-- added type `CartLockedMessagePayload`
-- added type `CartUnlockedMessagePayload`
-- added type `VariantCreatedMessagePayload`
-- added type `VariantDeletedMessagePayload`
-- added type `VariantImageAddedMessagePayload`
-- added type `VariantImagesSetMessagePayload`
-- added type `VariantKeySetMessagePayload`
-- added type `VariantPublishedMessagePayload`
-- added type `VariantSkuSetMessagePayload`
-- added type `VariantStagedChangesRemovedMessagePayload`
-- added type `VariantUnpublishedMessagePayload`
-- added type `ProductSetDefaultVariantAction`
-- added type `ProductCatalogModel`
-- added type `ProjectSetProductCatalogModelAction`
-- added type `ShippingMethodAddStoreAction`
-- added type `ShippingMethodRemoveStoreAction`
-- added type `ShippingMethodSetStoresAction`
-- added type `VariantAttributes`
-- added type `VariantAttributesAttributeMetadata`
-- added type `VariantAttributesAvailability`
-- added type `VariantAttributesChannelAvailability`
-- added type `VariantAttributesChannelAvailabilityMap`
-- added type `VariantAttributesVariant`
-- added type `Variant`
-- added type `VariantBulkUpdate`
-- added type `VariantBulkUpdateFailResult`
-- added type `VariantBulkUpdateItem`
-- added type `VariantBulkUpdateResource`
-- added type `VariantBulkUpdateResponse`
-- added type `VariantBulkUpdateResult`
-- added type `VariantBulkUpdateSuccessResult`
-- added type `VariantData`
-- added type `VariantDraft`
-- added type `VariantPagedQueryResponse`
-- added type `VariantProjection`
-- added type `VariantProjectionPagedQueryResponse`
-- added type `VariantReference`
-- added type `VariantResourceIdentifier`
-- added type `VariantUpdate`
-- added type `VariantUpdateAction`
-- added type `VariantAddAssetAction`
-- added type `VariantAddExternalImageAction`
-- added type `VariantChangeAssetNameAction`
-- added type `VariantChangeAssetOrderAction`
-- added type `VariantPublishAction`
-- added type `VariantRemoveAssetAction`
-- added type `VariantRemoveImageAction`
-- added type `VariantRemoveStagedChangesAction`
-- added type `VariantSetAssetCustomFieldAction`
-- added type `VariantSetAssetCustomTypeAction`
-- added type `VariantSetAssetDescriptionAction`
-- added type `VariantSetAssetKeyAction`
-- added type `VariantSetAssetSourcesAction`
-- added type `VariantSetAssetTagsAction`
-- added type `VariantSetAssetsAction`
-- added type `VariantSetAttributeAction`
-- added type `VariantSetAttributesAction`
-- added type `VariantSetImagesAction`
-- added type `VariantSetKeyAction`
-- added type `VariantSetSkuAction`
-- added type `VariantUnpublishAction`
-
-
-
-
-Added QueryParameter(s)
-
-- added query parameter `dataErasure` to method `delete /{projectKey}/business-units/key={key}`
-- added query parameter `dataErasure` to method `delete /{projectKey}/business-units/{ID}`
-- added query parameter `dataErasure` to method `delete /{projectKey}/in-store/key={storeKey}/business-units/key={key}`
-- added query parameter `dataErasure` to method `delete /{projectKey}/in-store/key={storeKey}/business-units/{ID}`
-
-
-
Added Resource(s)
-- added resource `/{projectKey}/variant-projections`
-- added resource `/{projectKey}/variants`
-- added resource `/{projectKey}/product-projections/key={key}/variant-attributes`
-- added resource `/{projectKey}/product-projections/{ID}/variant-attributes`
-- added resource `/{projectKey}/variant-projections/key={key}`
-- added resource `/{projectKey}/variant-projections/{ID}`
-- added resource `/{projectKey}/variants/bulk`
-- added resource `/{projectKey}/variants/key={key}`
-- added resource `/{projectKey}/variants/{ID}`
-- added resource `/{projectKey}/in-store/key={storeKey}/variant-projections`
-- added resource `/{projectKey}/in-store/key={storeKey}/product-projections/key={key}/variant-attributes`
-- added resource `/{projectKey}/in-store/key={storeKey}/product-projections/{ID}/variant-attributes`
-- added resource `/{projectKey}/in-store/key={storeKey}/variant-projections/key={key}`
-- added resource `/{projectKey}/in-store/key={storeKey}/variant-projections/{ID}`
+- added resource `/{projectKey}/in-store/key={storeKey}/discount-codes`
+- added resource `/{projectKey}/in-store/key={storeKey}/discount-codes/key={key}`
+- added resource `/{projectKey}/in-store/key={storeKey}/discount-codes/{ID}`
Added Property(s)
-- added property `defaultVariant` to type `ProductData`
-- added property `productCatalogModel` to type `Project`
-- added property `stores` to type `ShippingMethod`
-- added property `stores` to type `ShippingMethodDraft`
+- added property `stores` to type `DiscountCode`
Added Method(s)
-- added method `apiRoot.withProjectKey().variantProjections().get()`
-- added method `apiRoot.withProjectKey().variantProjections().head()`
-- added method `apiRoot.withProjectKey().variants().get()`
-- added method `apiRoot.withProjectKey().variants().post()`
-- added method `apiRoot.withProjectKey().variants().head()`
-- added method `apiRoot.withProjectKey().productProjections().withKey().variantAttributes().get()`
-- added method `apiRoot.withProjectKey().productProjections().withId().variantAttributes().get()`
-- added method `apiRoot.withProjectKey().variantProjections().withKey().get()`
-- added method `apiRoot.withProjectKey().variantProjections().withKey().head()`
-- added method `apiRoot.withProjectKey().variantProjections().withId().get()`
-- added method `apiRoot.withProjectKey().variantProjections().withId().head()`
-- added method `apiRoot.withProjectKey().variants().bulk().post()`
-- added method `apiRoot.withProjectKey().variants().withKey().get()`
-- added method `apiRoot.withProjectKey().variants().withKey().head()`
-- added method `apiRoot.withProjectKey().variants().withKey().post()`
-- added method `apiRoot.withProjectKey().variants().withKey().delete()`
-- added method `apiRoot.withProjectKey().variants().withId().get()`
-- added method `apiRoot.withProjectKey().variants().withId().head()`
-- added method `apiRoot.withProjectKey().variants().withId().post()`
-- added method `apiRoot.withProjectKey().variants().withId().delete()`
-- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().variantProjections().get()`
-- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().variantProjections().head()`
-- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().productProjections().withKey().variantAttributes().get()`
-- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().productProjections().withId().variantAttributes().get()`
-- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().variantProjections().withKey().get()`
-- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().variantProjections().withKey().head()`
-- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().variantProjections().withId().get()`
-- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().variantProjections().withId().head()`
-
-
-
-
-Added Enum(s)
-
-- added enum `variant` to type `ReferenceTypeId`
-
-
-**Import changes**
-
-
-Added Type(s)
-
-- added type `VariantImportRequest`
-- added type `VariantImport`
-
-
-
-
-Added Resource(s)
-
-- added resource `/{projectKey}/variants`
-- added resource `/{projectKey}/variants/import-containers`
-- added resource `/{projectKey}/variants/import-containers/{importContainerKey}`
-
-
-
-
-Added Method(s)
-
-- added method `apiRoot.withProjectKeyValue().variants().importContainers().withImportContainerKeyValue().post()`
-
-
-
-
-Added Enum(s)
-
-- added enum `variant` to type `ImportResourceType`
-- added enum `variant` to type `ReferenceType`
-
-
-**Checkout changes**
-
-
-Changed MethodResponseBody(s)
-
-- :warning: changed response body for `200: application/json` of method `post /{projectKey}/payment-intents/{paymentId}` from type `any` to `PaymentIntentResponse`
-
-
-
-
-Added Type(s)
-
-- added type `PaymentIntentOutcome`
-- added type `PaymentIntentResponse`
+- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().discountCodes().get()`
+- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().discountCodes().head()`
+- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().discountCodes().withKey().get()`
+- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().discountCodes().withKey().head()`
+- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().discountCodes().withId().get()`
+- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().discountCodes().withId().head()`
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet.java
new file mode 100644
index 0000000000..8548585eca
--- /dev/null
+++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet.java
@@ -0,0 +1,228 @@
+
+package com.commercetools.api.client;
+
+import java.net.URI;
+import java.time.Duration;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.concurrent.CompletableFuture;
+import java.util.function.Function;
+import java.util.function.Supplier;
+import java.util.stream.Collectors;
+
+import io.vrap.rmf.base.client.*;
+import io.vrap.rmf.base.client.utils.Generated;
+
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+
+import tools.jackson.core.type.TypeReference;
+
+/**
+ *
+ *
+ *
+ *
+ *
{@code
+ * CompletableFuture> result = apiRoot
+ * .withProjectKey("{projectKey}")
+ * .inStoreKeyWithStoreKeyValue("{storeKey}")
+ * .discountCodes()
+ * .withId("{ID}")
+ * .get()
+ * .execute()
+ * }
+ *
+ */
+@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
+public class ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet extends
+ TypeApiMethod
+ implements com.commercetools.api.client.ExpandableTrait,
+ com.commercetools.api.client.ErrorableTrait,
+ com.commercetools.api.client.Deprecatable200Trait {
+
+ @Override
+ public TypeReference resultType() {
+ return new TypeReference() {
+ };
+ }
+
+ private String projectKey;
+ private String storeKey;
+ private String ID;
+
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet(final ApiHttpClient apiHttpClient, String projectKey,
+ String storeKey, String ID) {
+ super(apiHttpClient);
+ this.projectKey = projectKey;
+ this.storeKey = storeKey;
+ this.ID = ID;
+ }
+
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet(
+ ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet t) {
+ super(t);
+ this.projectKey = t.projectKey;
+ this.storeKey = t.storeKey;
+ this.ID = t.ID;
+ }
+
+ @Override
+ protected ApiHttpRequest buildHttpRequest() {
+ List params = new ArrayList<>(getQueryParamUriStrings());
+ String httpRequestPath = String.format("%s/in-store/key=%s/discount-codes/%s", encodePathParam(this.projectKey),
+ encodePathParam(this.storeKey), encodePathParam(this.ID));
+ if (!params.isEmpty()) {
+ httpRequestPath += "?" + String.join("&", params);
+ }
+ return new ApiHttpRequest(ApiHttpMethod.GET, URI.create(httpRequestPath), getHeaders(), null);
+ }
+
+ @Override
+ public ApiHttpResponse executeBlocking(
+ final ApiHttpClient client, final Duration timeout) {
+ return executeBlocking(client, timeout, com.commercetools.api.models.discount_code.DiscountCode.class);
+ }
+
+ @Override
+ public CompletableFuture> execute(
+ final ApiHttpClient client) {
+ return execute(client, com.commercetools.api.models.discount_code.DiscountCode.class);
+ }
+
+ public String getProjectKey() {
+ return this.projectKey;
+ }
+
+ public String getStoreKey() {
+ return this.storeKey;
+ }
+
+ public String getID() {
+ return this.ID;
+ }
+
+ public List getExpand() {
+ return this.getQueryParam("expand");
+ }
+
+ public void setProjectKey(final String projectKey) {
+ this.projectKey = projectKey;
+ }
+
+ public void setStoreKey(final String storeKey) {
+ this.storeKey = storeKey;
+ }
+
+ public void setID(final String ID) {
+ this.ID = ID;
+ }
+
+ /**
+ * set expand with the specified value
+ * @param expand value to be set
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet withExpand(final TValue expand) {
+ return copy().withQueryParam("expand", expand);
+ }
+
+ /**
+ * add additional expand query parameter
+ * @param expand value to be added
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet addExpand(final TValue expand) {
+ return copy().addQueryParam("expand", expand);
+ }
+
+ /**
+ * set expand with the specified value
+ * @param supplier supplier for the value to be set
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet withExpand(final Supplier supplier) {
+ return copy().withQueryParam("expand", supplier.get());
+ }
+
+ /**
+ * add additional expand query parameter
+ * @param supplier supplier for the value to be added
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet addExpand(final Supplier supplier) {
+ return copy().addQueryParam("expand", supplier.get());
+ }
+
+ /**
+ * set expand with the specified value
+ * @param op builder for the value to be set
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet withExpand(
+ final Function op) {
+ return copy().withQueryParam("expand", op.apply(new StringBuilder()));
+ }
+
+ /**
+ * add additional expand query parameter
+ * @param op builder for the value to be added
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet addExpand(
+ final Function op) {
+ return copy().addQueryParam("expand", op.apply(new StringBuilder()));
+ }
+
+ /**
+ * set expand with the specified values
+ * @param expand values to be set
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet withExpand(final Collection expand) {
+ return copy().withoutQueryParam("expand")
+ .addQueryParams(
+ expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList()));
+ }
+
+ /**
+ * add additional expand query parameters
+ * @param expand values to be added
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet addExpand(final Collection expand) {
+ return copy().addQueryParams(
+ expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList()));
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o)
+ return true;
+
+ if (o == null || getClass() != o.getClass())
+ return false;
+
+ ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet that = (ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet) o;
+
+ return new EqualsBuilder().append(projectKey, that.projectKey)
+ .append(storeKey, that.storeKey)
+ .append(ID, that.ID)
+ .isEquals();
+ }
+
+ @Override
+ public int hashCode() {
+ return new HashCodeBuilder(17, 37).append(projectKey).append(storeKey).append(ID).toHashCode();
+ }
+
+ @Override
+ protected ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet copy() {
+ return new ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet(this);
+ }
+}
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDHead.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDHead.java
new file mode 100644
index 0000000000..d1c78c233f
--- /dev/null
+++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDHead.java
@@ -0,0 +1,137 @@
+
+package com.commercetools.api.client;
+
+import java.net.URI;
+import java.time.Duration;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.CompletableFuture;
+
+import io.vrap.rmf.base.client.*;
+import io.vrap.rmf.base.client.utils.Generated;
+
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+
+import tools.jackson.core.type.TypeReference;
+
+/**
+ * Checks if a DiscountCode exists with the provided id. Returns a 200 status if the DiscountCode exists, or a 404 status otherwise.
+ *
+ *
+ *
+ *
{@code
+ * CompletableFuture> result = apiRoot
+ * .withProjectKey("{projectKey}")
+ * .inStoreKeyWithStoreKeyValue("{storeKey}")
+ * .discountCodes()
+ * .withId("{ID}")
+ * .head()
+ * .execute()
+ * }
+ *
+ */
+@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
+public class ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDHead
+ extends TypeApiMethod
+ implements com.commercetools.api.client.ErrorableTrait,
+ com.commercetools.api.client.Deprecatable200Trait {
+
+ @Override
+ public TypeReference resultType() {
+ return new TypeReference() {
+ };
+ }
+
+ private String projectKey;
+ private String storeKey;
+ private String ID;
+
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDHead(final ApiHttpClient apiHttpClient, String projectKey,
+ String storeKey, String ID) {
+ super(apiHttpClient);
+ this.projectKey = projectKey;
+ this.storeKey = storeKey;
+ this.ID = ID;
+ }
+
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDHead(
+ ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDHead t) {
+ super(t);
+ this.projectKey = t.projectKey;
+ this.storeKey = t.storeKey;
+ this.ID = t.ID;
+ }
+
+ @Override
+ protected ApiHttpRequest buildHttpRequest() {
+ List params = new ArrayList<>(getQueryParamUriStrings());
+ String httpRequestPath = String.format("%s/in-store/key=%s/discount-codes/%s", encodePathParam(this.projectKey),
+ encodePathParam(this.storeKey), encodePathParam(this.ID));
+ if (!params.isEmpty()) {
+ httpRequestPath += "?" + String.join("&", params);
+ }
+ return new ApiHttpRequest(ApiHttpMethod.HEAD, URI.create(httpRequestPath), getHeaders(), null);
+ }
+
+ @Override
+ public ApiHttpResponse executeBlocking(final ApiHttpClient client,
+ final Duration timeout) {
+ return executeBlocking(client, timeout, tools.jackson.databind.JsonNode.class);
+ }
+
+ @Override
+ public CompletableFuture> execute(final ApiHttpClient client) {
+ return execute(client, tools.jackson.databind.JsonNode.class);
+ }
+
+ public String getProjectKey() {
+ return this.projectKey;
+ }
+
+ public String getStoreKey() {
+ return this.storeKey;
+ }
+
+ public String getID() {
+ return this.ID;
+ }
+
+ public void setProjectKey(final String projectKey) {
+ this.projectKey = projectKey;
+ }
+
+ public void setStoreKey(final String storeKey) {
+ this.storeKey = storeKey;
+ }
+
+ public void setID(final String ID) {
+ this.ID = ID;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o)
+ return true;
+
+ if (o == null || getClass() != o.getClass())
+ return false;
+
+ ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDHead that = (ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDHead) o;
+
+ return new EqualsBuilder().append(projectKey, that.projectKey)
+ .append(storeKey, that.storeKey)
+ .append(ID, that.ID)
+ .isEquals();
+ }
+
+ @Override
+ public int hashCode() {
+ return new HashCodeBuilder(17, 37).append(projectKey).append(storeKey).append(ID).toHashCode();
+ }
+
+ @Override
+ protected ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDHead copy() {
+ return new ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDHead(this);
+ }
+}
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDRequestBuilder.java
new file mode 100644
index 0000000000..42c0508d3d
--- /dev/null
+++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDRequestBuilder.java
@@ -0,0 +1,31 @@
+
+package com.commercetools.api.client;
+
+import io.vrap.rmf.base.client.ApiHttpClient;
+import io.vrap.rmf.base.client.utils.Generated;
+
+@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
+public class ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDRequestBuilder {
+
+ private final ApiHttpClient apiHttpClient;
+ private final String projectKey;
+ private final String storeKey;
+ private final String ID;
+
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDRequestBuilder(final ApiHttpClient apiHttpClient,
+ final String projectKey, final String storeKey, final String ID) {
+ this.apiHttpClient = apiHttpClient;
+ this.projectKey = projectKey;
+ this.storeKey = storeKey;
+ this.ID = ID;
+ }
+
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet get() {
+ return new ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDGet(apiHttpClient, projectKey, storeKey, ID);
+ }
+
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDHead head() {
+ return new ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDHead(apiHttpClient, projectKey, storeKey, ID);
+ }
+
+}
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet.java
new file mode 100644
index 0000000000..8083be4aad
--- /dev/null
+++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet.java
@@ -0,0 +1,689 @@
+
+package com.commercetools.api.client;
+
+import java.net.URI;
+import java.time.Duration;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.concurrent.CompletableFuture;
+import java.util.function.Function;
+import java.util.function.Supplier;
+import java.util.stream.Collectors;
+
+import io.vrap.rmf.base.client.*;
+import io.vrap.rmf.base.client.utils.Generated;
+
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+
+import tools.jackson.core.type.TypeReference;
+
+/**
+ *
+ *
+ *
+ *
+ *
{@code
+ * CompletableFuture> result = apiRoot
+ * .withProjectKey("{projectKey}")
+ * .inStoreKeyWithStoreKeyValue("{storeKey}")
+ * .discountCodes()
+ * .get()
+ * .execute()
+ * }
+ *
+ */
+@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
+public class ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet extends
+ TypeApiMethod
+ implements com.commercetools.api.client.ExpandableTrait,
+ com.commercetools.api.client.SortableTrait,
+ com.commercetools.api.client.PagingTrait,
+ com.commercetools.api.client.QueryTrait,
+ com.commercetools.api.client.ErrorableTrait,
+ com.commercetools.api.client.Deprecatable200Trait {
+
+ @Override
+ public TypeReference resultType() {
+ return new TypeReference() {
+ };
+ }
+
+ private String projectKey;
+ private String storeKey;
+
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet(final ApiHttpClient apiHttpClient, String projectKey,
+ String storeKey) {
+ super(apiHttpClient);
+ this.projectKey = projectKey;
+ this.storeKey = storeKey;
+ }
+
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet(ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet t) {
+ super(t);
+ this.projectKey = t.projectKey;
+ this.storeKey = t.storeKey;
+ }
+
+ @Override
+ protected ApiHttpRequest buildHttpRequest() {
+ List params = new ArrayList<>(getQueryParamUriStrings());
+ String httpRequestPath = String.format("%s/in-store/key=%s/discount-codes", encodePathParam(this.projectKey),
+ encodePathParam(this.storeKey));
+ if (!params.isEmpty()) {
+ httpRequestPath += "?" + String.join("&", params);
+ }
+ return new ApiHttpRequest(ApiHttpMethod.GET, URI.create(httpRequestPath), getHeaders(), null);
+ }
+
+ @Override
+ public ApiHttpResponse executeBlocking(
+ final ApiHttpClient client, final Duration timeout) {
+ return executeBlocking(client, timeout,
+ com.commercetools.api.models.discount_code.DiscountCodePagedQueryResponse.class);
+ }
+
+ @Override
+ public CompletableFuture> execute(
+ final ApiHttpClient client) {
+ return execute(client, com.commercetools.api.models.discount_code.DiscountCodePagedQueryResponse.class);
+ }
+
+ public String getProjectKey() {
+ return this.projectKey;
+ }
+
+ public String getStoreKey() {
+ return this.storeKey;
+ }
+
+ public List getExpand() {
+ return this.getQueryParam("expand");
+ }
+
+ public List getSort() {
+ return this.getQueryParam("sort");
+ }
+
+ public List getLimit() {
+ return this.getQueryParam("limit");
+ }
+
+ public List getOffset() {
+ return this.getQueryParam("offset");
+ }
+
+ public List getWithTotal() {
+ return this.getQueryParam("withTotal");
+ }
+
+ public List getWhere() {
+ return this.getQueryParam("where");
+ }
+
+ public void setProjectKey(final String projectKey) {
+ this.projectKey = projectKey;
+ }
+
+ public void setStoreKey(final String storeKey) {
+ this.storeKey = storeKey;
+ }
+
+ /**
+ * set expand with the specified value
+ * @param expand value to be set
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withExpand(final TValue expand) {
+ return copy().withQueryParam("expand", expand);
+ }
+
+ /**
+ * add additional expand query parameter
+ * @param expand value to be added
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet addExpand(final TValue expand) {
+ return copy().addQueryParam("expand", expand);
+ }
+
+ /**
+ * set expand with the specified value
+ * @param supplier supplier for the value to be set
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withExpand(final Supplier supplier) {
+ return copy().withQueryParam("expand", supplier.get());
+ }
+
+ /**
+ * add additional expand query parameter
+ * @param supplier supplier for the value to be added
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet addExpand(final Supplier supplier) {
+ return copy().addQueryParam("expand", supplier.get());
+ }
+
+ /**
+ * set expand with the specified value
+ * @param op builder for the value to be set
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withExpand(
+ final Function op) {
+ return copy().withQueryParam("expand", op.apply(new StringBuilder()));
+ }
+
+ /**
+ * add additional expand query parameter
+ * @param op builder for the value to be added
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet addExpand(final Function op) {
+ return copy().addQueryParam("expand", op.apply(new StringBuilder()));
+ }
+
+ /**
+ * set expand with the specified values
+ * @param expand values to be set
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withExpand(final Collection expand) {
+ return copy().withoutQueryParam("expand")
+ .addQueryParams(
+ expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList()));
+ }
+
+ /**
+ * add additional expand query parameters
+ * @param expand values to be added
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet addExpand(final Collection expand) {
+ return copy().addQueryParams(
+ expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList()));
+ }
+
+ /**
+ * set sort with the specified value
+ * @param sort value to be set
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withSort(final TValue sort) {
+ return copy().withQueryParam("sort", sort);
+ }
+
+ /**
+ * add additional sort query parameter
+ * @param sort value to be added
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet addSort(final TValue sort) {
+ return copy().addQueryParam("sort", sort);
+ }
+
+ /**
+ * set sort with the specified value
+ * @param supplier supplier for the value to be set
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withSort(final Supplier supplier) {
+ return copy().withQueryParam("sort", supplier.get());
+ }
+
+ /**
+ * add additional sort query parameter
+ * @param supplier supplier for the value to be added
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet addSort(final Supplier supplier) {
+ return copy().addQueryParam("sort", supplier.get());
+ }
+
+ /**
+ * set sort with the specified value
+ * @param op builder for the value to be set
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withSort(final Function op) {
+ return copy().withQueryParam("sort", op.apply(new StringBuilder()));
+ }
+
+ /**
+ * add additional sort query parameter
+ * @param op builder for the value to be added
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet addSort(final Function op) {
+ return copy().addQueryParam("sort", op.apply(new StringBuilder()));
+ }
+
+ /**
+ * set sort with the specified values
+ * @param sort values to be set
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withSort(final Collection sort) {
+ return copy().withoutQueryParam("sort")
+ .addQueryParams(
+ sort.stream().map(s -> new ParamEntry<>("sort", s.toString())).collect(Collectors.toList()));
+ }
+
+ /**
+ * add additional sort query parameters
+ * @param sort values to be added
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet addSort(final Collection sort) {
+ return copy().addQueryParams(
+ sort.stream().map(s -> new ParamEntry<>("sort", s.toString())).collect(Collectors.toList()));
+ }
+
+ /**
+ * set limit with the specified value
+ * @param limit value to be set
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withLimit(final TValue limit) {
+ return copy().withQueryParam("limit", limit);
+ }
+
+ /**
+ * add additional limit query parameter
+ * @param limit value to be added
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet addLimit(final TValue limit) {
+ return copy().addQueryParam("limit", limit);
+ }
+
+ /**
+ * set limit with the specified value
+ * @param supplier supplier for the value to be set
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withLimit(final Supplier supplier) {
+ return copy().withQueryParam("limit", supplier.get());
+ }
+
+ /**
+ * add additional limit query parameter
+ * @param supplier supplier for the value to be added
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet addLimit(final Supplier supplier) {
+ return copy().addQueryParam("limit", supplier.get());
+ }
+
+ /**
+ * set limit with the specified value
+ * @param op builder for the value to be set
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withLimit(final Function op) {
+ return copy().withQueryParam("limit", op.apply(new StringBuilder()));
+ }
+
+ /**
+ * add additional limit query parameter
+ * @param op builder for the value to be added
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet addLimit(final Function op) {
+ return copy().addQueryParam("limit", op.apply(new StringBuilder()));
+ }
+
+ /**
+ * set limit with the specified values
+ * @param limit values to be set
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withLimit(final Collection limit) {
+ return copy().withoutQueryParam("limit")
+ .addQueryParams(
+ limit.stream().map(s -> new ParamEntry<>("limit", s.toString())).collect(Collectors.toList()));
+ }
+
+ /**
+ * add additional limit query parameters
+ * @param limit values to be added
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet addLimit(final Collection limit) {
+ return copy().addQueryParams(
+ limit.stream().map(s -> new ParamEntry<>("limit", s.toString())).collect(Collectors.toList()));
+ }
+
+ /**
+ * set offset with the specified value
+ * @param offset value to be set
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withOffset(final TValue offset) {
+ return copy().withQueryParam("offset", offset);
+ }
+
+ /**
+ * add additional offset query parameter
+ * @param offset value to be added
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet addOffset(final TValue offset) {
+ return copy().addQueryParam("offset", offset);
+ }
+
+ /**
+ * set offset with the specified value
+ * @param supplier supplier for the value to be set
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withOffset(final Supplier supplier) {
+ return copy().withQueryParam("offset", supplier.get());
+ }
+
+ /**
+ * add additional offset query parameter
+ * @param supplier supplier for the value to be added
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet addOffset(final Supplier supplier) {
+ return copy().addQueryParam("offset", supplier.get());
+ }
+
+ /**
+ * set offset with the specified value
+ * @param op builder for the value to be set
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withOffset(
+ final Function op) {
+ return copy().withQueryParam("offset", op.apply(new StringBuilder()));
+ }
+
+ /**
+ * add additional offset query parameter
+ * @param op builder for the value to be added
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet addOffset(final Function op) {
+ return copy().addQueryParam("offset", op.apply(new StringBuilder()));
+ }
+
+ /**
+ * set offset with the specified values
+ * @param offset values to be set
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withOffset(final Collection offset) {
+ return copy().withoutQueryParam("offset")
+ .addQueryParams(
+ offset.stream().map(s -> new ParamEntry<>("offset", s.toString())).collect(Collectors.toList()));
+ }
+
+ /**
+ * add additional offset query parameters
+ * @param offset values to be added
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet addOffset(final Collection offset) {
+ return copy().addQueryParams(
+ offset.stream().map(s -> new ParamEntry<>("offset", s.toString())).collect(Collectors.toList()));
+ }
+
+ /**
+ * set withTotal with the specified value
+ * @param withTotal value to be set
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withWithTotal(final TValue withTotal) {
+ return copy().withQueryParam("withTotal", withTotal);
+ }
+
+ /**
+ * add additional withTotal query parameter
+ * @param withTotal value to be added
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet addWithTotal(final TValue withTotal) {
+ return copy().addQueryParam("withTotal", withTotal);
+ }
+
+ /**
+ * set withTotal with the specified value
+ * @param supplier supplier for the value to be set
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withWithTotal(final Supplier supplier) {
+ return copy().withQueryParam("withTotal", supplier.get());
+ }
+
+ /**
+ * add additional withTotal query parameter
+ * @param supplier supplier for the value to be added
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet addWithTotal(final Supplier supplier) {
+ return copy().addQueryParam("withTotal", supplier.get());
+ }
+
+ /**
+ * set withTotal with the specified value
+ * @param op builder for the value to be set
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withWithTotal(
+ final Function op) {
+ return copy().withQueryParam("withTotal", op.apply(new StringBuilder()));
+ }
+
+ /**
+ * add additional withTotal query parameter
+ * @param op builder for the value to be added
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet addWithTotal(
+ final Function op) {
+ return copy().addQueryParam("withTotal", op.apply(new StringBuilder()));
+ }
+
+ /**
+ * set withTotal with the specified values
+ * @param withTotal values to be set
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withWithTotal(final Collection withTotal) {
+ return copy().withoutQueryParam("withTotal")
+ .addQueryParams(withTotal.stream()
+ .map(s -> new ParamEntry<>("withTotal", s.toString()))
+ .collect(Collectors.toList()));
+ }
+
+ /**
+ * add additional withTotal query parameters
+ * @param withTotal values to be added
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet addWithTotal(final Collection withTotal) {
+ return copy().addQueryParams(
+ withTotal.stream().map(s -> new ParamEntry<>("withTotal", s.toString())).collect(Collectors.toList()));
+ }
+
+ /**
+ * set where with the specified value
+ * @param where value to be set
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withWhere(final TValue where) {
+ return copy().withQueryParam("where", where);
+ }
+
+ /**
+ * add additional where query parameter
+ * @param where value to be added
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet addWhere(final TValue where) {
+ return copy().addQueryParam("where", where);
+ }
+
+ /**
+ * set where with the specified value
+ * @param supplier supplier for the value to be set
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withWhere(final Supplier supplier) {
+ return copy().withQueryParam("where", supplier.get());
+ }
+
+ /**
+ * add additional where query parameter
+ * @param supplier supplier for the value to be added
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet addWhere(final Supplier supplier) {
+ return copy().addQueryParam("where", supplier.get());
+ }
+
+ /**
+ * set where with the specified value
+ * @param op builder for the value to be set
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withWhere(final Function op) {
+ return copy().withQueryParam("where", op.apply(new StringBuilder()));
+ }
+
+ /**
+ * add additional where query parameter
+ * @param op builder for the value to be added
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet addWhere(final Function op) {
+ return copy().addQueryParam("where", op.apply(new StringBuilder()));
+ }
+
+ /**
+ * set where with the specified values
+ * @param where values to be set
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withWhere(final Collection where) {
+ return copy().withoutQueryParam("where")
+ .addQueryParams(
+ where.stream().map(s -> new ParamEntry<>("where", s.toString())).collect(Collectors.toList()));
+ }
+
+ /**
+ * add additional where query parameters
+ * @param where values to be added
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet addWhere(final Collection where) {
+ return copy().addQueryParams(
+ where.stream().map(s -> new ParamEntry<>("where", s.toString())).collect(Collectors.toList()));
+ }
+
+ /**
+ * set predicateVar with the specificied value
+ * @param value type
+ * @param varName parameter name
+ * @param predicateVar parameter value
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withPredicateVar(final String varName,
+ final TValue predicateVar) {
+ return copy().withQueryParam(String.format("var.%s", varName), predicateVar);
+ }
+
+ /**
+ * add additional predicateVar query parameter
+ * @param value type
+ * @param varName parameter name
+ * @param predicateVar parameter value
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet addPredicateVar(final String varName,
+ final TValue predicateVar) {
+ return copy().addQueryParam(String.format("var.%s", varName), predicateVar);
+ }
+
+ /**
+ * set predicateVar with the specificied values
+ * @param value type
+ * @param varName parameter name
+ * @param predicateVar parameter values
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet withPredicateVar(final String varName,
+ final Collection predicateVar) {
+ final String placeholderName = String.format("var.%s", varName);
+ return copy().withoutQueryParam(placeholderName)
+ .addQueryParams(predicateVar.stream()
+ .map(s -> new ParamEntry<>(placeholderName, s.toString()))
+ .collect(Collectors.toList()));
+ }
+
+ /**
+ * add additional predicateVar query parameters
+ * @param value type
+ * @param varName parameter name
+ * @param predicateVar parameter values
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet addPredicateVar(final String varName,
+ final Collection predicateVar) {
+ final String placeholderName = String.format("var.%s", varName);
+ return copy().addQueryParams(predicateVar.stream()
+ .map(s -> new ParamEntry<>(placeholderName, s.toString()))
+ .collect(Collectors.toList()));
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o)
+ return true;
+
+ if (o == null || getClass() != o.getClass())
+ return false;
+
+ ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet that = (ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet) o;
+
+ return new EqualsBuilder().append(projectKey, that.projectKey).append(storeKey, that.storeKey).isEquals();
+ }
+
+ @Override
+ public int hashCode() {
+ return new HashCodeBuilder(17, 37).append(projectKey).append(storeKey).toHashCode();
+ }
+
+ @Override
+ protected ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet copy() {
+ return new ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet(this);
+ }
+}
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead.java
new file mode 100644
index 0000000000..78cb3e7c12
--- /dev/null
+++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead.java
@@ -0,0 +1,209 @@
+
+package com.commercetools.api.client;
+
+import java.net.URI;
+import java.time.Duration;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.concurrent.CompletableFuture;
+import java.util.function.Function;
+import java.util.function.Supplier;
+import java.util.stream.Collectors;
+
+import io.vrap.rmf.base.client.*;
+import io.vrap.rmf.base.client.utils.Generated;
+
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+
+import tools.jackson.core.type.TypeReference;
+
+/**
+ * Checks if one or more DiscountCodes exist for the provided query predicate in a Store. Returns a 200 status if any DiscountCodes match the query predicate, or a 404 status otherwise.
+ *
+ *
+ *
+ *
{@code
+ * CompletableFuture> result = apiRoot
+ * .withProjectKey("{projectKey}")
+ * .inStoreKeyWithStoreKeyValue("{storeKey}")
+ * .discountCodes()
+ * .head()
+ * .execute()
+ * }
+ *
+ */
+@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
+public class ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead
+ extends TypeApiMethod
+ implements com.commercetools.api.client.ErrorableTrait,
+ com.commercetools.api.client.Deprecatable200Trait {
+
+ @Override
+ public TypeReference resultType() {
+ return new TypeReference() {
+ };
+ }
+
+ private String projectKey;
+ private String storeKey;
+
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead(final ApiHttpClient apiHttpClient, String projectKey,
+ String storeKey) {
+ super(apiHttpClient);
+ this.projectKey = projectKey;
+ this.storeKey = storeKey;
+ }
+
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead(ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead t) {
+ super(t);
+ this.projectKey = t.projectKey;
+ this.storeKey = t.storeKey;
+ }
+
+ @Override
+ protected ApiHttpRequest buildHttpRequest() {
+ List params = new ArrayList<>(getQueryParamUriStrings());
+ String httpRequestPath = String.format("%s/in-store/key=%s/discount-codes", encodePathParam(this.projectKey),
+ encodePathParam(this.storeKey));
+ if (!params.isEmpty()) {
+ httpRequestPath += "?" + String.join("&", params);
+ }
+ return new ApiHttpRequest(ApiHttpMethod.HEAD, URI.create(httpRequestPath), getHeaders(), null);
+ }
+
+ @Override
+ public ApiHttpResponse executeBlocking(final ApiHttpClient client,
+ final Duration timeout) {
+ return executeBlocking(client, timeout, tools.jackson.databind.JsonNode.class);
+ }
+
+ @Override
+ public CompletableFuture> execute(final ApiHttpClient client) {
+ return execute(client, tools.jackson.databind.JsonNode.class);
+ }
+
+ public String getProjectKey() {
+ return this.projectKey;
+ }
+
+ public String getStoreKey() {
+ return this.storeKey;
+ }
+
+ public List getWhere() {
+ return this.getQueryParam("where");
+ }
+
+ public void setProjectKey(final String projectKey) {
+ this.projectKey = projectKey;
+ }
+
+ public void setStoreKey(final String storeKey) {
+ this.storeKey = storeKey;
+ }
+
+ /**
+ * set where with the specified value
+ * @param where value to be set
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead withWhere(final TValue where) {
+ return copy().withQueryParam("where", where);
+ }
+
+ /**
+ * add additional where query parameter
+ * @param where value to be added
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead addWhere(final TValue where) {
+ return copy().addQueryParam("where", where);
+ }
+
+ /**
+ * set where with the specified value
+ * @param supplier supplier for the value to be set
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead withWhere(final Supplier supplier) {
+ return copy().withQueryParam("where", supplier.get());
+ }
+
+ /**
+ * add additional where query parameter
+ * @param supplier supplier for the value to be added
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead addWhere(final Supplier supplier) {
+ return copy().addQueryParam("where", supplier.get());
+ }
+
+ /**
+ * set where with the specified value
+ * @param op builder for the value to be set
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead withWhere(
+ final Function op) {
+ return copy().withQueryParam("where", op.apply(new StringBuilder()));
+ }
+
+ /**
+ * add additional where query parameter
+ * @param op builder for the value to be added
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead addWhere(final Function op) {
+ return copy().addQueryParam("where", op.apply(new StringBuilder()));
+ }
+
+ /**
+ * set where with the specified values
+ * @param where values to be set
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead withWhere(final Collection where) {
+ return copy().withoutQueryParam("where")
+ .addQueryParams(
+ where.stream().map(s -> new ParamEntry<>("where", s.toString())).collect(Collectors.toList()));
+ }
+
+ /**
+ * add additional where query parameters
+ * @param where values to be added
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead addWhere(final Collection where) {
+ return copy().addQueryParams(
+ where.stream().map(s -> new ParamEntry<>("where", s.toString())).collect(Collectors.toList()));
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o)
+ return true;
+
+ if (o == null || getClass() != o.getClass())
+ return false;
+
+ ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead that = (ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead) o;
+
+ return new EqualsBuilder().append(projectKey, that.projectKey).append(storeKey, that.storeKey).isEquals();
+ }
+
+ @Override
+ public int hashCode() {
+ return new HashCodeBuilder(17, 37).append(projectKey).append(storeKey).toHashCode();
+ }
+
+ @Override
+ protected ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead copy() {
+ return new ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead(this);
+ }
+}
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet.java
new file mode 100644
index 0000000000..3e0f94fd08
--- /dev/null
+++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet.java
@@ -0,0 +1,231 @@
+
+package com.commercetools.api.client;
+
+import java.net.URI;
+import java.time.Duration;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.concurrent.CompletableFuture;
+import java.util.function.Function;
+import java.util.function.Supplier;
+import java.util.stream.Collectors;
+
+import io.vrap.rmf.base.client.*;
+import io.vrap.rmf.base.client.utils.Generated;
+
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+
+import tools.jackson.core.type.TypeReference;
+
+/**
+ *
+ *
+ *
+ *
+ *
{@code
+ * CompletableFuture> result = apiRoot
+ * .withProjectKey("{projectKey}")
+ * .inStoreKeyWithStoreKeyValue("{storeKey}")
+ * .discountCodes()
+ * .withKey("{key}")
+ * .get()
+ * .execute()
+ * }
+ *
+ */
+@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
+public class ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet extends
+ TypeApiMethod
+ implements
+ com.commercetools.api.client.ExpandableTrait,
+ com.commercetools.api.client.ErrorableTrait,
+ com.commercetools.api.client.Deprecatable200Trait {
+
+ @Override
+ public TypeReference resultType() {
+ return new TypeReference() {
+ };
+ }
+
+ private String projectKey;
+ private String storeKey;
+ private String key;
+
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet(final ApiHttpClient apiHttpClient,
+ String projectKey, String storeKey, String key) {
+ super(apiHttpClient);
+ this.projectKey = projectKey;
+ this.storeKey = storeKey;
+ this.key = key;
+ }
+
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet(
+ ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet t) {
+ super(t);
+ this.projectKey = t.projectKey;
+ this.storeKey = t.storeKey;
+ this.key = t.key;
+ }
+
+ @Override
+ protected ApiHttpRequest buildHttpRequest() {
+ List params = new ArrayList<>(getQueryParamUriStrings());
+ String httpRequestPath = String.format("%s/in-store/key=%s/discount-codes/key=%s",
+ encodePathParam(this.projectKey), encodePathParam(this.storeKey), encodePathParam(this.key));
+ if (!params.isEmpty()) {
+ httpRequestPath += "?" + String.join("&", params);
+ }
+ return new ApiHttpRequest(ApiHttpMethod.GET, URI.create(httpRequestPath), getHeaders(), null);
+ }
+
+ @Override
+ public ApiHttpResponse executeBlocking(
+ final ApiHttpClient client, final Duration timeout) {
+ return executeBlocking(client, timeout, com.commercetools.api.models.discount_code.DiscountCode.class);
+ }
+
+ @Override
+ public CompletableFuture> execute(
+ final ApiHttpClient client) {
+ return execute(client, com.commercetools.api.models.discount_code.DiscountCode.class);
+ }
+
+ public String getProjectKey() {
+ return this.projectKey;
+ }
+
+ public String getStoreKey() {
+ return this.storeKey;
+ }
+
+ public String getKey() {
+ return this.key;
+ }
+
+ public List getExpand() {
+ return this.getQueryParam("expand");
+ }
+
+ public void setProjectKey(final String projectKey) {
+ this.projectKey = projectKey;
+ }
+
+ public void setStoreKey(final String storeKey) {
+ this.storeKey = storeKey;
+ }
+
+ public void setKey(final String key) {
+ this.key = key;
+ }
+
+ /**
+ * set expand with the specified value
+ * @param expand value to be set
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet withExpand(final TValue expand) {
+ return copy().withQueryParam("expand", expand);
+ }
+
+ /**
+ * add additional expand query parameter
+ * @param expand value to be added
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet addExpand(final TValue expand) {
+ return copy().addQueryParam("expand", expand);
+ }
+
+ /**
+ * set expand with the specified value
+ * @param supplier supplier for the value to be set
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet withExpand(final Supplier supplier) {
+ return copy().withQueryParam("expand", supplier.get());
+ }
+
+ /**
+ * add additional expand query parameter
+ * @param supplier supplier for the value to be added
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet addExpand(final Supplier supplier) {
+ return copy().addQueryParam("expand", supplier.get());
+ }
+
+ /**
+ * set expand with the specified value
+ * @param op builder for the value to be set
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet withExpand(
+ final Function op) {
+ return copy().withQueryParam("expand", op.apply(new StringBuilder()));
+ }
+
+ /**
+ * add additional expand query parameter
+ * @param op builder for the value to be added
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet addExpand(
+ final Function op) {
+ return copy().addQueryParam("expand", op.apply(new StringBuilder()));
+ }
+
+ /**
+ * set expand with the specified values
+ * @param expand values to be set
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet withExpand(
+ final Collection expand) {
+ return copy().withoutQueryParam("expand")
+ .addQueryParams(
+ expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList()));
+ }
+
+ /**
+ * add additional expand query parameters
+ * @param expand values to be added
+ * @param value type
+ * @return ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet
+ */
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet addExpand(
+ final Collection expand) {
+ return copy().addQueryParams(
+ expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList()));
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o)
+ return true;
+
+ if (o == null || getClass() != o.getClass())
+ return false;
+
+ ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet that = (ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet) o;
+
+ return new EqualsBuilder().append(projectKey, that.projectKey)
+ .append(storeKey, that.storeKey)
+ .append(key, that.key)
+ .isEquals();
+ }
+
+ @Override
+ public int hashCode() {
+ return new HashCodeBuilder(17, 37).append(projectKey).append(storeKey).append(key).toHashCode();
+ }
+
+ @Override
+ protected ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet copy() {
+ return new ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet(this);
+ }
+}
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyHead.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyHead.java
new file mode 100644
index 0000000000..dd88f632c2
--- /dev/null
+++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyHead.java
@@ -0,0 +1,138 @@
+
+package com.commercetools.api.client;
+
+import java.net.URI;
+import java.time.Duration;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.CompletableFuture;
+
+import io.vrap.rmf.base.client.*;
+import io.vrap.rmf.base.client.utils.Generated;
+
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+
+import tools.jackson.core.type.TypeReference;
+
+/**
+ * Checks if a DiscountCode exists with the provided key. Returns a 200 status if the DiscountCode exists, or a 404 status otherwise.
+ *
+ *
+ *
+ *
{@code
+ * CompletableFuture> result = apiRoot
+ * .withProjectKey("{projectKey}")
+ * .inStoreKeyWithStoreKeyValue("{storeKey}")
+ * .discountCodes()
+ * .withKey("{key}")
+ * .head()
+ * .execute()
+ * }
+ *
+ */
+@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
+public class ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyHead extends
+ TypeApiMethod
+ implements
+ com.commercetools.api.client.ErrorableTrait,
+ com.commercetools.api.client.Deprecatable200Trait {
+
+ @Override
+ public TypeReference resultType() {
+ return new TypeReference() {
+ };
+ }
+
+ private String projectKey;
+ private String storeKey;
+ private String key;
+
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyHead(final ApiHttpClient apiHttpClient,
+ String projectKey, String storeKey, String key) {
+ super(apiHttpClient);
+ this.projectKey = projectKey;
+ this.storeKey = storeKey;
+ this.key = key;
+ }
+
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyHead(
+ ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyHead t) {
+ super(t);
+ this.projectKey = t.projectKey;
+ this.storeKey = t.storeKey;
+ this.key = t.key;
+ }
+
+ @Override
+ protected ApiHttpRequest buildHttpRequest() {
+ List params = new ArrayList<>(getQueryParamUriStrings());
+ String httpRequestPath = String.format("%s/in-store/key=%s/discount-codes/key=%s",
+ encodePathParam(this.projectKey), encodePathParam(this.storeKey), encodePathParam(this.key));
+ if (!params.isEmpty()) {
+ httpRequestPath += "?" + String.join("&", params);
+ }
+ return new ApiHttpRequest(ApiHttpMethod.HEAD, URI.create(httpRequestPath), getHeaders(), null);
+ }
+
+ @Override
+ public ApiHttpResponse executeBlocking(final ApiHttpClient client,
+ final Duration timeout) {
+ return executeBlocking(client, timeout, tools.jackson.databind.JsonNode.class);
+ }
+
+ @Override
+ public CompletableFuture> execute(final ApiHttpClient client) {
+ return execute(client, tools.jackson.databind.JsonNode.class);
+ }
+
+ public String getProjectKey() {
+ return this.projectKey;
+ }
+
+ public String getStoreKey() {
+ return this.storeKey;
+ }
+
+ public String getKey() {
+ return this.key;
+ }
+
+ public void setProjectKey(final String projectKey) {
+ this.projectKey = projectKey;
+ }
+
+ public void setStoreKey(final String storeKey) {
+ this.storeKey = storeKey;
+ }
+
+ public void setKey(final String key) {
+ this.key = key;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o)
+ return true;
+
+ if (o == null || getClass() != o.getClass())
+ return false;
+
+ ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyHead that = (ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyHead) o;
+
+ return new EqualsBuilder().append(projectKey, that.projectKey)
+ .append(storeKey, that.storeKey)
+ .append(key, that.key)
+ .isEquals();
+ }
+
+ @Override
+ public int hashCode() {
+ return new HashCodeBuilder(17, 37).append(projectKey).append(storeKey).append(key).toHashCode();
+ }
+
+ @Override
+ protected ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyHead copy() {
+ return new ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyHead(this);
+ }
+}
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyRequestBuilder.java
new file mode 100644
index 0000000000..aaadafe7f9
--- /dev/null
+++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyRequestBuilder.java
@@ -0,0 +1,31 @@
+
+package com.commercetools.api.client;
+
+import io.vrap.rmf.base.client.ApiHttpClient;
+import io.vrap.rmf.base.client.utils.Generated;
+
+@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
+public class ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyRequestBuilder {
+
+ private final ApiHttpClient apiHttpClient;
+ private final String projectKey;
+ private final String storeKey;
+ private final String key;
+
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyRequestBuilder(final ApiHttpClient apiHttpClient,
+ final String projectKey, final String storeKey, final String key) {
+ this.apiHttpClient = apiHttpClient;
+ this.projectKey = projectKey;
+ this.storeKey = storeKey;
+ this.key = key;
+ }
+
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet get() {
+ return new ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyGet(apiHttpClient, projectKey, storeKey, key);
+ }
+
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyHead head() {
+ return new ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyHead(apiHttpClient, projectKey, storeKey, key);
+ }
+
+}
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesRequestBuilder.java
new file mode 100644
index 0000000000..88185ed2f0
--- /dev/null
+++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesRequestBuilder.java
@@ -0,0 +1,39 @@
+
+package com.commercetools.api.client;
+
+import io.vrap.rmf.base.client.ApiHttpClient;
+import io.vrap.rmf.base.client.utils.Generated;
+
+@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
+public class ByProjectKeyInStoreKeyByStoreKeyDiscountCodesRequestBuilder {
+
+ private final ApiHttpClient apiHttpClient;
+ private final String projectKey;
+ private final String storeKey;
+
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesRequestBuilder(final ApiHttpClient apiHttpClient,
+ final String projectKey, final String storeKey) {
+ this.apiHttpClient = apiHttpClient;
+ this.projectKey = projectKey;
+ this.storeKey = storeKey;
+ }
+
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet get() {
+ return new ByProjectKeyInStoreKeyByStoreKeyDiscountCodesGet(apiHttpClient, projectKey, storeKey);
+ }
+
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead head() {
+ return new ByProjectKeyInStoreKeyByStoreKeyDiscountCodesHead(apiHttpClient, projectKey, storeKey);
+ }
+
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyRequestBuilder withKey(String key) {
+ return new ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyRequestBuilder(apiHttpClient, projectKey,
+ storeKey, key);
+ }
+
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDRequestBuilder withId(String ID) {
+ return new ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDRequestBuilder(apiHttpClient, projectKey, storeKey,
+ ID);
+ }
+
+}
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyRequestBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyRequestBuilder.java
index 9e6572cdd7..fa8750d090 100644
--- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyRequestBuilder.java
+++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyInStoreKeyByStoreKeyRequestBuilder.java
@@ -34,6 +34,10 @@ public ByProjectKeyInStoreKeyByStoreKeyCustomersRequestBuilder customers() {
return new ByProjectKeyInStoreKeyByStoreKeyCustomersRequestBuilder(apiHttpClient, projectKey, storeKey);
}
+ public ByProjectKeyInStoreKeyByStoreKeyDiscountCodesRequestBuilder discountCodes() {
+ return new ByProjectKeyInStoreKeyByStoreKeyDiscountCodesRequestBuilder(apiHttpClient, projectKey, storeKey);
+ }
+
public ByProjectKeyInStoreKeyByStoreKeyMeRequestBuilder me() {
return new ByProjectKeyInStoreKeyByStoreKeyMeRequestBuilder(apiHttpClient, projectKey, storeKey);
}
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCode.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCode.java
index 68c0aa35aa..4d6794108c 100644
--- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCode.java
+++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCode.java
@@ -15,6 +15,7 @@
import com.commercetools.api.models.common.LastModifiedBy;
import com.commercetools.api.models.common.LocalizedString;
import com.commercetools.api.models.common.Reference;
+import com.commercetools.api.models.store.StoreKeyReference;
import com.commercetools.api.models.type.CustomFields;
import com.fasterxml.jackson.annotation.*;
@@ -38,6 +39,7 @@
* .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
* .code("{code}")
* .plusCartDiscounts(cartDiscountsBuilder -> cartDiscountsBuilder)
+ * .plusStores(storesBuilder -> storesBuilder)
* .isActive(true)
* .plusReferences(referencesBuilder -> referencesBuilder)
* .plusGroups(groupsBuilder -> groupsBuilder)
@@ -142,6 +144,16 @@ public interface DiscountCode
@JsonProperty("cartDiscounts")
public List getCartDiscounts();
+ /**
+ * Reference to the Stores the DiscountCode is associated with, derived from the stores field of each referenced CartDiscount.
+ * The value of this field is eventually consistent.
+ * @return stores
+ */
+ @NotNull
+ @Valid
+ @JsonProperty("stores")
+ public List getStores();
+
/**
* DiscountCode can only be applied to Carts that match this predicate.
* @return cartPredicate
@@ -314,6 +326,23 @@ public interface DiscountCode
public void setCartDiscounts(final List cartDiscounts);
+ /**
+ * Reference to the Stores the DiscountCode is associated with, derived from the stores field of each referenced CartDiscount.
+ * The value of this field is eventually consistent.
+ * @param stores values to be set
+ */
+
+ @JsonIgnore
+ public void setStores(final StoreKeyReference... stores);
+
+ /**
+ * Reference to the Stores the DiscountCode is associated with, derived from the stores field of each referenced CartDiscount.
+ * The value of this field is eventually consistent.
+ * @param stores values to be set
+ */
+
+ public void setStores(final List stores);
+
/**
* DiscountCode can only be applied to Carts that match this predicate.
* @param cartPredicate value to be set
@@ -432,6 +461,7 @@ public static DiscountCode of(final DiscountCode template) {
instance.setDescription(template.getDescription());
instance.setCode(template.getCode());
instance.setCartDiscounts(template.getCartDiscounts());
+ instance.setStores(template.getStores());
instance.setCartPredicate(template.getCartPredicate());
instance.setIsActive(template.getIsActive());
instance.setReferences(template.getReferences());
@@ -475,6 +505,11 @@ public static DiscountCode deepCopy(@Nullable final DiscountCode template) {
.map(com.commercetools.api.models.cart_discount.CartDiscountReference::deepCopy)
.collect(Collectors.toList()))
.orElse(null));
+ instance.setStores(Optional.ofNullable(template.getStores())
+ .map(t -> t.stream()
+ .map(com.commercetools.api.models.store.StoreKeyReference::deepCopy)
+ .collect(Collectors.toList()))
+ .orElse(null));
instance.setCartPredicate(template.getCartPredicate());
instance.setIsActive(template.getIsActive());
instance.setReferences(Optional.ofNullable(template.getReferences())
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeBuilder.java
index 63174933b4..6fb511e436 100644
--- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeBuilder.java
+++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeBuilder.java
@@ -22,6 +22,7 @@
* .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
* .code("{code}")
* .plusCartDiscounts(cartDiscountsBuilder -> cartDiscountsBuilder)
+ * .plusStores(storesBuilder -> storesBuilder)
* .isActive(true)
* .plusReferences(referencesBuilder -> referencesBuilder)
* .plusGroups(groupsBuilder -> groupsBuilder)
@@ -59,6 +60,8 @@ public class DiscountCodeBuilder implements Builder {
private java.util.List cartDiscounts;
+ private java.util.List stores;
+
@Nullable
private String cartPredicate;
@@ -387,6 +390,100 @@ public DiscountCodeBuilder setCartDiscounts(
builder.apply(com.commercetools.api.models.cart_discount.CartDiscountReferenceBuilder.of()));
}
+ /**
+ * Reference to the Stores the DiscountCode is associated with, derived from the stores field of each referenced CartDiscount.
+ * The value of this field is eventually consistent.
+ * @param stores value to be set
+ * @return Builder
+ */
+
+ public DiscountCodeBuilder stores(final com.commercetools.api.models.store.StoreKeyReference... stores) {
+ this.stores = new ArrayList<>(Arrays.asList(stores));
+ return this;
+ }
+
+ /**
+ * Reference to the Stores the DiscountCode is associated with, derived from the stores field of each referenced CartDiscount.
+ * The value of this field is eventually consistent.
+ * @param stores value to be set
+ * @return Builder
+ */
+
+ public DiscountCodeBuilder stores(
+ final java.util.List stores) {
+ this.stores = stores;
+ return this;
+ }
+
+ /**
+ * Reference to the Stores the DiscountCode is associated with, derived from the stores field of each referenced CartDiscount.
+ * The value of this field is eventually consistent.
+ * @param stores value to be set
+ * @return Builder
+ */
+
+ public DiscountCodeBuilder plusStores(final com.commercetools.api.models.store.StoreKeyReference... stores) {
+ if (this.stores == null) {
+ this.stores = new ArrayList<>();
+ }
+ this.stores.addAll(Arrays.asList(stores));
+ return this;
+ }
+
+ /**
+ * Reference to the Stores the DiscountCode is associated with, derived from the stores field of each referenced CartDiscount.
+ * The value of this field is eventually consistent.
+ * @param builder function to build the stores value
+ * @return Builder
+ */
+
+ public DiscountCodeBuilder plusStores(
+ Function builder) {
+ if (this.stores == null) {
+ this.stores = new ArrayList<>();
+ }
+ this.stores.add(builder.apply(com.commercetools.api.models.store.StoreKeyReferenceBuilder.of()).build());
+ return this;
+ }
+
+ /**
+ * Reference to the Stores the DiscountCode is associated with, derived from the stores field of each referenced CartDiscount.
+ * The value of this field is eventually consistent.
+ * @param builder function to build the stores value
+ * @return Builder
+ */
+
+ public DiscountCodeBuilder withStores(
+ Function builder) {
+ this.stores = new ArrayList<>();
+ this.stores.add(builder.apply(com.commercetools.api.models.store.StoreKeyReferenceBuilder.of()).build());
+ return this;
+ }
+
+ /**
+ * Reference to the Stores the DiscountCode is associated with, derived from the stores field of each referenced CartDiscount.
+ * The value of this field is eventually consistent.
+ * @param builder function to build the stores value
+ * @return Builder
+ */
+
+ public DiscountCodeBuilder addStores(
+ Function builder) {
+ return plusStores(builder.apply(com.commercetools.api.models.store.StoreKeyReferenceBuilder.of()));
+ }
+
+ /**
+ * Reference to the Stores the DiscountCode is associated with, derived from the stores field of each referenced CartDiscount.
+ * The value of this field is eventually consistent.
+ * @param builder function to build the stores value
+ * @return Builder
+ */
+
+ public DiscountCodeBuilder setStores(
+ Function builder) {
+ return stores(builder.apply(com.commercetools.api.models.store.StoreKeyReferenceBuilder.of()));
+ }
+
/**
* DiscountCode can only be applied to Carts that match this predicate.
* @param cartPredicate value to be set
@@ -710,6 +807,16 @@ public java.util.ListReference to the Stores the DiscountCode is associated with, derived from the stores field of each referenced CartDiscount.
+ * The value of this field is eventually consistent.
+ * @return stores
+ */
+
+ public java.util.List getStores() {
+ return this.stores;
+ }
+
/**
* DiscountCode can only be applied to Carts that match this predicate.
* @return cartPredicate
@@ -824,11 +931,12 @@ public DiscountCode build() {
Objects.requireNonNull(lastModifiedAt, DiscountCode.class + ": lastModifiedAt is missing");
Objects.requireNonNull(code, DiscountCode.class + ": code is missing");
Objects.requireNonNull(cartDiscounts, DiscountCode.class + ": cartDiscounts is missing");
+ Objects.requireNonNull(stores, DiscountCode.class + ": stores is missing");
Objects.requireNonNull(isActive, DiscountCode.class + ": isActive is missing");
Objects.requireNonNull(references, DiscountCode.class + ": references is missing");
Objects.requireNonNull(groups, DiscountCode.class + ": groups is missing");
return new DiscountCodeImpl(id, version, createdAt, lastModifiedAt, key, lastModifiedBy, createdBy, name,
- description, code, cartDiscounts, cartPredicate, isActive, references, maxApplications,
+ description, code, cartDiscounts, stores, cartPredicate, isActive, references, maxApplications,
maxApplicationsPerCustomer, custom, groups, validFrom, validUntil, applicationVersion);
}
@@ -838,7 +946,7 @@ public DiscountCode build() {
*/
public DiscountCode buildUnchecked() {
return new DiscountCodeImpl(id, version, createdAt, lastModifiedAt, key, lastModifiedBy, createdBy, name,
- description, code, cartDiscounts, cartPredicate, isActive, references, maxApplications,
+ description, code, cartDiscounts, stores, cartPredicate, isActive, references, maxApplications,
maxApplicationsPerCustomer, custom, groups, validFrom, validUntil, applicationVersion);
}
@@ -868,6 +976,7 @@ public static DiscountCodeBuilder of(final DiscountCode template) {
builder.description = template.getDescription();
builder.code = template.getCode();
builder.cartDiscounts = template.getCartDiscounts();
+ builder.stores = template.getStores();
builder.cartPredicate = template.getCartPredicate();
builder.isActive = template.getIsActive();
builder.references = template.getReferences();
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeImpl.java
index 8ba50401b8..4c65eea9ec 100644
--- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeImpl.java
+++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeImpl.java
@@ -45,6 +45,8 @@ public class DiscountCodeImpl implements DiscountCode, ModelBase {
private java.util.List cartDiscounts;
+ private java.util.List stores;
+
private String cartPredicate;
private Boolean isActive;
@@ -79,6 +81,7 @@ public class DiscountCodeImpl implements DiscountCode, ModelBase {
@JsonProperty("description") final com.commercetools.api.models.common.LocalizedString description,
@JsonProperty("code") final String code,
@JsonProperty("cartDiscounts") final java.util.List cartDiscounts,
+ @JsonProperty("stores") final java.util.List stores,
@JsonProperty("cartPredicate") final String cartPredicate, @JsonProperty("isActive") final Boolean isActive,
@JsonProperty("references") final java.util.List references,
@JsonProperty("maxApplications") final Long maxApplications,
@@ -99,6 +102,7 @@ public class DiscountCodeImpl implements DiscountCode, ModelBase {
this.description = description;
this.code = code;
this.cartDiscounts = cartDiscounts;
+ this.stores = stores;
this.cartPredicate = cartPredicate;
this.isActive = isActive;
this.references = references;
@@ -205,6 +209,15 @@ public java.util.ListReference to the Stores the DiscountCode is associated with, derived from the stores field of each referenced CartDiscount.
+ * The value of this field is eventually consistent.
+ */
+
+ public java.util.List getStores() {
+ return this.stores;
+ }
+
/**
* DiscountCode can only be applied to Carts that match this predicate.
*/
@@ -341,6 +354,14 @@ public void setCartDiscounts(
this.cartDiscounts = cartDiscounts;
}
+ public void setStores(final com.commercetools.api.models.store.StoreKeyReference... stores) {
+ this.stores = new ArrayList<>(Arrays.asList(stores));
+ }
+
+ public void setStores(final java.util.List stores) {
+ this.stores = stores;
+ }
+
public void setCartPredicate(final String cartPredicate) {
this.cartPredicate = cartPredicate;
}
@@ -410,6 +431,7 @@ public boolean equals(Object o) {
.append(description, that.description)
.append(code, that.code)
.append(cartDiscounts, that.cartDiscounts)
+ .append(stores, that.stores)
.append(cartPredicate, that.cartPredicate)
.append(isActive, that.isActive)
.append(references, that.references)
@@ -431,6 +453,7 @@ public boolean equals(Object o) {
.append(description, that.description)
.append(code, that.code)
.append(cartDiscounts, that.cartDiscounts)
+ .append(stores, that.stores)
.append(cartPredicate, that.cartPredicate)
.append(isActive, that.isActive)
.append(references, that.references)
@@ -457,6 +480,7 @@ public int hashCode() {
.append(description)
.append(code)
.append(cartDiscounts)
+ .append(stores)
.append(cartPredicate)
.append(isActive)
.append(references)
@@ -483,6 +507,7 @@ public String toString() {
.append("description", description)
.append("code", code)
.append("cartDiscounts", cartDiscounts)
+ .append("stores", stores)
.append("cartPredicate", cartPredicate)
.append("isActive", isActive)
.append("references", references)
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/discount_code/DiscountCodeQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/discount_code/DiscountCodeQueryBuilderDsl.java
index 9698f82491..188632daf7 100644
--- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/discount_code/DiscountCodeQueryBuilderDsl.java
+++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/discount_code/DiscountCodeQueryBuilderDsl.java
@@ -98,6 +98,19 @@ public CollectionPredicateBuilder cartDiscounts() {
p -> new CombinationQueryPredicate<>(p, DiscountCodeQueryBuilderDsl::of));
}
+ public CombinationQueryPredicate stores(
+ Function> fn) {
+ return new CombinationQueryPredicate<>(ContainerQueryPredicate.of()
+ .parent(ConstantQueryPredicate.of().constant("stores"))
+ .inner(fn.apply(com.commercetools.api.predicates.query.store.StoreKeyReferenceQueryBuilderDsl.of())),
+ DiscountCodeQueryBuilderDsl::of);
+ }
+
+ public CollectionPredicateBuilder stores() {
+ return new CollectionPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("stores")),
+ p -> new CombinationQueryPredicate<>(p, DiscountCodeQueryBuilderDsl::of));
+ }
+
public StringComparisonPredicateBuilder cartPredicate() {
return new StringComparisonPredicateBuilder<>(
BinaryQueryPredicate.of().left(new ConstantQueryPredicate("cartPredicate")),
diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDTest.java
new file mode 100644
index 0000000000..e21505c872
--- /dev/null
+++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDTest.java
@@ -0,0 +1,106 @@
+
+package com.commercetools.api.client.resource;
+
+import java.nio.charset.StandardCharsets;
+import java.util.concurrent.CompletableFuture;
+
+import com.commercetools.api.client.ApiRoot;
+
+import io.vrap.rmf.base.client.*;
+import io.vrap.rmf.base.client.ApiHttpClient;
+import io.vrap.rmf.base.client.ApiHttpRequest;
+import io.vrap.rmf.base.client.VrapHttpClient;
+import io.vrap.rmf.base.client.error.ApiClientException;
+import io.vrap.rmf.base.client.error.ApiServerException;
+import io.vrap.rmf.base.client.utils.Generated;
+
+import org.assertj.core.api.Assertions;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.MethodSource;
+import org.mockito.Mockito;
+
+@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
+public class ByProjectKeyInStoreKeyByStoreKeyDiscountCodesByIDTest {
+ private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class);
+ private final String projectKey = "test_projectKey";
+ private final static ApiRoot apiRoot = ApiRoot.of();
+ private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build();
+
+ @ParameterizedTest
+ @MethodSource("requestWithMethodParameters")
+ public void withMethods(ApiHttpRequest request, String httpMethod, String uri) {
+ Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase());
+ Assertions.assertThat(uri).isEqualTo(request.getUri().toString());
+ }
+
+ @ParameterizedTest
+ @MethodSource("executeMethodParameters")
+ public void executeServerException(HttpRequestCommand> httpRequest) throws Exception {
+ Mockito.when(httpClientMock.execute(Mockito.any()))
+ .thenReturn(CompletableFuture.completedFuture(
+ new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!")));
+
+ Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get())
+ .hasCauseInstanceOf(ApiServerException.class);
+ }
+
+ @ParameterizedTest
+ @MethodSource("executeMethodParameters")
+ public void executeClientException(HttpRequestCommand> httpRequest) throws Exception {
+ Mockito.when(httpClientMock.execute(Mockito.any()))
+ .thenReturn(CompletableFuture.completedFuture(
+ new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!")));
+
+ Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get())
+ .hasCauseInstanceOf(ApiClientException.class);
+ }
+
+ public static Object[][] requestWithMethodParameters() {
+ return new Object[][] {
+ new Object[] {
+ apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .withId("test_ID")
+ .get()
+ .withExpand("expand")
+ .createHttpRequest(),
+ "get", "test_projectKey/in-store/key=test_storeKey/discount-codes/test_ID?expand=expand", },
+ new Object[] {
+ apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .withId("test_ID")
+ .get()
+ .createHttpRequest(),
+ "get", "test_projectKey/in-store/key=test_storeKey/discount-codes/test_ID", },
+ new Object[] {
+ apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .withId("test_ID")
+ .head()
+ .createHttpRequest(),
+ "head", "test_projectKey/in-store/key=test_storeKey/discount-codes/test_ID", } };
+ }
+
+ public static Object[][] executeMethodParameters() {
+ return new Object[][] {
+ new Object[] { apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .withId("test_ID")
+ .get()
+ .withExpand("expand"), },
+ new Object[] { apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .withId("test_ID")
+ .get(), },
+ new Object[] { apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .withId("test_ID")
+ .head(), } };
+ }
+}
diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyTest.java
new file mode 100644
index 0000000000..72d365759d
--- /dev/null
+++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyTest.java
@@ -0,0 +1,107 @@
+
+package com.commercetools.api.client.resource;
+
+import java.nio.charset.StandardCharsets;
+import java.util.concurrent.CompletableFuture;
+
+import com.commercetools.api.client.ApiRoot;
+
+import io.vrap.rmf.base.client.*;
+import io.vrap.rmf.base.client.ApiHttpClient;
+import io.vrap.rmf.base.client.ApiHttpRequest;
+import io.vrap.rmf.base.client.VrapHttpClient;
+import io.vrap.rmf.base.client.error.ApiClientException;
+import io.vrap.rmf.base.client.error.ApiServerException;
+import io.vrap.rmf.base.client.utils.Generated;
+
+import org.assertj.core.api.Assertions;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.MethodSource;
+import org.mockito.Mockito;
+
+@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
+public class ByProjectKeyInStoreKeyByStoreKeyDiscountCodesKeyByKeyTest {
+ private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class);
+ private final String projectKey = "test_projectKey";
+ private final static ApiRoot apiRoot = ApiRoot.of();
+ private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build();
+
+ @ParameterizedTest
+ @MethodSource("requestWithMethodParameters")
+ public void withMethods(ApiHttpRequest request, String httpMethod, String uri) {
+ Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase());
+ Assertions.assertThat(uri).isEqualTo(request.getUri().toString());
+ }
+
+ @ParameterizedTest
+ @MethodSource("executeMethodParameters")
+ public void executeServerException(HttpRequestCommand> httpRequest) throws Exception {
+ Mockito.when(httpClientMock.execute(Mockito.any()))
+ .thenReturn(CompletableFuture.completedFuture(
+ new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!")));
+
+ Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get())
+ .hasCauseInstanceOf(ApiServerException.class);
+ }
+
+ @ParameterizedTest
+ @MethodSource("executeMethodParameters")
+ public void executeClientException(HttpRequestCommand> httpRequest) throws Exception {
+ Mockito.when(httpClientMock.execute(Mockito.any()))
+ .thenReturn(CompletableFuture.completedFuture(
+ new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!")));
+
+ Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get())
+ .hasCauseInstanceOf(ApiClientException.class);
+ }
+
+ public static Object[][] requestWithMethodParameters() {
+ return new Object[][] {
+ new Object[] {
+ apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .withKey("test_key")
+ .get()
+ .withExpand("expand")
+ .createHttpRequest(),
+ "get",
+ "test_projectKey/in-store/key=test_storeKey/discount-codes/key=test_key?expand=expand", },
+ new Object[] {
+ apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .withKey("test_key")
+ .get()
+ .createHttpRequest(),
+ "get", "test_projectKey/in-store/key=test_storeKey/discount-codes/key=test_key", },
+ new Object[] {
+ apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .withKey("test_key")
+ .head()
+ .createHttpRequest(),
+ "head", "test_projectKey/in-store/key=test_storeKey/discount-codes/key=test_key", } };
+ }
+
+ public static Object[][] executeMethodParameters() {
+ return new Object[][] {
+ new Object[] { apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .withKey("test_key")
+ .get()
+ .withExpand("expand"), },
+ new Object[] { apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .withKey("test_key")
+ .get(), },
+ new Object[] { apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .withKey("test_key")
+ .head(), } };
+ }
+}
diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesTest.java
new file mode 100644
index 0000000000..1e7abaea03
--- /dev/null
+++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyInStoreKeyByStoreKeyDiscountCodesTest.java
@@ -0,0 +1,191 @@
+
+package com.commercetools.api.client.resource;
+
+import java.nio.charset.StandardCharsets;
+import java.util.concurrent.CompletableFuture;
+
+import com.commercetools.api.client.ApiRoot;
+
+import io.vrap.rmf.base.client.*;
+import io.vrap.rmf.base.client.ApiHttpClient;
+import io.vrap.rmf.base.client.ApiHttpRequest;
+import io.vrap.rmf.base.client.VrapHttpClient;
+import io.vrap.rmf.base.client.error.ApiClientException;
+import io.vrap.rmf.base.client.error.ApiServerException;
+import io.vrap.rmf.base.client.utils.Generated;
+
+import org.assertj.core.api.Assertions;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.MethodSource;
+import org.mockito.Mockito;
+
+@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
+public class ByProjectKeyInStoreKeyByStoreKeyDiscountCodesTest {
+ private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class);
+ private final String projectKey = "test_projectKey";
+ private final static ApiRoot apiRoot = ApiRoot.of();
+ private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build();
+
+ @ParameterizedTest
+ @MethodSource("requestWithMethodParameters")
+ public void withMethods(ApiHttpRequest request, String httpMethod, String uri) {
+ Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase());
+ Assertions.assertThat(uri).isEqualTo(request.getUri().toString());
+ }
+
+ @ParameterizedTest
+ @MethodSource("executeMethodParameters")
+ public void executeServerException(HttpRequestCommand> httpRequest) throws Exception {
+ Mockito.when(httpClientMock.execute(Mockito.any()))
+ .thenReturn(CompletableFuture.completedFuture(
+ new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!")));
+
+ Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get())
+ .hasCauseInstanceOf(ApiServerException.class);
+ }
+
+ @ParameterizedTest
+ @MethodSource("executeMethodParameters")
+ public void executeClientException(HttpRequestCommand> httpRequest) throws Exception {
+ Mockito.when(httpClientMock.execute(Mockito.any()))
+ .thenReturn(CompletableFuture.completedFuture(
+ new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!")));
+
+ Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get())
+ .hasCauseInstanceOf(ApiClientException.class);
+ }
+
+ public static Object[][] requestWithMethodParameters() {
+ return new Object[][] {
+ new Object[] {
+ apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .get()
+ .withExpand("expand")
+ .createHttpRequest(),
+ "get", "test_projectKey/in-store/key=test_storeKey/discount-codes?expand=expand", },
+ new Object[] {
+ apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .get()
+ .withSort("sort")
+ .createHttpRequest(),
+ "get", "test_projectKey/in-store/key=test_storeKey/discount-codes?sort=sort", },
+ new Object[] {
+ apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .get()
+ .withLimit(7)
+ .createHttpRequest(),
+ "get", "test_projectKey/in-store/key=test_storeKey/discount-codes?limit=7", },
+ new Object[] {
+ apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .get()
+ .withOffset(3)
+ .createHttpRequest(),
+ "get", "test_projectKey/in-store/key=test_storeKey/discount-codes?offset=3", },
+ new Object[] {
+ apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .get()
+ .withWithTotal(true)
+ .createHttpRequest(),
+ "get", "test_projectKey/in-store/key=test_storeKey/discount-codes?withTotal=true", },
+ new Object[] {
+ apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .get()
+ .withWhere("where")
+ .createHttpRequest(),
+ "get", "test_projectKey/in-store/key=test_storeKey/discount-codes?where=where", },
+ new Object[] {
+ apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .get()
+ .withPredicateVar("varName", "var.varName")
+ .createHttpRequest(),
+ "get", "test_projectKey/in-store/key=test_storeKey/discount-codes?var.varName=var.varName", },
+ new Object[] {
+ apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .get()
+ .createHttpRequest(),
+ "get", "test_projectKey/in-store/key=test_storeKey/discount-codes", },
+ new Object[] {
+ apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .head()
+ .withWhere("where")
+ .createHttpRequest(),
+ "head", "test_projectKey/in-store/key=test_storeKey/discount-codes?where=where", },
+ new Object[] {
+ apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .head()
+ .createHttpRequest(),
+ "head", "test_projectKey/in-store/key=test_storeKey/discount-codes", } };
+ }
+
+ public static Object[][] executeMethodParameters() {
+ return new Object[][] {
+ new Object[] { apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .get()
+ .withExpand("expand"), },
+ new Object[] { apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .get()
+ .withSort("sort"), },
+ new Object[] { apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .get()
+ .withLimit(7), },
+ new Object[] { apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .get()
+ .withOffset(3), },
+ new Object[] { apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .get()
+ .withWithTotal(true), },
+ new Object[] { apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .get()
+ .withWhere("where"), },
+ new Object[] { apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .get()
+ .withPredicateVar("varName", "var.varName"), },
+ new Object[] { apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .get(), },
+ new Object[] { apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .head()
+ .withWhere("where"), },
+ new Object[] { apiRoot.withProjectKey("test_projectKey")
+ .inStoreKeyWithStoreKeyValue("test_storeKey")
+ .discountCodes()
+ .head(), } };
+ }
+}
diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/discount_code/DiscountCodeTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/discount_code/DiscountCodeTest.java
index 1ea69d168e..82cbd5c0b2 100644
--- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/discount_code/DiscountCodeTest.java
+++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/discount_code/DiscountCodeTest.java
@@ -41,6 +41,10 @@ public static Object[][] objectBuilder() {
DiscountCode.builder()
.cartDiscounts(Collections.singletonList(
new com.commercetools.api.models.cart_discount.CartDiscountReferenceImpl())) },
+ new Object[] { "stores",
+ DiscountCode.builder()
+ .stores(Collections.singletonList(
+ new com.commercetools.api.models.store.StoreKeyReferenceImpl())) },
new Object[] { "cartPredicate", DiscountCode.builder().cartPredicate("cartPredicate") },
new Object[] { "isActive", DiscountCode.builder().isActive(true) },
new Object[] { "references",
@@ -141,6 +145,14 @@ public void cartDiscounts() {
.singletonList(new com.commercetools.api.models.cart_discount.CartDiscountReferenceImpl()));
}
+ @Test
+ public void stores() {
+ DiscountCode value = DiscountCode.of();
+ value.setStores(Collections.singletonList(new com.commercetools.api.models.store.StoreKeyReferenceImpl()));
+ Assertions.assertThat(value.getStores())
+ .isEqualTo(Collections.singletonList(new com.commercetools.api.models.store.StoreKeyReferenceImpl()));
+ }
+
@Test
public void cartPredicate() {
DiscountCode value = DiscountCode.of();
diff --git a/references.txt b/references.txt
index a37ed941d4..9f9fd81043 100644
--- a/references.txt
+++ b/references.txt
@@ -585,3 +585,4 @@ d4c439f7fc7dd0ad0d9d85c9e69cd5f32609af3d
2e41f003e889de240f6a92aa143c3103ea348e54
eba9a59893b6b3e86b86d17cf2c33986232bc543
a9e9771fe2b7eca7651b0ca5fef4992d4df8b21c
+c8321d32796eebddbeced6e06cf4779a0cfc6cbc
From 1e13ee790602c5cd98bbe3e3f29830fc5dfa8bd4 Mon Sep 17 00:00:00 2001
From: "ct-sdks[bot]" <153784748+ct-sdks[bot]@users.noreply.github.com>
Date: Fri, 10 Jul 2026 06:44:22 +0000
Subject: [PATCH 04/17] build(codegen): updating SDK
---
changes.md | 17 ++++
.../ByProjectKeyByResourceTypeByIDGet.java | 84 +++++++++++++++++++
.../client/ByProjectKeyByResourceTypeGet.java | 84 +++++++++++++++++++
.../history/client/ByProjectKeyGet.java | 84 +++++++++++++++++++
.../RecordPagedQueryResponse.java | 7 +-
.../RecordPagedQueryResponseBuilder.java | 12 +--
.../RecordPagedQueryResponseImpl.java | 2 +-
.../ByProjectKeyByResourceTypeByIDTest.java | 13 +++
.../ByProjectKeyByResourceTypeTest.java | 9 ++
.../client/resource/ByProjectKeyTest.java | 4 +
references.txt | 1 +
11 files changed, 307 insertions(+), 10 deletions(-)
diff --git a/changes.md b/changes.md
index 5bfe2f2196..36a5102f44 100644
--- a/changes.md
+++ b/changes.md
@@ -27,3 +27,20 @@
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().discountCodes().withId().head()`
+**History changes**
+
+
+Required Property(s)
+
+- changed property `total` of type `RecordPagedQueryResponse` to be optional
+
+
+
+
+Added QueryParameter(s)
+
+- added query parameter `withTotal` to method `get /{projectKey}`
+- added query parameter `withTotal` to method `get /{projectKey}/{resourceType}`
+- added query parameter `withTotal` to method `get /{projectKey}/{resourceType}/{ID}`
+
+
diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/client/ByProjectKeyByResourceTypeByIDGet.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/client/ByProjectKeyByResourceTypeByIDGet.java
index 67e037c3fb..d3f192fc3d 100644
--- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/client/ByProjectKeyByResourceTypeByIDGet.java
+++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/client/ByProjectKeyByResourceTypeByIDGet.java
@@ -163,6 +163,10 @@ public List getExpand() {
return this.getQueryParam("expand");
}
+ public List getWithTotal() {
+ return this.getQueryParam("withTotal");
+ }
+
public void setProjectKey(final String projectKey) {
this.projectKey = projectKey;
}
@@ -1376,6 +1380,86 @@ public ByProjectKeyByResourceTypeByIDGet addExpand(final Collection new ParamEntry<>("expand", s.toString())).collect(Collectors.toList()));
}
+ /**
+ * set withTotal with the specified value
+ * @param withTotal value to be set
+ * @param value type
+ * @return ByProjectKeyByResourceTypeByIDGet
+ */
+ public ByProjectKeyByResourceTypeByIDGet withWithTotal(final TValue withTotal) {
+ return copy().withQueryParam("withTotal", withTotal);
+ }
+
+ /**
+ * add additional withTotal query parameter
+ * @param withTotal value to be added
+ * @param value type
+ * @return ByProjectKeyByResourceTypeByIDGet
+ */
+ public ByProjectKeyByResourceTypeByIDGet addWithTotal(final TValue withTotal) {
+ return copy().addQueryParam("withTotal", withTotal);
+ }
+
+ /**
+ * set withTotal with the specified value
+ * @param supplier supplier for the value to be set
+ * @return ByProjectKeyByResourceTypeByIDGet
+ */
+ public ByProjectKeyByResourceTypeByIDGet withWithTotal(final Supplier supplier) {
+ return copy().withQueryParam("withTotal", supplier.get());
+ }
+
+ /**
+ * add additional withTotal query parameter
+ * @param supplier supplier for the value to be added
+ * @return ByProjectKeyByResourceTypeByIDGet
+ */
+ public ByProjectKeyByResourceTypeByIDGet addWithTotal(final Supplier supplier) {
+ return copy().addQueryParam("withTotal", supplier.get());
+ }
+
+ /**
+ * set withTotal with the specified value
+ * @param op builder for the value to be set
+ * @return ByProjectKeyByResourceTypeByIDGet
+ */
+ public ByProjectKeyByResourceTypeByIDGet withWithTotal(final Function op) {
+ return copy().withQueryParam("withTotal", op.apply(new StringBuilder()));
+ }
+
+ /**
+ * add additional withTotal query parameter
+ * @param op builder for the value to be added
+ * @return ByProjectKeyByResourceTypeByIDGet
+ */
+ public ByProjectKeyByResourceTypeByIDGet addWithTotal(final Function op) {
+ return copy().addQueryParam("withTotal", op.apply(new StringBuilder()));
+ }
+
+ /**
+ * set withTotal with the specified values
+ * @param withTotal values to be set
+ * @param value type
+ * @return ByProjectKeyByResourceTypeByIDGet
+ */
+ public ByProjectKeyByResourceTypeByIDGet withWithTotal(final Collection withTotal) {
+ return copy().withoutQueryParam("withTotal")
+ .addQueryParams(withTotal.stream()
+ .map(s -> new ParamEntry<>("withTotal", s.toString()))
+ .collect(Collectors.toList()));
+ }
+
+ /**
+ * add additional withTotal query parameters
+ * @param withTotal values to be added
+ * @param value type
+ * @return ByProjectKeyByResourceTypeByIDGet
+ */
+ public ByProjectKeyByResourceTypeByIDGet addWithTotal(final Collection withTotal) {
+ return copy().addQueryParams(
+ withTotal.stream().map(s -> new ParamEntry<>("withTotal", s.toString())).collect(Collectors.toList()));
+ }
+
@Override
public boolean equals(Object o) {
if (this == o)
diff --git a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/client/ByProjectKeyByResourceTypeGet.java b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/client/ByProjectKeyByResourceTypeGet.java
index 4c7f98571b..e02138cdbd 100644
--- a/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/client/ByProjectKeyByResourceTypeGet.java
+++ b/commercetools/commercetools-sdk-java-history/src/main/java-generated/com/commercetools/history/client/ByProjectKeyByResourceTypeGet.java
@@ -158,6 +158,10 @@ public List getExpand() {
return this.getQueryParam("expand");
}
+ public List getWithTotal() {
+ return this.getQueryParam("withTotal");
+ }
+
public void setProjectKey(final String projectKey) {
this.projectKey = projectKey;
}
@@ -1447,6 +1451,86 @@ public ByProjectKeyByResourceTypeGet addExpand(final Collection
expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList()));
}
+ /**
+ * set withTotal with the specified value
+ * @param withTotal value to be set
+ * @param value type
+ * @return ByProjectKeyByResourceTypeGet
+ */
+ public ByProjectKeyByResourceTypeGet withWithTotal(final TValue withTotal) {
+ return copy().withQueryParam("withTotal", withTotal);
+ }
+
+ /**
+ * add additional withTotal query parameter
+ * @param withTotal value to be added
+ * @param value type
+ * @return ByProjectKeyByResourceTypeGet
+ */
+ public ByProjectKeyByResourceTypeGet addWithTotal(final TValue withTotal) {
+ return copy().addQueryParam("withTotal", withTotal);
+ }
+
+ /**
+ * set withTotal with the specified value
+ * @param supplier supplier for the value to be set
+ * @return ByProjectKeyByResourceTypeGet
+ */
+ public ByProjectKeyByResourceTypeGet withWithTotal(final Supplier supplier) {
+ return copy().withQueryParam("withTotal", supplier.get());
+ }
+
+ /**
+ * add additional withTotal query parameter
+ * @param supplier supplier for the value to be added
+ * @return ByProjectKeyByResourceTypeGet
+ */
+ public ByProjectKeyByResourceTypeGet addWithTotal(final Supplier