diff --git a/.github/workflows/pr-automation.yml b/.github/workflows/pr-automation.yml new file mode 100644 index 0000000..b79d762 --- /dev/null +++ b/.github/workflows/pr-automation.yml @@ -0,0 +1,29 @@ +name: Add every PR to a project and apply distribution label + +on: + pull_request: + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +jobs: + add-to-project: + name: Add To GitHub projects + runs-on: ubuntu-latest + steps: + # Add to project + #- uses: actions/add-to-project@v1.0.1 + # with: + # project-url: https://github.com/orgs/MewsSystems/projects/21 + # github-token: ${{ secrets.GITHUB_TOKEN }} + + ## Add label + - name: Assign tech.be project + uses: srggrs/assign-one-project-github-action@1.3.1 + if: github.event.action == 'opened' + with: + project: 'https://github.com/orgs/MewsSystems/projects/21' + column_name: 'Review' diff --git a/changelog/README.md b/changelog/README.md index 1f09778..fe18944 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -1,13 +1,20 @@ # Changelog -## 17th May 2024 +## 12th June 2024 * [Availability block](/channel-manager-operations/availabilityBlock.md#availability-block) extended with `notes` field. * Customer [Loyalty info](/mews-operations/reservations.md#loyalty-info) extended with `tierCode` field. * [Reservation synchronization](/channel-manager-operations/reservations.md#process-group) operation was extended with [`timeState`](/mews-operations/reservations.md#reservation-time-states) field and [`paymentCardData`](/mews-operations/reservations.md#payment-card-data) object in [`Reservation`](/mews-operations/reservations.md#reservation) object. -## 13th May 2024 + +## 16th May 2024 + +* Clarified [Synchronous error response](../guidelines/responses.md#synchronous-error-response) +* Deprecated `error` (singular) in [Synchronous error response](../guidelines/responses.md#synchronous-error-response), use `errors` (plural, array) instead. See [Deprecations](../deprecations/README.md) +* Deprecated `paymentType` in [`RatePlan`](../mews-operations/configuration.md#rate-plan), see [Deprecations](../deprecations/README.md). +* +## 19th April 2024 * Clarified dates in ARI pushes, Availability blocks and Reservation Push and delivery. diff --git a/channel-manager-operations/inventory.md b/channel-manager-operations/inventory.md index 8cb422b..f95b2f8 100644 --- a/channel-manager-operations/inventory.md +++ b/channel-manager-operations/inventory.md @@ -49,14 +49,14 @@ Mews always pushes both `gross` and `net` prices, the channel manager chooses wh { "grossAmount": 100.0, "netAmount": 100.0, - "currencyCode": "USD", + "currencyCode": "EUR", "guestCount": 1, "ageCategoryCode": "Adult" }, { "grossAmount": 100.0, "netAmount": 100.0, - "currencyCode": "USD", + "currencyCode": "EUR", "guestCount": 2, "ageCategoryCode": "Child" } diff --git a/deprecations/README.md b/deprecations/README.md index 3045572..46f6e7b 100644 --- a/deprecations/README.md +++ b/deprecations/README.md @@ -24,6 +24,8 @@ The table columns have the following meanings: | Feature | Comments | Deprecated | Discontinued | | :-- | :-- | :-- | :-- | +| `error` in [Synchronous error response](../guidelines/responses.md#synchronous-error-response) | Replaced by `errors` (plural and an `array`) | 15 May 2024 | - | +| `paymentType` in [`RatePlan`](../mews-operations/configuration.md#rate-plan) returned by [Mews: Get configuration](../mews-operations/configuration.md#get-configuration) | May yield incorrect value. More info below (\*1). | 16 May 2024 | - | | `channel` in [Process group](../mews-operations/reservations.md#process-group) | Replaced by `sources` | 26 Sep 2022 | - | | `iata` in [Company](../mews-operations/reservations.md#company) in [Process group](../mews-operations/reservations.md#process-group) | Replaced by `iata` in the [Travel Agency](../mews-operations/reservations.md#travel-agency) object | 26 Sep 2022 | - | | `adultCount` and `childCount` in [`Reservation`](../mews-operations/reservations.md#reservation) object in [Process group](../mews-operations/reservations.md#process-group) | Replaced by `guestCounts`; **Requires re-certification** | 29 Apr 2022 | - | @@ -33,6 +35,8 @@ The table columns have the following meanings: | `code` in [`Connection Info`](../mews-operations/configuration.md#connection-info) object in [Get properties](../mews-operations/configuration.md#get-properties) | Replaced by `token` | 10 Jan 2018 | End Mar 2018 | | `distributor` in [`Reservation`](../mews-operations/reservations.md#reservation) object in [Process group](../mews-operations/reservations.md#process-group) | Replaced by `channel` | 10 Jan 2018 | End Mar 2018 | +> **(\*1) paymentType**: We are introducing enhancements that elevate settlement rules to the enterprise level, allowing them to be assigned either to a rate group or directly to a rate. Due to the complex nature of settlement rules, which can vary within a rate group, `paymentType` is now obsolete as the value may vary depending on reservation dates, which can't be reflected in this field. + ## Deprecated functionality | Feature | Comments | Deprecated | Discontinued | diff --git a/guidelines/responses.md b/guidelines/responses.md index f5d763d..a5e87ef 100644 --- a/guidelines/responses.md +++ b/guidelines/responses.md @@ -1,10 +1,9 @@ # Responses -Each API request is expected to return a response. The **HTTP status code** of the response is `200` in case the API request processing is successful as well as if the API request processing fails, e.g. if there is an error during reservation processing, or an inventory update message fails validation. -In case of such failures, details about the error are provided in the response body. +Every API request is expected to yield a response. The HTTP status code of the response is `200`. This is true regardless of whether the API request processing is successful, or if it fails, e.g. due to errors during reservation processing or validation of an inventory update message. In the event of a failure, the response body contains details about the error. -> **Important:** In the case of errors with rate codes or category codes, details of the affected codes must be returned in the response body. -> These codes will also be unsynchronized, i.e. disabled. +> **Important:** In the event of errors involving rate codes or category codes, details of the affected codes must be returned in the response body. +> These codes will also be unsynchronized as a result of the error, i.e. disabled. ## Synchronous simple response @@ -19,19 +18,19 @@ This response object represents the default response, in case of success. ## Synchronous error response -In case of error, the response object will extend the simple response object with details about the error. -In case of errors with rate codes or category codes, details of the affected codes must also be returned. -See the [Error codes](#error-codes) table below for further details about specific errors, including guidance on system behaviour. +In case of error, the response object will extend the simple response object with details about the error or errors. In case of any errors with rate codes or category codes, details of the affected codes must also be returned. See the [Error codes](#error-codes) table below for further details about specific errors, including guidance on system behaviour. ### Example \#1 ```javascript { "success": false, - "error":{ - "code":8, - "message":"Invalid 'clientToken' or 'connectionToken'." - } + "errors":[ + { + "code":8, + "message":"Invalid 'clientToken' or 'connectionToken'." + } + ] } ``` @@ -39,12 +38,14 @@ See the [Error codes](#error-codes) table below for further details about specif ```javascript { - "success":false, - "error":{ - "code":9, - "message":"Invalid rate code", - "rateCode":"ABC" - } + "success": false, + "errors":[ + { + "code":9, + "message":"Invalid rate code", + "rateCode":"ABC" + } + ] } ``` @@ -52,12 +53,34 @@ See the [Error codes](#error-codes) table below for further details about specif ```javascript { - "success":false, - "error":{ - "code":10, - "message":"Invalid category code", - "categoryCode":"XYZ" - } + "success": false, + "errors":[ + { + "code":10, + "message":"Invalid category code", + "categoryCode":"XYZ" + } + ] +} +``` + +### Example \#4 + +```javascript +{ + "success": false, + "errors":[ + { + "code":9, + "message":"Invalid rate code", + "rateCode":"ABC" + }, + { + "code":10, + "message":"Invalid category code", + "categoryCode":"XYZ" + } + ] } ``` @@ -65,7 +88,8 @@ See the [Error codes](#error-codes) table below for further details about specif | :-- | :-- | :-- | :-- | | `success` | `bool` | required | Determinines the result of the operation. | | `asyncConfirmation` | `bool` | optional | Determinines if there will be following asynchronous response. | -| `errors` | array of [`Error`](#error) | optional | In case of `"success": false`, this property holds information about the errors that occurred. | +| ~~`error`~~ | ~~[`Error`](#error)~~ | ~~optional~~ | ~~In case of `"success": false`, this property holds information about the error that occurred.~~ **[Deprecated!](../deprecations/README.md)** | +| `errors` | array of [`Error`](#error) | optional | In case of `"success": false`, this property holds information about the error or errors that occurred. | ### Error diff --git a/mews-operations/configuration.md b/mews-operations/configuration.md index 0759ace..db7addc 100644 --- a/mews-operations/configuration.md +++ b/mews-operations/configuration.md @@ -189,7 +189,6 @@ This is an example of a _successful_ response. In case an error occurred, the re "name": "Non Refundable", "description": "This is our lowest price available. However full payment is required at the time of booking. ", "currencyCode": "EUR", - "paymentType": 1, "isSynchronized": true, "rateType": 1, "cancellationPolicies": [ @@ -214,7 +213,6 @@ This is an example of a _successful_ response. In case an error occurred, the re "name": "Fully Flexible", "description": "This rate is the most flexible rate we offer. Bookings can be cancelled up to 48 hours in advance of your arrival date by 2.30 pm (and 7 days before the arrival dates of the 29th, 30th and 31st of December), without charge. The total price of the reservation will be charged 48 hours before arrival. ", "currencyCode": "EUR", - "paymentType": 3, "isSynchronized": false, "rateType": 1, "cancellationPolicies": [ @@ -423,7 +421,7 @@ This is an example of a _successful_ response. In case an error occurred, the re | `name` | `string` | required | Name of the rate plan. | | `currencyCode` | `string` | required | Three-letter currency code of the rate plan price. | | `description` | `string` | optional | Description of the rate plan. | -| `paymentType` | `int` | required | [`Payment type`](#payment-types) code. | +| ~~`paymentType`~~ | ~~`int`~~ | ~~required~~ | ~~[`Payment type`](#payment-types) code.~~ [**Deprecated!**](../deprecations/README.md)| | `cancellationPolicies` | [`Cancellation Policy`](#cancellation-policy) collection | optional | Cancellation policies of the rate plan. | | `isSynchronized` | `bool` | required | Determines whether rate plan is synchronized, i.e. that Mews pushes prices and restrictions for the rate plan. Otherwise, unsynchronized rate plan is used just for mapping correct rate plan for incoming reservations (as well as sychronized rate plan). | | `rateType` | `int` | required | Determines whether rate plan is private (available for channel reservations only) or public (bookable via Mews Distributor as well). |