Completed
Push — master ( 0db490...224576 )
by Taosikai
11s
created

PriceRule::setTargetSelection()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of the slince/shopify-api-php
5
 *
6
 * (c) Slince <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace Slince\Shopify\Manager\PriceRule;
13
14
use Slince\Shopify\Common\Model\Model;
15
16
class PriceRule extends Model
17
{
18
    /**
19
     * @var string
20
     */
21
    protected $allocationMethod;
22
23
    /**
24
     * @var string
25
     */
26
    protected $createdAt;
27
28
    /**
29
     * @var string
30
     */
31
    protected $customerSelection;
32
33
    /**
34
     * @var string
35
     */
36
    protected $endsAt;
37
38
    /**
39
     * @var array
40
     */
41
    protected $entitledCollectionIds;
42
43
    /**
44
     * @var array
45
     */
46
    protected $entitledCountryIds;
47
48
    /**
49
     * @var array
50
     */
51
    protected $entitledProductIds;
52
53
    /**
54
     * @var array
55
     */
56
    protected $entitledVariantIds;
57
58
    /**
59
     * @var string
60
     */
61
    protected $oncePerCustomer;
62
63
    /**
64
     * @var array
65
     */
66
    protected $prerequisiteCustomerIds;
67
68
    /**
69
     * @var array
70
     */
71
    protected $prerequisiteQuantityRange;
72
73
    /**
74
     * @var array
75
     */
76
    protected $prerequisiteSavedSearchIds;
77
78
    /**
79
     * @var array
80
     */
81
    protected $prerequisiteShippingPriceRange;
82
83
    /**
84
     * @var array
85
     */
86
    protected $prerequisiteSubtotalRange;
87
88
    /**
89
     * @var string
90
     */
91
    protected $startsAt;
92
93
    /**
94
     * @var string
95
     */
96
    protected $targetSelection;
97
98
    /**
99
     * @var string
100
     */
101
    protected $targetType;
102
103
    /**
104
     * @var string
105
     */
106
    protected $title;
107
108
    /**
109
     * @var string
110
     */
111
    protected $usageLimit;
112
113
    /**
114
     * @var array
115
     */
116
    protected $prerequisiteProductIds;
117
118
    /**
119
     * @var array
120
     */
121
    protected $prerequisiteVariantIds;
122
123
    /**
124
     * @var array
125
     */
126
    protected $prerequisiteCollectionIds;
127
128
    /**
129
     * @var int
130
     */
131
    protected $value;
132
133
    /**
134
     * @var string
135
     */
136
    protected $valueType;
137
138
    /**
139
     * @var array
140
     */
141
    protected $prerequisiteToEntitlementQuantityRatio;
142
143
    /**
144
     * @return string
145
     */
146
    public function getAllocationMethod()
147
    {
148
        return $this->allocationMethod;
149
    }
150
151
    /**
152
     * @param string $allocationMethod
153
     *
154
     * @return PriceRule
155
     */
156
    public function setAllocationMethod($allocationMethod)
157
    {
158
        $this->allocationMethod = $allocationMethod;
159
160
        return $this;
161
    }
162
163
    /**
164
     * @return string
165
     */
166
    public function getCreatedAt()
167
    {
168
        return $this->createdAt;
169
    }
170
171
    /**
172
     * @param string $createdAt
173
     *
174
     * @return PriceRule
175
     */
176
    public function setCreatedAt($createdAt)
177
    {
178
        $this->createdAt = $createdAt;
179
180
        return $this;
181
    }
182
183
    /**
184
     * @return string
185
     */
186
    public function getCustomerSelection()
187
    {
188
        return $this->customerSelection;
189
    }
190
191
    /**
192
     * @param string $customerSelection
193
     *
194
     * @return PriceRule
195
     */
196
    public function setCustomerSelection($customerSelection)
197
    {
198
        $this->customerSelection = $customerSelection;
199
200
        return $this;
201
    }
202
203
    /**
204
     * @return string
205
     */
206
    public function getEndsAt()
207
    {
208
        return $this->endsAt;
209
    }
210
211
    /**
212
     * @param string $endsAt
213
     *
214
     * @return PriceRule
215
     */
216
    public function setEndsAt($endsAt)
217
    {
218
        $this->endsAt = $endsAt;
219
220
        return $this;
221
    }
222
223
    /**
224
     * @return array
225
     */
226
    public function getEntitledCollectionIds()
227
    {
228
        return $this->entitledCollectionIds;
229
    }
230
231
    /**
232
     * @param array $entitledCollectionIds
233
     *
234
     * @return PriceRule
235
     */
236
    public function setEntitledCollectionIds($entitledCollectionIds)
237
    {
238
        $this->entitledCollectionIds = $entitledCollectionIds;
239
240
        return $this;
241
    }
242
243
    /**
244
     * @return array
245
     */
246
    public function getEntitledCountryIds()
247
    {
248
        return $this->entitledCountryIds;
249
    }
250
251
    /**
252
     * @param array $entitledCountryIds
253
     *
254
     * @return PriceRule
255
     */
256
    public function setEntitledCountryIds($entitledCountryIds)
257
    {
258
        $this->entitledCountryIds = $entitledCountryIds;
259
260
        return $this;
261
    }
262
263
    /**
264
     * @return array
265
     */
266
    public function getEntitledProductIds()
267
    {
268
        return $this->entitledProductIds;
269
    }
270
271
    /**
272
     * @param array $entitledProductIds
273
     *
274
     * @return PriceRule
275
     */
276
    public function setEntitledProductIds($entitledProductIds)
277
    {
278
        $this->entitledProductIds = $entitledProductIds;
279
280
        return $this;
281
    }
282
283
    /**
284
     * @return array
285
     */
286
    public function getEntitledVariantIds()
287
    {
288
        return $this->entitledVariantIds;
289
    }
290
291
    /**
292
     * @param array $entitledVariantIds
293
     *
294
     * @return PriceRule
295
     */
296
    public function setEntitledVariantIds($entitledVariantIds)
297
    {
298
        $this->entitledVariantIds = $entitledVariantIds;
299
300
        return $this;
301
    }
302
303
    /**
304
     * @return boolean
305
     */
306
    public function getOncePerCustomer()
307
    {
308
        return $this->oncePerCustomer;
309
    }
310
311
    /**
312
     * @param boolean $oncePerCustomer
313
     *
314
     * @return PriceRule
315
     */
316
    public function setOncePerCustomer($oncePerCustomer)
317
    {
318
        $this->oncePerCustomer = $oncePerCustomer;
0 ignored issues
show
Documentation Bug introduced by
The property $oncePerCustomer was declared of type string, but $oncePerCustomer is of type boolean. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
319
320
        return $this;
321
    }
322
323
    /**
324
     * @return array
325
     */
326
    public function getPrerequisiteCustomerIds()
327
    {
328
        return $this->prerequisiteCustomerIds;
329
    }
330
331
    /**
332
     * @param array $prerequisiteCustomerIds
333
     *
334
     * @return PriceRule
335
     */
336
    public function setPrerequisiteCustomerIds($prerequisiteCustomerIds)
337
    {
338
        $this->prerequisiteCustomerIds = $prerequisiteCustomerIds;
339
340
        return $this;
341
    }
342
343
    /**
344
     * @return array
345
     */
346
    public function getPrerequisiteQuantityRange()
347
    {
348
        return $this->prerequisiteQuantityRange;
349
    }
350
351
    /**
352
     * @param array $prerequisiteQuantityRange
353
     *
354
     * @return PriceRule
355
     */
356
    public function setPrerequisiteQuantityRange($prerequisiteQuantityRange)
357
    {
358
        $this->prerequisiteQuantityRange = $prerequisiteQuantityRange;
359
360
        return $this;
361
    }
362
363
    /**
364
     * @return array
365
     */
366
    public function getPrerequisiteSavedSearchIds()
367
    {
368
        return $this->prerequisiteSavedSearchIds;
369
    }
370
371
    /**
372
     * @param array $prerequisiteSavedSearchIds
373
     *
374
     * @return PriceRule
375
     */
376
    public function setPrerequisiteSavedSearchIds($prerequisiteSavedSearchIds)
377
    {
378
        $this->prerequisiteSavedSearchIds = $prerequisiteSavedSearchIds;
379
380
        return $this;
381
    }
382
383
    /**
384
     * @return array
385
     */
386
    public function getPrerequisiteShippingPriceRange()
387
    {
388
        return $this->prerequisiteShippingPriceRange;
389
    }
390
391
    /**
392
     * @param array $prerequisiteShippingPriceRange
393
     *
394
     * @return PriceRule
395
     */
396
    public function setPrerequisiteShippingPriceRange($prerequisiteShippingPriceRange)
397
    {
398
        $this->prerequisiteShippingPriceRange = $prerequisiteShippingPriceRange;
399
400
        return $this;
401
    }
402
403
    /**
404
     * @return array
405
     */
406
    public function getPrerequisiteSubtotalRange()
407
    {
408
        return $this->prerequisiteSubtotalRange;
409
    }
410
411
    /**
412
     * @param array $prerequisiteSubtotalRange
413
     *
414
     * @return PriceRule
415
     */
416
    public function setPrerequisiteSubtotalRange($prerequisiteSubtotalRange)
417
    {
418
        $this->prerequisiteSubtotalRange = $prerequisiteSubtotalRange;
419
420
        return $this;
421
    }
422
423
    /**
424
     * @return string
425
     */
426
    public function getStartsAt()
427
    {
428
        return $this->startsAt;
429
    }
430
431
    /**
432
     * @param string $startsAt
433
     *
434
     * @return PriceRule
435
     */
436
    public function setStartsAt($startsAt)
437
    {
438
        $this->startsAt = $startsAt;
439
440
        return $this;
441
    }
442
443
    /**
444
     * @return string
445
     */
446
    public function getTargetSelection()
447
    {
448
        return $this->targetSelection;
449
    }
450
451
    /**
452
     * @param string $targetSelection
453
     *
454
     * @return PriceRule
455
     */
456
    public function setTargetSelection($targetSelection)
457
    {
458
        $this->targetSelection = $targetSelection;
459
460
        return $this;
461
    }
462
463
    /**
464
     * @return string
465
     */
466
    public function getTargetType()
467
    {
468
        return $this->targetType;
469
    }
470
471
    /**
472
     * @param string $targetType
473
     *
474
     * @return PriceRule
475
     */
476
    public function setTargetType($targetType)
477
    {
478
        $this->targetType = $targetType;
479
480
        return $this;
481
    }
482
483
    /**
484
     * @return string
485
     */
486
    public function getTitle()
487
    {
488
        return $this->title;
489
    }
490
491
    /**
492
     * @param string $title
493
     *
494
     * @return PriceRule
495
     */
496
    public function setTitle($title)
497
    {
498
        $this->title = $title;
499
500
        return $this;
501
    }
502
503
    /**
504
     * @return string
505
     */
506
    public function getUsageLimit()
507
    {
508
        return $this->usageLimit;
509
    }
510
511
    /**
512
     * @param string $usageLimit
513
     *
514
     * @return PriceRule
515
     */
516
    public function setUsageLimit($usageLimit)
517
    {
518
        $this->usageLimit = $usageLimit;
519
520
        return $this;
521
    }
522
523
    /**
524
     * @return array
525
     */
526
    public function getPrerequisiteProductIds()
527
    {
528
        return $this->prerequisiteProductIds;
529
    }
530
531
    /**
532
     * @param array $prerequisiteProductIds
533
     *
534
     * @return PriceRule
535
     */
536
    public function setPrerequisiteProductIds($prerequisiteProductIds)
537
    {
538
        $this->prerequisiteProductIds = $prerequisiteProductIds;
539
540
        return $this;
541
    }
542
543
    /**
544
     * @return array
545
     */
546
    public function getPrerequisiteVariantIds()
547
    {
548
        return $this->prerequisiteVariantIds;
549
    }
550
551
    /**
552
     * @param array $prerequisiteVariantIds
553
     *
554
     * @return PriceRule
555
     */
556
    public function setPrerequisiteVariantIds($prerequisiteVariantIds)
557
    {
558
        $this->prerequisiteVariantIds = $prerequisiteVariantIds;
559
560
        return $this;
561
    }
562
563
    /**
564
     * @return array
565
     */
566
    public function getPrerequisiteCollectionIds()
567
    {
568
        return $this->prerequisiteCollectionIds;
569
    }
570
571
    /**
572
     * @param array $prerequisiteCollectionIds
573
     *
574
     * @return PriceRule
575
     */
576
    public function setPrerequisiteCollectionIds($prerequisiteCollectionIds)
577
    {
578
        $this->prerequisiteCollectionIds = $prerequisiteCollectionIds;
579
580
        return $this;
581
    }
582
583
    /**
584
     * @return int
585
     */
586
    public function getValue()
587
    {
588
        return $this->value;
589
    }
590
591
    /**
592
     * @param int $value
593
     *
594
     * @return PriceRule
595
     */
596
    public function setValue($value)
597
    {
598
        $this->value = $value;
599
600
        return $this;
601
    }
602
603
    /**
604
     * @return string
605
     */
606
    public function getValueType()
607
    {
608
        return $this->valueType;
609
    }
610
611
    /**
612
     * @param string $valueType
613
     *
614
     * @return PriceRule
615
     */
616
    public function setValueType($valueType)
617
    {
618
        $this->valueType = $valueType;
619
620
        return $this;
621
    }
622
623
    /**
624
     * @return array
625
     */
626
    public function getPrerequisiteToEntitlementQuantityRatio()
627
    {
628
        return $this->prerequisiteToEntitlementQuantityRatio;
629
    }
630
631
    /**
632
     * @param array $prerequisiteToEntitlementQuantityRatio
633
     *
634
     * @return PriceRule
635
     */
636
    public function setPrerequisiteToEntitlementQuantityRatio($prerequisiteToEntitlementQuantityRatio)
637
    {
638
        $this->prerequisiteToEntitlementQuantityRatio = $prerequisiteToEntitlementQuantityRatio;
639
640
        return $this;
641
    }
642
}