Skip to content

Commit ae6bd28

Browse files
committed
Updated API from documentation release
1 parent 2259b69 commit ae6bd28

File tree

9 files changed

+76
-3
lines changed

9 files changed

+76
-3
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"action": "setExpiresAt",
3+
"expiresAt": "2025-10-15T15:00:00.000Z"
4+
}

api-specs/api/resources/recurring-orders.raml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,11 @@ post:
3535
- conflicting
3636
description: |
3737
Creates a Recurring Order in the Project.
38-
The Cart is validated to ensure that it is convertible to an [Order](ctp:api:type:Order). If validation fails, an error is returned.
39-
4038
Produces the [RecurringOrderCreated](ctp:api:type:RecurringOrderCreatedMessage) message.
4139
40+
The Cart is validated to ensure that it is convertible to an [Order](ctp:api:type:Order). If the validation fails, an error is returned.
41+
If the expiration date has been reached when the [Recurring Order](ctp:api:type:RecurringOrder) is processed, its [RecurringOrderState](ctp:api:type:RecurringOrderState) will be updated to `Expired`, and no Order will be created.
42+
4243
If a server-side problem occurs, indicated by a 500 Internal Server Error HTTP response, the Recurring Order creation may still successfully complete after the error is returned.
4344
If you receive this error, you should verify the status of the Recurring Order by querying a unique identifier supplied during the creation request, such as the key.
4445
body:
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#%RAML 1.0 DataType
2+
(package): Message
3+
type: Message
4+
(beta): true
5+
displayName: RecurringOrderExpiresAtSetMessage
6+
discriminatorValue: RecurringOrderExpiresAtSet
7+
description: |
8+
Generated after a successful [Set Expires At](ctp:api:type:RecurringOrderSetExpiresAtAction) update action.
9+
properties:
10+
newExpiresAt:
11+
type: datetime
12+
description: |
13+
Expiration date and time of the Recurring Order after the [Set Expires At](ctp:api:type:RecurringOrderSetExpiresAtAction) update action.
14+
oldExpiresAt:
15+
type: datetime
16+
description: |
17+
Expiration date and time of the Recurring Order before the [Set Expires At](ctp:api:type:RecurringOrderSetExpiresAtAction) update action.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#%RAML 1.0 DataType
2+
(package): Message
3+
type: MessagePayload
4+
(beta): true
5+
displayName: RecurringOrderExpiresAtSetMessagePayload
6+
discriminatorValue: RecurringOrderExpiresAtSet
7+
description: |
8+
Generated after a successful [Set Expires At](ctp:api:type:RecurringOrderSetExpiresAtAction) update action.
9+
properties:
10+
newExpiresAt:
11+
type: datetime
12+
description: |
13+
Expiration date and time of the Recurring Order after the [Set Expires At](ctp:api:type:RecurringOrderSetExpiresAtAction) update action.
14+
oldExpiresAt:
15+
type: datetime
16+
description: |
17+
Expiration date and time of the Recurring Order before the [Set Expires At](ctp:api:type:RecurringOrderSetExpiresAtAction) update action.

api-specs/api/types/recurring-order/RecurringOrderDraft.raml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ properties:
2626
type: datetime
2727
description: |
2828
Date and time (UTC) when the RecurringOrder will start.
29+
expiresAt?:
30+
type: datetime
31+
description: |
32+
Date and time (UTC) when the RecurringOrder will expire.
2933
state?:
3034
type: StateResourceIdentifier
3135
description: |
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): RecurringOrder
3+
type: RecurringOrderUpdateAction
4+
displayName: RecurringOrderSetExpiresAtAction
5+
(beta): true
6+
discriminatorValue: setExpiresAt
7+
example: !include ../../../examples/RecurringOrder/RecurringOrderSetExpiresAtAction.json
8+
description: |
9+
Setting the expiration date and time generates the [RecurringOrderExpiresAtSet](ctp:api:type:RecurringOrderExpiresAtSetMessage) Message.
10+
properties:
11+
expiresAt?:
12+
type: datetime
13+
description: |
14+
Date and time (UTC) the Recurring Order should expire. If empty, any existing value will be removed.
15+
16+
If the date or time is extended or removed when the [RecurringOrderState](ctp:api:type:RecurringOrderState) is `Expired`, the state will be updated to `Active`.

api-specs/api/types/recurring-order/updates/RecurringOrderSetOrderSkipConfigurationAction.raml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ properties:
1313
updatedExpiresAt?:
1414
type: datetime
1515
description: |
16-
Date and time (UTC) the Recurring Order will resume and start to generate new orders.
16+
Date and time (UTC) the Recurring Order will expire and stop generating new orders.

