From 2a605e80ed706b988ed8c040e0195cae851aed89 Mon Sep 17 00:00:00 2001 From: timreyn Date: Fri, 8 Mar 2024 09:27:29 -0500 Subject: [PATCH] Add RegistrationInfo to the competition. (#23) * Add RegistrationInfo to the competition. Part of #16; stolen from @JonEsparaz's #17. * Include RegistrationInfo in the example. * Walk-in -> on-the-spot. * Delete duplicate competitorLimit. * Specify that registration fees are in the lowest denomination. * Fix typo. * Fix typo. * usesWcaRegistration -> useWcaRegistration for consistency with the database. * Fix example. * Change lowestDenomination to iso. * Rename field to baseEntryFee. --- specification.md | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/specification.md b/specification.md index 0aa73f2..4e692d1 100644 --- a/specification.md +++ b/specification.md @@ -19,6 +19,7 @@ The specification defines the following types: - [Avatar](#Avatar) - [Competition](#Competition) - [CountryCode](#CountryCode) +- [CurrencyCode](#CurrencyCode) - [Cutoff](#Cutoff) - [Date](#Date) - [DateTime](#DateTime) @@ -30,6 +31,7 @@ The specification defines the following types: - [Qualification](#Qualification) - [Ranking](#Ranking) - [Registration](#Registration) +- [RegistrationInfo](#RegistrationInfo) - [Result](#Result) - [Role](#Role) - [Room](#Room) @@ -55,6 +57,7 @@ Represents the root object and is usually referred to as a WCIF. | `persons` | [`[Person]`](#person) | List of all the people related to the competition. | | `events` | [`[Event]`](#event) | List of all events held at the competition. | | `schedule` | [`Schedule`](#schedule) | All the data related to time and scheduling. | +| `registrationInfo` | [`RegistrationInfo`] | All the data related to the competition's registration. | | `competitorLimit` | `Integer\|null` | The maximal number of competitors that can register for the competition. | | `extensions` | [`[Extension]`](#extension) | List of custom competition extensions. | @@ -70,6 +73,7 @@ Represents the root object and is usually referred to as a WCIF. "persons": [...], "events": [...], "schedule": {...}, + "registrationInfo": [...], "competitorLimit": 1000, "extensions": [...] } @@ -148,7 +152,17 @@ A `String` representing the [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/I #### Example ```json -US +"US" +``` + +### CurrencyCode + +A `String` representing the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code of the given currency. + +#### Example + +```json +"CAD" ``` ### Role @@ -196,6 +210,34 @@ Represents person registration data. } ``` +### RegistrationInfo + +Represents information related to when and how to register for the competition. + +| Attribute | Type | Description | +| --- | --- | --- | +| `openTime` | [`DateTime`](#datetime) | The point in time when online registration opens. | +| `closeTime` | [`DateTime`](#datetime) | The point in time when online registration closes. | +| `baseEntryFee` | `Integer` | The competition's base fee for online registration, in the lowest denomination of the specified currency code, following ISO 4217. | +| `currencyCode` | [`CurrencyCode`](#currencycode) | The currency of the `baseEntryFee`, following ISO 4217. | +| `onTheSpotRegistration` | `Boolean` | Whether non-registered competitors are permitted to sign up at the competition. | +| `useWcaRegistration` | `Boolean` | Whether registration takes place on the WCA website. | + +#### Example + +```json +{ + "openTime": "2023-08-29T05:00:00Z", + "closeTime": "2023-11-18T05:00:00Z", + "baseEntryFee": 2000, + "currencyCode": "USD", + "onTheSpotRegistration": false, + "useWcaRegistration": true, +} +``` + +In this example, the registration fee is $20.00 USD, because the lowest denomination of USD is cents ($0.01 USD). + ### Avatar Represents an avatar image.