Passed
Push — master ( 302660...3652f8 )
by payever
04:19 queued 01:32
created

CancelPaymentResultEntity::setCreatedAt()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
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\ChannelSetEntity;
17
use Payever\ExternalIntegration\Core\Http\MessageEntity\ResultEntity;
18
19
/**
20
 * This class represents Cancel Payment Result Entity
21
 *
22
 * @method string               getId()
23
 * @method string               getStatus()
24
 * @method string               getColorState()
25
 * @method string               getMerchantName()
26
 * @method string               getCustomerName()
27
 * @method string               getPaymentType()
28
 * @method string               getLastAction()
29
 * @method \DateTime|false      getCreatedAt()
30
 * @method \DateTime|false      getUpdatedAt()
31
 * @method string               getChannel()
32
 * @method ChannelSetEntity     getChannelSet()
33
 * @method string               getReference()
34
 * @method array                getItems()
35
 * @method float                getAmount()
36
 * @method string               getCurrency()
37
 * @method float                getFee()
38
 * @method float                getOtherFees()
39
 * @method float                getPayeverCommission()
40
 * @method float                getTotal()
41
 * @method AddressEntity        getAddress()
42
 * @method PaymentDetailsEntity getPaymentDetails()
43
 * @method self                 setId(string $id)
44
 * @method self                 setStatus(string $status)
45
 * @method self                 setColorState(string $colorState)
46
 * @method self                 setMerchantName(string $merchantName)
47
 * @method self                 setCustomerName(string $customerName)
48
 * @method self                 setPaymentType(string $paymentType)
49
 * @method self                 setLastAction(string $lastAction)
50
 * @method self                 setChannel(string $channel)
51
 * @method self                 setReference(string $reference)
52
 * @method self                 setItems(array $items)
53
 * @method self                 setAmount(float $amount)
54
 * @method self                 setCurrency(string $currency)
55
 * @method self                 setFee(float $fee)
56
 * @method self                 setOtherFees(float $otherFees)
57
 * @method self                 setPayeverCommission(float $payeverCommission)
58
 * @method self                 setTotal(float $total)
59
 *
60
 * @SuppressWarnings(PHPMD.ShortVariable)
61
 * @SuppressWarnings(PHPMD.TooManyFields)
62
 */
63
class CancelPaymentResultEntity extends ResultEntity
64
{
65
    /** @var string $id */
66
    protected $id;
67
68
    /** @var string $status */
69
    protected $status;
70
71
    /** @var string $colorState */
72
    protected $colorState;
73
74
    /** @var string $merchantName */
75
    protected $merchantName;
76
77
    /** @var string $customerName */
78
    protected $customerName;
79
80
    /** @var string $paymentType */
81
    protected $paymentType;
82
83
    /** @var string $lastAction */
84
    protected $lastAction;
85
86
    /** @var \DateTime|bool $createdAt */
87
    protected $createdAt;
88
89
    /** @var \DateTime|bool $updatedAt */
90
    protected $updatedAt;
91
92
    /** @var string $channel */
93
    protected $channel;
94
95
    /** @var ChannelSetEntity $channelSet */
96
    protected $channelSet;
97
98
    /** @var string $reference */
99
    protected $reference;
100
101
    /** @var array $items */
102
    protected $items;
103
104
    /** @var float $amount */
105
    protected $amount;
106
107
    /** @var string $currency */
108
    protected $currency;
109
110
    /** @var float $fee */
111
    protected $fee;
112
113
    /** @var float $otherFees */
114
    protected $otherFees;
115
116
    /** @var float $payeverCommission */
117
    protected $payeverCommission;
118
119
    /** @var float $total */
120
    protected $total;
121
122
    /** @var AddressEntity $address */
123
    protected $address;
124
125
    /** @var PaymentDetailsEntity $paymentDetails */
126
    protected $paymentDetails;
127
128
    /**
129
     * Sets Created At
130
     *
131
     * @param string $createdAt
132
     */
133
    public function setCreatedAt($createdAt)
134
    {
135
        $this->createdAt = date_create($createdAt);
136
    }
137
138
    /**
139
     * Sets Updated At
140
     *
141
     * @param string $updatedAt
142
     */
143
    public function setUpdatedAt($updatedAt)
144
    {
145
        $this->updatedAt = date_create($updatedAt);
146
    }
147
148
    /**
149
     * Sets Address
150
     *
151
     * @param array $address
152
     */
153
    public function setAddress($address)
154
    {
155
        $this->address = new AddressEntity($address);
156
    }
157
158
    /**
159
     * Sets Channel Set
160
     *
161
     * @param array $channelSet
162
     */
163
    public function setChannelSet($channelSet)
164
    {
165
        $this->channelSet = new ChannelSetEntity($channelSet);
166
    }
167
168
    /**
169
     * Sets Payment Details
170
     *
171
     * @param array $paymentDetails
172
     */
173
    public function setPaymentDetails($paymentDetails)
174
    {
175
        $this->paymentDetails = new PaymentDetailsEntity($paymentDetails);
176
    }
177
}
178