RequestData   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 44.44%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 49
ccs 4
cts 9
cp 0.4444
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getCoupon() 0 4 1
A setCoupon() 0 6 1
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