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

ListPaymentsResultEntity::setPaymentDetails()   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\ResultEntity;
17
18
/**
19
 * This class represents List Payments Result Entity
20
 *
21
 * @method string               getId()
22
 * @method string               getStatus()
23
 * @method string               getColorState()
24
 * @method string               getMerchantName()
25
 * @method string               getCustomerName()
26
 * @method string               getPaymentType()
27
 * @method \DateTime|false      getCreatedAt()
28
 * @method \DateTime|false      getUpdatedAt()
29
 * @method string               getChannel()
30
 * @method string               getReference()
31
 * @method float                getAmount()
32
 * @method string               getCurrency()
33
 * @method float                getFee()
34
 * @method float                getTotal()
35
 * @method AddressEntity        getAddress()
36
 * @method PaymentDetailsEntity getPaymentDetails()
37
 * @method self                 setId(string $id)
38
 * @method self                 setStatus(string $status)
39
 * @method self                 setColorState(string $colorState)
40
 * @method self                 setMerchantName(string $merchantName)
41
 * @method self                 setCustomerName(string $customerName)
42
 * @method self                 setPaymentType(string $paymentType)
43
 * @method self                 setChannel(string $channel)
44
 * @method self                 setReference(string $reference)
45
 * @method self                 setAmount(float $amount)
46
 * @method self                 setCurrency(string $currency)
47
 * @method self                 setFee(float $fee)
48
 * @method self                 setTotal(float $total)
49
 *
50
 * @SuppressWarnings(PHPMD.ShortVariable)
51
 * @SuppressWarnings(PHPMD.TooManyFields)
52
 */
53
class ListPaymentsResultEntity extends ResultEntity
54
{
55
    /** @var string $id */
56
    protected $id;
57
58
    /** @var string $status */
59
    protected $status;
60
61
    /** @var string $colorState */
62
    protected $colorState;
63
64
    /** @var string $merchantName */
65
    protected $merchantName;
66
67
    /** @var string $customerName */
68
    protected $customerName;
69
70
    /** @var string $paymentType */
71
    protected $paymentType;
72
73
    /** @var \DateTime|bool $createdAt */
74
    protected $createdAt;
75
76
    /** @var \DateTime|bool $updatedAt */
77
    protected $updatedAt;
78
79
    /** @var string $channel */
80
    protected $channel;
81
82
    /** @var string $reference */
83
    protected $reference;
84
85
    /** @var float $amount */
86
    protected $amount;
87
88
    /** @var string $currency */
89
    protected $currency;
90
91
    /** @var float $fee */
92
    protected $fee;
93
94
    /** @var float $total */
95
    protected $total;
96
97
    /** @var AddressEntity $address */
98
    protected $address;
99
100
    /** @var PaymentDetailsEntity $paymentDetails */
101
    protected $paymentDetails;
102
103
    /**
104
     * Sets Created At
105
     *
106
     * @param string $createdAt
107
     */
108
    public function setCreatedAt($createdAt)
109
    {
110
        $this->createdAt = date_create($createdAt);
111
    }
112
113
    /**
114
     * Sets Updated At
115
     *
116
     * @param string $updatedAt
117
     */
118
    public function setUpdatedAt($updatedAt)
119
    {
120
        $this->updatedAt = date_create($updatedAt);
121
    }
122
123
    /**
124
     * Sets Address
125
     *
126
     * @param array $address
127
     */
128
    public function setAddress($address)
129
    {
130
        $this->address = new AddressEntity($address);
131
    }
132
133
    /**
134
     * Sets Payment Details
135
     *
136
     * @param array $paymentDetails
137
     */
138
    public function setPaymentDetails($paymentDetails)
139
    {
140
        $this->paymentDetails = new PaymentDetailsEntity($paymentDetails);
141
    }
142
}
143