Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
76 changes: 76 additions & 0 deletions src/Amadeus/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -1527,6 +1527,82 @@ public function priceXplorerExtremeSearch(
return $this->callMessage($msgName, $options, $messageOptions);
}

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

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

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

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

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

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

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

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

/**
* SalesReports_DisplayQueryReport
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace Amadeus\Client\RequestCreator\Converter\Profile;

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

class CreateProfileConv extends BaseConverter
{
/**
* @param ProfileCreateProfileOptions $requestOptions
* @param int|string $version
* @return Struct\Profile\ProfileCreateProfile
*/
public function convert($requestOptions, $version)
{
return new Struct\Profile\ProfileCreateProfile($requestOptions);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace Amadeus\Client\RequestCreator\Converter\Profile;

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

class DeleteProfileConv extends BaseConverter
{
/**
* @param ProfileDeleteProfileOptions $requestOptions
* @param int|string $version
* @return Struct\Profile\ProfileDeleteProfile
*/
public function convert($requestOptions, $version)
{
return new Struct\Profile\ProfileDeleteProfile($requestOptions);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace Amadeus\Client\RequestCreator\Converter\Profile;

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

class ReadProfileConv extends BaseConverter
{
/**
* @param ProfileReadProfileOptions $requestOptions
* @param int|string $version
* @return Struct\Profile\ProfileReadProfile
*/
public function convert($requestOptions, $version)
{
return new Struct\Profile\ProfileReadProfile($requestOptions);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace Amadeus\Client\RequestCreator\Converter\Profile;

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

class UpdateProfileConv extends BaseConverter
{
/**
* @param ProfileUpdateProfileOptions $requestOptions
* @param int|string $version
* @return Struct\Profile\ProfileUpdateProfile
*/
public function convert($requestOptions, $version)
{
return new Struct\Profile\ProfileUpdateProfile($requestOptions);
}
}
11 changes: 11 additions & 0 deletions src/Amadeus/Client/RequestOptions/ProfileCreateProfileOptions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace Amadeus\Client\RequestOptions;

class ProfileCreateProfileOptions extends Base
{
public $Version;
public $UniqueID;
public $Profile;
public $CompanyName;
}
10 changes: 10 additions & 0 deletions src/Amadeus/Client/RequestOptions/ProfileDeleteProfileOptions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace Amadeus\Client\RequestOptions;

class ProfileDeleteProfileOptions extends Base
{
public $Version;
public $UniqueID;
public $DeleteRequests;
}
10 changes: 10 additions & 0 deletions src/Amadeus/Client/RequestOptions/ProfileReadProfileOptions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace Amadeus\Client\RequestOptions;

class ProfileReadProfileOptions extends Base
{
public $Version;
public $UniqueID;
public $ReadRequests;
}
10 changes: 10 additions & 0 deletions src/Amadeus/Client/RequestOptions/ProfileUpdateProfileOptions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace Amadeus\Client\RequestOptions;

class ProfileUpdateProfileOptions extends Base
{
public $Position;
public $UniqueID=[];
public $Version;
}
10 changes: 10 additions & 0 deletions src/Amadeus/Client/Struct/Profile/BaseProfileMessage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace Amadeus\Client\Struct\Profile;

use Amadeus\Client\Struct\BaseWsMessage;

class BaseProfileMessage extends BaseWsMessage
{
public $Version;
}
20 changes: 20 additions & 0 deletions src/Amadeus/Client/Struct/Profile/ProfileCreateProfile.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace Amadeus\Client\Struct\Profile;

class ProfileCreateProfile extends BaseProfileMessage
{
public $UniqueID;
public $Profile;
public $CompanyName;

public function __construct($options)
{
if (!is_null($options)) {
$this->Version= $options->Version;
$this->UniqueID= $options->UniqueID;
$this->Profile= $options->Profile;
$this->CompanyName= $options->CompanyName;
}
}
}
18 changes: 18 additions & 0 deletions src/Amadeus/Client/Struct/Profile/ProfileDeleteProfile.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace Amadeus\Client\Struct\Profile;

class ProfileDeleteProfile extends BaseProfileMessage
{
public $UniqueID;
public $DeleteRequests;

public function __construct($options)
{
if (!is_null($options)) {
$this->Version= $options->Version;
$this->UniqueID= $options->UniqueID;
$this->DeleteRequests= $options->DeleteRequests;
}
}
}
18 changes: 18 additions & 0 deletions src/Amadeus/Client/Struct/Profile/ProfileReadProfile.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace Amadeus\Client\Struct\Profile;

class ProfileReadProfile extends BaseProfileMessage
{
public $UniqueID;
public $ReadRequests;

public function __construct($options)
{
if (!is_null($options)) {
$this->Version= $options->Version;
$this->UniqueID= $options->UniqueID;
$this->ReadRequests= $options->ReadRequests;
}
}
}
21 changes: 21 additions & 0 deletions src/Amadeus/Client/Struct/Profile/ProfileUpdateProfile.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace Amadeus\Client\Struct\Profile;

class ProfileUpdateProfile extends BaseProfileMessage
{
public $Position;
//public $Root;
public $UniqueID = [];

public function __construct($options)
{
if (!is_null($options)) {
foreach ($options as $propName => $propValue) {
if (property_exists($this, $propName)) {
$this->$propName = $propValue;
}
}
}
}
}