Product::setFamily()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 5
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Xsolve\SalesforceClient\Model;
4
5
use Xsolve\SalesforceClient\Enum\AbstractSObjectType;
6
use Xsolve\SalesforceClient\Enum\SObjectType;
7
use JMS\Serializer\Annotation as JMS;
8
9
class Product extends AbstractSObject
10
{
11
    /**
12
     * @var string|null
13
     * @JMS\Type("string")
14
     * @JMS\Groups({"update", "create"})
15
     */
16
    protected $name;
17
18
    /**
19
     * @var string|null
20
     * @JMS\Type("string")
21
     * @JMS\Groups({"update", "create"})
22
     */
23
    protected $description;
24
25
    /**
26
     * @var string|null
27
     * @JMS\Type("string")
28
     * @JMS\Groups({"update", "create"})
29
     */
30
    protected $productCode;
31
32
    /**
33
     * @var string|null
34
     * @JMS\Type("string")
35
     * @JMS\Groups({"update", "create"})
36
     */
37
    protected $family;
38
39
    /**
40
     * @var bool
41
     * @JMS\Type("boolean")
42
     */
43
    protected $isDeleted;
44
45
    /**
46
     * @var bool
47
     * @JMS\Type("boolean")
48
     * @JMS\Groups({"update", "create"})
49
     */
50
    protected $isActive;
51
52
    /**
53
     * {@inheritdoc}
54
     */
55
    public static function getSObjectName(): AbstractSObjectType
56
    {
57
        return SObjectType::PRODUCT();
58
    }
59
60
    /**
61
     * @return string|null
62
     */
63
    public function getName()
64
    {
65
        return $this->name;
66
    }
67
68
    /**
69
     * @return string|null
70
     */
71
    public function getDescription()
72
    {
73
        return $this->description;
74
    }
75
76
    /**
77
     * @return string|null
78
     */
79
    public function getProductCode()
80
    {
81
        return $this->productCode;
82
    }
83
84
    /**
85
     * @return string|null
86
     */
87
    public function getFamily()
88
    {
89
        return $this->family;
90
    }
91
92
    /**
93
     * @return bool
94
     */
95
    public function isDeleted()
96
    {
97
        return $this->isDeleted;
98
    }
99
100
    /**
101
     * @return bool
102
     */
103
    public function isActive()
104
    {
105
        return $this->isActive;
106
    }
107
108
    public function setName(string $name): self
109
    {
110
        $this->name = $name;
111
112
        return $this;
113
    }
114
115
    public function setDescription(string $description = null): self
116
    {
117
        $this->description = $description;
118
119
        return $this;
120
    }
121
122
    public function setProductCode(string $code = null): self
123
    {
124
        $this->productCode = $code;
125
126
        return $this;
127
    }
128
129
    public function setFamily(string $family = null): self
130
    {
131
        $this->family = $family;
132
133
        return $this;
134
    }
135
136
    public function setActive(bool $isActive): self
137
    {
138
        $this->isActive = $isActive;
139
140
        return $this;
141
    }
142
}
143