Skip to content

Commit 4959962

Browse files
committed
build(codegen): updating SDK
1 parent 6deebce commit 4959962

File tree

38 files changed

+2149
-11
lines changed

38 files changed

+2149
-11
lines changed

changes.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@
44
<summary>Added Type(s)</summary>
55

66
- added type `RecurringOrderDeletedMessage`
7+
- added type `RecurringOrderExpiresAtSetMessage`
78
- added type `RecurringOrderDeletedMessagePayload`
9+
- added type `RecurringOrderExpiresAtSetMessagePayload`
810
- added type `ProductSearchFacetResultStats`
911
- added type `ProductSearchFacetStatsExpression`
1012
- added type `ProductSearchFacetStatsValue`
13+
- added type `RecurringOrderSetExpiresAtAction`
1114
</details>
1215

1316

@@ -25,6 +28,13 @@
2528
- added method `apiRoot.withProjectKey().recurringOrders().withKey().delete()`
2629
</details>
2730

31+
32+
<details>
33+
<summary>Added Property(s)</summary>
34+
35+
- added property `expiresAt` to type `RecurringOrderDraft`
36+
</details>
37+
2838
**History changes**
2939

3040
<details>

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10872,6 +10872,12 @@ input RecurringOrderExpiredInput {
1087210872
dummy: String
1087310873
}
1087410874

