• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mlocati / nexi-xpay-web / 9096955143

15 May 2024 01:53PM UTC coverage: 5.917%. First build
9096955143

push

github

web-flow
Rename package and namespace (#2)

2 of 63 new or added lines in 24 files covered. (3.17%)

111 of 1876 relevant lines covered (5.92%)

0.51 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Entity/CreateVirtualCartOrder/Request.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace MLocati\Nexi\XPayWeb\Entity\CreateVirtualCartOrder;
6

7
use MLocati\Nexi\XPayWeb\Entity;
8

9
/*
10
 * WARNING: DO NOT EDIT THIS FILE
11
 * It has been generated automaticlly from a template.
12
 * Edit the template instead.
13
 */
14

15
/**
16
 * @see https://developer.nexi.it/en/api/post-orders-virtual_card
17
 */
18
class Request extends Entity
19
{
20
    /**
21
     * Object containing the detail of the order.
22
     *
23
     * @optional
24
     *
25
     * @throws \MLocati\Nexi\XPayWeb\Exception\WrongFieldType
26
     */
27
    public function getOrder(): ?\MLocati\Nexi\XPayWeb\Entity\Order
28
    {
NEW
29
        return $this->_getEntity('order', \MLocati\Nexi\XPayWeb\Entity\Order::class);
×
30
    }
31

32
    /**
33
     * @see \MLocati\Nexi\XPayWeb\Entity\CreateVirtualCartOrder\Request::getOrder()
34
     */
35
    public function getOrCreateOrder(): \MLocati\Nexi\XPayWeb\Entity\Order
36
    {
37
        $result = $this->getOrder();
×
38
        if ($result === null) {
×
NEW
39
            $this->setOrder($result = new \MLocati\Nexi\XPayWeb\Entity\Order());
×
40
        }
41

42
        return $result;
×
43
    }
44

45
    /**
46
     * Object containing the detail of the order.
47
     *
48
     * @optional
49
     *
50
     * @return $this
51
     */
52
    public function setOrder(?\MLocati\Nexi\XPayWeb\Entity\Order $value): self
53
    {
54
        return $value === null ? $this->_unset('order') : $this->_set('order', $value);
×
55
    }
56

57
    /**
58
     * Object containing the details of the payment card.
59
     *
60
     * @optional
61
     *
62
     * @throws \MLocati\Nexi\XPayWeb\Exception\WrongFieldType
63
     */
64
    public function getCard(): ?\MLocati\Nexi\XPayWeb\Entity\Card
65
    {
NEW
66
        return $this->_getEntity('card', \MLocati\Nexi\XPayWeb\Entity\Card::class);
×
67
    }
68

69
    /**
70
     * @see \MLocati\Nexi\XPayWeb\Entity\CreateVirtualCartOrder\Request::getCard()
71
     */
72
    public function getOrCreateCard(): \MLocati\Nexi\XPayWeb\Entity\Card
73
    {
74
        $result = $this->getCard();
×
75
        if ($result === null) {
×
NEW
76
            $this->setCard($result = new \MLocati\Nexi\XPayWeb\Entity\Card());
×
77
        }
78

79
        return $result;
×
80
    }
81

82
    /**
83
     * Object containing the details of the payment card.
84
     *
85
     * @optional
86
     *
87
     * @return $this
88
     */
89
    public function setCard(?\MLocati\Nexi\XPayWeb\Entity\Card $value): self
90
    {
91
        return $value === null ? $this->_unset('card') : $this->_set('card', $value);
×
92
    }
93

94
    /**
95
     * Overwrites the default confirmation method of the terminal, for card payments only:
96
     * * IMPLICIT - automatic confirmation
97
     * * EXPLICIT - authorization only
98
     * Default value depends on the terminal configuration.
99
     * 1. Terminal set to EXPLICIT:
100
     * a. if the captureType is EXPLICIT the capture will be EXPLICIT
101
     * b. if the captureType is null the capture will be EXPLICIT
102
     * c. if the captureType is IMPLICIT the capture will be IMPLICIT
103
     * 2. Terminal set to IMPLICIT:
104
     * a. if the captureType is EXPLICIT the capture will be an error
105
     * b. if the captureType is null the capture will be IMPLICIT
106
     * c. if the captureType is IMPLICIT the capture will be IMPLICIT
107
     *
108
     * @optional
109
     *
110
     * @throws \MLocati\Nexi\XPayWeb\Exception\WrongFieldType
111
     *
112
     * @example EXPLICIT
113
     */
114
    public function getCaptureType(): ?string
115
    {
116
        return $this->_getString('captureType');
×
117
    }
118

119
    /**
120
     * Overwrites the default confirmation method of the terminal, for card payments only:
121
     * * IMPLICIT - automatic confirmation
122
     * * EXPLICIT - authorization only
123
     * Default value depends on the terminal configuration.
124
     * 1. Terminal set to EXPLICIT:
125
     * a. if the captureType is EXPLICIT the capture will be EXPLICIT
126
     * b. if the captureType is null the capture will be EXPLICIT
127
     * c. if the captureType is IMPLICIT the capture will be IMPLICIT
128
     * 2. Terminal set to IMPLICIT:
129
     * a. if the captureType is EXPLICIT the capture will be an error
130
     * b. if the captureType is null the capture will be IMPLICIT
131
     * c. if the captureType is IMPLICIT the capture will be IMPLICIT
132
     *
133
     * @optional
134
     *
135
     * @return $this
136
     *
137
     * @example EXPLICIT
138
     */
139
    public function setCaptureType(?string $value): self
140
    {
141
        return $value === null ? $this->_unset('captureType') : $this->_set('captureType', $value);
×
142
    }
143

144
    /**
145
     * Transaction amount in smallest currency unit. 50 EUR is represented as 5000 (2 decimals) 50 JPY is represented as 50 (0 decimals). Used when the amount is different by the one present on the order. The currency to consider is the one defined to the amount order.
146
     *
147
     * @optional
148
     *
149
     * @throws \MLocati\Nexi\XPayWeb\Exception\WrongFieldType
150
     *
151
     * @example 3545
152
     */
153
    public function getSessionAmount(): ?string
154
    {
155
        return $this->_getString('sessionAmount');
×
156
    }
157

158
    /**
159
     * Transaction amount in smallest currency unit. 50 EUR is represented as 5000 (2 decimals) 50 JPY is represented as 50 (0 decimals). Used when the amount is different by the one present on the order. The currency to consider is the one defined to the amount order.
160
     *
161
     * @optional
162
     *
163
     * @return $this
164
     *
165
     * @example 3545
166
     */
167
    public function setSessionAmount(?string $value): self
168
    {
169
        return $value === null ? $this->_unset('sessionAmount') : $this->_set('sessionAmount', $value);
×
170
    }
171

172
    /**
173
     * {@inheritdoc}
174
     *
175
     * @see \MLocati\Nexi\XPayWeb\Entity::getRequiredFields()
176
     */
177
    protected function getRequiredFields(): array
178
    {
179
        return [
180
        ];
×
181
    }
182
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc