Skip to content

Commit

Permalink
Merge pull request #564 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 Feb 1, 2024
2 parents ba0833f + d0a38d3 commit 7d5cba7
Show file tree
Hide file tree
Showing 14 changed files with 212 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/create-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- uses: gradle/wrapper-validation-action@342dbebe7272035434f9baccc29a816ec6dd2c7b

- uses: jenschude/auto-create-pr-action@a5369414c74963e6ec065dab49066d3711b8c1db
if: github.ref_name == "gen-sdk-updates"
if: github.ref_name == 'gen-sdk-updates'
with:
request_title: "Update generated SDKs"
github_token: ${{ steps.generate_github_token.outputs.token }}
Expand All @@ -54,7 +54,7 @@ jobs:
### Breaking changes
- uses: jenschude/auto-create-pr-action@a5369414c74963e6ec065dab49066d3711b8c1db
if: github.ref_name == "after-release"
if: github.ref_name == 'after-release'
with:
request_title: "Update changelog"
github_token: ${{ steps.generate_github_token.outputs.token }}
Expand Down
1 change: 1 addition & 0 deletions changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<details>
<summary>Added Property(s)</summary>

- added property `perMethodExternalTaxRate` to type `CartAddLineItemAction`
- added property `shippingMode` to type `MyCartDraft`
</details>

Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.time.ZonedDateTime;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;

import javax.annotation.Nullable;
import javax.validation.Valid;
Expand Down Expand Up @@ -133,6 +134,14 @@ public interface CartAddLineItemAction
@JsonProperty("externalTaxRate")
public ExternalTaxRateDraft getExternalTaxRate();

/**
* <p>Sets the external Tax Rates for individual Shipping Methods, if the Cart has the <code>External</code> TaxMode and <code>Multiple</code> ShippingMode.</p>
* @return perMethodExternalTaxRate
*/
@Valid
@JsonProperty("perMethodExternalTaxRate")
public List<MethodExternalTaxRateDraft> getPerMethodExternalTaxRate();

/**
* <p>Inventory mode specific to the Line Item only, and valid for the entire <code>quantity</code> of the Line Item. Set only if the inventory mode should be different from the <code>inventoryMode</code> specified on the Cart.</p>
* @return inventoryMode
Expand Down Expand Up @@ -238,6 +247,21 @@ public interface CartAddLineItemAction

public void setExternalTaxRate(final ExternalTaxRateDraft externalTaxRate);

/**
* <p>Sets the external Tax Rates for individual Shipping Methods, if the Cart has the <code>External</code> TaxMode and <code>Multiple</code> ShippingMode.</p>
* @param perMethodExternalTaxRate values to be set
*/

@JsonIgnore
public void setPerMethodExternalTaxRate(final MethodExternalTaxRateDraft... perMethodExternalTaxRate);

/**
* <p>Sets the external Tax Rates for individual Shipping Methods, if the Cart has the <code>External</code> TaxMode and <code>Multiple</code> ShippingMode.</p>
* @param perMethodExternalTaxRate values to be set
*/

public void setPerMethodExternalTaxRate(final List<MethodExternalTaxRateDraft> perMethodExternalTaxRate);

