1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Ups\Entity; |
4
|
|
|
|
5
|
|
|
trait ServiceSummaryTrait |
6
|
|
|
{ |
7
|
|
|
/** @deprecated */ |
8
|
|
|
public $Service; |
9
|
|
|
|
10
|
|
|
/** @deprecated */ |
11
|
|
|
public $Guaranteed; |
12
|
|
|
|
13
|
|
|
/** @deprecated */ |
14
|
|
|
public $SaturdayDelivery; |
15
|
|
|
|
16
|
|
|
/** @deprecated */ |
17
|
|
|
public $SaturdayDeliveryDisclaimer; |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* @var Service |
21
|
|
|
*/ |
22
|
|
|
protected $service; |
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* @var Guaranteed |
26
|
|
|
*/ |
27
|
|
|
protected $guaranteed; |
28
|
|
|
|
29
|
|
|
/** @var mixed */ |
30
|
|
|
protected $saturdayDelivery; |
31
|
|
|
|
32
|
|
|
/** @var mixed */ |
33
|
|
|
protected $saturdayDeliveryDisclaimer; |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* @param \stdClass|null $response |
37
|
|
|
*/ |
38
|
4 |
|
public function build(\stdClass $response = null) |
39
|
|
|
{ |
40
|
4 |
|
$this->setService(new Service()); |
41
|
4 |
|
$this->setGuaranteed(new Guaranteed()); |
42
|
|
|
|
43
|
4 |
|
if (null !== $response) { |
44
|
3 |
|
if (isset($response->Service)) { |
45
|
3 |
|
$this->setService(new Service($response->Service)); |
46
|
3 |
|
} |
47
|
3 |
|
if (isset($response->Guaranteed)) { |
48
|
3 |
|
$this->setGuaranteed(new Guaranteed($response->Guaranteed)); |
49
|
3 |
|
} |
50
|
3 |
|
} |
51
|
4 |
|
} |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* @return Service|null |
55
|
|
|
*/ |
56
|
|
|
public function getService() |
57
|
|
|
{ |
58
|
|
|
return $this->service; |
59
|
|
|
} |
60
|
|
|
|
61
|
|
|
/** |
62
|
|
|
* @param Service $service |
63
|
|
|
*/ |
64
|
4 |
|
public function setService(Service $service) |
65
|
|
|
{ |
66
|
4 |
|
$this->Service = $service; |
|
|
|
|
67
|
4 |
|
$this->service = $service; |
68
|
4 |
|
} |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* @return Guaranteed|null |
72
|
|
|
*/ |
73
|
|
|
public function getGuaranteed() |
74
|
|
|
{ |
75
|
|
|
return $this->guaranteed; |
76
|
|
|
} |
77
|
|
|
|
78
|
|
|
/** |
79
|
|
|
* @param $guaranteed |
80
|
|
|
*/ |
81
|
4 |
|
public function setGuaranteed(Guaranteed $guaranteed) |
82
|
|
|
{ |
83
|
4 |
|
$this->Guaranteed = $guaranteed; |
|
|
|
|
84
|
4 |
|
$this->guaranteed = $guaranteed; |
85
|
4 |
|
} |
86
|
|
|
|
87
|
|
|
/** |
88
|
|
|
* @return mixed |
89
|
|
|
*/ |
90
|
|
|
public function getSaturdayDelivery() |
91
|
|
|
{ |
92
|
|
|
return $this->saturdayDelivery; |
93
|
|
|
} |
94
|
|
|
|
95
|
|
|
/** |
96
|
|
|
* @param mixed $saturdayDelivery |
97
|
|
|
*/ |
98
|
|
|
public function setSaturdayDelivery($saturdayDelivery) |
99
|
|
|
{ |
100
|
|
|
$this->SaturdayDelivery = $saturdayDelivery; |
|
|
|
|
101
|
|
|
$this->saturdayDelivery = $saturdayDelivery; |
102
|
|
|
} |
103
|
|
|
|
104
|
|
|
/** |
105
|
|
|
* @return mixed |
106
|
|
|
*/ |
107
|
|
|
public function getSaturdayDeliveryDisclaimer() |
108
|
|
|
{ |
109
|
|
|
return $this->saturdayDeliveryDisclaimer; |
110
|
|
|
} |
111
|
|
|
|
112
|
|
|
/** |
113
|
|
|
* @param mixed $saturdayDeliveryDisclaimer |
114
|
|
|
*/ |
115
|
|
|
public function setSaturdayDeliveryDisclaimer($saturdayDeliveryDisclaimer) |
116
|
|
|
{ |
117
|
|
|
$this->SaturdayDeliveryDisclaimer = $saturdayDeliveryDisclaimer; |
|
|
|
|
118
|
|
|
$this->saturdayDeliveryDisclaimer = $saturdayDeliveryDisclaimer; |
119
|
|
|
} |
120
|
|
|
} |
121
|
|
|
|
This property has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the property will be removed from the class and what other property to use instead.