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

3
declare(strict_types=1);
4

5
namespace MLocati\Nexi\XPayWeb\Entity\CardVerification;
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-card_verification
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\CardVerification\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\CardVerification\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
     * {@inheritdoc}
96
     *
97
     * @see \MLocati\Nexi\XPayWeb\Entity::getRequiredFields()
98
     */
99
    protected function getRequiredFields(): array
100
    {
101
        return [
102
            'order' => true,
×
103
            'card' => true,
104
        ];
105
    }
106
}
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