/**
* <p>Inventory mode specific to the Line Item only, and valid for the entire <code>quantity</code> of the Line Item. Set only if the inventory mode should be different from the <code>inventoryMode</code> specified on the Cart.</p>
* @param inventoryMode value to be set
Expand Down Expand Up @@ -285,6 +309,7 @@ public static CartAddLineItemAction of(final CartAddLineItemAction template) {
instance.setExternalPrice(template.getExternalPrice());
instance.setExternalTotalPrice(template.getExternalTotalPrice());
instance.setExternalTaxRate(template.getExternalTaxRate());
instance.setPerMethodExternalTaxRate(template.getPerMethodExternalTaxRate());
instance.setInventoryMode(template.getInventoryMode());
instance.setShippingDetails(template.getShippingDetails());
instance.setCustom(template.getCustom());
Expand Down Expand Up @@ -317,6 +342,11 @@ public static CartAddLineItemAction deepCopy(@Nullable final CartAddLineItemActi
com.commercetools.api.models.cart.ExternalLineItemTotalPrice.deepCopy(template.getExternalTotalPrice()));
instance.setExternalTaxRate(
com.commercetools.api.models.cart.ExternalTaxRateDraft.deepCopy(template.getExternalTaxRate()));
instance.setPerMethodExternalTaxRate(Optional.ofNullable(template.getPerMethodExternalTaxRate())
.map(t -> t.stream()
.map(com.commercetools.api.models.cart.MethodExternalTaxRateDraft::deepCopy)
.collect(Collectors.toList()))
.orElse(null));
instance.setInventoryMode(template.getInventoryMode());
instance.setShippingDetails(
com.commercetools.api.models.cart.ItemShippingDetailsDraft.deepCopy(template.getShippingDetails()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ public class CartAddLineItemActionBuilder implements Builder<CartAddLineItemActi
@Nullable
private com.commercetools.api.models.cart.ExternalTaxRateDraft externalTaxRate;

@Nullable
private java.util.List<com.commercetools.api.models.cart.MethodExternalTaxRateDraft> perMethodExternalTaxRate;

@Nullable
private com.commercetools.api.models.cart.InventoryMode inventoryMode;

Expand Down Expand Up @@ -323,6 +326,99 @@ public CartAddLineItemActionBuilder externalTaxRate(
return this;
}

/**
* <p>Sets the external Tax Rates for individual Shipping Methods, if the Cart has the <code>External</code> TaxMode and <code>Multiple</code> ShippingMode.</p>
* @param perMethodExternalTaxRate value to be set
* @return Builder
*/

public CartAddLineItemActionBuilder perMethodExternalTaxRate(
@Nullable final com.commercetools.api.models.cart.MethodExternalTaxRateDraft... perMethodExternalTaxRate) {
this.perMethodExternalTaxRate = new ArrayList<>(Arrays.asList(perMethodExternalTaxRate));
return this;
}

/**
* <p>Sets the external Tax Rates for individual Shipping Methods, if the Cart has the <code>External</code> TaxMode and <code>Multiple</code> ShippingMode.</p>
* @param perMethodExternalTaxRate value to be set
* @return Builder
*/

public CartAddLineItemActionBuilder perMethodExternalTaxRate(
@Nullable final java.util.List<com.commercetools.api.models.cart.MethodExternalTaxRateDraft> perMethodExternalTaxRate) {
this.perMethodExternalTaxRate = perMethodExternalTaxRate;
return this;
}

/**
* <p>Sets the external Tax Rates for individual Shipping Methods, if the Cart has the <code>External</code> TaxMode and <code>Multiple</code> ShippingMode.</p>
* @param perMethodExternalTaxRate value to be set
* @return Builder
*/

public CartAddLineItemActionBuilder plusPerMethodExternalTaxRate(
@Nullable final com.commercetools.api.models.cart.MethodExternalTaxRateDraft... perMethodExternalTaxRate) {
if (this.perMethodExternalTaxRate == null) {
this.perMethodExternalTaxRate = new ArrayList<>();
}
this.perMethodExternalTaxRate.addAll(Arrays.asList(perMethodExternalTaxRate));
return this;
}

/**
* <p>Sets the external Tax Rates for individual Shipping Methods, if the Cart has the <code>External</code> TaxMode and <code>Multiple</code> ShippingMode.</p>
* @param builder function to build the perMethodExternalTaxRate value
* @return Builder
*/

public CartAddLineItemActionBuilder plusPerMethodExternalTaxRate(
Function<com.commercetools.api.models.cart.MethodExternalTaxRateDraftBuilder, com.commercetools.api.models.cart.MethodExternalTaxRateDraftBuilder> builder) {
if (this.perMethodExternalTaxRate == null) {
this.perMethodExternalTaxRate = new ArrayList<>();
}
this.perMethodExternalTaxRate
.add(builder.apply(com.commercetools.api.models.cart.MethodExternalTaxRateDraftBuilder.of()).build());
return this;
}

/**
* <p>Sets the external Tax Rates for individual Shipping Methods, if the Cart has the <code>External</code> TaxMode and <code>Multiple</code> ShippingMode.</p>
* @param builder function to build the perMethodExternalTaxRate value
* @return Builder
*/

public CartAddLineItemActionBuilder withPerMethodExternalTaxRate(
Function<com.commercetools.api.models.cart.MethodExternalTaxRateDraftBuilder, com.commercetools.api.models.cart.MethodExternalTaxRateDraftBuilder> builder) {
this.perMethodExternalTaxRate = new ArrayList<>();
this.perMethodExternalTaxRate
.add(builder.apply(com.commercetools.api.models.cart.MethodExternalTaxRateDraftBuilder.of()).build());
return this;
}

/**
* <p>Sets the external Tax Rates for individual Shipping Methods, if the Cart has the <code>External</code> TaxMode and <code>Multiple</code> ShippingMode.</p>
* @param builder function to build the perMethodExternalTaxRate value
* @return Builder
*/

public CartAddLineItemActionBuilder addPerMethodExternalTaxRate(
Function<com.commercetools.api.models.cart.MethodExternalTaxRateDraftBuilder, com.commercetools.api.models.cart.MethodExternalTaxRateDraft> builder) {
return plusPerMethodExternalTaxRate(
builder.apply(com.commercetools.api.models.cart.MethodExternalTaxRateDraftBuilder.of()));
}

/**
* <p>Sets the external Tax Rates for individual Shipping Methods, if the Cart has the <code>External</code> TaxMode and <code>Multiple</code> ShippingMode.</p>
* @param builder function to build the perMethodExternalTaxRate value
* @return Builder
*/

public CartAddLineItemActionBuilder setPerMethodExternalTaxRate(
Function<com.commercetools.api.models.cart.MethodExternalTaxRateDraftBuilder, com.commercetools.api.models.cart.MethodExternalTaxRateDraft> builder) {
return perMethodExternalTaxRate(
builder.apply(com.commercetools.api.models.cart.MethodExternalTaxRateDraftBuilder.of()));
}

/**
* <p>Inventory mode specific to the Line Item only, and valid for the entire <code>quantity</code> of the Line Item. Set only if the inventory mode should be different from the <code>inventoryMode</code> specified on the Cart.</p>
* @param inventoryMode value to be set
Expand Down Expand Up @@ -522,6 +618,16 @@ public com.commercetools.api.models.cart.ExternalTaxRateDraft getExternalTaxRate
return this.externalTaxRate;
}

/**
* <p>Sets the external Tax Rates for individual Shipping Methods, if the Cart has the <code>External</code> TaxMode and <code>Multiple</code> ShippingMode.</p>
* @return perMethodExternalTaxRate
*/

@Nullable
public java.util.List<com.commercetools.api.models.cart.MethodExternalTaxRateDraft> getPerMethodExternalTaxRate() {
return this.perMethodExternalTaxRate;
}

/**
* <p>Inventory mode specific to the Line Item only, and valid for the entire <code>quantity</code> of the Line Item. Set only if the inventory mode should be different from the <code>inventoryMode</code> specified on the Cart.</p>
* @return inventoryMode
Expand Down Expand Up @@ -558,7 +664,8 @@ public com.commercetools.api.models.type.CustomFieldsDraft getCustom() {
*/
public CartAddLineItemAction build() {
return new CartAddLineItemActionImpl(key, productId, variantId, sku, quantity, addedAt, distributionChannel,
supplyChannel, externalPrice, externalTotalPrice, externalTaxRate, inventoryMode, shippingDetails, custom);
supplyChannel, externalPrice, externalTotalPrice, externalTaxRate, perMethodExternalTaxRate, inventoryMode,
shippingDetails, custom);
}

