Skip to content

Commit 1f6366f

Browse files
committed
build(codegen): updating SDK
1 parent 317664a commit 1f6366f

File tree

23 files changed

+1765
-14
lines changed

23 files changed

+1765
-14
lines changed

changes.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
**Api changes**
22

3+
<details>
4+
<summary>Added Enum(s)</summary>
5+
6+
- added enum `ViewMyShoppingLists` to type `Permission`
7+
- added enum `ViewOthersShoppingLists` to type `Permission`
8+
- added enum `UpdateMyShoppingLists` to type `Permission`
9+
- added enum `UpdateOthersShoppingLists` to type `Permission`
10+
- added enum `CreateMyShoppingLists` to type `Permission`
11+
- added enum `CreateOthersShoppingLists` to type `Permission`
12+
- added enum `DeleteMyShoppingLists` to type `Permission`
13+
- added enum `DeleteOthersShoppingLists` to type `Permission`
14+
</details>
15+
16+
317
<details>
418
<summary>Added Type(s)</summary>
519

@@ -17,6 +31,9 @@
1731
<details>
1832
<summary>Added Resource(s)</summary>
1933

34+
- added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists`
35+
- added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists/key={key}`
36+
- added resource `/{projectKey}/as-associate/{associateId}/in-business-unit/key={businessUnitKey}/shopping-lists/{ID}`
2037
- added resource `/{projectKey}/business-units/key={key}/associates/{associateId}`
2138
- added resource `/{projectKey}/business-units/{businessUnitId}/associates/{associateId}`
2239
- added resource `/{projectKey}/in-store/key={storeKey}/business-units/key={key}/associates/{associateId}`
@@ -27,6 +44,17 @@
2744
<details>
2845
<summary>Added Method(s)</summary>
2946

