Skip to content

Commit 62910ed

Browse files
committed
Updated API from documentation release
1 parent 37c3b42 commit 62910ed

File tree

6 files changed

+114
-0
lines changed

6 files changed

+114
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#%RAML 1.0 DataType
2+
(package): Error
3+
type: ErrorObject
4+
displayName: RecurringOrderFailureError
5+
discriminatorValue: RecurringOrderFailure
6+
description: |
7+
Returned when a subsequent Order for a [Recurring Order](ctp:api:type:RecurringOrder) could not be processed.
8+
properties:
9+
code:
10+
type: string
11+
message:
12+
type: string
13+
description: |
14+
Plain text description of the error.
15+
details:
16+
type: any
17+
description: |
18+
Details about the error's cause and the entities involved.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#%RAML 1.0 DataType
2+
(package): Error
3+
type: GraphQLErrorObject
4+
displayName: GraphQLRecurringOrderFailureError
5+
discriminatorValue: RecurringOrderFailure
6+
description: |
7+
Returned when a subsequent Order for a [Recurring Order](ctp:api:type:RecurringOrder) could not be processed.
8+
properties:
9+
code:
10+
type: string
11+
details:
12+
type: any
13+
description: |
14+
Details about the error's cause and the entities involved.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#%RAML 1.0 DataType
2+
(package): Message
3+
type: Message
4+
(beta): false
5+
displayName: RecurringOrderFailedMessage
6+
discriminatorValue: RecurringOrderFailed
7+
description: |
8+
Generated after a [RecurringOrder](ctp:api:type:RecurringOrder) failed to process an Order.
9+
properties:
10+
cartId:
11+
type: string
12+
description: |
13+
ID of the [Cart](ctp:api:type:Cart) used in the failed Order creation attempt.
14+
failedAt:
15+
type: datetime
16+
description: |
17+
Date and time (UTC) when the Order creation attempt failed.
18+
failureReason:
19+
type: string
20+
description: |
21+
Description of why the Order creation failed, such as insufficient stock.
22+
orderScheduledAt:
23+
type: datetime
24+
description: |
25+
Date and time (UTC) the Order was scheduled to be created.
26+
errors?:
27+
type: RecurringOrderFailureError[]
28+
description: |
29+
Errors due to which the Order creation failed.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#%RAML 1.0 DataType
2+
(package): Message
3+
type: MessagePayload
4+
(beta): false
5+
displayName: RecurringOrderFailedMessagePayload
6+
discriminatorValue: RecurringOrderFailed
7+
description: |
8+
Generated after a [RecurringOrder](ctp:api:type:RecurringOrder) failed to process an Order.
9+
properties:
10+
cartId:
11+
type: string
12+
description: |
13+
ID of the [Cart](ctp:api:type:Cart) used in the failed Order creation attempt.
14+
failedAt:
15+
type: datetime
16+
description: |
17+
Date and time (UTC) when the Order creation attempt failed.
18+
failureReason:
19+
type: string
20+
description: |
21+
Description of why the Order creation failed, such as insufficient stock.
22+
orderScheduledAt:
23+
type: datetime
24+
description: |
25+
Date and time (UTC) the Order was scheduled to be created.
26+
errors?:
27+
type: RecurringOrderFailureError[]
28+
description: |
29+
Errors due to which the Order creation failed.

