RequestData::getCode()   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 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Speicher210\Fastbill\Api\Service\Coupon\Check;
4
5
use JMS\Serializer\Annotation as JMS;
6
use Speicher210\Fastbill\Api\AbstractRequestData;
7
8
/**
9
 * The request data for checking a coupon.
10
 */
11
final class RequestData extends AbstractRequestData
12
{
13
    /**
14
     * The coupon code.
15
     *
16
     * @var string
17
     *
18
     * @JMS\Type("string")
19
     * @JMS\SerializedName("CODE")
20
     */
21
    protected $code;
22
23
    /**
24
     * The article number.
25
     *
26
     * @var string
27
     *
28
     * @JMS\Type("string")
29
     * @JMS\SerializedName("ARTICLE_NUMBER")
30
     */
31
    protected $articleNumber;
32
33
    /**
34
     * Constructor.
35
     *
36
     * @param string $code The code to request.
37
     * @param string $articleNumber The article number.
38
     */
39 12
    public function __construct($code, $articleNumber)
40
    {
41 12
        $this->setCode($code);
42 12
        $this->setArticleNumber($articleNumber);
43 12
    }
44
45
    /**
46
     * Get the code.
47
     *
48
     * @return string
49
     */
50
    public function getCode()
51
    {
52
        return $this->code;
53
    }
54
55
    /**
56
     * Set the code.
57
     *
58
     * @param string $code The code.
59
     * @return RequestData
60
     */
61 12
    public function setCode($code)
62
    {
63 12
        $this->code = $code;
64
65 12
        return $this;
66
    }
67
68
    /**
69
     * Get the article number.
70
     *
71
     * @return string
72
     */
73
    public function getArticleNumber()
74
    {
75
        return $this->articleNumber;
76
    }
77
78
    /**
79
     * Set the article number.
80
     *
81
     * @param string $articleNumber The article number.
82
     * @return RequestData
83
     */
84 12
    public function setArticleNumber($articleNumber)
85
    {
86 12
        $this->articleNumber = $articleNumber;
87
88 12
        return $this;
89
    }
90
}
91