InstallmentDetail::buildData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 7
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 11
rs 10
1
<?php
2
3
/**
4
 * MIT License
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Zed\Ratepay\Business\Api\Builder;
9
10
class InstallmentDetail extends AbstractBuilder implements BuilderInterface
11
{
12
    public const ROOT_TAG = 'installment-details';
13
14
    /**
15
     * @return array
16
     */
17
    public function buildData()
18
    {
19
        $return = [
20
            'installment-number' => $this->requestTransfer->getInstallmentDetails()->getRatesNumber(),
21
            'installment-amount' => $this->requestTransfer->getInstallmentDetails()->getAmount(),
22
            'last-installment-amount' => $this->requestTransfer->getInstallmentDetails()->getLastAmount(),
23
            'interest-rate' => $this->requestTransfer->getInstallmentDetails()->getInterestRate(),
24
            'payment-firstday' => $this->requestTransfer->getInstallmentDetails()->getPaymentFirstday(),
25
        ];
26
27
        return $return;
28
    }
29
30
    /**
31
     * @return string
32
     */
33
    public function getRootTag()
34
    {
35
        return static::ROOT_TAG;
36
    }
37
}
38