setPaymentFeeAcceptedByMerchant()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
/**
4
 * PHP version 5.4 and 8
5
 *
6
 * @category  MessageEntity
7
 * @package   Payever\Payments
8
 * @author    payever GmbH <[email protected]>
9
 * @copyright 2017-2021 payever GmbH
10
 * @license   MIT <https://opensource.org/licenses/MIT>
11
 * @link      https://docs.payever.org/shopsystems/api/getting-started
12
 */
13
14
namespace Payever\ExternalIntegration\Payments\Http\MessageEntity;
15
16
use Payever\ExternalIntegration\Core\Http\MessageEntity\ResultEntity;
17
18
/**
19
 * This class represents Get Transaction Result Entity
20
 *
21
 * @method string        getMerchantReference()
22
 * @method string        getId()
23
 * @method string        getStatus()
24
 * @method string        getSpecificStatus()
25
 * @method string        getColorState()
26
 * @method string        getMerchantName()
27
 * @method string        getCustomerName()
28
 * @method string        getPaymentType()
29
 * @method string        getLastAction()
30
 * @method string        getCustomerEmail()
31
 * @method \DateTime|false getCreatedAt()
32
 * @method \DateTime|false getUpdatedAt()
33
 * @method string        getChannel()
34
 * @method string        getReference()
35
 * @method float         getAmount()
36
 * @method string        getCurrency()
37
 * @method float         getFee()
38
 * @method float         getTotal()
39
 * @method AddressEntity getAddress()
40
 * @method AddressEntity getShippingAddress()
41
 * @method array         getPaymentDetailsArray()
42
 * @method int           getBusinessShippingOptionId()
43
 * @method string        getShippingType()
44
 * @method string        getShippingOptionName()
45
 * @method string        getShippingCategory()
46
 * @method string        getShippingMethodCode()
47
 * @method string        getShippingMethodName()
48
 * @method string        getDetailsSearchKey()
49
 * @method string        getCallbackTrigger()
50
 * @method string        getPlace()
51
 * @method float         getDeliveryFee()
52
 * @method float         getPaymentFee()
53
 * @method float         getDownPayment()
54
 * @method bool          getPaymentFeeAcceptedByMerchant()
55
 * @method bool          getPrefilled()
56
 * @method \stdClass[]   getActions()
57
 * @method self          setMerchantReference(string $merchantReference)
58
 * @method self          setId(string $id)
59
 * @method self          setStatus(string $status)
60
 * @method self          setSpecificStatus(string $specificStatus)
61
 * @method self          setColorState(string $colorState)
62
 * @method self          setMerchantName(string $merchantName)
63
 * @method self          setCustomerName(string $customerName)
64
 * @method self          setPaymentType(string $paymentType)
65
 * @method self          setLastAction(string $lastAction)
66
 * @method self          setCustomerEmail(string $customerEmail)
67
 * @method self          setChannel(string $channel)
68
 * @method self          setReference(string $reference)
69
 * @method self          setAmount(float $amount)
70
 * @method self          setCurrency(string $currency)
71
 * @method self          setFee(float $fee)
72
 * @method self          setTotal(float $total)
73
 * @method self          setPaymentDetailsArray(array $paymentDetailsArray)
74
 * @method self          setBusinessShippingOptionId(int $businessShippingOptionId)
75
 * @method self          setShippingType(string $shippingType)
76
 * @method self          setShippingOptionName(string $shippingOptionName)
77
 * @method self          setShippingCategory(string $shippingCategory)
78
 * @method self          setShippingMethodCode(string $shippingMethodCode)
79
 * @method self          setShippingMethodName(string $shippingMethodName)
80
 * @method self          setDetailsSearchKey(string $detailsSearchKey)
81
 * @method self          setCallbackTrigger(string $callbackTrigger)
82
 * @method self          setPlace(string $place)
83
 * @method self          setDeliveryFee(float $deliveryFee)
84
 * @method self          setPaymentFee(float $paymentFee)
85
 * @method self          setDownPayment(float $downPayment)
86
 * @method self          setActions(array $actions)
87
 *
88
 * @SuppressWarnings(PHPMD.LongVariable)
89
 * @SuppressWarnings(PHPMD.ShortVariable)
90
 * @SuppressWarnings(PHPMD.TooManyFields)
91
 */
