From 5113599fcdbfda96a1f5bc360315b8f30da952f2 Mon Sep 17 00:00:00 2001 From: "ct-sdks[bot]" <153784748+ct-sdks[bot]@users.noreply.github.com> Date: Fri, 10 Jan 2025 14:04:10 +0000 Subject: [PATCH] build(codegen): updating SDK --- changes.md | 17 ++ ...StoreKeyByStoreKeyBusinessUnitsByIDTest.cs | 117 +++++++++++++ ...eKeyByStoreKeyBusinessUnitsKeyByKeyTest.cs | 117 +++++++++++++ ...eyInStoreKeyByStoreKeyBusinessUnitsTest.cs | 154 ++++++++++++++++++ ...oreKeyByStoreKeyBusinessUnitsByIDDelete.cs | 87 ++++++++++ ...nStoreKeyByStoreKeyBusinessUnitsByIDGet.cs | 76 +++++++++ ...StoreKeyByStoreKeyBusinessUnitsByIDHead.cs | 65 ++++++++ ...StoreKeyByStoreKeyBusinessUnitsByIDPost.cs | 96 +++++++++++ ...StoreKeyBusinessUnitsByIDRequestBuilder.cs | 51 ++++++ ...KeyInStoreKeyByStoreKeyBusinessUnitsGet.cs | 128 +++++++++++++++ ...eyInStoreKeyByStoreKeyBusinessUnitsHead.cs | 71 ++++++++ ...eyByStoreKeyBusinessUnitsKeyByKeyDelete.cs | 87 ++++++++++ ...reKeyByStoreKeyBusinessUnitsKeyByKeyGet.cs | 76 +++++++++ ...eKeyByStoreKeyBusinessUnitsKeyByKeyHead.cs | 65 ++++++++ ...eKeyByStoreKeyBusinessUnitsKeyByKeyPost.cs | 96 +++++++++++ ...eKeyBusinessUnitsKeyByKeyRequestBuilder.cs | 51 ++++++ ...eyInStoreKeyByStoreKeyBusinessUnitsPost.cs | 93 +++++++++++ ...eyByStoreKeyBusinessUnitsRequestBuilder.cs | 53 ++++++ ...ctKeyInStoreKeyByStoreKeyRequestBuilder.cs | 5 + .../Models/BusinessUnits/BusinessUnit.cs | 4 + .../Models/BusinessUnits/Company.cs | 4 + .../Models/BusinessUnits/Division.cs | 4 + .../Models/BusinessUnits/IBusinessUnit.cs | 4 + .../BusinessUnitQueryBuilderDsl.cs | 13 ++ .../BusinessUnits/CompanyQueryBuilderDsl.cs | 13 ++ .../BusinessUnits/DivisionQueryBuilderDsl.cs | 13 ++ .../schema.graphqls | 18 +- references.txt | 1 + 28 files changed, 1578 insertions(+), 1 deletion(-) create mode 100644 commercetools.Sdk/Tests/commercetools.Sdk.Api.Tests/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDTest.cs create mode 100644 commercetools.Sdk/Tests/commercetools.Sdk.Api.Tests/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyTest.cs create mode 100644 commercetools.Sdk/Tests/commercetools.Sdk.Api.Tests/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsTest.cs create mode 100644 commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDDelete.cs create mode 100644 commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDGet.cs create mode 100644 commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDHead.cs create mode 100644 commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDPost.cs create mode 100644 commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDRequestBuilder.cs create mode 100644 commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsGet.cs create mode 100644 commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsHead.cs create mode 100644 commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyDelete.cs create mode 100644 commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyGet.cs create mode 100644 commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyHead.cs create mode 100644 commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyPost.cs create mode 100644 commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyRequestBuilder.cs create mode 100644 commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsPost.cs create mode 100644 commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsRequestBuilder.cs diff --git a/changes.md b/changes.md index c774a989f62..d12d0f41826 100644 --- a/changes.md +++ b/changes.md @@ -10,6 +10,9 @@
Added Property(s) +- added property `inheritedStores` to type `BusinessUnit` +- added property `inheritedStores` to type `Company` +- added property `inheritedStores` to type `Division` - added property `applicationMode` to type `CartDiscountValueFixed` - added property `applicationMode` to type `CartDiscountValueFixedDraft` - added property `custom` to type `CartSetCustomShippingMethodAction` @@ -25,6 +28,9 @@ - added resource `/{projectKey}/business-units/search` - added resource `/{projectKey}/business-units/search/indexing-status` - added resource `/{projectKey}/channels/key={key}` +- added resource `/{projectKey}/in-store/key={storeKey}/business-units` +- added resource `/{projectKey}/in-store/key={storeKey}/business-units/key={key}` +- added resource `/{projectKey}/in-store/key={storeKey}/business-units/{ID}`
@@ -38,6 +44,17 @@ - added method `apiRoot.withProjectKey().channels().withKey().head()` - added method `apiRoot.withProjectKey().channels().withKey().post()` - added method `apiRoot.withProjectKey().channels().withKey().delete()` +- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().get()` +- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().head()` +- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().post()` +- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().withKey().get()` +- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().withKey().head()` +- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().withKey().post()` +- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().withKey().delete()` +- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().withId().get()` +- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().withId().head()` +- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().withId().post()` +- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().withId().delete()` diff --git a/commercetools.Sdk/Tests/commercetools.Sdk.Api.Tests/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDTest.cs b/commercetools.Sdk/Tests/commercetools.Sdk.Api.Tests/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDTest.cs new file mode 100644 index 00000000000..22897b6f9ba --- /dev/null +++ b/commercetools.Sdk/Tests/commercetools.Sdk.Api.Tests/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDTest.cs @@ -0,0 +1,117 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using Xunit; + +// ReSharper disable CheckNamespace +namespace commercetools.Sdk.Api.Tests.Client.RequestBuilders.InStore +{ + public class ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDTest : RequestBuilderParentTests + { + [Theory] + [MemberData(nameof(GetData))] + public void WithMethods(HttpRequestMessage request, string httpMethod, string uri) + { + Assert.Equal(httpMethod.ToLower(), request.Method.Method.ToLower()); + Assert.Equal(uri.ToLower(), request.RequestUri.ToString().ToLower()); + } + + public static IEnumerable GetData() + { + return new List { + new Object[] { + ApiRoot + .WithProjectKey("test_projectKey") + .InStoreKeyWithStoreKeyValue("test_storeKey") + .BusinessUnits() + .WithId("test_ID") + .Get() + .WithExpand("expand") + .Build(), + "Get", + "/test_projectKey/in-store/key=test_storeKey/business-units/test_ID?expand=expand", + }, + new Object[] { + ApiRoot + .WithProjectKey("test_projectKey") + .InStoreKeyWithStoreKeyValue("test_storeKey") + .BusinessUnits() + .WithId("test_ID") + .Get() + .Build(), + "Get", + "/test_projectKey/in-store/key=test_storeKey/business-units/test_ID", + }, + new Object[] { + ApiRoot + .WithProjectKey("test_projectKey") + .InStoreKeyWithStoreKeyValue("test_storeKey") + .BusinessUnits() + .WithId("test_ID") + .Head() + .Build(), + "Head", + "/test_projectKey/in-store/key=test_storeKey/business-units/test_ID", + }, + new Object[] { + ApiRoot + .WithProjectKey("test_projectKey") + .InStoreKeyWithStoreKeyValue("test_storeKey") + .BusinessUnits() + .WithId("test_ID") + .Post(null) + .WithExpand("expand") + .Build(), + "Post", + "/test_projectKey/in-store/key=test_storeKey/business-units/test_ID?expand=expand", + }, + new Object[] { + ApiRoot + .WithProjectKey("test_projectKey") + .InStoreKeyWithStoreKeyValue("test_storeKey") + .BusinessUnits() + .WithId("test_ID") + .Post(null) + .Build(), + "Post", + "/test_projectKey/in-store/key=test_storeKey/business-units/test_ID", + }, + new Object[] { + ApiRoot + .WithProjectKey("test_projectKey") + .InStoreKeyWithStoreKeyValue("test_storeKey") + .BusinessUnits() + .WithId("test_ID") + .Delete() + .WithVersion(2) + .Build(), + "Delete", + "/test_projectKey/in-store/key=test_storeKey/business-units/test_ID?version=2", + }, + new Object[] { + ApiRoot + .WithProjectKey("test_projectKey") + .InStoreKeyWithStoreKeyValue("test_storeKey") + .BusinessUnits() + .WithId("test_ID") + .Delete() + .WithExpand("expand") + .Build(), + "Delete", + "/test_projectKey/in-store/key=test_storeKey/business-units/test_ID?expand=expand", + }, + new Object[] { + ApiRoot + .WithProjectKey("test_projectKey") + .InStoreKeyWithStoreKeyValue("test_storeKey") + .BusinessUnits() + .WithId("test_ID") + .Delete() + .Build(), + "Delete", + "/test_projectKey/in-store/key=test_storeKey/business-units/test_ID", + } + }; + } + } +} diff --git a/commercetools.Sdk/Tests/commercetools.Sdk.Api.Tests/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyTest.cs b/commercetools.Sdk/Tests/commercetools.Sdk.Api.Tests/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyTest.cs new file mode 100644 index 00000000000..3dd3d798124 --- /dev/null +++ b/commercetools.Sdk/Tests/commercetools.Sdk.Api.Tests/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyTest.cs @@ -0,0 +1,117 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using Xunit; + +// ReSharper disable CheckNamespace +namespace commercetools.Sdk.Api.Tests.Client.RequestBuilders.InStore +{ + public class ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyTest : RequestBuilderParentTests + { + [Theory] + [MemberData(nameof(GetData))] + public void WithMethods(HttpRequestMessage request, string httpMethod, string uri) + { + Assert.Equal(httpMethod.ToLower(), request.Method.Method.ToLower()); + Assert.Equal(uri.ToLower(), request.RequestUri.ToString().ToLower()); + } + + public static IEnumerable GetData() + { + return new List { + new Object[] { + ApiRoot + .WithProjectKey("test_projectKey") + .InStoreKeyWithStoreKeyValue("test_storeKey") + .BusinessUnits() + .WithKey("test_key") + .Get() + .WithExpand("expand") + .Build(), + "Get", + "/test_projectKey/in-store/key=test_storeKey/business-units/key=test_key?expand=expand", + }, + new Object[] { + ApiRoot + .WithProjectKey("test_projectKey") + .InStoreKeyWithStoreKeyValue("test_storeKey") + .BusinessUnits() + .WithKey("test_key") + .Get() + .Build(), + "Get", + "/test_projectKey/in-store/key=test_storeKey/business-units/key=test_key", + }, + new Object[] { + ApiRoot + .WithProjectKey("test_projectKey") + .InStoreKeyWithStoreKeyValue("test_storeKey") + .BusinessUnits() + .WithKey("test_key") + .Head() + .Build(), + "Head", + "/test_projectKey/in-store/key=test_storeKey/business-units/key=test_key", + }, + new Object[] { + ApiRoot + .WithProjectKey("test_projectKey") + .InStoreKeyWithStoreKeyValue("test_storeKey") + .BusinessUnits() + .WithKey("test_key") + .Post(null) + .WithExpand("expand") + .Build(), + "Post", + "/test_projectKey/in-store/key=test_storeKey/business-units/key=test_key?expand=expand", + }, + new Object[] { + ApiRoot + .WithProjectKey("test_projectKey") + .InStoreKeyWithStoreKeyValue("test_storeKey") + .BusinessUnits() + .WithKey("test_key") + .Post(null) + .Build(), + "Post", + "/test_projectKey/in-store/key=test_storeKey/business-units/key=test_key", + }, + new Object[] { + ApiRoot + .WithProjectKey("test_projectKey") + .InStoreKeyWithStoreKeyValue("test_storeKey") + .BusinessUnits() + .WithKey("test_key") + .Delete() + .WithVersion(2) + .Build(), + "Delete", + "/test_projectKey/in-store/key=test_storeKey/business-units/key=test_key?version=2", + }, + new Object[] { + ApiRoot + .WithProjectKey("test_projectKey") + .InStoreKeyWithStoreKeyValue("test_storeKey") + .BusinessUnits() + .WithKey("test_key") + .Delete() + .WithExpand("expand") + .Build(), + "Delete", + "/test_projectKey/in-store/key=test_storeKey/business-units/key=test_key?expand=expand", + }, + new Object[] { + ApiRoot + .WithProjectKey("test_projectKey") + .InStoreKeyWithStoreKeyValue("test_storeKey") + .BusinessUnits() + .WithKey("test_key") + .Delete() + .Build(), + "Delete", + "/test_projectKey/in-store/key=test_storeKey/business-units/key=test_key", + } + }; + } + } +} diff --git a/commercetools.Sdk/Tests/commercetools.Sdk.Api.Tests/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsTest.cs b/commercetools.Sdk/Tests/commercetools.Sdk.Api.Tests/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsTest.cs new file mode 100644 index 00000000000..934cd1723f3 --- /dev/null +++ b/commercetools.Sdk/Tests/commercetools.Sdk.Api.Tests/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsTest.cs @@ -0,0 +1,154 @@ +using System; +using System.Collections.Generic; +using System.Net.Http; +using Xunit; + +// ReSharper disable CheckNamespace +namespace commercetools.Sdk.Api.Tests.Client.RequestBuilders.InStore +{ + public class ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsTest : RequestBuilderParentTests + { + [Theory] + [MemberData(nameof(GetData))] + public void WithMethods(HttpRequestMessage request, string httpMethod, string uri) + { + Assert.Equal(httpMethod.ToLower(), request.Method.Method.ToLower()); + Assert.Equal(uri.ToLower(), request.RequestUri.ToString().ToLower()); + } + + public static IEnumerable GetData() + { + return new List { + new Object[] { + ApiRoot + .WithProjectKey("test_projectKey") + .InStoreKeyWithStoreKeyValue("test_storeKey") + .BusinessUnits() + .Get() + .WithExpand("expand") + .Build(), + "Get", + "/test_projectKey/in-store/key=test_storeKey/business-units?expand=expand", + }, + new Object[] { + ApiRoot + .WithProjectKey("test_projectKey") + .InStoreKeyWithStoreKeyValue("test_storeKey") + .BusinessUnits() + .Get() + .WithSort("sort") + .Build(), + "Get", + "/test_projectKey/in-store/key=test_storeKey/business-units?sort=sort", + }, + new Object[] { + ApiRoot + .WithProjectKey("test_projectKey") + .InStoreKeyWithStoreKeyValue("test_storeKey") + .BusinessUnits() + .Get() + .WithLimit(7) + .Build(), + "Get", + "/test_projectKey/in-store/key=test_storeKey/business-units?limit=7", + }, + new Object[] { + ApiRoot + .WithProjectKey("test_projectKey") + .InStoreKeyWithStoreKeyValue("test_storeKey") + .BusinessUnits() + .Get() + .WithOffset(3) + .Build(), + "Get", + "/test_projectKey/in-store/key=test_storeKey/business-units?offset=3", + }, + new Object[] { + ApiRoot + .WithProjectKey("test_projectKey") + .InStoreKeyWithStoreKeyValue("test_storeKey") + .BusinessUnits() + .Get() + .WithWithTotal(true) + .Build(), + "Get", + "/test_projectKey/in-store/key=test_storeKey/business-units?withTotal=true", + }, + new Object[] { + ApiRoot + .WithProjectKey("test_projectKey") + .InStoreKeyWithStoreKeyValue("test_storeKey") + .BusinessUnits() + .Get() + .WithWhere("where") + .Build(), + "Get", + "/test_projectKey/in-store/key=test_storeKey/business-units?where=where", + }, + new Object[] { + ApiRoot + .WithProjectKey("test_projectKey") + .InStoreKeyWithStoreKeyValue("test_storeKey") + .BusinessUnits() + .Get() + .WithPredicateVar("varName", "var.varName") + .Build(), + "Get", + "/test_projectKey/in-store/key=test_storeKey/business-units?var.varName=var.varName", + }, + new Object[] { + ApiRoot + .WithProjectKey("test_projectKey") + .InStoreKeyWithStoreKeyValue("test_storeKey") + .BusinessUnits() + .Get() + .Build(), + "Get", + "/test_projectKey/in-store/key=test_storeKey/business-units", + }, + new Object[] { + ApiRoot + .WithProjectKey("test_projectKey") + .InStoreKeyWithStoreKeyValue("test_storeKey") + .BusinessUnits() + .Head() + .WithWhere("where") + .Build(), + "Head", + "/test_projectKey/in-store/key=test_storeKey/business-units?where=where", + }, + new Object[] { + ApiRoot + .WithProjectKey("test_projectKey") + .InStoreKeyWithStoreKeyValue("test_storeKey") + .BusinessUnits() + .Head() + .Build(), + "Head", + "/test_projectKey/in-store/key=test_storeKey/business-units", + }, + new Object[] { + ApiRoot + .WithProjectKey("test_projectKey") + .InStoreKeyWithStoreKeyValue("test_storeKey") + .BusinessUnits() + .Post(null) + .WithExpand("expand") + .Build(), + "Post", + "/test_projectKey/in-store/key=test_storeKey/business-units?expand=expand", + }, + new Object[] { + ApiRoot + .WithProjectKey("test_projectKey") + .InStoreKeyWithStoreKeyValue("test_storeKey") + .BusinessUnits() + .Post(null) + .Build(), + "Post", + "/test_projectKey/in-store/key=test_storeKey/business-units", + } + }; + } + } +} diff --git a/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDDelete.cs b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDDelete.cs new file mode 100644 index 00000000000..4af91cbb00c --- /dev/null +++ b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDDelete.cs @@ -0,0 +1,87 @@ +using System.Globalization; +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.InStore +{ + + public partial class ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDDelete : ApiMethod, IApiMethod, commercetools.Sdk.Api.Client.IVersionedTrait, commercetools.Sdk.Api.Client.IConflictingTrait, commercetools.Sdk.Api.Client.IExpandableTrait, commercetools.Sdk.Api.Client.IErrorableTrait, commercetools.Sdk.Api.Client.IDeprecatable200Trait + { + + + private IClient ApiHttpClient { get; } + + public override HttpMethod Method => HttpMethod.Delete; + + private string ProjectKey { get; } + + private string StoreKey { get; } + + private string ID { get; } + + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDDelete(IClient apiHttpClient, string projectKey, string storeKey, string id) + { + this.ApiHttpClient = apiHttpClient; + this.ProjectKey = projectKey; + this.StoreKey = storeKey; + this.ID = id; + this.RequestUrl = $"/{ProjectKey}/in-store/key={StoreKey}/business-units/{ID}"; + } + + public List GetVersion() + { + return this.GetQueryParam("version"); + } + + public List GetExpand() + { + return this.GetQueryParam("expand"); + } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDDelete WithVersion(long version) + { + return this.AddQueryParam("version", version.ToString(CultureInfo.InvariantCulture)); + } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDDelete WithExpand(string expand) + { + return this.AddQueryParam("expand", expand); + } + + + public async Task ExecuteAsync(CancellationToken cancellationToken = default) + { + + var requestMessage = Build(); + return await ApiHttpClient.ExecuteAsync(requestMessage, cancellationToken); + + } + + public async Task ExecuteAsJsonAsync(CancellationToken cancellationToken = default) + { + var requestMessage = Build(); + return await ApiHttpClient.ExecuteAsJsonAsync(requestMessage, cancellationToken); + } + + public async Task> SendAsync(CancellationToken cancellationToken = default) + { + + var requestMessage = Build(); + return await ApiHttpClient.SendAsync(requestMessage, 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/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDGet.cs b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDGet.cs new file mode 100644 index 00000000000..73a07378535 --- /dev/null +++ b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDGet.cs @@ -0,0 +1,76 @@ +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.InStore +{ + + public partial class ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDGet : ApiMethod, IApiMethod, commercetools.Sdk.Api.Client.IExpandableTrait, commercetools.Sdk.Api.Client.IErrorableTrait, commercetools.Sdk.Api.Client.IDeprecatable200Trait + { + + + private IClient ApiHttpClient { get; } + + public override HttpMethod Method => HttpMethod.Get; + + private string ProjectKey { get; } + + private string StoreKey { get; } + + private string ID { get; } + + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDGet(IClient apiHttpClient, string projectKey, string storeKey, string id) + { + this.ApiHttpClient = apiHttpClient; + this.ProjectKey = projectKey; + this.StoreKey = storeKey; + this.ID = id; + this.RequestUrl = $"/{ProjectKey}/in-store/key={StoreKey}/business-units/{ID}"; + } + + public List GetExpand() + { + return this.GetQueryParam("expand"); + } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDGet WithExpand(string expand) + { + return this.AddQueryParam("expand", expand); + } + + + public async Task ExecuteAsync(CancellationToken cancellationToken = default) + { + + var requestMessage = Build(); + return await ApiHttpClient.ExecuteAsync(requestMessage, cancellationToken); + + } + + public async Task ExecuteAsJsonAsync(CancellationToken cancellationToken = default) + { + var requestMessage = Build(); + return await ApiHttpClient.ExecuteAsJsonAsync(requestMessage, cancellationToken); + } + + public async Task> SendAsync(CancellationToken cancellationToken = default) + { + + var requestMessage = Build(); + return await ApiHttpClient.SendAsync(requestMessage, 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/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDHead.cs b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDHead.cs new file mode 100644 index 00000000000..d517f4adc4b --- /dev/null +++ b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDHead.cs @@ -0,0 +1,65 @@ +using System.Net.Http; +using System.Threading.Tasks; +using System.Threading; +using commercetools.Base.Client; + + +// ReSharper disable CheckNamespace +namespace commercetools.Sdk.Api.Client.RequestBuilders.InStore +{ + + public partial class ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDHead : 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; } + + private string StoreKey { get; } + + private string ID { get; } + + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDHead(IClient apiHttpClient, string projectKey, string storeKey, string id) + { + this.ApiHttpClient = apiHttpClient; + this.ProjectKey = projectKey; + this.StoreKey = storeKey; + this.ID = id; + this.RequestUrl = $"/{ProjectKey}/in-store/key={StoreKey}/business-units/{ID}"; + } + + + + + 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/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDPost.cs b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDPost.cs new file mode 100644 index 00000000000..f7fd9f8defd --- /dev/null +++ b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDPost.cs @@ -0,0 +1,96 @@ +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using commercetools.Base.Client; +using commercetools.Base.Serialization; + + +// ReSharper disable CheckNamespace +namespace commercetools.Sdk.Api.Client.RequestBuilders.InStore +{ + + public partial class ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDPost : ApiMethod, IApiMethod, commercetools.Sdk.Api.Client.IConflictingTrait, commercetools.Sdk.Api.Client.IExpandableTrait, commercetools.Sdk.Api.Client.IDeprecatable200Trait, commercetools.Sdk.Api.Client.IErrorableTrait + { + + + private ISerializerService SerializerService { get; } + + private IClient ApiHttpClient { get; } + + public override HttpMethod Method => HttpMethod.Post; + + private string ProjectKey { get; } + + private string StoreKey { get; } + + private string ID { get; } + + private commercetools.Sdk.Api.Models.BusinessUnits.IBusinessUnitUpdate BusinessUnitUpdate; + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDPost(IClient apiHttpClient, ISerializerService serializerService, string projectKey, string storeKey, string id, commercetools.Sdk.Api.Models.BusinessUnits.IBusinessUnitUpdate businessUnitUpdate) + { + this.ApiHttpClient = apiHttpClient; + this.SerializerService = serializerService; + this.ProjectKey = projectKey; + this.StoreKey = storeKey; + this.ID = id; + this.BusinessUnitUpdate = businessUnitUpdate; + this.RequestUrl = $"/{ProjectKey}/in-store/key={StoreKey}/business-units/{ID}"; + } + + public List GetExpand() + { + return this.GetQueryParam("expand"); + } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDPost WithExpand(string expand) + { + return this.AddQueryParam("expand", expand); + } + + + public async Task ExecuteAsync(CancellationToken cancellationToken = default) + { + + var requestMessage = Build(); + return await ApiHttpClient.ExecuteAsync(requestMessage, cancellationToken); + + } + + public async Task ExecuteAsJsonAsync(CancellationToken cancellationToken = default) + { + var requestMessage = Build(); + return await ApiHttpClient.ExecuteAsJsonAsync(requestMessage, cancellationToken); + } + + public async Task> SendAsync(CancellationToken cancellationToken = default) + { + + var requestMessage = Build(); + return await ApiHttpClient.SendAsync(requestMessage, cancellationToken); + + } + + public async Task> SendAsJsonAsync(CancellationToken cancellationToken = default) + { + var requestMessage = Build(); + return await ApiHttpClient.SendAsJsonAsync(requestMessage, cancellationToken); + } + public override HttpRequestMessage Build() + { + var request = base.Build(); + if (SerializerService != null) + { + var body = this.SerializerService.Serialize(BusinessUnitUpdate); + if (!string.IsNullOrEmpty(body)) + { + request.Content = new StringContent(body, Encoding.UTF8, "application/json"); + } + } + return request; + } + + } +} diff --git a/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDRequestBuilder.cs b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDRequestBuilder.cs new file mode 100644 index 00000000000..1d607ceea68 --- /dev/null +++ b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDRequestBuilder.cs @@ -0,0 +1,51 @@ +using commercetools.Base.Client; +using commercetools.Base.Serialization; + +// ReSharper disable CheckNamespace +namespace commercetools.Sdk.Api.Client.RequestBuilders.InStore +{ + + public partial class ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDRequestBuilder + { + + private IClient ApiHttpClient { get; } + + private ISerializerService SerializerService { get; } + + private string ProjectKey { get; } + + private string StoreKey { get; } + + private string ID { get; } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDRequestBuilder(IClient apiHttpClient, ISerializerService serializerService, string projectKey, string storeKey, string id) + { + this.ApiHttpClient = apiHttpClient; + this.SerializerService = serializerService; + this.ProjectKey = projectKey; + this.StoreKey = storeKey; + this.ID = id; + } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDGet Get() + { + return new ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDGet(ApiHttpClient, ProjectKey, StoreKey, ID); + } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDHead Head() + { + return new ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDHead(ApiHttpClient, ProjectKey, StoreKey, ID); + } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDPost Post(commercetools.Sdk.Api.Models.BusinessUnits.IBusinessUnitUpdate businessUnitUpdate) + { + return new ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDPost(ApiHttpClient, SerializerService, ProjectKey, StoreKey, ID, businessUnitUpdate); + } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDDelete Delete() + { + return new ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDDelete(ApiHttpClient, ProjectKey, StoreKey, ID); + } + + } +} diff --git a/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsGet.cs b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsGet.cs new file mode 100644 index 00000000000..f5fdf4f9bbf --- /dev/null +++ b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsGet.cs @@ -0,0 +1,128 @@ +using System.Globalization; +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.InStore +{ + + public partial class ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsGet : ApiMethod, IApiMethod, commercetools.Sdk.Api.Client.IExpandableTrait, commercetools.Sdk.Api.Client.ISortableTrait, commercetools.Sdk.Api.Client.IPagingTrait, commercetools.Sdk.Api.Client.IQueryTrait, commercetools.Sdk.Api.Client.IErrorableTrait, commercetools.Sdk.Api.Client.IDeprecatable200Trait + { + + + private IClient ApiHttpClient { get; } + + public override HttpMethod Method => HttpMethod.Get; + + private string ProjectKey { get; } + + private string StoreKey { get; } + + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsGet(IClient apiHttpClient, string projectKey, string storeKey) + { + this.ApiHttpClient = apiHttpClient; + this.ProjectKey = projectKey; + this.StoreKey = storeKey; + this.RequestUrl = $"/{ProjectKey}/in-store/key={StoreKey}/business-units"; + } + + public List GetExpand() + { + return this.GetQueryParam("expand"); + } + + public List GetSort() + { + return this.GetQueryParam("sort"); + } + + public List GetLimit() + { + return this.GetQueryParam("limit"); + } + + public List GetOffset() + { + return this.GetQueryParam("offset"); + } + + public List GetWithTotal() + { + return this.GetQueryParam("withTotal"); + } + + public List GetWhere() + { + return this.GetQueryParam("where"); + } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsGet WithExpand(string expand) + { + return this.AddQueryParam("expand", expand); + } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsGet WithSort(string sort) + { + return this.AddQueryParam("sort", sort); + } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsGet WithLimit(long limit) + { + return this.AddQueryParam("limit", limit.ToString(CultureInfo.InvariantCulture)); + } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsGet WithOffset(long offset) + { + return this.AddQueryParam("offset", offset.ToString(CultureInfo.InvariantCulture)); + } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsGet WithWithTotal(bool withTotal) + { + return this.AddQueryParam("withTotal", withTotal.ToString()); + } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsGet WithWhere(string where) + { + return this.AddQueryParam("where", where); + } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsGet WithPredicateVar(string varName, string predicateVar) + { + return this.AddQueryParam($"var.{varName}", predicateVar); + } + + public async Task ExecuteAsync(CancellationToken cancellationToken = default) + { + + var requestMessage = Build(); + return await ApiHttpClient.ExecuteAsync(requestMessage, cancellationToken); + + } + + public async Task ExecuteAsJsonAsync(CancellationToken cancellationToken = default) + { + var requestMessage = Build(); + return await ApiHttpClient.ExecuteAsJsonAsync(requestMessage, cancellationToken); + } + + public async Task> SendAsync(CancellationToken cancellationToken = default) + { + + var requestMessage = Build(); + return await ApiHttpClient.SendAsync(requestMessage, 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/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsHead.cs b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsHead.cs new file mode 100644 index 00000000000..4ea3bfbd003 --- /dev/null +++ b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsHead.cs @@ -0,0 +1,71 @@ +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.InStore +{ + + public partial class ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsHead : 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; } + + private string StoreKey { get; } + + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsHead(IClient apiHttpClient, string projectKey, string storeKey) + { + this.ApiHttpClient = apiHttpClient; + this.ProjectKey = projectKey; + this.StoreKey = storeKey; + this.RequestUrl = $"/{ProjectKey}/in-store/key={StoreKey}/business-units"; + } + + public List GetWhere() + { + return this.GetQueryParam("where"); + } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsHead 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/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyDelete.cs b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyDelete.cs new file mode 100644 index 00000000000..df69f785cd6 --- /dev/null +++ b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyDelete.cs @@ -0,0 +1,87 @@ +using System.Globalization; +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.InStore +{ + + public partial class ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyDelete : ApiMethod, IApiMethod, commercetools.Sdk.Api.Client.IVersionedTrait, commercetools.Sdk.Api.Client.IConflictingTrait, commercetools.Sdk.Api.Client.IExpandableTrait, commercetools.Sdk.Api.Client.IErrorableTrait, commercetools.Sdk.Api.Client.IDeprecatable200Trait + { + + + private IClient ApiHttpClient { get; } + + public override HttpMethod Method => HttpMethod.Delete; + + private string ProjectKey { get; } + + private string StoreKey { get; } + + private string Key { get; } + + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyDelete(IClient apiHttpClient, string projectKey, string storeKey, string key) + { + this.ApiHttpClient = apiHttpClient; + this.ProjectKey = projectKey; + this.StoreKey = storeKey; + this.Key = key; + this.RequestUrl = $"/{ProjectKey}/in-store/key={StoreKey}/business-units/key={Key}"; + } + + public List GetVersion() + { + return this.GetQueryParam("version"); + } + + public List GetExpand() + { + return this.GetQueryParam("expand"); + } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyDelete WithVersion(long version) + { + return this.AddQueryParam("version", version.ToString(CultureInfo.InvariantCulture)); + } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyDelete WithExpand(string expand) + { + return this.AddQueryParam("expand", expand); + } + + + public async Task ExecuteAsync(CancellationToken cancellationToken = default) + { + + var requestMessage = Build(); + return await ApiHttpClient.ExecuteAsync(requestMessage, cancellationToken); + + } + + public async Task ExecuteAsJsonAsync(CancellationToken cancellationToken = default) + { + var requestMessage = Build(); + return await ApiHttpClient.ExecuteAsJsonAsync(requestMessage, cancellationToken); + } + + public async Task> SendAsync(CancellationToken cancellationToken = default) + { + + var requestMessage = Build(); + return await ApiHttpClient.SendAsync(requestMessage, 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/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyGet.cs b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyGet.cs new file mode 100644 index 00000000000..99f37368107 --- /dev/null +++ b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyGet.cs @@ -0,0 +1,76 @@ +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.InStore +{ + + public partial class ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyGet : ApiMethod, IApiMethod, commercetools.Sdk.Api.Client.IExpandableTrait, commercetools.Sdk.Api.Client.IErrorableTrait, commercetools.Sdk.Api.Client.IDeprecatable200Trait + { + + + private IClient ApiHttpClient { get; } + + public override HttpMethod Method => HttpMethod.Get; + + private string ProjectKey { get; } + + private string StoreKey { get; } + + private string Key { get; } + + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyGet(IClient apiHttpClient, string projectKey, string storeKey, string key) + { + this.ApiHttpClient = apiHttpClient; + this.ProjectKey = projectKey; + this.StoreKey = storeKey; + this.Key = key; + this.RequestUrl = $"/{ProjectKey}/in-store/key={StoreKey}/business-units/key={Key}"; + } + + public List GetExpand() + { + return this.GetQueryParam("expand"); + } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyGet WithExpand(string expand) + { + return this.AddQueryParam("expand", expand); + } + + + public async Task ExecuteAsync(CancellationToken cancellationToken = default) + { + + var requestMessage = Build(); + return await ApiHttpClient.ExecuteAsync(requestMessage, cancellationToken); + + } + + public async Task ExecuteAsJsonAsync(CancellationToken cancellationToken = default) + { + var requestMessage = Build(); + return await ApiHttpClient.ExecuteAsJsonAsync(requestMessage, cancellationToken); + } + + public async Task> SendAsync(CancellationToken cancellationToken = default) + { + + var requestMessage = Build(); + return await ApiHttpClient.SendAsync(requestMessage, 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/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyHead.cs b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyHead.cs new file mode 100644 index 00000000000..492bbc9aa7e --- /dev/null +++ b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyHead.cs @@ -0,0 +1,65 @@ +using System.Net.Http; +using System.Threading.Tasks; +using System.Threading; +using commercetools.Base.Client; + + +// ReSharper disable CheckNamespace +namespace commercetools.Sdk.Api.Client.RequestBuilders.InStore +{ + + public partial class ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyHead : 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; } + + private string StoreKey { get; } + + private string Key { get; } + + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyHead(IClient apiHttpClient, string projectKey, string storeKey, string key) + { + this.ApiHttpClient = apiHttpClient; + this.ProjectKey = projectKey; + this.StoreKey = storeKey; + this.Key = key; + this.RequestUrl = $"/{ProjectKey}/in-store/key={StoreKey}/business-units/key={Key}"; + } + + + + + 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/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyPost.cs b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyPost.cs new file mode 100644 index 00000000000..8fb2d6fe0e6 --- /dev/null +++ b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyPost.cs @@ -0,0 +1,96 @@ +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using commercetools.Base.Client; +using commercetools.Base.Serialization; + + +// ReSharper disable CheckNamespace +namespace commercetools.Sdk.Api.Client.RequestBuilders.InStore +{ + + public partial class ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyPost : ApiMethod, IApiMethod, commercetools.Sdk.Api.Client.IConflictingTrait, commercetools.Sdk.Api.Client.IExpandableTrait, commercetools.Sdk.Api.Client.IDeprecatable200Trait, commercetools.Sdk.Api.Client.IErrorableTrait + { + + + private ISerializerService SerializerService { get; } + + private IClient ApiHttpClient { get; } + + public override HttpMethod Method => HttpMethod.Post; + + private string ProjectKey { get; } + + private string StoreKey { get; } + + private string Key { get; } + + private commercetools.Sdk.Api.Models.BusinessUnits.IBusinessUnitUpdate BusinessUnitUpdate; + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyPost(IClient apiHttpClient, ISerializerService serializerService, string projectKey, string storeKey, string key, commercetools.Sdk.Api.Models.BusinessUnits.IBusinessUnitUpdate businessUnitUpdate) + { + this.ApiHttpClient = apiHttpClient; + this.SerializerService = serializerService; + this.ProjectKey = projectKey; + this.StoreKey = storeKey; + this.Key = key; + this.BusinessUnitUpdate = businessUnitUpdate; + this.RequestUrl = $"/{ProjectKey}/in-store/key={StoreKey}/business-units/key={Key}"; + } + + public List GetExpand() + { + return this.GetQueryParam("expand"); + } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyPost WithExpand(string expand) + { + return this.AddQueryParam("expand", expand); + } + + + public async Task ExecuteAsync(CancellationToken cancellationToken = default) + { + + var requestMessage = Build(); + return await ApiHttpClient.ExecuteAsync(requestMessage, cancellationToken); + + } + + public async Task ExecuteAsJsonAsync(CancellationToken cancellationToken = default) + { + var requestMessage = Build(); + return await ApiHttpClient.ExecuteAsJsonAsync(requestMessage, cancellationToken); + } + + public async Task> SendAsync(CancellationToken cancellationToken = default) + { + + var requestMessage = Build(); + return await ApiHttpClient.SendAsync(requestMessage, cancellationToken); + + } + + public async Task> SendAsJsonAsync(CancellationToken cancellationToken = default) + { + var requestMessage = Build(); + return await ApiHttpClient.SendAsJsonAsync(requestMessage, cancellationToken); + } + public override HttpRequestMessage Build() + { + var request = base.Build(); + if (SerializerService != null) + { + var body = this.SerializerService.Serialize(BusinessUnitUpdate); + if (!string.IsNullOrEmpty(body)) + { + request.Content = new StringContent(body, Encoding.UTF8, "application/json"); + } + } + return request; + } + + } +} diff --git a/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyRequestBuilder.cs b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyRequestBuilder.cs new file mode 100644 index 00000000000..4845a10bdcb --- /dev/null +++ b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyRequestBuilder.cs @@ -0,0 +1,51 @@ +using commercetools.Base.Client; +using commercetools.Base.Serialization; + +// ReSharper disable CheckNamespace +namespace commercetools.Sdk.Api.Client.RequestBuilders.InStore +{ + + public partial class ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyRequestBuilder + { + + private IClient ApiHttpClient { get; } + + private ISerializerService SerializerService { get; } + + private string ProjectKey { get; } + + private string StoreKey { get; } + + private string Key { get; } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyRequestBuilder(IClient apiHttpClient, ISerializerService serializerService, string projectKey, string storeKey, string key) + { + this.ApiHttpClient = apiHttpClient; + this.SerializerService = serializerService; + this.ProjectKey = projectKey; + this.StoreKey = storeKey; + this.Key = key; + } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyGet Get() + { + return new ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyGet(ApiHttpClient, ProjectKey, StoreKey, Key); + } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyHead Head() + { + return new ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyHead(ApiHttpClient, ProjectKey, StoreKey, Key); + } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyPost Post(commercetools.Sdk.Api.Models.BusinessUnits.IBusinessUnitUpdate businessUnitUpdate) + { + return new ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyPost(ApiHttpClient, SerializerService, ProjectKey, StoreKey, Key, businessUnitUpdate); + } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyDelete Delete() + { + return new ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyDelete(ApiHttpClient, ProjectKey, StoreKey, Key); + } + + } +} diff --git a/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsPost.cs b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsPost.cs new file mode 100644 index 00000000000..28916219e53 --- /dev/null +++ b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsPost.cs @@ -0,0 +1,93 @@ +using System.Collections.Generic; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; +using System.Threading; +using commercetools.Base.Client; +using commercetools.Base.Serialization; + + +// ReSharper disable CheckNamespace +namespace commercetools.Sdk.Api.Client.RequestBuilders.InStore +{ + + public partial class ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsPost : ApiMethod, IApiMethod, commercetools.Sdk.Api.Client.IExpandableTrait, commercetools.Sdk.Api.Client.IDeprecatable201Trait, commercetools.Sdk.Api.Client.IErrorableTrait + { + + + private ISerializerService SerializerService { get; } + + private IClient ApiHttpClient { get; } + + public override HttpMethod Method => HttpMethod.Post; + + private string ProjectKey { get; } + + private string StoreKey { get; } + + private commercetools.Sdk.Api.Models.BusinessUnits.IBusinessUnitDraft BusinessUnitDraft; + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsPost(IClient apiHttpClient, ISerializerService serializerService, string projectKey, string storeKey, commercetools.Sdk.Api.Models.BusinessUnits.IBusinessUnitDraft businessUnitDraft) + { + this.ApiHttpClient = apiHttpClient; + this.SerializerService = serializerService; + this.ProjectKey = projectKey; + this.StoreKey = storeKey; + this.BusinessUnitDraft = businessUnitDraft; + this.RequestUrl = $"/{ProjectKey}/in-store/key={StoreKey}/business-units"; + } + + public List GetExpand() + { + return this.GetQueryParam("expand"); + } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsPost WithExpand(string expand) + { + return this.AddQueryParam("expand", expand); + } + + + public async Task ExecuteAsync(CancellationToken cancellationToken = default) + { + + var requestMessage = Build(); + return await ApiHttpClient.ExecuteAsync(requestMessage, cancellationToken); + + } + + public async Task ExecuteAsJsonAsync(CancellationToken cancellationToken = default) + { + var requestMessage = Build(); + return await ApiHttpClient.ExecuteAsJsonAsync(requestMessage, cancellationToken); + } + + public async Task> SendAsync(CancellationToken cancellationToken = default) + { + + var requestMessage = Build(); + return await ApiHttpClient.SendAsync(requestMessage, cancellationToken); + + } + + public async Task> SendAsJsonAsync(CancellationToken cancellationToken = default) + { + var requestMessage = Build(); + return await ApiHttpClient.SendAsJsonAsync(requestMessage, cancellationToken); + } + public override HttpRequestMessage Build() + { + var request = base.Build(); + if (SerializerService != null) + { + var body = this.SerializerService.Serialize(BusinessUnitDraft); + if (!string.IsNullOrEmpty(body)) + { + request.Content = new StringContent(body, Encoding.UTF8, "application/json"); + } + } + return request; + } + + } +} diff --git a/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsRequestBuilder.cs b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsRequestBuilder.cs new file mode 100644 index 00000000000..d1e577311a4 --- /dev/null +++ b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsRequestBuilder.cs @@ -0,0 +1,53 @@ +using commercetools.Base.Client; +using commercetools.Base.Serialization; + +// ReSharper disable CheckNamespace +namespace commercetools.Sdk.Api.Client.RequestBuilders.InStore +{ + + public partial class ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsRequestBuilder + { + + private IClient ApiHttpClient { get; } + + private ISerializerService SerializerService { get; } + + private string ProjectKey { get; } + + private string StoreKey { get; } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsRequestBuilder(IClient apiHttpClient, ISerializerService serializerService, string projectKey, string storeKey) + { + this.ApiHttpClient = apiHttpClient; + this.SerializerService = serializerService; + this.ProjectKey = projectKey; + this.StoreKey = storeKey; + } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsGet Get() + { + return new ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsGet(ApiHttpClient, ProjectKey, StoreKey); + } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsHead Head() + { + return new ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsHead(ApiHttpClient, ProjectKey, StoreKey); + } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsPost Post(commercetools.Sdk.Api.Models.BusinessUnits.IBusinessUnitDraft businessUnitDraft) + { + return new ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsPost(ApiHttpClient, SerializerService, ProjectKey, StoreKey, businessUnitDraft); + } + + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyRequestBuilder WithKey(string key) + { + return new ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsKeyByKeyRequestBuilder(ApiHttpClient, SerializerService, ProjectKey, StoreKey, key); + } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDRequestBuilder WithId(string ID) + { + return new ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsByIDRequestBuilder(ApiHttpClient, SerializerService, ProjectKey, StoreKey, ID); + } + } +} diff --git a/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyRequestBuilder.cs b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyRequestBuilder.cs index b07a484dabc..3d61e8cc0cb 100644 --- a/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyRequestBuilder.cs +++ b/commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/InStore/ByProjectKeyInStoreKeyByStoreKeyRequestBuilder.cs @@ -100,5 +100,10 @@ public ByProjectKeyInStoreKeyByStoreKeyQuotesRequestBuilder Quotes() { return new ByProjectKeyInStoreKeyByStoreKeyQuotesRequestBuilder(ApiHttpClient, SerializerService, ProjectKey, StoreKey); } + + public ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsRequestBuilder BusinessUnits() + { + return new ByProjectKeyInStoreKeyByStoreKeyBusinessUnitsRequestBuilder(ApiHttpClient, SerializerService, ProjectKey, StoreKey); + } } } diff --git a/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/BusinessUnits/BusinessUnit.cs b/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/BusinessUnits/BusinessUnit.cs index 974763ff7a5..9df75403681 100644 --- a/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/BusinessUnits/BusinessUnit.cs +++ b/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/BusinessUnits/BusinessUnit.cs @@ -30,6 +30,10 @@ public partial class BusinessUnit : IBusinessUnit public IEnumerable StoresEnumerable { set => Stores = value.ToList(); } + public IList InheritedStores { get; set; } + + public IEnumerable InheritedStoresEnumerable { set => InheritedStores = value.ToList(); } + public IBusinessUnitStoreMode StoreMode { get; set; } public IBusinessUnitType UnitType { get; set; } diff --git a/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/BusinessUnits/Company.cs b/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/BusinessUnits/Company.cs index c89da00ab1d..856aaa5d99e 100644 --- a/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/BusinessUnits/Company.cs +++ b/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/BusinessUnits/Company.cs @@ -30,6 +30,10 @@ public partial class Company : ICompany public IEnumerable StoresEnumerable { set => Stores = value.ToList(); } + public IList InheritedStores { get; set; } + + public IEnumerable InheritedStoresEnumerable { set => InheritedStores = value.ToList(); } + public IBusinessUnitStoreMode StoreMode { get; set; } public IBusinessUnitType UnitType { get; set; } diff --git a/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/BusinessUnits/Division.cs b/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/BusinessUnits/Division.cs index dfe94d5d541..b59f9499b17 100644 --- a/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/BusinessUnits/Division.cs +++ b/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/BusinessUnits/Division.cs @@ -30,6 +30,10 @@ public partial class Division : IDivision public IEnumerable StoresEnumerable { set => Stores = value.ToList(); } + public IList InheritedStores { get; set; } + + public IEnumerable InheritedStoresEnumerable { set => InheritedStores = value.ToList(); } + public IBusinessUnitStoreMode StoreMode { get; set; } public IBusinessUnitType UnitType { get; set; } diff --git a/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/BusinessUnits/IBusinessUnit.cs b/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/BusinessUnits/IBusinessUnit.cs index b126691771c..d3335700b41 100644 --- a/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/BusinessUnits/IBusinessUnit.cs +++ b/commercetools.Sdk/commercetools.Sdk.Api/Generated/commercetoolsSdkApi/Models/BusinessUnits/IBusinessUnit.cs @@ -34,6 +34,10 @@ public partial interface IBusinessUnit : IBaseResource IEnumerable StoresEnumerable { set => Stores = value.ToList(); } + IList InheritedStores { get; set; } + + IEnumerable InheritedStoresEnumerable { set => InheritedStores = value.ToList(); } + IBusinessUnitStoreMode StoreMode { get; set; } IBusinessUnitType UnitType { get; set; } diff --git a/commercetools.Sdk/commercetools.Sdk.Api/Predicates/Query/Generated/BusinessUnits/BusinessUnitQueryBuilderDsl.cs b/commercetools.Sdk/commercetools.Sdk.Api/Predicates/Query/Generated/BusinessUnits/BusinessUnitQueryBuilderDsl.cs index 06276cdbe58..ff50e937b02 100644 --- a/commercetools.Sdk/commercetools.Sdk.Api/Predicates/Query/Generated/BusinessUnits/BusinessUnitQueryBuilderDsl.cs +++ b/commercetools.Sdk/commercetools.Sdk.Api/Predicates/Query/Generated/BusinessUnits/BusinessUnitQueryBuilderDsl.cs @@ -82,6 +82,19 @@ public ICollectionPredicateBuilder Stores() return new CollectionPredicateBuilder(BinaryQueryPredicate.Of().Left(new ConstantQueryPredicate("stores")), p => new CombinationQueryPredicate(p, BusinessUnitQueryBuilderDsl.Of)); } + public CombinationQueryPredicate InheritedStores( + Func> fn) + { + return new CombinationQueryPredicate(ContainerQueryPredicate.Of() + .Parent(ConstantQueryPredicate.Of().Constant("inheritedStores")) + .Inner(fn.Invoke(commercetools.Sdk.Api.Predicates.Query.Stores.StoreKeyReferenceQueryBuilderDsl.Of())), + BusinessUnitQueryBuilderDsl.Of); + } + public ICollectionPredicateBuilder InheritedStores() + { + return new CollectionPredicateBuilder(BinaryQueryPredicate.Of().Left(new ConstantQueryPredicate("inheritedStores")), + p => new CombinationQueryPredicate(p, BusinessUnitQueryBuilderDsl.Of)); + } public IComparisonPredicateBuilder StoreMode() { return new ComparisonPredicateBuilder(BinaryQueryPredicate.Of().Left(new ConstantQueryPredicate("storeMode")), diff --git a/commercetools.Sdk/commercetools.Sdk.Api/Predicates/Query/Generated/BusinessUnits/CompanyQueryBuilderDsl.cs b/commercetools.Sdk/commercetools.Sdk.Api/Predicates/Query/Generated/BusinessUnits/CompanyQueryBuilderDsl.cs index 3ef17adea95..ba7dff6ce95 100644 --- a/commercetools.Sdk/commercetools.Sdk.Api/Predicates/Query/Generated/BusinessUnits/CompanyQueryBuilderDsl.cs +++ b/commercetools.Sdk/commercetools.Sdk.Api/Predicates/Query/Generated/BusinessUnits/CompanyQueryBuilderDsl.cs @@ -82,6 +82,19 @@ public ICollectionPredicateBuilder Stores() return new CollectionPredicateBuilder(BinaryQueryPredicate.Of().Left(new ConstantQueryPredicate("stores")), p => new CombinationQueryPredicate(p, CompanyQueryBuilderDsl.Of)); } + public CombinationQueryPredicate InheritedStores( + Func> fn) + { + return new CombinationQueryPredicate(ContainerQueryPredicate.Of() + .Parent(ConstantQueryPredicate.Of().Constant("inheritedStores")) + .Inner(fn.Invoke(commercetools.Sdk.Api.Predicates.Query.Stores.StoreKeyReferenceQueryBuilderDsl.Of())), + CompanyQueryBuilderDsl.Of); + } + public ICollectionPredicateBuilder InheritedStores() + { + return new CollectionPredicateBuilder(BinaryQueryPredicate.Of().Left(new ConstantQueryPredicate("inheritedStores")), + p => new CombinationQueryPredicate(p, CompanyQueryBuilderDsl.Of)); + } public IComparisonPredicateBuilder StoreMode() { return new ComparisonPredicateBuilder(BinaryQueryPredicate.Of().Left(new ConstantQueryPredicate("storeMode")), diff --git a/commercetools.Sdk/commercetools.Sdk.Api/Predicates/Query/Generated/BusinessUnits/DivisionQueryBuilderDsl.cs b/commercetools.Sdk/commercetools.Sdk.Api/Predicates/Query/Generated/BusinessUnits/DivisionQueryBuilderDsl.cs index 5c70b2a7f96..92eb172fb80 100644 --- a/commercetools.Sdk/commercetools.Sdk.Api/Predicates/Query/Generated/BusinessUnits/DivisionQueryBuilderDsl.cs +++ b/commercetools.Sdk/commercetools.Sdk.Api/Predicates/Query/Generated/BusinessUnits/DivisionQueryBuilderDsl.cs @@ -82,6 +82,19 @@ public ICollectionPredicateBuilder Stores() return new CollectionPredicateBuilder(BinaryQueryPredicate.Of().Left(new ConstantQueryPredicate("stores")), p => new CombinationQueryPredicate(p, DivisionQueryBuilderDsl.Of)); } + public CombinationQueryPredicate InheritedStores( + Func> fn) + { + return new CombinationQueryPredicate(ContainerQueryPredicate.Of() + .Parent(ConstantQueryPredicate.Of().Constant("inheritedStores")) + .Inner(fn.Invoke(commercetools.Sdk.Api.Predicates.Query.Stores.StoreKeyReferenceQueryBuilderDsl.Of())), + DivisionQueryBuilderDsl.Of); + } + public ICollectionPredicateBuilder InheritedStores() + { + return new CollectionPredicateBuilder(BinaryQueryPredicate.Of().Left(new ConstantQueryPredicate("inheritedStores")), + p => new CombinationQueryPredicate(p, DivisionQueryBuilderDsl.Of)); + } public IComparisonPredicateBuilder StoreMode() { return new ComparisonPredicateBuilder(BinaryQueryPredicate.Of().Left(new ConstantQueryPredicate("storeMode")), diff --git a/commercetools.Sdk/commercetools.Sdk.GraphQL.Api/schema.graphqls b/commercetools.Sdk/commercetools.Sdk.GraphQL.Api/schema.graphqls index f2436bbaed8..b2d4880bd45 100644 --- a/commercetools.Sdk/commercetools.Sdk.GraphQL.Api/schema.graphqls +++ b/commercetools.Sdk/commercetools.Sdk.GraphQL.Api/schema.graphqls @@ -4845,6 +4845,13 @@ type InStore implements CartDiscountQueryInterface & CartQueryInterface & Custom "Queries with specified key" key: String): Quote quotes(where: String, sort: [String!], limit: Int, offset: Int): QuoteQueryResult! + businessUnit( + "Queries with specified ID" + id: String, + + "Queries with specified key" + key: String): BusinessUnit + businessUnits(where: String, sort: [String!], limit: Int, offset: Int): BusinessUnitQueryResult! } type InStoreMe implements MeQueryInterface & CartQueryInterface & ActiveCartInterface & OrderQueryInterface & ShoppingListQueryInterface { @@ -6449,12 +6456,18 @@ type Mutation { createBusinessUnit(draft: BusinessUnitDraft!, "Create/modify entity as an associate in business-unit." - asAssociate: AsAssociateArgument): BusinessUnit + asAssociate: AsAssociateArgument, + + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput): BusinessUnit updateBusinessUnit(version: Long!, actions: [BusinessUnitUpdateAction!]!, "Create/modify entity as an associate in business-unit." asAssociate: AsAssociateArgument, + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput, + "Queries with specified ID" id: String, @@ -6462,6 +6475,9 @@ type Mutation { key: String): BusinessUnit deleteBusinessUnit(version: Long!, personalDataErasure: Boolean = false, + "The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions." + storeKey: KeyReferenceInput, + "Queries with specified ID" id: String, diff --git a/references.txt b/references.txt index c9cab7a295a..94a8c5e7a04 100644 --- a/references.txt +++ b/references.txt @@ -304,3 +304,4 @@ df53588d26d7953dfdf44166866ca03045f0a70b 1a494a1204ce8069f991872b32865f399160051b d042ef009240bb55e9b5b18003aba682ec9baa98 7d500b75265e9fdc6c5a47acb4e1df29523f707c +e3d5bc9cb69146c5d1dd755ed5e8cf2f54566b3a