Completed
Push — master ( 201238...507368 )
by Aleksander
05:51
created

MarketModel::setOnlineOffers()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 5
ccs 0
cts 3
cp 0
crap 2
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
 * Yandex PHP Library
4
 *
5
 * @copyright NIX Solutions Ltd.
6
 * @link https://github.com/nixsolutions/yandex-php-library
7
 */
8
9
namespace Yandex\Market\Partner\Models;
10
11
use Yandex\Common\Model;
12
13
class MarketModel extends Model
14
{
15
    /**
16
     * @var int
17
     */
18
    protected $id;
19
20
    /**
21
     * @var string
22
     */
23
    protected $name;
24
25
    /**
26
     * @var MarketModelPrices
27
     */
28
    protected $prices;
29
30
    /**
31
     * @var MarketModelOffers
32
     */
33
    protected $offers;
34
35
    /**
36
     * @var int
37
     */
38
    protected $offlineOffers;
39
40
    /**
41
     * @var int
42
     */
43
    protected $onlineOffers;
44
45
    protected $mappingClasses = [
46
        'prices' => MarketModelPrices::class,
47
        'offers' => MarketModelOffers::class,
48
    ];
49
50
    /**
51
     * Retrieve the id property
52
     *
53
     * @return int
54
     */
55 5
    public function getId()
56
    {
57 5
        return $this->id;
58
    }
59
60
    /**
61
     * Set the id property
62
     *
63
     * @param int $id
64
     * @return MarketModel
65
     */
66
    public function setId($id)
67
    {
68
        $this->id = $id;
69
        return $this;
70
    }
71
72
    /**
73
     * Get name
74
     *
75
     * @return string
76
     */
77 3
    public function getName()
78
    {
79 3
        return $this->name;
80
    }
81
82
    /**
83
     * Set name
84
     *
85
     * @param string $name
86
     * @return MarketModel
87
     */
88
    public function setName($name)
89
    {
90
        $this->name = $name;
91
        return $this;
92
    }
93
94
    /**
95
     * Get model prices
96
     *
97
     * @return MarketModelPrices|null
98
     */
99 3
    public function getPrices()
100
    {
101 3
        return $this->prices;
102
    }
103
104
    /**
105
     * Set model prices
106
     *
107
     * @param MarketModelPrices $prices
108
     * @return MarketModel
109
     */
110
    public function setPrices($prices)
111
    {
112
        $this->prices = $prices;
113
        return $this;
114
    }
115
116
    /**
117
     * Get model offers
118
     *
119
     * @return MarketModelOffers|null
120
     */
121 2
    public function getOffers()
122
    {
123 2
        return $this->offers;
124
    }
125
126
    /**
127
     * Set model offers
128
     *
129
     * @param MarketModelOffers $offers
130
     * @return MarketModel
131
     */
132
    public function setOffers($offers)
133
    {
134
        $this->offers = $offers;
135
        return $this;
136
    }
137
138
    /**
139
     * Get number of product offerings int the retail (offline) stores
140
     *
141
     * @return int|null
142
     */
143
    public function getOfflineOffers()
144
    {
145
        return $this->offlineOffers;
146
    }
147
148
    /**
149
     * Set number of product offerings in retail (offline) stores
150
     *
151
     * @param int $offlineOffers
152
     * @return MarketModel
153
     */
154
    public function setOfflineOffers($offlineOffers)
155
    {
156
        $this->offlineOffers = $offlineOffers;
157
        return $this;
158
    }
159
160
    /**
161
     * Get the number of product offerings online
162
     *
163
     * @return int|null
164
     */
165
    public function getOnlineOffers()
166
    {
167
        return $this->onlineOffers;
168
    }
169
170
    /**
171
     * Set the number of product offerings online
172
     *
173
     * @param int $onlineOffers
174
     * @return MarketModel
175
     */
176
    public function setOnlineOffers($onlineOffers)
177
    {
178
        $this->onlineOffers = $onlineOffers;
179
        return $this;
180
    }
181
}
182