Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
DerMika committed May 28, 2020
2 parents dacc8f8 + 404d2e6 commit f661eef
Show file tree
Hide file tree
Showing 37 changed files with 4,426 additions and 51 deletions.
2 changes: 2 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
service_name: travis-ci
coverage_clover: build/logs/clover.xml
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ php:
- '7.1'
- '7.2'
- '7.3'
- '7.4'

install:
- composer require satooshi/php-coveralls:~1.0@stable
- composer require --dev php-coveralls/php-coveralls '^1.1.0'
- composer update
- curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar

Expand All @@ -24,4 +25,7 @@ script:
- vendor/bin/phpunit --coverage-clover build/logs/clover.xml

after_success:
- travis_retry php vendor/bin/coveralls
- travis_retry php vendor/bin/coveralls -v
jobs:
allow_failures:
- php: '7.4'
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
## Release 1.11.0 (Unreleased)
https://github.com/amabnl/amadeus-ws-client/pull/344:
* Added support to add accountNumber in ``Queue_List``
* Added support to add freeText for payment type Cash and CC in ``Pnr_AddMultiElements``
* Added support for "ZapOff" in ``Fare_PricePnrWithBookingClass``
* Added support for "Fare Misc TKT Information", "Fare Endorsement", "Fare Endorsement" , "Fare Misc Information" in ``Pnr_AddMultiElements``