/**
Expand All @@ -567,7 +674,8 @@ public CartAddLineItemAction build() {
*/
public CartAddLineItemAction buildUnchecked() {
return new CartAddLineItemActionImpl(key, productId, variantId, sku, quantity, addedAt, distributionChannel,
supplyChannel, externalPrice, externalTotalPrice, externalTaxRate, inventoryMode, shippingDetails, custom);
supplyChannel, externalPrice, externalTotalPrice, externalTaxRate, perMethodExternalTaxRate, inventoryMode,
shippingDetails, custom);
}

/**
Expand Down Expand Up @@ -596,6 +704,7 @@ public static CartAddLineItemActionBuilder of(final CartAddLineItemAction templa
builder.externalPrice = template.getExternalPrice();
builder.externalTotalPrice = template.getExternalTotalPrice();
builder.externalTaxRate = template.getExternalTaxRate();
builder.perMethodExternalTaxRate = template.getPerMethodExternalTaxRate();
builder.inventoryMode = template.getInventoryMode();
builder.shippingDetails = template.getShippingDetails();
builder.custom = template.getCustom();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ public class CartAddLineItemActionImpl implements CartAddLineItemAction, ModelBa

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

private java.util.List<com.commercetools.api.models.cart.MethodExternalTaxRateDraft> perMethodExternalTaxRate;

private com.commercetools.api.models.cart.InventoryMode inventoryMode;

private com.commercetools.api.models.cart.ItemShippingDetailsDraft shippingDetails;
Expand All @@ -67,6 +69,7 @@ public class CartAddLineItemActionImpl implements CartAddLineItemAction, ModelBa
@JsonProperty("externalPrice") final com.commercetools.api.models.common.Money externalPrice,
@JsonProperty("externalTotalPrice") final com.commercetools.api.models.cart.ExternalLineItemTotalPrice externalTotalPrice,
@JsonProperty("externalTaxRate") final com.commercetools.api.models.cart.ExternalTaxRateDraft externalTaxRate,
@JsonProperty("perMethodExternalTaxRate") final java.util.List<com.commercetools.api.models.cart.MethodExternalTaxRateDraft> perMethodExternalTaxRate,
@JsonProperty("inventoryMode") final com.commercetools.api.models.cart.InventoryMode inventoryMode,
@JsonProperty("shippingDetails") final com.commercetools.api.models.cart.ItemShippingDetailsDraft shippingDetails,
@JsonProperty("custom") final com.commercetools.api.models.type.CustomFieldsDraft custom) {
Expand All @@ -81,6 +84,7 @@ public class CartAddLineItemActionImpl implements CartAddLineItemAction, ModelBa
this.externalPrice = externalPrice;
this.externalTotalPrice = externalTotalPrice;
this.externalTaxRate = externalTaxRate;
this.perMethodExternalTaxRate = perMethodExternalTaxRate;
this.inventoryMode = inventoryMode;
this.shippingDetails = shippingDetails;
this.custom = custom;
Expand Down Expand Up @@ -194,6 +198,14 @@ public com.commercetools.api.models.cart.ExternalTaxRateDraft getExternalTaxRate
return this.externalTaxRate;
}

/**
* <p>Sets the external Tax Rates for individual Shipping Methods, if the Cart has the <code>External</code> TaxMode and <code>Multiple</code> ShippingMode.</p>
*/

public java.util.List<com.commercetools.api.models.cart.MethodExternalTaxRateDraft> getPerMethodExternalTaxRate() {
return this.perMethodExternalTaxRate;
}

/**
* <p>Inventory mode specific to the Line Item only, and valid for the entire <code>quantity</code> of the Line Item. Set only if the inventory mode should be different from the <code>inventoryMode</code> specified on the Cart.</p>
*/
Expand Down Expand Up @@ -264,6 +276,16 @@ public void setExternalTaxRate(final com.commercetools.api.models.cart.ExternalT
this.externalTaxRate = externalTaxRate;
}

