diff --git a/api-specs/api/examples/Customer/CustomerAddCustomerGroupAssignmentAction.json b/api-specs/api/examples/Customer/CustomerAddCustomerGroupAssignmentAction.json new file mode 100644 index 000000000..759435959 --- /dev/null +++ b/api-specs/api/examples/Customer/CustomerAddCustomerGroupAssignmentAction.json @@ -0,0 +1,9 @@ +{ + "action": "addCustomerGroupAssignment", + "customerGroupAssignment": { + "customerGroup": { + "id": "{{customer-group-id}}", + "typeId": "customer-group" + } + } +} \ No newline at end of file diff --git a/api-specs/api/examples/Customer/CustomerGroupAssignment.json b/api-specs/api/examples/Customer/CustomerGroupAssignment.json new file mode 100644 index 000000000..8b4f2ce1b --- /dev/null +++ b/api-specs/api/examples/Customer/CustomerGroupAssignment.json @@ -0,0 +1,6 @@ +{ + "customerGroup": { + "typeId": "customer-group", + "id": "customer-group-1" + } +} diff --git a/api-specs/api/examples/Customer/CustomerRemoveCustomerGroupAssignmentAction.json b/api-specs/api/examples/Customer/CustomerRemoveCustomerGroupAssignmentAction.json new file mode 100644 index 000000000..63c520370 --- /dev/null +++ b/api-specs/api/examples/Customer/CustomerRemoveCustomerGroupAssignmentAction.json @@ -0,0 +1,7 @@ +{ + "action": "removeCustomerGroupAssignment", + "customerGroup": { + "id": "{{customer-group-id}}", + "typeId": "customer-group" + } +} diff --git a/api-specs/api/examples/Customer/CustomerSetCustomerGroupAssignmentsAction.json b/api-specs/api/examples/Customer/CustomerSetCustomerGroupAssignmentsAction.json new file mode 100644 index 000000000..32a20eff4 --- /dev/null +++ b/api-specs/api/examples/Customer/CustomerSetCustomerGroupAssignmentsAction.json @@ -0,0 +1,17 @@ +{ + "action": "setCustomerGroupAssignments", + "customerGroupAssignments": [ + { + "customerGroup": { + "id": "{{customer-group-id-1}}", + "typeId": "customer-group" + } + }, + { + "customerGroup": { + "id": "{{customer-group-id-2}}", + "typeId": "customer-group" + } + } + ] +} \ No newline at end of file diff --git a/api-specs/api/types/customer/Customer.raml b/api-specs/api/types/customer/Customer.raml index 5d58a511a..9e8e1d6d6 100644 --- a/api-specs/api/types/customer/Customer.raml +++ b/api-specs/api/types/customer/Customer.raml @@ -140,3 +140,8 @@ properties: description: | Indicates whether the `password` is required for the Customer. default: Password + customerGroupAssignments?: + type: CustomerGroupAssignment[] + (beta): true + description: | + Customer Groups of the Customer. diff --git a/api-specs/api/types/customer/CustomerDraft.raml b/api-specs/api/types/customer/CustomerDraft.raml index 66c71e0c7..3c4c1e34f 100644 --- a/api-specs/api/types/customer/CustomerDraft.raml +++ b/api-specs/api/types/customer/CustomerDraft.raml @@ -135,3 +135,8 @@ properties: - Set to `Password` to make the `password` field required for the Customer. - Set to `ExternalAuth` when the password is not required for the Customer. default: Password + customerGroupAssignments?: + type: CustomerGroupAssignmentDraft[] + (beta): true + description: | + Customer Groups to assign to the Customer. diff --git a/api-specs/api/types/customer/CustomerGroupAssignment.raml b/api-specs/api/types/customer/CustomerGroupAssignment.raml new file mode 100644 index 000000000..1adb6ec72 --- /dev/null +++ b/api-specs/api/types/customer/CustomerGroupAssignment.raml @@ -0,0 +1,13 @@ +#%RAML 1.0 DataType +(package): Customer +type: object +(beta): true +displayName: CustomerGroupAssignment +example: !include ../../examples/Customer/CustomerGroupAssignment.json +description: | + Represents an individual Customer Group assignment as a [Reference](ctp:api:type:Reference) to a [CustomerGroup](ctp:api:type:CustomerGroup). +properties: + customerGroup: + type: CustomerGroupReference + description: | + Reference to a Customer Group. diff --git a/api-specs/api/types/customer/CustomerGroupAssignmentDraft.raml b/api-specs/api/types/customer/CustomerGroupAssignmentDraft.raml new file mode 100644 index 000000000..0c22f7a6a --- /dev/null +++ b/api-specs/api/types/customer/CustomerGroupAssignmentDraft.raml @@ -0,0 +1,10 @@ +#%RAML 1.0 DataType +(package): Customer +displayName: CustomerGroupAssignmentDraft +type: object +(beta): true +properties: + customerGroup: + type: CustomerGroupResourceIdentifier + description: | + ResourceIdentifier of a Customer Group. diff --git a/api-specs/api/types/customer/updates/CustomerAddCustomerGroupAssignmentAction.raml b/api-specs/api/types/customer/updates/CustomerAddCustomerGroupAssignmentAction.raml new file mode 100644 index 000000000..97332b787 --- /dev/null +++ b/api-specs/api/types/customer/updates/CustomerAddCustomerGroupAssignmentAction.raml @@ -0,0 +1,14 @@ +#%RAML 1.0 DataType +(package): Customer +type: CustomerUpdateAction +(beta): true +displayName: CustomerAddCustomerGroupAssignmentAction +discriminatorValue: addCustomerGroupAssignment +example: !include ../../../examples/Customer/CustomerAddCustomerGroupAssignmentAction.json +description: | + Adds a single Customer Group to the Customer's list of `customerGroupAssignments`. Adding a Customer Group generates the [CustomerGroupAssignmentAdded](ctp:api:type:CustomerGroupAssignmentAddedMessage) Message. +properties: + customerGroupAssignment: + type: CustomerGroupAssignmentDraft + description: | + Customer Group to assign to the Customer. diff --git a/api-specs/api/types/customer/updates/CustomerRemoveCustomerGroupAssignmentAction.raml b/api-specs/api/types/customer/updates/CustomerRemoveCustomerGroupAssignmentAction.raml new file mode 100644 index 000000000..a9d1ece10 --- /dev/null +++ b/api-specs/api/types/customer/updates/CustomerRemoveCustomerGroupAssignmentAction.raml @@ -0,0 +1,14 @@ +#%RAML 1.0 DataType +(package): Customer +type: CustomerUpdateAction +(beta): true +displayName: CustomerRemoveCustomerGroupAssignmentAction +discriminatorValue: removeCustomerGroupAssignment +example: !include ../../../examples/Customer/CustomerRemoveCustomerGroupAssignmentAction.json +description: | + Unassigns a Customer Group from a Customer. Unassigning a Customer Group generates the [CustomerGroupAssignmentRemoved](ctp:api:type:CustomerGroupAssignmentRemovedMessage) Message. +properties: + customerGroup: + type: CustomerGroupResourceIdentifier + description: | + Customer Group to unassign from the Customer. diff --git a/api-specs/api/types/customer/updates/CustomerSetCustomerGroupAssignmentsAction.raml b/api-specs/api/types/customer/updates/CustomerSetCustomerGroupAssignmentsAction.raml new file mode 100644 index 000000000..d24fcb502 --- /dev/null +++ b/api-specs/api/types/customer/updates/CustomerSetCustomerGroupAssignmentsAction.raml @@ -0,0 +1,14 @@ +#%RAML 1.0 DataType +(package): Customer +type: CustomerUpdateAction +(beta): true +displayName: CustomerSetCustomerGroupAssignmentsAction +discriminatorValue: setCustomerGroupAssignments +example: !include ../../../examples/Customer/CustomerSetCustomerGroupAssignmentsAction.json +description: | + Assigns multiple Customer Groups to a Customer. Assigning Customer Groups generates the [CustomerGroupAssignmentsSetMessage](ctp:api:type:CustomerGroupAssignmentsSetMessage) Message. +properties: + customerGroupAssignments: + type: CustomerGroupAssignmentDraft[] + description: | + Customer Groups to assign to the Customer. diff --git a/api-specs/api/types/message/CustomerGroupAssignmentAddedMessage.raml b/api-specs/api/types/message/CustomerGroupAssignmentAddedMessage.raml new file mode 100644 index 000000000..e6735002a --- /dev/null +++ b/api-specs/api/types/message/CustomerGroupAssignmentAddedMessage.raml @@ -0,0 +1,13 @@ +#%RAML 1.0 DataType +(package): Message +type: Message +(beta): true +displayName: CustomerGroupAssignmentAddedMessage +discriminatorValue: CustomerGroupAssignmentAdded +description: | + Generated after a successful [Add CustomerGroupAssignment](ctp:api:type:CustomerAddCustomerGroupAssignmentAction) update action. +properties: + customerGroupAssignment: + type: CustomerGroupAssignment + description: | + [CustomerGroupAssignment](ctp:api:type:CustomerGroupAssignment) that was added during the [Add CustomerGroupAssignment](ctp:api:type:CustomerAddCustomerGroupAssignmentAction) update action. diff --git a/api-specs/api/types/message/CustomerGroupAssignmentRemovedMessage.raml b/api-specs/api/types/message/CustomerGroupAssignmentRemovedMessage.raml new file mode 100644 index 000000000..054a28446 --- /dev/null +++ b/api-specs/api/types/message/CustomerGroupAssignmentRemovedMessage.raml @@ -0,0 +1,13 @@ +#%RAML 1.0 DataType +(package): Message +type: Message +(beta): true +displayName: CustomerGroupAssignmentRemovedMessage +discriminatorValue: CustomerGroupAssignmentRemoved +description: | + Generated after a successful [Remove CustomerGroupAssignment](ctp:api:type:CustomerRemoveCustomerGroupAssignmentAction) update action. +properties: + customerGroupAssignment: + type: CustomerGroupReference + description: | + [CustomerGroupAssignment](ctp:api:type:CustomerGroupAssignment) that was removed during the [Remove CustomerGroupAssignment](ctp:api:type:CustomerRemoveCustomerGroupAssignmentAction) update action. diff --git a/api-specs/api/types/message/CustomerGroupAssignmentsSetMessage.raml b/api-specs/api/types/message/CustomerGroupAssignmentsSetMessage.raml new file mode 100644 index 000000000..f60383ed3 --- /dev/null +++ b/api-specs/api/types/message/CustomerGroupAssignmentsSetMessage.raml @@ -0,0 +1,13 @@ +#%RAML 1.0 DataType +(package): Message +type: Message +(beta): true +displayName: CustomerGroupAssignmentsSetMessage +discriminatorValue: CustomerGroupAssignmentsSet +description: | + Generated after a successful [Set CustomerGroupAssignments](ctp:api:type:CustomerSetCustomerGroupAssignmentsAction) update action. +properties: + customerGroupAssignments?: + type: CustomerGroupAssignment[] + description: | + List of [CustomerGroupAssignments](ctp:api:type:CustomerGroupAssignment) that were set during the [Set CustomerGroupAssignments](ctp:api:type:CustomerSetCustomerGroupAssignmentsAction) update action. diff --git a/api-specs/api/types/message/payload/CustomerGroupAssignmentAddedMessagePayload.raml b/api-specs/api/types/message/payload/CustomerGroupAssignmentAddedMessagePayload.raml new file mode 100644 index 000000000..9ef30029f --- /dev/null +++ b/api-specs/api/types/message/payload/CustomerGroupAssignmentAddedMessagePayload.raml @@ -0,0 +1,13 @@ +#%RAML 1.0 DataType +(package): Message +type: MessagePayload +(beta): true +displayName: CustomerGroupAssignmentAddedMessagePayload +discriminatorValue: CustomerGroupAssignmentAdded +description: | + Generated after a successful [Add CustomerGroupAssignment](ctp:api:type:CustomerAddCustomerGroupAssignmentAction) update action. +properties: + customerGroupAssignment: + type: CustomerGroupAssignment + description: | + [CustomerGroupAssignment](ctp:api:type:CustomerGroupAssignment) that was added during the [Add CustomerGroupAssignment](ctp:api:type:CustomerAddCustomerGroupAssignmentAction) update action. diff --git a/api-specs/api/types/message/payload/CustomerGroupAssignmentRemovedMessagePayload.raml b/api-specs/api/types/message/payload/CustomerGroupAssignmentRemovedMessagePayload.raml new file mode 100644 index 000000000..418199ecb --- /dev/null +++ b/api-specs/api/types/message/payload/CustomerGroupAssignmentRemovedMessagePayload.raml @@ -0,0 +1,13 @@ +#%RAML 1.0 DataType +(package): Message +type: MessagePayload +(beta): true +displayName: CustomerGroupAssignmentRemovedMessagePayload +discriminatorValue: CustomerGroupAssignmentRemoved +description: | + Generated after a successful [Remove CustomerGroupAssignment](ctp:api:type:CustomerRemoveCustomerGroupAssignmentAction) update action. +properties: + customerGroupAssignment: + type: CustomerGroupReference + description: | + [CustomerGroupAssignment](ctp:api:type:CustomerGroupAssignment) that was removed during the [Remove CustomerGroupAssignment](ctp:api:type:CustomerRemoveCustomerGroupAssignmentAction) update action. diff --git a/api-specs/api/types/message/payload/CustomerGroupAssignmentsSetMessagePayload.raml b/api-specs/api/types/message/payload/CustomerGroupAssignmentsSetMessagePayload.raml new file mode 100644 index 000000000..52da0f8b0 --- /dev/null +++ b/api-specs/api/types/message/payload/CustomerGroupAssignmentsSetMessagePayload.raml @@ -0,0 +1,13 @@ +#%RAML 1.0 DataType +(package): Message +type: MessagePayload +(beta): true +displayName: CustomerGroupAssignmentsSetMessagePayload +discriminatorValue: CustomerGroupAssignmentsSet +description: | + Generated after a successful [Set CustomerGroupAssignments](ctp:api:type:CustomerSetCustomerGroupAssignmentsAction) update action. +properties: + customerGroupAssignments?: + type: CustomerGroupAssignment[] + description: | + List of [CustomerGroupAssignments](ctp:api:type:CustomerGroupAssignment) that were set during the [Set CustomerGroupAssignments](ctp:api:type:CustomerSetCustomerGroupAssignmentsAction) update action. diff --git a/api-specs/api/types/types.raml b/api-specs/api/types/types.raml index 3f0f89d16..9dbc69322 100644 --- a/api-specs/api/types/types.raml +++ b/api-specs/api/types/types.raml @@ -420,6 +420,8 @@ CustomerCreatePasswordResetToken: !include customer/CustomerCreatePasswordResetT CustomerDraft: !include customer/CustomerDraft.raml CustomerEmailTokenReference: !include customer/CustomerEmailTokenReference.raml CustomerEmailVerify: !include customer/CustomerEmailVerify.raml +CustomerGroupAssignment: !include customer/CustomerGroupAssignment.raml +CustomerGroupAssignmentDraft: !include customer/CustomerGroupAssignmentDraft.raml CustomerPagedQueryResponse: !include customer/CustomerPagedQueryResponse.raml CustomerPasswordTokenReference: !include customer/CustomerPasswordTokenReference.raml CustomerReference: !include customer/CustomerReference.raml @@ -436,12 +438,14 @@ MyCustomerResetPassword: !include customer/MyCustomerResetPassword.raml MyCustomerSignin: !include customer/MyCustomerSignin.raml CustomerAddAddressAction: !include customer/updates/CustomerAddAddressAction.raml CustomerAddBillingAddressIdAction: !include customer/updates/CustomerAddBillingAddressIdAction.raml +CustomerAddCustomerGroupAssignmentAction: !include customer/updates/CustomerAddCustomerGroupAssignmentAction.raml CustomerAddShippingAddressIdAction: !include customer/updates/CustomerAddShippingAddressIdAction.raml CustomerAddStoreAction: !include customer/updates/CustomerAddStoreAction.raml CustomerChangeAddressAction: !include customer/updates/CustomerChangeAddressAction.raml CustomerChangeEmailAction: !include customer/updates/CustomerChangeEmailAction.raml CustomerRemoveAddressAction: !include customer/updates/CustomerRemoveAddressAction.raml CustomerRemoveBillingAddressIdAction: !include customer/updates/CustomerRemoveBillingAddressIdAction.raml +CustomerRemoveCustomerGroupAssignmentAction: !include customer/updates/CustomerRemoveCustomerGroupAssignmentAction.raml CustomerRemoveShippingAddressIdAction: !include customer/updates/CustomerRemoveShippingAddressIdAction.raml CustomerRemoveStoreAction: !include customer/updates/CustomerRemoveStoreAction.raml CustomerSetAddressCustomFieldAction: !include customer/updates/CustomerSetAddressCustomFieldAction.raml @@ -451,6 +455,7 @@ CustomerSetCompanyNameAction: !include customer/updates/CustomerSetCompanyNameAc CustomerSetCustomFieldAction: !include customer/updates/CustomerSetCustomFieldAction.raml CustomerSetCustomTypeAction: !include customer/updates/CustomerSetCustomTypeAction.raml CustomerSetCustomerGroupAction: !include customer/updates/CustomerSetCustomerGroupAction.raml +CustomerSetCustomerGroupAssignmentsAction: !include customer/updates/CustomerSetCustomerGroupAssignmentsAction.raml CustomerSetCustomerNumberAction: !include customer/updates/CustomerSetCustomerNumberAction.raml CustomerSetDateOfBirthAction: !include customer/updates/CustomerSetDateOfBirthAction.raml CustomerSetDefaultBillingAddressAction: !include customer/updates/CustomerSetDefaultBillingAddressAction.raml @@ -903,6 +908,9 @@ CustomerEmailChangedMessage: !include message/CustomerEmailChangedMessage.raml CustomerEmailTokenCreatedMessage: !include message/CustomerEmailTokenCreatedMessage.raml CustomerEmailVerifiedMessage: !include message/CustomerEmailVerifiedMessage.raml CustomerFirstNameSetMessage: !include message/CustomerFirstNameSetMessage.raml +CustomerGroupAssignmentAddedMessage: !include message/CustomerGroupAssignmentAddedMessage.raml +CustomerGroupAssignmentRemovedMessage: !include message/CustomerGroupAssignmentRemovedMessage.raml +CustomerGroupAssignmentsSetMessage: !include message/CustomerGroupAssignmentsSetMessage.raml CustomerGroupCustomFieldAddedMessage: !include message/CustomerGroupCustomFieldAddedMessage.raml CustomerGroupCustomFieldChangedMessage: !include message/CustomerGroupCustomFieldChangedMessage.raml CustomerGroupCustomFieldRemovedMessage: !include message/CustomerGroupCustomFieldRemovedMessage.raml @@ -1161,6 +1169,9 @@ CustomerEmailChangedMessagePayload: !include message/payload/CustomerEmailChange CustomerEmailTokenCreatedMessagePayload: !include message/payload/CustomerEmailTokenCreatedMessagePayload.raml CustomerEmailVerifiedMessagePayload: !include message/payload/CustomerEmailVerifiedMessagePayload.raml CustomerFirstNameSetMessagePayload: !include message/payload/CustomerFirstNameSetMessagePayload.raml +CustomerGroupAssignmentAddedMessagePayload: !include message/payload/CustomerGroupAssignmentAddedMessagePayload.raml +CustomerGroupAssignmentRemovedMessagePayload: !include message/payload/CustomerGroupAssignmentRemovedMessagePayload.raml +CustomerGroupAssignmentsSetMessagePayload: !include message/payload/CustomerGroupAssignmentsSetMessagePayload.raml CustomerGroupCustomFieldAddedMessagePayload: !include message/payload/CustomerGroupCustomFieldAddedMessagePayload.raml # yamllint disable-line rule:line-length CustomerGroupCustomFieldChangedMessagePayload: !include message/payload/CustomerGroupCustomFieldChangedMessagePayload.raml