-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3ca405e
commit 097fffe
Showing
24 changed files
with
2,456 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,158 +1,32 @@ | ||
**Api changes** | ||
**Import changes** | ||
|
||
<details> | ||
<summary>Added Enum(s)</summary> | ||
|
||
- added enum `product-tailoring` to type `ReferenceTypeId` | ||
- added enum `ManuallySuspended` to type `SubscriptionHealthStatus` | ||
</details> | ||
|
||
|
||
<details> | ||
<summary>Added Property(s)</summary> | ||
|
||
- 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` | ||
</details> | ||
|
||
|
||
<details> | ||
<summary>Added Method(s)</summary> | ||
|
||
- 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()` | ||
</details> | ||
|
||
|
||
<details> | ||
<summary>Added Resource(s)</summary> | ||
|
||
- 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}` | ||
</details> | ||
|
||
|
||
<details> | ||
<summary>Added Type(s)</summary> | ||
|
||
- 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` | ||
</details> | ||
|
149 changes: 149 additions & 0 deletions
149
...s/importapi/client/ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPost.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
|
||
/** | ||
* <p>Creates a request for creating new Discount Codes or updating existing ones.</p> | ||
* | ||
* <hr> | ||
* <div class=code-example> | ||
* <pre><code class='java'>{@code | ||
* CompletableFuture<ApiHttpResponse<com.commercetools.importapi.models.importrequests.ImportResponse>> result = apiRoot | ||
* .withProjectKeyValue("{projectKey}") | ||
* .discountCodes() | ||
* .importContainers() | ||
* .withImportContainerKeyValue("{importContainerKey}") | ||
* .post(null) | ||
* .execute() | ||
* }</code></pre> | ||
* </div> | ||
*/ | ||
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") | ||
public class ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPost extends | ||
TypeBodyApiMethod<ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPost, com.commercetools.importapi.models.importrequests.ImportResponse, com.commercetools.importapi.models.importrequests.DiscountCodeImportRequest> | ||
implements | ||
com.commercetools.importapi.client.Secured_by_manage_discount_codesTrait<ByProjectKeyDiscountCodesImportContainersByImportContainerKeyPost> { | ||
|
||
@Override | ||
public TypeReference<com.commercetools.importapi.models.importrequests.ImportResponse> resultType() { | ||
return new TypeReference<com.commercetools.importapi.models.importrequests.ImportResponse>() { | ||
}; | ||
} | ||
|
||
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<String> 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<com.commercetools.importapi.models.importrequests.ImportResponse> executeBlocking( | ||
final ApiHttpClient client, final Duration timeout) { | ||
return executeBlocking(client, timeout, com.commercetools.importapi.models.importrequests.ImportResponse.class); | ||
} | ||
|
||
@Override | ||
public CompletableFuture<ApiHttpResponse<com.commercetools.importapi.models.importrequests.ImportResponse>> 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); | ||
} | ||
} |
Oops, something went wrong.