Completed
Pull Request — master (#145)
by
unknown
03:13
created

EstimatedArrival::getTotalTransitDays()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 1
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Ups\Entity\Rate;
4
5
use Ups\Entity\Arrival;
6
use Ups\Entity\Pickup;
7
8
class EstimatedArrival
9
{
10
    private $BusinessTransitDays;
11
    private $Arrival;
12
    private $Pickup;
13
    private $DayOfWeek;
14
    private $CustomerCenterCutoff;
15
    private $DelayCount;
16
    private $HolidayCount;
17
    private $RestDays;
18
    private $TotalTransitDays;
19
20
    /**
21
     * @param \stdClass|null $response
22
     */
23 5
    public function __construct(\stdClass $response = null)
24
    {
25 5
        if (null !== $response) {
26 3
            if (isset($response->BusinessTransitDays)) {
27 3
                $this->BusinessTransitDays = $response->BusinessTransitDays;
28 3
            }
29 3
            if (isset($response->Arrival)) {
30
                $this->Arrival = new Arrival($response->Arrival);
31
            }
32 3
            if (isset($response->Pickup)) {
33
                $this->Pickup = new Pickup($response->Pickup);
34
            }
35 3
            if (isset($response->HolidayCount)) {
36 3
                $this->HolidayCount = $response->HolidayCount;
37 3
            }
38 3
            if (isset($response->DelayCount)) {
39 3
                $this->DelayCount = $response->DelayCount;
40 3
            }
41 3
            if (isset($response->DayOfWeek)) {
42 3
                $this->DayOfWeek = $response->DayOfWeek;
43 3
            }
44 3
            if (isset($response->TotalTransitDays)) {
45 3
                $this->TotalTransitDays = $response->TotalTransitDays;
46 3
            }
47 3
            if (isset($response->CustomerCenterCutoff)) {
48 3
                $this->CustomerCenterCutoff = $response->CustomerCenterCutoff;
49 3
            }
50 3
            if (isset($response->RestDays)) {
51 3
                $this->RestDays = $response->RestDays;
52 3
            }
53 3
        }
54 5
    }
55
56
    /**
57
     * @return mixed
58
     */
59
    public function getBusinessTransitDays()
60
    {
61
        return $this->BusinessTransitDays;
62
    }
63
64
    /**
65
     * @param mixed $BusinessTransitDays
66
     */
67
    public function setBusinessTransitDays($BusinessTransitDays)
68
    {
69
        $this->BusinessTransitDays = $BusinessTransitDays;
70
    }
71
72
    /**
73
     * @return Arrival
74
     */
75
    public function getArrival()
76
    {
77
        return $this->Arrival;
78
    }
79
80
    /**
81
     * @param Arrival $Arrival
82
     */
83
    public function setArrival($Arrival)
84
    {
85
        $this->Arrival = $Arrival;
86
    }
87
88
    /**
89
     * @return Pickup
90
     */
91
    public function getPickup()
92
    {
93
        return $this->Pickup;
94
    }
95
96
    /**
97
     * @param Pickup $Pickup
98
     */
99
    public function setPickup($Pickup)
100
    {
101
        $this->Pickup = $Pickup;
102
    }
103
104
    /**
105
     * @return mixed
106
     */
107
    public function getDayOfWeek()
108
    {
109
        return $this->DayOfWeek;
110
    }
111
112
    /**
113
     * @param mixed $DayOfWeek
114
     */
115
    public function setDayOfWeek($DayOfWeek)
116
    {
117
        $this->DayOfWeek = $DayOfWeek;
118
    }
119
120
    /**
121
     * @return mixed
122
     */
123
    public function getCustomerCenterCutoff()
124
    {
125
        return $this->CustomerCenterCutoff;
126
    }
127
128
    /**
129
     * @param mixed $CustomerCenterCutoff
130
     */
131
    public function setCustomerCenterCutoff($CustomerCenterCutoff)
132
    {
133
        $this->CustomerCenterCutoff = $CustomerCenterCutoff;
134
    }
135
136
    /**
137
     * @return mixed
138
     */
139
    public function getDelayCount()
140
    {
141
        return $this->DelayCount;
142
    }
143
144
    /**
145
     * @param mixed $DelayCount
146
     */
147
    public function setDelayCount($DelayCount)
148
    {
149
        $this->DelayCount = $DelayCount;
150
    }
151
152
    /**
153
     * @return mixed
154
     */
155
    public function getHolidayCount()
156
    {
157
        return $this->HolidayCount;
158
    }
159
160
    /**
161
     * @param mixed $HolidayCount
162
     */
163
    public function setHolidayCount($HolidayCount)
164
    {
165
        $this->HolidayCount = $HolidayCount;
166
    }
167
168
    /**
169
     * @return mixed
170
     */
171
    public function getRestDays()
172
    {
173
        return $this->RestDays;
174
    }
175
176
    /**
177
     * @param mixed $RestDays
178
     */
179
    public function setRestDays($RestDays)
180
    {
181
        $this->RestDays = $RestDays;
182
    }
183
184
    /**
185
     * @return mixed
186
     */
187
    public function getTotalTransitDays()
188
    {
189
        return $this->TotalTransitDays;
190
    }
191
192
    /**
193
     * @param mixed $TotalTransitDays
194
     */
195
    public function setTotalTransitDays($TotalTransitDays)
196
    {
197
        $this->TotalTransitDays = $TotalTransitDays;
198
    }
199
200
}
201