Skip to content

Commit

Permalink
Merge pull request #781 from commercetools/gen-sdk-updates
Browse files Browse the repository at this point in the history
Update generated SDKs
  • Loading branch information
kodiakhq[bot] authored Dec 18, 2024
2 parents 50460ca + 43361a2 commit 54fba54
Show file tree
Hide file tree
Showing 18 changed files with 346 additions and 22 deletions.
3 changes: 3 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@

- added property `applicationMode` to type `CartDiscountValueFixed`
- added property `applicationMode` to type `CartDiscountValueFixedDraft`
- added property `custom` to type `CartSetCustomShippingMethodAction`
- added property `custom` to type `StagedOrderSetCustomShippingMethodAction`
- added property `custom` to type `StagedOrderSetShippingAddressAndCustomShippingMethodAction`
</details>

**History changes**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,6 @@ input AddProductVariantTailoring {
id: Int
sku: String
images: [ImageInput!] = []
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
attributes: [ProductAttributeInput!] = []
assets: [AssetDraftInput!] = []
staged: Boolean = true
Expand Down Expand Up @@ -8749,10 +8748,7 @@ input ProductTailoringUpdateAction {
setAssetTags: SetProductTailoringAssetTags
setImages: SetProductTailoringImages
setDescription: SetProductTailoringDescription
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
setAttribute: SetProductTailoringAttribute

"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
setAttributeInAllVariants: SetProductTailoringAttributeInAllVariants
setImageLabel: SetProductTailoringImageLabel
setMetaAttributes: SetProductTailoringMetaAttributes
Expand Down Expand Up @@ -9024,7 +9020,6 @@ type ProductVariantTailoring {
id: Int!
images: [Image!]!
assets: [Asset!]!
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
attributesRaw: [RawProductAttribute!]!
}

Expand All @@ -9041,7 +9036,6 @@ input ProductVariantTailoringInput {
id: Int
sku: String
images: [ImageInput!] = []
"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta"
attributes: [ProductAttributeInput!] = []
assets: [AssetDraftInput!] = []
}
Expand Down Expand Up @@ -10804,6 +10798,7 @@ input SetCartCustomShippingMethod {
shippingRate: ShippingRateDraft!
taxCategory: ResourceIdentifierInput
externalTaxRate: ExternalTaxRateDraft
custom: CustomFieldsDraft
}

input SetCartCustomType {
Expand Down Expand Up @@ -11993,7 +11988,6 @@ input SetProductTailoringAssetTags {
assetId: String
}

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

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

type SetStagedOrderCustomShippingMethodOutput implements StagedOrderUpdateActionOutput {
Expand All @@ -12407,6 +12401,7 @@ type SetStagedOrderCustomShippingMethodOutput implements StagedOrderUpdateAction
shippingRate: ShippingRate!
taxCategoryResId: ResourceIdentifier
externalTaxRate: ExternalTaxRateDraftOutput
custom: CustomFieldsCommand
}

input SetStagedOrderCustomType {
Expand Down Expand Up @@ -12869,6 +12864,7 @@ input SetStagedOrderShippingAddressAndCustomShippingMethod {
shippingRate: ShippingRateDraft!
taxCategory: ResourceIdentifierInput
externalTaxRate: ExternalTaxRateDraft
custom: CustomFieldsDraft
}

type SetStagedOrderShippingAddressAndCustomShippingMethodOutput implements StagedOrderUpdateActionOutput {
Expand All @@ -12878,6 +12874,7 @@ type SetStagedOrderShippingAddressAndCustomShippingMethodOutput implements Stage
shippingRate: ShippingRate!
taxCategoryResId: ResourceIdentifier
externalTaxRate: ExternalTaxRateDraftOutput
custom: CustomFieldsCommand
}

input SetStagedOrderShippingAddressAndShippingMethod {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import com.commercetools.api.models.shipping_method.ShippingRateDraft;
import com.commercetools.api.models.tax_category.TaxCategoryResourceIdentifier;
import com.commercetools.api.models.type.CustomFieldsDraft;
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.*;

Expand Down Expand Up @@ -74,6 +75,14 @@ public interface CartSetCustomShippingMethodAction extends CartUpdateAction {
@JsonProperty("externalTaxRate")
public ExternalTaxRateDraft getExternalTaxRate();

/**
* <p>Custom Fields for the custom Shipping Method.</p>
* @return custom
*/
@Valid
@JsonProperty("custom")
public CustomFieldsDraft getCustom();

/**
* <p>Name of the custom Shipping Method.</p>
* @param shippingMethodName value to be set
Expand Down Expand Up @@ -102,6 +111,13 @@ public interface CartSetCustomShippingMethodAction extends CartUpdateAction {

public void setExternalTaxRate(final ExternalTaxRateDraft externalTaxRate);

/**
* <p>Custom Fields for the custom Shipping Method.</p>
* @param custom value to be set
*/

public void setCustom(final CustomFieldsDraft custom);

/**
* factory method
* @return instance of CartSetCustomShippingMethodAction
Expand All @@ -121,6 +137,7 @@ public static CartSetCustomShippingMethodAction of(final CartSetCustomShippingMe
instance.setShippingRate(template.getShippingRate());
instance.setTaxCategory(template.getTaxCategory());
instance.setExternalTaxRate(template.getExternalTaxRate());
instance.setCustom(template.getCustom());
return instance;
}

Expand All @@ -143,6 +160,7 @@ public static CartSetCustomShippingMethodAction deepCopy(
.deepCopy(template.getTaxCategory()));
instance.setExternalTaxRate(
com.commercetools.api.models.cart.ExternalTaxRateDraft.deepCopy(template.getExternalTaxRate()));
instance.setCustom(com.commercetools.api.models.type.CustomFieldsDraft.deepCopy(template.getCustom()));
return instance;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ public class CartSetCustomShippingMethodActionBuilder implements Builder<CartSet
@Nullable
private com.commercetools.api.models.cart.ExternalTaxRateDraft externalTaxRate;

@Nullable
private com.commercetools.api.models.type.CustomFieldsDraft custom;

/**
* <p>Name of the custom Shipping Method.</p>
* @param shippingMethodName value to be set
Expand Down Expand Up @@ -159,6 +162,42 @@ public CartSetCustomShippingMethodActionBuilder externalTaxRate(
return this;
}

/**
* <p>Custom Fields for the custom Shipping Method.</p>
* @param builder function to build the custom value
* @return Builder
*/

public CartSetCustomShippingMethodActionBuilder custom(
Function<com.commercetools.api.models.type.CustomFieldsDraftBuilder, com.commercetools.api.models.type.CustomFieldsDraftBuilder> builder) {
this.custom = builder.apply(com.commercetools.api.models.type.CustomFieldsDraftBuilder.of()).build();
return this;
}

/**
* <p>Custom Fields for the custom Shipping Method.</p>
* @param builder function to build the custom value
* @return Builder
*/

public CartSetCustomShippingMethodActionBuilder withCustom(
Function<com.commercetools.api.models.type.CustomFieldsDraftBuilder, com.commercetools.api.models.type.CustomFieldsDraft> builder) {
this.custom = builder.apply(com.commercetools.api.models.type.CustomFieldsDraftBuilder.of());
return this;
}

/**
* <p>Custom Fields for the custom Shipping Method.</p>
* @param custom value to be set
* @return Builder
*/

public CartSetCustomShippingMethodActionBuilder custom(
@Nullable final com.commercetools.api.models.type.CustomFieldsDraft custom) {
this.custom = custom;
return this;
}

/**
* <p>Name of the custom Shipping Method.</p>
* @return shippingMethodName
Expand Down Expand Up @@ -197,6 +236,16 @@ public com.commercetools.api.models.cart.ExternalTaxRateDraft getExternalTaxRate
return this.externalTaxRate;
}

/**
* <p>Custom Fields for the custom Shipping Method.</p>
* @return custom
*/

@Nullable
public com.commercetools.api.models.type.CustomFieldsDraft getCustom() {
return this.custom;
}

/**
* builds CartSetCustomShippingMethodAction with checking for non-null required values
* @return CartSetCustomShippingMethodAction
Expand All @@ -205,17 +254,17 @@ public CartSetCustomShippingMethodAction build() {
Objects.requireNonNull(shippingMethodName,
CartSetCustomShippingMethodAction.class + ": shippingMethodName is missing");
Objects.requireNonNull(shippingRate, CartSetCustomShippingMethodAction.class + ": shippingRate is missing");
return new CartSetCustomShippingMethodActionImpl(shippingMethodName, shippingRate, taxCategory,
externalTaxRate);
return new CartSetCustomShippingMethodActionImpl(shippingMethodName, shippingRate, taxCategory, externalTaxRate,
custom);
}

/**
* builds CartSetCustomShippingMethodAction without checking for non-null required values
* @return CartSetCustomShippingMethodAction
*/
public CartSetCustomShippingMethodAction buildUnchecked() {
return new CartSetCustomShippingMethodActionImpl(shippingMethodName, shippingRate, taxCategory,
externalTaxRate);
return new CartSetCustomShippingMethodActionImpl(shippingMethodName, shippingRate, taxCategory, externalTaxRate,
custom);
}

/**
Expand All @@ -237,6 +286,7 @@ public static CartSetCustomShippingMethodActionBuilder of(final CartSetCustomShi
builder.shippingRate = template.getShippingRate();
builder.taxCategory = template.getTaxCategory();
builder.externalTaxRate = template.getExternalTaxRate();
builder.custom = template.getCustom();
return builder;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,22 @@ public class CartSetCustomShippingMethodActionImpl implements CartSetCustomShipp

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

private com.commercetools.api.models.type.CustomFieldsDraft custom;

/**
* create instance with all properties
*/
@JsonCreator
CartSetCustomShippingMethodActionImpl(@JsonProperty("shippingMethodName") final String shippingMethodName,
@JsonProperty("shippingRate") final com.commercetools.api.models.shipping_method.ShippingRateDraft shippingRate,
@JsonProperty("taxCategory") final com.commercetools.api.models.tax_category.TaxCategoryResourceIdentifier taxCategory,
@JsonProperty("externalTaxRate") final com.commercetools.api.models.cart.ExternalTaxRateDraft externalTaxRate) {
@JsonProperty("externalTaxRate") final com.commercetools.api.models.cart.ExternalTaxRateDraft externalTaxRate,
@JsonProperty("custom") final com.commercetools.api.models.type.CustomFieldsDraft custom) {
this.shippingMethodName = shippingMethodName;
this.shippingRate = shippingRate;
this.taxCategory = taxCategory;
this.externalTaxRate = externalTaxRate;
this.custom = custom;
this.action = SET_CUSTOM_SHIPPING_METHOD;
}

Expand Down Expand Up @@ -95,6 +99,14 @@ public com.commercetools.api.models.cart.ExternalTaxRateDraft getExternalTaxRate
return this.externalTaxRate;
}

/**
* <p>Custom Fields for the custom Shipping Method.</p>
*/

public com.commercetools.api.models.type.CustomFieldsDraft getCustom() {
return this.custom;
}

public void setShippingMethodName(final String shippingMethodName) {
this.shippingMethodName = shippingMethodName;
}
Expand All @@ -112,6 +124,10 @@ public void setExternalTaxRate(final com.commercetools.api.models.cart.ExternalT
this.externalTaxRate = externalTaxRate;
}

public void setCustom(final com.commercetools.api.models.type.CustomFieldsDraft custom) {
this.custom = custom;
}

@Override
public boolean equals(Object o) {
if (this == o)
Expand All @@ -127,11 +143,13 @@ public boolean equals(Object o) {
.append(shippingRate, that.shippingRate)
.append(taxCategory, that.taxCategory)
.append(externalTaxRate, that.externalTaxRate)
.append(custom, that.custom)
.append(action, that.action)
.append(shippingMethodName, that.shippingMethodName)
.append(shippingRate, that.shippingRate)
.append(taxCategory, that.taxCategory)
.append(externalTaxRate, that.externalTaxRate)
.append(custom, that.custom)
.isEquals();
}

Expand All @@ -142,6 +160,7 @@ public int hashCode() {
.append(shippingRate)
.append(taxCategory)
.append(externalTaxRate)
.append(custom)
.toHashCode();
}

Expand All @@ -152,6 +171,7 @@ public String toString() {
.append("shippingRate", shippingRate)
.append("taxCategory", taxCategory)
.append("externalTaxRate", externalTaxRate)
.append("custom", custom)
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.commercetools.api.models.order.StagedOrderUpdateAction;
import com.commercetools.api.models.shipping_method.ShippingRateDraft;
import com.commercetools.api.models.tax_category.TaxCategoryResourceIdentifier;
import com.commercetools.api.models.type.CustomFieldsDraft;
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.*;

Expand Down Expand Up @@ -76,6 +77,14 @@ public interface StagedOrderSetCustomShippingMethodAction extends StagedOrderUpd
@JsonProperty("externalTaxRate")
public ExternalTaxRateDraft getExternalTaxRate();

/**
* <p>Custom Fields for the custom Shipping Method.</p>
* @return custom
*/
@Valid
@JsonProperty("custom")
public CustomFieldsDraft getCustom();

/**
* <p>Name of the custom Shipping Method.</p>
* @param shippingMethodName value to be set
Expand Down Expand Up @@ -104,6 +113,13 @@ public interface StagedOrderSetCustomShippingMethodAction extends StagedOrderUpd

public void setExternalTaxRate(final ExternalTaxRateDraft externalTaxRate);

/**
* <p>Custom Fields for the custom Shipping Method.</p>
* @param custom value to be set
*/

public void setCustom(final CustomFieldsDraft custom);

/**
* factory method
* @return instance of StagedOrderSetCustomShippingMethodAction
Expand All @@ -123,6 +139,7 @@ public static StagedOrderSetCustomShippingMethodAction of(final StagedOrderSetCu
instance.setShippingRate(template.getShippingRate());
instance.setTaxCategory(template.getTaxCategory());
instance.setExternalTaxRate(template.getExternalTaxRate());
instance.setCustom(template.getCustom());
return instance;
}

Expand All @@ -145,6 +162,7 @@ public static StagedOrderSetCustomShippingMethodAction deepCopy(
.deepCopy(template.getTaxCategory()));
instance.setExternalTaxRate(
com.commercetools.api.models.cart.ExternalTaxRateDraft.deepCopy(template.getExternalTaxRate()));
instance.setCustom(com.commercetools.api.models.type.CustomFieldsDraft.deepCopy(template.getCustom()));
return instance;
}

Expand Down
Loading

0 comments on commit 54fba54

Please sign in to comment.