1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Ups\Entity; |
4
|
|
|
|
5
|
|
|
/** |
6
|
|
|
* @author Thijs Wijnmaalen <[email protected]> |
7
|
|
|
*/ |
8
|
|
|
class ShipmentCharge |
9
|
|
|
{ |
10
|
|
|
|
11
|
|
|
const TYPE_TRANSPORTATION = '01'; |
12
|
|
|
const TYPE_DUTIES_AND_TAXES = '02'; |
13
|
|
|
|
14
|
|
|
const CHARGES_BILL_SHIPPER = 'billShipper'; |
15
|
|
|
const CHARGES_BILL_RECEIVER = 'billReceiver'; |
16
|
|
|
const CHARGES_BILL_THIRD_PARTY = 'billThirdParty'; |
17
|
|
|
const CHARGES_BILL_CONSIGNEE_BILLED = 'billConsigneeBilled'; |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* @var string |
21
|
|
|
*/ |
22
|
|
|
private $type = '01'; |
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* @var BillShipper |
26
|
|
|
*/ |
27
|
|
|
private $billShipper; |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* @var BillReceiver |
31
|
|
|
*/ |
32
|
|
|
private $billReceiver; |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* @var BillThirdParty |
36
|
|
|
*/ |
37
|
|
|
private $billThirdParty; |
38
|
|
|
|
39
|
|
|
/** |
40
|
|
|
* @var boolean |
41
|
|
|
*/ |
42
|
|
|
private $billConsigneeBilled; |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* @var boolean |
46
|
|
|
*/ |
47
|
|
|
private $splitDutyVATIndicator; |
48
|
|
|
|
49
|
|
|
/** |
50
|
|
|
* @param string $type |
51
|
|
|
* |
52
|
|
|
* @return $this |
53
|
|
|
*/ |
54
|
|
|
public function setType($type) { |
55
|
|
|
$this->type = $type; |
56
|
|
|
|
57
|
|
|
return $this; |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* @return string |
62
|
|
|
*/ |
63
|
|
|
public function getType() { |
64
|
|
|
return $this->type; |
65
|
|
|
} |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* @param BillShipper $shipper |
69
|
|
|
* @return $this |
70
|
|
|
*/ |
71
|
|
|
public function setBillShipper(BillShipper $shipper) { |
72
|
|
|
$this->billShipper = $shipper; |
73
|
|
|
|
74
|
|
|
return $this; |
75
|
|
|
} |
76
|
|
|
|
77
|
|
|
/** |
78
|
|
|
* @return BillShipper |
79
|
|
|
*/ |
80
|
|
|
public function getBillShipper() { |
81
|
|
|
return $this->billShipper; |
82
|
|
|
} |
83
|
|
|
|
84
|
|
|
/** |
85
|
|
|
* @param BillReceiver $receiver |
86
|
|
|
* @return $this |
87
|
|
|
*/ |
88
|
|
|
public function setBillReceiver(BillReceiver $receiver) { |
89
|
|
|
$this->billReceiver = $receiver; |
90
|
|
|
|
91
|
|
|
return $this; |
92
|
|
|
} |
93
|
|
|
|
94
|
|
|
/** |
95
|
|
|
* @return BillReceiver |
96
|
|
|
*/ |
97
|
|
|
public function getBillReceiver() { |
98
|
|
|
return $this->billReceiver; |
99
|
|
|
} |
100
|
|
|
|
101
|
|
|
/** |
102
|
|
|
* @param BillThirdParty $thirdParty |
103
|
|
|
* @return $this |
104
|
|
|
*/ |
105
|
|
|
public function setThirdPartyBilled(BillThirdParty $thirdParty) { |
106
|
|
|
$this->billThirdParty = $thirdParty; |
107
|
|
|
|
108
|
|
|
return $this; |
109
|
|
|
} |
110
|
|
|
|
111
|
|
|
/** |
112
|
|
|
* @return BillThirdParty |
113
|
|
|
*/ |
114
|
|
|
public function getThirdPartyBilled() { |
115
|
|
|
return $this->billThirdParty; |
116
|
|
|
} |
117
|
|
|
|
118
|
|
|
/** |
119
|
|
|
* @param boolean $bool |
120
|
|
|
* @return $this |
121
|
|
|
*/ |
122
|
|
|
public function setConsigneeBilled($bool = true) { |
123
|
|
|
$this->billConsigneeBilled = $bool; |
124
|
|
|
|
125
|
|
|
return $this; |
126
|
|
|
} |
127
|
|
|
|
128
|
|
|
/** |
129
|
|
|
* @return bool |
130
|
|
|
*/ |
131
|
|
|
public function getConsigneeBilled() { |
132
|
|
|
return $this->billConsigneeBilled; |
133
|
|
|
} |
134
|
|
|
|
135
|
|
|
/** |
136
|
|
|
* @param bool $indicator |
137
|
|
|
* @return $this |
138
|
|
|
*/ |
139
|
|
|
public function setSplitDutyVATIndicator($indicator = true) { |
140
|
|
|
$this->splitDutyVATIndicator = $indicator; |
141
|
|
|
|
142
|
|
|
return $this; |
143
|
|
|
} |
144
|
|
|
|
145
|
|
|
/** |
146
|
|
|
* @return boolean |
147
|
|
|
*/ |
148
|
|
|
public function getSplitDutyVATIndicator() { |
149
|
|
|
return $this->splitDutyVATIndicator; |
150
|
|
|
} |
151
|
|
|
|
152
|
|
|
} |
153
|
|
|
|