RequestData::setCustomerId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Speicher210\Fastbill\Api\Service\Customer\AddCredits;
4
5
use JMS\Serializer\Annotation as JMS;
6
use Speicher210\Fastbill\Api\AbstractRequestData;
7
8
/**
9
 * The request for adding credits to the customers.
10
 */
11
final class RequestData extends AbstractRequestData
12
{
13
    /**
14
     * The customer ID.
15
     *
16
     * @var integer
17
     *
18
     * @JMS\Type("integer")
19
     * @JMS\SerializedName("CUSTOMER_ID")
20
     */
21
    protected $customerId;
22
23
    /**
24
     * The customer ID.
25
     *
26
     * @var float
27
     *
28
     * @JMS\Type("float")
29
     * @JMS\SerializedName("AMOUNT")
30
     */
31
    protected $amount;
32
33
    /**
34
     * Constructor.
35
     *
36
     * @param integer $customerId The customer ID.
37
     * @param float $amount The amount of credit to add.
38
     */
39 3
    public function __construct($customerId, $amount)
40
    {
41 3
        $this->setCustomerId($customerId);
42 3
        $this->setAmount($amount);
43 3
    }
44
45
    /**
46
     * Get the customer ID.
47
     *
48
     * @return integer
49
     */
50
    public function getCustomerId()
51
    {
52
        return $this->customerId;
53
    }
54
55
    /**
56
     * Set the customer ID.
57
     *
58
     * @param integer $customerId The customer ID.
59
     */
60 3
    public function setCustomerId($customerId)
61
    {
62 3
        $this->customerId = $customerId;
63 3
    }
64
65
    /**
66
     * Get the amount.
67
     *
68
     * @return float
69
     */
70
    public function getAmount()
71
    {
72
        return $this->amount;
73
    }
74
75
    /**
76
     * Set the amount.
77
     *
78
     * @param float $amount The amount to add.
79
     */
80 3
    public function setAmount($amount)
81
    {
82 3
        $this->amount = $amount;
83 3
    }
84
}
85