10875+
type RecurringOrderExpiresAtSet implements MessagePayload {
10876+
newExpiresAt: DateTime
10877+
oldExpiresAt: DateTime
10878+
type: String!
10879+
}
10880+
1087510881
type RecurringOrderKeySet implements MessagePayload {
1087610882
key: String
1087710883
oldKey: String
@@ -10935,6 +10941,7 @@ type RecurringOrderStateTransition implements MessagePayload {
1093510941
}
1093610942

1093710943
input RecurringOrderUpdateAction {
10944+
setExpiresAt: SetRecurringOrderExpiresAt
1093810945
setKey: SetRecurringOrderKey
1093910946
setOrderSkipConfiguration: SetRecurringOrderOrderSkipConfiguration
1094010947
setCustomField: SetRecurringOrderCustomField
@@ -13430,6 +13437,10 @@ input SetRecurringOrderCustomType {
1343013437
typeId: String
1343113438
}
1343213439

13440+
input SetRecurringOrderExpiresAt {
13441+
expiresAt: DateTime
13442+
}
13443+
1343313444
input SetRecurringOrderKey {
1343413445
key: String
1343513446
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
import org.apache.commons.lang3.builder.HashCodeBuilder;
2121

2222
/**
23-
* <p>Creates a Recurring Order in the Project. The Cart is validated to ensure that it is convertible to an Order. If validation fails, an error is returned.</p>
24-
* <p>Produces the RecurringOrderCreated message.</p>
23+
* <p>Creates a Recurring Order in the Project. Produces the RecurringOrderCreated message.</p>
24+
* <p>The Cart is validated to ensure that it is convertible to an Order. If the validation fails, an error is returned. If the expiration date has been reached when the Recurring Order is processed, its RecurringOrderState will be updated to <code>Expired</code>, and no Order will be created.</p>
2525
* <p>If a server-side problem occurs, indicated by a 500 Internal Server Error HTTP response, the Recurring Order creation may still successfully complete after the error is returned. If you receive this error, you should verify the status of the Recurring Order by querying a unique identifier supplied during the creation request, such as the key.</p>
2626
*
2727
* <hr>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
import org.apache.commons.lang3.builder.HashCodeBuilder;
2222

2323
/**
24-
* <p>Creates a Recurring Order in the Project. The Cart is validated to ensure that it is convertible to an Order. If validation fails, an error is returned.</p>
25-
* <p>Produces the RecurringOrderCreated message.</p>
24+
* <p>Creates a Recurring Order in the Project. Produces the RecurringOrderCreated message.</p>
25+
* <p>The Cart is validated to ensure that it is convertible to an Order. If the validation fails, an error is returned. If the expiration date has been reached when the Recurring Order is processed, its RecurringOrderState will be updated to <code>Expired</code>, and no Order will be created.</p>
2626
* <p>If a server-side problem occurs, indicated by a 500 Internal Server Error HTTP response, the Recurring Order creation may still successfully complete after the error is returned. If you receive this error, you should verify the status of the Recurring Order by querying a unique identifier supplied during the creation request, such as the key.</p>
2727
*
2828
* <hr>

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/Message.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2253,6 +2253,14 @@ public static com.commercetools.api.models.message.RecurringOrderDeletedMessageB
22532253
return com.commercetools.api.models.message.RecurringOrderDeletedMessageBuilder.of();
22542254
}
22552255

2256+
/**
2257+
* builder for recurringOrderExpiresAtSet subtype
2258+
* @return builder
2259+
*/
2260+
public static com.commercetools.api.models.message.RecurringOrderExpiresAtSetMessageBuilder recurringOrderExpiresAtSetBuilder() {
2261+
return com.commercetools.api.models.message.RecurringOrderExpiresAtSetMessageBuilder.of();
2262+
}
2263+
22562264
/**
22572265
* builder for recurringOrderKeySet subtype
22582266
* @return builder

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessageBuilder.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,6 +1019,10 @@ public com.commercetools.api.models.message.RecurringOrderDeletedMessageBuilder
10191019
return com.commercetools.api.models.message.RecurringOrderDeletedMessageBuilder.of();
10201020
}
10211021

1022+
public com.commercetools.api.models.message.RecurringOrderExpiresAtSetMessageBuilder recurringOrderExpiresAtSetBuilder() {
1023+
return com.commercetools.api.models.message.RecurringOrderExpiresAtSetMessageBuilder.of();
1024+
}
1025+
10221026
public com.commercetools.api.models.message.RecurringOrderKeySetMessageBuilder recurringOrderKeySetBuilder() {
10231027
return com.commercetools.api.models.message.RecurringOrderKeySetMessageBuilder.of();
10241028
}

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayload.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2077,6 +2077,14 @@ public static com.commercetools.api.models.message.RecurringOrderDeletedMessageP
20772077
return com.commercetools.api.models.message.RecurringOrderDeletedMessagePayloadBuilder.of();
20782078
}
20792079

2080+
/**
2081+
* builder for recurringOrderExpiresAtSet subtype
2082+
* @return builder
2083+
*/
2084+
public static com.commercetools.api.models.message.RecurringOrderExpiresAtSetMessagePayloadBuilder recurringOrderExpiresAtSetBuilder() {
2085+
return com.commercetools.api.models.message.RecurringOrderExpiresAtSetMessagePayloadBuilder.of();
2086+
}
2087+
20802088
/**
20812089
* builder for recurringOrderKeySet subtype
20822090
* @return builder

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/MessagePayloadBuilder.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,6 +1019,10 @@ public com.commercetools.api.models.message.RecurringOrderDeletedMessagePayloadB
10191019
return com.commercetools.api.models.message.RecurringOrderDeletedMessagePayloadBuilder.of();
10201020
}
10211021

1022+
public com.commercetools.api.models.message.RecurringOrderExpiresAtSetMessagePayloadBuilder recurringOrderExpiresAtSetBuilder() {
1023+
return com.commercetools.api.models.message.RecurringOrderExpiresAtSetMessagePayloadBuilder.of();
1024+
}
1025+
10221026
public com.commercetools.api.models.message.RecurringOrderKeySetMessagePayloadBuilder recurringOrderKeySetBuilder() {
10231027
return com.commercetools.api.models.message.RecurringOrderKeySetMessagePayloadBuilder.of();
10241028
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
2+
package com.commercetools.api.models.message;
3+
4+
import java.time.*;
5+
import java.time.ZonedDateTime;
6+
import java.util.*;
7+
import java.util.function.Function;
8+
9+
import javax.annotation.Nullable;
10+
11+
import com.fasterxml.jackson.annotation.*;
12+
import com.fasterxml.jackson.databind.annotation.*;
13+
14+
import io.vrap.rmf.base.client.utils.Generated;
15+
16+
import jakarta.validation.constraints.NotNull;
17+
18+
/**
19+
* <p>Generated after a successful Set Expires At update action.</p>
20+
*
21+
* <hr>
22+
* Example to create an instance using the builder pattern
23+
* <div class=code-example>
24+
* <pre><code class='java'>
25+
* RecurringOrderExpiresAtSetMessage recurringOrderExpiresAtSetMessage = RecurringOrderExpiresAtSetMessage.builder()
26+
* .id("{id}")
27+
* .version(0.3)
28+
* .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
29+
* .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
30+
* .sequenceNumber(0.3)
31+
* .resource(resourceBuilder -> resourceBuilder)
32+
* .resourceVersion(0.3)
33+
* .newExpiresAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
34+
* .oldExpiresAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
35+
* .build()
36+
* </code></pre>
37+
* </div>
38+
*/
39+
@io.vrap.rmf.base.client.utils.json.SubType("RecurringOrderExpiresAtSet")
40+
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
41+
@JsonDeserialize(as = RecurringOrderExpiresAtSetMessageImpl.class)
42+
public interface RecurringOrderExpiresAtSetMessage extends Message {
43+
44+
/**
45+
* discriminator value for RecurringOrderExpiresAtSetMessage
46+
*/
47+
String RECURRING_ORDER_EXPIRES_AT_SET = "RecurringOrderExpiresAtSet";
48+
49+
/**
50+
* <p>Expiration date and time of the Recurring Order after the Set Expires At update action.</p>
51+
* @return newExpiresAt
52+
*/
53+
@NotNull
54+
@JsonProperty("newExpiresAt")
55+
public ZonedDateTime getNewExpiresAt();
56+
57+
/**
58+
* <p>Expiration date and time of the Recurring Order before the Set Expires At update action.</p>
59+
* @return oldExpiresAt
60+
*/
61+
@NotNull
62+
@JsonProperty("oldExpiresAt")
63+
public ZonedDateTime getOldExpiresAt();
64+
65+
/**
66+
* <p>Expiration date and time of the Recurring Order after the Set Expires At update action.</p>
67+
* @param newExpiresAt value to be set
68+
*/
69+
70+
public void setNewExpiresAt(final ZonedDateTime newExpiresAt);
71+
72+
/**
73+
* <p>Expiration date and time of the Recurring Order before the Set Expires At update action.</p>
74+
* @param oldExpiresAt value to be set
75+
*/
76+
77+
public void setOldExpiresAt(final ZonedDateTime oldExpiresAt);
78+
79+
/**
80+
* factory method
81+
* @return instance of RecurringOrderExpiresAtSetMessage
82+
*/
83+
public static RecurringOrderExpiresAtSetMessage of() {
84+
return new RecurringOrderExpiresAtSetMessageImpl();
85+
}
86+
87+
/**
88+
* factory method to create a shallow copy RecurringOrderExpiresAtSetMessage
89+
* @param template instance to be copied
90+
* @return copy instance
91+
*/
92+
public static RecurringOrderExpiresAtSetMessage of(final RecurringOrderExpiresAtSetMessage template) {
93+
RecurringOrderExpiresAtSetMessageImpl instance = new RecurringOrderExpiresAtSetMessageImpl();
94+
instance.setId(template.getId());
95+
instance.setVersion(template.getVersion());
96+
instance.setCreatedAt(template.getCreatedAt());
97+
instance.setLastModifiedAt(template.getLastModifiedAt());
98+
instance.setLastModifiedBy(template.getLastModifiedBy());
99+
instance.setCreatedBy(template.getCreatedBy());
100+
instance.setSequenceNumber(template.getSequenceNumber());
101+
instance.setResource(template.getResource());
102+
instance.setResourceVersion(template.getResourceVersion());
103+
instance.setResourceUserProvidedIdentifiers(template.getResourceUserProvidedIdentifiers());
104+
instance.setNewExpiresAt(template.getNewExpiresAt());
105+
instance.setOldExpiresAt(template.getOldExpiresAt());
106+
return instance;
107+
}
108+
109+
public RecurringOrderExpiresAtSetMessage copyDeep();
110+
111+
/**
112+
* factory method to create a deep copy of RecurringOrderExpiresAtSetMessage
113+
* @param template instance to be copied
114+
* @return copy instance
115+
*/
116+
@Nullable
117+
public static RecurringOrderExpiresAtSetMessage deepCopy(
118+
@Nullable final RecurringOrderExpiresAtSetMessage template) {
119+
if (template == null) {
120+
return null;
121+
}
122+
RecurringOrderExpiresAtSetMessageImpl instance = new RecurringOrderExpiresAtSetMessageImpl();
123+
instance.setId(template.getId());
124+
instance.setVersion(template.getVersion());
125+
instance.setCreatedAt(template.getCreatedAt());
126+
instance.setLastModifiedAt(template.getLastModifiedAt());
127+
instance.setLastModifiedBy(
128+
com.commercetools.api.models.common.LastModifiedBy.deepCopy(template.getLastModifiedBy()));
129+
instance.setCreatedBy(com.commercetools.api.models.common.CreatedBy.deepCopy(template.getCreatedBy()));
130+
instance.setSequenceNumber(template.getSequenceNumber());
131+
instance.setResource(com.commercetools.api.models.common.Reference.deepCopy(template.getResource()));
132+
instance.setResourceVersion(template.getResourceVersion());
133+
instance.setResourceUserProvidedIdentifiers(com.commercetools.api.models.message.UserProvidedIdentifiers
134+
.deepCopy(template.getResourceUserProvidedIdentifiers()));
135+
instance.setNewExpiresAt(template.getNewExpiresAt());
136+
instance.setOldExpiresAt(template.getOldExpiresAt());
137+
return instance;
138+
}
139+
140+
/**
141+
* builder factory method for RecurringOrderExpiresAtSetMessage
142+
* @return builder
143+
*/
144+
public static RecurringOrderExpiresAtSetMessageBuilder builder() {
145+
return RecurringOrderExpiresAtSetMessageBuilder.of();
146+
}
147+
148+
/**
149+
* create builder for RecurringOrderExpiresAtSetMessage instance
150+
* @param template instance with prefilled values for the builder
151+
* @return builder
152+
*/
153+
public static RecurringOrderExpiresAtSetMessageBuilder builder(final RecurringOrderExpiresAtSetMessage template) {
154+
return RecurringOrderExpiresAtSetMessageBuilder.of(template);
155+
}
156+
157+
/**
158+
* accessor map function
159+
* @param <T> mapped type
160+
* @param helper function to map the object
161+
* @return mapped value
162+
*/
163+
default <T> T withRecurringOrderExpiresAtSetMessage(Function<RecurringOrderExpiresAtSetMessage, T> helper) {
164+
return helper.apply(this);
165+
}
166+
167+
/**
168+
* gives a TypeReference for usage with Jackson DataBind
169+
* @return TypeReference
170+
*/
171+
public static com.fasterxml.jackson.core.type.TypeReference<RecurringOrderExpiresAtSetMessage> typeReference() {
172+
return new com.fasterxml.jackson.core.type.TypeReference<RecurringOrderExpiresAtSetMessage>() {
173+
@Override
174+
public String toString() {
175+
return "TypeReference<RecurringOrderExpiresAtSetMessage>";
176+
}
177+
};
178+
}
179+
}

0 commit comments

Comments
 (0)