api-specs/api/types/types.raml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,7 @@ ProductPresentWithDifferentVariantSelectionError: !include error/ProductPresentW
600600
ProjectNotConfiguredForLanguagesError: !include error/ProjectNotConfiguredForLanguagesError.raml
601601
QueryComplexityLimitExceededError: !include error/QueryComplexityLimitExceededError.raml
602602
QueryTimedOutError: !include error/QueryTimedOutError.raml
603+
RecurringOrderFailureError: !include error/RecurringOrderFailureError.raml
603604
ReferenceExistsError: !include error/ReferenceExistsError.raml
604605
ReferencedResourceNotFoundError: !include error/ReferencedResourceNotFoundError.raml
605606
RequiredFieldError: !include error/RequiredFieldError.raml
@@ -686,6 +687,7 @@ GraphQLProductPresentWithDifferentVariantSelectionError: !include error/graphql/
686687
GraphQLProjectNotConfiguredForLanguagesError: !include error/graphql/GraphQLProjectNotConfiguredForLanguagesError.raml
687688
GraphQLQueryComplexityLimitExceededError: !include error/graphql/GraphQLQueryComplexityLimitExceededError.raml
688689
GraphQLQueryTimedOutError: !include error/graphql/GraphQLQueryTimedOutError.raml
690+
GraphQLRecurringOrderFailureError: !include error/graphql/GraphQLRecurringOrderFailureError.raml
689691
GraphQLReferenceExistsError: !include error/graphql/GraphQLReferenceExistsError.raml
690692
GraphQLReferencedResourceNotFoundError: !include error/graphql/GraphQLReferencedResourceNotFoundError.raml
691693
GraphQLRequiredFieldError: !include error/graphql/GraphQLRequiredFieldError.raml
@@ -1166,6 +1168,7 @@ RecurringOrderCustomTypeRemovedMessage: !include message/RecurringOrderCustomTyp
11661168
RecurringOrderCustomTypeSetMessage: !include message/RecurringOrderCustomTypeSetMessage.raml
11671169
RecurringOrderDeletedMessage: !include message/RecurringOrderDeletedMessage.raml
11681170
RecurringOrderExpiresAtSetMessage: !include message/RecurringOrderExpiresAtSetMessage.raml
1171+
RecurringOrderFailedMessage: !include message/RecurringOrderFailedMessage.raml
11691172
RecurringOrderKeySetMessage: !include message/RecurringOrderKeySetMessage.raml
11701173
RecurringOrderScheduleSetMessage: !include message/RecurringOrderScheduleSetMessage.raml
11711174
RecurringOrderStartsAtSetMessage: !include message/RecurringOrderStartsAtSetMessage.raml
@@ -1513,6 +1516,7 @@ RecurringOrderCustomTypeRemovedMessagePayload: !include message/payload/Recurrin
15131516
RecurringOrderCustomTypeSetMessagePayload: !include message/payload/RecurringOrderCustomTypeSetMessagePayload.raml
15141517
RecurringOrderDeletedMessagePayload: !include message/payload/RecurringOrderDeletedMessagePayload.raml
15151518
RecurringOrderExpiresAtSetMessagePayload: !include message/payload/RecurringOrderExpiresAtSetMessagePayload.raml
1519+
RecurringOrderFailedMessagePayload: !include message/payload/RecurringOrderFailedMessagePayload.raml
15161520
RecurringOrderKeySetMessagePayload: !include message/payload/RecurringOrderKeySetMessagePayload.raml
15171521
RecurringOrderScheduleSetMessagePayload: !include message/payload/RecurringOrderScheduleSetMessagePayload.raml
15181522
RecurringOrderStartsAtSetMessagePayload: !include message/payload/RecurringOrderStartsAtSetMessagePayload.raml

api-specs/graphql/schema.sdl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4628,6 +4628,17 @@ input EnumValueInput {
46284628
label: String!
46294629
}
46304630

4631+
type RecurringOrderFailureError {
4632+
"Error identifier"
4633+
code: String!
4634+
4635+
"Plain text description of the cause of the error."
4636+
message: String!
4637+
4638+
"Information about the cause of the error."
4639+
details: Json!
4640+
}
4641+
46314642
type EventBridgeDestination implements Destination {
46324643
source: String!
46334644
region: String!
@@ -11045,6 +11056,15 @@ type RecurringOrderCustomFieldChanged implements MessagePayload {
1104511056
type: String!
1104611057
}
1104711058

11059+
type RecurringOrderFailed implements MessagePayload {
11060+
cartId: String!
11061+
failedAt: DateTime!
11062+
failureReason: String!
11063+
orderScheduledAt: DateTime!
11064+
errors: [RecurringOrderFailureError!]
11065+
type: String!
11066+
}
11067+
1104811068
type RecurringOrderCustomFieldRemoved implements MessagePayload {
1104911069
name: String!
1105011070
type: String!

0 commit comments

Comments
 (0)