Completed
Push — master ( ea2eeb...b55dab )
by Francesco
06:33
created

Segment::getPrice()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Audiens\AppnexusClient\entity;
4
5
class Segment
6
{
7
8
    use HydratableTrait;
9
10
    /**
11
     * @var int|null
12
     * AppNexus ID assigned by the API to reference this segment.
13
     * Required: yes (on update only)
14
     */
15
    protected $id;
16
17
    /**
18
     * @var bool
19
     * Boolean value - determines whether the segment can be used.
20
     * required: no, default is active
21
     */
22
    protected $active = true;
23
24
    /**
25
     * @var int|null
26
     * The member ID that owns this segment.
27
     * Required: yes
28
     */
29
    protected $member_id;
30
31
    /**
32
     * @var string|null
33
     * A name used to describe the segment. This will be passed on the bid requests.
34
     * Required: no
35
     */
36
    protected $short_name;
37
38
    /**
39
     * @var  int|null
40
     * The number of minutes the user is kept in the segment. If you want to keep the user in
41
     * the segment for retargeting purposes, set to the desired number of minutes (or null for system maximum value 180 days).
42
     * If you want to add the user to the segment only for the duration of the ad call, set to 0. Changing this value does not
43
     * retroactively affect users already in the segment. Also, if a user is re-added, the expiration window resets.
44
     * Required: no
45
     */
46
    protected $expire_minutes = 2147483647;
47
48
    public function getId(): ?int
49
    {
50
        return $this->id;
51
    }
52
53
    public function setId(int $id)
54
    {
55
        $this->id = $id;
56
    }
57
58
    public function isActive(): bool
59
    {
60
        return $this->active;
61
    }
62
63
    public function setActive(bool $active)
64
    {
65
        $this->active = $active;
66
    }
67
68
    public function getMemberId(): ?int
69
    {
70
        return $this->member_id;
71
    }
72
73
    public function setMemberId(int $memberId)
74
    {
75
        $this->member_id = $memberId;
76
    }
77
78
    public function getName(): ?string
79
    {
80
        return $this->short_name;
81
    }
82
83
    public function setName(string $name = null)
84
    {
85
        $this->short_name = $name;
86
    }
87
88
    public function getExpireMinutes(): ?int
89
    {
90
        return $this->expire_minutes;
91
    }
92
93
    public function setExpireMinutes(int $expireMinutes = null)
94
    {
95
        $this->expire_minutes = $expireMinutes;
96
    }
97
}
98