RequestData::setCoupon()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

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 6
ccs 0
cts 3
cp 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Speicher210\Fastbill\Api\Service\Subscription\Create;
4
5
use JMS\Serializer\Annotation as JMS;
6
use Speicher210\Fastbill\Api\AbstractRequestData;
7
use Speicher210\Fastbill\Api\Model\SubscriptionTrait;
8
9
/**
10
 * The request data for creating a subscription.
11
 */
12
final class RequestData extends AbstractRequestData
13
{
14
    use SubscriptionTrait;
15
16
    /**
17
     * The coupon.
18
     *
19
     * @var string
20
     *
21
     * @JMS\Type("string")
22
     * @JMS\SerializedName("COUPON")
23
     */
24
    protected $coupon;
25
26
    /**
27
     * Constructor.
28
     *
29
     * @param string $articleNumber The article number.
30
     * @param integer $customerId The customer ID.
31
     */
32 9
    public function __construct($articleNumber, $customerId)
33
    {
34 9
        $this->setArticleNumber($articleNumber);
35 9
        $this->setCustomerId($customerId);
36 9
    }
37
38
    /**
39
     * Get the coupon.
40
     *
41
     * @return string
42
     */
43
    public function getCoupon()
44
    {
45
        return $this->coupon;
46
    }
47
48
    /**
49
     * Set the coupon.
50
     *
51
     * @param string $coupon The coupon.
52
     * @return RequestData
53
     */
54
    public function setCoupon($coupon)
55
    {
56
        $this->coupon = $coupon;
57
58
        return $this;
59
    }
60
}
61