Skip to content

Commit

Permalink
Merge branch 'master' into choice-extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrahermanek authored Jun 11, 2024
2 parents cd024cf + 2305519 commit 5539623
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 31 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/pr-automation.yml
Original file line number Diff line number Diff line change
@@ -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'
11 changes: 9 additions & 2 deletions changelog/README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
4 changes: 2 additions & 2 deletions channel-manager-operations/inventory.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
4 changes: 4 additions & 0 deletions deprecations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | - |
Expand All @@ -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 |
Expand Down
72 changes: 48 additions & 24 deletions guidelines/responses.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -19,53 +18,78 @@ 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'."
}
]
}
```

### Example \#2

```javascript
{
"success":false,
"error":{
"code":9,
"message":"Invalid rate code",
"rateCode":"ABC"
}
"success": false,
"errors":[
{
"code":9,
"message":"Invalid rate code",
"rateCode":"ABC"
}
]
}
```

### Example \#3

```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"
}
]
}
```

| Property | Type | Contract | Description |
| :-- | :-- | :-- | :-- |
| `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

Expand Down
4 changes: 1 addition & 3 deletions mews-operations/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand All @@ -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": [
Expand Down Expand Up @@ -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). |
Expand Down

0 comments on commit 5539623

Please sign in to comment.