OrderCompensatedFailedv0.0.1
OrderCompensatedFailed
This event is triggered when an order compensation has been started but the operation failed.
OrderCompensatedFailed Schema (json)
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "OrderCompensatedFailed",
"required": [
"detail-type",
"resources",
"detail",
"id",
"source",
"time",
"region",
"version",
"account"
],
"type": "object",
"x-amazon-events-detail-type": "OrderCompensatedFailed",
"x-amazon-events-source": "brink.external.v1",
"properties": {
"account": {
"type": "string"
},
"detail": {
"$ref": "#/definitions/Detail"
},
"detail-type": {
"type": "string"
},
"id": {
"type": "string"
},
"region": {
"type": "string"
},
"resources": {
"items": {
"type": "string"
},
"type": "array"
},
"source": {
"type": "string"
},
"time": {
"format": "date-time",
"type": "string"
},
"version": {
"type": "string"
}
},
"definitions": {
"Detail": {
"properties": {
"data": {
"$ref": "#/definitions/Data"
},
"metadata": {
"$ref": "#/definitions/Metadata"
}
},
"required": [
"metadata",
"data"
],
"type": "object"
},
"Metadata": {
"type": "object",
"required": [
"awsRequestId"
],
"properties": {
"awsRequestId": {
"type": "string"
}
}
},
"Data": {
"$ref": "#/definitions/OrderCompensatedFailed"
},
"OrderCompensatedFailed": {
"type": "object",
"required": [
"id",
"orderId",
"orderReference",
"giftCards",
"created",
"updated",
"failed",
"restarts",
"revision"
],
"properties": {
"id": {
"type": "string",
"description": "The compensation id"
},
"orderId": {
"type": "string",
"description": "The order id"
},
"orderReference": {
"type": "string",
"description": "The order short reference"
},
"paymentProvider": {
"$ref": "#/definitions/ProviderStatus"
},
"shippingProvider": {
"$ref": "#/definitions/Provider"
},
"giftCardProvider": {
"$ref": "#/definitions/ProviderStatus"
},
"giftCardProductProvider": {
"$ref": "#/definitions/Provider"
},
"voucherProvider": {
"$ref": "#/definitions/Provider"
},
"promotionProvider": {
"$ref": "#/definitions/ProviderStatus"
},
"bonusProvider": {
"$ref": "#/definitions/ProviderStatus"
},
"payment": {
"$ref": "#/definitions/Payment"
},
"giftCards": {
"type": "array",
"items": {
"$ref": "#/definitions/GiftCard"
}
},
"bonus": {
"$ref": "#/definitions/Bonus"
},
"reason": {
"$ref": "#/definitions/Reason"
},
"created": {
"type": "string",
"format": "date-time",
"description": "Created date for the order compensation"
},
"updated": {
"type": "string",
"format": "date-time",
"description": "Updated date for the order compensation"
},
"started": {
"type": "string",
"format": "date-time",
"description": "Started date for the order compensation"
},
"failed": {
"type": "string",
"format": "date-time",
"description": "Failed date for the order compensation"
},
"restarted": {
"type": "string",
"format": "date-time",
"description": "Restarted date for the order compensation"
},
"restarts": {
"description": "The number of restarts",
"type": "integer"
},
"revision": {
"description": "The revision number of the order compensation",
"type": "integer"
}
}
},
"ProviderStatus": {
"type": "object",
"required": [
"providerId",
"providerName",
"status"
],
"properties": {
"providerId": {
"type": "string",
"description": "The id for the provider"
},
"providerName": {
"type": "string",
"description": "The name of the provider"
},
"status": {
"$ref": "#/definitions/ProviderStatusLog"
}
}
},
"ProviderStatusLog": {
"type": "object",
"required": [
"current",
"history"
],
"properties": {
"current": {
"type": "string",
"description": "The latest status for the provider"
},
"history": {
"type": "array",
"items": {
"$ref": "#/definitions/ProviderStatusLogEntry"
}
}
}
},
"ProviderStatusLogEntry": {
"type": "object",
"required": [
"status",
"timestamp",
"type"
],
"properties": {
"message": {
"type": "string",
"description": "Optional message for the status"
},
"errorMessage": {
"type": "string",
"description": "Optional error message from the provider"
},
"status": {
"type": "string",
"description": "The actual status"
},
"timestamp": {
"type": "string",
"format": "date-time",
"description": "Timestamp for the status"
},
"type": {
"type": "string",
"description": "Status type"
}
}
},
"Provider": {
"type": "object",
"required": [
"providerId",
"providerName"
],
"properties": {
"providerId": {
"type": "string",
"description": "The id of the provider"
},
"providerName": {
"type": "string",
"description": "The name of the provider"
}
}
},
"Payment": {
"type": "object",
"required": [
"reference"
],
"properties": {
"reference": {
"type": "string",
"description": "The reference for the payment"
},
"amount": {
"type": "integer",
"format": "int64",
"description": "the amount compensated"
},
"currencyCode": {
"$ref": "#/definitions/CurrencyCode"
}
}
},
"OrderLine": {
"type": "object",
"required": [
"orderLineId",
"quantity",
"currencyCode",
"totalAmount"
],
"properties": {
"orderLineId": {
"type": "string",
"description": "The id for the order line"
},
"quantity": {
"type": "integer",
"description": "Quantity for the order line"
},
"currencyCode": {
"$ref": "#/definitions/CurrencyCode"
},
"totalAmount": {
"type": "integer",
"description": "Total amount for the order line"
}
}
},
"ShippingFee": {
"type": "object",
"required": [
"shippingFeeId",
"currencyCode",
"totalAmount"
],
"properties": {
"shippingFeeId": {
"type": "string",
"description": "The id for the shipping fee"
},
"currencyCode": {
"$ref": "#/definitions/CurrencyCode"
},
"totalAmount": {
"type": "integer",
"description": "Total amount for the shipping fee"
}
}
},
"GiftCard": {
"type": "object",
"required": [
"giftCardId",
"amount",
"currencyCode",
"status"
],
"properties": {
"giftCardId": {
"type": "string",
"description": "The id for the gift card"
},
"amount": {
"type": "integer",
"format": "int64",
"description": "The amount for the gift card"
},
"currencyCode": {
"$ref": "#/definitions/CurrencyCode"
},
"status": {
"type": "string",
"description": "The status of the gift card"
},
"transactionId": {
"type": "string",
"description": "The id for the gift card transaction"
}
}
},
"Bonus": {
"type": "object",
"required": [
"amount",
"currencyCode",
"reservationId"
],
"properties": {
"reservationId": {
"type": "string",
"description": "The id for the bonus reservation"
},
"amount": {
"type": "integer",
"description": "Bonus amount"
},
"currencyCode": {
"$ref": "#/definitions/CurrencyCode"
},
"transactionId": {
"type": "string",
"description": "The id of the bonus transaction"
}
}
},
"Reason": {
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "Optional code for the reason, useful for BI tracking"
},
"cause": {
"type": "string",
"description": "Optional human readable cause for the reason"
}
}
},
"CurrencyCode": {
"title": "CurrencyCode",
"maxLength": 3,
"minLength": 3,
"pattern": "^[A-Z]{3}$",
"type": "string",
"description": "ISO 4217 currency code"
}
}
}
Last updated on 2024/11/15