Skip to content

Commit 4eb3194

Browse files
committed
build(codegen): updating SDK
1 parent 8baec2c commit 4eb3194

File tree

21 files changed

+1985
-0
lines changed

21 files changed

+1985
-0
lines changed

changes.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,33 @@
33
<details>
44
<summary>Added Type(s)</summary>
55

6+
- added type `BusinessUnitAssociateResponse`
67
- added type `BestDeal`
78
- added type `DiscountTypeCombination`
89
- added type `Stacking`
910
</details>
1011

1112

13+
<details>
14+
<summary>Added Resource(s)</summary>
15+
16+
- added resource `/{projectKey}/business-units/key={key}/associates/{associateId}`
17+
- added resource `/{projectKey}/business-units/{businessUnitId}/associates/{associateId}`
18+
- added resource `/{projectKey}/in-store/key={storeKey}/business-units/key={key}/associates/{associateId}`
19+
- added resource `/{projectKey}/in-store/key={storeKey}/business-units/{businessUnitId}/associates/{associateId}`
20+
</details>
21+
22+
23+
<details>
24+
<summary>Added Method(s)</summary>
25+
26+
- added method `apiRoot.withProjectKey().businessUnits().keyWithKeyValueAssociatesWithAssociateIdValue().get()`
27+
- added method `apiRoot.withProjectKey().businessUnits().withBusinessUnitIdValueAssociatesWithAssociateIdValue().get()`
28+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().keyWithKeyValueAssociatesWithAssociateIdValue().get()`
29+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().withBusinessUnitIdValueAssociatesWithAssociateIdValue().get()`
30+
</details>
31+
32+
1233
<details>
1334
<summary>Added Property(s)</summary>
1435

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
2+
package com.commercetools.api.client;
3+
4+
import java.net.URI;
5+
import java.time.Duration;
6+
import java.util.ArrayList;
7+
import java.util.List;
8+
import java.util.concurrent.CompletableFuture;
9+
10+
import com.fasterxml.jackson.core.type.TypeReference;
11+
12+
import io.vrap.rmf.base.client.*;
13+
import io.vrap.rmf.base.client.utils.Generated;
14+
15+
import org.apache.commons.lang3.builder.EqualsBuilder;
16+
import org.apache.commons.lang3.builder.HashCodeBuilder;
17+
18+
/**
19+
* <p>Retrieves all roles and permissions of an Associate in a Business Unit.</p>
20+
*
21+
* <hr>
22+
* <div class=code-example>
23+
* <pre><code class='java'>{@code
24+
* CompletableFuture<ApiHttpResponse<com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse>> result = apiRoot
25+
* .withProjectKey("{projectKey}")
26+
* .businessUnits()
27+
* .withBusinessUnitIdValueAssociatesWithAssociateIdValue("{businessUnitId}", "{associateId}")
28+
* .get()
29+
* .execute()
30+
* }</code></pre>
31+
* </div>
32+
*/
33+
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
34+
public class ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdGet extends
35+
TypeApiMethod<ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdGet, com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse>
36+
implements
37+
com.commercetools.api.client.ErrorableTrait<ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdGet>,
38+
com.commercetools.api.client.Deprecatable200Trait<ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdGet> {
39+
40+
@Override
41+
public TypeReference<com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse> resultType() {
42+
return new TypeReference<com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse>() {
43+
};
44+
}
45+
46+
private String projectKey;
47+
private String businessUnitId;
48+
private String associateId;
49+
50+
public ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdGet(final ApiHttpClient apiHttpClient,
51+
String projectKey, String businessUnitId, String associateId) {
52+
super(apiHttpClient);
53+
this.projectKey = projectKey;
54+
this.businessUnitId = businessUnitId;
55+
this.associateId = associateId;
56+
}
57+
58+
public ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdGet(
59+
ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdGet t) {
60+
super(t);
61+
this.projectKey = t.projectKey;
62+
this.businessUnitId = t.businessUnitId;
63+
this.associateId = t.associateId;
64+
}
65+
66+
@Override
67+
protected ApiHttpRequest buildHttpRequest() {
68+
List<String> params = new ArrayList<>(getQueryParamUriStrings());
69+
String httpRequestPath = String.format("%s/business-units/%s/associates/%s", encodePathParam(this.projectKey),
70+
encodePathParam(this.businessUnitId), encodePathParam(this.associateId));
71+
if (!params.isEmpty()) {
72+
httpRequestPath += "?" + String.join("&", params);
73+
}
74+
return new ApiHttpRequest(ApiHttpMethod.GET, URI.create(httpRequestPath), getHeaders(), null);
75+
}
76+
77+
@Override
78+
public ApiHttpResponse<com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse> executeBlocking(
79+
final ApiHttpClient client, final Duration timeout) {
80+
return executeBlocking(client, timeout,
81+
com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse.class);
82+
}
83+
84+
@Override
85+
public CompletableFuture<ApiHttpResponse<com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse>> execute(
86+
final ApiHttpClient client) {
87+
return execute(client, com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse.class);
88+
}
89+
90+
public String getProjectKey() {
91+
return this.projectKey;
92+
}
93+
94+
public String getBusinessUnitId() {
95+
return this.businessUnitId;
96+
}
97+
98+
public String getAssociateId() {
99+
return this.associateId;
100+
}
101+
102+
public void setProjectKey(final String projectKey) {
103+
this.projectKey = projectKey;
104+
}
105+
106+
public void setBusinessUnitId(final String businessUnitId) {
107+
this.businessUnitId = businessUnitId;
108+
}
109+
110+
public void setAssociateId(final String associateId) {
111+
this.associateId = associateId;
112+
}
113+
114+
@Override
115+
public boolean equals(Object o) {
116+
if (this == o)
117+
return true;
118+
119+
if (o == null || getClass() != o.getClass())
120+
return false;
121+
122+
ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdGet that = (ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdGet) o;
123+
124+
return new EqualsBuilder().append(projectKey, that.projectKey)
125+
.append(businessUnitId, that.businessUnitId)
126+
.append(associateId, that.associateId)
127+
.isEquals();
128+
}
129+
130+
@Override
131+
public int hashCode() {
132+
return new HashCodeBuilder(17, 37).append(projectKey).append(businessUnitId).append(associateId).toHashCode();
133+
}
134+
135+
@Override
136+
protected ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdGet copy() {
137+
return new ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdGet(this);
138+
}
139+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
package com.commercetools.api.client;
3+
4+
import io.vrap.rmf.base.client.ApiHttpClient;
5+
import io.vrap.rmf.base.client.utils.Generated;
6+
7+
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
8+
public class ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdRequestBuilder {
9+
10+
private final ApiHttpClient apiHttpClient;
11+
private final String projectKey;
12+
private final String businessUnitId;
13+
private final String associateId;
14+
15+
public ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdRequestBuilder(
16+
final ApiHttpClient apiHttpClient, final String projectKey, final String businessUnitId,
17+
final String associateId) {
18+
this.apiHttpClient = apiHttpClient;
19+
this.projectKey = projectKey;
20+
this.businessUnitId = businessUnitId;
21+
this.associateId = associateId;
22+
}
23+
24+
public ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdGet get() {
25+
return new ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdGet(apiHttpClient, projectKey,
26+
businessUnitId, associateId);
27+
}
28+
29+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
2+
package com.commercetools.api.client;
3+
4+
import java.net.URI;
5+
import java.time.Duration;
6+
import java.util.ArrayList;
7+
import java.util.List;
8+
import java.util.concurrent.CompletableFuture;
9+
10+
import com.fasterxml.jackson.core.type.TypeReference;
11+
12+
import io.vrap.rmf.base.client.*;
13+
import io.vrap.rmf.base.client.utils.Generated;
14+
15+
import org.apache.commons.lang3.builder.EqualsBuilder;
16+
import org.apache.commons.lang3.builder.HashCodeBuilder;
17+
18+
/**
19+
* <p>Retrieves all roles and permissions of an Associate in a Business Unit.</p>
20+
*
21+
* <hr>
22+
* <div class=code-example>
23+
* <pre><code class='java'>{@code
24+
* CompletableFuture<ApiHttpResponse<com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse>> result = apiRoot
25+
* .withProjectKey("{projectKey}")
26+
* .businessUnits()
27+
* .keyWithKeyValueAssociatesWithAssociateIdValue("{key}", "{associateId}")
28+
* .get()
29+
* .execute()
30+
* }</code></pre>
31+
* </div>
32+
*/
33+
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
34+
public class ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdGet extends
35+
TypeApiMethod<ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdGet, com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse>
36+
implements
37+
com.commercetools.api.client.ErrorableTrait<ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdGet>,
38+
com.commercetools.api.client.Deprecatable200Trait<ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdGet> {
39+
40+
@Override
41+
public TypeReference<com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse> resultType() {
42+
return new TypeReference<com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse>() {
43+
};
44+
}
45+
46+
private String projectKey;
47+
private String key;
48+
private String associateId;
49+
50+
public ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdGet(final ApiHttpClient apiHttpClient,
51+
String projectKey, String key, String associateId) {
52+
super(apiHttpClient);
53+
this.projectKey = projectKey;
54+
this.key = key;
55+
this.associateId = associateId;
56+
}
57+
58+
public ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdGet(
59+
ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdGet t) {
60+
super(t);
61+
this.projectKey = t.projectKey;
62+
this.key = t.key;
63+
this.associateId = t.associateId;
64+
}
65+
66+
@Override
67+
protected ApiHttpRequest buildHttpRequest() {
68+
List<String> params = new ArrayList<>(getQueryParamUriStrings());
69+
String httpRequestPath = String.format("%s/business-units/key=%s/associates/%s",
70+
encodePathParam(this.projectKey), encodePathParam(this.key), encodePathParam(this.associateId));
71+
if (!params.isEmpty()) {
72+
httpRequestPath += "?" + String.join("&", params);
73+
}
74+
return new ApiHttpRequest(ApiHttpMethod.GET, URI.create(httpRequestPath), getHeaders(), null);
75+
}
76+
77+
@Override
78+
public ApiHttpResponse<com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse> executeBlocking(
79+
final ApiHttpClient client, final Duration timeout) {
80+
return executeBlocking(client, timeout,
81+
com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse.class);
82+
}
83+
84+
@Override
85+
public CompletableFuture<ApiHttpResponse<com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse>> execute(
86+
final ApiHttpClient client) {
87+
return execute(client, com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse.class);
88+
}
89+
90+
public String getProjectKey() {
91+
return this.projectKey;
92+
}
93+
94+
public String getKey() {
95+
return this.key;
96+
}
97+
98+
public String getAssociateId() {
99+
return this.associateId;
100+
}
101+
102+
public void setProjectKey(final String projectKey) {
103+
this.projectKey = projectKey;
104+
}
105+
106+
public void setKey(final String key) {
107+
this.key = key;
108+
}
109+
110+
public void setAssociateId(final String associateId) {
111+
this.associateId = associateId;
112+
}
113+
114+
@Override
115+
public boolean equals(Object o) {
116+
if (this == o)
117+
return true;
118+
119+
if (o == null || getClass() != o.getClass())
120+
return false;
121+
122+
ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdGet that = (ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdGet) o;
123+
124+
return new EqualsBuilder().append(projectKey, that.projectKey)
125+
.append(key, that.key)
126+
.append(associateId, that.associateId)
127+
.isEquals();
128+
}
129+
130+
@Override
131+
public int hashCode() {
132+
return new HashCodeBuilder(17, 37).append(projectKey).append(key).append(associateId).toHashCode();
133+
}
134+
135+
@Override
136+
protected ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdGet copy() {
137+
return new ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdGet(this);
138+
}
139+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
package com.commercetools.api.client;
3+
4+
import io.vrap.rmf.base.client.ApiHttpClient;
5+
import io.vrap.rmf.base.client.utils.Generated;
6+
7+
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
8+
public class ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdRequestBuilder {
9+
10+
private final ApiHttpClient apiHttpClient;
11+
private final String projectKey;
12+
private final String key;
13+
private final String associateId;
14+
15+
public ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdRequestBuilder(final ApiHttpClient apiHttpClient,
16+
final String projectKey, final String key, final String associateId) {
17+
this.apiHttpClient = apiHttpClient;
18+
this.projectKey = projectKey;
19+
this.key = key;
20+
this.associateId = associateId;
21+
}
22+
23+
public ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdGet get() {
24+
return new ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdGet(apiHttpClient, projectKey, key,
25+
associateId);
26+
}
27+
28+
}

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@ public ByProjectKeyBusinessUnitsByIDRequestBuilder withId(String ID) {
4848
return new ByProjectKeyBusinessUnitsByIDRequestBuilder(apiHttpClient, projectKey, ID);
4949
}
5050

51+
public ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdRequestBuilder keyWithKeyValueAssociatesWithAssociateIdValue(
52+
String key, String associateId) {
53+
return new ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdRequestBuilder(apiHttpClient, projectKey,
54+
key, associateId);
55+
}
56+
57+
public ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdRequestBuilder withBusinessUnitIdValueAssociatesWithAssociateIdValue(
58+
String businessUnitId, String associateId) {
59+
return new ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdRequestBuilder(apiHttpClient,
60+
projectKey, businessUnitId, associateId);
61+
}
62+
5163
public ByProjectKeyBusinessUnitsSearchRequestBuilder search() {
5264
return new ByProjectKeyBusinessUnitsSearchRequestBuilder(apiHttpClient, projectKey);
5365
}

0 commit comments

Comments
 (0)