public void setPerMethodExternalTaxRate(
final com.commercetools.api.models.cart.MethodExternalTaxRateDraft... perMethodExternalTaxRate) {
this.perMethodExternalTaxRate = new ArrayList<>(Arrays.asList(perMethodExternalTaxRate));
}

public void setPerMethodExternalTaxRate(
final java.util.List<com.commercetools.api.models.cart.MethodExternalTaxRateDraft> perMethodExternalTaxRate) {
this.perMethodExternalTaxRate = perMethodExternalTaxRate;
}

public void setInventoryMode(final com.commercetools.api.models.cart.InventoryMode inventoryMode) {
this.inventoryMode = inventoryMode;
}
Expand Down Expand Up @@ -298,6 +320,7 @@ public boolean equals(Object o) {
.append(externalPrice, that.externalPrice)
.append(externalTotalPrice, that.externalTotalPrice)
.append(externalTaxRate, that.externalTaxRate)
.append(perMethodExternalTaxRate, that.perMethodExternalTaxRate)
.append(inventoryMode, that.inventoryMode)
.append(shippingDetails, that.shippingDetails)
.append(custom, that.custom)
Expand All @@ -313,6 +336,7 @@ public boolean equals(Object o) {
.append(externalPrice, that.externalPrice)
.append(externalTotalPrice, that.externalTotalPrice)
.append(externalTaxRate, that.externalTaxRate)
.append(perMethodExternalTaxRate, that.perMethodExternalTaxRate)
.append(inventoryMode, that.inventoryMode)
.append(shippingDetails, that.shippingDetails)
.append(custom, that.custom)
Expand All @@ -333,6 +357,7 @@ public int hashCode() {
.append(externalPrice)
.append(externalTotalPrice)
.append(externalTaxRate)
.append(perMethodExternalTaxRate)
.append(inventoryMode)
.append(shippingDetails)
.append(custom)
Expand All @@ -353,6 +378,7 @@ public String toString() {
.append("externalPrice", externalPrice)
.append("externalTotalPrice", externalTotalPrice)
.append("externalTaxRate", externalTaxRate)
.append("perMethodExternalTaxRate", perMethodExternalTaxRate)
.append("inventoryMode", inventoryMode)
.append("shippingDetails", shippingDetails)
.append("custom", custom)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public interface Category extends BaseResource, CategoryMixin, com.commercetools
public CategoryReference getParent();

/**
* <p>Decimal value between 0 and 1 used to order Categories that are on the same level in the Category tree.</p>
* <p>Decimal value between 0 and 1. Frontend applications can use this value for ordering Categories within the same level in the category tree.</p>
* @return orderHint
*/
@NotNull
Expand Down Expand Up @@ -290,7 +290,7 @@ public interface Category extends BaseResource, CategoryMixin, com.commercetools
public void setParent(final CategoryReference parent);

/**
* <p>Decimal value between 0 and 1 used to order Categories that are on the same level in the Category tree.</p>
* <p>Decimal value between 0 and 1. Frontend applications can use this value for ordering Categories within the same level in the category tree.</p>
* @param orderHint value to be set
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ public CategoryBuilder parent(@Nullable final com.commercetools.api.models.categ
}

/**
* <p>Decimal value between 0 and 1 used to order Categories that are on the same level in the Category tree.</p>
* <p>Decimal value between 0 and 1. Frontend applications can use this value for ordering Categories within the same level in the category tree.</p>
* @param orderHint value to be set
* @return Builder
*/
Expand Down Expand Up @@ -788,7 +788,7 @@ public com.commercetools.api.models.category.CategoryReference getParent() {
}

/**
* <p>Decimal value between 0 and 1 used to order Categories that are on the same level in the Category tree.</p>
* <p>Decimal value between 0 and 1. Frontend applications can use this value for ordering Categories within the same level in the category tree.</p>
* @return orderHint
*/

Expand Down
Loading

0 comments on commit 7d5cba7

Please sign in to comment.