Passed
Push — main ( 45afdd...f1c953 )
by Iain
04:27
created

PaymentCard::setBrand()   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
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
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 Symfony\Component\Serializer\Annotation\Ignore;
18
use Symfony\Component\Serializer\Annotation\SerializedName;
19
20
class PaymentCard
21
{
22
    protected $id;
23
24
    #[Ignore]
25
    protected $customer;
26
27
    #[Ignore]
28
    protected string $provider;
29
30
    #[Ignore]
31
    protected string $storedCustomerReference;
32
33
    #[Ignore]
34
    protected string $storedPaymentReference;
35
36
    protected ?string $name = null;
37
38
    #[SerializedName('default')]
39
    protected bool $defaultPaymentOption = true;
40
41
    protected ?string $brand = null;
42
43
    #[SerializedName('last_four')]
44
    protected ?string $lastFour = null;
45
46
    #[SerializedName('expiry_month')]
47
    protected ?string $expiryMonth = null;
48
49
    #[SerializedName('expiry_year')]
50
    protected ?string $expiryYear = null;
51
52
    #[SerializedName('created_at')]
53
    protected \DateTimeInterface $createdAt;
54
55
    #[Ignore]
56
    protected bool $deleted = false;
57
58
    /**
59
     * @return mixed
60
     */
61
    public function getId()
62
    {
63
        return $this->id;
64
    }
65
66
    /**
67
     * @param mixed $id
68
     */
69
    public function setId($id): void
70
    {
71
        $this->id = $id;
72
    }
73
74
    /**
75
     * @return mixed
76
     */
77
    public function getCustomer()
78
    {
79
        return $this->customer;
80
    }
81
82
    /**
83
     * @param mixed $customer
84
     */
85
    public function setCustomer($customer): void
86
    {
87
        $this->customer = $customer;
88
    }
89
90
    public function getProvider(): string
91
    {
92
        return $this->provider;
93
    }
94
95
    public function setProvider(string $provider): void
96
    {
97
        $this->provider = $provider;
98
    }
99
100
    public function getStoredPaymentReference(): string
101
    {
102
        return $this->storedPaymentReference;
103
    }
104
105
    public function setStoredPaymentReference(string $storedPaymentReference): void
106
    {
107
        $this->storedPaymentReference = $storedPaymentReference;
108
    }
109
110
    public function getName(): ?string
111
    {
112
        return $this->name;
113
    }
114
115
    public function setName(?string $name): void
116
    {
117
        $this->name = $name;
118
    }
119
120
    public function isDefaultPaymentOption(): bool
121
    {
122
        return $this->defaultPaymentOption;
123
    }
124
125
    public function setDefaultPaymentOption(bool $defaultPaymentOption): void
126
    {
127
        $this->defaultPaymentOption = $defaultPaymentOption;
128
    }
129
130
    public function getStoredCustomerReference(): string
131
    {
132
        return $this->storedCustomerReference;
133
    }
134
135
    public function setStoredCustomerReference(string $storedCustomerReference): void
136
    {
137
        $this->storedCustomerReference = $storedCustomerReference;
138
    }
139
140
    public function getBrand(): ?string
141
    {
142
        return $this->brand;
143
    }
144
145
    public function setBrand(?string $brand): void
146
    {
147
        $this->brand = $brand;
148
    }
149
150
    public function getLastFour(): ?string
151
    {
152
        return $this->lastFour;
153
    }
154
155
    public function setLastFour(?string $lastFour): void
156
    {
157
        $this->lastFour = $lastFour;
158
    }
159
160
    public function getExpiryMonth(): ?string
161
    {
162
        return $this->expiryMonth;
163
    }
164
165
    public function setExpiryMonth(?string $expiryMonth): void
166
    {
167
        $this->expiryMonth = $expiryMonth;
168
    }
169
170
    public function getExpiryYear(): ?string
171
    {
172
        return $this->expiryYear;
173
    }
174
175
    public function setExpiryYear(?string $expiryYear): void
176
    {
177
        $this->expiryYear = $expiryYear;
178
    }
179
180
    public function getCreatedAt(): \DateTimeInterface
181
    {
182
        return $this->createdAt;
183
    }
184
185
    public function setCreatedAt(\DateTimeInterface $createdAt): void
186
    {
187
        $this->createdAt = $createdAt;
188
    }
189
190
    public function isDeleted(): bool
191
    {
192
        return $this->deleted;
193
    }
194
195
    public function setDeleted(bool $deleted): void
196
    {
197
        $this->deleted = $deleted;
198
    }
199
}
200