api-specs/api/types/types.raml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,6 +1154,7 @@ RecurringOrderCustomFieldRemovedMessage: !include message/RecurringOrderCustomFi
11541154
RecurringOrderCustomTypeRemovedMessage: !include message/RecurringOrderCustomTypeRemovedMessage.raml
11551155
RecurringOrderCustomTypeSetMessage: !include message/RecurringOrderCustomTypeSetMessage.raml
11561156
RecurringOrderDeletedMessage: !include message/RecurringOrderDeletedMessage.raml
1157+
RecurringOrderExpiresAtSetMessage: !include message/RecurringOrderExpiresAtSetMessage.raml
11571158
RecurringOrderKeySetMessage: !include message/RecurringOrderKeySetMessage.raml
11581159
RecurringOrderScheduleSetMessage: !include message/RecurringOrderScheduleSetMessage.raml
11591160
RecurringOrderStartsAtSetMessage: !include message/RecurringOrderStartsAtSetMessage.raml
@@ -1492,6 +1493,7 @@ RecurringOrderCustomFieldRemovedMessagePayload: !include message/payload/Recurri
14921493
RecurringOrderCustomTypeRemovedMessagePayload: !include message/payload/RecurringOrderCustomTypeRemovedMessagePayload.raml
14931494
RecurringOrderCustomTypeSetMessagePayload: !include message/payload/RecurringOrderCustomTypeSetMessagePayload.raml
14941495
RecurringOrderDeletedMessagePayload: !include message/payload/RecurringOrderDeletedMessagePayload.raml
1496+
RecurringOrderExpiresAtSetMessagePayload: !include message/payload/RecurringOrderExpiresAtSetMessagePayload.raml
14951497
RecurringOrderKeySetMessagePayload: !include message/payload/RecurringOrderKeySetMessagePayload.raml
14961498
RecurringOrderScheduleSetMessagePayload: !include message/payload/RecurringOrderScheduleSetMessagePayload.raml
14971499
RecurringOrderStartsAtSetMessagePayload: !include message/payload/RecurringOrderStartsAtSetMessagePayload.raml
@@ -2255,6 +2257,7 @@ SkipConfiguration: !include recurring-order/SkipConfiguration.raml
22552257
SkipConfigurationDraft: !include recurring-order/SkipConfigurationDraft.raml
22562258
RecurringOrderSetCustomFieldAction: !include recurring-order/updates/RecurringOrderSetCustomFieldAction.raml
22572259
RecurringOrderSetCustomTypeAction: !include recurring-order/updates/RecurringOrderSetCustomTypeAction.raml
2260+
RecurringOrderSetExpiresAtAction: !include recurring-order/updates/RecurringOrderSetExpiresAtAction.raml
22582261
RecurringOrderSetKeyAction: !include recurring-order/updates/RecurringOrderSetKeyAction.raml
22592262
# yamllint disable-line rule:line-length
22602263
RecurringOrderSetOrderSkipConfigurationAction: !include recurring-order/updates/RecurringOrderSetOrderSkipConfigurationAction.raml

api-specs/graphql/schema.sdl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10872,6 +10872,12 @@ input RecurringOrderExpiredInput {
1087210872
dummy: String
1087310873
}
1087410874

10875+
type RecurringOrderExpiresAtSet implements MessagePayload {
10876+
newExpiresAt: DateTime
10877+
oldExpiresAt: DateTime
10878+
type: String!
10879+
}
10880+
1087510881
type RecurringOrderKeySet implements MessagePayload {
1087610882
key: String
1087710883
oldKey: String
@@ -10935,6 +10941,7 @@ type RecurringOrderStateTransition implements MessagePayload {
1093510941
}
1093610942

1093710943
input RecurringOrderUpdateAction {
10944+
setExpiresAt: SetRecurringOrderExpiresAt
1093810945
setKey: SetRecurringOrderKey
1093910946
setOrderSkipConfiguration: SetRecurringOrderOrderSkipConfiguration
1094010947
setCustomField: SetRecurringOrderCustomField
@@ -13430,6 +13437,10 @@ input SetRecurringOrderCustomType {
1343013437
typeId: String
1343113438
}
1343213439

13440+
input SetRecurringOrderExpiresAt {
13441+
expiresAt: DateTime
13442+
}
13443+
1343313444
input SetRecurringOrderKey {
1343413445
key: String
1343513446
}

0 commit comments

Comments
 (0)