92
class GetTransactionResultEntity extends ResultEntity
93
{
94
    /** @var string $merchantReference */
95
    protected $merchantReference;
96
97
    /** @var string $id */
98
    protected $id;
99
100
    /** @var string $status*/
101
    protected $status;
102
103
    /** @var string $specificStatus */
104
    protected $specificStatus;
105
106
    /** @var string $colorState */
107
    protected $colorState;
108
109
    /** @var string $merchantName */
110
    protected $merchantName;
111
112
    /** @var string $customerName */
113
    protected $customerName;
114
115
    /** @var string $paymentType */
116
    protected $paymentType;
117
118
    /** @var string $lastAction */
119
    protected $lastAction;
120
121
    /** @var string $customerEmail */
122
    protected $customerEmail;
123
124
    /** @var \DateTime|bool $createdAt */
125
    protected $createdAt;
126
127
    /** @var \DateTime|bool $updatedAt */
128
    protected $updatedAt;
129
130
    /** @var string $channel */
131
    protected $channel;
132
133
    /** @var string $reference */
134
    protected $reference;
135
136
    /** @var float $amount */
137
    protected $amount;
138
139
    /** @var string $currency */
140
    protected $currency;
141
142
    /** @var float $fee */
143
    protected $fee;
144
145
    /** @var float $total */
146
    protected $total;
147
148
    /** @var AddressEntity $address */
149
    protected $address;
150
151
    /** @var AddressEntity $shippingAddress */
152
    protected $shippingAddress;
153
154
    /** @var array $paymentDetailsArray */
155
    protected $paymentDetailsArray;
156
157
    /** @var int $businessShippingOptionId */
158
    protected $businessShippingOptionId;
159
160
    /** @var string $shippingType */
161
    protected $shippingType;
162
163
    /** @var string $shippingOptionName */
164
    protected $shippingOptionName;
165
166
    /** @var string $shippingCategory */
167
    protected $shippingCategory;
168
169
    /** @var string $shippingMethodCode */
170
    protected $shippingMethodCode;
171
172
    /** @var string $shippingMethodName */
173
    protected $shippingMethodName;
174
175
    /** @var string $detailsSearchKey */
176
    protected $detailsSearchKey;
177
178
    /** @var string $callbackTrigger */
179
    protected $callbackTrigger;
180
181
    /** @var string $place */
182
    protected $place;
183
184
    /** @var float $deliveryFee */
185
    protected $deliveryFee;
186
187
    /** @var float $paymentFee */
188
    protected $paymentFee;
189
190
    /** @var float $downPayment */
191
    protected $downPayment;
192
193
    /** @var bool $paymentFeeAcceptedByMerchant */
194
    protected $paymentFeeAcceptedByMerchant;
195
196
    /** @var bool $prefilled */
197
    protected $prefilled;
198
199
    /** @var \stdClass[]|array $actions */
200
    protected $actions;
201
202
    /**
203
     * Sets Created At
204
     *
205
     * @param string $createdAt
206
     * @return self
207
     */
208
    public function setCreatedAt($createdAt)
209
    {
210
        if ($createdAt) {
211
            $this->createdAt = date_create($createdAt);
212
        }
213
214
        return $this;
215
    }
216
217
    /**
218
     * Sets Updated At
219
     *
220
     * @param string $updatedAt
221
     * @return self
222
     */
223
    public function setUpdatedAt($updatedAt)
224
    {
225
        if ($updatedAt) {
226
            $this->updatedAt = date_create($updatedAt);
227
        }
228
229
        return $this;
230
    }
231
232
    /**
233
     * Sets Address
234
     *
235
     * @param array $address
236
     * @return self
237
     */
238
    public function setAddress($address)
239
    {
240
        $this->address = new AddressEntity($address);
241
242
        return $this;
243
    }
244
245
    /**
246
     * Sets Shipping Address
247
     *
248
     * @param array $shippingAddress
249
     * @return self
250
     */
251
    public function setShippingAddress($shippingAddress)
252
    {
253
        $this->shippingAddress = new AddressEntity($shippingAddress);
254
255
        return $this;
256
    }
257
258
    /**
259
     * Sets Payment Fee Accepted By Merchant
260
     *
261
     * @param bool $paymentFeeAcceptedByMerchant
262
     * @return self
263
     */
264
    public function setPaymentFeeAcceptedByMerchant($paymentFeeAcceptedByMerchant)
265
    {
266
        $this->paymentFeeAcceptedByMerchant = filter_var($paymentFeeAcceptedByMerchant, FILTER_VALIDATE_BOOLEAN);
267
268
        return $this;
269
    }
270
271
    /**
272
     * Sets Prefilled
273
     *
274
     * @param bool $prefilled
275
     * @return self
276
     */
277
    public function setPrefilled($prefilled)
278
    {
279
        $this->prefilled = filter_var($prefilled, FILTER_VALIDATE_BOOLEAN);
280
281
        return $this;
282
    }
283
}
284