diff --git a/changes.md b/changes.md index 7653e8e8d9a..36c7ab98765 100644 --- a/changes.md +++ b/changes.md @@ -1,158 +1,32 @@ -**Api changes** +**Import changes**
Added Enum(s) -- added enum `product-tailoring` to type `ReferenceTypeId` -- added enum `ManuallySuspended` to type `SubscriptionHealthStatus` -
- - -
-Added Property(s) - -- added property `taxPortions` to type `TaxedItemPrice` -- added property `productsSearch` to type `SearchIndexingConfiguration` -- added property `mode` to type `ProjectChangeProductSearchIndexingEnabledAction` +- added enum `discount-code` to type `ImportResourceType`
Added Method(s) -- added method `apiRoot.withProjectKey().productTailoring().get()` -- added method `apiRoot.withProjectKey().productTailoring().post()` -- added method `apiRoot.withProjectKey().products().search().post()` -- added method `apiRoot.withProjectKey().products().search().head()` -- added method `apiRoot.withProjectKey().productTailoring().withKey().get()` -- added method `apiRoot.withProjectKey().productTailoring().withKey().post()` -- added method `apiRoot.withProjectKey().productTailoring().withKey().delete()` -- added method `apiRoot.withProjectKey().productTailoring().withId().get()` -- added method `apiRoot.withProjectKey().productTailoring().withId().post()` -- added method `apiRoot.withProjectKey().productTailoring().withId().delete()` -- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().productTailoring().get()` -- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().productTailoring().post()` -- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().products().withProductId().productTailoring().get()` -- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().products().withProductId().productTailoring().post()` -- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().products().withProductId().productTailoring().delete()` -- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().products().withProductKey().productTailoring().get()` -- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().products().withProductKey().productTailoring().post()` -- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().products().withProductKey().productTailoring().delete()` +- added method `apiRoot.withProjectKeyValue().discountCodes().importContainers().withImportContainerKeyValue().post()`
Added Resource(s) -- added resource `/{projectKey}/product-tailoring` -- added resource `/{projectKey}/products/search` -- added resource `/{projectKey}/product-tailoring/key={key}` -- added resource `/{projectKey}/product-tailoring/{ID}` -- added resource `/{projectKey}/in-store/key={storeKey}/product-tailoring` -- added resource `/{projectKey}/in-store/key={storeKey}/products` -- added resource `/{projectKey}/in-store/key={storeKey}/products/{productID}` -- added resource `/{projectKey}/in-store/key={storeKey}/products/key={productKey}` -- added resource `/{projectKey}/in-store/key={storeKey}/products/{productID}/product-tailoring` -- added resource `/{projectKey}/in-store/key={storeKey}/products/key={productKey}/product-tailoring` +- added resource `/{projectKey}/discount-codes` +- added resource `/{projectKey}/discount-codes/import-containers` +- added resource `/{projectKey}/discount-codes/import-containers/{importContainerKey}`
Added Type(s) -- added type `LockedFieldError` -- added type `GraphQLLockedFieldError` -- added type `ProductTailoringCreatedMessage` -- added type `ProductTailoringDeletedMessage` -- added type `ProductTailoringDescriptionSetMessage` -- added type `ProductTailoringNameSetMessage` -- added type `ProductTailoringPublishedMessage` -- added type `ProductTailoringSlugSetMessage` -- added type `ProductTailoringUnpublishedMessage` -- added type `ProductTailoringCreatedMessagePayload` -- added type `ProductTailoringDeletedMessagePayload` -- added type `ProductTailoringDescriptionSetMessagePayload` -- added type `ProductTailoringNameSetMessagePayload` -- added type `ProductTailoringPublishedMessagePayload` -- added type `ProductTailoringSlugSetMessagePayload` -- added type `ProductTailoringUnpublishedMessagePayload` -- added type `ProductPagedSearchResponse` -- added type `ProductSearchErrorResponse` -- added type `ProductSearchMatchingVariantEntry` -- added type `ProductSearchMatchingVariants` -- added type `ProductSearchProjectionParams` -- added type `ProductSearchRequest` -- added type `ProductSearchResult` -- added type `ProductSearchFacetCountExpression` -- added type `ProductSearchFacetCountLevelEnum` -- added type `ProductSearchFacetCountValue` -- added type `ProductSearchFacetDistinctBucketSortBy` -- added type `ProductSearchFacetDistinctBucketSortExpression` -- added type `ProductSearchFacetDistinctExpression` -- added type `ProductSearchFacetDistinctValue` -- added type `ProductSearchFacetExpression` -- added type `ProductSearchFacetRangesExpression` -- added type `ProductSearchFacetRangesFacetRange` -- added type `ProductSearchFacetRangesValue` -- added type `ProductSearchFacetResult` -- added type `ProductSearchFacetResultBucket` -- added type `ProductSearchFacetResultBucketEntry` -- added type `ProductSearchFacetResultCount` -- added type `ProductSearchFacetScope` -- added type `ProductSearchFacetScopeEnum` -- added type `ProductTailoring` -- added type `ProductTailoringData` -- added type `ProductTailoringDraft` -- added type `ProductTailoringInStoreDraft` -- added type `ProductTailoringPagedQueryResponse` -- added type `ProductTailoringReference` -- added type `ProductTailoringResourceIdentifier` -- added type `ProductTailoringUpdate` -- added type `ProductTailoringUpdateAction` -- added type `ProductTailoringPublishAction` -- added type `ProductTailoringSetDescriptionAction` -- added type `ProductTailoringSetMetaAttributesAction` -- added type `ProductTailoringSetMetaDescriptionAction` -- added type `ProductTailoringSetMetaKeywordsAction` -- added type `ProductTailoringSetMetaTitleAction` -- added type `ProductTailoringSetNameAction` -- added type `ProductTailoringSetSlugAction` -- added type `ProductTailoringUnpublishAction` -- added type `ProductSearchIndexingMode` -- added type `ProductSearchStatus` -- added type `SearchAndExpression` -- added type `SearchAnyValue` -- added type `SearchCompoundExpression` -- added type `SearchDateRangeExpression` -- added type `SearchDateRangeValue` -- added type `SearchDateTimeRangeExpression` -- added type `SearchDateTimeRangeValue` -- added type `SearchExactExpression` -- added type `SearchExistsExpression` -- added type `SearchExistsValue` -- added type `SearchFieldType` -- added type `SearchFilterExpression` -- added type `SearchFullTextExpression` -- added type `SearchFullTextPrefixExpression` -- added type `SearchFullTextPrefixValue` -- added type `SearchFullTextValue` -- added type `SearchLongRangeExpression` -- added type `SearchLongRangeValue` -- added type `SearchMatchType` -- added type `SearchMatchingVariant` -- added type `SearchNotExpression` -- added type `SearchNumberRangeExpression` -- added type `SearchNumberRangeValue` -- added type `SearchOrExpression` -- added type `SearchPrefixExpression` -- added type `SearchQuery` -- added type `SearchQueryExpression` -- added type `SearchQueryExpressionValue` -- added type `SearchSortMode` -- added type `SearchSortOrder` -- added type `SearchSorting` -- added type `SearchTimeRangeExpression` -- added type `SearchTimeRangeValue` -- added type `SearchWildCardExpression` +- added type `DiscountCodeImportRequest` +- added type `DiscountCodeImport`
diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPost.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPost.java new file mode 100644 index 00000000000..3047ff7623e --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPost.java @@ -0,0 +1,149 @@ + +package com.commercetools.importapi.client; + +import java.net.URI; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +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; + +/** + *

Creates a request for creating new Discount Codes or updating existing ones.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKeyValue("{projectKey}")
+ *            .discountCodes()
+ *            .importContainers()
+ *            .withImportContainerKeyValue("{importContainerKey}")
+ *            .post(null)
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPost extends + TypeBodyApiMethod + implements + com.commercetools.importapi.client.Secured_by_manage_discount_codesTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String importContainerKey; + + private com.commercetools.importapi.models.importrequests.DiscountCodeImportRequest discountCodeImportRequest; + + public ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPost(final ApiHttpClient apiHttpClient, + String projectKey, String importContainerKey, + com.commercetools.importapi.models.importrequests.DiscountCodeImportRequest discountCodeImportRequest) { + super(apiHttpClient); + this.projectKey = projectKey; + this.importContainerKey = importContainerKey; + this.discountCodeImportRequest = discountCodeImportRequest; + } + + public ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPost( + ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPost t) { + super(t); + this.projectKey = t.projectKey; + this.importContainerKey = t.importContainerKey; + this.discountCodeImportRequest = t.discountCodeImportRequest; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/discount-codes/import-containers/%s", this.projectKey, + this.importContainerKey); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + io.vrap.rmf.base.client.utils.json.JsonUtils.executing( + () -> apiHttpClient().getSerializerService().toJsonByteArray(discountCodeImportRequest))); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.importapi.models.importrequests.ImportResponse.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.importapi.models.importrequests.ImportResponse.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getImportContainerKey() { + return this.importContainerKey; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setImportContainerKey(final String importContainerKey) { + this.importContainerKey = importContainerKey; + } + + public com.commercetools.importapi.models.importrequests.DiscountCodeImportRequest getBody() { + return discountCodeImportRequest; + } + + public ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPost withBody( + com.commercetools.importapi.models.importrequests.DiscountCodeImportRequest discountCodeImportRequest) { + ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPost t = copy(); + t.discountCodeImportRequest = discountCodeImportRequest; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPost that = (ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPost) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(importContainerKey, that.importContainerKey) + .append(discountCodeImportRequest, that.discountCodeImportRequest) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey) + .append(importContainerKey) + .append(discountCodeImportRequest) + .toHashCode(); + } + + @Override + protected ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPost copy() { + return new ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPost(this); + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPostString.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPostString.java new file mode 100644 index 00000000000..2458b0795ca --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPostString.java @@ -0,0 +1,148 @@ + +package com.commercetools.importapi.client; + +import java.net.URI; +import java.nio.charset.StandardCharsets; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +import com.fasterxml.jackson.core.type.TypeReference; + +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; + +/** + *

Creates a request for creating new Discount Codes or updating existing ones.

+ * + *
+ *
+ *
{@code
+ *   CompletableFuture> result = apiRoot
+ *            .withProjectKeyValue("{projectKey}")
+ *            .discountCodes()
+ *            .importContainers()
+ *            .withImportContainerKeyValue("{importContainerKey}")
+ *            .post("")
+ *            .execute()
+ * }
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPostString extends + StringBodyApiMethod + implements + com.commercetools.importapi.client.Secured_by_manage_discount_codesTrait { + + @Override + public TypeReference resultType() { + return new TypeReference() { + }; + } + + private String projectKey; + private String importContainerKey; + + private String discountCodeImportRequest; + + public ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPostString(final ApiHttpClient apiHttpClient, + String projectKey, String importContainerKey, String discountCodeImportRequest) { + super(apiHttpClient); + this.projectKey = projectKey; + this.importContainerKey = importContainerKey; + this.discountCodeImportRequest = discountCodeImportRequest; + } + + public ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPostString( + ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPostString t) { + super(t); + this.projectKey = t.projectKey; + this.importContainerKey = t.importContainerKey; + this.discountCodeImportRequest = t.discountCodeImportRequest; + } + + @Override + protected ApiHttpRequest buildHttpRequest() { + List params = new ArrayList<>(getQueryParamUriStrings()); + String httpRequestPath = String.format("%s/discount-codes/import-containers/%s", this.projectKey, + this.importContainerKey); + if (!params.isEmpty()) { + httpRequestPath += "?" + String.join("&", params); + } + return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), + discountCodeImportRequest.getBytes(StandardCharsets.UTF_8)); + + } + + @Override + public ApiHttpResponse executeBlocking( + final ApiHttpClient client, final Duration timeout) { + return executeBlocking(client, timeout, com.commercetools.importapi.models.importrequests.ImportResponse.class); + } + + @Override + public CompletableFuture> execute( + final ApiHttpClient client) { + return execute(client, com.commercetools.importapi.models.importrequests.ImportResponse.class); + } + + public String getProjectKey() { + return this.projectKey; + } + + public String getImportContainerKey() { + return this.importContainerKey; + } + + public void setProjectKey(final String projectKey) { + this.projectKey = projectKey; + } + + public void setImportContainerKey(final String importContainerKey) { + this.importContainerKey = importContainerKey; + } + + public String getBody() { + return discountCodeImportRequest; + } + + public ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPostString withBody( + String discountCodeImportRequest) { + ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPostString t = copy(); + t.discountCodeImportRequest = discountCodeImportRequest; + return t; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPostString that = (ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPostString) o; + + return new EqualsBuilder().append(projectKey, that.projectKey) + .append(importContainerKey, that.importContainerKey) + .append(discountCodeImportRequest, that.discountCodeImportRequest) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(projectKey) + .append(importContainerKey) + .append(discountCodeImportRequest) + .toHashCode(); + } + + @Override + protected ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPostString copy() { + return new ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPostString(this); + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyDiscountCodesImportContainersByImportContainerKeyRequestBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyDiscountCodesImportContainersByImportContainerKeyRequestBuilder.java new file mode 100644 index 00000000000..bf35eeddf98 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyDiscountCodesImportContainersByImportContainerKeyRequestBuilder.java @@ -0,0 +1,41 @@ + +package com.commercetools.importapi.client; + +import java.util.function.UnaryOperator; + +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 ByProjectKeyDiscountCodesImportContainersByImportContainerKeyRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + private final String importContainerKey; + + public ByProjectKeyDiscountCodesImportContainersByImportContainerKeyRequestBuilder( + final ApiHttpClient apiHttpClient, final String projectKey, final String importContainerKey) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + this.importContainerKey = importContainerKey; + } + + public ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPost post( + com.commercetools.importapi.models.importrequests.DiscountCodeImportRequest discountCodeImportRequest) { + return new ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPost(apiHttpClient, projectKey, + importContainerKey, discountCodeImportRequest); + } + + public ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPostString post( + final String discountCodeImportRequest) { + return new ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPostString(apiHttpClient, projectKey, + importContainerKey, discountCodeImportRequest); + } + + public ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPost post( + UnaryOperator op) { + return post( + op.apply(com.commercetools.importapi.models.importrequests.DiscountCodeImportRequestBuilder.of()).build()); + } + +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyDiscountCodesImportContainersRequestBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyDiscountCodesImportContainersRequestBuilder.java new file mode 100644 index 00000000000..96b1cef64cb --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyDiscountCodesImportContainersRequestBuilder.java @@ -0,0 +1,25 @@ + +package com.commercetools.importapi.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 ByProjectKeyDiscountCodesImportContainersRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + + public ByProjectKeyDiscountCodesImportContainersRequestBuilder(final ApiHttpClient apiHttpClient, + final String projectKey) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + } + + public ByProjectKeyDiscountCodesImportContainersByImportContainerKeyRequestBuilder withImportContainerKeyValue( + String importContainerKey) { + return new ByProjectKeyDiscountCodesImportContainersByImportContainerKeyRequestBuilder(apiHttpClient, + projectKey, importContainerKey); + } + +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyDiscountCodesRequestBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyDiscountCodesRequestBuilder.java new file mode 100644 index 00000000000..1faa49acceb --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyDiscountCodesRequestBuilder.java @@ -0,0 +1,22 @@ + +package com.commercetools.importapi.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 ByProjectKeyDiscountCodesRequestBuilder { + + private final ApiHttpClient apiHttpClient; + private final String projectKey; + + public ByProjectKeyDiscountCodesRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey) { + this.apiHttpClient = apiHttpClient; + this.projectKey = projectKey; + } + + public ByProjectKeyDiscountCodesImportContainersRequestBuilder importContainers() { + return new ByProjectKeyDiscountCodesImportContainersRequestBuilder(apiHttpClient, projectKey); + } + +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyRequestBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyRequestBuilder.java index 1efd7c1f03c..5822e8cd874 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyRequestBuilder.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/ByProjectKeyRequestBuilder.java @@ -75,4 +75,8 @@ public ByProjectKeyTypesRequestBuilder types() { return new ByProjectKeyTypesRequestBuilder(apiHttpClient, projectKey); } + public ByProjectKeyDiscountCodesRequestBuilder discountCodes() { + return new ByProjectKeyDiscountCodesRequestBuilder(apiHttpClient, projectKey); + } + } diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/Secured_by_manage_discount_codesTrait.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/Secured_by_manage_discount_codesTrait.java new file mode 100644 index 00000000000..7003e02d4a2 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/client/Secured_by_manage_discount_codesTrait.java @@ -0,0 +1,22 @@ + +package com.commercetools.importapi.client; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + * Secured_by_manage_discount_codesTrait + * @param type of extending interface + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface Secured_by_manage_discount_codesTrait> { + + default Secured_by_manage_discount_codesTrait asSecured_by_manage_discount_codesTrait() { + return this; + } + + @SuppressWarnings("unchecked") + default T asSecured_by_manage_discount_codesTraitToBaseType() { + return (T) this; + } + +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/ImportResource.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/ImportResource.java index c47b957a082..ef45efaa101 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/ImportResource.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/ImportResource.java @@ -82,6 +82,10 @@ public static ImportResource deepCopy(@Nullable final ImportResource template) { return com.commercetools.importapi.models.customers.CustomerImport .deepCopy((com.commercetools.importapi.models.customers.CustomerImport) template); } + if (template instanceof com.commercetools.importapi.models.discount_codes.DiscountCodeImport) { + return com.commercetools.importapi.models.discount_codes.DiscountCodeImport + .deepCopy((com.commercetools.importapi.models.discount_codes.DiscountCodeImport) template); + } if (template instanceof com.commercetools.importapi.models.inventories.InventoryImport) { return com.commercetools.importapi.models.inventories.InventoryImport .deepCopy((com.commercetools.importapi.models.inventories.InventoryImport) template); diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/ImportResourceType.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/ImportResourceType.java index 9b3fbfa95be..7259f3435d9 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/ImportResourceType.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/common/ImportResourceType.java @@ -55,6 +55,9 @@ public interface ImportResourceType extends JsonEnum { /**

The Type import resource type.

*/ ImportResourceType TYPE = ImportResourceTypeEnum.TYPE; + /** +

The Discount Code import resource type.

*/ + ImportResourceType DISCOUNT_CODE = ImportResourceTypeEnum.DISCOUNT_CODE; /** * possible values of ImportResourceType @@ -123,7 +126,12 @@ enum ImportResourceTypeEnum implements ImportResourceType { /** * type */ - TYPE("type"); + TYPE("type"), + + /** + * discount-code + */ + DISCOUNT_CODE("discount-code"); private final String jsonName; private ImportResourceTypeEnum(final String jsonName) { diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/discount_codes/DiscountCodeImport.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/discount_codes/DiscountCodeImport.java new file mode 100644 index 00000000000..6af8e48aeec --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/discount_codes/DiscountCodeImport.java @@ -0,0 +1,357 @@ + +package com.commercetools.importapi.models.discount_codes; + +import java.time.*; +import java.time.ZonedDateTime; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.importapi.models.common.CartDiscountKeyReference; +import com.commercetools.importapi.models.common.ImportResource; +import com.commercetools.importapi.models.common.LocalizedString; +import com.commercetools.importapi.models.customfields.Custom; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

The data representation for a Discount Code to be imported that is persisted as a Discount Code in the Project.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     DiscountCodeImport discountCodeImport = DiscountCodeImport.builder()
+ *             .key("{key}")
+ *             .code("{code}")
+ *             .plusCartDiscounts(cartDiscountsBuilder -> cartDiscountsBuilder)
+ *             .isActive(true)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = DiscountCodeImportImpl.class) +public interface DiscountCodeImport extends ImportResource { + + /** + *

User-defined unique identifier. If a Discount Code with this key exists, it will be updated with the imported data.

+ * @return key + */ + @NotNull + @JsonProperty("key") + public String getKey(); + + /** + *

Maps to DiscountCode.name.

+ * @return name + */ + @Valid + @JsonProperty("name") + public LocalizedString getName(); + + /** + *

Maps to DiscountCode.description.

+ * @return description + */ + @Valid + @JsonProperty("description") + public LocalizedString getDescription(); + + /** + *

User-defined unique identifier of the DiscountCode that is used by the customer to apply the discount.

+ * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

Reference to CartDiscounts that can be applied to the Cart once the DiscountCode is applied.

+ * @return cartDiscounts + */ + @NotNull + @Valid + @JsonProperty("cartDiscounts") + public List getCartDiscounts(); + + /** + *

DiscountCode can only be applied to Carts that match this predicate.

+ * @return cartPredicate + */ + + @JsonProperty("cartPredicate") + public String getCartPredicate(); + + /** + *

Indicates if the DiscountCode is active and can be applied to the Cart.

+ * @return isActive + */ + @NotNull + @JsonProperty("isActive") + public Boolean getIsActive(); + + /** + *

Number of times the DiscountCode can be applied. DiscountCode application is counted at the time of Order creation or update. However, Order cancellation or deletion does not decrement the count.

+ * @return maxApplications + */ + + @JsonProperty("maxApplications") + public Long getMaxApplications(); + + /** + *

Number of times the DiscountCode can be applied per Customer (anonymous Carts are not supported). DiscountCode application is counted at the time of Order creation or update. However, Order cancellation or deletion does not decrement the count.

+ * @return maxApplicationsPerCustomer + */ + + @JsonProperty("maxApplicationsPerCustomer") + public Long getMaxApplicationsPerCustomer(); + + /** + *

Groups to which the DiscountCode belongs.

+ * @return groups + */ + + @JsonProperty("groups") + public List getGroups(); + + /** + *

Date and time (UTC) from which the DiscountCode is effective.

+ * @return validFrom + */ + + @JsonProperty("validFrom") + public ZonedDateTime getValidFrom(); + + /** + *

Date and time (UTC) until which the DiscountCode is effective.

+ * @return validUntil + */ + + @JsonProperty("validUntil") + public ZonedDateTime getValidUntil(); + + /** + *

Custom Fields of the DiscountCode.

+ * @return custom + */ + @Valid + @JsonProperty("custom") + public Custom getCustom(); + + /** + *

User-defined unique identifier. If a Discount Code with this key exists, it will be updated with the imported data.

+ * @param key value to be set + */ + + public void setKey(final String key); + + /** + *

Maps to DiscountCode.name.

+ * @param name value to be set + */ + + public void setName(final LocalizedString name); + + /** + *

Maps to DiscountCode.description.

+ * @param description value to be set + */ + + public void setDescription(final LocalizedString description); + + /** + *

User-defined unique identifier of the DiscountCode that is used by the customer to apply the discount.

+ * @param code value to be set + */ + + public void setCode(final String code); + + /** + *

Reference to CartDiscounts that can be applied to the Cart once the DiscountCode is applied.

+ * @param cartDiscounts values to be set + */ + + @JsonIgnore + public void setCartDiscounts(final CartDiscountKeyReference... cartDiscounts); + + /** + *

Reference to CartDiscounts that can be applied to the Cart once the DiscountCode is applied.

+ * @param cartDiscounts values to be set + */ + + public void setCartDiscounts(final List cartDiscounts); + + /** + *

DiscountCode can only be applied to Carts that match this predicate.

+ * @param cartPredicate value to be set + */ + + public void setCartPredicate(final String cartPredicate); + + /** + *

Indicates if the DiscountCode is active and can be applied to the Cart.

+ * @param isActive value to be set + */ + + public void setIsActive(final Boolean isActive); + + /** + *

Number of times the DiscountCode can be applied. DiscountCode application is counted at the time of Order creation or update. However, Order cancellation or deletion does not decrement the count.

+ * @param maxApplications value to be set + */ + + public void setMaxApplications(final Long maxApplications); + + /** + *

Number of times the DiscountCode can be applied per Customer (anonymous Carts are not supported). DiscountCode application is counted at the time of Order creation or update. However, Order cancellation or deletion does not decrement the count.

+ * @param maxApplicationsPerCustomer value to be set + */ + + public void setMaxApplicationsPerCustomer(final Long maxApplicationsPerCustomer); + + /** + *

Groups to which the DiscountCode belongs.

+ * @param groups values to be set + */ + + @JsonIgnore + public void setGroups(final String... groups); + + /** + *

Groups to which the DiscountCode belongs.

+ * @param groups values to be set + */ + + public void setGroups(final List groups); + + /** + *

Date and time (UTC) from which the DiscountCode is effective.

+ * @param validFrom value to be set + */ + + public void setValidFrom(final ZonedDateTime validFrom); + + /** + *

Date and time (UTC) until which the DiscountCode is effective.

+ * @param validUntil value to be set + */ + + public void setValidUntil(final ZonedDateTime validUntil); + + /** + *

Custom Fields of the DiscountCode.

+ * @param custom value to be set + */ + + public void setCustom(final Custom custom); + + /** + * factory method + * @return instance of DiscountCodeImport + */ + public static DiscountCodeImport of() { + return new DiscountCodeImportImpl(); + } + + /** + * factory method to create a shallow copy DiscountCodeImport + * @param template instance to be copied + * @return copy instance + */ + public static DiscountCodeImport of(final DiscountCodeImport template) { + DiscountCodeImportImpl instance = new DiscountCodeImportImpl(); + instance.setKey(template.getKey()); + instance.setName(template.getName()); + instance.setDescription(template.getDescription()); + instance.setCode(template.getCode()); + instance.setCartDiscounts(template.getCartDiscounts()); + instance.setCartPredicate(template.getCartPredicate()); + instance.setIsActive(template.getIsActive()); + instance.setMaxApplications(template.getMaxApplications()); + instance.setMaxApplicationsPerCustomer(template.getMaxApplicationsPerCustomer()); + instance.setGroups(template.getGroups()); + instance.setValidFrom(template.getValidFrom()); + instance.setValidUntil(template.getValidUntil()); + instance.setCustom(template.getCustom()); + return instance; + } + + /** + * factory method to create a deep copy of DiscountCodeImport + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static DiscountCodeImport deepCopy(@Nullable final DiscountCodeImport template) { + if (template == null) { + return null; + } + DiscountCodeImportImpl instance = new DiscountCodeImportImpl(); + instance.setKey(template.getKey()); + instance.setName(com.commercetools.importapi.models.common.LocalizedString.deepCopy(template.getName())); + instance.setDescription( + com.commercetools.importapi.models.common.LocalizedString.deepCopy(template.getDescription())); + instance.setCode(template.getCode()); + instance.setCartDiscounts(Optional.ofNullable(template.getCartDiscounts()) + .map(t -> t.stream() + .map(com.commercetools.importapi.models.common.CartDiscountKeyReference::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setCartPredicate(template.getCartPredicate()); + instance.setIsActive(template.getIsActive()); + instance.setMaxApplications(template.getMaxApplications()); + instance.setMaxApplicationsPerCustomer(template.getMaxApplicationsPerCustomer()); + instance.setGroups(Optional.ofNullable(template.getGroups()).map(ArrayList::new).orElse(null)); + instance.setValidFrom(template.getValidFrom()); + instance.setValidUntil(template.getValidUntil()); + instance.setCustom(com.commercetools.importapi.models.customfields.Custom.deepCopy(template.getCustom())); + return instance; + } + + /** + * builder factory method for DiscountCodeImport + * @return builder + */ + public static DiscountCodeImportBuilder builder() { + return DiscountCodeImportBuilder.of(); + } + + /** + * create builder for DiscountCodeImport instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DiscountCodeImportBuilder builder(final DiscountCodeImport template) { + return DiscountCodeImportBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withDiscountCodeImport(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/discount_codes/DiscountCodeImportBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/discount_codes/DiscountCodeImportBuilder.java new file mode 100644 index 00000000000..0d07d54a483 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/discount_codes/DiscountCodeImportBuilder.java @@ -0,0 +1,569 @@ + +package com.commercetools.importapi.models.discount_codes; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * DiscountCodeImportBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     DiscountCodeImport discountCodeImport = DiscountCodeImport.builder()
+ *             .key("{key}")
+ *             .code("{code}")
+ *             .plusCartDiscounts(cartDiscountsBuilder -> cartDiscountsBuilder)
+ *             .isActive(true)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DiscountCodeImportBuilder implements Builder { + + private String key; + + @Nullable + private com.commercetools.importapi.models.common.LocalizedString name; + + @Nullable + private com.commercetools.importapi.models.common.LocalizedString description; + + private String code; + + private java.util.List cartDiscounts; + + @Nullable + private String cartPredicate; + + private Boolean isActive; + + @Nullable + private Long maxApplications; + + @Nullable + private Long maxApplicationsPerCustomer; + + @Nullable + private java.util.List groups; + + @Nullable + private java.time.ZonedDateTime validFrom; + + @Nullable + private java.time.ZonedDateTime validUntil; + + @Nullable + private com.commercetools.importapi.models.customfields.Custom custom; + + /** + *

User-defined unique identifier. If a Discount Code with this key exists, it will be updated with the imported data.

+ * @param key value to be set + * @return Builder + */ + + public DiscountCodeImportBuilder key(final String key) { + this.key = key; + return this; + } + + /** + *

Maps to DiscountCode.name.

+ * @param builder function to build the name value + * @return Builder + */ + + public DiscountCodeImportBuilder name( + Function builder) { + this.name = builder.apply(com.commercetools.importapi.models.common.LocalizedStringBuilder.of()).build(); + return this; + } + + /** + *

Maps to DiscountCode.name.

+ * @param builder function to build the name value + * @return Builder + */ + + public DiscountCodeImportBuilder withName( + Function builder) { + this.name = builder.apply(com.commercetools.importapi.models.common.LocalizedStringBuilder.of()); + return this; + } + + /** + *

Maps to DiscountCode.name.

+ * @param name value to be set + * @return Builder + */ + + public DiscountCodeImportBuilder name( + @Nullable final com.commercetools.importapi.models.common.LocalizedString name) { + this.name = name; + return this; + } + + /** + *

Maps to DiscountCode.description.

+ * @param builder function to build the description value + * @return Builder + */ + + public DiscountCodeImportBuilder description( + Function builder) { + this.description = builder.apply(com.commercetools.importapi.models.common.LocalizedStringBuilder.of()).build(); + return this; + } + + /** + *

Maps to DiscountCode.description.

+ * @param builder function to build the description value + * @return Builder + */ + + public DiscountCodeImportBuilder withDescription( + Function builder) { + this.description = builder.apply(com.commercetools.importapi.models.common.LocalizedStringBuilder.of()); + return this; + } + + /** + *

Maps to DiscountCode.description.

+ * @param description value to be set + * @return Builder + */ + + public DiscountCodeImportBuilder description( + @Nullable final com.commercetools.importapi.models.common.LocalizedString description) { + this.description = description; + return this; + } + + /** + *

User-defined unique identifier of the DiscountCode that is used by the customer to apply the discount.

+ * @param code value to be set + * @return Builder + */ + + public DiscountCodeImportBuilder code(final String code) { + this.code = code; + return this; + } + + /** + *

Reference to CartDiscounts that can be applied to the Cart once the DiscountCode is applied.

+ * @param cartDiscounts value to be set + * @return Builder + */ + + public DiscountCodeImportBuilder cartDiscounts( + final com.commercetools.importapi.models.common.CartDiscountKeyReference... cartDiscounts) { + this.cartDiscounts = new ArrayList<>(Arrays.asList(cartDiscounts)); + return this; + } + + /** + *

Reference to CartDiscounts that can be applied to the Cart once the DiscountCode is applied.

+ * @param cartDiscounts value to be set + * @return Builder + */ + + public DiscountCodeImportBuilder cartDiscounts( + final java.util.List cartDiscounts) { + this.cartDiscounts = cartDiscounts; + return this; + } + + /** + *

Reference to CartDiscounts that can be applied to the Cart once the DiscountCode is applied.

+ * @param cartDiscounts value to be set + * @return Builder + */ + + public DiscountCodeImportBuilder plusCartDiscounts( + final com.commercetools.importapi.models.common.CartDiscountKeyReference... cartDiscounts) { + if (this.cartDiscounts == null) { + this.cartDiscounts = new ArrayList<>(); + } + this.cartDiscounts.addAll(Arrays.asList(cartDiscounts)); + return this; + } + + /** + *

Reference to CartDiscounts that can be applied to the Cart once the DiscountCode is applied.

+ * @param builder function to build the cartDiscounts value + * @return Builder + */ + + public DiscountCodeImportBuilder plusCartDiscounts( + Function builder) { + if (this.cartDiscounts == null) { + this.cartDiscounts = new ArrayList<>(); + } + this.cartDiscounts.add( + builder.apply(com.commercetools.importapi.models.common.CartDiscountKeyReferenceBuilder.of()).build()); + return this; + } + + /** + *

Reference to CartDiscounts that can be applied to the Cart once the DiscountCode is applied.

+ * @param builder function to build the cartDiscounts value + * @return Builder + */ + + public DiscountCodeImportBuilder withCartDiscounts( + Function builder) { + this.cartDiscounts = new ArrayList<>(); + this.cartDiscounts.add( + builder.apply(com.commercetools.importapi.models.common.CartDiscountKeyReferenceBuilder.of()).build()); + return this; + } + + /** + *

Reference to CartDiscounts that can be applied to the Cart once the DiscountCode is applied.

+ * @param builder function to build the cartDiscounts value + * @return Builder + */ + + public DiscountCodeImportBuilder addCartDiscounts( + Function builder) { + return plusCartDiscounts( + builder.apply(com.commercetools.importapi.models.common.CartDiscountKeyReferenceBuilder.of())); + } + + /** + *

Reference to CartDiscounts that can be applied to the Cart once the DiscountCode is applied.

+ * @param builder function to build the cartDiscounts value + * @return Builder + */ + + public DiscountCodeImportBuilder setCartDiscounts( + Function builder) { + return cartDiscounts( + builder.apply(com.commercetools.importapi.models.common.CartDiscountKeyReferenceBuilder.of())); + } + + /** + *

DiscountCode can only be applied to Carts that match this predicate.

+ * @param cartPredicate value to be set + * @return Builder + */ + + public DiscountCodeImportBuilder cartPredicate(@Nullable final String cartPredicate) { + this.cartPredicate = cartPredicate; + return this; + } + + /** + *

Indicates if the DiscountCode is active and can be applied to the Cart.

+ * @param isActive value to be set + * @return Builder + */ + + public DiscountCodeImportBuilder isActive(final Boolean isActive) { + this.isActive = isActive; + return this; + } + + /** + *

Number of times the DiscountCode can be applied. DiscountCode application is counted at the time of Order creation or update. However, Order cancellation or deletion does not decrement the count.

+ * @param maxApplications value to be set + * @return Builder + */ + + public DiscountCodeImportBuilder maxApplications(@Nullable final Long maxApplications) { + this.maxApplications = maxApplications; + return this; + } + + /** + *

Number of times the DiscountCode can be applied per Customer (anonymous Carts are not supported). DiscountCode application is counted at the time of Order creation or update. However, Order cancellation or deletion does not decrement the count.

+ * @param maxApplicationsPerCustomer value to be set + * @return Builder + */ + + public DiscountCodeImportBuilder maxApplicationsPerCustomer(@Nullable final Long maxApplicationsPerCustomer) { + this.maxApplicationsPerCustomer = maxApplicationsPerCustomer; + return this; + } + + /** + *

Groups to which the DiscountCode belongs.

+ * @param groups value to be set + * @return Builder + */ + + public DiscountCodeImportBuilder groups(@Nullable final String... groups) { + this.groups = new ArrayList<>(Arrays.asList(groups)); + return this; + } + + /** + *

Groups to which the DiscountCode belongs.

+ * @param groups value to be set + * @return Builder + */ + + public DiscountCodeImportBuilder groups(@Nullable final java.util.List groups) { + this.groups = groups; + return this; + } + + /** + *

Groups to which the DiscountCode belongs.

+ * @param groups value to be set + * @return Builder + */ + + public DiscountCodeImportBuilder plusGroups(@Nullable final String... groups) { + if (this.groups == null) { + this.groups = new ArrayList<>(); + } + this.groups.addAll(Arrays.asList(groups)); + return this; + } + + /** + *

Date and time (UTC) from which the DiscountCode is effective.

+ * @param validFrom value to be set + * @return Builder + */ + + public DiscountCodeImportBuilder validFrom(@Nullable final java.time.ZonedDateTime validFrom) { + this.validFrom = validFrom; + return this; + } + + /** + *

Date and time (UTC) until which the DiscountCode is effective.

+ * @param validUntil value to be set + * @return Builder + */ + + public DiscountCodeImportBuilder validUntil(@Nullable final java.time.ZonedDateTime validUntil) { + this.validUntil = validUntil; + return this; + } + + /** + *

Custom Fields of the DiscountCode.

+ * @param builder function to build the custom value + * @return Builder + */ + + public DiscountCodeImportBuilder custom( + Function builder) { + this.custom = builder.apply(com.commercetools.importapi.models.customfields.CustomBuilder.of()).build(); + return this; + } + + /** + *

Custom Fields of the DiscountCode.

+ * @param builder function to build the custom value + * @return Builder + */ + + public DiscountCodeImportBuilder withCustom( + Function builder) { + this.custom = builder.apply(com.commercetools.importapi.models.customfields.CustomBuilder.of()); + return this; + } + + /** + *

Custom Fields of the DiscountCode.

+ * @param custom value to be set + * @return Builder + */ + + public DiscountCodeImportBuilder custom( + @Nullable final com.commercetools.importapi.models.customfields.Custom custom) { + this.custom = custom; + return this; + } + + /** + *

User-defined unique identifier. If a Discount Code with this key exists, it will be updated with the imported data.

+ * @return key + */ + + public String getKey() { + return this.key; + } + + /** + *

Maps to DiscountCode.name.

+ * @return name + */ + + @Nullable + public com.commercetools.importapi.models.common.LocalizedString getName() { + return this.name; + } + + /** + *

Maps to DiscountCode.description.

+ * @return description + */ + + @Nullable + public com.commercetools.importapi.models.common.LocalizedString getDescription() { + return this.description; + } + + /** + *

User-defined unique identifier of the DiscountCode that is used by the customer to apply the discount.

+ * @return code + */ + + public String getCode() { + return this.code; + } + + /** + *

Reference to CartDiscounts that can be applied to the Cart once the DiscountCode is applied.

+ * @return cartDiscounts + */ + + public java.util.List getCartDiscounts() { + return this.cartDiscounts; + } + + /** + *

DiscountCode can only be applied to Carts that match this predicate.

+ * @return cartPredicate + */ + + @Nullable + public String getCartPredicate() { + return this.cartPredicate; + } + + /** + *

Indicates if the DiscountCode is active and can be applied to the Cart.

+ * @return isActive + */ + + public Boolean getIsActive() { + return this.isActive; + } + + /** + *

Number of times the DiscountCode can be applied. DiscountCode application is counted at the time of Order creation or update. However, Order cancellation or deletion does not decrement the count.

+ * @return maxApplications + */ + + @Nullable + public Long getMaxApplications() { + return this.maxApplications; + } + + /** + *

Number of times the DiscountCode can be applied per Customer (anonymous Carts are not supported). DiscountCode application is counted at the time of Order creation or update. However, Order cancellation or deletion does not decrement the count.

+ * @return maxApplicationsPerCustomer + */ + + @Nullable + public Long getMaxApplicationsPerCustomer() { + return this.maxApplicationsPerCustomer; + } + + /** + *

Groups to which the DiscountCode belongs.

+ * @return groups + */ + + @Nullable + public java.util.List getGroups() { + return this.groups; + } + + /** + *

Date and time (UTC) from which the DiscountCode is effective.

+ * @return validFrom + */ + + @Nullable + public java.time.ZonedDateTime getValidFrom() { + return this.validFrom; + } + + /** + *

Date and time (UTC) until which the DiscountCode is effective.

+ * @return validUntil + */ + + @Nullable + public java.time.ZonedDateTime getValidUntil() { + return this.validUntil; + } + + /** + *

Custom Fields of the DiscountCode.

+ * @return custom + */ + + @Nullable + public com.commercetools.importapi.models.customfields.Custom getCustom() { + return this.custom; + } + + /** + * builds DiscountCodeImport with checking for non-null required values + * @return DiscountCodeImport + */ + public DiscountCodeImport build() { + Objects.requireNonNull(key, DiscountCodeImport.class + ": key is missing"); + Objects.requireNonNull(code, DiscountCodeImport.class + ": code is missing"); + Objects.requireNonNull(cartDiscounts, DiscountCodeImport.class + ": cartDiscounts is missing"); + Objects.requireNonNull(isActive, DiscountCodeImport.class + ": isActive is missing"); + return new DiscountCodeImportImpl(key, name, description, code, cartDiscounts, cartPredicate, isActive, + maxApplications, maxApplicationsPerCustomer, groups, validFrom, validUntil, custom); + } + + /** + * builds DiscountCodeImport without checking for non-null required values + * @return DiscountCodeImport + */ + public DiscountCodeImport buildUnchecked() { + return new DiscountCodeImportImpl(key, name, description, code, cartDiscounts, cartPredicate, isActive, + maxApplications, maxApplicationsPerCustomer, groups, validFrom, validUntil, custom); + } + + /** + * factory method for an instance of DiscountCodeImportBuilder + * @return builder + */ + public static DiscountCodeImportBuilder of() { + return new DiscountCodeImportBuilder(); + } + + /** + * create builder for DiscountCodeImport instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DiscountCodeImportBuilder of(final DiscountCodeImport template) { + DiscountCodeImportBuilder builder = new DiscountCodeImportBuilder(); + builder.key = template.getKey(); + builder.name = template.getName(); + builder.description = template.getDescription(); + builder.code = template.getCode(); + builder.cartDiscounts = template.getCartDiscounts(); + builder.cartPredicate = template.getCartPredicate(); + builder.isActive = template.getIsActive(); + builder.maxApplications = template.getMaxApplications(); + builder.maxApplicationsPerCustomer = template.getMaxApplicationsPerCustomer(); + builder.groups = template.getGroups(); + builder.validFrom = template.getValidFrom(); + builder.validUntil = template.getValidUntil(); + builder.custom = template.getCustom(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/discount_codes/DiscountCodeImportImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/discount_codes/DiscountCodeImportImpl.java new file mode 100644 index 00000000000..79c387cddff --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/discount_codes/DiscountCodeImportImpl.java @@ -0,0 +1,329 @@ + +package com.commercetools.importapi.models.discount_codes; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

The data representation for a Discount Code to be imported that is persisted as a Discount Code in the Project.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DiscountCodeImportImpl implements DiscountCodeImport, ModelBase { + + private String key; + + private com.commercetools.importapi.models.common.LocalizedString name; + + private com.commercetools.importapi.models.common.LocalizedString description; + + private String code; + + private java.util.List cartDiscounts; + + private String cartPredicate; + + private Boolean isActive; + + private Long maxApplications; + + private Long maxApplicationsPerCustomer; + + private java.util.List groups; + + private java.time.ZonedDateTime validFrom; + + private java.time.ZonedDateTime validUntil; + + private com.commercetools.importapi.models.customfields.Custom custom; + + /** + * create instance with all properties + */ + @JsonCreator + DiscountCodeImportImpl(@JsonProperty("key") final String key, + @JsonProperty("name") final com.commercetools.importapi.models.common.LocalizedString name, + @JsonProperty("description") final com.commercetools.importapi.models.common.LocalizedString description, + @JsonProperty("code") final String code, + @JsonProperty("cartDiscounts") final java.util.List cartDiscounts, + @JsonProperty("cartPredicate") final String cartPredicate, @JsonProperty("isActive") final Boolean isActive, + @JsonProperty("maxApplications") final Long maxApplications, + @JsonProperty("maxApplicationsPerCustomer") final Long maxApplicationsPerCustomer, + @JsonProperty("groups") final java.util.List groups, + @JsonProperty("validFrom") final java.time.ZonedDateTime validFrom, + @JsonProperty("validUntil") final java.time.ZonedDateTime validUntil, + @JsonProperty("custom") final com.commercetools.importapi.models.customfields.Custom custom) { + this.key = key; + this.name = name; + this.description = description; + this.code = code; + this.cartDiscounts = cartDiscounts; + this.cartPredicate = cartPredicate; + this.isActive = isActive; + this.maxApplications = maxApplications; + this.maxApplicationsPerCustomer = maxApplicationsPerCustomer; + this.groups = groups; + this.validFrom = validFrom; + this.validUntil = validUntil; + this.custom = custom; + } + + /** + * create empty instance + */ + public DiscountCodeImportImpl() { + } + + /** + *

User-defined unique identifier. If a Discount Code with this key exists, it will be updated with the imported data.

+ */ + + public String getKey() { + return this.key; + } + + /** + *

Maps to DiscountCode.name.

+ */ + + public com.commercetools.importapi.models.common.LocalizedString getName() { + return this.name; + } + + /** + *

Maps to DiscountCode.description.

+ */ + + public com.commercetools.importapi.models.common.LocalizedString getDescription() { + return this.description; + } + + /** + *

User-defined unique identifier of the DiscountCode that is used by the customer to apply the discount.

+ */ + + public String getCode() { + return this.code; + } + + /** + *

Reference to CartDiscounts that can be applied to the Cart once the DiscountCode is applied.

+ */ + + public java.util.List getCartDiscounts() { + return this.cartDiscounts; + } + + /** + *

DiscountCode can only be applied to Carts that match this predicate.

+ */ + + public String getCartPredicate() { + return this.cartPredicate; + } + + /** + *

Indicates if the DiscountCode is active and can be applied to the Cart.

+ */ + + public Boolean getIsActive() { + return this.isActive; + } + + /** + *

Number of times the DiscountCode can be applied. DiscountCode application is counted at the time of Order creation or update. However, Order cancellation or deletion does not decrement the count.

+ */ + + public Long getMaxApplications() { + return this.maxApplications; + } + + /** + *

Number of times the DiscountCode can be applied per Customer (anonymous Carts are not supported). DiscountCode application is counted at the time of Order creation or update. However, Order cancellation or deletion does not decrement the count.

+ */ + + public Long getMaxApplicationsPerCustomer() { + return this.maxApplicationsPerCustomer; + } + + /** + *

Groups to which the DiscountCode belongs.

+ */ + + public java.util.List getGroups() { + return this.groups; + } + + /** + *

Date and time (UTC) from which the DiscountCode is effective.

+ */ + + public java.time.ZonedDateTime getValidFrom() { + return this.validFrom; + } + + /** + *

Date and time (UTC) until which the DiscountCode is effective.

+ */ + + public java.time.ZonedDateTime getValidUntil() { + return this.validUntil; + } + + /** + *

Custom Fields of the DiscountCode.

+ */ + + public com.commercetools.importapi.models.customfields.Custom getCustom() { + return this.custom; + } + + public void setKey(final String key) { + this.key = key; + } + + public void setName(final com.commercetools.importapi.models.common.LocalizedString name) { + this.name = name; + } + + public void setDescription(final com.commercetools.importapi.models.common.LocalizedString description) { + this.description = description; + } + + public void setCode(final String code) { + this.code = code; + } + + public void setCartDiscounts( + final com.commercetools.importapi.models.common.CartDiscountKeyReference... cartDiscounts) { + this.cartDiscounts = new ArrayList<>(Arrays.asList(cartDiscounts)); + } + + public void setCartDiscounts( + final java.util.List cartDiscounts) { + this.cartDiscounts = cartDiscounts; + } + + public void setCartPredicate(final String cartPredicate) { + this.cartPredicate = cartPredicate; + } + + public void setIsActive(final Boolean isActive) { + this.isActive = isActive; + } + + public void setMaxApplications(final Long maxApplications) { + this.maxApplications = maxApplications; + } + + public void setMaxApplicationsPerCustomer(final Long maxApplicationsPerCustomer) { + this.maxApplicationsPerCustomer = maxApplicationsPerCustomer; + } + + public void setGroups(final String... groups) { + this.groups = new ArrayList<>(Arrays.asList(groups)); + } + + public void setGroups(final java.util.List groups) { + this.groups = groups; + } + + public void setValidFrom(final java.time.ZonedDateTime validFrom) { + this.validFrom = validFrom; + } + + public void setValidUntil(final java.time.ZonedDateTime validUntil) { + this.validUntil = validUntil; + } + + public void setCustom(final com.commercetools.importapi.models.customfields.Custom custom) { + this.custom = custom; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + DiscountCodeImportImpl that = (DiscountCodeImportImpl) o; + + return new EqualsBuilder().append(key, that.key) + .append(name, that.name) + .append(description, that.description) + .append(code, that.code) + .append(cartDiscounts, that.cartDiscounts) + .append(cartPredicate, that.cartPredicate) + .append(isActive, that.isActive) + .append(maxApplications, that.maxApplications) + .append(maxApplicationsPerCustomer, that.maxApplicationsPerCustomer) + .append(groups, that.groups) + .append(validFrom, that.validFrom) + .append(validUntil, that.validUntil) + .append(custom, that.custom) + .append(key, that.key) + .append(name, that.name) + .append(description, that.description) + .append(code, that.code) + .append(cartDiscounts, that.cartDiscounts) + .append(cartPredicate, that.cartPredicate) + .append(isActive, that.isActive) + .append(maxApplications, that.maxApplications) + .append(maxApplicationsPerCustomer, that.maxApplicationsPerCustomer) + .append(groups, that.groups) + .append(validFrom, that.validFrom) + .append(validUntil, that.validUntil) + .append(custom, that.custom) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(key) + .append(name) + .append(description) + .append(code) + .append(cartDiscounts) + .append(cartPredicate) + .append(isActive) + .append(maxApplications) + .append(maxApplicationsPerCustomer) + .append(groups) + .append(validFrom) + .append(validUntil) + .append(custom) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("key", key) + .append("name", name) + .append("description", description) + .append("code", code) + .append("cartDiscounts", cartDiscounts) + .append("cartPredicate", cartPredicate) + .append("isActive", isActive) + .append("maxApplications", maxApplications) + .append("maxApplicationsPerCustomer", maxApplicationsPerCustomer) + .append("groups", groups) + .append("validFrom", validFrom) + .append("validUntil", validUntil) + .append("custom", custom) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/DiscountCodeImportRequest.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/DiscountCodeImportRequest.java new file mode 100644 index 00000000000..b5088fdf0d3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/DiscountCodeImportRequest.java @@ -0,0 +1,142 @@ + +package com.commercetools.importapi.models.importrequests; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.importapi.models.discount_codes.DiscountCodeImport; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *

The request body to import Discount Codes. Contains data for Discount Codes to be created or updated in a Project.

+ * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     DiscountCodeImportRequest discountCodeImportRequest = DiscountCodeImportRequest.builder()
+ *             .plusResources(resourcesBuilder -> resourcesBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = DiscountCodeImportRequestImpl.class) +public interface DiscountCodeImportRequest extends ImportRequest { + + /** + * discriminator value for DiscountCodeImportRequest + */ + String DISCOUNT_CODE = "discount-code"; + + /** + *

The Discount Code import resources of this request.

+ * @return resources + */ + @NotNull + @Valid + @JsonProperty("resources") + public List getResources(); + + /** + *

The Discount Code import resources of this request.

+ * @param resources values to be set + */ + + @JsonIgnore + public void setResources(final DiscountCodeImport... resources); + + /** + *

The Discount Code import resources of this request.

+ * @param resources values to be set + */ + + public void setResources(final List resources); + + /** + * factory method + * @return instance of DiscountCodeImportRequest + */ + public static DiscountCodeImportRequest of() { + return new DiscountCodeImportRequestImpl(); + } + + /** + * factory method to create a shallow copy DiscountCodeImportRequest + * @param template instance to be copied + * @return copy instance + */ + public static DiscountCodeImportRequest of(final DiscountCodeImportRequest template) { + DiscountCodeImportRequestImpl instance = new DiscountCodeImportRequestImpl(); + instance.setResources(template.getResources()); + return instance; + } + + /** + * factory method to create a deep copy of DiscountCodeImportRequest + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static DiscountCodeImportRequest deepCopy(@Nullable final DiscountCodeImportRequest template) { + if (template == null) { + return null; + } + DiscountCodeImportRequestImpl instance = new DiscountCodeImportRequestImpl(); + instance.setResources(Optional.ofNullable(template.getResources()) + .map(t -> t.stream() + .map(com.commercetools.importapi.models.discount_codes.DiscountCodeImport::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + return instance; + } + + /** + * builder factory method for DiscountCodeImportRequest + * @return builder + */ + public static DiscountCodeImportRequestBuilder builder() { + return DiscountCodeImportRequestBuilder.of(); + } + + /** + * create builder for DiscountCodeImportRequest instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DiscountCodeImportRequestBuilder builder(final DiscountCodeImportRequest template) { + return DiscountCodeImportRequestBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withDiscountCodeImportRequest(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/DiscountCodeImportRequestBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/DiscountCodeImportRequestBuilder.java new file mode 100644 index 00000000000..53e518dfb9b --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/DiscountCodeImportRequestBuilder.java @@ -0,0 +1,165 @@ + +package com.commercetools.importapi.models.importrequests; + +import java.util.*; +import java.util.function.Function; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * DiscountCodeImportRequestBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     DiscountCodeImportRequest discountCodeImportRequest = DiscountCodeImportRequest.builder()
+ *             .plusResources(resourcesBuilder -> resourcesBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DiscountCodeImportRequestBuilder implements Builder { + + private java.util.List resources; + + /** + *

The Discount Code import resources of this request.

+ * @param resources value to be set + * @return Builder + */ + + public DiscountCodeImportRequestBuilder resources( + final com.commercetools.importapi.models.discount_codes.DiscountCodeImport... resources) { + this.resources = new ArrayList<>(Arrays.asList(resources)); + return this; + } + + /** + *

The Discount Code import resources of this request.

+ * @param resources value to be set + * @return Builder + */ + + public DiscountCodeImportRequestBuilder resources( + final java.util.List resources) { + this.resources = resources; + return this; + } + + /** + *

The Discount Code import resources of this request.

+ * @param resources value to be set + * @return Builder + */ + + public DiscountCodeImportRequestBuilder plusResources( + final com.commercetools.importapi.models.discount_codes.DiscountCodeImport... resources) { + if (this.resources == null) { + this.resources = new ArrayList<>(); + } + this.resources.addAll(Arrays.asList(resources)); + return this; + } + + /** + *

The Discount Code import resources of this request.

+ * @param builder function to build the resources value + * @return Builder + */ + + public DiscountCodeImportRequestBuilder plusResources( + Function builder) { + if (this.resources == null) { + this.resources = new ArrayList<>(); + } + this.resources.add( + builder.apply(com.commercetools.importapi.models.discount_codes.DiscountCodeImportBuilder.of()).build()); + return this; + } + + /** + *

The Discount Code import resources of this request.

+ * @param builder function to build the resources value + * @return Builder + */ + + public DiscountCodeImportRequestBuilder withResources( + Function builder) { + this.resources = new ArrayList<>(); + this.resources.add( + builder.apply(com.commercetools.importapi.models.discount_codes.DiscountCodeImportBuilder.of()).build()); + return this; + } + + /** + *

The Discount Code import resources of this request.

+ * @param builder function to build the resources value + * @return Builder + */ + + public DiscountCodeImportRequestBuilder addResources( + Function builder) { + return plusResources( + builder.apply(com.commercetools.importapi.models.discount_codes.DiscountCodeImportBuilder.of())); + } + + /** + *

The Discount Code import resources of this request.

+ * @param builder function to build the resources value + * @return Builder + */ + + public DiscountCodeImportRequestBuilder setResources( + Function builder) { + return resources( + builder.apply(com.commercetools.importapi.models.discount_codes.DiscountCodeImportBuilder.of())); + } + + /** + *

The Discount Code import resources of this request.

+ * @return resources + */ + + public java.util.List getResources() { + return this.resources; + } + + /** + * builds DiscountCodeImportRequest with checking for non-null required values + * @return DiscountCodeImportRequest + */ + public DiscountCodeImportRequest build() { + Objects.requireNonNull(resources, DiscountCodeImportRequest.class + ": resources is missing"); + return new DiscountCodeImportRequestImpl(resources); + } + + /** + * builds DiscountCodeImportRequest without checking for non-null required values + * @return DiscountCodeImportRequest + */ + public DiscountCodeImportRequest buildUnchecked() { + return new DiscountCodeImportRequestImpl(resources); + } + + /** + * factory method for an instance of DiscountCodeImportRequestBuilder + * @return builder + */ + public static DiscountCodeImportRequestBuilder of() { + return new DiscountCodeImportRequestBuilder(); + } + + /** + * create builder for DiscountCodeImportRequest instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DiscountCodeImportRequestBuilder of(final DiscountCodeImportRequest template) { + DiscountCodeImportRequestBuilder builder = new DiscountCodeImportRequestBuilder(); + builder.resources = template.getResources(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/DiscountCodeImportRequestImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/DiscountCodeImportRequestImpl.java new file mode 100644 index 00000000000..b8dec009050 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/DiscountCodeImportRequestImpl.java @@ -0,0 +1,101 @@ + +package com.commercetools.importapi.models.importrequests; + +import java.time.*; +import java.util.*; + +import com.commercetools.importapi.models.common.ImportResourceType; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

The request body to import Discount Codes. Contains data for Discount Codes to be created or updated in a Project.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DiscountCodeImportRequestImpl implements DiscountCodeImportRequest, ModelBase { + + private com.commercetools.importapi.models.common.ImportResourceType type; + + private java.util.List resources; + + /** + * create instance with all properties + */ + @JsonCreator + DiscountCodeImportRequestImpl( + @JsonProperty("resources") final java.util.List resources) { + this.resources = resources; + this.type = ImportResourceType.findEnum("discount-code"); + } + + /** + * create empty instance + */ + public DiscountCodeImportRequestImpl() { + this.type = ImportResourceType.findEnum("discount-code"); + } + + /** + *

The resource types that can be imported.

+ */ + + public com.commercetools.importapi.models.common.ImportResourceType getType() { + return this.type; + } + + /** + *

The Discount Code import resources of this request.

+ */ + + public java.util.List getResources() { + return this.resources; + } + + public void setResources(final com.commercetools.importapi.models.discount_codes.DiscountCodeImport... resources) { + this.resources = new ArrayList<>(Arrays.asList(resources)); + } + + public void setResources( + final java.util.List resources) { + this.resources = resources; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + DiscountCodeImportRequestImpl that = (DiscountCodeImportRequestImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(resources, that.resources) + .append(type, that.type) + .append(resources, that.resources) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(resources).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("resources", resources) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ImportRequest.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ImportRequest.java index fa42df91275..d798522600a 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ImportRequest.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ImportRequest.java @@ -30,6 +30,7 @@ @JsonSubTypes({ @JsonSubTypes.Type(value = com.commercetools.importapi.models.importrequests.CategoryImportRequestImpl.class, name = CategoryImportRequest.CATEGORY), @JsonSubTypes.Type(value = com.commercetools.importapi.models.importrequests.CustomerImportRequestImpl.class, name = CustomerImportRequest.CUSTOMER), + @JsonSubTypes.Type(value = com.commercetools.importapi.models.importrequests.DiscountCodeImportRequestImpl.class, name = DiscountCodeImportRequest.DISCOUNT_CODE), @JsonSubTypes.Type(value = com.commercetools.importapi.models.importrequests.InventoryImportRequestImpl.class, name = InventoryImportRequest.INVENTORY), @JsonSubTypes.Type(value = com.commercetools.importapi.models.importrequests.OrderImportRequestImpl.class, name = OrderImportRequest.ORDER), @JsonSubTypes.Type(value = com.commercetools.importapi.models.importrequests.OrderPatchImportRequestImpl.class, name = OrderPatchImportRequest.ORDER_PATCH), @@ -72,6 +73,10 @@ public static ImportRequest deepCopy(@Nullable final ImportRequest template) { return com.commercetools.importapi.models.importrequests.CustomerImportRequest .deepCopy((com.commercetools.importapi.models.importrequests.CustomerImportRequest) template); } + if (template instanceof com.commercetools.importapi.models.importrequests.DiscountCodeImportRequest) { + return com.commercetools.importapi.models.importrequests.DiscountCodeImportRequest + .deepCopy((com.commercetools.importapi.models.importrequests.DiscountCodeImportRequest) template); + } if (template instanceof com.commercetools.importapi.models.importrequests.InventoryImportRequest) { return com.commercetools.importapi.models.importrequests.InventoryImportRequest .deepCopy((com.commercetools.importapi.models.importrequests.InventoryImportRequest) template); @@ -136,6 +141,14 @@ public static com.commercetools.importapi.models.importrequests.CustomerImportRe return com.commercetools.importapi.models.importrequests.CustomerImportRequestBuilder.of(); } + /** + * builder for discountCode subtype + * @return builder + */ + public static com.commercetools.importapi.models.importrequests.DiscountCodeImportRequestBuilder discountCodeBuilder() { + return com.commercetools.importapi.models.importrequests.DiscountCodeImportRequestBuilder.of(); + } + /** * builder for inventory subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ImportRequestBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ImportRequestBuilder.java index 8002763d8bc..741eca611c9 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ImportRequestBuilder.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/importrequests/ImportRequestBuilder.java @@ -19,6 +19,10 @@ public com.commercetools.importapi.models.importrequests.CustomerImportRequestBu return com.commercetools.importapi.models.importrequests.CustomerImportRequestBuilder.of(); } + public com.commercetools.importapi.models.importrequests.DiscountCodeImportRequestBuilder discountCodeBuilder() { + return com.commercetools.importapi.models.importrequests.DiscountCodeImportRequestBuilder.of(); + } + public com.commercetools.importapi.models.importrequests.InventoryImportRequestBuilder inventoryBuilder() { return com.commercetools.importapi.models.importrequests.InventoryImportRequestBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/client/resource/ByProjectKeyDiscountCodesImportContainersByImportContainerKeyTest.java b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/client/resource/ByProjectKeyDiscountCodesImportContainersByImportContainerKeyTest.java new file mode 100644 index 00000000000..22c47cdbea3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/client/resource/ByProjectKeyDiscountCodesImportContainersByImportContainerKeyTest.java @@ -0,0 +1,84 @@ + +package com.commercetools.importapi.client.resource; + +import java.nio.charset.StandardCharsets; +import java.util.concurrent.CompletableFuture; + +import com.commercetools.importapi.client.ApiRoot; +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +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.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mockito; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ByProjectKeyDiscountCodesImportContainersByImportContainerKeyTest { + 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(); + + @TestTemplate + @UseDataProvider("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()); + } + + @TestTemplate + @UseDataProvider("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); + } + + @TestTemplate + @UseDataProvider("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); + } + + @DataProvider + public static Object[][] requestWithMethodParameters() { + return new Object[][] { new Object[] { + apiRoot.withProjectKeyValue("test_projectKey") + .discountCodes() + .importContainers() + .withImportContainerKeyValue("test_importContainerKey") + .post(com.commercetools.importapi.models.importrequests.DiscountCodeImportRequest.of()) + .createHttpRequest(), + "post", "test_projectKey/discount-codes/import-containers/test_importContainerKey", } }; + } + + @DataProvider + public static Object[][] executeMethodParameters() { + return new Object[][] { new Object[] { apiRoot.withProjectKeyValue("test_projectKey") + .discountCodes() + .importContainers() + .withImportContainerKeyValue("test_importContainerKey") + .post(com.commercetools.importapi.models.importrequests.DiscountCodeImportRequest.of()), } }; + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/client/resource/ByProjectKeyDiscountCodesImportContainersTest.java b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/client/resource/ByProjectKeyDiscountCodesImportContainersTest.java new file mode 100644 index 00000000000..709a05b7b2f --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/client/resource/ByProjectKeyDiscountCodesImportContainersTest.java @@ -0,0 +1,35 @@ + +package com.commercetools.importapi.client.resource; + +import com.commercetools.importapi.client.ApiRoot; +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.VrapHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mockito; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ByProjectKeyDiscountCodesImportContainersTest { + 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(); + + @DataProvider + public static Object[][] requestWithMethodParameters() { + return new Object[][] {}; + } + + @DataProvider + public static Object[][] executeMethodParameters() { + return new Object[][] {}; + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/client/resource/ByProjectKeyDiscountCodesTest.java b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/client/resource/ByProjectKeyDiscountCodesTest.java new file mode 100644 index 00000000000..eb15024d0ae --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/client/resource/ByProjectKeyDiscountCodesTest.java @@ -0,0 +1,35 @@ + +package com.commercetools.importapi.client.resource; + +import com.commercetools.importapi.client.ApiRoot; +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import io.vrap.rmf.base.client.*; +import io.vrap.rmf.base.client.ApiHttpClient; +import io.vrap.rmf.base.client.VrapHttpClient; +import io.vrap.rmf.base.client.utils.Generated; + +import org.junit.jupiter.api.extension.ExtendWith; +import org.mockito.Mockito; + +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class ByProjectKeyDiscountCodesTest { + 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(); + + @DataProvider + public static Object[][] requestWithMethodParameters() { + return new Object[][] {}; + } + + @DataProvider + public static Object[][] executeMethodParameters() { + return new Object[][] {}; + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/discount_codes/DiscountCodeImportTest.java b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/discount_codes/DiscountCodeImportTest.java new file mode 100644 index 00000000000..9cc4729b45b --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/discount_codes/DiscountCodeImportTest.java @@ -0,0 +1,146 @@ + +package com.commercetools.importapi.models.discount_codes; + +import java.time.ZonedDateTime; +import java.util.Collections; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class DiscountCodeImportTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(DiscountCodeImportBuilder builder) { + DiscountCodeImport discountCodeImport = builder.buildUnchecked(); + Assertions.assertThat(discountCodeImport).isInstanceOf(DiscountCodeImport.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { DiscountCodeImport.builder().key("key") }, + new Object[] { DiscountCodeImport.builder() + .name(new com.commercetools.importapi.models.common.LocalizedStringImpl()) }, + new Object[] { DiscountCodeImport.builder() + .description(new com.commercetools.importapi.models.common.LocalizedStringImpl()) }, + new Object[] { DiscountCodeImport.builder().code("code") }, + new Object[] { DiscountCodeImport.builder() + .cartDiscounts(Collections.singletonList( + new com.commercetools.importapi.models.common.CartDiscountKeyReferenceImpl())) }, + new Object[] { DiscountCodeImport.builder().cartPredicate("cartPredicate") }, + new Object[] { DiscountCodeImport.builder().isActive(true) }, + new Object[] { DiscountCodeImport.builder().maxApplications(9L) }, + new Object[] { DiscountCodeImport.builder().maxApplicationsPerCustomer(5L) }, + new Object[] { DiscountCodeImport.builder().groups(Collections.singletonList("groups")) }, + new Object[] { DiscountCodeImport.builder().validFrom(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { DiscountCodeImport.builder().validUntil(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { DiscountCodeImport.builder() + .custom(new com.commercetools.importapi.models.customfields.CustomImpl()) } }; + } + + @Test + public void key() { + DiscountCodeImport value = DiscountCodeImport.of(); + value.setKey("key"); + Assertions.assertThat(value.getKey()).isEqualTo("key"); + } + + @Test + public void name() { + DiscountCodeImport value = DiscountCodeImport.of(); + value.setName(new com.commercetools.importapi.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getName()) + .isEqualTo(new com.commercetools.importapi.models.common.LocalizedStringImpl()); + } + + @Test + public void description() { + DiscountCodeImport value = DiscountCodeImport.of(); + value.setDescription(new com.commercetools.importapi.models.common.LocalizedStringImpl()); + Assertions.assertThat(value.getDescription()) + .isEqualTo(new com.commercetools.importapi.models.common.LocalizedStringImpl()); + } + + @Test + public void code() { + DiscountCodeImport value = DiscountCodeImport.of(); + value.setCode("code"); + Assertions.assertThat(value.getCode()).isEqualTo("code"); + } + + @Test + public void cartDiscounts() { + DiscountCodeImport value = DiscountCodeImport.of(); + value.setCartDiscounts( + Collections.singletonList(new com.commercetools.importapi.models.common.CartDiscountKeyReferenceImpl())); + Assertions.assertThat(value.getCartDiscounts()) + .isEqualTo(Collections + .singletonList(new com.commercetools.importapi.models.common.CartDiscountKeyReferenceImpl())); + } + + @Test + public void cartPredicate() { + DiscountCodeImport value = DiscountCodeImport.of(); + value.setCartPredicate("cartPredicate"); + Assertions.assertThat(value.getCartPredicate()).isEqualTo("cartPredicate"); + } + + @Test + public void isActive() { + DiscountCodeImport value = DiscountCodeImport.of(); + value.setIsActive(true); + Assertions.assertThat(value.getIsActive()).isEqualTo(true); + } + + @Test + public void maxApplications() { + DiscountCodeImport value = DiscountCodeImport.of(); + value.setMaxApplications(9L); + Assertions.assertThat(value.getMaxApplications()).isEqualTo(9L); + } + + @Test + public void maxApplicationsPerCustomer() { + DiscountCodeImport value = DiscountCodeImport.of(); + value.setMaxApplicationsPerCustomer(5L); + Assertions.assertThat(value.getMaxApplicationsPerCustomer()).isEqualTo(5L); + } + + @Test + public void groups() { + DiscountCodeImport value = DiscountCodeImport.of(); + value.setGroups(Collections.singletonList("groups")); + Assertions.assertThat(value.getGroups()).isEqualTo(Collections.singletonList("groups")); + } + + @Test + public void validFrom() { + DiscountCodeImport value = DiscountCodeImport.of(); + value.setValidFrom(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getValidFrom()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void validUntil() { + DiscountCodeImport value = DiscountCodeImport.of(); + value.setValidUntil(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getValidUntil()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void custom() { + DiscountCodeImport value = DiscountCodeImport.of(); + value.setCustom(new com.commercetools.importapi.models.customfields.CustomImpl()); + Assertions.assertThat(value.getCustom()) + .isEqualTo(new com.commercetools.importapi.models.customfields.CustomImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/importrequests/DiscountCodeImportRequestTest.java b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/importrequests/DiscountCodeImportRequestTest.java new file mode 100644 index 00000000000..f5e1516bc86 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/importrequests/DiscountCodeImportRequestTest.java @@ -0,0 +1,43 @@ + +package com.commercetools.importapi.models.importrequests; + +import java.util.Collections; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class DiscountCodeImportRequestTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(DiscountCodeImportRequestBuilder builder) { + DiscountCodeImportRequest discountCodeImportRequest = builder.buildUnchecked(); + Assertions.assertThat(discountCodeImportRequest).isInstanceOf(DiscountCodeImportRequest.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { DiscountCodeImportRequest.builder() + .resources(Collections.singletonList( + new com.commercetools.importapi.models.discount_codes.DiscountCodeImportImpl())) } }; + } + + @Test + public void resources() { + DiscountCodeImportRequest value = DiscountCodeImportRequest.of(); + value.setResources( + Collections.singletonList(new com.commercetools.importapi.models.discount_codes.DiscountCodeImportImpl())); + Assertions.assertThat(value.getResources()) + .isEqualTo(Collections + .singletonList(new com.commercetools.importapi.models.discount_codes.DiscountCodeImportImpl())); + } +} diff --git a/references.txt b/references.txt index 8f8e4cae76f..350f88b42e5 100644 --- a/references.txt +++ b/references.txt @@ -215,3 +215,4 @@ c19a4123795d7a2d583abb9f278ce1264b030a91 ff6616b26b771e88b9ead7c26866022cdcaebe18 c4849fad85e331f035837fe681aa7e3462a2a277 9194bacd1d05947096d049eb383656c8d7f30812 +cec3e86fa69d9a68a2add55c132e2ffff406a294