Skip to content

Update generated SDKs #840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,33 @@
<details>
<summary>Added Type(s)</summary>

- added type `BusinessUnitAssociateResponse`
- added type `BestDeal`
- added type `DiscountTypeCombination`
- added type `Stacking`
</details>


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

- added resource `/{projectKey}/business-units/key={key}/associates/{associateId}`
- added resource `/{projectKey}/business-units/{businessUnitId}/associates/{associateId}`
- added resource `/{projectKey}/in-store/key={storeKey}/business-units/key={key}/associates/{associateId}`
- added resource `/{projectKey}/in-store/key={storeKey}/business-units/{businessUnitId}/associates/{associateId}`
</details>


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

- added method `apiRoot.withProjectKey().businessUnits().keyWithKeyValueAssociatesWithAssociateIdValue().get()`
- added method `apiRoot.withProjectKey().businessUnits().withBusinessUnitIdValueAssociatesWithAssociateIdValue().get()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().keyWithKeyValueAssociatesWithAssociateIdValue().get()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().businessUnits().withBusinessUnitIdValueAssociatesWithAssociateIdValue().get()`
</details>


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

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@

package com.commercetools.api.client;

import java.net.URI;
import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CompletableFuture;

import com.fasterxml.jackson.core.type.TypeReference;