# Release 1.10.0 (27 May 2020)
* Bugfix for a SOAP-ERROR in ``DocIssuance_IssueMiscellaneousDocuments`` (https://github.com/amabnl/amadeus-ws-client/pull/359) - Artem Zakharchenko
* Add Anchored Segment in ``Fare_MasterPricerTravelBoardSearch`` and implemented ``Service_BookPriceService`` (https://github.com/amabnl/amadeus-ws-client/pull/324) - Michal Hernas
* Implemented ``Fare_PriceUpsellWithoutPNR`` and ``Fare_GetFareFamilyDescription`` (https://github.com/amabnl/amadeus-ws-client/pull/388) - Valeriy
* Implemented ``Ticket_ATCShopperMasterPricerCalendar`` (https://github.com/amabnl/amadeus-ws-client/pull/398) - Artem Zakharchenko

# Release 1.9.0 (23 Jun 2019)
* Added support for multiple seat request in ``PNR_AddMultiElements`` (https://github.com/amabnl/amadeus-ws-client/pull/335) - Artem Zakharchenko
* Added `stockProviderDetails` to ``DocRefund_InitRefund `` (https://github.com/amabnl/amadeus-ws-client/pull/341) - Ruslan Poltayev
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Once the client is installed, read the [About & Get Started](docs/about-get-

# Release history

The current release is version 1.9.0.
The current release is version 1.10.0.

See the [Changelog](CHANGELOG.md).

Expand Down
4 changes: 2 additions & 2 deletions docs/list-of-supported-messages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ This is the list of messages that are at least partially supported at this time:
- Fare_PricePNRWithBookingClass
- Fare_PricePNRWithLowerFares
- Fare_PricePNRWithLowestFare
- Fare_PriceUpsellWithoutPNR
- Fare_InformativePricingWithoutPNR
- Fare_InformativeBestPricingWithoutPNR
- Fare_ConvertCurrency
- Fare_CheckRules
- Fare_GetFareRules
- Fare_GetFareFamilyDescription
- Air_MultiAvailability
- Air_SellFromRecommendation
- Air_FlightInfo
Expand Down Expand Up @@ -92,9 +94,7 @@ These messages will be implemented at some point in the future. *Pull requests a
- Fare_DisplayFaresForCityPair
- Fare_DisplayBookingCodeInformation
- Fare_CalculateMileage
- Fare_PriceUpsellWithoutPNR
- Fare_PriceUpsellPNR
- Fare_GetFareFamilyDescription
- Fare_RebookAndCreateTST
- Air_TLAGetAvailability
- PNR_CreateAuxiliarySegment
Expand Down
118 changes: 118 additions & 0 deletions docs/samples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,24 @@ An example of pricing, with options listed below:
`More examples of Pricing messages <samples/pricepnr.rst>`_

---------------------------
Fare_PriceUpsellWithoutPNR
---------------------------

**Fare_PriceUpsellWithoutPNR allows an user to get a list of upsell proposition without having to create corresponding Passenger Name Record (PNR).**

This request similar to Fare_PricePNRWithBookingClass:

.. code-block:: php
use Amadeus\Client\RequestOptions\FarePricePnrWithBookingClassOptions;
$pricingResponse = $client->farePricePnrWithBookingClass(
new FarePricePnrWithBookingClassOptions([
'validatingCarrier' => 'SN'
])
);
---------------------------------
Fare_InformativePricingWithoutPNR
---------------------------------
Expand Down Expand Up @@ -1218,6 +1236,28 @@ Get fare rules providing corporate number and departure date:
])
);
-----------------
Fare_GetFareFamilyDescription
-----------------

Basic request to get Fare Families in stateful mode (after pricing):

.. code-block:: php
use Amadeus\Client\RequestOptions\FareGetFareFamilyDescriptionOptions;
$fareFamiliesResponse = $client->fareGetFareFamilyDescription(
new FareGetFareFamilyDescriptionOptions([
'referenceGroups' => [
new ReferenceGroup([
new Reference('REC', 1),
new Reference('FC', 1),
new Reference('FC', 2),
])
]
])
);
--------------------
Fare_ConvertCurrency
--------------------
Expand Down Expand Up @@ -2220,6 +2260,84 @@ Basic Search With Mandatory Elements:
])
);
----------------------------------------------
Ticket_ATCShopperMasterPricerCalendar
----------------------------------------------

Basic Search with 3 plus/minus days range:

.. code-block:: php
use Amadeus\Client\RequestOptions\TicketAtcShopperMpTbSearchOptions;
use Amadeus\Client\RequestOptions\Fare\MPDate;
use Amadeus\Client\RequestOptions\Fare\MPItinerary;
use Amadeus\Client\RequestOptions\Fare\MPLocation;
use Amadeus\Client\RequestOptions\Fare\MPPassenger;
use Amadeus\Client\RequestOptions\Ticket\ReqSegOptions;
$response = $client->ticketAtcShopperMasterPricerTravelBoardSearch(
new TicketAtcShopperMpTbSearchOptions([
'nrOfRequestedPassengers' => 2,
'nrOfRequestedResults' => 2,
'passengers' => [
new MPPassenger([
'type' => MPPassenger::TYPE_ADULT,
'count' => 1
]),
new MPPassenger([
'type' => MPPassenger::TYPE_CHILD,
'count' => 1
])
],
'flightOptions' => [
TicketAtcShopperMpTbSearchOptions::FLIGHTOPT_PUBLISHED,
TicketAtcShopperMpTbSearchOptions::FLIGHTOPT_UNIFARES
],
'itinerary' => [
new MPItinerary([
'segmentReference' => 1,
'departureLocation' => new MPLocation(['city' => 'MAD']),
'arrivalLocation' => new MPLocation(['city' => 'LHR']),
'date' => new MPDate([
'date' => new \DateTime('2013-08-12T00:00:00+0000', new \DateTimeZone('UTC')),
'rangeMode' => MPDate::RANGEMODE_MINUS_PLUS,
'range' => 3,
])
]),
new MPItinerary([
'segmentReference' => 2,
'departureLocation' => new MPLocation(['city' => 'LHR']),
'arrivalLocation' => new MPLocation(['city' => 'MAD']),
'date' => new MPDate([
'date' => new \DateTime('2013-12-12T00:00:00+0000', new \DateTimeZone('UTC')),
'rangeMode' => MPDate::RANGEMODE_MINUS_PLUS,
'range' => 3,
])
])
],
'ticketNumbers' => [
'0572187777498',
'0572187777499'
],
'requestedSegments' => [
new ReqSegOptions([
'requestCode' => ReqSegOptions::REQUEST_CODE_KEEP_FLIGHTS_AND_FARES,
'connectionLocations' => [
'MAD',
'LHR'
]
]),
new ReqSegOptions([
'requestCode' => ReqSegOptions::REQUEST_CODE_CHANGE_REQUESTED_SEGMENT,
'connectionLocations' => [
'LHR',
'MAD'
]
])
]
])
);
---------------------------------
Ticket_RepricePNRWithBookingClass
---------------------------------
Expand Down
61 changes: 59 additions & 2 deletions src/Amadeus/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class Client extends Base
*
* @var string
*/
const VERSION = "1.9.0";
const VERSION = "1.11.0-dev";

/**
* An identifier string for the library (to be used in Received From entries)
Expand Down Expand Up @@ -704,6 +704,44 @@ public function fareInformativePricingWithoutPnr(
return $this->callMessage($msgName, $options, $messageOptions);
}

/**
* Fare_PriceUpsellWithoutPNR
*
* @param RequestOptions\FarePriceUpsellWithoutPnrOptions $options
* @param array $messageOptions (OPTIONAL)
* @return Result
* @throws Client\InvalidMessageException
* @throws Client\RequestCreator\MessageVersionUnsupportedException
* @throws Exception
*/
public function farePriceUpsellWithoutPnr(
RequestOptions\FarePriceUpsellWithoutPnrOptions $options,
$messageOptions = []
) {
$msgName = 'Fare_PriceUpsellWithoutPNR';

return $this->callMessage($msgName, $options, $messageOptions);
}

/**
* Fare_GetFareFamilyDescription
*
* @param RequestOptions\FareGetFareFamilyDescriptionOptions $options
* @param array $messageOptions (OPTIONAL)
* @return Result
* @throws Client\InvalidMessageException
* @throws Client\RequestCreator\MessageVersionUnsupportedException
* @throws Exception
*/
public function fareGetFareFamilyDescription(
RequestOptions\FareGetFareFamilyDescriptionOptions $options,
$messageOptions = []
) {
$msgName = 'Fare_GetFareFamilyDescription';

return $this->callMessage($msgName, $options, $messageOptions);
}

/**
* Fare_InformativeBestPricingWithoutPNR
*
Expand Down Expand Up @@ -1192,6 +1230,25 @@ public function ticketAtcShopperMasterPricerTravelBoardSearch(
return $this->callMessage($msgName, $options, $messageOptions);
}

/**
* Ticket_ATCShopperMasterPricerCalendar
*
* @param RequestOptions\TicketAtcShopperMpCalendarOptions $options
* @param array $messageOptions (OPTIONAL)
* @return Result
* @throws Client\InvalidMessageException
* @throws Client\RequestCreator\MessageVersionUnsupportedException
* @throws Exception
*/
public function ticketAtcShopperMasterPricerCalendar(
RequestOptions\TicketAtcShopperMpCalendarOptions $options,
$messageOptions = []
) {
$msgName = 'Ticket_ATCShopperMasterPricerCalendar';

return $this->callMessage($msgName, $options, $messageOptions);
}

/**
* Ticket_RepricePNRWithBookingClass
*
Expand Down Expand Up @@ -1655,7 +1712,7 @@ public function salesReportsDisplayNetRemitReport(
public function serviceStandaloneCatalogue(RequestOptions\ServiceStandaloneCatalogueOptions $options, $messageOptions = [])
{
$msgName = 'Service_StandaloneCatalogue';

return $this->callMessage($msgName, $options, $messageOptions);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

namespace Amadeus\Client\RequestCreator\Converter\Fare;

use Amadeus\Client\RequestCreator\Converter\BaseConverter;
use Amadeus\Client\RequestOptions\FareGetFareFamilyDescriptionOptions;
use Amadeus\Client\Struct\Fare\GetFareFamilyDescription;

/**
* Fare_GetFareFamilyDescription Request converter
*
* Class GetFareFamilyDescriptionConv
* @package Amadeus\Client\RequestCreator\Converter\Fare
*/
class GetFareFamilyDescriptionConv extends BaseConverter
{
/**
* @param FareGetFareFamilyDescriptionOptions $requestOptions
* @param int|string $version
* @return GetFareFamilyDescription
*/
public function convert($requestOptions, $version)
{
return new GetFareFamilyDescription($requestOptions);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php
/**
* amadeus-ws-client
*
* Copyright 2020 Amadeus Benelux NV
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @package Amadeus
* @license https://opensource.org/licenses/Apache-2.0 Apache 2.0
*/

namespace Amadeus\Client\RequestCreator\Converter\Fare;

use Amadeus\Client\RequestCreator\Converter\BaseConverter;
use Amadeus\Client\RequestOptions\FarePriceUpsellWithoutPnrOptions;
use Amadeus\Client\Struct;

/**
* Fare_PriceUpsellWithoutPNR Request converter
*
* @package Amadeus\Client\RequestCreator\Converter\Fare
* @author Valerii Nezhurov <valeriy.nezhuriov@gmail.com>
*/
class PriceUpsellWithoutPNRConv extends BaseConverter
{
/**
* @param FarePriceUpsellWithoutPnrOptions $requestOptions
* @param int|string $version
* @return Struct\Fare\PriceUpsellWithoutPNR
*/
public function convert($requestOptions, $version)
{
return new Struct\Fare\PriceUpsellWithoutPNR($requestOptions);
}
}

0 comments on commit f661eef

Please sign in to comment.