Skip to content

Commit dd0f186

Browse files
committed
build(codegen): updating SDK
1 parent e8fe9bc commit dd0f186

File tree

122 files changed

+3358
-16
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+3358
-16
lines changed

changes.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,78 @@
1+
**Api changes**
2+
3+
<details>
4+
<summary>Changed Property(s)</summary>
5+
6+
- :warning: changed property `exact` of type `SearchExactExpression` from type `SearchAnyValue` to `SearchExactValue`
7+
</details>
8+
9+
10+
<details>
11+
<summary>Added Property(s)</summary>
12+
13+
- added property `applicationMode` to type `CartDiscountValueFixed`
14+
- added property `applicationMode` to type `CartDiscountValueFixedDraft`
15+
- added property `custom` to type `CartSetCustomShippingMethodAction`
16+
- added property `custom` to type `StagedOrderSetCustomShippingMethodAction`
17+
- added property `custom` to type `StagedOrderSetShippingAddressAndCustomShippingMethodAction`
18+
- added property `businessUnits` to type `SearchIndexingConfiguration`
19+
</details>
20+
21+
22+
<details>
23+
<summary>Added Resource(s)</summary>
24+
25+
- added resource `/{projectKey}/business-units/search`
26+
- added resource `/{projectKey}/business-units/search/indexing-status`
27+
- added resource `/{projectKey}/channels/key={key}`
28+
</details>
29+
30+
31+
<details>
32+
<summary>Added Method(s)</summary>
33+
34+
- added method `apiRoot.withProjectKey().businessUnits().search().post()`
35+
- added method `apiRoot.withProjectKey().businessUnits().search().head()`
36+
- added method `apiRoot.withProjectKey().businessUnits().searchIndexingStatus().get()`
37+
- added method `apiRoot.withProjectKey().channels().withKey().get()`
38+
- added method `apiRoot.withProjectKey().channels().withKey().head()`
39+
- added method `apiRoot.withProjectKey().channels().withKey().post()`
40+
- added method `apiRoot.withProjectKey().channels().withKey().delete()`
41+
</details>
42+
43+
44+
<details>
45+
<summary>Added Type(s)</summary>
46+
47+
- added type `BusinessUnitIndexingProgress`
48+
- added type `BusinessUnitIndexingStatus`
49+
- added type `BusinessUnitPagedSearchResponse`
50+
- added type `BusinessUnitSearchIndexingStatusResponse`
51+
- added type `BusinessUnitSearchRequest`
52+
- added type `BusinessUnitSearchResult`
53+
- added type `CartDiscountPatternTarget`
54+
- added type `CountOnCustomLineItemUnits`
55+
- added type `CountOnLineItemUnits`
56+
- added type `PatternComponent`
57+
- added type `ShoppingListLineItemAddedMessage`
58+
- added type `ShoppingListLineItemRemovedMessage`
59+
- added type `ShoppingListMessage`
60+
- added type `ShoppingListLineItemAddedMessagePayload`
61+
- added type `ShoppingListLineItemRemovedMessagePayload`
62+
- added type `ShoppingListMessagePayload`
63+
- added type `BusinessUnitSearchStatus`
64+
- added type `ProjectChangeBusinessUnitSearchStatusAction`
65+
- added type `SearchExactValue`
66+
</details>
67+
68+
69+
<details>
70+
<summary>Added Enum(s)</summary>
71+
72+
- added enum `Canceled` to type `ShipmentState`
73+
- added enum `shopping-list` to type `MessageSubscriptionResourceTypeId`
74+
</details>
75+
176
**Import changes**
277

378
<details>
@@ -6,3 +81,31 @@
681
- :warning: removed type `ReferencedResourceNotFound`
782
</details>
883

