Skip to content

Commit

Permalink
Updated API from documentation release
Browse files Browse the repository at this point in the history
  • Loading branch information
Auto Mation committed Nov 28, 2023
1 parent b390ee6 commit 10b0b4f
Show file tree
Hide file tree
Showing 31 changed files with 135 additions and 112 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"type": "error:init:bad_config",
"code": "seller_not_found",
"message": "Seller {sellerId} not found",
"code": "project_deactivated",
"message": "commercetools Checkout {projectKey} is deactivated.",
"payload": {
"seller": {
"id": "{sellerId}"
"project": {
"key": "{projectKey}"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "info:order:status",
"code": "order_created",
"message": "Order {orderId} created",
"message": "Order {orderId} created.",
"payload": {
"order": {
"id": "{orderId}"
Expand Down
6 changes: 3 additions & 3 deletions api-specs/checkout/types/responses/AdyenBadConfig.raml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: ResponseMessage
displayName: AdyenBadConfig
discriminatorValue: adyen_bad_config
description: |
Generated when the configuration used to initialize Adyen contains at least one invalid field.
Generated when the configuration to initialize the [Adyen payment connector](/configuring-adyen) contains at least one invalid field.
properties:
code:
type: string
Expand All @@ -14,7 +14,7 @@ properties:
description: \`error:psp:bad_config`
message:
type: string
description: Some fields are invalid
description: Some fields are invalid.
payload?:
type: object
description: An object containing `PSP` and an array of objects with the invalid fields.
description: An object containing `psp` and an array of objects with the invalid fields.
6 changes: 3 additions & 3 deletions api-specs/checkout/types/responses/AdyenInitError.raml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: ResponseMessage
displayName: AdyenInitError
discriminatorValue: adyen_init_error
description: |
Generated when Adyen cannot be initialized.
Generated when the [Adyen payment connector](/configuring-adyen) cannot be initialized.
properties:
code:
type: string
Expand All @@ -14,7 +14,7 @@ properties:
description: \`error:psp:bad_config`
message:
type: string
description: Could not initialise Adyen
description: Could not initialise Adyen.
payload?:
type: object
description: An object containing `PSP`, `clientKey`, and `enviroment`.
description: An object containing `psp`, `clientKey`, and `enviroment`.
6 changes: 3 additions & 3 deletions api-specs/checkout/types/responses/AdyenTimeout.raml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: ResponseMessage
displayName: AdyenTimeout
discriminatorValue: adyen_timeout
description: |
Generated when a timeout error occurs while initializing Adyen.
Generated when a timeout error occurs while initializing the [Adyen payment connector](/configuring-adyen).
properties:
code:
type: string
Expand All @@ -14,7 +14,7 @@ properties:
description: \`error:psp:bad_config`
message:
type: string
description: Timeout while initialising Adyen
description: Timeout while initialising Adyen.
payload?:
type: object
description: An object containing `PSP`, `clientKey`, and `enviroment`.
description: An object containing `psp`, `clientKey`, and `enviroment`.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: ResponseMessage
displayName: ApplicationDeactivated
discriminatorValue: application_disabled
description: |
Generated when the requested application is deactivated. Activate the application in the Merchant Center to continue.
Generated when the requested [application](/configuring-checkout#applications) is deactivated. Activate the application in the Merchant Center to continue.
properties:
code:
type: string
Expand All @@ -14,7 +14,7 @@ properties:
description: \`error:init:bad_config`
message:
type: string
description: Application `{appId}` for seller `{sellerId}` is disabled
description: Application `{applicationKey}` for commercetools Checkout `{projectKey}` is disabled.
payload?:
type: object
description: An object containing `sellerId` and `appId`.
description: An object containing `projectKey` and `applicationKey`.
6 changes: 3 additions & 3 deletions api-specs/checkout/types/responses/ApplicationNotFound.raml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: ResponseMessage
displayName: ApplicationNotFound
discriminatorValue: application_not_found
description: |
Generated when the requested application is not found. The application may have been deleted or its configuration is incorrect.
Generated when the requested [application](/configuring-checkout#applications) is not found. The application may have been deleted or its configuration is incorrect.
properties:
code:
type: string
Expand All @@ -14,7 +14,7 @@ properties:
description: \`error:init:bad_config`
message:
type: string
description: Application `{appId}` for seller `{sellerId}` not found
description: Application `{applicationKey}` for commercetools Checkout `{projectKey}` not found.
payload?:
type: object
description: An object containing `sellerId` and `appId`.
description: An object containing `projectKey` and `applicationKey`.
4 changes: 2 additions & 2 deletions api-specs/checkout/types/responses/BadInputData.raml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: ResponseMessage
displayName: BadInputData
discriminatorValue: invalid_fields
description: |
Generated when the `checkoutConfig` object contains one or more invalid fields.
Generated when the `checkoutConfig` [object](/sdk) contains one or more invalid fields.
properties:
code:
type: string
Expand All @@ -14,7 +14,7 @@ properties:
description: \`error:init:bad_config`
message:
type: string
description: Some fields are invalid
description: Some fields are invalid.
payload?:
type: object
description: An object containing an array of `field`, `message`, and `invalidValue`.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: ResponseMessage
displayName: CartEmptiedDuringCheckout
discriminatorValue: cart_emptied_during_checkout
description: |
Generated when the Cart was emptied during the checkout. It is not possible to recover from this, the customer must restart the checkout process.
Generated when the [Cart](/../api/projects/carts) was emptied during the checkout process. It is not possible to recover from this, the customer must restart the checkout process.
properties:
code:
type: string
Expand All @@ -14,7 +14,7 @@ properties:
description: \`error:cart:empty`
message:
type: string
description: Cart `{cartId}` was emptied during checkout
description: Cart `{cartId}` was emptied during checkout.
payload?:
type: object
description: An object containing `cartId`.
4 changes: 2 additions & 2 deletions api-specs/checkout/types/responses/CartEmpty.raml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: ResponseMessage
displayName: CartEmpty
discriminatorValue: cart_empty
description: |
Generated when the Cart for the current checkout is empty. The Cart must contain at least one Line Item.
Generated when the [Cart](/../api/projects/carts) for the current checkout is empty. The Cart must contain at least one [Line Item](/../api/carts-orders-overview#line-items).
properties:
code:
type: string
Expand All @@ -14,7 +14,7 @@ properties:
description: \`error:cart:empty`
message:
type: string
description: Cart `{cartId}` is empty
description: Cart `{cartId}` is empty.
payload?:
type: object
description: An object containing `cartId`.
6 changes: 3 additions & 3 deletions api-specs/checkout/types/responses/CartNotFound.raml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: ResponseMessage
displayName: CartNotFound
discriminatorValue: cart_not_found
description: |
Generated when the Cart is not found. A valid Cart with at least one Line Item is required to start the checkout.
Generated when the [Cart](/../api/projects/carts) is not found. To start the checkout process, a valid Cart with at least one [Line Item](/../api/carts-orders-overview#line-items) is required.
properties:
code:
type: string
Expand All @@ -14,7 +14,7 @@ properties:
description: \`error:cart:not_found`
message:
type: string
description: Cart `{cartId}` for seller `{sellerId}` and application `{appId}` not found
description: Cart `{cartId}` for commercetools Checkout `{projectKey}` and application `{applicationKey}` not found.
payload?:
type: object
description: An object containing `sellerId`, `appId`, and `cartId`.
description: An object containing `projectKey`, `applicationKey`, and `cartId`.
20 changes: 20 additions & 0 deletions api-specs/checkout/types/responses/CartWithExistingPayment.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#%RAML 1.0 DataType
(annotations.package): responses
type: ResponseMessage
displayName: CartWithExistingPayment
discriminatorValue: cart_with_exisiting_payment
description: |
Generated when trying to add a [Payment](/../api/projects/payments) to a [Cart](/../api/projects/carts) that already references an approved Payment.
properties:
code:
type: string
description:
type:
type: string
description: \`error:payment:failed`
message:
type: string
description: Cart with existing approved payment.
payload?:
type: object
description: An object containing `cartId`.
4 changes: 2 additions & 2 deletions api-specs/checkout/types/responses/CheckoutCancelled.raml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: ResponseMessage
displayName: CheckoutCancelled
discriminatorValue: checkout_cancelled
description: |
Generated when the customer cancels the checkout.
Generated when the customer cancels the checkout process.
properties:
code:
type: string
Expand All @@ -14,4 +14,4 @@ properties:
description: \`info:app:status`
message:
type: string
description: Checkout cancelled
description: Checkout cancelled.
4 changes: 2 additions & 2 deletions api-specs/checkout/types/responses/CheckoutCompleted.raml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: ResponseMessage
displayName: CheckoutCompleted
discriminatorValue: checkout_completed
description: |
Generated when the customer completes the checkout.
Generated when the customer completes the checkout process.
properties:
code:
type: string
Expand All @@ -14,7 +14,7 @@ properties:
description: \`info:app:status`
message:
type: string
description: Checkout for `{orderId}` completed
description: Checkout for `{orderId}` completed.
payload?:
type: object
description: An object containing `orderId`.
4 changes: 2 additions & 2 deletions api-specs/checkout/types/responses/CheckoutLoaded.raml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: ResponseMessage
displayName: CheckoutLoaded
discriminatorValue: checkout_loaded
description: |
Generated when the checkout was loaded successfully and it is waiting for the configuration parameters passed through the `checkoutConfig` object.
Generated when Checkout has been loaded successfully and is waiting for the configuration parameters passed in the `checkoutConfig` [object](/sdk).
properties:
code:
type: string
Expand All @@ -14,4 +14,4 @@ properties:
description: \`info:app:status`
message:
type: string
description: Checkout loaded
description: Checkout loaded.
4 changes: 2 additions & 2 deletions api-specs/checkout/types/responses/CheckoutStarted.raml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: ResponseMessage
displayName: CheckoutStarted
discriminatorValue: checkout_started
description: |
Generated when the checkout receives the configuration parameters passed through the `checkoutConfig` object and starts successfully.
Generated when the configuration parameters are passed successfully through the `checkoutConfig` [object](/sdk) and the checkout process starts.
properties:
code:
type: string
Expand All @@ -14,4 +14,4 @@ properties:
description: \`info:app:status`
message:
type: string
description: Checkout started
description: Checkout started.
20 changes: 20 additions & 0 deletions api-specs/checkout/types/responses/DeprecatedFields.raml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#%RAML 1.0 DataType
(annotations.package): responses
type: ResponseMessage
displayName: DeprecatedFields
discriminatorValue: deprecated_fields
description: |
Generated when the `checkoutConfig` [object](/sdk) contains one or more deprecated fields.
properties:
code:
type: string
description:
type:
type: string
description: \`warn:init:bad_config`
message:
type: string
description: Some fields are deprecated.
payload?:
type: object
description: An object containing an array of `field` and `message`.
4 changes: 2 additions & 2 deletions api-specs/checkout/types/responses/InitTimeout.raml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: ResponseMessage
displayName: InitTimeout
discriminatorValue: init_timeout
description: |
Generated when the checkout has not received the configuration parameters passed through the `checkoutConfig` object on time.
Generated when Checkout has not received the configuration parameters passed through the `checkoutConfig` [object](/sdk) on time.
properties:
code:
type: string
Expand All @@ -14,4 +14,4 @@ properties:
description: \`error:init:timeout`
message:
type: string
description: Timeout error, no init message received
description: Timeout error, no init message received.
2 changes: 1 addition & 1 deletion api-specs/checkout/types/responses/InvalidToken.raml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ properties:
description: \`error:token:invalid`
message:
type: string
description: The token is invalid
description: The token is invalid.
18 changes: 0 additions & 18 deletions api-specs/checkout/types/responses/NoAllowedOrigins.raml

This file was deleted.

4 changes: 2 additions & 2 deletions api-specs/checkout/types/responses/NoPaymentMethods.raml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: ResponseMessage
displayName: NoPaymentMethods
discriminatorValue: no_payment_methods
description: |
Generated when there are no payment methods available. Add at least one **Payment method** in your [application settings in the Merchant Center](/configuring-checkout#payment-connector).
Generated when no payment method is set up for an [application](/configuring-checkout#applications). Add at least one **Payment method** to the application in the Merchant Center.
properties:
code:
type: string
Expand All @@ -14,4 +14,4 @@ properties:
description: \`error:init:bad_config`
message:
type: string
description: There are no payment methods configured
description: There are no payment methods configured.
4 changes: 2 additions & 2 deletions api-specs/checkout/types/responses/NoShippingMethods.raml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: ResponseMessage
displayName: NoShippingMethods
discriminatorValue: no_shipping_methods
description: |
Generated when no Shipping Method is available for the shipping address of the Cart. This may indicate an incomplete configuration.
Generated when no [Shipping Method](/../api/projects/shippingMethods) is available for the shipping address of the [Cart](/../api/projects/carts). This may indicate an incomplete configuration.
properties:
code:
type: string
Expand All @@ -14,7 +14,7 @@ properties:
description: \`warn:init:bad_config`
message:
type: string
description: There are no shipping methods matching cart
description: There are no shipping methods matching cart.
payload?:
type: object
description: An object containing `cartId`.
4 changes: 2 additions & 2 deletions api-specs/checkout/types/responses/OrderCreated.raml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: ResponseMessage
displayName: OrderCreated
discriminatorValue: order_created
description: |
Generated when the checkout successfully creates an Order.
Generated when an [Order](/../api/projects/orders) is created after a successful checkout process.
properties:
code:
type: string
Expand All @@ -14,7 +14,7 @@ properties:
description: \`info:order:status`
message:
type: string
description: Order `{orderId}` created
description: Order `{orderId}` created.
payload?:
type: object
description: An object containing `orderId`.
Loading

0 comments on commit 10b0b4f

Please sign in to comment.