Skip to content

Commit 43921c6

Browse files
committed
build(codegen): updating SDK
1 parent ee22837 commit 43921c6

File tree

74 files changed

+14802
-8
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+14802
-8
lines changed

changes.md

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

3+
<details>
4+
<summary>Added Property(s)</summary>
5+
6+
- added property `store` to type `StagedQuote`
7+
</details>
8+
9+
10+
<details>
11+
<summary>Added Resource(s)</summary>
12+
13+
- added resource `/{projectKey}/in-store/key={storeKey}/quote-requests`
14+
- added resource `/{projectKey}/in-store/key={storeKey}/staged-quotes`
15+
- added resource `/{projectKey}/in-store/key={storeKey}/quotes`
16+
- added resource `/{projectKey}/in-store/key={storeKey}/orders/quotes`
17+
- added resource `/{projectKey}/in-store/key={storeKey}/quote-requests/key={key}`
18+
- added resource `/{projectKey}/in-store/key={storeKey}/quote-requests/{ID}`
19+
- added resource `/{projectKey}/in-store/key={storeKey}/staged-quotes/key={key}`
20+
- added resource `/{projectKey}/in-store/key={storeKey}/staged-quotes/{ID}`
21+
- added resource `/{projectKey}/in-store/key={storeKey}/quotes/key={key}`
22+
- added resource `/{projectKey}/in-store/key={storeKey}/quotes/{ID}`
23+
</details>
24+
25+
326
<details>
427
<summary>Removed Enum(s)</summary>
528

@@ -15,6 +38,46 @@
1538
</details>
1639

1740

