Skip to content

Commit

Permalink
Updated API from documentation release
Browse files Browse the repository at this point in the history
  • Loading branch information
ct-sdks[bot] committed Jul 1, 2024
1 parent 8a12e95 commit 89eb1ab
Show file tree
Hide file tree
Showing 18 changed files with 203 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"action": "addCustomerGroupAssignment",
"customerGroupAssignment": {
"customerGroup": {
"id": "{{customer-group-id}}",
"typeId": "customer-group"
}
}
}
6 changes: 6 additions & 0 deletions api-specs/api/examples/Customer/CustomerGroupAssignment.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"customerGroup": {
"typeId": "customer-group",
"id": "customer-group-1"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"action": "removeCustomerGroupAssignment",
"customerGroup": {
"id": "{{customer-group-id}}",
"typeId": "customer-group"
}
}
Original file line number Diff line number Diff line change
@@ -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"
}
}
]
}
5 changes: 5 additions & 0 deletions api-specs/api/types/customer/Customer.raml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
5 changes: 5 additions & 0 deletions api-specs/api/types/customer/CustomerDraft.raml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
13 changes: 13 additions & 0 deletions api-specs/api/types/customer/CustomerGroupAssignment.raml
Original file line number Diff line number Diff line change
@@ -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.
10 changes: 10 additions & 0 deletions api-specs/api/types/customer/CustomerGroupAssignmentDraft.raml
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -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.
11 changes: 11 additions & 0 deletions api-specs/api/types/types.raml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 89eb1ab

Please sign in to comment.