import io.vrap.rmf.base.client.*;
import io.vrap.rmf.base.client.utils.Generated;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
* <p>Retrieves all roles and permissions of an Associate in a Business Unit.</p>
*
* <hr>
* <div class=code-example>
* <pre><code class='java'>{@code
* CompletableFuture<ApiHttpResponse<com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse>> result = apiRoot
* .withProjectKey("{projectKey}")
* .businessUnits()
* .withBusinessUnitIdValueAssociatesWithAssociateIdValue("{businessUnitId}", "{associateId}")
* .get()
* .execute()
* }</code></pre>
* </div>
*/
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public class ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdGet extends
TypeApiMethod<ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdGet, com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse>
implements
com.commercetools.api.client.ErrorableTrait<ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdGet>,
com.commercetools.api.client.Deprecatable200Trait<ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdGet> {

@Override
public TypeReference<com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse> resultType() {
return new TypeReference<com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse>() {
};
}

private String projectKey;
private String businessUnitId;
private String associateId;

public ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdGet(final ApiHttpClient apiHttpClient,
String projectKey, String businessUnitId, String associateId) {
super(apiHttpClient);
this.projectKey = projectKey;
this.businessUnitId = businessUnitId;
this.associateId = associateId;
}

public ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdGet(
ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdGet t) {
super(t);
this.projectKey = t.projectKey;
this.businessUnitId = t.businessUnitId;
this.associateId = t.associateId;
}

@Override
protected ApiHttpRequest buildHttpRequest() {
List<String> params = new ArrayList<>(getQueryParamUriStrings());
String httpRequestPath = String.format("%s/business-units/%s/associates/%s", encodePathParam(this.projectKey),
encodePathParam(this.businessUnitId), encodePathParam(this.associateId));
if (!params.isEmpty()) {
httpRequestPath += "?" + String.join("&", params);
}
return new ApiHttpRequest(ApiHttpMethod.GET, URI.create(httpRequestPath), getHeaders(), null);
}

@Override
public ApiHttpResponse<com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse> executeBlocking(
final ApiHttpClient client, final Duration timeout) {
return executeBlocking(client, timeout,
com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse.class);
}

@Override
public CompletableFuture<ApiHttpResponse<com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse>> execute(
final ApiHttpClient client) {
return execute(client, com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse.class);
}

public String getProjectKey() {
return this.projectKey;
}

public String getBusinessUnitId() {
return this.businessUnitId;
}

public String getAssociateId() {
return this.associateId;
}

public void setProjectKey(final String projectKey) {
this.projectKey = projectKey;
}

public void setBusinessUnitId(final String businessUnitId) {
this.businessUnitId = businessUnitId;
}

public void setAssociateId(final String associateId) {
this.associateId = associateId;
}

@Override
public boolean equals(Object o) {
if (this == o)
return true;

if (o == null || getClass() != o.getClass())
return false;

ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdGet that = (ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdGet) o;

return new EqualsBuilder().append(projectKey, that.projectKey)
.append(businessUnitId, that.businessUnitId)
.append(associateId, that.associateId)
.isEquals();
}

@Override
public int hashCode() {
return new HashCodeBuilder(17, 37).append(projectKey).append(businessUnitId).append(associateId).toHashCode();
}

@Override
protected ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdGet copy() {
return new ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdGet(this);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

package com.commercetools.api.client;

import io.vrap.rmf.base.client.ApiHttpClient;
import io.vrap.rmf.base.client.utils.Generated;

@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public class ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdRequestBuilder {

private final ApiHttpClient apiHttpClient;
private final String projectKey;
private final String businessUnitId;
private final String associateId;

public ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdRequestBuilder(
final ApiHttpClient apiHttpClient, final String projectKey, final String businessUnitId,
final String associateId) {
this.apiHttpClient = apiHttpClient;
this.projectKey = projectKey;
this.businessUnitId = businessUnitId;
this.associateId = associateId;
}

public ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdGet get() {
return new ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdGet(apiHttpClient, projectKey,
businessUnitId, associateId);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@

package com.commercetools.api.client;

import java.net.URI;
import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CompletableFuture;

import com.fasterxml.jackson.core.type.TypeReference;

import io.vrap.rmf.base.client.*;
import io.vrap.rmf.base.client.utils.Generated;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

/**
* <p>Retrieves all roles and permissions of an Associate in a Business Unit.</p>
*
* <hr>
* <div class=code-example>
* <pre><code class='java'>{@code
* CompletableFuture<ApiHttpResponse<com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse>> result = apiRoot
* .withProjectKey("{projectKey}")
* .businessUnits()
* .keyWithKeyValueAssociatesWithAssociateIdValue("{key}", "{associateId}")
* .get()
* .execute()
* }</code></pre>
* </div>
*/
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public class ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdGet extends
TypeApiMethod<ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdGet, com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse>
implements
com.commercetools.api.client.ErrorableTrait<ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdGet>,
com.commercetools.api.client.Deprecatable200Trait<ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdGet> {

@Override
public TypeReference<com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse> resultType() {
return new TypeReference<com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse>() {
};
}

private String projectKey;
private String key;
private String associateId;

public ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdGet(final ApiHttpClient apiHttpClient,
String projectKey, String key, String associateId) {
super(apiHttpClient);
this.projectKey = projectKey;
this.key = key;
this.associateId = associateId;
}

public ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdGet(
ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdGet t) {
super(t);
this.projectKey = t.projectKey;
this.key = t.key;
this.associateId = t.associateId;
}

@Override
protected ApiHttpRequest buildHttpRequest() {
List<String> params = new ArrayList<>(getQueryParamUriStrings());
String httpRequestPath = String.format("%s/business-units/key=%s/associates/%s",
encodePathParam(this.projectKey), encodePathParam(this.key), encodePathParam(this.associateId));
if (!params.isEmpty()) {
httpRequestPath += "?" + String.join("&", params);
}
return new ApiHttpRequest(ApiHttpMethod.GET, URI.create(httpRequestPath), getHeaders(), null);
}

@Override
public ApiHttpResponse<com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse> executeBlocking(
final ApiHttpClient client, final Duration timeout) {
return executeBlocking(client, timeout,
com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse.class);
}

@Override
public CompletableFuture<ApiHttpResponse<com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse>> execute(
final ApiHttpClient client) {
return execute(client, com.commercetools.api.models.business_unit.BusinessUnitAssociateResponse.class);
}

public String getProjectKey() {
return this.projectKey;
}

public String getKey() {
return this.key;
}

public String getAssociateId() {
return this.associateId;
}

public void setProjectKey(final String projectKey) {
this.projectKey = projectKey;
}

public void setKey(final String key) {
this.key = key;
}

public void setAssociateId(final String associateId) {
this.associateId = associateId;
}

@Override
public boolean equals(Object o) {
if (this == o)
return true;

if (o == null || getClass() != o.getClass())
return false;

ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdGet that = (ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdGet) o;

return new EqualsBuilder().append(projectKey, that.projectKey)
.append(key, that.key)
.append(associateId, that.associateId)
.isEquals();
}

@Override
public int hashCode() {
return new HashCodeBuilder(17, 37).append(projectKey).append(key).append(associateId).toHashCode();
}

@Override
protected ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdGet copy() {
return new ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdGet(this);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

package com.commercetools.api.client;

import io.vrap.rmf.base.client.ApiHttpClient;
import io.vrap.rmf.base.client.utils.Generated;

@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public class ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdRequestBuilder {

private final ApiHttpClient apiHttpClient;
private final String projectKey;
private final String key;
private final String associateId;

public ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdRequestBuilder(final ApiHttpClient apiHttpClient,
final String projectKey, final String key, final String associateId) {
this.apiHttpClient = apiHttpClient;
this.projectKey = projectKey;
this.key = key;
this.associateId = associateId;
}

public ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdGet get() {
return new ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdGet(apiHttpClient, projectKey, key,
associateId);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,18 @@ public ByProjectKeyBusinessUnitsByIDRequestBuilder withId(String ID) {
return new ByProjectKeyBusinessUnitsByIDRequestBuilder(apiHttpClient, projectKey, ID);
}

public ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdRequestBuilder keyWithKeyValueAssociatesWithAssociateIdValue(
String key, String associateId) {
return new ByProjectKeyBusinessUnitsKeyByKeyAssociatesByAssociateIdRequestBuilder(apiHttpClient, projectKey,
key, associateId);
}

public ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdRequestBuilder withBusinessUnitIdValueAssociatesWithAssociateIdValue(
String businessUnitId, String associateId) {
return new ByProjectKeyBusinessUnitsByBusinessUnitIdAssociatesByAssociateIdRequestBuilder(apiHttpClient,
projectKey, businessUnitId, associateId);
}

public ByProjectKeyBusinessUnitsSearchRequestBuilder search() {
return new ByProjectKeyBusinessUnitsSearchRequestBuilder(apiHttpClient, projectKey);
}
Expand Down
Loading