Skip to content

Commit f310940

Browse files
author
Auto Mation
committed
TASK: Updating SDK
1 parent c1e3f7d commit f310940

File tree

6 files changed

+99
-8
lines changed

6 files changed

+99
-8
lines changed

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/Price.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ public interface Price extends com.commercetools.api.models.Customizable<Price>
4242
@JsonProperty("id")
4343
public String getId();
4444

45+
/**
46+
* <p>User-defined identifier of the Price. It is unique per ProductVariant.</p>
47+
*/
48+
49+
@JsonProperty("key")
50+
public String getKey();
51+
4552
/**
4653
* <p>Money value of this Price.</p>
4754
*/
@@ -108,6 +115,8 @@ public interface Price extends com.commercetools.api.models.Customizable<Price>
108115

109116
public void setId(final String id);
110117

118+
public void setKey(final String key);
119+
111120
public void setValue(final TypedMoney value);
112121

113122
public void setCountry(final String country);
@@ -136,6 +145,7 @@ public static Price of() {
136145
public static Price of(final Price template) {
137146
PriceImpl instance = new PriceImpl();
138147
instance.setId(template.getId());
148+
instance.setKey(template.getKey());
139149
instance.setValue(template.getValue());
140150
instance.setCountry(template.getCountry());
141151
instance.setCustomerGroup(template.getCustomerGroup());

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/PriceBuilder.java

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ public class PriceBuilder implements Builder<Price> {
2727

2828
private String id;
2929

30+
@Nullable
31+
private String key;
32+
3033
private com.commercetools.api.models.common.TypedMoney value;
3134

3235
@Nullable
@@ -62,6 +65,15 @@ public PriceBuilder id(final String id) {
6265
return this;
6366
}
6467

68+
/**
69+
* <p>User-defined identifier of the Price. It is unique per ProductVariant.</p>
70+
*/
71+
72+
public PriceBuilder key(@Nullable final String key) {
73+
this.key = key;
74+
return this;
75+
}
76+
6577
/**
6678
* <p>Money value of this Price.</p>
6779
*/
@@ -245,6 +257,11 @@ public String getId() {
245257
return this.id;
246258
}
247259

260+
@Nullable
261+
public String getKey() {
262+
return this.key;
263+
}
264+
248265
public com.commercetools.api.models.common.TypedMoney getValue() {
249266
return this.value;
250267
}
@@ -292,15 +309,15 @@ public com.commercetools.api.models.type.CustomFields getCustom() {
292309
public Price build() {
293310
Objects.requireNonNull(id, Price.class + ": id is missing");
294311
Objects.requireNonNull(value, Price.class + ": value is missing");
295-
return new PriceImpl(id, value, country, customerGroup, channel, validFrom, validUntil, discounted, tiers,
312+
return new PriceImpl(id, key, value, country, customerGroup, channel, validFrom, validUntil, discounted, tiers,
296313
custom);
297314
}
298315

299316
/**
300317
* builds Price without checking for non null required values
301318
*/
302319
public Price buildUnchecked() {
303-
return new PriceImpl(id, value, country, customerGroup, channel, validFrom, validUntil, discounted, tiers,
320+
return new PriceImpl(id, key, value, country, customerGroup, channel, validFrom, validUntil, discounted, tiers,
304321
custom);
305322
}
306323

@@ -311,6 +328,7 @@ public static PriceBuilder of() {
311328
public static PriceBuilder of(final Price template) {
312329
PriceBuilder builder = new PriceBuilder();
313330
builder.id = template.getId();
331+
builder.key = template.getKey();
314332
builder.value = template.getValue();
315333
builder.country = template.getCountry();
316334
builder.customerGroup = template.getCustomerGroup();

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/PriceDraft.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@
3434
@JsonDeserialize(as = PriceDraftImpl.class)
3535
public interface PriceDraft extends com.commercetools.api.models.CustomizableDraft<PriceDraft> {
3636

37+
/**
38+
* <p>User-defined identifier for the Price. It must be unique per ProductVariant.</p>
39+
*/
40+
41+
@JsonProperty("key")
42+
public String getKey();
43+
3744
/**
3845
* <p>Money value of this Price.</p>
3946
*/
@@ -104,6 +111,8 @@ public interface PriceDraft extends com.commercetools.api.models.CustomizableDra
104111
@JsonProperty("custom")
105112
public CustomFieldsDraft getCustom();
106113

114+
public void setKey(final String key);
115+
107116
public void setValue(final Money value);
108117

109118
public void setCountry(final String country);
@@ -131,6 +140,7 @@ public static PriceDraft of() {
131140

132141
public static PriceDraft of(final PriceDraft template) {
133142
PriceDraftImpl instance = new PriceDraftImpl();
143+
instance.setKey(template.getKey());
134144
instance.setValue(template.getValue());
135145
instance.setCountry(template.getCountry());
136146
instance.setCustomerGroup(template.getCustomerGroup());

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/PriceDraftBuilder.java

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
2525
public class PriceDraftBuilder implements Builder<PriceDraft> {
2626

27+
@Nullable
28+
private String key;
29+
2730
private com.commercetools.api.models.common.Money value;
2831

2932
@Nullable
@@ -50,6 +53,15 @@ public class PriceDraftBuilder implements Builder<PriceDraft> {
5053
@Nullable
5154
private com.commercetools.api.models.type.CustomFieldsDraft custom;
5255

56+
/**
57+
* <p>User-defined identifier for the Price. It must be unique per ProductVariant.</p>
58+
*/
59+
60+
public PriceDraftBuilder key(@Nullable final String key) {
61+
this.key = key;
62+
return this;
63+
}
64+
5365
/**
5466
* <p>Money value of this Price.</p>
5567
*/
@@ -245,6 +257,11 @@ public PriceDraftBuilder custom(@Nullable final com.commercetools.api.models.typ
245257
return this;
246258
}
247259

260+
@Nullable
261+
public String getKey() {
262+
return this.key;
263+
}
264+
248265
public com.commercetools.api.models.common.Money getValue() {
249266
return this.value;
250267
}
@@ -291,15 +308,15 @@ public com.commercetools.api.models.type.CustomFieldsDraft getCustom() {
291308

292309
public PriceDraft build() {
293310
Objects.requireNonNull(value, PriceDraft.class + ": value is missing");
294-
return new PriceDraftImpl(value, country, customerGroup, channel, validFrom, validUntil, discounted, tiers,
311+
return new PriceDraftImpl(key, value, country, customerGroup, channel, validFrom, validUntil, discounted, tiers,
295312
custom);
296313
}
297314

298315
/**
299316
* builds PriceDraft without checking for non null required values
300317
*/
301318
public PriceDraft buildUnchecked() {
302-
return new PriceDraftImpl(value, country, customerGroup, channel, validFrom, validUntil, discounted, tiers,
319+
return new PriceDraftImpl(key, value, country, customerGroup, channel, validFrom, validUntil, discounted, tiers,
303320
custom);
304321
}
305322

@@ -309,6 +326,7 @@ public static PriceDraftBuilder of() {
309326

310327
public static PriceDraftBuilder of(final PriceDraft template) {
311328
PriceDraftBuilder builder = new PriceDraftBuilder();
329+
builder.key = template.getKey();
312330
builder.value = template.getValue();
313331
builder.country = template.getCountry();
314332
builder.customerGroup = template.getCustomerGroup();

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/PriceDraftImpl.java

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
2121
public class PriceDraftImpl implements PriceDraft, ModelBase {
2222

23+
private String key;
24+
2325
private com.commercetools.api.models.common.Money value;
2426

2527
private String country;
@@ -39,7 +41,8 @@ public class PriceDraftImpl implements PriceDraft, ModelBase {
3941
private com.commercetools.api.models.type.CustomFieldsDraft custom;
4042

4143
@JsonCreator
42-
PriceDraftImpl(@JsonProperty("value") final com.commercetools.api.models.common.Money value,
44+
PriceDraftImpl(@JsonProperty("key") final String key,
45+
@JsonProperty("value") final com.commercetools.api.models.common.Money value,
4346
@JsonProperty("country") final String country,
4447
@JsonProperty("customerGroup") final com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier customerGroup,
4548
@JsonProperty("channel") final com.commercetools.api.models.channel.ChannelResourceIdentifier channel,
@@ -48,6 +51,7 @@ public class PriceDraftImpl implements PriceDraft, ModelBase {
4851
@JsonProperty("discounted") final com.commercetools.api.models.common.DiscountedPriceDraft discounted,
4952
@JsonProperty("tiers") final java.util.List<com.commercetools.api.models.common.PriceTierDraft> tiers,
5053
@JsonProperty("custom") final com.commercetools.api.models.type.CustomFieldsDraft custom) {
54+
this.key = key;
5155
this.value = value;
5256
this.country = country;
5357
this.customerGroup = customerGroup;
@@ -62,6 +66,14 @@ public class PriceDraftImpl implements PriceDraft, ModelBase {
6266
public PriceDraftImpl() {
6367
}
6468

69+
/**
70+
* <p>User-defined identifier for the Price. It must be unique per ProductVariant.</p>
71+
*/
72+
73+
public String getKey() {
74+
return this.key;
75+
}
76+
6577
/**
6678
* <p>Money value of this Price.</p>
6779
*/
@@ -140,6 +152,10 @@ public com.commercetools.api.models.type.CustomFieldsDraft getCustom() {
140152
return this.custom;
141153
}
142154

155+
public void setKey(final String key) {
156+
this.key = key;
157+
}
158+
143159
public void setValue(final com.commercetools.api.models.common.Money value) {
144160
this.value = value;
145161
}
@@ -191,7 +207,8 @@ public boolean equals(Object o) {
191207

192208
PriceDraftImpl that = (PriceDraftImpl) o;
193209

194-
return new EqualsBuilder().append(value, that.value)
210+
return new EqualsBuilder().append(key, that.key)
211+
.append(value, that.value)
195212
.append(country, that.country)
196213
.append(customerGroup, that.customerGroup)
197214
.append(channel, that.channel)
@@ -205,7 +222,8 @@ public boolean equals(Object o) {
205222

206223
@Override
207224
public int hashCode() {
208-
return new HashCodeBuilder(17, 37).append(value)
225+
return new HashCodeBuilder(17, 37).append(key)
226+
.append(value)
209227
.append(country)
210228
.append(customerGroup)
211229
.append(channel)

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/common/PriceImpl.java

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ public class PriceImpl implements Price, ModelBase {
2222

2323
private String id;
2424

25+
private String key;
26+
2527
private com.commercetools.api.models.common.TypedMoney value;
2628

2729
private String country;
@@ -41,7 +43,7 @@ public class PriceImpl implements Price, ModelBase {
4143
private com.commercetools.api.models.type.CustomFields custom;
4244

4345
@JsonCreator
44-
PriceImpl(@JsonProperty("id") final String id,
46+
PriceImpl(@JsonProperty("id") final String id, @JsonProperty("key") final String key,
4547
@JsonProperty("value") final com.commercetools.api.models.common.TypedMoney value,
4648
@JsonProperty("country") final String country,
4749
@JsonProperty("customerGroup") final com.commercetools.api.models.customer_group.CustomerGroupReference customerGroup,
@@ -52,6 +54,7 @@ public class PriceImpl implements Price, ModelBase {
5254
@JsonProperty("tiers") final java.util.List<com.commercetools.api.models.common.PriceTier> tiers,
5355
@JsonProperty("custom") final com.commercetools.api.models.type.CustomFields custom) {
5456
this.id = id;
57+
this.key = key;
5558
this.value = value;
5659
this.country = country;
5760
this.customerGroup = customerGroup;
@@ -74,6 +77,14 @@ public String getId() {
7477
return this.id;
7578
}
7679

80+
/**
81+
* <p>User-defined identifier of the Price. It is unique per ProductVariant.</p>
82+
*/
83+
84+
public String getKey() {
85+
return this.key;
86+
}
87+
7788
/**
7889
* <p>Money value of this Price.</p>
7990
*/
@@ -150,6 +161,10 @@ public void setId(final String id) {
150161
this.id = id;
151162
}
152163

164+
public void setKey(final String key) {
165+
this.key = key;
166+
}
167+
153168
public void setValue(final com.commercetools.api.models.common.TypedMoney value) {
154169
this.value = value;
155170
}
@@ -202,6 +217,7 @@ public boolean equals(Object o) {
202217
PriceImpl that = (PriceImpl) o;
203218

204219
return new EqualsBuilder().append(id, that.id)
220+
.append(key, that.key)
205221
.append(value, that.value)
206222
.append(country, that.country)
207223
.append(customerGroup, that.customerGroup)
@@ -217,6 +233,7 @@ public boolean equals(Object o) {
217233
@Override
218234
public int hashCode() {
219235
return new HashCodeBuilder(17, 37).append(id)
236+
.append(key)
220237
.append(value)
221238
.append(country)
222239
.append(customerGroup)

0 commit comments

Comments
 (0)