Skip to content

Commit 2c3090e

Browse files
committed
build(codegen): updating SDK
1 parent 2a92527 commit 2c3090e

File tree

6 files changed

+205
-0
lines changed

6 files changed

+205
-0
lines changed

changes.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,11 @@
77
- :warning: changed property `column` of type `GraphQLErrorLocation` from type `integer` to `number`
88
</details>
99

10+
11+
<details>
12+
<summary>Added QueryParameter(s)</summary>
13+
14+
- added query parameter `where` to method `get /{projectKey}/product-selections/key={key}/products`
15+
- added query parameter `where` to method `get /{projectKey}/product-selections/{ID}/products`
16+
</details>
17+

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductSelectionsByIDProductsGet.java

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ public String getID() {
9999
return this.ID;
100100
}
101101

102+
public List<String> getWhere() {
103+
return this.getQueryParam("where");
104+
}
105+
102106
public List<String> getExpand() {
103107
return this.getQueryParam("expand");
104108
}
@@ -127,6 +131,85 @@ public void setID(final String ID) {
127131
this.ID = ID;
128132
}
129133

134+
/**
135+
* set where with the specified value
136+
* @param where value to be set
137+
* @param <TValue> value type
138+
* @return ByProjectKeyProductSelectionsByIDProductsGet
139+
*/
140+
public <TValue> ByProjectKeyProductSelectionsByIDProductsGet withWhere(final TValue where) {
141+
return copy().withQueryParam("where", where);
142+
}
143+
144+
/**
145+
* add additional where query parameter
146+
* @param where value to be added
147+
* @param <TValue> value type
148+
* @return ByProjectKeyProductSelectionsByIDProductsGet
149+
*/
150+
public <TValue> ByProjectKeyProductSelectionsByIDProductsGet addWhere(final TValue where) {
151+
return copy().addQueryParam("where", where);
152+
}
153+
154+
/**
155+
* set where with the specified value
156+
* @param supplier supplier for the value to be set
157+
* @return ByProjectKeyProductSelectionsByIDProductsGet
158+
*/
159+
public ByProjectKeyProductSelectionsByIDProductsGet withWhere(final Supplier<String> supplier) {
160+
return copy().withQueryParam("where", supplier.get());
161+
}
162+
163+
/**
164+
* add additional where query parameter
165+
* @param supplier supplier for the value to be added
166+
* @return ByProjectKeyProductSelectionsByIDProductsGet
167+
*/
168+
public ByProjectKeyProductSelectionsByIDProductsGet addWhere(final Supplier<String> supplier) {
169+
return copy().addQueryParam("where", supplier.get());
170+
}
171+
172+
/**
173+
* set where with the specified value
174+
* @param op builder for the value to be set
175+
* @return ByProjectKeyProductSelectionsByIDProductsGet
176+
*/
177+
public ByProjectKeyProductSelectionsByIDProductsGet withWhere(final Function<StringBuilder, StringBuilder> op) {
178+
return copy().withQueryParam("where", op.apply(new StringBuilder()));
179+
}
180+
181+
/**
182+
* add additional where query parameter
183+
* @param op builder for the value to be added
184+
* @return ByProjectKeyProductSelectionsByIDProductsGet
185+
*/
186+
public ByProjectKeyProductSelectionsByIDProductsGet addWhere(final Function<StringBuilder, StringBuilder> op) {
187+
return copy().addQueryParam("where", op.apply(new StringBuilder()));
188+
}
189+
190+
/**
191+
* set where with the specified values
192+
* @param where values to be set
193+
* @param <TValue> value type
194+
* @return ByProjectKeyProductSelectionsByIDProductsGet
195+
*/
196+
public <TValue> ByProjectKeyProductSelectionsByIDProductsGet withWhere(final Collection<TValue> where) {
197+
return copy().withoutQueryParam("where")
198+
.addQueryParams(
199+
where.stream().map(s -> new ParamEntry<>("where", s.toString())).collect(Collectors.toList()));
200+
}
201+
202+
/**
203+
* add additional where query parameters
204+
* @param where values to be added
205+
* @param <TValue> value type
206+
* @return ByProjectKeyProductSelectionsByIDProductsGet
207+
*/
208+
public <TValue> ByProjectKeyProductSelectionsByIDProductsGet addWhere(final Collection<TValue> where) {
209+
return copy().addQueryParams(
210+
where.stream().map(s -> new ParamEntry<>("where", s.toString())).collect(Collectors.toList()));
211+
}
212+
130213
/**
131214
* set expand with the specified value
132215
* @param expand value to be set

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyProductSelectionsKeyByKeyProductsGet.java

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ public String getKey() {
9999
return this.key;
100100
}
101101

102+
public List<String> getWhere() {
103+
return this.getQueryParam("where");
104+
}
105+
102106
public List<String> getExpand() {
103107
return this.getQueryParam("expand");
104108
}
@@ -127,6 +131,85 @@ public void setKey(final String key) {
127131
this.key = key;
128132
}
129133

134+
/**
135+
* set where with the specified value
136+
* @param where value to be set
137+
* @param <TValue> value type
138+
* @return ByProjectKeyProductSelectionsKeyByKeyProductsGet
139+
*/
140+
public <TValue> ByProjectKeyProductSelectionsKeyByKeyProductsGet withWhere(final TValue where) {
141+
return copy().withQueryParam("where", where);
142+
}
143+
144+
/**
145+
* add additional where query parameter
146+
* @param where value to be added
147+
* @param <TValue> value type
148+
* @return ByProjectKeyProductSelectionsKeyByKeyProductsGet
149+
*/
150+
public <TValue> ByProjectKeyProductSelectionsKeyByKeyProductsGet addWhere(final TValue where) {
151+
return copy().addQueryParam("where", where);
152+
}
153+
154+
/**
155+
* set where with the specified value
156+
* @param supplier supplier for the value to be set
157+
* @return ByProjectKeyProductSelectionsKeyByKeyProductsGet
158+
*/
159+
public ByProjectKeyProductSelectionsKeyByKeyProductsGet withWhere(final Supplier<String> supplier) {
160+
return copy().withQueryParam("where", supplier.get());
161+
}
162+
163+
/**
164+
* add additional where query parameter
165+
* @param supplier supplier for the value to be added
166+
* @return ByProjectKeyProductSelectionsKeyByKeyProductsGet
167+
*/
168+
public ByProjectKeyProductSelectionsKeyByKeyProductsGet addWhere(final Supplier<String> supplier) {
169+
return copy().addQueryParam("where", supplier.get());
170+
}
171+
172+
/**
173+
* set where with the specified value
174+
* @param op builder for the value to be set
175+
* @return ByProjectKeyProductSelectionsKeyByKeyProductsGet
176+
*/
177+
public ByProjectKeyProductSelectionsKeyByKeyProductsGet withWhere(final Function<StringBuilder, StringBuilder> op) {
178+
return copy().withQueryParam("where", op.apply(new StringBuilder()));
179+
}
180+
181+
/**
182+
* add additional where query parameter
183+
* @param op builder for the value to be added
184+
* @return ByProjectKeyProductSelectionsKeyByKeyProductsGet
185+
*/
186+
public ByProjectKeyProductSelectionsKeyByKeyProductsGet addWhere(final Function<StringBuilder, StringBuilder> op) {
187+
return copy().addQueryParam("where", op.apply(new StringBuilder()));
188+
}
189+
190+
/**
191+
* set where with the specified values
192+
* @param where values to be set
193+
* @param <TValue> value type
194+
* @return ByProjectKeyProductSelectionsKeyByKeyProductsGet
195+
*/
196+
public <TValue> ByProjectKeyProductSelectionsKeyByKeyProductsGet withWhere(final Collection<TValue> where) {
197+
return copy().withoutQueryParam("where")
198+
.addQueryParams(
199+
where.stream().map(s -> new ParamEntry<>("where", s.toString())).collect(Collectors.toList()));
200+
}
201+
202+
/**
203+
* add additional where query parameters
204+
* @param where values to be added
205+
* @param <TValue> value type
206+
* @return ByProjectKeyProductSelectionsKeyByKeyProductsGet
207+
*/
208+
public <TValue> ByProjectKeyProductSelectionsKeyByKeyProductsGet addWhere(final Collection<TValue> where) {
209+
return copy().addQueryParams(
210+
where.stream().map(s -> new ParamEntry<>("where", s.toString())).collect(Collectors.toList()));
211+
}
212+
130213
/**
131214
* set expand with the specified value
132215
* @param expand value to be set

commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductSelectionsByIDProductsTest.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,15 @@ public void executeClientException(HttpRequestCommand<?> httpRequest) throws Exc
6464
@DataProvider
6565
public static Object[][] requestWithMethodParameters() {
6666
return new Object[][] {
67+
new Object[] {
68+
apiRoot.withProjectKey("test_projectKey")
69+
.productSelections()
70+
.withId("test_ID")
71+
.products()
72+
.get()
73+
.withWhere("where")
74+
.createHttpRequest(),
75+
"get", "test_projectKey/product-selections/test_ID/products?where=where", },
6776
new Object[] {
6877
apiRoot.withProjectKey("test_projectKey")
6978
.productSelections()
@@ -120,6 +129,12 @@ public static Object[][] requestWithMethodParameters() {
120129
@DataProvider
121130
public static Object[][] executeMethodParameters() {
122131
return new Object[][] {
132+
new Object[] { apiRoot.withProjectKey("test_projectKey")
133+
.productSelections()
134+
.withId("test_ID")
135+
.products()
136+
.get()
137+
.withWhere("where"), },
123138
new Object[] { apiRoot.withProjectKey("test_projectKey")
124139
.productSelections()
125140
.withId("test_ID")

commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyProductSelectionsKeyByKeyProductsTest.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,15 @@ public void executeClientException(HttpRequestCommand<?> httpRequest) throws Exc
6464
@DataProvider
6565
public static Object[][] requestWithMethodParameters() {
6666
return new Object[][] {
67+
new Object[] {
68+
apiRoot.withProjectKey("test_projectKey")
69+
.productSelections()
70+
.withKey("test_key")
71+
.products()
72+
.get()
73+
.withWhere("where")
74+
.createHttpRequest(),
75+
"get", "test_projectKey/product-selections/key=test_key/products?where=where", },
6776
new Object[] {
6877
apiRoot.withProjectKey("test_projectKey")
6978
.productSelections()
@@ -122,6 +131,12 @@ public static Object[][] requestWithMethodParameters() {
122131
@DataProvider
123132
public static Object[][] executeMethodParameters() {
124133
return new Object[][] {
134+
new Object[] { apiRoot.withProjectKey("test_projectKey")
135+
.productSelections()
136+
.withKey("test_key")
137+
.products()
138+
.get()
139+
.withWhere("where"), },
125140
new Object[] { apiRoot.withProjectKey("test_projectKey")
126141
.productSelections()
127142
.withKey("test_key")

references.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,3 +328,4 @@ ccf4522140c12b0093aefe0e2a27d62bcc4834a6
328328
8e09aa861a0ba58755289bc185dcb268ac4f1c13
329329
0be69283d6aba9d3a2f895140378673f2f80f7b0
330330
f254d17f05343dcc4299fc53ff9b335b5ef63d69
331+
6892be230f1ad73f1150dd544c9fa7fee0e6b123

0 commit comments

Comments
 (0)