Skip to content
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

Update generated SDKs #681

Merged
merged 1 commit into from
Jun 24, 2024
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
63 changes: 63 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
**Api changes**

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

- added property `store` to type `StagedQuote`
</details>


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

- added resource `/{projectKey}/in-store/key={storeKey}/quote-requests`
- added resource `/{projectKey}/in-store/key={storeKey}/staged-quotes`
- added resource `/{projectKey}/in-store/key={storeKey}/quotes`
- added resource `/{projectKey}/in-store/key={storeKey}/orders/quotes`
- added resource `/{projectKey}/in-store/key={storeKey}/quote-requests/key={key}`
- added resource `/{projectKey}/in-store/key={storeKey}/quote-requests/{ID}`
- added resource `/{projectKey}/in-store/key={storeKey}/staged-quotes/key={key}`
- added resource `/{projectKey}/in-store/key={storeKey}/staged-quotes/{ID}`
- added resource `/{projectKey}/in-store/key={storeKey}/quotes/key={key}`
- added resource `/{projectKey}/in-store/key={storeKey}/quotes/{ID}`
</details>


<details>
<summary>Removed Enum(s)</summary>

Expand All @@ -15,6 +38,46 @@
</details>


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

- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().get()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().head()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().post()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().stagedQuotes().get()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().stagedQuotes().head()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().stagedQuotes().post()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quotes().get()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quotes().head()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quotes().post()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().orders().orderQuote().post()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().withKey().get()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().withKey().head()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().withKey().post()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().withKey().delete()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().withId().get()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().withId().head()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().withId().post()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().withId().delete()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().stagedQuotes().withKey().get()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().stagedQuotes().withKey().head()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().stagedQuotes().withKey().post()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().stagedQuotes().withKey().delete()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().stagedQuotes().withId().get()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().stagedQuotes().withId().head()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().stagedQuotes().withId().post()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().stagedQuotes().withId().delete()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quotes().withKey().get()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quotes().withKey().head()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quotes().withKey().post()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quotes().withKey().delete()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quotes().withId().get()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quotes().withId().head()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quotes().withId().post()`
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quotes().withId().delete()`
</details>


<details>
<summary>Removed QueryParameter(s)</summary>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4624,6 +4624,27 @@ type InStore implements CartDiscountQueryInterface & CartQueryInterface & Custom
"Queries with specified Product key"
productKey: String): ProductTailoring
productTailoringList(where: String, sort: [String!], limit: Int, offset: Int): ProductTailoringQueryResult!
quoteRequest(
"Queries with specified ID"
id: String,

"Queries with specified key"
key: String): QuoteRequest
quoteRequests(where: String, sort: [String!], limit: Int, offset: Int): QuoteRequestQueryResult!
stagedQuote(
"Queries with specified ID"
id: String,

"Queries with specified key"
key: String): StagedQuote
stagedQuotes(where: String, sort: [String!], limit: Int, offset: Int): StagedQuoteQueryResult!
quote(
"Queries with specified ID"
id: String,

"Queries with specified key"
key: String): Quote
quotes(where: String, sort: [String!], limit: Int, offset: Int): QuoteQueryResult!
}

type InStoreMe implements MeQueryInterface & CartQueryInterface & ActiveCartInterface & OrderQueryInterface & ShoppingListQueryInterface {
Expand Down Expand Up @@ -5867,6 +5888,9 @@ type Mutation {
storeKey: KeyReferenceInput): Order
createOrderFromQuote(draft: OrderQuoteCommand!,

"The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions."
storeKey: KeyReferenceInput,

"Create/modify entity as an associate in business-unit."
asAssociate: AsAssociateArgument): Order

Expand Down Expand Up @@ -6091,19 +6115,28 @@ type Mutation {
createQuoteRequest(draft: QuoteRequestDraft!,

"Create/modify entity as an associate in business-unit."
asAssociate: AsAssociateArgument): QuoteRequest
asAssociate: AsAssociateArgument,

"The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions."
storeKey: KeyReferenceInput): QuoteRequest
updateQuoteRequest(version: Long!,

"Create/modify entity as an associate in business-unit."
asAssociate: AsAssociateArgument, actions: [QuoteRequestUpdateAction!]!,

"The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions."
storeKey: KeyReferenceInput,

"Queries with specified ID"
id: String,

"Queries with specified key"
key: String): QuoteRequest
deleteQuoteRequest(version: Long!, personalDataErasure: Boolean = false,

"The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions."
storeKey: KeyReferenceInput,

"Queries with specified ID"
id: String,

Expand All @@ -6117,34 +6150,52 @@ type Mutation {

"Queries with specified key"
key: String): QuoteRequest
createStagedQuote(draft: StagedQuoteDraft!): StagedQuote
createStagedQuote(draft: StagedQuoteDraft!,

"The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions."
storeKey: KeyReferenceInput): StagedQuote
updateStagedQuote(version: Long!, actions: [StagedQuoteUpdateAction!]!,

"The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions."
storeKey: KeyReferenceInput,

"Queries with specified ID"
id: String,

"Queries with specified key"
key: String): StagedQuote
deleteStagedQuote(version: Long!, personalDataErasure: Boolean = false,

"The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions."
storeKey: KeyReferenceInput,

"Queries with specified ID"
id: String,

"Queries with specified key"
key: String): StagedQuote
createQuote(draft: QuoteDraft!): Quote
createQuote(draft: QuoteDraft!,

"The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions."
storeKey: KeyReferenceInput): Quote
updateQuote(version: Long!, actions: [QuoteUpdateAction!]!,

"Create/modify entity as an associate in business-unit."
asAssociate: AsAssociateArgument,

"The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions."
storeKey: KeyReferenceInput,

"Queries with specified ID"
id: String,

"Queries with specified key"
key: String): Quote
deleteQuote(version: Long!, personalDataErasure: Boolean = false,

"The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions."
storeKey: KeyReferenceInput,

"Queries with specified ID"
id: String,

Expand Down Expand Up @@ -13195,6 +13246,8 @@ type StagedQuote implements Versioned {
businessUnit: BusinessUnit
businessUnitRef: KeyReference
purchaseOrderNumber: String
storeRef: KeyReference
store: Store
id: String!
version: Long!
createdAt: DateTime!
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@

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>Creating an Order produces the OrderCreated Message.</p>
* <p>Specific Error Codes:</p>
* <ul>
* <li>OutOfStock</li>
* <li>PriceChanged</li>
* <li>InvalidItemShippingDetails</li>
* <li>InvalidOperation</li>
* <li>CountryNotConfiguredInStore</li>
* </ul>
*
* <hr>
* <div class=code-example>
* <pre><code class='java'>{@code
* CompletableFuture<ApiHttpResponse<com.commercetools.api.models.order.Order>> result = apiRoot
* .withProjectKey("{projectKey}")
* .inStoreKeyWithStoreKeyValue("{storeKey}")
* .orders()
* .orderQuote()
* .post(null)
* .execute()
* }</code></pre>
* </div>
*/
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public class ByProjectKeyInStoreKeyByStoreKeyOrdersQuotesPost extends
TypeBodyApiMethod<ByProjectKeyInStoreKeyByStoreKeyOrdersQuotesPost, com.commercetools.api.models.order.Order, com.commercetools.api.models.order.OrderFromQuoteDraft>
implements com.commercetools.api.client.ErrorableTrait<ByProjectKeyInStoreKeyByStoreKeyOrdersQuotesPost> {

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

private String projectKey;
private String storeKey;

private com.commercetools.api.models.order.OrderFromQuoteDraft orderFromQuoteDraft;

public ByProjectKeyInStoreKeyByStoreKeyOrdersQuotesPost(final ApiHttpClient apiHttpClient, String projectKey,
String storeKey, com.commercetools.api.models.order.OrderFromQuoteDraft orderFromQuoteDraft) {
super(apiHttpClient);
this.projectKey = projectKey;
this.storeKey = storeKey;
this.orderFromQuoteDraft = orderFromQuoteDraft;
}

public ByProjectKeyInStoreKeyByStoreKeyOrdersQuotesPost(ByProjectKeyInStoreKeyByStoreKeyOrdersQuotesPost t) {
super(t);
this.projectKey = t.projectKey;
this.storeKey = t.storeKey;
this.orderFromQuoteDraft = t.orderFromQuoteDraft;
}

@Override
protected ApiHttpRequest buildHttpRequest() {
List<String> params = new ArrayList<>(getQueryParamUriStrings());
String httpRequestPath = String.format("%s/in-store/key=%s/orders/quotes", this.projectKey, this.storeKey);
if (!params.isEmpty()) {
httpRequestPath += "?" + String.join("&", params);
}
return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(),
io.vrap.rmf.base.client.utils.json.JsonUtils
.executing(() -> apiHttpClient().getSerializerService().toJsonByteArray(orderFromQuoteDraft)));

}

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

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

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

public String getStoreKey() {
return this.storeKey;
}

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

public void setStoreKey(final String storeKey) {
this.storeKey = storeKey;
}

public com.commercetools.api.models.order.OrderFromQuoteDraft getBody() {
return orderFromQuoteDraft;
}

public ByProjectKeyInStoreKeyByStoreKeyOrdersQuotesPost withBody(
com.commercetools.api.models.order.OrderFromQuoteDraft orderFromQuoteDraft) {
ByProjectKeyInStoreKeyByStoreKeyOrdersQuotesPost t = copy();
t.orderFromQuoteDraft = orderFromQuoteDraft;
return t;
}

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

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

ByProjectKeyInStoreKeyByStoreKeyOrdersQuotesPost that = (ByProjectKeyInStoreKeyByStoreKeyOrdersQuotesPost) o;

return new EqualsBuilder().append(projectKey, that.projectKey)
.append(storeKey, that.storeKey)
.append(orderFromQuoteDraft, that.orderFromQuoteDraft)
.isEquals();
}

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

@Override
protected ByProjectKeyInStoreKeyByStoreKeyOrdersQuotesPost copy() {
return new ByProjectKeyInStoreKeyByStoreKeyOrdersQuotesPost(this);
}
}
Loading
Loading