Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Message Service_StandaloneCatalogue Integration #220

Merged
merged 71 commits into from
Jun 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
227bfc4
new message serviceStandaloneCatalogue
arvind-pandey Aug 4, 2018
d08bfe9
Update list-of-supported-messages.rst
arvind-pandey Aug 4, 2018
a06dcbe
Update samples.rst
arvind-pandey Aug 4, 2018
0280980
Update samples.rst
arvind-pandey Aug 4, 2018
d9c475a
changes
arvind-pandey Aug 6, 2018
b4b080a
Merge branch 'master' of https://github.com/arvind-pandey/amadeus-ws-…
arvind-pandey Aug 6, 2018
acf7fa2
change
arvind-pandey Aug 6, 2018
4bcb141
change
arvind-pandey Aug 6, 2018
4616da4
changes
arvind-pandey Aug 6, 2018
16c67c9
deleted
arvind-pandey Aug 6, 2018
d2bc03c
change
arvind-pandey Aug 7, 2018
80e6a06
changes
arvind-pandey Aug 7, 2018
75b361d
change
arvind-pandey Aug 8, 2018
966f851
change
arvind-pandey Aug 8, 2018
7111c55
change
arvind-pandey Aug 8, 2018
3a94c65
change
arvind-pandey Aug 8, 2018
d2ce665
change
arvind-pandey Aug 8, 2018
edcdbb2
change
arvind-pandey Aug 8, 2018
0c0e0a4
change
arvind-pandey Aug 8, 2018
431242a
change
arvind-pandey Aug 8, 2018
ed5fb9c
change
arvind-pandey Aug 8, 2018
3f232c4
change
arvind-pandey Aug 8, 2018
f456fe1
Update samples.rst
arvind-pandey Aug 8, 2018
061208b
change
arvind-pandey Aug 8, 2018
a7eb0bf
Merge branch 'master' of https://github.com/arvind-pandey/amadeus-ws-…
arvind-pandey Aug 8, 2018
7605a23
change
arvind-pandey Aug 8, 2018
ce4ee7e
change
arvind-pandey Aug 8, 2018
eb7f3ff
change
arvind-pandey Aug 13, 2018
35a3e6b
change
arvind-pandey Aug 13, 2018
cc7de16
Changes
arvind-pandey Aug 23, 2018
c67a6b8
Changes
arvind-pandey Aug 23, 2018
bde5e84
Changes
arvind-pandey Aug 23, 2018
00edb92
undone the changes
arvind-pandey Aug 24, 2018
febdeee
changes remove
arvind-pandey Aug 24, 2018
b486607
changes
arvind-pandey Aug 24, 2018
3416966
changes
arvind-pandey Aug 24, 2018
691cfc5
changes
arvind-pandey Aug 24, 2018
03240f8
changes
arvind-pandey Aug 24, 2018
30cf0ba
arvind
arvind-pandey Aug 24, 2018
e68a7d5
arvind
arvind-pandey Aug 24, 2018
f8a18ec
arvind
arvind-pandey Aug 24, 2018
c6b3a11
arvind
arvind-pandey Aug 24, 2018
618216f
changes
arvind-pandey Aug 24, 2018
aa77b89
changes
arvind-pandey Aug 27, 2018
3911d21
changes
arvind-pandey Aug 27, 2018
a2aa616
changes
arvind-pandey Aug 27, 2018
19453b7
Style CI resolved
arvind-pandey Aug 27, 2018
35c1ca6
git style ci issue
arvind-pandey Aug 27, 2018
9e51756
git style ci issue
arvind-pandey Aug 27, 2018
eac425c
git style ci issue
arvind-pandey Aug 27, 2018
eb391ef
git style ci issue
arvind-pandey Aug 27, 2018
dc9d03f
git style ci issue
arvind-pandey Aug 27, 2018
872e3da
git style ci issue
arvind-pandey Aug 27, 2018
c0c33b7
changes in request option
arvind-pandey Aug 27, 2018
b817028
Update samples.rst
arvind-pandey Aug 27, 2018
69437df
change for coverage
arvind-pandey Nov 3, 2018
911bd14
conflict resolve
arvind-pandey Nov 3, 2018
611f0ad
conflick resolved
arvind-pandey Nov 3, 2018
01d531e
conflick resolved
arvind-pandey Nov 3, 2018
86e3cda
conflick resolved
arvind-pandey Nov 3, 2018
5d4697c
conflick resolved
arvind-pandey Nov 3, 2018
8ea8f31
conflick resolved
arvind-pandey Nov 3, 2018
3638560
conflick resolved
arvind-pandey Nov 3, 2018
762658e
change
arvind-pandey Jan 9, 2019
b002a3b
Merge branch 'master' into master
DerMika May 25, 2019
0989c12
Fix sample
therealartz Jun 3, 2019
dcdefcf
Create response handler for Service_StandaloneCatalogue
therealartz Jun 3, 2019
68d9f0d
Add Client test of Service_StandaloneCatalogue
therealartz Jun 3, 2019
7950fab
Refactor doc blocks
therealartz Jun 3, 2019
6b35d3f
Added struct test
therealartz Jun 3, 2019
bbdbaa2
Merge pull request #1 from arvind-pandey/standalone_pricing
therealartz Jun 6, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/list-of-supported-messages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ This is the list of messages that are at least partially supported at this time:
- DocRefund_IgnoreRefund
- Service_IntegratedPricing
- Service_IntegratedCatalogue
- Service_StandaloneCatalogue
- Offer_CreateOffer
- Offer_VerifyOffer
- Offer_ConfirmAirOffer
Expand Down Expand Up @@ -106,7 +107,6 @@ These messages will be implemented at some point in the future. *Pull requests a
- Media_GetMedia
- Service_PriceServiceViaCatalogue
- Service_PriceIntegratedMode
- Service_StandaloneCatalogue
- Service_StandalonePricing
- Hotel_MultiSingleAvailability (see `issue 70 <https://github.com/amabnl/amadeus-ws-client/issues/70>`_)
- Hotel_DescriptiveInfo (see `issue 70 <https://github.com/amabnl/amadeus-ws-client/issues/70>`_)
Expand Down
55 changes: 55 additions & 0 deletions docs/samples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3265,6 +3265,61 @@ All the examples for ``Service_IntegratedPricing`` (see above) should also work
]
])
);

