ShippingGoodsPaymentResultEntity   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 132
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 7
eloc 34
c 1
b 0
f 0
dl 0
loc 132
rs 10

5 Methods

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