84+
**History changes**
85+
86+
<details>
87+
<summary>Added Resource(s)</summary>
88+
89+
- added resource `/{projectKey}/graphql`
90+
</details>
91+
92+
93+
<details>
94+
<summary>Added Method(s)</summary>
95+
96+
- added method `apiRoot.withProjectKeyValue().graphql().post()`
97+
</details>
98+
99+
100+
<details>
101+
<summary>Added Type(s)</summary>
102+
103+
- added type `GraphQLRequest`
104+
- added type `GraphQLResponse`
105+
- added type `GraphQLError`
106+
- added type `GraphQLErrorLocation`
107+
- added type `GraphQLVariablesMap`
108+
- added type `ChangeTargetPatternChangeValue`
109+
- added type `PatternComponent`
110+
</details>
111+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Net.Http;
4+
using Xunit;
5+
6+
// ReSharper disable CheckNamespace
7+
namespace commercetools.Sdk.Api.Tests.Client.RequestBuilders.BusinessUnits
8+
{
9+
public class ByProjectKeyBusinessUnitsSearchIndexingStatusTest : RequestBuilderParentTests
10+
{
11+
[Theory]
12+
[MemberData(nameof(GetData))]
13+
public void WithMethods(HttpRequestMessage request, string httpMethod, string uri)
14+
{
15+
Assert.Equal(httpMethod.ToLower(), request.Method.Method.ToLower());
16+
Assert.Equal(uri.ToLower(), request.RequestUri.ToString().ToLower());
17+
}
18+
19+
public static IEnumerable<object[]> GetData()
20+
{
21+
return new List<object[]> {
22+
new Object[] {
23+
ApiRoot
24+
.WithProjectKey("test_projectKey")
25+
.BusinessUnits()
26+
.SearchIndexingStatus()
27+
.Get()
28+
.Build(),
29+
"Get",
30+
"/test_projectKey/business-units/search/indexing-status",
31+
}
32+
};
33+
}
34+
}
35+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Net.Http;
4+
using Xunit;
5+
6+
// ReSharper disable CheckNamespace
7+
namespace commercetools.Sdk.Api.Tests.Client.RequestBuilders.BusinessUnits
8+
{
9+
public class ByProjectKeyBusinessUnitsSearchTest : RequestBuilderParentTests
10+
{
11+
[Theory]
12+
[MemberData(nameof(GetData))]
13+
public void WithMethods(HttpRequestMessage request, string httpMethod, string uri)
14+
{
15+
Assert.Equal(httpMethod.ToLower(), request.Method.Method.ToLower());
16+
Assert.Equal(uri.ToLower(), request.RequestUri.ToString().ToLower());
17+
}
18+
19+
public static IEnumerable<object[]> GetData()
20+
{
21+
return new List<object[]> {
22+
new Object[] {
23+
ApiRoot
24+
.WithProjectKey("test_projectKey")
25+
.BusinessUnits()
26+
.Search()
27+
.Post(null)
28+
.Build(),
29+
"Post",
30+
"/test_projectKey/business-units/search",
31+
},
32+
new Object[] {
33+
ApiRoot
34+
.WithProjectKey("test_projectKey")
35+
.BusinessUnits()
36+
.Search()
37+
.Head()
38+
.Build(),
39+
"Head",
40+
"/test_projectKey/business-units/search",
41+
}
42+
};
43+
}
44+
}
45+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Net.Http;
4+
using Xunit;
5+
6+
// ReSharper disable CheckNamespace
7+
namespace commercetools.Sdk.Api.Tests.Client.RequestBuilders.Channels
8+
{
9+
public class ByProjectKeyChannelsKeyByKeyTest : RequestBuilderParentTests
10+
{
11+
[Theory]
12+
[MemberData(nameof(GetData))]
13+
public void WithMethods(HttpRequestMessage request, string httpMethod, string uri)
14+
{
15+
Assert.Equal(httpMethod.ToLower(), request.Method.Method.ToLower());
16+
Assert.Equal(uri.ToLower(), request.RequestUri.ToString().ToLower());
17+
}
18+
19+
public static IEnumerable<object[]> GetData()
20+
{
21+
return new List<object[]> {
22+
new Object[] {
23+
ApiRoot
24+
.WithProjectKey("test_projectKey")
25+
.Channels()
26+
.WithKey("test_key")
27+
.Get()
28+
.WithExpand("expand")
29+
.Build(),
30+
"Get",
31+
"/test_projectKey/channels/key=test_key?expand=expand",
32+
},
33+
new Object[] {
34+
ApiRoot
35+
.WithProjectKey("test_projectKey")
36+
.Channels()
37+
.WithKey("test_key")
38+
.Get()
39+
.Build(),
40+
"Get",
41+
"/test_projectKey/channels/key=test_key",
42+
},
43+
new Object[] {
44+
ApiRoot
45+
.WithProjectKey("test_projectKey")
46+
.Channels()
47+
.WithKey("test_key")
48+
.Head()
49+
.Build(),
50+
"Head",
51+
"/test_projectKey/channels/key=test_key",
52+
},
53+
new Object[] {
54+
ApiRoot
55+
.WithProjectKey("test_projectKey")
56+
.Channels()
57+
.WithKey("test_key")
58+
.Post(null)
59+
.WithExpand("expand")
60+
.Build(),
61+
"Post",
62+
"/test_projectKey/channels/key=test_key?expand=expand",
63+
},
64+
new Object[] {
65+
ApiRoot
66+
.WithProjectKey("test_projectKey")
67+
.Channels()
68+
.WithKey("test_key")
69+
.Post(null)
70+
.Build(),
71+
"Post",
72+
"/test_projectKey/channels/key=test_key",
73+
},
74+
new Object[] {
75+
ApiRoot
76+
.WithProjectKey("test_projectKey")
77+
.Channels()
78+
.WithKey("test_key")
79+
.Delete()
80+
.WithVersion(2)
81+
.Build(),
82+
"Delete",
83+
"/test_projectKey/channels/key=test_key?version=2",
84+
},
85+
new Object[] {
86+
ApiRoot
87+
.WithProjectKey("test_projectKey")
88+
.Channels()
89+
.WithKey("test_key")
90+
.Delete()
91+
.WithExpand("expand")
92+
.Build(),
93+
"Delete",
94+
"/test_projectKey/channels/key=test_key?expand=expand",
95+
},
96+
new Object[] {
97+
ApiRoot
98+
.WithProjectKey("test_projectKey")
99+
.Channels()
100+
.WithKey("test_key")
101+
.Delete()
102+
.Build(),
103+
"Delete",
104+
"/test_projectKey/channels/key=test_key",
105+
}
106+
};
107+
}
108+
}
109+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Net.Http;
4+
using Xunit;
5+
6+
// ReSharper disable CheckNamespace
7+
namespace commercetools.Sdk.HistoryApi.Tests.Client.RequestBuilders.Graphql
8+
{
9+
public class ByProjectKeyGraphqlTest : RequestBuilderParentTests
10+
{
11+
[Theory]
12+
[MemberData(nameof(GetData))]
13+
public void WithMethods(HttpRequestMessage request, string httpMethod, string uri)
14+
{
15+
Assert.Equal(httpMethod.ToLower(), request.Method.Method.ToLower());
16+
Assert.Equal(uri.ToLower(), request.RequestUri.ToString().ToLower());
17+
}
18+
19+
public static IEnumerable<object[]> GetData()
20+
{
21+
return new List<object[]> {
22+
new Object[] {
23+
ApiRoot
24+
.WithProjectKeyValue("test_projectKey")
25+
.Graphql()
26+
.Post(null)
27+
.Build(),
28+
"Post",
29+
"/test_projectKey/graphql",
30+
}
31+
};
32+
}
33+
}
34+
}

commercetools.Sdk/commercetools.Sdk.Api/Generated/Client/RequestBuilders/BusinessUnits/ByProjectKeyBusinessUnitsRequestBuilder.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,15 @@ public ByProjectKeyBusinessUnitsByIDRequestBuilder WithId(string ID)
4646
{
4747
return new ByProjectKeyBusinessUnitsByIDRequestBuilder(ApiHttpClient, SerializerService, ProjectKey, ID);
4848
}
49+
50+
public ByProjectKeyBusinessUnitsSearchRequestBuilder Search()
51+
{
52+
return new ByProjectKeyBusinessUnitsSearchRequestBuilder(ApiHttpClient, SerializerService, ProjectKey);
53+
}
54+
55+
public ByProjectKeyBusinessUnitsSearchIndexingStatusRequestBuilder SearchIndexingStatus()
56+
{
57+
return new ByProjectKeyBusinessUnitsSearchIndexingStatusRequestBuilder(ApiHttpClient, SerializerService, ProjectKey);
58+
}
4959
}
5060
}

0 commit comments

Comments
 (0)