Passed
Push — main ( 41b46f...23e4e5 )
by Iain
05:09
created

SubscriptionPlan::getExternalReferenceLink()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * Copyright Iain Cambridge 2020-2023.
7
 *
8
 * Use of this software is governed by the Business Source License included in the LICENSE file and at https://getparthenon.com/docs/next/license.
9
 *
10
 * Change Date: TBD ( 3 years after 2.2.0 release )
11
 *
12
 * On the date above, in accordance with the Business Source License, use of this software will be governed by the open source license specified in the LICENSE file.
13
 */
14
15
namespace Parthenon\Billing\Entity;
16
17
use Parthenon\Athena\Entity\CrudEntityInterface;
18
19
class SubscriptionPlan implements CrudEntityInterface
20
{
21
    private $id;
22
23
    private bool $public = false;
24
25
    private string $name;
26
27
    private ?string $externalReference = null;
28
29
    private ?string $externalReferenceLink = null;
30
31
    /**
32
     * @return mixed
33
     */
34
    public function getId()
35
    {
36
        return $this->id;
37
    }
38
39
    /**
40
     * @param mixed $id
41
     */
42
    public function setId($id): void
43
    {
44
        $this->id = $id;
45
    }
46
47
    public function isPublic(): bool
48
    {
49
        return $this->public;
50
    }
51
52
    public function setPublic(bool $public): void
53
    {
54
        $this->public = $public;
55
    }
56
57
    public function getName(): string
58
    {
59
        return $this->name;
60
    }
61
62
    public function setName(string $name): void
63
    {
64
        $this->name = $name;
65
    }
66
67
    /**
68
     * @return string
69
     */
70
    public function getExternalReference(): ?string
71
    {
72
        return $this->externalReference;
73
    }
74
75
    public function setExternalReference(string $externalReference): void
76
    {
77
        $this->externalReference = $externalReference;
78
    }
79
80
    public function hasExternalReference(): bool
81
    {
82
        return isset($this->externalReference);
83
    }
84
85
    public function getExternalReferenceLink(): ?string
86
    {
87
        return $this->externalReferenceLink;
88
    }
89
90
    public function setExternalReferenceLink(?string $externalReferenceLink): void
91
    {
92
        $this->externalReferenceLink = $externalReferenceLink;
93
    }
94
95
    public function getDisplayName(): string
96
    {
97
        return $this->name;
98
    }
99
}
100