@@ -20,7 +20,13 @@ import {
2020 LastModifiedBy ,
2121 _BaseAddress ,
2222} from './common'
23- import { CustomerReference , CustomerResourceIdentifier } from './customer'
23+ import {
24+ CustomerGroupAssignment ,
25+ CustomerGroupAssignmentDraft ,
26+ CustomerReference ,
27+ CustomerResourceIdentifier ,
28+ } from './customer'
29+ import { CustomerGroupResourceIdentifier } from './customer-group'
2430import { StoreKeyReference , StoreResourceIdentifier } from './store'
2531import {
2632 CustomFields ,
@@ -198,6 +204,14 @@ export interface IBusinessUnit {
198204 *
199205 */
200206 readonly custom ?: CustomFields
207+ /**
208+ * Customer Groups assigned to the Business Unit.
209+ *
210+ * They are considered during [line Item price selection](/../api/pricing-and-discounts-overview#line-item-price-selection), if provided (non-null).
211+ *
212+ *
213+ */
214+ readonly customerGroupAssignments ?: CustomerGroupAssignment [ ]
201215 /**
202216 * Addresses used by the Business Unit.
203217 *
@@ -435,6 +449,14 @@ export interface IBusinessUnitDraft {
435449 *
436450 */
437451 readonly custom ?: CustomFieldsDraft
452+ /**
453+ * Customer Groups to assign the Business Unit to.
454+ *
455+ * They are considered during [line Item price selection](/../api/pricing-and-discounts-overview#line-item-price-selection), if provided (non-null).
456+ *
457+ *
458+ */
459+ readonly customerGroupAssignments ?: CustomerGroupAssignmentDraft [ ]
438460}
439461/**
440462 * [KeyReference](ctp:api:type:KeyReference) to a [BusinessUnit](ctp:api:type:BusinessUnit).
@@ -576,6 +598,7 @@ export type BusinessUnitUpdateAction =
576598 | BusinessUnitAddAddressAction
577599 | BusinessUnitAddAssociateAction
578600 | BusinessUnitAddBillingAddressIdAction
601+ | BusinessUnitAddCustomerGroupAssignmentAction
579602 | BusinessUnitAddShippingAddressIdAction
580603 | BusinessUnitAddStoreAction
581604 | BusinessUnitChangeAddressAction
@@ -588,6 +611,7 @@ export type BusinessUnitUpdateAction =
588611 | BusinessUnitRemoveAddressAction
589612 | BusinessUnitRemoveAssociateAction
590613 | BusinessUnitRemoveBillingAddressIdAction
614+ | BusinessUnitRemoveCustomerGroupAssignmentAction
591615 | BusinessUnitRemoveShippingAddressIdAction
592616 | BusinessUnitRemoveStoreAction
593617 | BusinessUnitSetAddressCustomFieldAction
@@ -596,6 +620,7 @@ export type BusinessUnitUpdateAction =
596620 | BusinessUnitSetContactEmailAction
597621 | BusinessUnitSetCustomFieldAction
598622 | BusinessUnitSetCustomTypeAction
623+ | BusinessUnitSetCustomerGroupAssignmentsAction
599624 | BusinessUnitSetDefaultBillingAddressAction
600625 | BusinessUnitSetDefaultShippingAddressAction
601626 | BusinessUnitSetStoreModeAction
@@ -702,6 +727,14 @@ export interface Company extends IBusinessUnit {
702727 *
703728 */
704729 readonly custom ?: CustomFields
730+ /**
731+ * Customer Groups assigned to the Business Unit.
732+ *
733+ * They are considered during [line Item price selection](/../api/pricing-and-discounts-overview#line-item-price-selection), if provided (non-null).
734+ *
735+ *
736+ */
737+ readonly customerGroupAssignments ?: CustomerGroupAssignment [ ]
705738 /**
706739 * Addresses used by the Business Unit.
707740 *
@@ -876,6 +909,14 @@ export interface CompanyDraft extends IBusinessUnitDraft {
876909 *
877910 */
878911 readonly custom ?: CustomFieldsDraft
912+ /**
913+ * Customer Groups to assign the Business Unit to.
914+ *
915+ * They are considered during [line Item price selection](/../api/pricing-and-discounts-overview#line-item-price-selection), if provided (non-null).
916+ *
917+ *
918+ */
919+ readonly customerGroupAssignments ?: CustomerGroupAssignmentDraft [ ]
879920}
880921/**
881922 * Business Unit type to model divisions that are part of the [Company](ctp:api:type:Company) or a higher-order Division.
@@ -972,6 +1013,14 @@ export interface Division extends IBusinessUnit {
9721013 *
9731014 */
9741015 readonly custom ?: CustomFields
1016+ /**
1017+ * Customer Groups assigned to the Business Unit.
1018+ *
1019+ * They are considered during [line Item price selection](/../api/pricing-and-discounts-overview#line-item-price-selection), if provided (non-null).
1020+ *
1021+ *
1022+ */
1023+ readonly customerGroupAssignments ?: CustomerGroupAssignment [ ]
9751024 /**
9761025 * Addresses used by the Business Unit.
9771026 *
@@ -1144,6 +1193,14 @@ export interface DivisionDraft extends IBusinessUnitDraft {
11441193 *
11451194 */
11461195 readonly custom ?: CustomFieldsDraft
1196+ /**
1197+ * Customer Groups to assign the Business Unit to.
1198+ *
1199+ * They are considered during [line Item price selection](/../api/pricing-and-discounts-overview#line-item-price-selection), if provided (non-null).
1200+ *
1201+ *
1202+ */
1203+ readonly customerGroupAssignments ?: CustomerGroupAssignmentDraft [ ]
11471204 /**
11481205 * The parent unit of this Division. Can be a Company or a Division.
11491206 *
@@ -1227,6 +1284,22 @@ export interface BusinessUnitAddBillingAddressIdAction
12271284 */
12281285 readonly addressKey ?: string
12291286}
1287+ /**
1288+ * Assigns a Customer Group to a Business Unit.
1289+ *
1290+ * This action generates the [BusinessUnitCustomerGroupAssignmentAdded](ctp:api:type:BusinessUnitCustomerGroupAssignmentAddedMessage) Message.
1291+ *
1292+ */
1293+ export interface BusinessUnitAddCustomerGroupAssignmentAction
1294+ extends IBusinessUnitUpdateAction {
1295+ readonly action : 'addCustomerGroupAssignment'
1296+ /**
1297+ * Customer Group to assign the Business Unit to.
1298+ *
1299+ *
1300+ */
1301+ readonly customerGroupAssignment : CustomerGroupAssignmentDraft
1302+ }
12301303/**
12311304 * Adding a shipping address to a [Business Unit](ctp:api:type:BusinessUnit) generates a [BusinessUnitShippingAddressAdded](ctp:api:type:BusinessUnitShippingAddressAddedMessage) Message.
12321305 *
@@ -1439,6 +1512,22 @@ export interface BusinessUnitRemoveBillingAddressIdAction
14391512 */
14401513 readonly addressKey ?: string
14411514}
1515+ /**
1516+ * Unassigns a Customer Group from a Business Unit.
1517+ *
1518+ * This action generates the [BusinessUnitCustomerGroupAssignmentRemoved](ctp:api:type:BusinessUnitCustomerGroupAssignmentRemovedMessage) Message.
1519+ *
1520+ */
1521+ export interface BusinessUnitRemoveCustomerGroupAssignmentAction
1522+ extends IBusinessUnitUpdateAction {
1523+ readonly action : 'removeCustomerGroupAssignment'
1524+ /**
1525+ * Customer Group to unassign the Business Unit from.
1526+ *
1527+ *
1528+ */
1529+ readonly customerGroup : CustomerGroupResourceIdentifier
1530+ }
14421531/**
14431532 * Removing a shipping address from a [Business Unit](ctp:api:type:BusinessUnit) generates a [BusinessUnitShippingAddressRemoved](ctp:api:type:BusinessUnitShippingAddressRemovedMessage) Message.
14441533 *
@@ -1605,6 +1694,22 @@ export interface BusinessUnitSetCustomTypeAction
16051694 */
16061695 readonly fields ?: FieldContainer
16071696}
1697+ /**
1698+ * Assigns multiple Customer Groups to a Business Unit.
1699+ *
1700+ * This action generates the [BusinessUnitCustomerGroupAssignmentsSet](ctp:api:type:BusinessUnitCustomerGroupAssignmentsSetMessage) Message.
1701+ *
1702+ */
1703+ export interface BusinessUnitSetCustomerGroupAssignmentsAction
1704+ extends IBusinessUnitUpdateAction {
1705+ readonly action : 'setCustomerGroupAssignments'
1706+ /**
1707+ * Customer Groups to assign the Business Unit to.
1708+ *
1709+ *
1710+ */
1711+ readonly customerGroupAssignments ?: CustomerGroupAssignmentDraft [ ]
1712+ }
16081713/**
16091714 * Setting the default billing address on a [Business Unit](ctp:api:type:BusinessUnit) generates the [BusinessUnitDefaultBillingAddressSet](ctp:api:type:BusinessUnitDefaultBillingAddressSetMessage) Message.
16101715 *
0 commit comments