Skip to content

Commit 6298096

Browse files
committed
Updated API from documentation release
1 parent cb87829 commit 6298096

16 files changed

Lines changed: 231 additions & 0 deletions
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"action": "addCustomerGroupAssignment",
3+
"customerGroupAssignment": {
4+
"customerGroup": {
5+
"id": "{{customer-group-id}}",
6+
"typeId": "customer-group"
7+
}
8+
}
9+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"action": "removeCustomerGroupAssignment",
3+
"customerGroup": {
4+
"id": "{{customer-group-id}}",
5+
"typeId": "customer-group"
6+
}
7+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"action": "setCustomerGroupAssignments",
3+
"customerGroupAssignments": [
4+
{
5+
"customerGroup": {
6+
"id": "{{customer-group-id-1}}",
7+
"typeId": "customer-group"
8+
}
9+
},
10+
{
11+
"customerGroup": {
12+
"id": "{{customer-group-id-2}}",
13+
"typeId": "customer-group"
14+
}
15+
}
16+
]
17+
}

api-specs/api/types/business-unit/BusinessUnit.raml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@ properties:
7878
type: CustomFields
7979
description: |
8080
Custom Fields for the Business Unit.
81+
customerGroupAssignments?:
82+
type: CustomerGroupAssignment[]
83+
(beta): true
84+
description: |
85+
Customer Groups assigned to the Business Unit.
86+
87+
They are considered during [line Item price selection](/../api/pricing-and-discounts-overview#line-item-price-selection), if provided (non-null).
8188
addresses:
8289
type: Address[]
8390
description: |

api-specs/api/types/business-unit/BusinessUnitDraft.raml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,10 @@ properties:
8585
type: CustomFieldsDraft
8686
description: |
8787
Custom Fields for the Business Unit.
88+
customerGroupAssignments?:
89+
type: CustomerGroupAssignmentDraft[]
90+
(beta): true
91+
description: |
92+
Customer Groups to assign the Business Unit to.
93+
94+
They are considered during [line Item price selection](/../api/pricing-and-discounts-overview#line-item-price-selection), if provided (non-null).
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#%RAML 1.0 DataType
2+
(package): BusinessUnit
3+
type: BusinessUnitUpdateAction
4+
(beta): true
5+
displayName: BusinessUnitAddCustomerGroupAssignmentAction
6+
discriminatorValue: addCustomerGroupAssignment
7+
example: !include ../../../examples/BusinessUnit/BusinessUnitAddCustomerGroupAssignmentAction.json
8+
description: |
9+
Assigns a Customer Group to a Business Unit.
10+
11+
This action generates the [BusinessUnitCustomerGroupAssignmentAdded](ctp:api:type:BusinessUnitCustomerGroupAssignmentAddedMessage) Message.
12+
properties:
13+
customerGroupAssignment:
14+
type: CustomerGroupAssignmentDraft
15+
description: |
16+
Customer Group to assign the Business Unit to.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#%RAML 1.0 DataType
2+
(package): BusinessUnit
3+
type: BusinessUnitUpdateAction
4+
(beta): true
5+
displayName: BusinessUnitRemoveCustomerGroupAssignmentAction
6+
discriminatorValue: removeCustomerGroupAssignment
7+
example: !include ../../../examples/BusinessUnit/BusinessUnitRemoveCustomerGroupAssignmentAction.json
8+
description: |
9+
Unassigns a Customer Group from a Business Unit.
10+
11+
This action generates the [BusinessUnitCustomerGroupAssignmentRemoved](ctp:api:type:BusinessUnitCustomerGroupAssignmentRemovedMessage) Message.
12+
properties:
13+
customerGroup:
14+
type: CustomerGroupResourceIdentifier
15+
description: |
16+
Customer Group to unassign the Business Unit from.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#%RAML 1.0 DataType
2+
(package): BusinessUnit
3+
type: BusinessUnitUpdateAction
4+
(beta): true
5+
displayName: BusinessUnitSetCustomerGroupAssignmentsAction
6+
discriminatorValue: setCustomerGroupAssignments
7+
example: !include ../../../examples/BusinessUnit/BusinessUnitSetCustomerGroupAssignmentsAction.json
8+
description: |
9+
Assigns multiple Customer Groups to a Business Unit.
10+
11+
This action generates the [BusinessUnitCustomerGroupAssignmentsSet](ctp:api:type:BusinessUnitCustomerGroupAssignmentsSetMessage) Message.
12+
properties:
13+
customerGroupAssignments?:
14+
type: CustomerGroupAssignmentDraft[]
15+
description: |
16+
Customer Groups to assign the Business Unit to.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#%RAML 1.0 DataType
2+
(package): Message
3+
type: Message
4+
(beta): true
5+
displayName: BusinessUnitCustomerGroupAssignmentAddedMessage
6+
discriminatorValue: BusinessUnitCustomerGroupAssignmentAdded
7+
description: |
8+
Generated after a successful [Add CustomerGroupAssignment](ctp:api:type:BusinessUnitAddCustomerGroupAssignmentAction) update action.
9+
properties:
10+
customerGroupAssignment:
11+
type: CustomerGroupAssignment
12+
description: |
13+
Customer Group assigned to the Business Unit during the [Add CustomerGroupAssignment](ctp:api:type:BusinessUnitAddCustomerGroupAssignmentAction) update action.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#%RAML 1.0 DataType
2+
(package): Message
3+
type: Message
4+
(beta): true
5+
displayName: BusinessUnitCustomerGroupAssignmentRemovedMessage
6+
discriminatorValue: BusinessUnitCustomerGroupAssignmentRemoved
7+
description: |
8+
Generated after a successful [Remove CustomerGroupAssignment](ctp:api:type:BusinessUnitRemoveCustomerGroupAssignmentAction) update action.
9+
properties:
10+
customerGroupAssignment:
11+
type: CustomerGroupAssignment
12+
description: |
13+
Customer Group unassigned from the Business Unit during the [Remove CustomerGroupAssignment](ctp:api:type:BusinessUnitRemoveCustomerGroupAssignmentAction) update action.

0 commit comments

Comments
 (0)