47+
- added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().shoppingLists().get()`
48+
- added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().shoppingLists().head()`
49+
- added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().shoppingLists().post()`
50+
- added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().shoppingLists().withKey().get()`
51+
- added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().shoppingLists().withKey().head()`
52+
- added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().shoppingLists().withKey().post()`
53+
- added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().shoppingLists().withKey().delete()`
54+
- added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().shoppingLists().withId().get()`
55+
- added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().shoppingLists().withId().head()`
56+
- added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().shoppingLists().withId().post()`
57+
- added method `apiRoot.withProjectKey().asAssociate().withAssociateIdValue().inBusinessUnitKeyWithBusinessUnitKeyValue().shoppingLists().withId().delete()`
3058
- added method `apiRoot.withProjectKey().businessUnits().keyWithKeyValueAssociatesWithAssociateIdValue().get()`
3159
- added method `apiRoot.withProjectKey().businessUnits().withBusinessUnitIdValueAssociatesWithAssociateIdValue().get()`
3260
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().keyWithKeyValueAssociatesWithAssociateIdValue().get()`
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
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.AsAssociate
8+
{
9+
public class ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyShoppingListsByIDTest : 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+
.AsAssociate()
26+
.WithAssociateIdValue("test_associateId")
27+
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
28+
.ShoppingLists()
29+
.WithId("test_ID")
30+
.Get()
31+
.WithExpand("expand")
32+
.Build(),
33+
"Get",
34+
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/shopping-lists/test_ID?expand=expand",
35+
},
36+
new Object[] {
37+
ApiRoot
38+
.WithProjectKey("test_projectKey")
39+
.AsAssociate()
40+
.WithAssociateIdValue("test_associateId")
41+
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
42+
.ShoppingLists()
43+
.WithId("test_ID")
44+
.Get()
45+
.Build(),
46+
"Get",
47+
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/shopping-lists/test_ID",
48+
},
49+
new Object[] {
50+
ApiRoot
51+
.WithProjectKey("test_projectKey")
52+
.AsAssociate()
53+
.WithAssociateIdValue("test_associateId")
54+
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
55+
.ShoppingLists()
56+
.WithId("test_ID")
57+
.Head()
58+
.Build(),
59+
"Head",
60+
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/shopping-lists/test_ID",
61+
},
62+
new Object[] {
63+
ApiRoot
64+
.WithProjectKey("test_projectKey")
65+
.AsAssociate()
66+
.WithAssociateIdValue("test_associateId")
67+
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
68+
.ShoppingLists()
69+
.WithId("test_ID")
70+
.Post(null)
71+
.WithExpand("expand")
72+
.Build(),
73+
"Post",
74+
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/shopping-lists/test_ID?expand=expand",
75+
},
76+
new Object[] {
77+
ApiRoot
78+
.WithProjectKey("test_projectKey")
79+
.AsAssociate()
80+
.WithAssociateIdValue("test_associateId")
81+
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
82+
.ShoppingLists()
83+
.WithId("test_ID")
84+
.Post(null)
85+
.Build(),
86+
"Post",
87+
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/shopping-lists/test_ID",
88+
},
89+
new Object[] {
90+
ApiRoot
91+
.WithProjectKey("test_projectKey")
92+
.AsAssociate()
93+
.WithAssociateIdValue("test_associateId")
94+
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
95+
.ShoppingLists()
96+
.WithId("test_ID")
97+
.Delete()
98+
.WithExpand("expand")
99+
.Build(),
100+
"Delete",
101+
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/shopping-lists/test_ID?expand=expand",
102+
},
103+
new Object[] {
104+
ApiRoot
105+
.WithProjectKey("test_projectKey")
106+
.AsAssociate()
107+
.WithAssociateIdValue("test_associateId")
108+
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
109+
.ShoppingLists()
110+
.WithId("test_ID")
111+
.Delete()
112+
.WithDataErasure(true)
113+
.Build(),
114+
"Delete",
115+
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/shopping-lists/test_ID?dataErasure=true",
116+
},
117+
new Object[] {
118+
ApiRoot
119+
.WithProjectKey("test_projectKey")
120+
.AsAssociate()
121+
.WithAssociateIdValue("test_associateId")
122+
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
123+
.ShoppingLists()
124+
.WithId("test_ID")
125+
.Delete()
126+
.WithVersion(2)
127+
.Build(),
128+
"Delete",
129+
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/shopping-lists/test_ID?version=2",
130+
},
131+
new Object[] {
132+
ApiRoot
133+
.WithProjectKey("test_projectKey")
134+
.AsAssociate()
135+
.WithAssociateIdValue("test_associateId")
136+
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
137+
.ShoppingLists()
138+
.WithId("test_ID")
139+
.Delete()
140+
.Build(),
141+
"Delete",
142+
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/shopping-lists/test_ID",
143+
}
144+
};
145+
}
146+
}
147+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
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.AsAssociate
8+
{
9+
public class ByProjectKeyAsAssociateByAssociateIdInBusinessUnitKeyByBusinessUnitKeyShoppingListsKeyByKeyTest : 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+
.AsAssociate()
26+
.WithAssociateIdValue("test_associateId")
27+
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
28+
.ShoppingLists()
29+
.WithKey("test_key")
30+
.Get()
31+
.WithExpand("expand")
32+
.Build(),
33+
"Get",
34+
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/shopping-lists/key=test_key?expand=expand",
35+
},
36+
new Object[] {
37+
ApiRoot
38+
.WithProjectKey("test_projectKey")
39+
.AsAssociate()
40+
.WithAssociateIdValue("test_associateId")
41+
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
42+
.ShoppingLists()
43+
.WithKey("test_key")
44+
.Get()
45+
.Build(),
46+
"Get",
47+
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/shopping-lists/key=test_key",
48+
},
49+
new Object[] {
50+
ApiRoot
51+
.WithProjectKey("test_projectKey")
52+
.AsAssociate()
53+
.WithAssociateIdValue("test_associateId")
54+
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
55+
.ShoppingLists()
56+
.WithKey("test_key")
57+
.Head()
58+
.Build(),
59+
"Head",
60+
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/shopping-lists/key=test_key",
61+
},
62+
new Object[] {
63+
ApiRoot
64+
.WithProjectKey("test_projectKey")
65+
.AsAssociate()
66+
.WithAssociateIdValue("test_associateId")
67+
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
68+
.ShoppingLists()
69+
.WithKey("test_key")
70+
.Post(null)
71+
.WithExpand("expand")
72+
.Build(),
73+
"Post",
74+
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/shopping-lists/key=test_key?expand=expand",
75+
},
76+
new Object[] {
77+
ApiRoot
78+
.WithProjectKey("test_projectKey")
79+
.AsAssociate()
80+
.WithAssociateIdValue("test_associateId")
81+
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
82+
.ShoppingLists()
83+
.WithKey("test_key")
84+
.Post(null)
85+
.Build(),
86+
"Post",
87+
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/shopping-lists/key=test_key",
88+
},
89+
new Object[] {
90+
ApiRoot
91+
.WithProjectKey("test_projectKey")
92+
.AsAssociate()
93+
.WithAssociateIdValue("test_associateId")
94+
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
95+
.ShoppingLists()
96+
.WithKey("test_key")
97+
.Delete()
98+
.WithExpand("expand")
99+
.Build(),
100+
"Delete",
101+
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/shopping-lists/key=test_key?expand=expand",
102+
},
103+
new Object[] {
104+
ApiRoot
105+
.WithProjectKey("test_projectKey")
106+
.AsAssociate()
107+
.WithAssociateIdValue("test_associateId")
108+
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
109+
.ShoppingLists()
110+
.WithKey("test_key")
111+
.Delete()
112+
.WithDataErasure(true)
113+
.Build(),
114+
"Delete",
115+
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/shopping-lists/key=test_key?dataErasure=true",
116+
},
117+
new Object[] {
118+
ApiRoot
119+
.WithProjectKey("test_projectKey")
120+
.AsAssociate()
121+
.WithAssociateIdValue("test_associateId")
122+
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
123+
.ShoppingLists()
124+
.WithKey("test_key")
125+
.Delete()
126+
.WithVersion(2)
127+
.Build(),
128+
"Delete",
129+
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/shopping-lists/key=test_key?version=2",
130+
},
131+
new Object[] {
132+
ApiRoot
133+
.WithProjectKey("test_projectKey")
134+
.AsAssociate()
135+
.WithAssociateIdValue("test_associateId")
136+
.InBusinessUnitKeyWithBusinessUnitKeyValue("test_businessUnitKey")
137+
.ShoppingLists()
138+
.WithKey("test_key")
139+
.Delete()
140+
.Build(),
141+
"Delete",
142+
"/test_projectKey/as-associate/test_associateId/in-business-unit/key=test_businessUnitKey/shopping-lists/key=test_key",
143+
}
144+
};
145+
}
146+
}
147+
}

0 commit comments

Comments
 (0)