Passed
Pull Request — master (#484)
by Artem
04:56 queued 28s
created

OrderChange   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 11
c 1
b 0
f 0
dl 0
loc 22
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
1
<?php
2
3
namespace Amadeus\Client\Struct\Travel;
4
5
use Amadeus\Client\RequestOptions\TravelOrderChangeOptions;
6
use Amadeus\Client\Struct\BaseWsMessage;
7
8
/**
9
 * Travel_OrderChange message structure
10
 *
11
 * @package Amadeus\Client\Struct\Travel
12
 * @author Artem Zakharchenko <[email protected]>
13
 */
14
class OrderChange extends BaseWsMessage
15
{
16
    /**
17
     * @var Party
18
     */
19
    public $Party;
20
21
    /**
22
     * @var OrderChange\Request
23
     */
24
    public $Request;
25
26
    public function __construct(TravelOrderChangeOptions $options)
27
    {
28
        $this->Party = new Party($options->party);
29
        $this->Request = new OrderChange\Request(
30
            $options->acceptChange,
31
            $options->updateOrderItem,
32
            $options->dataLists,
33
            new Order(
34
                $options->orderId,
35
                $options->ownerCode
36
            )
37
        );
38
    }
39
}
40