Skip to content

Commit 223faf7

Browse files
committed
build(codegen): updating SDK
1 parent fad9822 commit 223faf7

File tree

72 files changed

+2381
-69
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+2381
-69
lines changed

changes.md

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

66
- added type `CartDiscountSetDiscountGroupAction`
7+
- added type `CartChangePriceRoundingModeAction`
78
- added type `DiscountGroup`
89
- added type `DiscountGroupDraft`
910
- added type `DiscountGroupPagedQueryResponse`
@@ -23,9 +24,12 @@
2324
- added type `DiscountGroupDeletedMessagePayload`
2425
- added type `DiscountGroupKeySetMessagePayload`
2526
- added type `DiscountGroupSortOrderSetMessagePayload`
27+
- added type `StagedOrderChangePriceRoundingModeAction`
2628
- added type `ProductTailoringSetProductAttributeAction`
2729
- added type `AttributeLevelEnum`
2830
- added type `ProductSetProductAttributeAction`
31+
- added type `ProjectChangePriceRoundingModeAction`
32+
- added type `ProjectChangeTaxRoundingModeAction`
2933
</details>
3034

3135

@@ -50,8 +54,13 @@
5054

5155
- added property `discountGroup` to type `CartDiscount`
5256
- added property `discountGroup` to type `CartDiscountDraft`
57+
- added property `priceRoundingMode` to type `Cart`
58+
- added property `priceRoundingMode` to type `CartDraft`
5359
- added property `attributes` to type `ProductTailoringCreatedMessage`
5460
- added property `attributes` to type `ProductTailoringCreatedMessagePayload`
61+
- added property `priceRoundingMode` to type `StagedOrder`
62+
- added property `priceRoundingMode` to type `Order`
63+
- added property `priceRoundingMode` to type `OrderImportDraft`
5564
- added property `attributes` to type `ProductTailoringData`
5665
- added property `attributes` to type `ProductTailoringDraft`
5766
- added property `attributes` to type `ProductTailoringInStoreDraft`
@@ -60,6 +69,10 @@
6069
- added property `attributes` to type `ProductData`
6170
- added property `attributes` to type `ProductDraft`
6271
- added property `attributes` to type `ProductProjection`
72+
- added property `priceRoundingMode` to type `CartsConfiguration`
73+
- added property `taxRoundingMode` to type `CartsConfiguration`
74+
- added property `priceRoundingMode` to type `QuoteRequest`
75+
- added property `priceRoundingMode` to type `Quote`
6376
</details>
6477

