Skip to content

Commit

Permalink
Merge pull request #387 from commercetools/gen-sdk-updates
Browse files Browse the repository at this point in the history
Update generated SDKs
  • Loading branch information
kodiakhq[bot] authored Jan 6, 2025
2 parents e8fe9bc + dd0f186 commit c5fbfc1
Show file tree
Hide file tree
Showing 122 changed files with 3,358 additions and 16 deletions.
103 changes: 103 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,78 @@
**Api changes**

<details>
<summary>Changed Property(s)</summary>

- :warning: changed property `exact` of type `SearchExactExpression` from type `SearchAnyValue` to `SearchExactValue`
</details>


<details>
<summary>Added Property(s)</summary>

- added property `applicationMode` to type `CartDiscountValueFixed`
- added property `applicationMode` to type `CartDiscountValueFixedDraft`
- added property `custom` to type `CartSetCustomShippingMethodAction`
- added property `custom` to type `StagedOrderSetCustomShippingMethodAction`
- added property `custom` to type `StagedOrderSetShippingAddressAndCustomShippingMethodAction`
- added property `businessUnits` to type `SearchIndexingConfiguration`
</details>


<details>
<summary>Added Resource(s)</summary>

- added resource `/{projectKey}/business-units/search`
- added resource `/{projectKey}/business-units/search/indexing-status`
- added resource `/{projectKey}/channels/key={key}`
</details>


<details>
<summary>Added Method(s)</summary>

- added method `apiRoot.withProjectKey().businessUnits().search().post()`
- added method `apiRoot.withProjectKey().businessUnits().search().head()`
- added method `apiRoot.withProjectKey().businessUnits().searchIndexingStatus().get()`
- added method `apiRoot.withProjectKey().channels().withKey().get()`
- added method `apiRoot.withProjectKey().channels().withKey().head()`
- added method `apiRoot.withProjectKey().channels().withKey().post()`
- added method `apiRoot.withProjectKey().channels().withKey().delete()`
</details>


<details>
<summary>Added Type(s)</summary>

- added type `BusinessUnitIndexingProgress`
- added type `BusinessUnitIndexingStatus`
- added type `BusinessUnitPagedSearchResponse`
- added type `BusinessUnitSearchIndexingStatusResponse`
- added type `BusinessUnitSearchRequest`
- added type `BusinessUnitSearchResult`
- added type `CartDiscountPatternTarget`
- added type `CountOnCustomLineItemUnits`
- added type `CountOnLineItemUnits`
- added type `PatternComponent`
- added type `ShoppingListLineItemAddedMessage`
- added type `ShoppingListLineItemRemovedMessage`
- added type `ShoppingListMessage`
- added type `ShoppingListLineItemAddedMessagePayload`
- added type `ShoppingListLineItemRemovedMessagePayload`
- added type `ShoppingListMessagePayload`
- added type `BusinessUnitSearchStatus`
- added type `ProjectChangeBusinessUnitSearchStatusAction`
- added type `SearchExactValue`
</details>


<details>
<summary>Added Enum(s)</summary>

- added enum `Canceled` to type `ShipmentState`
- added enum `shopping-list` to type `MessageSubscriptionResourceTypeId`
</details>

**Import changes**

<details>
Expand All @@ -6,3 +81,31 @@
- :warning: removed type `ReferencedResourceNotFound`
</details>

**History changes**

<details>
<summary>Added Resource(s)</summary>

- added resource `/{projectKey}/graphql`
</details>


<details>
<summary>Added Method(s)</summary>

- added method `apiRoot.withProjectKeyValue().graphql().post()`
</details>


<details>
<summary>Added Type(s)</summary>

- added type `GraphQLRequest`
- added type `GraphQLResponse`
- added type `GraphQLError`
- added type `GraphQLErrorLocation`
- added type `GraphQLVariablesMap`
- added type `ChangeTargetPatternChangeValue`
- added type `PatternComponent`
</details>

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Net.Http;
using Xunit;

// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Tests.Client.RequestBuilders.BusinessUnits
{
public class ByProjectKeyBusinessUnitsSearchIndexingStatusTest : 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<object[]> GetData()
{
return new List<object[]> {
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.BusinessUnits()
.SearchIndexingStatus()
.Get()
.Build(),
"Get",
"/test_projectKey/business-units/search/indexing-status",
}
};
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.Net.Http;
using Xunit;

// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Tests.Client.RequestBuilders.BusinessUnits
{
public class ByProjectKeyBusinessUnitsSearchTest : 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<object[]> GetData()
{
return new List<object[]> {
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.BusinessUnits()
.Search()
.Post(null)
.Build(),
"Post",
"/test_projectKey/business-units/search",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.BusinessUnits()
.Search()
.Head()
.Build(),
"Head",
"/test_projectKey/business-units/search",
}
};
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
using System;
using System.Collections.Generic;
using System.Net.Http;
using Xunit;

// ReSharper disable CheckNamespace
namespace commercetools.Sdk.Api.Tests.Client.RequestBuilders.Channels
{
public class ByProjectKeyChannelsKeyByKeyTest : 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<object[]> GetData()
{
return new List<object[]> {
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.Channels()
.WithKey("test_key")
.Get()
.WithExpand("expand")
.Build(),
"Get",
"/test_projectKey/channels/key=test_key?expand=expand",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.Channels()
.WithKey("test_key")
.Get()
.Build(),
"Get",
"/test_projectKey/channels/key=test_key",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.Channels()
.WithKey("test_key")
.Head()
.Build(),
"Head",
"/test_projectKey/channels/key=test_key",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.Channels()
.WithKey("test_key")
.Post(null)
.WithExpand("expand")
.Build(),
"Post",
"/test_projectKey/channels/key=test_key?expand=expand",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.Channels()
.WithKey("test_key")
.Post(null)
.Build(),
"Post",
"/test_projectKey/channels/key=test_key",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.Channels()
.WithKey("test_key")
.Delete()
.WithVersion(2)
.Build(),
"Delete",
"/test_projectKey/channels/key=test_key?version=2",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.Channels()
.WithKey("test_key")
.Delete()
.WithExpand("expand")
.Build(),
"Delete",
"/test_projectKey/channels/key=test_key?expand=expand",
},
new Object[] {
ApiRoot
.WithProjectKey("test_projectKey")
.Channels()
.WithKey("test_key")
.Delete()
.Build(),
"Delete",
"/test_projectKey/channels/key=test_key",
}
};
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Net.Http;
using Xunit;

// ReSharper disable CheckNamespace
namespace commercetools.Sdk.HistoryApi.Tests.Client.RequestBuilders.Graphql
{
public class ByProjectKeyGraphqlTest : 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<object[]> GetData()
{
return new List<object[]> {
new Object[] {
ApiRoot
.WithProjectKeyValue("test_projectKey")
.Graphql()
.Post(null)
.Build(),
"Post",
"/test_projectKey/graphql",
}
};
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,15 @@ public ByProjectKeyBusinessUnitsByIDRequestBuilder WithId(string ID)
{
return new ByProjectKeyBusinessUnitsByIDRequestBuilder(ApiHttpClient, SerializerService, ProjectKey, ID);
}

public ByProjectKeyBusinessUnitsSearchRequestBuilder Search()
{
return new ByProjectKeyBusinessUnitsSearchRequestBuilder(ApiHttpClient, SerializerService, ProjectKey);
}

public ByProjectKeyBusinessUnitsSearchIndexingStatusRequestBuilder SearchIndexingStatus()
{
return new ByProjectKeyBusinessUnitsSearchIndexingStatusRequestBuilder(ApiHttpClient, SerializerService, ProjectKey);
}
}
}
Loading

0 comments on commit c5fbfc1

Please sign in to comment.