Skip to content

Commit e6cf7e2

Browse files
authored
build(codegen): updating SDK (#1111)
Co-authored-by: ct-sdks[bot] <153784748+ct-sdks[bot]@users.noreply.github.com>
1 parent 61aeabc commit e6cf7e2

File tree

10 files changed

+130
-3
lines changed

10 files changed

+130
-3
lines changed

.changeset/changes_api.md

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

1010
- added type `CartDiscountSetDiscountGroupAction`
11+
- added type `CartChangePriceRoundingModeAction`
1112
- added type `DiscountGroup`
1213
- added type `DiscountGroupDraft`
1314
- added type `DiscountGroupPagedQueryResponse`
@@ -27,9 +28,12 @@
2728
- added type `DiscountGroupDeletedMessagePayload`
2829
- added type `DiscountGroupKeySetMessagePayload`
2930
- added type `DiscountGroupSortOrderSetMessagePayload`
31+
- added type `StagedOrderChangePriceRoundingModeAction`
3032
- added type `ProductTailoringSetProductAttributeAction`
3133
- added type `AttributeLevelEnum`
3234
- added type `ProductSetProductAttributeAction`
35+
- added type `ProjectChangePriceRoundingModeAction`
36+
- added type `ProjectChangeTaxRoundingModeAction`
3337
</details>
3438

3539
<details>
@@ -64,8 +68,13 @@
6468

6569
- added property `discountGroup` to type `CartDiscount`
6670
- added property `discountGroup` to type `CartDiscountDraft`
71+
- added property `priceRoundingMode` to type `Cart`
72+
- added property `priceRoundingMode` to type `CartDraft`
6773
- added property `attributes` to type `ProductTailoringCreatedMessage`
6874
- added property `attributes` to type `ProductTailoringCreatedMessagePayload`
75+
- added property `priceRoundingMode` to type `StagedOrder`
76+
- added property `priceRoundingMode` to type `Order`
77+
- added property `priceRoundingMode` to type `OrderImportDraft`
6978
- added property `attributes` to type `ProductTailoringData`
7079
- added property `attributes` to type `ProductTailoringDraft`
7180
- added property `attributes` to type `ProductTailoringInStoreDraft`
@@ -76,6 +85,10 @@
7685
- added property `attributes` to type `ProductDraft`
7786
- added property `attributes` to type `ProductProjection`
7887
- added property `/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/` to type `ProductVariantChannelAvailabilityMap`
88+
- added property `priceRoundingMode` to type `CartsConfiguration`
89+
- added property `taxRoundingMode` to type `CartsConfiguration`
90+
- added property `priceRoundingMode` to type `QuoteRequest`
91+
- added property `priceRoundingMode` to type `Quote`
7992
</details>
8093

8194
<details>

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
<details>
@@ -60,8 +64,13 @@
6064

6165
- added property `discountGroup` to type `CartDiscount`
6266
- added property `discountGroup` to type `CartDiscountDraft`
67+
- added property `priceRoundingMode` to type `Cart`
68+
- added property `priceRoundingMode` to type `CartDraft`
6369
- added property `attributes` to type `ProductTailoringCreatedMessage`
6470
- added property `attributes` to type `ProductTailoringCreatedMessagePayload`
71+
- added property `priceRoundingMode` to type `StagedOrder`
72+
- added property `priceRoundingMode` to type `Order`
73+
- added property `priceRoundingMode` to type `OrderImportDraft`
6574
- added property `attributes` to type `ProductTailoringData`
6675
- added property `attributes` to type `ProductTailoringDraft`
6776
- added property `attributes` to type `ProductTailoringInStoreDraft`
@@ -72,6 +81,10 @@
7281
- added property `attributes` to type `ProductDraft`
7382
- added property `attributes` to type `ProductProjection`
7483
- added property `/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/` to type `ProductVariantChannelAvailabilityMap`
84+
- added property `priceRoundingMode` to type `CartsConfiguration`
85+
- added property `taxRoundingMode` to type `CartsConfiguration`
86+
- added property `priceRoundingMode` to type `QuoteRequest`
87+
- added property `priceRoundingMode` to type `Quote`
7588
</details>
7689

7790
<details>

packages/importapi-sdk/src/generated/models/orders.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ export enum InventoryModeValues {
665665

666666
export type InventoryMode = 'ReserveOnOrder' | 'TrackOnly' | (string & {})
667667
/**
668-
* Maps to `Order.taxRoundingMode`.
668+
* The rounding mode representation used in `Order.priceRoundingMode` and `Order.taxRoundingMode`.
669669
*/
670670
export enum RoundingModeValues {
671671
HalfDown = 'HalfDown',

packages/platform-sdk/src/generated/models/cart.ts

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,13 @@ export interface Cart extends BaseResource {
178178
*/
179179
readonly taxMode: TaxMode
180180
/**
181-
* Indicates how monetary values are rounded when calculating taxes for `taxedPrice`.
181+
* Indicates how the total prices on [LineItems](ctp:api:type:LineItem) and [CustomLineItems](ctp:api:type:CustomLineItem) are rounded when calculated. Configured in [Project settings](ctp:api:type:CartsConfiguration).
182+
*
183+
*
184+
*/
185+
readonly priceRoundingMode: RoundingMode
186+
/**
187+
* Indicates how monetary values are rounded when calculating taxes for `taxedPrice`. Configured in [Project settings](ctp:api:type:CartsConfiguration).
182188
*
183189
*
184190
*/
@@ -422,7 +428,13 @@ export interface CartDraft {
422428
*/
423429
readonly externalTaxRateForShippingMethod?: ExternalTaxRateDraft
424430
/**
425-
* Determines how monetary values are rounded when calculating taxes for `taxedPrice`.
431+
* Determines how the total prices on [LineItems](ctp:api:type:LineItem) and [CustomLineItems](ctp:api:type:CustomLineItem) are rounded when calculated. If not set, the [default value](ctp:api:type:CartsConfiguration) configured in the [Project](ctp:api:type:Project) is used.
432+
*
433+
*
434+
*/
435+
readonly priceRoundingMode?: RoundingMode
436+
/**
437+
* Determines how monetary values are rounded when calculating taxes for `taxedPrice`. If not set, the [default value](ctp:api:type:CartsConfiguration) configured in the [Project](ctp:api:type:Project) is used.
426438
*
427439
*
428440
*/
@@ -672,6 +684,7 @@ export type CartUpdateAction =
672684
| CartChangeCustomLineItemQuantityAction
673685
| CartChangeLineItemQuantityAction
674686
| CartChangeLineItemsOrderAction
687+
| CartChangePriceRoundingModeAction
675688
| CartChangeTaxCalculationModeAction
676689
| CartChangeTaxModeAction
677690
| CartChangeTaxRoundingModeAction
@@ -2746,6 +2759,19 @@ export interface CartChangeLineItemsOrderAction extends ICartUpdateAction {
27462759
*/
27472760
readonly lineItemOrder: string[]
27482761
}
2762+
/**
2763+
* Changing the price rounding mode leads to [recalculation of taxes](/../api/carts-orders-overview#taxes).
2764+
*
2765+
*/
2766+
export interface CartChangePriceRoundingModeAction extends ICartUpdateAction {
2767+
readonly action: 'changePriceRoundingMode'
2768+
/**
2769+
* New value to set.
2770+
*
2771+
*
2772+
*/
2773+
readonly priceRoundingMode: RoundingMode
2774+
}
27492775
/**
27502776
* Changing the tax calculation mode leads to [recalculation of taxes](/../api/carts-orders-overview#taxes).
27512777
*

packages/platform-sdk/src/generated/models/order-edit.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,6 +1019,20 @@ export interface StagedOrderChangePaymentStateAction
10191019
*/
10201020
readonly paymentState: PaymentState
10211021
}
1022+
/**
1023+
* Changing the price rounding mode leads to [recalculation of taxes](/../api/carts-orders-overview#taxes).
1024+
*
1025+
*/
1026+
export interface StagedOrderChangePriceRoundingModeAction
1027+
extends IStagedOrderUpdateAction {
1028+
readonly action: 'changePriceRoundingMode'
1029+
/**
1030+
* New value to set.
1031+
*
1032+
*
1033+
*/
1034+
readonly priceRoundingMode: RoundingMode
1035+
}
10221036
/**
10231037
* Produces the [Order Shipment State Changed](ctp:api:type:OrderShipmentStateChangedMessage) Message.
10241038
*

packages/platform-sdk/src/generated/models/order.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ import {
7070
StagedOrderChangeLineItemQuantityAction,
7171
StagedOrderChangeOrderStateAction,
7272
StagedOrderChangePaymentStateAction,
73+
StagedOrderChangePriceRoundingModeAction,
7374
StagedOrderChangeShipmentStateAction,
7475
StagedOrderChangeTaxCalculationModeAction,
7576
StagedOrderChangeTaxModeAction,
@@ -180,6 +181,7 @@ export type StagedOrderUpdateAction =
180181
| StagedOrderChangeLineItemQuantityAction
181182
| StagedOrderChangeOrderStateAction
182183
| StagedOrderChangePaymentStateAction
184+
| StagedOrderChangePriceRoundingModeAction
183185
| StagedOrderChangeShipmentStateAction
184186
| StagedOrderChangeTaxCalculationModeAction
185187
| StagedOrderChangeTaxModeAction
@@ -841,6 +843,11 @@ export interface Order extends BaseResource {
841843
*
842844
*/
843845
readonly discountOnTotalPrice?: DiscountOnTotalPrice
846+
/**
847+
* Indicates how the total prices on [LineItems](ctp:api:type:LineItem) and [CustomLineItems](ctp:api:type:CustomLineItem) are rounded when calculated.
848+
*
849+
*/
850+
readonly priceRoundingMode?: RoundingMode
844851
/**
845852
* Indicates how Tax Rates are set.
846853
*
@@ -1274,6 +1281,12 @@ export interface OrderImportDraft {
12741281
*
12751282
*/
12761283
readonly taxedPrice?: TaxedPriceDraft
1284+
/**
1285+
* Determines how the total prices on [LineItems](ctp:api:type:LineItem) and [CustomLineItems](ctp:api:type:CustomLineItem) are rounded when calculated.
1286+
*
1287+
*
1288+
*/
1289+
readonly priceRoundingMode?: RoundingMode
12771290
/**
12781291
* Determines how monetary values are rounded when calculating taxes for `taxedPrice`.
12791292
*

packages/platform-sdk/src/generated/models/project.ts

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
AssociateRoleKeyReference,
99
AssociateRoleResourceIdentifier,
1010
} from './associate-role'
11+
import { RoundingMode } from './cart'
1112
import { LastModifiedBy } from './common'
1213
import { MessagesConfiguration, MessagesConfigurationDraft } from './message'
1314
import { ShippingRateTierType } from './shipping-method'
@@ -102,6 +103,20 @@ export interface CartsConfiguration {
102103
*
103104
*/
104105
readonly countryTaxRateFallbackEnabled?: boolean
106+
/**
107+
* Default value for the `priceRoundingMode` parameter of the [CartDraft](ctp:api:type:CartDraft).
108+
* Indicates how the total prices on [LineItems](ctp:api:type:LineItem) and [CustomLineItems](ctp:api:type:CustomLineItem) are rounded when calculated.
109+
*
110+
*
111+
*/
112+
readonly priceRoundingMode?: RoundingMode
113+
/**
114+
* Default value for the `taxRoundingMode` parameter of the [CartDraft](ctp:api:type:CartDraft).
115+
* Indicates how monetary values are rounded when calculating taxes for `taxedPrice`.
116+
*
117+
*
118+
*/
119+
readonly taxRoundingMode?: RoundingMode
105120
}
106121
/**
107122
* Specifies the status of the [Customer Search](/../api/projects/customer-search) index.
@@ -270,8 +285,10 @@ export type ProjectUpdateAction =
270285
| ProjectChangeMessagesConfigurationAction
271286
| ProjectChangeNameAction
272287
| ProjectChangeOrderSearchStatusAction
288+
| ProjectChangePriceRoundingModeAction
273289
| ProjectChangeProductSearchIndexingEnabledAction
274290
| ProjectChangeShoppingListsConfigurationAction
291+
| ProjectChangeTaxRoundingModeAction
275292
| ProjectSetBusinessUnitAssociateRoleOnCreationAction
276293
| ProjectSetExternalOAuthAction
277294
| ProjectSetShippingRateInputTypeAction
@@ -499,6 +516,15 @@ export interface ProjectChangeOrderSearchStatusAction
499516
*/
500517
readonly status: OrderSearchStatus
501518
}
519+
export interface ProjectChangePriceRoundingModeAction
520+
extends IProjectUpdateAction {
521+
readonly action: 'changePriceRoundingMode'
522+
/**
523+
* Project-level default rounding mode for calculating the total prices on [LineItems](ctp:api:type:LineItem) and [CustomLineItems](ctp:api:type:CustomLineItem). See [CartsConfiguration](ctp:api:type:CartsConfiguration).
524+
*
525+
*/
526+
readonly priceRoundingMode: RoundingMode
527+
}
502528
export interface ProjectChangeProductSearchIndexingEnabledAction
503529
extends IProjectUpdateAction {
504530
readonly action: 'changeProductSearchIndexingEnabled'
@@ -526,6 +552,15 @@ export interface ProjectChangeShoppingListsConfigurationAction
526552
*/
527553
readonly shoppingListsConfiguration: ShoppingListsConfiguration
528554
}
555+
export interface ProjectChangeTaxRoundingModeAction
556+
extends IProjectUpdateAction {
557+
readonly action: 'changeTaxRoundingMode'
558+
/**
559+
* Project-level default rounding mode for tax calculation. See [CartsConfiguration](ctp:api:type:CartsConfiguration).
560+
*
561+
*/
562+
readonly taxRoundingMode: RoundingMode
563+
}
529564
export interface ProjectSetBusinessUnitAssociateRoleOnCreationAction
530565
extends IProjectUpdateAction {
531566
readonly action: 'setMyBusinessUnitAssociateRoleOnCreation'

packages/platform-sdk/src/generated/models/quote-request.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,12 @@ export interface QuoteRequest extends BaseResource {
166166
*
167167
*/
168168
readonly taxMode: TaxMode
169+
/**
170+
* When calculating total prices on [LineItems](ctp:api:type:LineItem) and [CustomLineItems](ctp:api:type:CustomLineItem), the selected mode is used for rounding.
171+
*
172+
*
173+
*/
174+
readonly priceRoundingMode: RoundingMode
169175
/**
170176
* When calculating taxes for `taxedPrice`, the selected mode is used for rounding.
171177
*

packages/platform-sdk/src/generated/models/quote.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,12 @@ export interface Quote extends BaseResource {
187187
*
188188
*/
189189
readonly taxMode: TaxMode
190+
/**
191+
* When calculating total prices on [LineItems](ctp:api:type:LineItem) and [CustomLineItems](ctp:api:type:CustomLineItem), the selected mode is used for rounding.
192+
*
193+
*
194+
*/
195+
readonly priceRoundingMode: RoundingMode
190196
/**
191197
* When calculating taxes for `taxedPrice`, the selected mode is used for rounding.
192198
*

references.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,3 +427,4 @@ dad479066925f91fc733f038afb66c7919409a4c
427427
9fb33bf8c33760d7d6d74e7b6e9ed233d1a83e24
428428
ed2d65abb425bd5d142630bff5284efdfdc6449f
429429
b3b0734e82abb3a4e20169e403628c592806bc96
430+
db9aff026d30fcbfa10891780096e5fb0c140527

0 commit comments

Comments
 (0)