diff --git a/src/shared-definitions.yaml b/src/shared-definitions.yaml index 2c690a7..a968132 100644 --- a/src/shared-definitions.yaml +++ b/src/shared-definitions.yaml @@ -300,7 +300,7 @@ components: 'firstnames': ['Bob'], 'gender': 'Male', 'birthdate': '1980-03-21', - 'contactInformation': ['+32123456789', 'contact@org.co.uk'], + 'contactInformation': ['+32123456789', 'contact@org.co.uk'] } LocationSearch: @@ -330,7 +330,7 @@ components: 'south': 50.0929802, 'west': 14.4012451, 'north': 50.0812615, - 'east': 14.4394467, + 'east': 14.4394467 } LocationCircle: @@ -429,7 +429,7 @@ components: { 'type': 'refundable_with_deadline', 'deadline': '2022-10-12T23:59:59.59Z', - 'penaltyAmount': '100.00', + 'penaltyAmount': '100.00' } AccommodationType: @@ -466,7 +466,7 @@ components: 'checkinoutPolicy', 'otherPolicies', 'media', - 'roomTypes', + 'roomTypes' ] properties: hotelId: @@ -521,7 +521,7 @@ components: 'media', 'roomTypes', 'id', - 'providerHotelId', + 'providerHotelId' ] properties: hotelId: @@ -582,7 +582,7 @@ components: 'size', 'maximumOccupancy', 'media', - 'policies', + 'policies' ] properties: name: @@ -764,7 +764,7 @@ components: example: { '7b7b18e2-7357-4e98-9be6-aa182e0b090a': - { 'accommodation': 'prov.1234', 'roomType': 'ND' }, + { 'accommodation': 'prov.1234', 'roomType': 'ND' } } AdditionalPricePlanProperties: @@ -928,10 +928,7 @@ components: description: Result of cancellation type: string example: - { - 'orderId': '11111111-2222-3333-4444-000000000001', - 'status': 'CANCELLED', - } + { 'orderId': '11111111-2222-3333-4444-000000000001', 'status': 'CANCELLED' } Iban: description: The International Bank Account Number @@ -1016,7 +1013,7 @@ components: 'sourceAmount', 'targetCurrency', 'targetAmount', - 'rate', + 'rate' ] type: object properties: @@ -1638,13 +1635,8 @@ components: $ref: '#/components/schemas/Amount' example: { - 'EUR': - { - 'total': '12500.00', - 'reserved': '4500.00', - 'available': '8000.00', - }, - 'CLP': { 'total': '45000', 'reserved': '0', 'available': '45000' }, + 'EUR': { 'total': '12500.00', 'reserved': '4500.00', 'available': '8000.00' }, + 'CLP': { 'total': '45000', 'reserved': '0', 'available': '45000' } } BankAddress: @@ -1697,9 +1689,9 @@ components: 'postCode': '80687', 'city': 'München', 'country': 'Germany', - 'stateCode': null, - }, - }, + 'stateCode': null + } + } } MongoLocation: @@ -1833,7 +1825,18 @@ components: format: date-time status: type: string - enum: ['paid', 'pending', 'booked', 'serverError', 'paymentError', 'paymentValidationError', 'networkError', 'creationFailed', 'cancelled'] + enum: + [ + 'paid', + 'pending', + 'booked', + 'serverError', + 'paymentError', + 'paymentValidationError', + 'networkError', + 'creationFailed', + 'cancelled' + ] message: type: string orderId: @@ -2081,7 +2084,7 @@ components: 'firstnames': ['Bob'], 'gender': 'Male', 'birthdate': '1980-03-21', - 'contactInformation': ['+32123456789', 'contact@org.co.uk'], + 'contactInformation': ['+32123456789', 'contact@org.co.uk'] } AdultGuest: @@ -2242,3 +2245,25 @@ components: type: string depositOptions: $ref: '#/components/schemas/GroupBookingDeposits' + + CurrencyResponse: + description: List of currency meta with rates + type: object + additionalProperties: + $ref: '#/components/schemas/CurrencyMetaWin' + + CurrencyMetaWin: + type: object + required: ['name', 'symbol', 'rateFromBaseCurrency', 'decimals'] + properties: + name: + description: currency symbol + type: string + symbol: + description: currency symbol + type: string + rateFromBaseCurrency: + description: сгккутсн rate to USD + type: integer + decimals: + type: integer diff --git a/src/win.yaml b/src/win.yaml index cc3b9b9..e71cefb 100644 --- a/src/win.yaml +++ b/src/win.yaml @@ -776,7 +776,7 @@ paths: /hotels/{providerHotelId}: get: - tags: [ offers ] + tags: [offers] parameters: - in: path name: providerHotelId @@ -1290,3 +1290,44 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' + + /currencies: + get: + tags: [currencies] + responses: + 200: + description: It's ok + content: + application/json: + schema: + $ref: '#/components/schemas/CurrencyResponse' + 400: + description: Handled Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 401: + description: Handled Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 403: + description: Handled Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 404: + description: Handled Error + content: + application/json: + schema: + $ref: '#/components/schemas/Error' + 500: + description: Some server error + content: + application/json: + schema: + $ref: '#/components/schemas/Error'