PricebookEntry::getName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
c 0
b 0
f 0
rs 10
cc 1
eloc 1
nc 1
nop 0
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 PricebookEntry extends AbstractSObject
10
{
11
    /**
12
     * @var bool|null
13
     * @JMS\Type("boolean")
14
     * @JMS\Groups({"update", "create"})
15
     */
16
    protected $isActive;
17
18
    /**
19
     * @var bool|null
20
     * @JMS\Type("boolean")
21
     */
22
    protected $isDeleted;
23
24
    /**
25
     * Name of this PricebookEntry record.
26
     * This read-only field references the value in the Name field of the Product2 record.
27
     *
28
     * @var string|null
29
     * @JMS\Type("string")
30
     */
31
    protected $name;
32
33
    /**
34
     * @var string|null
35
     * @JMS\Type("string")
36
     * @JMS\Groups({"create"})
37
     * @JMS\SerializedName("Pricebook2Id")
38
     */
39
    protected $pricebookId;
40
41
    /**
42
     * @var string|null
43
     * @JMS\Type("string")
44
     * @JMS\Groups({"create"})
45
     * @JMS\SerializedName("Product2Id")
46
     */
47
    protected $productId;
48
49
    /**
50
     * This read-only field references the value in the ProductCode field of the associated Product2 record.
51
     *
52
     * @var string|null
53
     * @JMS\Type("string")
54
     */
55
    protected $productCode;
56
57
    /**
58
     * @var float|null
59
     * @JMS\Type("float")
60
     * @JMS\Groups({"update", "create"})
61
     */
62
    protected $unitPrice;
63
64
    /**
65
     * @var bool|null
66
     * @JMS\Type("boolean")
67
     * @JMS\Groups({"update", "create"})
68
     */
69
    protected $useStandardPrice;
70
71
    /**
72
     * {@inheritdoc}
73
     */
74
    public static function getSObjectName(): AbstractSObjectType
75
    {
76
        return SObjectType::PRICEBOOK_ENTRY();
77
    }
78
79
    /**
80
     * @return bool|null
81
     */
82
    public function isActive()
83
    {
84
        return $this->isActive;
85
    }
86
87
    /**
88
     * @return bool|null
89
     */
90
    public function isDeleted()
91
    {
92
        return $this->isDeleted;
93
    }
94
95
    /**
96
     * @return string|null
97
     */
98
    public function getName()
99
    {
100
        return $this->name;
101
    }
102
103
    /**
104
     * @return string|null
105
     */
106
    public function getPricebookId()
107
    {
108
        return $this->pricebookId;
109
    }
110
111
    /**
112
     * @return string|null
113
     */
114
    public function getProductId()
115
    {
116
        return $this->productId;
117
    }
118
119
    /**
120
     * @return string|null
121
     */
122
    public function getProductCode()
123
    {
124
        return $this->productCode;
125
    }
126
127
    /**
128
     * @return float|null
129
     */
130
    public function getUnitPrice()
131
    {
132
        return $this->unitPrice;
133
    }
134
135
    /**
136
     * @return bool|null
137
     */
138
    public function getUseStandardPrice()
139
    {
140
        return $this->useStandardPrice;
141
    }
142
143
    public function setIsActive(bool $isActive): self
144
    {
145
        $this->isActive = $isActive;
146
147
        return $this;
148
    }
149
150
    public function setPricebookId(string $pricebook2Id): self
151
    {
152
        $this->pricebookId = $pricebook2Id;
153
154
        return $this;
155
    }
156
157
    public function setProductId(string $product2Id): self
158
    {
159
        $this->productId = $product2Id;
160
161
        return $this;
162
    }
163
164
    public function setUnitPrice(float $unitPrice): self
165
    {
166
        $this->unitPrice = $unitPrice;
167
168
        return $this;
169
    }
170
171
    public function setUseStandardPrice(bool $useStandardPrice): self
172
    {
173
        $this->useStandardPrice = $useStandardPrice;
174
175
        return $this;
176
    }
177
}
178