Skip to content

Commit 54fba54

Browse files
Merge pull request #781 from commercetools/gen-sdk-updates
Update generated SDKs
2 parents 50460ca + 43361a2 commit 54fba54

18 files changed

+346
-22
lines changed

changes.md

+3
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@
4646

4747
- added property `applicationMode` to type `CartDiscountValueFixed`
4848
- added property `applicationMode` to type `CartDiscountValueFixedDraft`
49+
- added property `custom` to type `CartSetCustomShippingMethodAction`
50+
- added property `custom` to type `StagedOrderSetCustomShippingMethodAction`
51+
- added property `custom` to type `StagedOrderSetShippingAddressAndCustomShippingMethodAction`
4952
</details>
5053

5154
**History changes**

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

+5-8
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,6 @@ input AddProductVariantTailoring {
352352
id: Int
353353
sku: String
354354
images: [ImageInput!] = []
355-
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
356355
attributes: [ProductAttributeInput!] = []
357356
assets: [AssetDraftInput!] = []
358357
staged: Boolean = true
@@ -8749,10 +8748,7 @@ input ProductTailoringUpdateAction {
87498748
setAssetTags: SetProductTailoringAssetTags
87508749
setImages: SetProductTailoringImages
87518750
setDescription: SetProductTailoringDescription
8752-
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
87538751
setAttribute: SetProductTailoringAttribute
8754-
8755-
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
87568752
setAttributeInAllVariants: SetProductTailoringAttributeInAllVariants
87578753
setImageLabel: SetProductTailoringImageLabel
87588754
setMetaAttributes: SetProductTailoringMetaAttributes
@@ -9024,7 +9020,6 @@ type ProductVariantTailoring {
90249020
id: Int!
90259021
images: [Image!]!
90269022
assets: [Asset!]!
9027-
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
90289023
attributesRaw: [RawProductAttribute!]!
90299024
}
90309025

@@ -9041,7 +9036,6 @@ input ProductVariantTailoringInput {
90419036
id: Int
90429037
sku: String
90439038
images: [ImageInput!] = []
9044-
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
90459039
attributes: [ProductAttributeInput!] = []
90469040
assets: [AssetDraftInput!] = []
90479041
}
@@ -10804,6 +10798,7 @@ input SetCartCustomShippingMethod {
1080410798
shippingRate: ShippingRateDraft!
1080510799
taxCategory: ResourceIdentifierInput
1080610800
externalTaxRate: ExternalTaxRateDraft
10801+
custom: CustomFieldsDraft
1080710802
}
1080810803

1080910804
input SetCartCustomType {
@@ -11993,7 +11988,6 @@ input SetProductTailoringAssetTags {
1199311988
assetId: String
1199411989
}
1199511990

11996-
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
1199711991
input SetProductTailoringAttribute {
1199811992
variantId: Int
1199911993
sku: String
@@ -12002,7 +11996,6 @@ input SetProductTailoringAttribute {
1200211996
staged: Boolean = true
1200311997
}
1200411998

12005-
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
1200611999
input SetProductTailoringAttributeInAllVariants {
1200712000
name: String!
1200812001
value: String
@@ -12399,6 +12392,7 @@ input SetStagedOrderCustomShippingMethod {
1239912392
shippingRate: ShippingRateDraft!
1240012393
taxCategory: ResourceIdentifierInput
1240112394
externalTaxRate: ExternalTaxRateDraft
12395+
custom: CustomFieldsDraft
1240212396
}
1240312397

1240412398
type SetStagedOrderCustomShippingMethodOutput implements StagedOrderUpdateActionOutput {
@@ -12407,6 +12401,7 @@ type SetStagedOrderCustomShippingMethodOutput implements StagedOrderUpdateAction
1240712401
shippingRate: ShippingRate!
1240812402
taxCategoryResId: ResourceIdentifier
1240912403
externalTaxRate: ExternalTaxRateDraftOutput
12404+
custom: CustomFieldsCommand
1241012405
}
1241112406

1241212407
input SetStagedOrderCustomType {
@@ -12869,6 +12864,7 @@ input SetStagedOrderShippingAddressAndCustomShippingMethod {
1286912864
shippingRate: ShippingRateDraft!
1287012865
taxCategory: ResourceIdentifierInput
1287112866
externalTaxRate: ExternalTaxRateDraft
12867+
custom: CustomFieldsDraft
1287212868
}
1287312869

1287412870
type SetStagedOrderShippingAddressAndCustomShippingMethodOutput implements StagedOrderUpdateActionOutput {
@@ -12878,6 +12874,7 @@ type SetStagedOrderShippingAddressAndCustomShippingMethodOutput implements Stage
1287812874
shippingRate: ShippingRate!
1287912875
taxCategoryResId: ResourceIdentifier
1288012876
externalTaxRate: ExternalTaxRateDraftOutput
12877+
custom: CustomFieldsCommand
1288112878
}
1288212879

1288312880
input SetStagedOrderShippingAddressAndShippingMethod {

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetCustomShippingMethodAction.java

+18
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import com.commercetools.api.models.shipping_method.ShippingRateDraft;
1111
import com.commercetools.api.models.tax_category.TaxCategoryResourceIdentifier;
12+
import com.commercetools.api.models.type.CustomFieldsDraft;
1213
import com.fasterxml.jackson.annotation.*;
1314
import com.fasterxml.jackson.databind.annotation.*;
1415

@@ -74,6 +75,14 @@ public interface CartSetCustomShippingMethodAction extends CartUpdateAction {
7475
@JsonProperty("externalTaxRate")
7576
public ExternalTaxRateDraft getExternalTaxRate();
7677

78+
/**
79+
* <p>Custom Fields for the custom Shipping Method.</p>
80+
* @return custom
81+
*/
82+
@Valid
83+
@JsonProperty("custom")
84+
public CustomFieldsDraft getCustom();
85+
7786
/**
7887
* <p>Name of the custom Shipping Method.</p>
7988
* @param shippingMethodName value to be set
@@ -102,6 +111,13 @@ public interface CartSetCustomShippingMethodAction extends CartUpdateAction {
102111

103112
public void setExternalTaxRate(final ExternalTaxRateDraft externalTaxRate);
104113

114+
/**
115+
* <p>Custom Fields for the custom Shipping Method.</p>
116+
* @param custom value to be set
117+
*/
118+
119+
public void setCustom(final CustomFieldsDraft custom);
120+
105121
/**
106122
* factory method
107123
* @return instance of CartSetCustomShippingMethodAction
@@ -121,6 +137,7 @@ public static CartSetCustomShippingMethodAction of(final CartSetCustomShippingMe
121137
instance.setShippingRate(template.getShippingRate());
122138
instance.setTaxCategory(template.getTaxCategory());
123139
instance.setExternalTaxRate(template.getExternalTaxRate());
140+
instance.setCustom(template.getCustom());
124141
return instance;
125142
}
126143

@@ -143,6 +160,7 @@ public static CartSetCustomShippingMethodAction deepCopy(
143160
.deepCopy(template.getTaxCategory()));
144161
instance.setExternalTaxRate(
145162
com.commercetools.api.models.cart.ExternalTaxRateDraft.deepCopy(template.getExternalTaxRate()));
163+
instance.setCustom(com.commercetools.api.models.type.CustomFieldsDraft.deepCopy(template.getCustom()));
146164
return instance;
147165
}
148166

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetCustomShippingMethodActionBuilder.java

+54-4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ public class CartSetCustomShippingMethodActionBuilder implements Builder<CartSet
3535
@Nullable
3636
private com.commercetools.api.models.cart.ExternalTaxRateDraft externalTaxRate;
3737

38+
@Nullable
39+
private com.commercetools.api.models.type.CustomFieldsDraft custom;
40+
3841
/**
3942
* <p>Name of the custom Shipping Method.</p>
4043
* @param shippingMethodName value to be set
@@ -159,6 +162,42 @@ public CartSetCustomShippingMethodActionBuilder externalTaxRate(
159162
return this;
160163
}
161164

165+
/**
166+
* <p>Custom Fields for the custom Shipping Method.</p>
167+
* @param builder function to build the custom value
168+
* @return Builder
169+
*/
170+
171+
public CartSetCustomShippingMethodActionBuilder custom(
172+
Function<com.commercetools.api.models.type.CustomFieldsDraftBuilder, com.commercetools.api.models.type.CustomFieldsDraftBuilder> builder) {
173+
this.custom = builder.apply(com.commercetools.api.models.type.CustomFieldsDraftBuilder.of()).build();
174+
return this;
175+
}
176+
177+
/**
178+
* <p>Custom Fields for the custom Shipping Method.</p>
179+
* @param builder function to build the custom value
180+
* @return Builder
181+
*/
182+
183+
public CartSetCustomShippingMethodActionBuilder withCustom(
184+
Function<com.commercetools.api.models.type.CustomFieldsDraftBuilder, com.commercetools.api.models.type.CustomFieldsDraft> builder) {
185+
this.custom = builder.apply(com.commercetools.api.models.type.CustomFieldsDraftBuilder.of());
186+
return this;
187+
}
188+
189+
/**
190+
* <p>Custom Fields for the custom Shipping Method.</p>
191+
* @param custom value to be set
192+
* @return Builder
193+
*/
194+
195+
public CartSetCustomShippingMethodActionBuilder custom(
196+
@Nullable final com.commercetools.api.models.type.CustomFieldsDraft custom) {
197+
this.custom = custom;
198+
return this;
199+
}
200+
162201
/**
163202
* <p>Name of the custom Shipping Method.</p>
164203
* @return shippingMethodName
@@ -197,6 +236,16 @@ public com.commercetools.api.models.cart.ExternalTaxRateDraft getExternalTaxRate
197236
return this.externalTaxRate;
198237
}
199238

239+
/**
240+
* <p>Custom Fields for the custom Shipping Method.</p>
241+
* @return custom
242+
*/
243+
244+
@Nullable
245+
public com.commercetools.api.models.type.CustomFieldsDraft getCustom() {
246+
return this.custom;
247+
}
248+
200249
/**
201250
* builds CartSetCustomShippingMethodAction with checking for non-null required values
202251
* @return CartSetCustomShippingMethodAction
@@ -205,17 +254,17 @@ public CartSetCustomShippingMethodAction build() {
205254
Objects.requireNonNull(shippingMethodName,
206255
CartSetCustomShippingMethodAction.class + ": shippingMethodName is missing");
207256
Objects.requireNonNull(shippingRate, CartSetCustomShippingMethodAction.class + ": shippingRate is missing");
208-
return new CartSetCustomShippingMethodActionImpl(shippingMethodName, shippingRate, taxCategory,
209-
externalTaxRate);
257+
return new CartSetCustomShippingMethodActionImpl(shippingMethodName, shippingRate, taxCategory, externalTaxRate,
258+
custom);
210259
}
211260

212261
/**
213262
* builds CartSetCustomShippingMethodAction without checking for non-null required values
214263
* @return CartSetCustomShippingMethodAction
215264
*/
216265
public CartSetCustomShippingMethodAction buildUnchecked() {
217-
return new CartSetCustomShippingMethodActionImpl(shippingMethodName, shippingRate, taxCategory,
218-
externalTaxRate);
266+
return new CartSetCustomShippingMethodActionImpl(shippingMethodName, shippingRate, taxCategory, externalTaxRate,
267+
custom);
219268
}
220269

221270
/**
@@ -237,6 +286,7 @@ public static CartSetCustomShippingMethodActionBuilder of(final CartSetCustomShi
237286
builder.shippingRate = template.getShippingRate();
238287
builder.taxCategory = template.getTaxCategory();
239288
builder.externalTaxRate = template.getExternalTaxRate();
289+
builder.custom = template.getCustom();
240290
return builder;
241291
}
242292

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/cart/CartSetCustomShippingMethodActionImpl.java

+21-1
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,22 @@ public class CartSetCustomShippingMethodActionImpl implements CartSetCustomShipp
3333

3434
private com.commercetools.api.models.cart.ExternalTaxRateDraft externalTaxRate;
3535

36+
private com.commercetools.api.models.type.CustomFieldsDraft custom;
37+
3638
/**
3739
* create instance with all properties
3840
*/
3941
@JsonCreator
4042
CartSetCustomShippingMethodActionImpl(@JsonProperty("shippingMethodName") final String shippingMethodName,
4143
@JsonProperty("shippingRate") final com.commercetools.api.models.shipping_method.ShippingRateDraft shippingRate,
4244
@JsonProperty("taxCategory") final com.commercetools.api.models.tax_category.TaxCategoryResourceIdentifier taxCategory,
43-
@JsonProperty("externalTaxRate") final com.commercetools.api.models.cart.ExternalTaxRateDraft externalTaxRate) {
45+
@JsonProperty("externalTaxRate") final com.commercetools.api.models.cart.ExternalTaxRateDraft externalTaxRate,
46+
@JsonProperty("custom") final com.commercetools.api.models.type.CustomFieldsDraft custom) {
4447
this.shippingMethodName = shippingMethodName;
4548
this.shippingRate = shippingRate;
4649
this.taxCategory = taxCategory;
4750
this.externalTaxRate = externalTaxRate;
51+
this.custom = custom;
4852
this.action = SET_CUSTOM_SHIPPING_METHOD;
4953
}
5054

@@ -95,6 +99,14 @@ public com.commercetools.api.models.cart.ExternalTaxRateDraft getExternalTaxRate
9599
return this.externalTaxRate;
96100
}
97101

102+
/**
103+
* <p>Custom Fields for the custom Shipping Method.</p>
104+
*/
105+
106+
public com.commercetools.api.models.type.CustomFieldsDraft getCustom() {
107+
return this.custom;
108+
}
109+
98110
public void setShippingMethodName(final String shippingMethodName) {
99111
this.shippingMethodName = shippingMethodName;
100112
}
@@ -112,6 +124,10 @@ public void setExternalTaxRate(final com.commercetools.api.models.cart.ExternalT
112124
this.externalTaxRate = externalTaxRate;
113125
}
114126

127+
public void setCustom(final com.commercetools.api.models.type.CustomFieldsDraft custom) {
128+
this.custom = custom;
129+
}
130+
115131
@Override
116132
public boolean equals(Object o) {
117133
if (this == o)
@@ -127,11 +143,13 @@ public boolean equals(Object o) {
127143
.append(shippingRate, that.shippingRate)
128144
.append(taxCategory, that.taxCategory)
129145
.append(externalTaxRate, that.externalTaxRate)
146+
.append(custom, that.custom)
130147
.append(action, that.action)
131148
.append(shippingMethodName, that.shippingMethodName)
132149
.append(shippingRate, that.shippingRate)
133150
.append(taxCategory, that.taxCategory)
134151
.append(externalTaxRate, that.externalTaxRate)
152+
.append(custom, that.custom)
135153
.isEquals();
136154
}
137155

@@ -142,6 +160,7 @@ public int hashCode() {
142160
.append(shippingRate)
143161
.append(taxCategory)
144162
.append(externalTaxRate)
163+
.append(custom)
145164
.toHashCode();
146165
}
147166

@@ -152,6 +171,7 @@ public String toString() {
152171
.append("shippingRate", shippingRate)
153172
.append("taxCategory", taxCategory)
154173
.append("externalTaxRate", externalTaxRate)
174+
.append("custom", custom)
155175
.build();
156176
}
157177

commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/order_edit/StagedOrderSetCustomShippingMethodAction.java

+18
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import com.commercetools.api.models.order.StagedOrderUpdateAction;
1212
import com.commercetools.api.models.shipping_method.ShippingRateDraft;
1313
import com.commercetools.api.models.tax_category.TaxCategoryResourceIdentifier;
14+
import com.commercetools.api.models.type.CustomFieldsDraft;
1415
import com.fasterxml.jackson.annotation.*;
1516
import com.fasterxml.jackson.databind.annotation.*;
1617

@@ -76,6 +77,14 @@ public interface StagedOrderSetCustomShippingMethodAction extends StagedOrderUpd
7677
@JsonProperty("externalTaxRate")
7778
public ExternalTaxRateDraft getExternalTaxRate();
7879

80+
/**
81+
* <p>Custom Fields for the custom Shipping Method.</p>
82+
* @return custom
83+
*/
84+
@Valid
85+
@JsonProperty("custom")
86+
public CustomFieldsDraft getCustom();
87+
7988
/**
8089
* <p>Name of the custom Shipping Method.</p>
8190
* @param shippingMethodName value to be set
@@ -104,6 +113,13 @@ public interface StagedOrderSetCustomShippingMethodAction extends StagedOrderUpd
104113

105114
public void setExternalTaxRate(final ExternalTaxRateDraft externalTaxRate);
106115

116+
/**
117+
* <p>Custom Fields for the custom Shipping Method.</p>
118+
* @param custom value to be set
119+
*/
120+
121+
public void setCustom(final CustomFieldsDraft custom);
122+
107123
/**
108124
* factory method
109125
* @return instance of StagedOrderSetCustomShippingMethodAction
@@ -123,6 +139,7 @@ public static StagedOrderSetCustomShippingMethodAction of(final StagedOrderSetCu
123139
instance.setShippingRate(template.getShippingRate());
124140
instance.setTaxCategory(template.getTaxCategory());
125141
instance.setExternalTaxRate(template.getExternalTaxRate());
142+
instance.setCustom(template.getCustom());
126143
return instance;
127144
}
128145

@@ -145,6 +162,7 @@ public static StagedOrderSetCustomShippingMethodAction deepCopy(
145162
.deepCopy(template.getTaxCategory()));
146163
instance.setExternalTaxRate(
147164
com.commercetools.api.models.cart.ExternalTaxRateDraft.deepCopy(template.getExternalTaxRate()));
165+
instance.setCustom(com.commercetools.api.models.type.CustomFieldsDraft.deepCopy(template.getCustom()));
148166
return instance;
149167
}
150168

0 commit comments

Comments
 (0)