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

3
declare(strict_types=1);
4

5
namespace MLocati\Nexi\XPayWeb\Entity\CreateXPayBuildOrder;
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-build
17
 */
18
class Request extends Entity
19
{
20
    /**
21
     * Ecommerce site address, must start with "https".
22
     *
23
     * @required
24
     *
25
     * @throws \MLocati\Nexi\XPayWeb\Exception\WrongFieldType
26
     *
27
     * @example https://merchanturl.it
28
     */
29
    public function getMerchantUrl(): ?string
30
    {
31
        return $this->_getString('merchantUrl');
×
32
    }
33

34
    /**
35
     * Ecommerce site address, must start with "https".
36
     *
37
     * @required
38
     *
39
     * @return $this
40
     *
41
     * @example https://merchanturl.it
42
     */
43
    public function setMerchantUrl(string $value): self
44
    {
45
        return $this->_set('merchantUrl', $value);
×
46
    }
47

48
    /**
49
     * Object containing the detail of the order.
50
     *
51
     * @required
52
     *
53
     * @throws \MLocati\Nexi\XPayWeb\Exception\WrongFieldType
54
     */
55
    public function getOrder(): ?\MLocati\Nexi\XPayWeb\Entity\Order
56
    {
NEW
57
        return $this->_getEntity('order', \MLocati\Nexi\XPayWeb\Entity\Order::class);
×
58
    }
59

60
    /**
61
     * @see \MLocati\Nexi\XPayWeb\Entity\CreateXPayBuildOrder\Request::getOrder()
62
     */
63
    public function getOrCreateOrder(): \MLocati\Nexi\XPayWeb\Entity\Order
64
    {
65
        $result = $this->getOrder();
×
66
        if ($result === null) {
×
NEW
67
            $this->setOrder($result = new \MLocati\Nexi\XPayWeb\Entity\Order());
×
68
        }
69

70
        return $result;
×
71
    }
72

73
    /**
74
     * Object containing the detail of the order.
75
     *
76
     * @required
77
     *
78
     * @return $this
79
     */
80
    public function setOrder(\MLocati\Nexi\XPayWeb\Entity\Order $value): self
81
    {
82
        return $this->_set('order', $value);
×
83
    }
84

85
    /**
86
     * Object containing the payment details.
87
     *
88
     * @required
89
     *
90
     * @throws \MLocati\Nexi\XPayWeb\Exception\WrongFieldType
91
     */
92
    public function getPaymentSession(): ?\MLocati\Nexi\XPayWeb\Entity\PaymentSession
93
    {
NEW
94
        return $this->_getEntity('paymentSession', \MLocati\Nexi\XPayWeb\Entity\PaymentSession::class);
×
95
    }
96

97
    /**
98
     * @see \MLocati\Nexi\XPayWeb\Entity\CreateXPayBuildOrder\Request::getPaymentSession()
99
     */
100
    public function getOrCreatePaymentSession(): \MLocati\Nexi\XPayWeb\Entity\PaymentSession
101
    {
102
        $result = $this->getPaymentSession();
×
103
        if ($result === null) {
×
NEW
104
            $this->setPaymentSession($result = new \MLocati\Nexi\XPayWeb\Entity\PaymentSession());
×
105
        }
106

107
        return $result;
×
108
    }
109

110
    /**
111
     * Object containing the payment details.
112
     *
113
     * @required
114
     *
115
     * @return $this
116
     */
117
    public function setPaymentSession(\MLocati\Nexi\XPayWeb\Entity\PaymentSession $value): self
118
    {
119
        return $this->_set('paymentSession', $value);
×
120
    }
121

122
    /**
123
     * {@inheritdoc}
124
     *
125
     * @see \MLocati\Nexi\XPayWeb\Entity::getRequiredFields()
126
     */
127
    protected function getRequiredFields(): array
128
    {
129
        return [
130
            'merchantUrl' => true,
×
131
            'order' => true,
132
            'paymentSession' => true,
133
        ];
134
    }
135
}
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