Completed
Pull Request — master (#179)
by
unknown
08:15
created

MarketModelOffer::setName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Yandex\Market\Partner\Models;
4
5
use Yandex\Common\Model;
6
7
class MarketModelOffer extends Model
8
{
9
    /**
10
     * @var int
11
     */
12
    protected $discount;
13
14
    /**
15
     * @var int
16
     */
17
    protected $inStock;
18
19
    /**
20
     * @var string
21
     */
22
    protected $name;
23
24
    /**
25
     * @var int
26
     */
27
    protected $pos;
28
29
    /**
30
     * @var float
31
     */
32
    protected $preDiscountPrice;
33
34
    /**
35
     * @var float
36
     */
37
    protected $price;
38
39
    /**
40
     * @var int
41
     */
42
    protected $regionId;
43
44
    /**
45
     * @var float
46
     */
47
    protected $shippingCost;
48
49
    /**
50
     * @var string
51
     */
52
    protected $shopName;
53
54
    /**
55
     * @var int
56
     */
57
    protected $shopRating;
58
59
    /**
60
     * Get percent of discount
61
     *
62
     * @return int|null
63
     */
64
    public function getDiscount()
65
    {
66
        return $this->discount;
67
    }
68
69
    /**
70
     * Set percent of discount
71
     *
72
     * @param int $discount
73
     * @return MarketModelOffer
74
     */
75
    public function setDiscount($discount)
76
    {
77
        $this->discount = $discount;
78
        return $this;
79
    }
80
81
    /**
82
     * Get in stock flag (0 - on request, 1 - in stock)
83
     *
84
     * @return int
85
     */
86
    public function getInStock()
87
    {
88
        return $this->inStock;
89
    }
90
91
    /**
92
     * Set in stock flag (0 - on request, 1 - in stock)
93
     *
94
     * @param int $inStock
95
     * @return MarketModelOffer
96
     */
97
    public function setInStock($inStock)
98
    {
99
        $this->inStock = $inStock;
100
        return $this;
101
    }
102
103
    /**
104
     * Get name
105
     *
106
     * @return string
107
     */
108
    public function getName()
109
    {
110
        return $this->name;
111
    }
112
113
    /**
114
     * Set name
115
     *
116
     * @param string $name
117
     * @return MarketModelOffer
118
     */
119
    public function setName($name)
120
    {
121
        $this->name = $name;
122
        return $this;
123
    }
124
125
    /**
126
     * Get search result position
127
     *
128
     * @return int
129
     */
130
    public function getPos()
131
    {
132
        return $this->pos;
133
    }
134
135
    /**
136
     * Set search result position
137
     *
138
     * @param int $pos
139
     * @return MarketModelOffer
140
     */
141
    public function setPos($pos)
142
    {
143
        $this->pos = $pos;
144
        return $this;
145
    }
146
147
    /**
148
     * Get price excluding discount
149
     *
150
     * @return float|null
151
     */
152
    public function getPreDiscountPrice()
153
    {
154
        return $this->preDiscountPrice;
155
    }
156
157
    /**
158
     * Set price excluding discount
159
     *
160
     * @param float $preDiscountPrice
161
     * @return MarketModelOffer
162
     */
163
    public function setPreDiscountPrice($preDiscountPrice)
164
    {
165
        $this->preDiscountPrice = $preDiscountPrice;
166
        return $this;
167
    }
168
169
    /**
170
     * Get price
171
     *
172
     * @return float
173
     */
174
    public function getPrice()
175
    {
176
        return $this->price;
177
    }
178
179
    /**
180
     * Set price
181
     *
182
     * @param float $price
183
     * @return MarketModelOffer
184
     */
185
    public function setPrice($price)
186
    {
187
        $this->price = $price;
188
        return $this;
189
    }
190
191
    /**
192
     * Get region ID
193
     *
194
     * @return int
195
     */
196
    public function getRegionId()
197
    {
198
        return $this->regionId;
199
    }
200
201
    /**
202
     * Set region ID
203
     *
204
     * @param int $regionId
205
     * @return MarketModelOffer
206
     */
207
    public function setRegionId($regionId)
208
    {
209
        $this->regionId = $regionId;
210
        return $this;
211
    }
212
213
    /**
214
     * Get shipping cost
215
     *
216
     * @return float
217
     */
218
    public function getShippingCost()
219
    {
220
        return $this->shippingCost;
221
    }
222
223
    /**
224
     * Set shipping cost
225
     *
226
     * @param float $shippingCost
227
     * @return MarketModelOffer
228
     */
229
    public function setShippingCost($shippingCost)
230
    {
231
        $this->shippingCost = $shippingCost;
232
        return $this;
233
    }
234
235
    /**
236
     * Get shop name
237
     *
238
     * @return string
239
     */
240
    public function getShopName()
241
    {
242
        return $this->shopName;
243
    }
244
245
    /**
246
     * Set shop name
247
     *
248
     * @param string $shopName
249
     * @return MarketModelOffer
250
     */
251
    public function setShopName($shopName)
252
    {
253
        $this->shopName = $shopName;
254
        return $this;
255
    }
256
257
    /**
258
     * Get shop rating (1 - 5)
259
     *
260
     * @return int
261
     */
262
    public function getShopRating()
263
    {
264
        return $this->shopRating;
265
    }
266
267
    /**
268
     * Set shop rating (1 - 5)
269
     *
270
     * @param int $shopRating
271
     * @return MarketModelOffer
272
     */
273
    public function setShopRating($shopRating)
274
    {
275
        $this->shopRating = $shopRating;
276
        return $this;
277
    }
278
}
279