---------------------------
Service_StandaloneCatalogue
---------------------------

.. code-block:: php

use Amadeus\Client\RequestOptions\Fare\InformativePricing\Segment;
use Amadeus\Client\RequestOptions\ServiceStandaloneCatalogueOptions;
use Amadeus\Client\RequestOptions\Service\StandaloneCatalogue\ServiceStandalonePricingOptions;
use Amadeus\Client\RequestOptions\Service\StandaloneCatalogue\ServicePassenger;
use Amadeus\Client\RequestOptions\Service\PaxSegRef;
use Amadeus\Client\RequestOptions\Fare\PricePnr\FareBasis;

$standaloneCatalogueResponse = $client->serviceStandaloneCatalogue(
new ServiceStandaloneCatalogueOptions([
'passengers' => [
new ServicePassenger([
'reference' => 1,
'type' => ServicePassenger::TYPE_ADULT
])
],
'segments' => [
new Segment([
'departureDate' => \DateTime::createFromFormat('Y-m-d H:i:s', '2018-07-31 12:55:00'),
'arrivalDate' => \DateTime::createFromFormat('Y-m-d H:i:s', '2018-07-31 15:10:00'),
'from' => 'CAI',
'to' => 'TUN',
'marketingCompany' => 'TU',
'operatingCompany' => 'TU',
'flightNumber' => '814',
'bookingClass' => 'L',
'groupNumber' => 'L',
'segmentTattoo' => 1
])
],
'pricingOptions' => new ServiceStandalonePricingOptions([
'pricingsFareBasis' => [
new FareBasis([
'fareBasisCode' => 'LOXOW',
])
],
'references' => [
new PaxSegRef([
'reference' => 1,
'type' => 'S'
]),
new PaxSegRef([
'reference' => 1,
'type' => 'P'
])
]
])
])
);

***
FOP
Expand Down
18 changes: 18 additions & 0 deletions src/Amadeus/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -1622,6 +1622,24 @@ public function salesReportsDisplayNetRemitReport(
return $this->callMessage($msgName, $options, $messageOptions);
}

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

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

/**
* Call a message with the given parameters
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php
/**
* amadeus-ws-client
*
* Copyright 2015 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\Service;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the PSR-2 standard, there has to be an empty line between namespace declaration and use statements.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change done.


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

/**
* Service_StandaloneCatalogue Request converter
*
* @package Amadeus\Client\RequestCreator\Converter\Service
* @author Arvind Pandey <arvindpandey87@gmail.com>
*/
class StandaloneCatalogueConv extends BaseConverter
{
/**
* @param ServiceIntegratedCatalogueOptions $requestOptions
* @param int|string $version
* @return Struct\Service\StandaloneCatalogue
*/
public function convert($requestOptions, $version)
{
return new Struct\Service\StandaloneCatalogue($requestOptions);
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the PSR-2 standard, there has to be an empty line following the closing bracket at the end of the file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change done

Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php
/**
* amadeus-ws-client
*
* Copyright 2015 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\RequestOptions\Service\StandaloneCatalogue;

use Amadeus\Client\RequestOptions\Fare\InformativePricing\Passenger;

/**
* Passenger
*
* @package Amadeus\Client\RequestOptions\Fare\InformativePricing
* @author Arvind Pandey <arvindpandey87@gmail.com>
*/
class ServicePassenger extends Passenger
{
/**
* Specifies the passenger index
*
* If you have 3 passengers of this type, you need to provide 3 unique passenger index.
*
* @var int
*/
public $reference;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php
/**
* amadeus-ws-client
*
* Copyright 2015 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\RequestOptions\Service\StandaloneCatalogue;

use Amadeus\Client\RequestOptions\Fare\InformativePricing\PricingOptions;

/**
* Pricing Options for the Service_StandaloneCatalogue message
*
* @package Amadeus\Client\RequestOptions\ServiceIntegratedPricingOptions
* @author Arvind Pandey <arvindpandey87@gmail.com>
*/
class ServiceStandalonePricingOptions extends PricingOptions
{
const OVERRIDE_MANUAL_INPUT_FORMATTED = 'MIF';
const OVERRIDE_COMMERCIAL_DESCRIPTION = 'SCD';
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php
/**
* amadeus-ws-client
*
* Copyright 2015 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\RequestOptions;

/**
* ServiceStandaloneCatalogueOptions Request Options
*
* @package Amadeus\Client\RequestOptions
* @author Arvind Pandey <arvindpandey87@gmail.com>
*/
class ServiceStandaloneCatalogueOptions extends FareInformativePricingWithoutPnrOptions
{
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php
/**
* amadeus-ws-client
*
* Copyright 2015 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\ResponseHandler\Service;

/**
* Response handler for Service_StandaloneCatalogue
*
* @package Amadeus\Client\ResponseHandler\Service
* @author Artem Zakharchenko <artz.relax@gmail.com>
*/
class HandlerStandaloneCatalogue extends HandlerIntegratedPricing
{
}
Empty file.
Loading