Completed
Push — master ( dc30b6...cc4a0b )
by João Felipe Magro
03:10
created

SplitRule::setSellerId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Ipag\Classes;
4
5
use Ipag\Classes\Contracts\Emptiable;
6
use Ipag\Classes\Traits\EmptiableTrait;
7
8
final class SplitRule extends BaseResource implements Emptiable
9
{
10
    use EmptiableTrait;
11
12
    /**
13
     * @var string
14
     */
15
    private $sellerId;
16
17
    /**
18
     * @var int
19
     */
20
    private $percentage;
21
22
    /**
23
     * @var float
24
     */
25
    private $amount;
26
27
    /**
28
     * @var int
29
     */
30
    private $liable;
31
32
    /**
33
     * @var int
34
     */
35
    private $chargeProcessingFee;
36
37
    /**
38
     * @return string
39
     */
40
    public function getSellerId()
41
    {
42
        return $this->sellerId;
43
    }
44
45
    /**
46
     * @param string $sellerId
47
     *
48
     * @return self
49
     */
50
    public function setSellerId($sellerId)
51
    {
52
        $this->sellerId = $sellerId;
53
54
        return $this;
55
    }
56
57
    /**
58
     * @return int
59
     */
60
    public function getPercentage()
61
    {
62
        return $this->percentage;
63
    }
64
65
    /**
66
     * @param int $percentage
67
     *
68
     * @return self
69
     */
70
    public function setPercentage($percentage)
71
    {
72
        $this->percentage = intval($percentage);
73
74
        return $this;
75
    }
76
77
    /**
78
     * @return float
79
     */
80
    public function getAmount()
81
    {
82
        return $this->amount;
83
    }
84
85
    /**
86
     * @param float $amount
87
     *
88
     * @return self
89
     */
90
    public function setAmount($amount)
91
    {
92
        $this->amount = $this->getNumberUtil()->convertToDouble($amount);
93
94
        return $this;
95
    }
96
97
    /**
98
     * @return int
99
     */
100
    public function getLiable()
101
    {
102
        return $this->liable;
103
    }
104
105
    /**
106
     * @param int $liable
107
     *
108
     * @return self
109
     */
110
    public function setLiable($liable = 1)
111
    {
112
        $this->liable = intval($liable);
113
114
        return $this;
115
    }
116
117
    /**
118
     * @return int
119
     */
120
    public function getChargeProcessingFee()
121
    {
122
        return $this->chargeProcessingFee;
123
    }
124
125
    /**
126
     * @param int $chargeProcessingFee
127
     *
128
     * @return self
129
     */
130
    public function setChargeProcessingFee($chargeProcessingFee = 0)
131
    {
132
        $this->chargeProcessingFee = intval($chargeProcessingFee);
133
134
        return $this;
135
    }
136
}
137