Passed
Pull Request — master (#149)
by
unknown
03:42
created

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