Passed
Push — master ( 5addfc...e8c424 )
by Manuel
59s queued 11s
created

ChosenPlan::setAnnualPercentageRate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace Ticketpark\SaferpayJson\Request\Container;
4
5
use JMS\Serializer\Annotation\SerializedName;
6
use JMS\Serializer\Annotation\Type;
7
8
final class ChosenPlan
9
{
10
    /**
11
     * @var int
12
     * @SerializedName("NumberOfInstallments")
13
     * @Type("int")
14
     */
15
    private $numberOfInstallments;
16
17
    /**
18
     * @var string|null
19
     * @SerializedName("InterestRate")
20
     */
21
    private $interestRate;
22
23
    /**
24
     * @var Amount|null
25
     * @SerializedName("InstallmentFee")
26
     * @Type("Ticketpark\SaferpayJson\Request\Container\Amount")
27
     */
28
    private $installmentFee;
29
30
    /**
31
     * @var string|null
32
     * @SerializedName("AnnualPercentageRate")
33
     */
34
    private $annualPercentageRate;
35
36
    /**
37
     * @var Amount|null
38
     * @SerializedName("FirstInstallmentAmount")
39
     * @Type("Ticketpark\SaferpayJson\Request\Container\Amount")
40
     */
41
    private $firstInstallmentAmount;
42
43
    /**
44
     * @var Amount|null
45
     * @SerializedName("SubsequentInstallmentAmount")
46
     * @Type("Ticketpark\SaferpayJson\Request\Container\Amount")
47
     */
48
    private $subsequentInstallmentAmount;
49
50
    /**
51
     * @var Amount|null
52
     * @SerializedName("TotalAmountDue")
53
     * @Type("Ticketpark\SaferpayJson\Request\Container\Amount")
54
     */
55
    private $totalAmountDue;
56
57
    public function __construct(int $numberOfInstallments)
58
    {
59
        $this->numberOfInstallments = $numberOfInstallments;
60
    }
61
62
    public function getNumberOfInstallments(): int
63
    {
64
        return $this->numberOfInstallments;
65
    }
66
67
    public function getInterestRate(): ?string
68
    {
69
        return $this->interestRate;
70
    }
71
72
    public function setInterestRate(?string $interestRate): self
73
    {
74
        $this->interestRate = $interestRate;
75
76
        return $this;
77
    }
78
79
    public function getInstallmentFee(): ?Amount
80
    {
81
        return $this->installmentFee;
82
    }
83
84
    public function setInstallmentFee(?Amount $installmentFee): self
85
    {
86
        $this->installmentFee = $installmentFee;
87
88
        return $this;
89
    }
90
91
    public function getAnnualPercentageRate(): ?string
92
    {
93
        return $this->annualPercentageRate;
94
    }
95
96
    public function setAnnualPercentageRate(?string $annualPercentageRate): self
97
    {
98
        $this->annualPercentageRate = $annualPercentageRate;
99
100
        return $this;
101
    }
102
103
    public function getFirstInstallmentAmount(): ?Amount
104
    {
105
        return $this->firstInstallmentAmount;
106
    }
107
108
    public function setFirstInstallmentAmount(?Amount $firstInstallmentAmount): self
109
    {
110
        $this->firstInstallmentAmount = $firstInstallmentAmount;
111
112
        return $this;
113
    }
114
115
    public function getSubsequentInstallmentAmount(): ?Amount
116
    {
117
        return $this->subsequentInstallmentAmount;
118
    }
119
120
    public function setSubsequentInstallmentAmount(?Amount $subsequentInstallmentAmount): self
121
    {
122
        $this->subsequentInstallmentAmount = $subsequentInstallmentAmount;
123
124
        return $this;
125
    }
126
127
    public function getTotalAmountDue(): ?Amount
128
    {
129
        return $this->totalAmountDue;
130
    }
131
132
    public function setTotalAmountDue(?Amount $totalAmountDue): self
133
    {
134
        $this->totalAmountDue = $totalAmountDue;
135
136
        return $this;
137
    }
138
}
139