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

3
declare(strict_types=1);
4

5
namespace MLocati\Nexi\XPayWeb\Entity\CreateOrderForMotoPayment;
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-moto
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\CreateOrderForMotoPayment\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
     * Object containing the details of the payment card.
59
     *
60
     * @required
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\CreateOrderForMotoPayment\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
     * @required
86
     *
87
     * @return $this
88
     */
89
    public function setCard(\MLocati\Nexi\XPayWeb\Entity\Card $value): self
90
    {
91
        return $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
     * {@inheritdoc}
146
     *
147
     * @see \MLocati\Nexi\XPayWeb\Entity::getRequiredFields()
148
     */
149
    protected function getRequiredFields(): array
150
    {
151
        return [
152
            'order' => true,
×
153
            'card' => true,
154
        ];
155
    }
156
}
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

© 2025 Coveralls, Inc