From 4d88addef71b431fa7e81062c37237e8f5b1dd12 Mon Sep 17 00:00:00 2001 From: "ct-sdks[bot]" <153784748+ct-sdks[bot]@users.noreply.github.com> Date: Fri, 18 Oct 2024 10:39:52 +0000 Subject: [PATCH] build(codegen): updating SDK --- changes.md | 48 +------------ .../ByProjectKeyProductTailoringTest.cs | 19 ++++++ .../ByProjectKeyProductTailoringHead.cs | 68 +++++++++++++++++++ ...rojectKeyProductTailoringRequestBuilder.cs | 5 ++ references.txt | 1 + 5 files changed, 95 insertions(+), 46 deletions(-) create mode 100644 commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/ProductTailoring/ByProjectKeyProductTailoringHead.cs diff --git a/changes.md b/changes.md index 27e02166a9b..8f276bbb5d5 100644 --- a/changes.md +++ b/changes.md @@ -1,52 +1,8 @@ **Api changes**
-Added Property(s) +Added Method(s) -- added property `staged` to type `ProductVariantDeletedMessage` -- added property `staged` to type `ProductVariantDeletedMessagePayload` -- added property `warnings` to type `ProductTailoring` -- added property `attributes` to type `ProductVariantTailoring` -- added property `attributes` to type `ProductVariantTailoringDraft` -- added property `attributes` to type `ProductTailoringAddVariantAction` -- added property `warnings` to type `Product` -- added property `customers` to type `SearchIndexingConfiguration` -
- - -
-Added Type(s) - -- added type `SearchNotReadyError` -- added type `GraphQLSearchNotReadyError` -- added type `ProductTailoringAttribute` -- added type `ProductTailoringSetAttributeAction` -- added type `ProductTailoringSetAttributeInAllVariantsAction` -- added type `ImageProcessingOngoingWarning` -- added type `WarningObject` -
- - -
-Removed Type(s) - -- :warning: removed type `ProductSearchStatus` -
- - -
-Added Enum(s) - -- added enum `customer-group` to type `ExtensionResourceTypeId` -- added enum `product-tailoring` to type `MessageSubscriptionResourceTypeId` -- added enum `product-tailoring` to type `ResourceTypeId` -
- -**Import changes** - -
-Added Type(s) - -- added type `InvalidFieldsUpdateError` +- added method `apiRoot.withProjectKey().productTailoring().head()`
diff --git a/commercetools.Sdk/Tests/commercetools.Sdk.Api.Tests/Generated/Client/RequestBuilders/ProductTailoring/ByProjectKeyProductTailoringTest.cs b/commercetools.Sdk/Tests/commercetools.Sdk.Api.Tests/Generated/Client/RequestBuilders/ProductTailoring/ByProjectKeyProductTailoringTest.cs index 5ac577a4750..7b52bf16cee 100644 --- a/commercetools.Sdk/Tests/commercetools.Sdk.Api.Tests/Generated/Client/RequestBuilders/ProductTailoring/ByProjectKeyProductTailoringTest.cs +++ b/commercetools.Sdk/Tests/commercetools.Sdk.Api.Tests/Generated/Client/RequestBuilders/ProductTailoring/ByProjectKeyProductTailoringTest.cs @@ -98,6 +98,25 @@ public static IEnumerable GetData() "Get", "/test_projectKey/product-tailoring", }, + new Object[] { + ApiRoot + .WithProjectKey("test_projectKey") + .ProductTailoring() + .Head() + .WithWhere("where") + .Build(), + "Head", + "/test_projectKey/product-tailoring?where=where", + }, + new Object[] { + ApiRoot + .WithProjectKey("test_projectKey") + .ProductTailoring() + .Head() + .Build(), + "Head", + "/test_projectKey/product-tailoring", + }, new Object[] { ApiRoot .WithProjectKey("test_projectKey") diff --git a/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/ProductTailoring/ByProjectKeyProductTailoringHead.cs b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/ProductTailoring/ByProjectKeyProductTailoringHead.cs new file mode 100644 index 00000000000..70ce11d62e2 --- /dev/null +++ b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/ProductTailoring/ByProjectKeyProductTailoringHead.cs @@ -0,0 +1,68 @@ +using System.Collections.Generic; +using System.Net.Http; +using System.Threading.Tasks; +using System.Threading; +using commercetools.Base.Client; + + +// ReSharper disable CheckNamespace +namespace commercetools.Sdk.Api.Client.RequestBuilders.ProductTailoring +{ + + public partial class ByProjectKeyProductTailoringHead : ApiMethod, IApiMethod, commercetools.Sdk.Api.Client.IErrorableTrait, commercetools.Sdk.Api.Client.IDeprecatable200Trait + { + + + private IClient ApiHttpClient { get; } + + public override HttpMethod Method => HttpMethod.Head; + + private string ProjectKey { get; } + + + public ByProjectKeyProductTailoringHead(IClient apiHttpClient, string projectKey) + { + this.ApiHttpClient = apiHttpClient; + this.ProjectKey = projectKey; + this.RequestUrl = $"/{ProjectKey}/product-tailoring"; + } + + public List GetWhere() + { + return this.GetQueryParam("where"); + } + + public ByProjectKeyProductTailoringHead WithWhere(string where) + { + return this.AddQueryParam("where", where); + } + + + public async Task ExecuteAsync(CancellationToken cancellationToken = default) + { + + return await ExecuteAsJsonAsync(cancellationToken); + + } + + public async Task ExecuteAsJsonAsync(CancellationToken cancellationToken = default) + { + var requestMessage = Build(); + return await ApiHttpClient.ExecuteAsJsonAsync(requestMessage, cancellationToken); + } + + public async Task> SendAsync(CancellationToken cancellationToken = default) + { + + return await SendAsJsonAsync(cancellationToken); + + } + + public async Task> SendAsJsonAsync(CancellationToken cancellationToken = default) + { + var requestMessage = Build(); + return await ApiHttpClient.SendAsJsonAsync(requestMessage, cancellationToken); + } + + } +} diff --git a/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/ProductTailoring/ByProjectKeyProductTailoringRequestBuilder.cs b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/ProductTailoring/ByProjectKeyProductTailoringRequestBuilder.cs index 38f25893891..5fc07346865 100644 --- a/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/ProductTailoring/ByProjectKeyProductTailoringRequestBuilder.cs +++ b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/ProductTailoring/ByProjectKeyProductTailoringRequestBuilder.cs @@ -26,6 +26,11 @@ public ByProjectKeyProductTailoringGet Get() return new ByProjectKeyProductTailoringGet(ApiHttpClient, ProjectKey); } + public ByProjectKeyProductTailoringHead Head() + { + return new ByProjectKeyProductTailoringHead(ApiHttpClient, ProjectKey); + } + public ByProjectKeyProductTailoringPost Post(commercetools.Sdk.Api.Models.ProductTailorings.IProductTailoringDraft productTailoringDraft) { return new ByProjectKeyProductTailoringPost(ApiHttpClient, SerializerService, ProjectKey, productTailoringDraft); diff --git a/references.txt b/references.txt index fbef2ec760c..e4eeb529b7f 100644 --- a/references.txt +++ b/references.txt @@ -287,3 +287,4 @@ c77ec902f368c2c31505fcb65a835ce148350077 903922e6a2dc0ff9283757645395f5119f61be0e e985f4b7aa55610705ee49bd3eb645c2fd03eb6c 7b61d389a7b8bd5dac2d780c6b6fbea0b881400c +c27603f949e869148570ebb8bd3ec6db34a985b7