OrderRefunded
v0.0.1

OrderRefunded

This event is triggered when an order refund has been started and the operation has been successfully been completed.

OrderRefunded Schema (json)
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "OrderRefunded",
  "required": [
    "detail-type",
    "resources",
    "detail",
    "id",
    "source",
    "time",
    "region",
    "version",
    "account"
  ],
  "type": "object",
  "x-amazon-events-detail-type": "OrderRefunded",
  "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/OrderRefunded"
    },
    "OrderRefunded": {
      "type": "object",
      "required": [
        "id",
        "orderId",
        "orderReference",
        "paymentProvider",
        "orderLines",
        "shippingFees",
        "giftCards",
        "vouchers",
        "gifts",
        "created",
        "updated",
        "completed",
        "restarts",
        "revision"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "The delivery 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"
        },
        "voucherProvider": {
          "$ref": "#/definitions/Provider"
        },
        "bonusProvider": {
          "$ref": "#/definitions/ProviderStatus"
        },
        "refundedPayment": {
          "$ref": "#/definitions/RefundedPayment"
        },
        "orderLines": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/OrderLine"
          }
        },
        "shippingFees": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ShippingFee"
          }
        },
        "giftCards": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/GiftCard"
          }
        },
        "vouchers": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Voucher"
          }
        },
        "gifts": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Gift"
          }
        },
        "bonus": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Bonus"
          }
        },
        "created": {
          "type": "string",
          "format": "date-time",
          "description": "Created date for the order delivery"
        },
        "updated": {
          "type": "string",
          "format": "date-time",
          "description": "Updated date for the order delivery"
        },
        "started": {
          "type": "string",
          "format": "date-time",
          "description": "Started date for the order delivery"
        },
        "completed": {
          "type": "string",
          "format": "date-time",
          "description": "Completed date for the order delivery"
        },
        "restarted": {
          "type": "string",
          "format": "date-time",
          "description": "Restarted date for the order delivery"
        },
        "revision": {
          "description": "The revision number of the order delivery",
          "type": "integer"
        }
      }
    },
    "CurrencyCode": {
      "title": "CurrencyCode",
      "maxLength": 3,
      "minLength": 3,
      "pattern": "^[A-Z]{3}$",
      "type": "string",
      "description": "ISO 4217 currency code"
    },
    "ShippingFee": {
      "type": "object",
      "required": [
        "shippingFeeId",
        "totalAmount",
        "currencyCode"
      ],
      "properties": {
        "shippingFeeId": {
          "type": "string",
          "description": "The id for the fee"
        },
        "totalAmount": {
          "type": "integer",
          "description": "Total amount for the shipping fee"
        },
        "currencyCode": {
          "$ref": "#/definitions/CurrencyCode"
        }
      }
    },
    "OrderLine": {
      "type": "object",
      "required": [
        "orderLineId",
        "quantity",
        "totalAmount",
        "currencyCode"
      ],
      "properties": {
        "orderLineId": {
          "type": "string",
          "description": "The id for the fee"
        },
        "totalAmount": {
          "type": "integer",
          "description": "Total amount for the order line"
        },
        "quantity": {
          "type": "integer",
          "description": "Quantity for the order line"
        },
        "currencyCode": {
          "$ref": "#/definitions/CurrencyCode"
        }
      }
    },
    "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"
        },
        "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"
        }
      }
    },
    "RefundedPayment": {
      "type": "object",
      "required": [
        "reference"
      ],
      "properties": {
        "reference": {
          "type": "string",
          "description": "Reference for the refunded payment"
        }
      }
    },
    "GiftCard": {
      "type": "object",
      "required": [
        "giftCardId",
        "amount",
        "currencyCode",
        "status"
      ],
      "properties": {
        "giftCardId": {
          "type": "string",
          "description": "The id for the gift card"
        },
        "amount": {
          "type": "integer",
          "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 refund transaction"
        }
      }
    },
    "Voucher": {
      "type": "object",
      "required": [
        "voucherId",
        "amount",
        "currencyCode"
      ],
      "properties": {
        "voucherId": {
          "type": "string",
          "description": "The id for the voucher"
        },
        "amount": {
          "type": "integer",
          "description": "Amount for the voucher"
        },
        "currencyCode": {
          "$ref": "#/definitions/CurrencyCode"
        }
      }
    },
    "Gift": {
      "type": "object",
      "required": [
        "giftId",
        "quantity"
      ],
      "properties": {
        "giftId": {
          "type": "string",
          "description": "The id for the gift"
        },
        "quantity": {
          "type": "integer",
          "description": "Quantity for the gift"
        }
      }
    },
    "Bonus": {
      "type": "object",
      "required": [
        "reservationId",
        "amount",
        "currencyCode"
      ],
      "properties": {
        "reservationId": {
          "type": "string",
          "description": "The id of the bonus reservation"
        },
        "amount": {
          "type": "integer",
          "description": "Bonus amount"
        },
        "currencyCode": {
          "$ref": "#/definitions/CurrencyCode"
        },
        "transactionId": {
          "type": "string",
          "description": "The id of the bonus refund transaction"
        }
      }
    }
  }
}
Last updated on 2024/5/6