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 Jun 13, 2024
1 parent a1588f9 commit 61d668b
Show file tree
Hide file tree
Showing 50 changed files with 478 additions and 207 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"type": "error:init:bad_config",
"severity": "error",
"code": "project_deactivated",
"message": "commercetools Checkout {projectKey} is deactivated.",
"payload": {
"project": {
"key": "{projectKey}"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"type": "info:order:status",
"severity": "info",
"code": "order_created",
"message": "Order {orderId} created.",
"payload": {
"order": {
"id": "{orderId}"
}
}
}
}
20 changes: 0 additions & 20 deletions api-specs/checkout/types/responses/AdyenBadConfig.raml

This file was deleted.

20 changes: 0 additions & 20 deletions api-specs/checkout/types/responses/AdyenInitError.raml

This file was deleted.

20 changes: 0 additions & 20 deletions api-specs/checkout/types/responses/AdyenTimeout.raml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ properties:
code:
type: string
description:
type:
severity:
type: string
description: \`error:init:bad_config`
description: \`error`
message:
type: string
description: Application `{applicationKey}` for commercetools Checkout `{projectKey}` is disabled.
payload?:
payload:
type: object
description: An object containing `projectKey` and `applicationKey`.
description: Contains the `project` and `application` objects with the related `key` property.
8 changes: 4 additions & 4 deletions api-specs/checkout/types/responses/ApplicationNotFound.raml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ properties:
code:
type: string
description:
type:
severity:
type: string
description: \`error:init:bad_config`
description: \`error`
message:
type: string
description: Application `{applicationKey}` for commercetools Checkout `{projectKey}` not found.
payload?:
payload:
type: object
description: An object containing `projectKey` and `applicationKey`.
description: Contains the `project` and `application` objects with the related `key` property.
8 changes: 4 additions & 4 deletions api-specs/checkout/types/responses/BadInputData.raml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ properties:
code:
type: string
description:
type:
severity:
type: string
description: \`error:init:bad_config`
description: \`error`
message:
type: string
description: Some fields are invalid.
payload?:
payload:
type: object
description: An object containing an array of `field`, `message`, and `invalidValue`.
description: Contains the `invalidFields` array of objects with the related `field`, `message`, and `invalidValue` properties.
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ properties:
code:
type: string
description:
type:
severity:
type: string
description: \`error:cart:empty`
description: \`error`
message:
type: string
description: Cart `{cartId}` was emptied during checkout.
payload?:
payload:
type: object
description: An object containing `cartId`.
description: Contains the `cart` object with the `id` property.
8 changes: 4 additions & 4 deletions api-specs/checkout/types/responses/CartEmpty.raml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ properties:
code:
type: string
description:
type:
severity:
type: string
description: \`error:cart:empty`
description: \`error`
message:
type: string
description: Cart `{cartId}` is empty.
payload?:
payload:
type: object
description: An object containing `cartId`.
description: Contains the `cart` object with the `id` property.
8 changes: 4 additions & 4 deletions api-specs/checkout/types/responses/CartNotFound.raml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ properties:
code:
type: string
description:
type:
severity:
type: string
description: \`error:cart:not_found`
description: \`error`
message:
type: string
description: Cart `{cartId}` for commercetools Checkout `{projectKey}` and application `{applicationKey}` not found.
payload?:
payload:
type: object
description: An object containing `projectKey`, `applicationKey`, and `cartId`.
description: Contains the `project`, `application`, and `cart` objects with the related `key` and `id` properties.
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ properties:
code:
type: string
description:
type:
severity:
type: string
description: \`error:payment:failed`
description: \`error`
message:
type: string
description: Cart with existing approved payment.
payload?:
payload:
type: object
description: An object containing `cartId`.
description: Contains the `cart` object with the `id` property.
6 changes: 3 additions & 3 deletions api-specs/checkout/types/responses/CheckoutCancelled.raml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#%RAML 1.0 DataType
(annotations.package): responses
type: ResponseMessage
type: Message
displayName: CheckoutCancelled
discriminatorValue: checkout_cancelled
description: |
Expand All @@ -9,9 +9,9 @@ properties:
code:
type: string
description:
type:
severity:
type: string
description: \`info:app:status`
description: \`info`
message:
type: string
description: Checkout cancelled.
8 changes: 4 additions & 4 deletions api-specs/checkout/types/responses/CheckoutCompleted.raml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ properties:
code:
type: string
description:
type:
severity:
type: string
description: \`info:app:status`
description: \`info`
message:
type: string
description: Checkout for `{orderId}` completed.
payload?:
payload:
type: object
description: An object containing `orderId`.
description: Contains the `order` object with the `id` property.
8 changes: 4 additions & 4 deletions api-specs/checkout/types/responses/CheckoutLoaded.raml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#%RAML 1.0 DataType
(annotations.package): responses
type: ResponseMessage
type: Message
displayName: CheckoutLoaded
discriminatorValue: checkout_loaded
description: |
Generated when Checkout has been loaded successfully and is waiting for the configuration parameters passed in the `checkoutConfig` [object](/sdk).
Generated when Checkout is loaded and waiting for the configuration properties to be passed with the `checkoutFlow` or `paymentFlow` [method](/sdk).
properties:
code:
type: string
description:
type:
severity:
type: string
description: \`info:app:status`
description: \`info`
message:
type: string
description: Checkout loaded.
8 changes: 4 additions & 4 deletions api-specs/checkout/types/responses/CheckoutStarted.raml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#%RAML 1.0 DataType
(annotations.package): responses
type: ResponseMessage
type: Message
displayName: CheckoutStarted
discriminatorValue: checkout_started
description: |
Generated when the configuration parameters are passed successfully through the `checkoutConfig` [object](/sdk) and the checkout process starts.
Generated when the configuration properties are passed successfully with the `checkoutFlow` or `paymentFlow` [method](/sdk) and the checkout process starts.
properties:
code:
type: string
description:
type:
severity:
type: string
description: \`info:app:status`
description: \`info`
message:
type: string
description: Checkout started.
8 changes: 4 additions & 4 deletions api-specs/checkout/types/responses/DeprecatedFields.raml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ properties:
code:
type: string
description:
type:
severity:
type: string
description: \`warn:init:bad_config`
description: \`warn`
message:
type: string
description: Some fields are deprecated.
payload?:
payload:
type: object
description: An object containing an array of `field` and `message`.
description: Contains the `deprecatedFields` array.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#%RAML 1.0 DataType
(annotations.package): responses
type: Message
displayName: ExternalTermsAndConditionsPending
discriminatorValue: external_terms_and_conditions_pending
description: |
Generated in Payment Only [mode](/../checkout/overview#complete-checkout-and-payment-only-modes) when the customer hasn't accepted the terms and conditions yet.
properties:
code:
type: string
description:
severity:
type: string
description: \`info`
message:
type: string
description: External terms and conditions pending.
17 changes: 17 additions & 0 deletions api-specs/checkout/types/responses/InitError.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#%RAML 1.0 DataType
(annotations.package): responses
type: Message
displayName: InitError
discriminatorValue: init_error
description: |
Generated when an error occurs during Checkout's initialization.
properties:
code:
type: string
description:
severity:
type: string
description: \`error`
message:
type: string
description: Error during initialization.
8 changes: 4 additions & 4 deletions api-specs/checkout/types/responses/InitTimeout.raml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#%RAML 1.0 DataType
(annotations.package): responses
type: ResponseMessage
type: Message
displayName: InitTimeout
discriminatorValue: init_timeout
description: |
Generated when Checkout has not received the configuration parameters passed through the `checkoutConfig` [object](/sdk) on time.
Generated when Checkout does not receive the configuration properties with the `checkoutFlow` or `paymentFlow` [method](/sdk) on time.
properties:
code:
type: string
description:
type:
severity:
type: string
description: \`error:init:timeout`
description: \`error`
message:
type: string
description: Timeout error, no init message received.
17 changes: 17 additions & 0 deletions api-specs/checkout/types/responses/InvalidMode.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#%RAML 1.0 DataType
(annotations.package): responses
type: Message
displayName: InvalidMode
discriminatorValue: invalid_mode
description: |
Generated when the Application does not support the requested Checkout [mode](/../checkout/overview#complete-checkout-and-payment-only-modes).
properties:
code:
type: string
description:
severity:
type: string
description: \`info`
message:
type: string
description: \`{mode}` mode requires an application with mode type `{modeTypeRequested}`. Current mode `{modeTypeReceived}`.
Loading

0 comments on commit 61d668b

Please sign in to comment.