6578

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

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1745,6 +1745,7 @@ type Cart implements Versioned & ReferenceExpandable {
17451745
billingAddress: Address
17461746
inventoryMode: InventoryMode!
17471747
taxMode: TaxMode!
1748+
priceRoundingMode: RoundingMode!
17481749
taxRoundingMode: RoundingMode!
17491750
taxCalculationMode: TaxCalculationMode!
17501751
customerGroup: CustomerGroup
@@ -2042,6 +2043,7 @@ input CartDraft {
20422043
customerId: String
20432044
externalTaxRateForShippingMethod: ExternalTaxRateDraft
20442045
anonymousId: String
2046+
priceRoundingMode: RoundingMode = HalfEven
20452047
taxRoundingMode: RoundingMode = HalfEven
20462048
taxCalculationMode: TaxCalculationMode = LineItemLevel
20472049
customerGroup: ResourceIdentifierInput
@@ -2120,6 +2122,7 @@ input CartUpdateAction {
21202122
changeCustomLineItemPriceMode: ChangeCartCustomLineItemPriceMode
21212123
changeCustomLineItemQuantity: ChangeCartCustomLineItemQuantity
21222124
changeLineItemsOrder: ChangeCartLineItemsOrder
2125+
changePriceRoundingMode: ChangeCartPriceRoundingMode
21232126
changeTaxCalculationMode: ChangeCartTaxCalculationMode
21242127
changeTaxMode: ChangeCartTaxMode
21252128
changeTaxRoundingMode: ChangeCartTaxRoundingMode
@@ -2191,10 +2194,15 @@ type CartsConfiguration {
21912194
deleteDaysAfterLastModification: Int
21922195
allowAddingUnpublishedProducts: Boolean!
21932196
countryTaxRateFallbackEnabled: Boolean!
2197+
priceRoundingMode: RoundingMode!
2198+
taxRoundingMode: RoundingMode!
21942199
}
21952200

21962201
input CartsConfigurationInput {
21972202
deleteDaysAfterLastModification: Int
2203+
countryTaxRateFallbackEnabled: Boolean
2204+
priceRoundingMode: RoundingMode
2205+
taxRoundingMode: RoundingMode
21982206
}
21992207

22002208
type Category implements Versioned & ReferenceExpandable {
@@ -2468,6 +2476,10 @@ input ChangeCartTaxMode {
24682476
taxMode: TaxMode!
24692477
}
24702478

2479+
input ChangeCartPriceRoundingMode {
2480+
priceRoundingMode: RoundingMode!
2481+
}
2482+
24712483
input ChangeCartTaxRoundingMode {
24722484
taxRoundingMode: RoundingMode!
24732485
}
@@ -2749,6 +2761,14 @@ input ChangeProjectSettingsShoppingListsConfiguration {
27492761
shoppingListsConfiguration: ShoppingListsConfigurationInput!
27502762
}
27512763

2764+
input ChangeProjectSettingsTaxRoundingMode {
2765+
taxRoundingMode: RoundingMode!
2766+
}
2767+
2768+
input ChangeProjectSettingsPriceRoundingMode {
2769+
priceRoundingMode: RoundingMode!
2770+
}
2771+
27522772
input ChangeQuoteCustomer {
27532773
customer: ResourceIdentifierInput!
27542774
}
@@ -2899,6 +2919,15 @@ type ChangeStagedOrderTaxModeOutput implements StagedOrderUpdateActionOutput {
28992919
taxMode: TaxMode!
29002920
}
29012921

2922+
input ChangeStagedOrderPriceRoundingMode {
2923+
priceRoundingMode: RoundingMode!
2924+
}
2925+
2926+
type ChangeStagedOrderPriceRoundingModeOutput implements StagedOrderUpdateActionOutput {
2927+
type: String!
2928+
priceRoundingMode: RoundingMode!
2929+
}
2930+
29022931
input ChangeStagedOrderTaxRoundingMode {
29032932
taxRoundingMode: RoundingMode!
29042933
}
@@ -7030,6 +7059,7 @@ type Order implements Versioned & ReferenceExpandable {
70307059
billingAddress: Address
70317060
inventoryMode: InventoryMode!
70327061
taxMode: TaxMode!
7062+
priceRoundingMode: RoundingMode!
70337063
taxRoundingMode: RoundingMode!
70347064
taxCalculationMode: TaxCalculationMode!
70357065
customerGroup: CustomerGroup
@@ -9441,7 +9471,9 @@ input ProjectSettingsUpdateAction {
94419471
changeMyBusinessUnitStatusOnCreation: ChangeProjectSettingsMyBusinessUnitStatusOnCreation
94429472
changeName: ChangeProjectSettingsName
94439473
changeOrderSearchStatus: ChangeProjectSettingsOrderSearchStatus
9474+
changePriceRoundingMode: ChangeProjectSettingsPriceRoundingMode
94449475
changeShoppingListsConfiguration: ChangeProjectSettingsShoppingListsConfiguration
9476+
changeTaxRoundingMode: ChangeProjectSettingsTaxRoundingMode
94459477
setExternalOAuth: SetProjectSettingsExternalOAuth
94469478
setShippingRateInputType: SetProjectSettingsShippingRateInputType
94479479

@@ -9807,6 +9839,7 @@ type Quote implements Versioned {
98079839
itemShippingAddresses: [Address!]!
98089840
inventoryMode: InventoryMode!
98099841
taxMode: TaxMode!
9842+
priceRoundingMode: RoundingMode!
98109843
taxRoundingMode: RoundingMode!
98119844
taxCalculationMode: TaxCalculationMode!
98129845
country: Country
@@ -9907,6 +9940,7 @@ type QuoteRequest implements Versioned {
99079940
itemShippingAddresses: [Address!]!
99089941
inventoryMode: InventoryMode!
99099942
taxMode: TaxMode!
9943+
priceRoundingMode: RoundingMode!
99109944
taxRoundingMode: RoundingMode!
99119945
taxCalculationMode: TaxCalculationMode!
99129946
country: Country
@@ -14027,6 +14061,7 @@ input StagedOrderUpdateAction {
1402714061
changeOrderState: ChangeStagedOrderOrderState
1402814062
changePaymentState: ChangeStagedOrderPaymentState
1402914063
changeShipmentState: ChangeStagedOrderShipmentState
14064+
changePriceRoundingMode: ChangeStagedOrderPriceRoundingMode
1403014065
changeTaxCalculationMode: ChangeStagedOrderTaxCalculationMode
1403114066
changeTaxMode: ChangeStagedOrderTaxMode
1403214067
changeTaxRoundingMode: ChangeStagedOrderTaxRoundingMode

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

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
* .plusCustomLineItems(customLineItemsBuilder -> customLineItemsBuilder)
4545
* .totalPrice(totalPriceBuilder -> totalPriceBuilder)
4646
* .taxMode(TaxMode.PLATFORM)
47+
* .priceRoundingMode(RoundingMode.HALF_EVEN)
4748
* .taxRoundingMode(RoundingMode.HALF_EVEN)
4849
* .taxCalculationMode(TaxCalculationMode.LINE_ITEM_LEVEL)
4950
* .inventoryMode(InventoryMode.NONE)
@@ -211,7 +212,15 @@ public interface Cart extends BaseResource, CartMixin, com.commercetools.api.mod
211212
public TaxMode getTaxMode();
212213

213214
/**
214-
* <p>Indicates how monetary values are rounded when calculating taxes for <code>taxedPrice</code>.</p>
215+
* <p>Indicates how the total prices on LineItems and CustomLineItems are rounded when calculated. Configured in Project settings.</p>
216+
* @return priceRoundingMode
217+
*/
218+
@NotNull
219+
@JsonProperty("priceRoundingMode")
220+
public RoundingMode getPriceRoundingMode();
221+
222+
/**
223+
* <p>Indicates how monetary values are rounded when calculating taxes for <code>taxedPrice</code>. Configured in Project settings.</p>
215224
* @return taxRoundingMode
216225
*/
217226
@NotNull
@@ -578,7 +587,14 @@ public interface Cart extends BaseResource, CartMixin, com.commercetools.api.mod
578587
public void setTaxMode(final TaxMode taxMode);
579588

580589
/**
581-
* <p>Indicates how monetary values are rounded when calculating taxes for <code>taxedPrice</code>.</p>
590+
* <p>Indicates how the total prices on LineItems and CustomLineItems are rounded when calculated. Configured in Project settings.</p>
591+
* @param priceRoundingMode value to be set
592+
*/
593+
594+
public void setPriceRoundingMode(final RoundingMode priceRoundingMode);
595+
596+
/**
597+
* <p>Indicates how monetary values are rounded when calculating taxes for <code>taxedPrice</code>. Configured in Project settings.</p>
582598
* @param taxRoundingMode value to be set
583599
*/
584600

@@ -847,6 +863,7 @@ public static Cart of(final Cart template) {
847863
instance.setTaxedShippingPrice(template.getTaxedShippingPrice());
848864
instance.setDiscountOnTotalPrice(template.getDiscountOnTotalPrice());
849865
instance.setTaxMode(template.getTaxMode());
866+
instance.setPriceRoundingMode(template.getPriceRoundingMode());
850867
instance.setTaxRoundingMode(template.getTaxRoundingMode());
851868
instance.setTaxCalculationMode(template.getTaxCalculationMode());
852869
instance.setInventoryMode(template.getInventoryMode());
@@ -920,6 +937,7 @@ public static Cart deepCopy(@Nullable final Cart template) {
920937
instance.setDiscountOnTotalPrice(
921938
com.commercetools.api.models.cart.DiscountOnTotalPrice.deepCopy(template.getDiscountOnTotalPrice()));
922939
instance.setTaxMode(template.getTaxMode());
940+
instance.setPriceRoundingMode(template.getPriceRoundingMode());
923941
instance.setTaxRoundingMode(template.getTaxRoundingMode());
924942
instance.setTaxCalculationMode(template.getTaxCalculationMode());
925943
instance.setInventoryMode(template.getInventoryMode());

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

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* .plusCustomLineItems(customLineItemsBuilder -> customLineItemsBuilder)
2525
* .totalPrice(totalPriceBuilder -> totalPriceBuilder)
2626
* .taxMode(TaxMode.PLATFORM)
27+
* .priceRoundingMode(RoundingMode.HALF_EVEN)
2728
* .taxRoundingMode(RoundingMode.HALF_EVEN)
2829
* .taxCalculationMode(TaxCalculationMode.LINE_ITEM_LEVEL)
2930
* .inventoryMode(InventoryMode.NONE)
@@ -91,6 +92,8 @@ public class CartBuilder implements Builder<Cart> {
9192

9293
private com.commercetools.api.models.cart.TaxMode taxMode;
9394

95+
private com.commercetools.api.models.cart.RoundingMode priceRoundingMode;
96+
9497
private com.commercetools.api.models.cart.RoundingMode taxRoundingMode;
9598

9699
private com.commercetools.api.models.cart.TaxCalculationMode taxCalculationMode;
@@ -710,7 +713,18 @@ public CartBuilder taxMode(final com.commercetools.api.models.cart.TaxMode taxMo
710713
}
711714

712715
/**
713-
* <p>Indicates how monetary values are rounded when calculating taxes for <code>taxedPrice</code>.</p>
716+
* <p>Indicates how the total prices on LineItems and CustomLineItems are rounded when calculated. Configured in Project settings.</p>
717+
* @param priceRoundingMode value to be set
718+
* @return Builder
719+
*/
720+
721+
public CartBuilder priceRoundingMode(final com.commercetools.api.models.cart.RoundingMode priceRoundingMode) {
722+
this.priceRoundingMode = priceRoundingMode;
723+
return this;
724+
}
725+
726+
/**
727+
* <p>Indicates how monetary values are rounded when calculating taxes for <code>taxedPrice</code>. Configured in Project settings.</p>
714728
* @param taxRoundingMode value to be set
715729
* @return Builder
716730
*/
@@ -1799,7 +1813,16 @@ public com.commercetools.api.models.cart.TaxMode getTaxMode() {
17991813
}
18001814

18011815
/**
1802-
* <p>Indicates how monetary values are rounded when calculating taxes for <code>taxedPrice</code>.</p>
1816+
* <p>Indicates how the total prices on LineItems and CustomLineItems are rounded when calculated. Configured in Project settings.</p>
1817+
* @return priceRoundingMode
1818+
*/
1819+
1820+
public com.commercetools.api.models.cart.RoundingMode getPriceRoundingMode() {
1821+
return this.priceRoundingMode;
1822+
}
1823+
1824+
/**
1825+
* <p>Indicates how monetary values are rounded when calculating taxes for <code>taxedPrice</code>. Configured in Project settings.</p>
18031826
* @return taxRoundingMode
18041827
*/
18051828

@@ -2056,6 +2079,7 @@ public Cart build() {
20562079
Objects.requireNonNull(customLineItems, Cart.class + ": customLineItems is missing");
20572080
Objects.requireNonNull(totalPrice, Cart.class + ": totalPrice is missing");
20582081
Objects.requireNonNull(taxMode, Cart.class + ": taxMode is missing");
2082+
Objects.requireNonNull(priceRoundingMode, Cart.class + ": priceRoundingMode is missing");
20592083
Objects.requireNonNull(taxRoundingMode, Cart.class + ": taxRoundingMode is missing");
20602084
Objects.requireNonNull(taxCalculationMode, Cart.class + ": taxCalculationMode is missing");
20612085
Objects.requireNonNull(inventoryMode, Cart.class + ": inventoryMode is missing");
@@ -2069,11 +2093,11 @@ public Cart build() {
20692093
Objects.requireNonNull(origin, Cart.class + ": origin is missing");
20702094
return new CartImpl(id, version, createdAt, lastModifiedAt, key, customerId, customerEmail, customerGroup,
20712095
anonymousId, businessUnit, store, lineItems, customLineItems, totalLineItemQuantity, totalPrice, taxedPrice,
2072-
taxedShippingPrice, discountOnTotalPrice, taxMode, taxRoundingMode, taxCalculationMode, inventoryMode,
2073-
cartState, billingAddress, shippingAddress, shippingMode, shippingKey, shippingInfo, shippingRateInput,
2074-
shippingCustomFields, shipping, itemShippingAddresses, discountCodes, directDiscounts, refusedGifts,
2075-
paymentInfo, country, locale, origin, custom, discountTypeCombination, deleteDaysAfterLastModification,
2076-
lastModifiedBy, createdBy);
2096+
taxedShippingPrice, discountOnTotalPrice, taxMode, priceRoundingMode, taxRoundingMode, taxCalculationMode,
2097+
inventoryMode, cartState, billingAddress, shippingAddress, shippingMode, shippingKey, shippingInfo,
2098+
shippingRateInput, shippingCustomFields, shipping, itemShippingAddresses, discountCodes, directDiscounts,
2099+
refusedGifts, paymentInfo, country, locale, origin, custom, discountTypeCombination,
2100+
deleteDaysAfterLastModification, lastModifiedBy, createdBy);
20772101
}
20782102

20792103
/**
@@ -2083,11 +2107,11 @@ public Cart build() {
20832107
public Cart buildUnchecked() {
20842108
return new CartImpl(id, version, createdAt, lastModifiedAt, key, customerId, customerEmail, customerGroup,
20852109
anonymousId, businessUnit, store, lineItems, customLineItems, totalLineItemQuantity, totalPrice, taxedPrice,
2086-
taxedShippingPrice, discountOnTotalPrice, taxMode, taxRoundingMode, taxCalculationMode, inventoryMode,
2087-
cartState, billingAddress, shippingAddress, shippingMode, shippingKey, shippingInfo, shippingRateInput,
2088-
shippingCustomFields, shipping, itemShippingAddresses, discountCodes, directDiscounts, refusedGifts,
2089-
paymentInfo, country, locale, origin, custom, discountTypeCombination, deleteDaysAfterLastModification,
2090-
lastModifiedBy, createdBy);
2110+
taxedShippingPrice, discountOnTotalPrice, taxMode, priceRoundingMode, taxRoundingMode, taxCalculationMode,
2111+
inventoryMode, cartState, billingAddress, shippingAddress, shippingMode, shippingKey, shippingInfo,
2112+
shippingRateInput, shippingCustomFields, shipping, itemShippingAddresses, discountCodes, directDiscounts,
2113+
refusedGifts, paymentInfo, country, locale, origin, custom, discountTypeCombination,
2114+
deleteDaysAfterLastModification, lastModifiedBy, createdBy);
20912115
}
20922116

20932117
/**
@@ -2124,6 +2148,7 @@ public static CartBuilder of(final Cart template) {
21242148
builder.taxedShippingPrice = template.getTaxedShippingPrice();
21252149
builder.discountOnTotalPrice = template.getDiscountOnTotalPrice();
21262150
builder.taxMode = template.getTaxMode();
2151+
builder.priceRoundingMode = template.getPriceRoundingMode();
21272152
builder.taxRoundingMode = template.getTaxRoundingMode();
21282153
builder.taxCalculationMode = template.getTaxCalculationMode();
21292154
builder.inventoryMode = template.getInventoryMode();

0 commit comments

Comments
 (0)