Payment::getClientEmail()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 2
cts 2
cp 1
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Recca0120\LaravelPayum\Model;
4
5
use Payum\Core\Model\PaymentInterface;
6
use Illuminate\Database\Eloquent\Model;
7
use Payum\Core\Model\CreditCardInterface;
8
use Recca0120\LaravelPayum\Contracts\PaymentStatus;
9
10
class Payment extends Model implements PaymentInterface, PaymentStatus
11
{
12
    /**
13
     * $table.
14
     *
15
     * @var string
16
     */
17
    protected $table = 'payum_payments';
18
19
    /**
20
     * $creditCard.
21
     *
22
     * @var \Payum\Core\Model\CreditCardInterface
23
     */
24
    protected $creditCard;
25
26
    /**
27
     * getNumber.
28
     *
29
     * @return string
30
     */
31 1
    public function getNumber()
32
    {
33 1
        return $this->getAttribute('number');
34
    }
35
36
    /**
37
     * setNumber.
38
     *
39
     * @param string $number
40
     */
41 1
    public function setNumber($number)
42
    {
43 1
        $this->setAttribute('number', $number);
44 1
    }
45
46
    /**
47
     * getDetails.
48
     *
49
     * @return mixed
50
     */
51 1
    public function getDetails()
52
    {
53 1
        return json_decode($this->getAttribute('details') ?: '{}', true);
54
    }
55
56
    /**
57
     * setDetails.
58
     *
59
     * @param mixed $details
60
     */
61 1
    public function setDetails($details)
62
    {
63 1
        $this->setAttribute('details', json_encode($details ?: []));
64 1
    }
65
66
    /**
67
     * getDescription.
68
     *
69
     * @return string
70
     */
71 1
    public function getDescription()
72
    {
73 1
        return $this->getAttribute('description');
74
    }
75
76
    /**
77
     * setDescription.
78
     *
79
     * @param string $description
80
     */
81 1
    public function setDescription($description)
82
    {
83 1
        $this->setAttribute('description', $description);
84 1
    }
85
86
    /**
87
     * getClientEmail.
88
     *
89
     * @return string
90
     */
91 1
    public function getClientEmail()
92
    {
93 1
        return $this->getAttribute('clientEmail');
94
    }
95
96
    /**
97
     * setClientEmail.
98
     *
99
     * @param string $clientEmail
100
     */
101 1
    public function setClientEmail($clientEmail)
102
    {
103 1
        $this->setAttribute('clientEmail', $clientEmail);
104 1
    }
105
106
    /**
107
     * getClientId.
108
     *
109
     * @return string
110
     */
111 1
    public function getClientId()
112
    {
113 1
        return $this->getAttribute('clientId');
114
    }
115
116
    /**
117
     * setClientId.
118
     *
119
     * @param string $clientId
120
     */
121 1
    public function setClientId($clientId)
122
    {
123 1
        $this->setAttribute('clientId', $clientId);
124 1
    }
125
126
    /**
127
     * getTotalAmount.
128
     *
129
     * @param  float
130
     */
131 1
    public function getTotalAmount()
132
    {
133 1
        return $this->getAttribute('totalAmount');
134
    }
135
136
    /**
137
     * setTotalAmount.
138
     *
139
     * @param float $totalAmount
140
     */
141 1
    public function setTotalAmount($totalAmount)
142
    {
143 1
        $this->setAttribute('totalAmount', $totalAmount);
144 1
    }
145
146
    /**
147
     * getCurrencyCode.
148
     *
149
     * @return string
150
     */
151 1
    public function getCurrencyCode()
152
    {
153 1
        return $this->getAttribute('currencyCode');
154
    }
155
156
    /**
157
     * setCurrencyCode.
158
     *
159
     * @param string $currencyCode
160
     */
161 1
    public function setCurrencyCode($currencyCode)
162
    {
163 1
        $this->setAttribute('currencyCode', $currencyCode);
164 1
    }
165
166
    /**
167
     * getCreditCard.
168
     *
169
     * @return \Payum\Core\Model\CreditCardInterface
170
     */
171 1
    public function getCreditCard()
172
    {
173 1
        return $this->creditCard;
174
    }
175
176
    /**
177
     * setCreditCard.
178
     *
179
     * @param \Payum\Core\Model\CreditCardInterface $creditCard
180
     */
181 1
    public function setCreditCard(CreditCardInterface $creditCard = null)
182
    {
183 1
        $this->creditCard = $creditCard;
184 1
    }
185
186
    /**
187
     * setStatus.
188
     *
189
     * @param string $status
190
     */
191 1
    public function setStatus($status)
192
    {
193 1
        $this->setAttribute('status', $status);
194 1
    }
195
196
    /**
197
     * getStatus.
198
     *
199
     * @return string
200
     */
201 1
    public function getStatus()
202
    {
203 1
        return $this->getAttribute('status');
204
    }
205
}
206