Completed
Push — master ( a72c28...44c621 )
by Dragos
07:31
created

RequestData::setArticleNumber()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

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 6
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 1
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
    /**
15
     * The coupon code.
16
     *
17
     * @var string
18
     *
19
     * @JMS\Type("string")
20
     * @JMS\SerializedName("CODE")
21
     */
22
    protected $code;
23
24
    /**
25
     * The article number.
26
     *
27
     * @var string
28
     *
29
     * @JMS\Type("string")
30
     * @JMS\SerializedName("ARTICLE_NUMBER")
31
     */
32
    protected $articleNumber;
33
34
    /**
35
     * Constructor.
36
     *
37
     * @param string $code The code to request.
38
     * @param string $articleNumber The article number.
39
     */
40 6
    public function __construct($code, $articleNumber)
41
    {
42 6
        $this->setCode($code);
43 6
        $this->setArticleNumber($articleNumber);
44 6
    }
45
46
    /**
47
     * Get the code.
48
     *
49
     * @return string
50
     */
51
    public function getCode()
52
    {
53
        return $this->code;
54
    }
55
56
    /**
57
     * Set the code.
58
     *
59
     * @param string $code The code.
60
     * @return RequestData
61
     */
62 6
    public function setCode($code)
63
    {
64 6
        $this->code = $code;
65
66 6
        return $this;
67
    }
68
69
    /**
70
     * Get the article number.
71
     *
72
     * @return string
73
     */
74
    public function getArticleNumber()
75
    {
76
        return $this->articleNumber;
77
    }
78
79
    /**
80
     * Set the article number.
81
     *
82
     * @param string $articleNumber The article number.
83
     * @return RequestData
84
     */
85 6
    public function setArticleNumber($articleNumber)
86
    {
87 6
        $this->articleNumber = $articleNumber;
88
89 6
        return $this;
90
    }
91
}
92