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

mlocati / nexi-xpay-web / 9096888816

15 May 2024 01:49PM UTC coverage: 5.917%. First build
9096888816

Pull #2

github

web-flow
Merge b07771102 into 25fd46802
Pull Request #2: Rename package and namespace

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/CreateOrderForMerchantInitiatedTransaction/Request.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace MLocati\Nexi\XPayWeb\Entity\CreateOrderForMerchantInitiatedTransaction;
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-mit
17
 */
18
class Request extends Entity
19
{
20
    /**
21
     * Object containing the detail of the order.
22
     *
23
     * @required
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\CreateOrderForMerchantInitiatedTransaction\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
     * @required
49
     *
50
     * @return $this
51
     */
52
    public function setOrder(\MLocati\Nexi\XPayWeb\Entity\Order $value): self
53
    {
54
        return $this->_set('order', $value);
×
55
    }
56

57
    /**
58
     * Contract ID.
59
     *
60
     * @required
61
     * Minimum length: 1
62
     * Maximum length: 18
63
     *
64
     * @throws \MLocati\Nexi\XPayWeb\Exception\WrongFieldType
65
     *
66
     * @example C2834987
67
     */
68
    public function getContractId(): ?string
69
    {
70
        return $this->_getString('contractId');
×
71
    }
72

73
    /**
74
     * Contract ID.
75
     *
76
     * @required
77
     * Minimum length: 1
78
     * Maximum length: 18
79
     *
80
     * @return $this
81
     *
82
     * @example C2834987
83
     */
84
    public function setContractId(string $value): self
85
    {
86
        return $this->_set('contractId', $value);
×
87
    }
88

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

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

139
    /**
140
     * {@inheritdoc}
141
     *
142
     * @see \MLocati\Nexi\XPayWeb\Entity::getRequiredFields()
143
     */
144
    protected function getRequiredFields(): array
145
    {
146
        return [
147
            'order' => true,
×
148
            'contractId' => true,
149
        ];
150
    }
151
}
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