41+
<details>
42+
<summary>Added Method(s)</summary>
43+
44+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().get()`
45+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().head()`
46+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().post()`
47+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().stagedQuotes().get()`
48+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().stagedQuotes().head()`
49+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().stagedQuotes().post()`
50+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quotes().get()`
51+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quotes().head()`
52+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quotes().post()`
53+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().orders().orderQuote().post()`
54+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().withKey().get()`
55+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().withKey().head()`
56+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().withKey().post()`
57+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().withKey().delete()`
58+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().withId().get()`
59+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().withId().head()`
60+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().withId().post()`
61+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quoteRequests().withId().delete()`
62+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().stagedQuotes().withKey().get()`
63+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().stagedQuotes().withKey().head()`
64+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().stagedQuotes().withKey().post()`
65+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().stagedQuotes().withKey().delete()`
66+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().stagedQuotes().withId().get()`
67+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().stagedQuotes().withId().head()`
68+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().stagedQuotes().withId().post()`
69+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().stagedQuotes().withId().delete()`
70+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quotes().withKey().get()`
71+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quotes().withKey().head()`
72+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quotes().withKey().post()`
73+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quotes().withKey().delete()`
74+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quotes().withId().get()`
75+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quotes().withId().head()`
76+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quotes().withId().post()`
77+
- added method `apiRoot.withProjectKey().inStoreKeyWithStoreKeyValue().quotes().withId().delete()`
78+
</details>
79+
80+
1881
<details>
1982
<summary>Removed QueryParameter(s)</summary>
2083

commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls

Lines changed: 56 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4624,6 +4624,27 @@ type InStore implements CartDiscountQueryInterface & CartQueryInterface & Custom
46244624
"Queries with specified Product key"
46254625
productKey: String): ProductTailoring
46264626
productTailoringList(where: String, sort: [String!], limit: Int, offset: Int): ProductTailoringQueryResult!
4627+
quoteRequest(
4628+
"Queries with specified ID"
4629+
id: String,
4630+
4631+
"Queries with specified key"
4632+
key: String): QuoteRequest
4633+
quoteRequests(where: String, sort: [String!], limit: Int, offset: Int): QuoteRequestQueryResult!
4634+
stagedQuote(
4635+
"Queries with specified ID"
4636+
id: String,
4637+
4638+
"Queries with specified key"
4639+
key: String): StagedQuote
4640+
stagedQuotes(where: String, sort: [String!], limit: Int, offset: Int): StagedQuoteQueryResult!
4641+
quote(
4642+
"Queries with specified ID"
4643+
id: String,
4644+
4645+
"Queries with specified key"
4646+
key: String): Quote
4647+
quotes(where: String, sort: [String!], limit: Int, offset: Int): QuoteQueryResult!
46274648
}
46284649

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

5891+
"The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions."
5892+
storeKey: KeyReferenceInput,
5893+
58705894
"Create/modify entity as an associate in business-unit."
58715895
asAssociate: AsAssociateArgument): Order
58725896

@@ -6091,19 +6115,28 @@ type Mutation {
60916115
createQuoteRequest(draft: QuoteRequestDraft!,
60926116

60936117
"Create/modify entity as an associate in business-unit."
6094-
asAssociate: AsAssociateArgument): QuoteRequest
6118+
asAssociate: AsAssociateArgument,
6119+
6120+
"The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions."
6121+
storeKey: KeyReferenceInput): QuoteRequest
60956122
updateQuoteRequest(version: Long!,
60966123

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

6127+
"The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions."
6128+
storeKey: KeyReferenceInput,
6129+
61006130
"Queries with specified ID"
61016131
id: String,
61026132

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

6137+
"The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions."
6138+
storeKey: KeyReferenceInput,
6139+
61076140
"Queries with specified ID"
61086141
id: String,
61096142

@@ -6117,34 +6150,52 @@ type Mutation {
61176150

61186151
"Queries with specified key"
61196152
key: String): QuoteRequest
6120-
createStagedQuote(draft: StagedQuoteDraft!): StagedQuote
6153+
createStagedQuote(draft: StagedQuoteDraft!,
6154+
6155+
"The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions."
6156+
storeKey: KeyReferenceInput): StagedQuote
61216157
updateStagedQuote(version: Long!, actions: [StagedQuoteUpdateAction!]!,
61226158

6159+
"The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions."
6160+
storeKey: KeyReferenceInput,
6161+
61236162
"Queries with specified ID"
61246163
id: String,
61256164

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

6169+
"The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions."
6170+
storeKey: KeyReferenceInput,
6171+
61306172
"Queries with specified ID"
61316173
id: String,
61326174

61336175
"Queries with specified key"
61346176
key: String): StagedQuote
6135-
createQuote(draft: QuoteDraft!): Quote
6177+
createQuote(draft: QuoteDraft!,
6178+
6179+
"The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions."
6180+
storeKey: KeyReferenceInput): Quote
61366181
updateQuote(version: Long!, actions: [QuoteUpdateAction!]!,
61376182

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

6186+
"The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions."
6187+
storeKey: KeyReferenceInput,
6188+
61416189
"Queries with specified ID"
61426190
id: String,
61436191

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

6196+
"The mutation is only performed if the resource is part of the store. Can be used with store-specific OAuth permissions."
6197+
storeKey: KeyReferenceInput,
6198+
61486199
"Queries with specified ID"
61496200
id: String,
61506201

@@ -13195,6 +13246,8 @@ type StagedQuote implements Versioned {
1319513246
businessUnit: BusinessUnit
1319613247
businessUnitRef: KeyReference
1319713248
purchaseOrderNumber: String
13249+
storeRef: KeyReference
13250+
store: Store
1319813251
id: String!
1319913252
version: Long!
1320013253
createdAt: DateTime!
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
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>Creating an Order produces the OrderCreated Message.</p>
20+
* <p>Specific Error Codes:</p>
21+
* <ul>
22+
* <li>OutOfStock</li>
23+
* <li>PriceChanged</li>
24+
* <li>InvalidItemShippingDetails</li>
25+
* <li>InvalidOperation</li>
26+
* <li>CountryNotConfiguredInStore</li>
27+
* </ul>
28+
*
29+
* <hr>
30+
* <div class=code-example>
31+
* <pre><code class='java'>{@code
32+
* CompletableFuture<ApiHttpResponse<com.commercetools.api.models.order.Order>> result = apiRoot
33+
* .withProjectKey("{projectKey}")
34+
* .inStoreKeyWithStoreKeyValue("{storeKey}")
35+
* .orders()
36+
* .orderQuote()
37+
* .post(null)
38+
* .execute()
39+
* }</code></pre>
40+
* </div>
41+
*/
42+
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
43+
public class ByProjectKeyInStoreKeyByStoreKeyOrdersQuotesPost extends
44+
TypeBodyApiMethod<ByProjectKeyInStoreKeyByStoreKeyOrdersQuotesPost, com.commercetools.api.models.order.Order, com.commercetools.api.models.order.OrderFromQuoteDraft>
45+
implements com.commercetools.api.client.ErrorableTrait<ByProjectKeyInStoreKeyByStoreKeyOrdersQuotesPost> {
46+
47+
@Override
48+
public TypeReference<com.commercetools.api.models.order.Order> resultType() {
49+
return new TypeReference<com.commercetools.api.models.order.Order>() {
50+
};
51+
}
52+
53+
private String projectKey;
54+
private String storeKey;
55+
56+
private com.commercetools.api.models.order.OrderFromQuoteDraft orderFromQuoteDraft;
57+
58+
public ByProjectKeyInStoreKeyByStoreKeyOrdersQuotesPost(final ApiHttpClient apiHttpClient, String projectKey,
59+
String storeKey, com.commercetools.api.models.order.OrderFromQuoteDraft orderFromQuoteDraft) {
60+
super(apiHttpClient);
61+
this.projectKey = projectKey;
62+
this.storeKey = storeKey;
63+
this.orderFromQuoteDraft = orderFromQuoteDraft;
64+
}
65+
66+
public ByProjectKeyInStoreKeyByStoreKeyOrdersQuotesPost(ByProjectKeyInStoreKeyByStoreKeyOrdersQuotesPost t) {
67+
super(t);
68+
this.projectKey = t.projectKey;
69+
this.storeKey = t.storeKey;
70+
this.orderFromQuoteDraft = t.orderFromQuoteDraft;
71+
}
72+
73+
@Override
74+
protected ApiHttpRequest buildHttpRequest() {
75+
List<String> params = new ArrayList<>(getQueryParamUriStrings());
76+
String httpRequestPath = String.format("%s/in-store/key=%s/orders/quotes", this.projectKey, this.storeKey);
77+
if (!params.isEmpty()) {
78+
httpRequestPath += "?" + String.join("&", params);
79+
}
80+
return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(),
81+
io.vrap.rmf.base.client.utils.json.JsonUtils
82+
.executing(() -> apiHttpClient().getSerializerService().toJsonByteArray(orderFromQuoteDraft)));
83+
84+
}
85+
86+
@Override
87+
public ApiHttpResponse<com.commercetools.api.models.order.Order> executeBlocking(final ApiHttpClient client,
88+
final Duration timeout) {
89+
return executeBlocking(client, timeout, com.commercetools.api.models.order.Order.class);
90+
}
91+
92+
@Override
93+
public CompletableFuture<ApiHttpResponse<com.commercetools.api.models.order.Order>> execute(
94+
final ApiHttpClient client) {
95+
return execute(client, com.commercetools.api.models.order.Order.class);
96+
}
97+
98+
public String getProjectKey() {
99+
return this.projectKey;
100+
}
101+
102+
public String getStoreKey() {
103+
return this.storeKey;
104+
}
105+
106+
public void setProjectKey(final String projectKey) {
107+
this.projectKey = projectKey;
108+
}
109+
110+
public void setStoreKey(final String storeKey) {
111+
this.storeKey = storeKey;
112+
}
113+
114+
public com.commercetools.api.models.order.OrderFromQuoteDraft getBody() {
115+
return orderFromQuoteDraft;
116+
}
117+
118+
public ByProjectKeyInStoreKeyByStoreKeyOrdersQuotesPost withBody(
119+
com.commercetools.api.models.order.OrderFromQuoteDraft orderFromQuoteDraft) {
120+
ByProjectKeyInStoreKeyByStoreKeyOrdersQuotesPost t = copy();
121+
t.orderFromQuoteDraft = orderFromQuoteDraft;
122+
return t;
123+
}
124+
125+
@Override
126+
public boolean equals(Object o) {
127+
if (this == o)
128+
return true;
129+
130+
if (o == null || getClass() != o.getClass())
131+
return false;
132+
133+
ByProjectKeyInStoreKeyByStoreKeyOrdersQuotesPost that = (ByProjectKeyInStoreKeyByStoreKeyOrdersQuotesPost) o;
134+
135+
return new EqualsBuilder().append(projectKey, that.projectKey)
136+
.append(storeKey, that.storeKey)
137+
.append(orderFromQuoteDraft, that.orderFromQuoteDraft)
138+
.isEquals();
139+
}
140+
141+
@Override
142+
public int hashCode() {
143+
return new HashCodeBuilder(17, 37).append(projectKey).append(storeKey).append(orderFromQuoteDraft).toHashCode();
144+
}
145+
146+
@Override
147+
protected ByProjectKeyInStoreKeyByStoreKeyOrdersQuotesPost copy() {
148+
return new ByProjectKeyInStoreKeyByStoreKeyOrdersQuotesPost(this);
149+
}
150+
}

0 commit comments

Comments
 (0)