RequestData::setSuppressEmail()   A
last analyzed

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
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 3
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Speicher210\Fastbill\Api\Service\Customer\Update;
4
5
use JMS\Serializer\Annotation as JMS;
6
use Speicher210\Fastbill\Api\AbstractRequestData;
7
use Speicher210\Fastbill\Api\Model\CustomerTrait;
8
9
/**
10
 * The request for updating the customers.
11
 */
12
final class RequestData extends AbstractRequestData
13
{
14
    use CustomerTrait;
15
16
    /**
17
     * FLag if sending the confirmation email should be sent.
18
     *
19
     * @var integer
20
     *
21
     * @JMS\Type("integer")
22
     * @JMS\SerializedName("SUPPRESS_MAIL")
23
     */
24
    protected $suppressEmail;
25
26
    /**
27
     * Constructor.
28
     *
29
     * @param integer $customerId The customer ID to update.
30
     */
31 3
    public function __construct($customerId)
32
    {
33 3
        $this->setCustomerId($customerId);
34 3
    }
35
36
    /**
37
     * Get if sending confirmation email is suppressed.
38
     *
39
     * @return boolean
40
     */
41
    public function getSuppressEmail()
42
    {
43
        return (boolean) $this->suppressEmail;
44
    }
45
46
    /**
47
     * Set if the confirmation email should be suppressed.
48
     *
49
     * @param boolean $suppressEmail Flag if the confirmation email should be suppressed.
50
     * @return RequestData
51
     */
52
    public function setSuppressEmail($suppressEmail)
53
    {
54
        $this->suppressEmail = (integer)(boolean)$suppressEmail;
55
    }
56
}
57